@webstudio-is/sdk-components-react 0.196.0 → 0.198.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 (172) hide show
  1. package/lib/__generated__/image.props.js +1 -0
  2. package/lib/__generated__/vimeo-preview-image.props.js +6 -1
  3. package/lib/__generated__/vimeo.props.js +4 -5
  4. package/lib/__generated__/youtube.props.js +665 -0
  5. package/lib/blockquote.template.js +11 -0
  6. package/lib/blockquote.ws.js +5 -15
  7. package/lib/body.ws.js +1 -1
  8. package/lib/bold.ws.js +1 -1
  9. package/lib/box.ws.js +1 -1
  10. package/lib/button.ws.js +1 -1
  11. package/lib/checkbox.template.js +14 -0
  12. package/lib/checkbox.ws.js +5 -25
  13. package/lib/code-text.ws.js +1 -1
  14. package/lib/components.js +35 -33
  15. package/lib/content-embed.template.js +83 -0
  16. package/lib/form.ws.js +1 -1
  17. package/lib/heading.template.js +11 -0
  18. package/lib/heading.ws.js +12 -22
  19. package/lib/image.ws.js +17 -22
  20. package/lib/input.ws.js +1 -1
  21. package/lib/italic.ws.js +1 -1
  22. package/lib/label.template.js +10 -0
  23. package/lib/label.ws.js +13 -28
  24. package/lib/link.template.js +11 -0
  25. package/lib/link.ws.js +3 -13
  26. package/lib/list-item.template.js +11 -0
  27. package/lib/list-item.ws.js +8 -18
  28. package/lib/list.ws.js +1 -1
  29. package/lib/markdown-embed.js +10 -5
  30. package/lib/markdown-embed.template.js +75 -0
  31. package/lib/markdown-embed.ws.js +9 -87
  32. package/lib/metas.js +59 -59
  33. package/lib/option.ws.js +4 -5
  34. package/lib/paragraph.template.js +11 -0
  35. package/lib/paragraph.ws.js +10 -20
  36. package/lib/props.js +32 -30
  37. package/lib/radio-button.template.js +14 -0
  38. package/lib/radio-button.ws.js +7 -27
  39. package/lib/rich-text-link.ws.js +3 -5
  40. package/lib/select.template.js +16 -0
  41. package/lib/select.ws.js +11 -63
  42. package/lib/separator.ws.js +1 -1
  43. package/lib/span.ws.js +1 -1
  44. package/lib/subscript.ws.js +1 -1
  45. package/lib/superscript.ws.js +1 -1
  46. package/lib/templates.js +34 -6
  47. package/lib/text.template.js +11 -0
  48. package/lib/text.ws.js +9 -25
  49. package/lib/textarea.ws.js +1 -1
  50. package/lib/time.ws.js +1 -1
  51. package/lib/types/__generated__/blockquote.props.d.ts +1 -1
  52. package/lib/types/__generated__/body.props.d.ts +1 -1
  53. package/lib/types/__generated__/bold.props.d.ts +1 -1
  54. package/lib/types/__generated__/box.props.d.ts +1 -1
  55. package/lib/types/__generated__/button.props.d.ts +1 -1
  56. package/lib/types/__generated__/checkbox.props.d.ts +1 -1
  57. package/lib/types/__generated__/code-text.props.d.ts +1 -1
  58. package/lib/types/__generated__/form.props.d.ts +1 -1
  59. package/lib/types/__generated__/fragment.props.d.ts +1 -1
  60. package/lib/types/__generated__/heading.props.d.ts +1 -1
  61. package/lib/types/__generated__/html-embed.props.d.ts +1 -1
  62. package/lib/types/__generated__/image.props.d.ts +1 -1
  63. package/lib/types/__generated__/input.props.d.ts +1 -1
  64. package/lib/types/__generated__/italic.props.d.ts +1 -1
  65. package/lib/types/__generated__/label.props.d.ts +1 -1
  66. package/lib/types/__generated__/link.props.d.ts +1 -1
  67. package/lib/types/__generated__/list-item.props.d.ts +1 -1
  68. package/lib/types/__generated__/list.props.d.ts +1 -1
  69. package/lib/types/__generated__/markdown-embed.props.d.ts +1 -1
  70. package/lib/types/__generated__/option.props.d.ts +1 -1
  71. package/lib/types/__generated__/paragraph.props.d.ts +1 -1
  72. package/lib/types/__generated__/radio-button.props.d.ts +1 -1
  73. package/lib/types/__generated__/rich-text-link.props.d.ts +1 -1
  74. package/lib/types/__generated__/select.props.d.ts +1 -1
  75. package/lib/types/__generated__/separator.props.d.ts +1 -1
  76. package/lib/types/__generated__/slot.props.d.ts +1 -1
  77. package/lib/types/__generated__/span.props.d.ts +1 -1
  78. package/lib/types/__generated__/subscript.props.d.ts +1 -1
  79. package/lib/types/__generated__/superscript.props.d.ts +1 -1
  80. package/lib/types/__generated__/text.props.d.ts +1 -1
  81. package/lib/types/__generated__/textarea.props.d.ts +1 -1
  82. package/lib/types/__generated__/time.props.d.ts +1 -1
  83. package/lib/types/__generated__/vimeo-play-button.props.d.ts +1 -1
  84. package/lib/types/__generated__/vimeo-preview-image.props.d.ts +1 -1
  85. package/lib/types/__generated__/vimeo-spinner.props.d.ts +1 -1
  86. package/lib/types/__generated__/vimeo.props.d.ts +1 -1
  87. package/lib/types/__generated__/webhook-form.props.d.ts +1 -1
  88. package/lib/types/__generated__/xml-node.props.d.ts +1 -1
  89. package/lib/types/__generated__/xml-time.props.d.ts +1 -1
  90. package/lib/types/__generated__/youtube.props.d.ts +2 -0
  91. package/lib/types/blockquote.template.d.ts +2 -0
  92. package/lib/types/blockquote.ws.d.ts +1 -1
  93. package/lib/types/body.ws.d.ts +1 -1
  94. package/lib/types/bold.ws.d.ts +1 -1
  95. package/lib/types/box.ws.d.ts +1 -1
  96. package/lib/types/button.ws.d.ts +1 -1
  97. package/lib/types/checkbox.d.ts +1 -1
  98. package/lib/types/checkbox.template.d.ts +2 -0
  99. package/lib/types/checkbox.ws.d.ts +1 -1
  100. package/lib/types/code-text.ws.d.ts +1 -1
  101. package/lib/types/components.d.ts +1 -0
  102. package/lib/types/content-embed.template.d.ts +2 -0
  103. package/lib/types/form.ws.d.ts +1 -1
  104. package/lib/types/fragment.ws.d.ts +1 -1
  105. package/lib/types/heading.template.d.ts +2 -0
  106. package/lib/types/heading.ws.d.ts +1 -1
  107. package/lib/types/html-embed.ws.d.ts +1 -1
  108. package/lib/types/image.ws.d.ts +1 -9
  109. package/lib/types/input.ws.d.ts +1 -1
  110. package/lib/types/italic.ws.d.ts +1 -1
  111. package/lib/types/label.template.d.ts +2 -0
  112. package/lib/types/label.ws.d.ts +1 -1
  113. package/lib/types/link.template.d.ts +2 -0
  114. package/lib/types/link.ws.d.ts +1 -1
  115. package/lib/types/list-item.template.d.ts +2 -0
  116. package/lib/types/list-item.ws.d.ts +1 -1
  117. package/lib/types/list.ws.d.ts +1 -1
  118. package/lib/types/markdown-embed.template.d.ts +2 -0
  119. package/lib/types/markdown-embed.ws.d.ts +1 -1
  120. package/lib/types/metas.d.ts +1 -1
  121. package/lib/types/option.ws.d.ts +1 -1
  122. package/lib/types/paragraph.template.d.ts +2 -0
  123. package/lib/types/paragraph.ws.d.ts +1 -1
  124. package/lib/types/props.d.ts +1 -0
  125. package/lib/types/radio-button.d.ts +1 -1
  126. package/lib/types/radio-button.template.d.ts +2 -0
  127. package/lib/types/radio-button.ws.d.ts +1 -1
  128. package/lib/types/rich-text-link.ws.d.ts +1 -1
  129. package/lib/types/select.template.d.ts +2 -0
  130. package/lib/types/select.ws.d.ts +1 -1
  131. package/lib/types/separator.ws.d.ts +1 -1
  132. package/lib/types/slot.ws.d.ts +1 -1
  133. package/lib/types/span.ws.d.ts +1 -1
  134. package/lib/types/subscript.ws.d.ts +1 -1
  135. package/lib/types/superscript.ws.d.ts +1 -1
  136. package/lib/types/templates.d.ts +14 -0
  137. package/lib/types/text.template.d.ts +2 -0
  138. package/lib/types/text.ws.d.ts +1 -1
  139. package/lib/types/textarea.ws.d.ts +1 -1
  140. package/lib/types/time.ws.d.ts +1 -1
  141. package/lib/types/vimeo-play-button.ws.d.ts +1 -1
  142. package/lib/types/vimeo-preview-image.d.ts +21 -21
  143. package/lib/types/vimeo-preview-image.ws.d.ts +1 -1
  144. package/lib/types/vimeo-spinner.ws.d.ts +1 -1
  145. package/lib/types/vimeo.d.ts +12 -2
  146. package/lib/types/vimeo.ws.d.ts +1 -1
  147. package/lib/types/webhook-form.d.ts +1 -0
  148. package/lib/types/webhook-form.template.d.ts +2 -0
  149. package/lib/types/webhook-form.ws.d.ts +1 -1
  150. package/lib/types/xml-node.ws.d.ts +1 -1
  151. package/lib/types/xml-time.ws.d.ts +1 -1
  152. package/lib/types/youtube.d.ts +143 -0
  153. package/lib/types/youtube.template.d.ts +2 -0
  154. package/lib/types/youtube.ws.d.ts +3 -0
  155. package/lib/vimeo-play-button.ws.js +8 -8
  156. package/lib/vimeo-preview-image.ws.js +17 -9
  157. package/lib/vimeo-spinner.ws.js +8 -8
  158. package/lib/vimeo.js +88 -87
  159. package/lib/vimeo.template.js +17 -16
  160. package/lib/vimeo.ws.js +8 -7
  161. package/lib/webhook-form.template.js +49 -0
  162. package/lib/webhook-form.ws.js +17 -118
  163. package/lib/xml-node.js +18 -14
  164. package/lib/xml-node.ws.js +4 -5
  165. package/lib/xml-time.ws.js +4 -5
  166. package/lib/youtube.js +200 -0
  167. package/lib/youtube.template.js +97 -0
  168. package/lib/youtube.ws.js +51 -0
  169. package/package.json +14 -11
  170. package/lib/content-embed.ws.js +0 -77
  171. package/lib/types/__generated__/local-date.props.d.ts +0 -2
  172. package/lib/types/content-embed.ws.d.ts +0 -2
@@ -1,11 +1,10 @@
1
1
  import { ListItemIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as e } from "@webstudio-is/react-sdk";
3
- import { li as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as i } from "./__generated__/list-item.props.js";
5
- const n = {
6
- li: o
2
+ import { defaultStates as o } from "@webstudio-is/sdk";
3
+ import { li as e } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as r } from "./__generated__/list-item.props.js";
5
+ const s = {
6
+ li: e
7
7
  }, m = {
8
- category: "typography",
9
8
  type: "container",
10
9
  constraints: {
11
10
  // cannot use parent relation here
@@ -14,20 +13,11 @@ const n = {
14
13
  relation: "ancestor",
15
14
  component: { $eq: "List" }
16
15
  },
17
- description: "Adds a new item to an existing list.",
18
16
  icon: t,
19
- states: e,
20
- presetStyle: n,
21
- order: 5,
22
- template: [
23
- {
24
- type: "instance",
25
- component: "ListItem",
26
- children: []
27
- }
28
- ]
17
+ states: o,
18
+ presetStyle: s
29
19
  }, c = {
30
- props: i,
20
+ props: r,
31
21
  initialProps: ["id", "className"]
32
22
  };
33
23
  export {
package/lib/list.ws.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ListIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as r } from "@webstudio-is/react-sdk";
2
+ import { defaultStates as r } from "@webstudio-is/sdk";
3
3
  import { ol as t, ul as o } from "@webstudio-is/sdk/normalize.css";
4
4
  import { props as p } from "./__generated__/list.props.js";
5
5
  const a = {
@@ -1,14 +1,19 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { micromark as s } from "micromark";
3
- import { forwardRef as c, useMemo as d } from "react";
4
- const u = /* @__PURE__ */ c((r, e) => {
5
- const { code: o, children: l, ...t } = r, m = d(
3
+ import { gfmTable as l, gfmTableHtml as i } from "micromark-extension-gfm-table";
4
+ import { forwardRef as a, useMemo as f } from "react";
5
+ const h = /* @__PURE__ */ a((r, e) => {
6
+ const { code: o, children: c, ...t } = r, m = f(
6
7
  // support data uri protocol in images
7
- () => s(o ?? "", { allowDangerousProtocol: !0 }),
8
+ () => s(o ?? "", {
9
+ allowDangerousProtocol: !0,
10
+ extensions: [l()],
11
+ htmlExtensions: [i()]
12
+ }),
8
13
  [o]
9
14
  );
10
15
  return /* @__PURE__ */ n("div", { ...t, ref: e, dangerouslySetInnerHTML: { __html: m } });
11
16
  });
12
17
  export {
13
- u as MarkdownEmbed
18
+ h as MarkdownEmbed
14
19
  };
@@ -0,0 +1,75 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { $ as a, ws as l } from "@webstudio-is/template";
3
+ import { imagePlaceholderDataUrl as s } from "@webstudio-is/image";
4
+ const n = `
5
+ # Styling Markdown with Markdown Embed
6
+
7
+ Markdown Embed allows styling of Markdown, which primarily comes from external data.
8
+
9
+ ## How to Use Markdown Embed
10
+
11
+ - Every element is shown in the Navigator.
12
+ - Apply styles and Tokens to each element.
13
+ - Adjustments to elements apply universally within this embed, ensuring consistency across your content.
14
+
15
+ ---
16
+
17
+ ## This sample text contains all the elements that can be styled.
18
+
19
+ Any elements that were not used above are used below.
20
+
21
+ ### Heading 3
22
+ #### Heading 4
23
+ ##### Heading 5
24
+ ###### Heading 6
25
+
26
+ [Links](#) connect your content to relevant resources.
27
+
28
+ **Bold text** makes your important points stand out.
29
+
30
+ *Italic text* is great for emphasizing terms.
31
+
32
+ 1. First Step
33
+ 2. Second Step
34
+
35
+ ![Image placeholder](${s})
36
+
37
+ > Capture attention with a powerful quote.
38
+
39
+ Using \`console.log("Hello World");\` will log to the console.
40
+
41
+ | Header 1 | Header 2 | Header 3 |
42
+ |------------|------------|------------|
43
+ | Cell 1.1 | Cell 1.2 | Cell 1.3 |
44
+ | Cell 2.1 | Cell 2.2 | Cell 2.3 |
45
+ | Cell 3.1 | Cell 3.2 | Cell 3.3 |
46
+ `.trim(), c = {
47
+ category: "data",
48
+ description: "Used to add markdown code to the page",
49
+ order: 4,
50
+ template: /* @__PURE__ */ t(a.MarkdownEmbed, { code: n, children: [
51
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Paragraph", selector: " p" }),
52
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Heading 1", selector: " h1" }),
53
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Heading 2", selector: " h2" }),
54
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Heading 3", selector: " h3" }),
55
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Heading 4", selector: " h4" }),
56
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Heading 5", selector: " h5" }),
57
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Heading 6", selector: " h6" }),
58
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Bold", selector: " :where(strong, b)" }),
59
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Italic", selector: " :where(em, i)" }),
60
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Link", selector: " a" }),
61
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Image", selector: " img" }),
62
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Blockquote", selector: " blockquote" }),
63
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Code Text", selector: " code" }),
64
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "List", selector: " :where(ul, ol)" }),
65
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "List Item", selector: " li" }),
66
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Separator", selector: " hr" }),
67
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Table", selector: " table" }),
68
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Table Row", selector: " tr" }),
69
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Table Header Cell", selector: " th" }),
70
+ /* @__PURE__ */ e(l.descendant, { "ws:label": "Table Cell", selector: " td" })
71
+ ] })
72
+ };
73
+ export {
74
+ c as meta
75
+ };
@@ -1,54 +1,8 @@
1
- import { MarkdownEmbedIcon as n } from "@webstudio-is/icons/svg";
2
- import { imagePlaceholderDataUrl as a } from "@webstudio-is/image";
3
- import { descendantComponent as r } from "@webstudio-is/react-sdk";
4
- import { props as s } from "./__generated__/markdown-embed.props.js";
5
- const i = `
6
- # Styling Markdown with Markdown Embed
7
-
8
- Markdown Embed allows styling of Markdown, which primarily comes from external data.
9
-
10
- ## How to Use Markdown Embed
11
-
12
- - Every element is shown in the Navigator.
13
- - Apply styles and Tokens to each element.
14
- - Adjustments to elements apply universally within this embed, ensuring consistency across your content.
15
-
16
- ---
17
-
18
- ## This sample text contains all the elements that can be styled.
19
-
20
- Any elements that were not used above are used below.
21
-
22
- ### Heading 3
23
- #### Heading 4
24
- ##### Heading 5
25
- ###### Heading 6
26
-
27
- [Links](#) connect your content to relevant resources.
28
-
29
- **Bold text** makes your important points stand out.
30
-
31
- *Italic text* is great for emphasizing terms.
32
-
33
- 1. First Step
34
- 2. Second Step
35
-
36
- ![Image placeholder](${a})
37
-
38
- > Capture attention with a powerful quote.
39
-
40
- Using \`console.log("Hello World");\` will log to the console.
41
- `.trim(), e = (t, o) => ({
42
- type: "instance",
43
- component: r,
44
- label: t,
45
- props: [{ type: "string", name: "selector", value: ` ${o}` }],
46
- children: []
47
- }), m = {
48
- category: "data",
1
+ import { MarkdownEmbedIcon as e } from "@webstudio-is/icons/svg";
2
+ import { props as o } from "./__generated__/markdown-embed.props.js";
3
+ const t = {
49
4
  type: "embed",
50
- description: "Used to add markdown code to the page",
51
- icon: n,
5
+ icon: e,
52
6
  presetStyle: {
53
7
  div: [
54
8
  {
@@ -60,42 +14,10 @@ Using \`console.log("Hello World");\` will log to the console.
60
14
  value: { type: "keyword", value: "collapse" }
61
15
  }
62
16
  ]
63
- },
64
- order: 4,
65
- template: [
66
- {
67
- type: "instance",
68
- component: "MarkdownEmbed",
69
- props: [
70
- {
71
- name: "code",
72
- type: "string",
73
- value: i
74
- }
75
- ],
76
- children: [
77
- e("Paragraph", "p"),
78
- e("Heading 1", "h1"),
79
- e("Heading 2", "h2"),
80
- e("Heading 3", "h3"),
81
- e("Heading 4", "h4"),
82
- e("Heading 5", "h5"),
83
- e("Heading 6", "h6"),
84
- e("Bold", ":where(strong, b)"),
85
- e("Italic", ":where(em, i)"),
86
- e("Link", "a"),
87
- e("Image", "img"),
88
- e("Blockquote", "blockquote"),
89
- e("Code Text", "code"),
90
- e("List", ":where(ul, ol)"),
91
- e("List Item", "li"),
92
- e("Separator", "hr")
93
- ]
94
- }
95
- ]
96
- }, g = {
17
+ }
18
+ }, a = {
97
19
  props: {
98
- ...s,
20
+ ...o,
99
21
  code: {
100
22
  required: !0,
101
23
  control: "code",
@@ -106,6 +28,6 @@ Using \`console.log("Hello World");\` will log to the console.
106
28
  initialProps: ["className"]
107
29
  };
108
30
  export {
109
- m as meta,
110
- g as propsMeta
31
+ t as meta,
32
+ a as propsMeta
111
33
  };
package/lib/metas.js CHANGED
@@ -2,81 +2,81 @@ import { meta as o } from "./slot.ws.js";
2
2
  import { meta as a } from "./fragment.ws.js";
3
3
  import { meta as p } from "./html-embed.ws.js";
4
4
  import { meta as s } from "./markdown-embed.ws.js";
5
- import { meta as i } from "./content-embed.ws.js";
6
- import { meta as d } from "./body.ws.js";
7
- import { meta as c } from "./box.ws.js";
8
- import { meta as B } from "./text.ws.js";
9
- import { meta as b } from "./heading.ws.js";
10
- import { meta as g } from "./paragraph.ws.js";
11
- import { meta as I } from "./link.ws.js";
12
- import { meta as V } from "./rich-text-link.ws.js";
13
- import { meta as C } from "./span.ws.js";
5
+ import { meta as i } from "./body.ws.js";
6
+ import { meta as l } from "./box.ws.js";
7
+ import { meta as u } from "./text.ws.js";
8
+ import { meta as B } from "./heading.ws.js";
9
+ import { meta as T } from "./paragraph.ws.js";
10
+ import { meta as g } from "./link.ws.js";
11
+ import { meta as I } from "./rich-text-link.ws.js";
12
+ import { meta as V } from "./span.ws.js";
14
13
  import { meta as F } from "./bold.ws.js";
15
14
  import { meta as R } from "./italic.ws.js";
16
15
  import { meta as y } from "./superscript.ws.js";
17
- import { meta as X } from "./subscript.ws.js";
18
- import { meta as v } from "./button.ws.js";
19
- import { meta as N } from "./input.ws.js";
20
- import { meta as j } from "./webhook-form.ws.js";
21
- import { meta as A } from "./form.ws.js";
22
- import { meta as G } from "./image.ws.js";
23
- import { meta as K } from "./blockquote.ws.js";
24
- import { meta as U } from "./list.ws.js";
25
- import { meta as Y } from "./list-item.ws.js";
26
- import { meta as _ } from "./separator.ws.js";
27
- import { meta as ee } from "./code-text.ws.js";
28
- import { meta as oe } from "./label.ws.js";
29
- import { meta as ae } from "./textarea.ws.js";
30
- import { meta as pe } from "./radio-button.ws.js";
31
- import { meta as se } from "./checkbox.ws.js";
32
- import { meta as ie } from "./vimeo.ws.js";
33
- import { meta as de } from "./vimeo-preview-image.ws.js";
34
- import { meta as ce } from "./vimeo-play-button.ws.js";
16
+ import { meta as E } from "./subscript.ws.js";
17
+ import { meta as X } from "./button.ws.js";
18
+ import { meta as v } from "./input.ws.js";
19
+ import { meta as N } from "./webhook-form.ws.js";
20
+ import { meta as Y } from "./form.ws.js";
21
+ import { meta as z } from "./image.ws.js";
22
+ import { meta as D } from "./blockquote.ws.js";
23
+ import { meta as J } from "./list.ws.js";
24
+ import { meta as Q } from "./list-item.ws.js";
25
+ import { meta as W } from "./separator.ws.js";
26
+ import { meta as _ } from "./code-text.ws.js";
27
+ import { meta as ee } from "./label.ws.js";
28
+ import { meta as oe } from "./textarea.ws.js";
29
+ import { meta as ae } from "./radio-button.ws.js";
30
+ import { meta as pe } from "./checkbox.ws.js";
31
+ import { meta as se } from "./vimeo.ws.js";
32
+ import { meta as ie } from "./youtube.ws.js";
33
+ import { meta as le } from "./vimeo-preview-image.ws.js";
34
+ import { meta as ue } from "./vimeo-play-button.ws.js";
35
35
  import { meta as Be } from "./vimeo-spinner.ws.js";
36
- import { meta as be } from "./xml-node.ws.js";
36
+ import { meta as Te } from "./xml-node.ws.js";
37
37
  import { meta as ge } from "./xml-time.ws.js";
38
38
  import { meta as Ie } from "./time.ws.js";
39
39
  import { meta as Ve } from "./select.ws.js";
40
- import { meta as Ce } from "./option.ws.js";
40
+ import { meta as Fe } from "./option.ws.js";
41
41
  export {
42
- K as Blockquote,
43
- d as Body,
42
+ D as Blockquote,
43
+ i as Body,
44
44
  F as Bold,
45
- c as Box,
46
- v as Button,
47
- se as Checkbox,
48
- ee as CodeText,
49
- i as ContentEmbed,
50
- j as Form,
45
+ l as Box,
46
+ X as Button,
47
+ pe as Checkbox,
48
+ _ as CodeText,
49
+ N as Form,
51
50
  a as Fragment,
52
- b as Heading,
51
+ B as Heading,
53
52
  p as HtmlEmbed,
54
- G as Image,
55
- N as Input,
53
+ z as Image,
54
+ v as Input,
56
55
  R as Italic,
57
- oe as Label,
58
- I as Link,
59
- U as List,
60
- Y as ListItem,
56
+ ee as Label,
57
+ g as Link,
58
+ J as List,
59
+ Q as ListItem,
61
60
  s as MarkdownEmbed,
62
- Ce as Option,
63
- g as Paragraph,
64
- pe as RadioButton,
65
- A as RemixForm,
66
- V as RichTextLink,
61
+ Fe as Option,
62
+ T as Paragraph,
63
+ ae as RadioButton,
64
+ Y as RemixForm,
65
+ I as RichTextLink,
67
66
  Ve as Select,
68
- _ as Separator,
67
+ W as Separator,
69
68
  o as Slot,
70
- C as Span,
71
- X as Subscript,
69
+ V as Span,
70
+ E as Subscript,
72
71
  y as Superscript,
73
- B as Text,
74
- ae as Textarea,
72
+ u as Text,
73
+ oe as Textarea,
75
74
  Ie as Time,
76
- ie as Vimeo,
77
- ce as VimeoPlayButton,
78
- de as VimeoPreviewImage,
75
+ se as Vimeo,
76
+ ue as VimeoPlayButton,
77
+ le as VimeoPreviewImage,
79
78
  Be as VimeoSpinner,
80
- be as XmlNode,
81
- ge as XmlTime
79
+ Te as XmlNode,
80
+ ge as XmlTime,
81
+ ie as YouTube
82
82
  };
package/lib/option.ws.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { ItemIcon as e } from "@webstudio-is/icons/svg";
2
- import "@webstudio-is/react-sdk";
3
2
  import { props as t } from "./__generated__/option.props.js";
4
3
  const o = {
5
4
  option: [
@@ -15,7 +14,7 @@ const o = {
15
14
  }
16
15
  }
17
16
  ]
18
- }, c = {
17
+ }, r = {
19
18
  category: "hidden",
20
19
  constraints: {
21
20
  relation: "parent",
@@ -35,11 +34,11 @@ const o = {
35
34
  { selector: ":hover", label: "Hover" },
36
35
  { selector: ":disabled", label: "Disabled" }
37
36
  ]
38
- }, s = {
37
+ }, c = {
39
38
  props: t,
40
39
  initialProps: ["label", "selected", "value", "label", "disabled"]
41
40
  };
42
41
  export {
43
- c as meta,
44
- s as propsMeta
42
+ r as meta,
43
+ c as propsMeta
45
44
  };
@@ -0,0 +1,11 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { $ as t } from "@webstudio-is/template";
3
+ const a = {
4
+ category: "typography",
5
+ description: "A container for multi-line text.",
6
+ order: 2,
7
+ template: /* @__PURE__ */ r(t.Paragraph, {})
8
+ };
9
+ export {
10
+ a as meta
11
+ };
@@ -1,33 +1,23 @@
1
1
  import { TextAlignLeftIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as o } from "@webstudio-is/react-sdk";
3
- import { p as e } from "@webstudio-is/sdk/normalize.css";
4
- import { props as r } from "./__generated__/paragraph.props.js";
2
+ import { defaultStates as o } from "@webstudio-is/sdk";
3
+ import { p as r } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as e } from "./__generated__/paragraph.props.js";
5
5
  const n = {
6
- p: e
7
- }, c = {
8
- category: "typography",
6
+ p: r
7
+ }, m = {
9
8
  type: "container",
10
- description: "A container for multi-line text.",
11
9
  icon: t,
12
10
  constraints: {
13
11
  relation: "ancestor",
14
12
  component: { $neq: "Paragraph" }
15
13
  },
16
14
  states: o,
17
- presetStyle: n,
18
- order: 2,
19
- template: [
20
- {
21
- type: "instance",
22
- component: "Paragraph",
23
- children: []
24
- }
25
- ]
26
- }, m = {
27
- props: r,
15
+ presetStyle: n
16
+ }, c = {
17
+ props: e,
28
18
  initialProps: ["id", "className"]
29
19
  };
30
20
  export {
31
- c as meta,
32
- m as propsMeta
21
+ m as meta,
22
+ c as propsMeta
33
23
  };
package/lib/props.js CHANGED
@@ -5,7 +5,7 @@ import { propsMeta as x } from "./markdown-embed.ws.js";
5
5
  import { propsMeta as f } from "./body.ws.js";
6
6
  import { propsMeta as n } from "./box.ws.js";
7
7
  import { propsMeta as d } from "./text.ws.js";
8
- import { propsMeta as u } from "./heading.ws.js";
8
+ import { propsMeta as c } from "./heading.ws.js";
9
9
  import { propsMeta as S } from "./paragraph.ws.js";
10
10
  import { propsMeta as b } from "./link.ws.js";
11
11
  import { propsMeta as k } from "./rich-text-link.ws.js";
@@ -17,28 +17,29 @@ import { propsMeta as C } from "./subscript.ws.js";
17
17
  import { propsMeta as H } from "./button.ws.js";
18
18
  import { propsMeta as q } from "./input.ws.js";
19
19
  import { propsMeta as N } from "./webhook-form.ws.js";
20
- import { propsMeta as j } from "./form.ws.js";
21
- import { propsMeta as A } from "./image.ws.js";
22
- import { propsMeta as G } from "./blockquote.ws.js";
23
- import { propsMeta as K } from "./list.ws.js";
24
- import { propsMeta as U } from "./list-item.ws.js";
25
- import { propsMeta as Y } from "./separator.ws.js";
20
+ import { propsMeta as Y } from "./form.ws.js";
21
+ import { propsMeta as z } from "./image.ws.js";
22
+ import { propsMeta as D } from "./blockquote.ws.js";
23
+ import { propsMeta as J } from "./list.ws.js";
24
+ import { propsMeta as Q } from "./list-item.ws.js";
25
+ import { propsMeta as W } from "./separator.ws.js";
26
26
  import { propsMeta as _ } from "./code-text.ws.js";
27
27
  import { propsMeta as oo } from "./label.ws.js";
28
28
  import { propsMeta as po } from "./textarea.ws.js";
29
29
  import { propsMeta as to } from "./radio-button.ws.js";
30
30
  import { propsMeta as so } from "./checkbox.ws.js";
31
31
  import { propsMeta as xo } from "./vimeo.ws.js";
32
- import { propsMeta as fo } from "./vimeo-preview-image.ws.js";
33
- import { propsMeta as no } from "./vimeo-play-button.ws.js";
34
- import { propsMeta as co } from "./vimeo-spinner.ws.js";
35
- import { propsMeta as Bo } from "./xml-node.ws.js";
36
- import { propsMeta as To } from "./xml-time.ws.js";
37
- import { propsMeta as go } from "./time.ws.js";
38
- import { propsMeta as Io } from "./select.ws.js";
39
- import { propsMeta as Vo } from "./option.ws.js";
32
+ import { propsMeta as fo } from "./youtube.ws.js";
33
+ import { propsMeta as no } from "./vimeo-preview-image.ws.js";
34
+ import { propsMeta as uo } from "./vimeo-play-button.ws.js";
35
+ import { propsMeta as Bo } from "./vimeo-spinner.ws.js";
36
+ import { propsMeta as To } from "./xml-node.ws.js";
37
+ import { propsMeta as go } from "./xml-time.ws.js";
38
+ import { propsMeta as Io } from "./time.ws.js";
39
+ import { propsMeta as Vo } from "./select.ws.js";
40
+ import { propsMeta as Fo } from "./option.ws.js";
40
41
  export {
41
- G as Blockquote,
42
+ D as Blockquote,
42
43
  f as Body,
43
44
  h as Bold,
44
45
  n as Box,
@@ -47,34 +48,35 @@ export {
47
48
  _ as CodeText,
48
49
  N as Form,
49
50
  t as Fragment,
50
- u as Heading,
51
+ c as Heading,
51
52
  s as HtmlEmbed,
52
- A as Image,
53
+ z as Image,
53
54
  q as Input,
54
55
  P as Italic,
55
56
  oo as Label,
56
57
  b as Link,
57
- K as List,
58
- U as ListItem,
58
+ J as List,
59
+ Q as ListItem,
59
60
  x as MarkdownEmbed,
60
- Vo as Option,
61
+ Fo as Option,
61
62
  S as Paragraph,
62
63
  to as RadioButton,
63
- j as RemixForm,
64
+ Y as RemixForm,
64
65
  k as RichTextLink,
65
- Io as Select,
66
- Y as Separator,
66
+ Vo as Select,
67
+ W as Separator,
67
68
  p as Slot,
68
69
  L as Span,
69
70
  C as Subscript,
70
71
  w as Superscript,
71
72
  d as Text,
72
73
  po as Textarea,
73
- go as Time,
74
+ Io as Time,
74
75
  xo as Vimeo,
75
- no as VimeoPlayButton,
76
- fo as VimeoPreviewImage,
77
- co as VimeoSpinner,
78
- Bo as XmlNode,
79
- To as XmlTime
76
+ uo as VimeoPlayButton,
77
+ no as VimeoPreviewImage,
78
+ Bo as VimeoSpinner,
79
+ To as XmlNode,
80
+ go as XmlTime,
81
+ fo as YouTube
80
82
  };
@@ -0,0 +1,14 @@
1
+ import { jsxs as t, jsx as o } from "react/jsx-runtime";
2
+ import { $ as e, PlaceholderValue as a } from "@webstudio-is/template";
3
+ const r = {
4
+ category: "forms",
5
+ description: "Use within a form to allow your users to select a single option from a set of mutually exclusive choices. Group multiple radios by matching their “Name” properties.",
6
+ order: 5,
7
+ template: /* @__PURE__ */ t(e.Label, { "ws:label": "Radio Field", children: [
8
+ /* @__PURE__ */ o(e.RadioButton, {}),
9
+ /* @__PURE__ */ o(e.Text, { "ws:label": "Radio Label", tag: "span", children: new a("Radio") })
10
+ ] })
11
+ };
12
+ export {
13
+ r as meta
14
+ };