@webstudio-is/sdk-components-react 0.0.1-c87cdba.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 (280) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +3 -0
  3. package/lib/__generated__/blockquote.props.js +514 -0
  4. package/lib/__generated__/body.props.js +508 -0
  5. package/lib/__generated__/bold.props.js +508 -0
  6. package/lib/__generated__/box.props.js +527 -0
  7. package/lib/__generated__/button.props.js +570 -0
  8. package/lib/__generated__/checkbox.props.js +672 -0
  9. package/lib/__generated__/code-text.props.js +509 -0
  10. package/lib/__generated__/form.props.js +556 -0
  11. package/lib/__generated__/heading.props.js +516 -0
  12. package/lib/__generated__/html-embed.props.js +13 -0
  13. package/lib/__generated__/image.props.js +593 -0
  14. package/lib/__generated__/input.props.js +696 -0
  15. package/lib/__generated__/italic.props.js +508 -0
  16. package/lib/__generated__/label.props.js +520 -0
  17. package/lib/__generated__/link.props.js +578 -0
  18. package/lib/__generated__/list-item.props.js +514 -0
  19. package/lib/__generated__/list.props.js +534 -0
  20. package/lib/__generated__/markdown-embed.props.js +7 -0
  21. package/lib/__generated__/option.props.js +532 -0
  22. package/lib/__generated__/paragraph.props.js +508 -0
  23. package/lib/__generated__/radio-button.props.js +672 -0
  24. package/lib/__generated__/select.props.js +556 -0
  25. package/lib/__generated__/separator.props.js +508 -0
  26. package/lib/__generated__/span.props.js +508 -0
  27. package/lib/__generated__/subscript.props.js +508 -0
  28. package/lib/__generated__/superscript.props.js +508 -0
  29. package/lib/__generated__/text.props.js +516 -0
  30. package/lib/__generated__/textarea.props.js +587 -0
  31. package/lib/__generated__/time.props.js +312 -0
  32. package/lib/__generated__/vimeo-play-button.props.js +569 -0
  33. package/lib/__generated__/vimeo-preview-image.props.js +591 -0
  34. package/lib/__generated__/vimeo-spinner.props.js +508 -0
  35. package/lib/__generated__/vimeo.props.js +673 -0
  36. package/lib/__generated__/webhook-form.props.js +569 -0
  37. package/lib/__generated__/xml-node.props.js +21 -0
  38. package/lib/__generated__/xml-time.props.js +18 -0
  39. package/lib/blockquote.js +9 -0
  40. package/lib/blockquote.template.js +11 -0
  41. package/lib/blockquote.ws.js +63 -0
  42. package/lib/body.js +7 -0
  43. package/lib/body.ws.js +29 -0
  44. package/lib/bold.js +7 -0
  45. package/lib/bold.ws.js +20 -0
  46. package/lib/box.js +9 -0
  47. package/lib/box.ws.js +31 -0
  48. package/lib/button.js +9 -0
  49. package/lib/button.template.js +11 -0
  50. package/lib/button.ws.js +27 -0
  51. package/lib/checkbox.js +15 -0
  52. package/lib/checkbox.template.js +14 -0
  53. package/lib/checkbox.ws.js +38 -0
  54. package/lib/code-text.js +10 -0
  55. package/lib/code-text.ws.js +59 -0
  56. package/lib/components.js +79 -0
  57. package/lib/content-embed.template.js +83 -0
  58. package/lib/form.js +7 -0
  59. package/lib/form.ws.js +30 -0
  60. package/lib/fragment.js +7 -0
  61. package/lib/fragment.ws.js +11 -0
  62. package/lib/heading.js +9 -0
  63. package/lib/heading.template.js +11 -0
  64. package/lib/heading.ws.js +28 -0
  65. package/lib/home_wsKvRSqvkajPPBeycZ-C8.svg +3 -0
  66. package/lib/hooks.js +5 -0
  67. package/lib/html-embed-patchers.js +29 -0
  68. package/lib/html-embed.js +112 -0
  69. package/lib/html-embed.ws.js +46 -0
  70. package/lib/image.js +38 -0
  71. package/lib/image.ws.js +60 -0
  72. package/lib/input.js +17 -0
  73. package/lib/input.ws.js +54 -0
  74. package/lib/italic.js +7 -0
  75. package/lib/italic.ws.js +26 -0
  76. package/lib/label.js +7 -0
  77. package/lib/label.template.js +10 -0
  78. package/lib/label.ws.js +27 -0
  79. package/lib/link.js +15 -0
  80. package/lib/link.template.js +11 -0
  81. package/lib/link.ws.js +47 -0
  82. package/lib/list-item.js +9 -0
  83. package/lib/list-item.template.js +11 -0
  84. package/lib/list-item.ws.js +26 -0
  85. package/lib/list.js +6 -0
  86. package/lib/list.template.js +15 -0
  87. package/lib/list.ws.js +48 -0
  88. package/lib/markdown-embed.js +19 -0
  89. package/lib/markdown-embed.template.js +75 -0
  90. package/lib/markdown-embed.ws.js +33 -0
  91. package/lib/metas.js +80 -0
  92. package/lib/option.js +7 -0
  93. package/lib/option.ws.js +45 -0
  94. package/lib/paragraph.js +7 -0
  95. package/lib/paragraph.template.js +11 -0
  96. package/lib/paragraph.ws.js +23 -0
  97. package/lib/props.js +80 -0
  98. package/lib/radio-button.js +15 -0
  99. package/lib/radio-button.template.js +14 -0
  100. package/lib/radio-button.ws.js +40 -0
  101. package/lib/rich-text-link.ws.js +9 -0
  102. package/lib/select.js +19 -0
  103. package/lib/select.template.js +16 -0
  104. package/lib/select.ws.js +44 -0
  105. package/lib/separator.js +9 -0
  106. package/lib/separator.ws.js +48 -0
  107. package/lib/slot.js +14 -0
  108. package/lib/slot.ws.js +15 -0
  109. package/lib/span.js +7 -0
  110. package/lib/span.ws.js +20 -0
  111. package/lib/subscript.js +7 -0
  112. package/lib/subscript.ws.js +20 -0
  113. package/lib/superscript.js +7 -0
  114. package/lib/superscript.ws.js +20 -0
  115. package/lib/templates.js +32 -0
  116. package/lib/text.js +10 -0
  117. package/lib/text.template.js +11 -0
  118. package/lib/text.ws.js +25 -0
  119. package/lib/textarea.js +7 -0
  120. package/lib/textarea.ws.js +55 -0
  121. package/lib/time.js +319 -0
  122. package/lib/time.ws.js +21 -0
  123. package/lib/types/__generated__/blockquote.props.d.ts +2 -0
  124. package/lib/types/__generated__/body.props.d.ts +2 -0
  125. package/lib/types/__generated__/bold.props.d.ts +2 -0
  126. package/lib/types/__generated__/box.props.d.ts +2 -0
  127. package/lib/types/__generated__/button.props.d.ts +2 -0
  128. package/lib/types/__generated__/checkbox.props.d.ts +2 -0
  129. package/lib/types/__generated__/code-text.props.d.ts +2 -0
  130. package/lib/types/__generated__/form.props.d.ts +2 -0
  131. package/lib/types/__generated__/fragment.props.d.ts +2 -0
  132. package/lib/types/__generated__/heading.props.d.ts +2 -0
  133. package/lib/types/__generated__/html-embed.props.d.ts +2 -0
  134. package/lib/types/__generated__/image.props.d.ts +2 -0
  135. package/lib/types/__generated__/input.props.d.ts +2 -0
  136. package/lib/types/__generated__/italic.props.d.ts +2 -0
  137. package/lib/types/__generated__/label.props.d.ts +2 -0
  138. package/lib/types/__generated__/link.props.d.ts +2 -0
  139. package/lib/types/__generated__/list-item.props.d.ts +2 -0
  140. package/lib/types/__generated__/list.props.d.ts +2 -0
  141. package/lib/types/__generated__/local-date.props.d.ts +2 -0
  142. package/lib/types/__generated__/markdown-embed.props.d.ts +2 -0
  143. package/lib/types/__generated__/option.props.d.ts +2 -0
  144. package/lib/types/__generated__/paragraph.props.d.ts +2 -0
  145. package/lib/types/__generated__/radio-button.props.d.ts +2 -0
  146. package/lib/types/__generated__/rich-text-link.props.d.ts +2 -0
  147. package/lib/types/__generated__/select.props.d.ts +2 -0
  148. package/lib/types/__generated__/separator.props.d.ts +2 -0
  149. package/lib/types/__generated__/slot.props.d.ts +2 -0
  150. package/lib/types/__generated__/span.props.d.ts +2 -0
  151. package/lib/types/__generated__/subscript.props.d.ts +2 -0
  152. package/lib/types/__generated__/superscript.props.d.ts +2 -0
  153. package/lib/types/__generated__/text.props.d.ts +2 -0
  154. package/lib/types/__generated__/textarea.props.d.ts +2 -0
  155. package/lib/types/__generated__/time.props.d.ts +2 -0
  156. package/lib/types/__generated__/vimeo-play-button.props.d.ts +2 -0
  157. package/lib/types/__generated__/vimeo-preview-image.props.d.ts +2 -0
  158. package/lib/types/__generated__/vimeo-spinner.props.d.ts +2 -0
  159. package/lib/types/__generated__/vimeo.props.d.ts +2 -0
  160. package/lib/types/__generated__/webhook-form.props.d.ts +2 -0
  161. package/lib/types/__generated__/xml-node.props.d.ts +2 -0
  162. package/lib/types/__generated__/xml-time.props.d.ts +2 -0
  163. package/lib/types/blockquote.d.ts +2 -0
  164. package/lib/types/blockquote.template.d.ts +2 -0
  165. package/lib/types/blockquote.ws.d.ts +3 -0
  166. package/lib/types/body.d.ts +2 -0
  167. package/lib/types/body.ws.d.ts +3 -0
  168. package/lib/types/bold.d.ts +2 -0
  169. package/lib/types/bold.ws.d.ts +3 -0
  170. package/lib/types/box.d.ts +8 -0
  171. package/lib/types/box.ws.d.ts +3 -0
  172. package/lib/types/button.d.ts +2 -0
  173. package/lib/types/button.template.d.ts +2 -0
  174. package/lib/types/button.ws.d.ts +3 -0
  175. package/lib/types/checkbox.d.ts +4 -0
  176. package/lib/types/checkbox.template.d.ts +2 -0
  177. package/lib/types/checkbox.ws.d.ts +3 -0
  178. package/lib/types/code-text.d.ts +4 -0
  179. package/lib/types/code-text.ws.d.ts +3 -0
  180. package/lib/types/components.d.ts +39 -0
  181. package/lib/types/content-embed.template.d.ts +2 -0
  182. package/lib/types/form.d.ts +2 -0
  183. package/lib/types/form.ws.d.ts +3 -0
  184. package/lib/types/fragment.d.ts +6 -0
  185. package/lib/types/fragment.ws.d.ts +3 -0
  186. package/lib/types/heading.d.ts +8 -0
  187. package/lib/types/heading.template.d.ts +2 -0
  188. package/lib/types/heading.ws.d.ts +3 -0
  189. package/lib/types/hooks.d.ts +2 -0
  190. package/lib/types/html-embed-patchers.d.ts +2 -0
  191. package/lib/types/html-embed.d.ts +12 -0
  192. package/lib/types/html-embed.test.d.ts +1 -0
  193. package/lib/types/html-embed.ws.d.ts +3 -0
  194. package/lib/types/image.d.ts +8 -0
  195. package/lib/types/image.ws.d.ts +3 -0
  196. package/lib/types/input.d.ts +4 -0
  197. package/lib/types/input.ws.d.ts +3 -0
  198. package/lib/types/italic.d.ts +2 -0
  199. package/lib/types/italic.ws.d.ts +3 -0
  200. package/lib/types/label.d.ts +2 -0
  201. package/lib/types/label.template.d.ts +2 -0
  202. package/lib/types/label.ws.d.ts +3 -0
  203. package/lib/types/link.d.ts +11 -0
  204. package/lib/types/link.template.d.ts +2 -0
  205. package/lib/types/link.ws.d.ts +3 -0
  206. package/lib/types/list-item.d.ts +2 -0
  207. package/lib/types/list-item.template.d.ts +2 -0
  208. package/lib/types/list-item.ws.d.ts +3 -0
  209. package/lib/types/list.d.ts +10 -0
  210. package/lib/types/list.template.d.ts +2 -0
  211. package/lib/types/list.ws.d.ts +3 -0
  212. package/lib/types/markdown-embed.d.ts +7 -0
  213. package/lib/types/markdown-embed.template.d.ts +2 -0
  214. package/lib/types/markdown-embed.ws.d.ts +3 -0
  215. package/lib/types/metas.d.ts +39 -0
  216. package/lib/types/option.d.ts +2 -0
  217. package/lib/types/option.ws.d.ts +3 -0
  218. package/lib/types/paragraph.d.ts +2 -0
  219. package/lib/types/paragraph.template.d.ts +2 -0
  220. package/lib/types/paragraph.ws.d.ts +3 -0
  221. package/lib/types/props.d.ts +39 -0
  222. package/lib/types/radio-button.d.ts +4 -0
  223. package/lib/types/radio-button.template.d.ts +2 -0
  224. package/lib/types/radio-button.ws.d.ts +3 -0
  225. package/lib/types/rich-text-link.d.ts +1 -0
  226. package/lib/types/rich-text-link.ws.d.ts +3 -0
  227. package/lib/types/select.d.ts +4 -0
  228. package/lib/types/select.template.d.ts +2 -0
  229. package/lib/types/select.ws.d.ts +3 -0
  230. package/lib/types/separator.d.ts +2 -0
  231. package/lib/types/separator.ws.d.ts +3 -0
  232. package/lib/types/slot.d.ts +6 -0
  233. package/lib/types/slot.ws.d.ts +3 -0
  234. package/lib/types/span.d.ts +2 -0
  235. package/lib/types/span.ws.d.ts +3 -0
  236. package/lib/types/subscript.d.ts +2 -0
  237. package/lib/types/subscript.ws.d.ts +3 -0
  238. package/lib/types/superscript.d.ts +2 -0
  239. package/lib/types/superscript.ws.d.ts +3 -0
  240. package/lib/types/templates.d.ts +15 -0
  241. package/lib/types/test-utils/cartesian.d.ts +2 -0
  242. package/lib/types/text.d.ts +8 -0
  243. package/lib/types/text.template.d.ts +2 -0
  244. package/lib/types/text.ws.d.ts +3 -0
  245. package/lib/types/textarea.d.ts +2 -0
  246. package/lib/types/textarea.ws.d.ts +3 -0
  247. package/lib/types/time.d.ts +18 -0
  248. package/lib/types/time.test.d.ts +1 -0
  249. package/lib/types/time.ws.d.ts +3 -0
  250. package/lib/types/vimeo-play-button.d.ts +3 -0
  251. package/lib/types/vimeo-play-button.ws.d.ts +3 -0
  252. package/lib/types/vimeo-preview-image.d.ts +284 -0
  253. package/lib/types/vimeo-preview-image.ws.d.ts +3 -0
  254. package/lib/types/vimeo-spinner.d.ts +1 -0
  255. package/lib/types/vimeo-spinner.ws.d.ts +3 -0
  256. package/lib/types/vimeo.d.ts +75 -0
  257. package/lib/types/vimeo.template.d.ts +2 -0
  258. package/lib/types/vimeo.ws.d.ts +3 -0
  259. package/lib/types/webhook-form.d.ts +8 -0
  260. package/lib/types/webhook-form.ws.d.ts +3 -0
  261. package/lib/types/xml-node.d.ts +13 -0
  262. package/lib/types/xml-node.ws.d.ts +3 -0
  263. package/lib/types/xml-time.d.ts +6 -0
  264. package/lib/types/xml-time.ws.d.ts +3 -0
  265. package/lib/vimeo-play-button.js +18 -0
  266. package/lib/vimeo-play-button.ws.js +31 -0
  267. package/lib/vimeo-preview-image.js +19 -0
  268. package/lib/vimeo-preview-image.ws.js +28 -0
  269. package/lib/vimeo-spinner.js +13 -0
  270. package/lib/vimeo-spinner.ws.js +25 -0
  271. package/lib/vimeo.js +213 -0
  272. package/lib/vimeo.template.js +92 -0
  273. package/lib/vimeo.ws.js +39 -0
  274. package/lib/webhook-form.js +9 -0
  275. package/lib/webhook-form.ws.js +127 -0
  276. package/lib/xml-node.js +44 -0
  277. package/lib/xml-node.ws.js +18 -0
  278. package/lib/xml-time.js +25 -0
  279. package/lib/xml-time.ws.js +18 -0
  280. package/package.json +75 -0
@@ -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
+ };
@@ -0,0 +1,33 @@
1
+ import { MarkdownEmbedIcon as e } from "@webstudio-is/icons/svg";
2
+ import { props as o } from "./__generated__/markdown-embed.props.js";
3
+ const t = {
4
+ type: "embed",
5
+ icon: e,
6
+ presetStyle: {
7
+ div: [
8
+ {
9
+ property: "display",
10
+ value: { type: "keyword", value: "contents" }
11
+ },
12
+ {
13
+ property: "whiteSpaceCollapse",
14
+ value: { type: "keyword", value: "collapse" }
15
+ }
16
+ ]
17
+ }
18
+ }, a = {
19
+ props: {
20
+ ...o,
21
+ code: {
22
+ required: !0,
23
+ control: "code",
24
+ language: "markdown",
25
+ type: "string"
26
+ }
27
+ },
28
+ initialProps: ["className"]
29
+ };
30
+ export {
31
+ t as meta,
32
+ a as propsMeta
33
+ };
package/lib/metas.js ADDED
@@ -0,0 +1,80 @@
1
+ import { meta as o } from "./slot.ws.js";
2
+ import { meta as a } from "./fragment.ws.js";
3
+ import { meta as p } from "./html-embed.ws.js";
4
+ import { meta as s } from "./markdown-embed.ws.js";
5
+ import { meta as i } from "./body.ws.js";
6
+ import { meta as l } from "./box.ws.js";
7
+ import { meta as c } 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";
13
+ import { meta as F } from "./bold.ws.js";
14
+ import { meta as R } from "./italic.ws.js";
15
+ import { meta as y } from "./superscript.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 j } from "./form.ws.js";
21
+ import { meta as A } from "./image.ws.js";
22
+ import { meta as G } from "./blockquote.ws.js";
23
+ import { meta as K } from "./list.ws.js";
24
+ import { meta as U } from "./list-item.ws.js";
25
+ import { meta as Y } 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 "./vimeo-preview-image.ws.js";
33
+ import { meta as le } from "./vimeo-play-button.ws.js";
34
+ import { meta as ce } from "./vimeo-spinner.ws.js";
35
+ import { meta as Be } from "./xml-node.ws.js";
36
+ import { meta as Te } from "./xml-time.ws.js";
37
+ import { meta as ge } from "./time.ws.js";
38
+ import { meta as Ie } from "./select.ws.js";
39
+ import { meta as Ve } from "./option.ws.js";
40
+ export {
41
+ G as Blockquote,
42
+ i as Body,
43
+ F as Bold,
44
+ l as Box,
45
+ X as Button,
46
+ pe as Checkbox,
47
+ _ as CodeText,
48
+ N as Form,
49
+ a as Fragment,
50
+ B as Heading,
51
+ p as HtmlEmbed,
52
+ A as Image,
53
+ v as Input,
54
+ R as Italic,
55
+ ee as Label,
56
+ g as Link,
57
+ K as List,
58
+ U as ListItem,
59
+ s as MarkdownEmbed,
60
+ Ve as Option,
61
+ T as Paragraph,
62
+ ae as RadioButton,
63
+ j as RemixForm,
64
+ I as RichTextLink,
65
+ Ie as Select,
66
+ Y as Separator,
67
+ o as Slot,
68
+ V as Span,
69
+ E as Subscript,
70
+ y as Superscript,
71
+ c as Text,
72
+ oe as Textarea,
73
+ ge as Time,
74
+ se as Vimeo,
75
+ le as VimeoPlayButton,
76
+ ie as VimeoPreviewImage,
77
+ ce as VimeoSpinner,
78
+ Be as XmlNode,
79
+ Te as XmlTime
80
+ };
package/lib/option.js ADDED
@@ -0,0 +1,7 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as t } from "react";
3
+ const i = t((o, p) => /* @__PURE__ */ r("option", { ...o, ref: p }));
4
+ i.displayName = "Option";
5
+ export {
6
+ i as Option
7
+ };
@@ -0,0 +1,45 @@
1
+ import { ItemIcon as e } from "@webstudio-is/icons/svg";
2
+ import "@webstudio-is/react-sdk";
3
+ import { props as t } from "./__generated__/option.props.js";
4
+ const o = {
5
+ option: [
6
+ {
7
+ property: "backgroundColor",
8
+ state: ":checked",
9
+ value: {
10
+ type: "rgb",
11
+ alpha: 1,
12
+ r: 209,
13
+ g: 209,
14
+ b: 209
15
+ }
16
+ }
17
+ ]
18
+ }, c = {
19
+ category: "hidden",
20
+ constraints: {
21
+ relation: "parent",
22
+ component: { $eq: "Select" }
23
+ },
24
+ type: "control",
25
+ description: "An item within a drop-down menu that users can select as their chosen value.",
26
+ icon: e,
27
+ presetStyle: o,
28
+ states: [
29
+ // Applies when option is being activated (clicked)
30
+ { selector: ":active", label: "Active" },
31
+ // Applies to the currently selected option
32
+ { selector: ":checked", label: "Checked" },
33
+ // For <option> elements: The :default pseudo-class selects the <option> that has the selected attribute when the page loads. This is true even if the user later selects a different option.
34
+ { selector: ":default", label: "Default" },
35
+ { selector: ":hover", label: "Hover" },
36
+ { selector: ":disabled", label: "Disabled" }
37
+ ]
38
+ }, s = {
39
+ props: t,
40
+ initialProps: ["label", "selected", "value", "label", "disabled"]
41
+ };
42
+ export {
43
+ c as meta,
44
+ s as propsMeta
45
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ const f = m(({ children: r, ...a }, o) => /* @__PURE__ */ p("p", { ...a, ref: o, children: r }));
4
+ f.displayName = "Paragraph";
5
+ export {
6
+ f as Paragraph
7
+ };
@@ -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
+ };
@@ -0,0 +1,23 @@
1
+ import { TextAlignLeftIcon as t } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as o } from "@webstudio-is/react-sdk";
3
+ import { p as r } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as e } from "./__generated__/paragraph.props.js";
5
+ const n = {
6
+ p: r
7
+ }, m = {
8
+ type: "container",
9
+ icon: t,
10
+ constraints: {
11
+ relation: "ancestor",
12
+ component: { $neq: "Paragraph" }
13
+ },
14
+ states: o,
15
+ presetStyle: n
16
+ }, c = {
17
+ props: e,
18
+ initialProps: ["id", "className"]
19
+ };
20
+ export {
21
+ m as meta,
22
+ c as propsMeta
23
+ };
package/lib/props.js ADDED
@@ -0,0 +1,80 @@
1
+ import { propsMeta as p } from "./slot.ws.js";
2
+ import { propsMeta as t } from "./fragment.ws.js";
3
+ import { propsMeta as s } from "./html-embed.ws.js";
4
+ import { propsMeta as x } from "./markdown-embed.ws.js";
5
+ import { propsMeta as f } from "./body.ws.js";
6
+ import { propsMeta as n } from "./box.ws.js";
7
+ import { propsMeta as d } from "./text.ws.js";
8
+ import { propsMeta as u } from "./heading.ws.js";
9
+ import { propsMeta as S } from "./paragraph.ws.js";
10
+ import { propsMeta as b } from "./link.ws.js";
11
+ import { propsMeta as k } from "./rich-text-link.ws.js";
12
+ import { propsMeta as L } from "./span.ws.js";
13
+ import { propsMeta as h } from "./bold.ws.js";
14
+ import { propsMeta as P } from "./italic.ws.js";
15
+ import { propsMeta as w } from "./superscript.ws.js";
16
+ import { propsMeta as C } from "./subscript.ws.js";
17
+ import { propsMeta as H } from "./button.ws.js";
18
+ import { propsMeta as q } from "./input.ws.js";
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";
26
+ import { propsMeta as _ } from "./code-text.ws.js";
27
+ import { propsMeta as oo } from "./label.ws.js";
28
+ import { propsMeta as po } from "./textarea.ws.js";
29
+ import { propsMeta as to } from "./radio-button.ws.js";
30
+ import { propsMeta as so } from "./checkbox.ws.js";
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";
40
+ export {
41
+ G as Blockquote,
42
+ f as Body,
43
+ h as Bold,
44
+ n as Box,
45
+ H as Button,
46
+ so as Checkbox,
47
+ _ as CodeText,
48
+ N as Form,
49
+ t as Fragment,
50
+ u as Heading,
51
+ s as HtmlEmbed,
52
+ A as Image,
53
+ q as Input,
54
+ P as Italic,
55
+ oo as Label,
56
+ b as Link,
57
+ K as List,
58
+ U as ListItem,
59
+ x as MarkdownEmbed,
60
+ Vo as Option,
61
+ S as Paragraph,
62
+ to as RadioButton,
63
+ j as RemixForm,
64
+ k as RichTextLink,
65
+ Io as Select,
66
+ Y as Separator,
67
+ p as Slot,
68
+ L as Span,
69
+ C as Subscript,
70
+ w as Superscript,
71
+ d as Text,
72
+ po as Textarea,
73
+ go as Time,
74
+ xo as Vimeo,
75
+ no as VimeoPlayButton,
76
+ fo as VimeoPreviewImage,
77
+ co as VimeoSpinner,
78
+ Bo as XmlNode,
79
+ To as XmlTime
80
+ };
@@ -0,0 +1,15 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as i } from "react";
3
+ const a = i(({ children: n, checked: o, defaultChecked: t, ...r }, d) => /* @__PURE__ */ e(
4
+ "input",
5
+ {
6
+ ...r,
7
+ defaultChecked: o ?? t,
8
+ type: "radio",
9
+ ref: d
10
+ }
11
+ ));
12
+ a.displayName = "RadioButton";
13
+ export {
14
+ a as RadioButton
15
+ };
@@ -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
+ };
@@ -0,0 +1,40 @@
1
+ import { RadioCheckedIcon as e } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as t } from "@webstudio-is/react-sdk";
3
+ import { radio as o } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as r } from "./__generated__/radio-button.props.js";
5
+ const i = {
6
+ input: [
7
+ ...o,
8
+ {
9
+ property: "marginRight",
10
+ value: { type: "unit", unit: "em", value: 0.5 }
11
+ }
12
+ ]
13
+ }, p = {
14
+ constraints: {
15
+ relation: "ancestor",
16
+ component: { $nin: ["Button", "Link"] }
17
+ },
18
+ type: "control",
19
+ label: "Radio",
20
+ icon: e,
21
+ presetStyle: i,
22
+ states: [
23
+ ...t,
24
+ { selector: ":checked", label: "Checked" },
25
+ { selector: ":required", label: "Required" },
26
+ { selector: ":optional", label: "Optional" }
27
+ // Additional states will go into submenu
28
+ //{ selector: ":disabled", label: "Disabled" },
29
+ //{ selector: ":enabled", label: "Enabled" },
30
+ //{ selector: ":read-only", label: "Read Only" },
31
+ //{ selector: ":read-write", label: "Read Write" },
32
+ ]
33
+ }, s = {
34
+ props: r,
35
+ initialProps: ["id", "className", "name", "value", "required", "checked"]
36
+ };
37
+ export {
38
+ p as meta,
39
+ s as propsMeta
40
+ };
@@ -0,0 +1,9 @@
1
+ import { meta as t, propsMeta as e } from "./link.ws.js";
2
+ const a = {
3
+ ...t,
4
+ type: "rich-text-child"
5
+ }, o = e;
6
+ export {
7
+ a as meta,
8
+ o as propsMeta
9
+ };
package/lib/select.js ADDED
@@ -0,0 +1,19 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import "@webstudio-is/react-sdk/runtime";
3
+ import { forwardRef as r } from "react";
4
+ const s = r(({ value: o, defaultValue: t, ...e }, n) => /* @__PURE__ */ c("select", { ...e, defaultValue: o ?? t, ref: n }));
5
+ s.displayName = "Select";
6
+ const l = {
7
+ onNavigatorUnselect: (o, t) => {
8
+ for (const e of t.instancePath)
9
+ e.component === "Option" && o.setMemoryProp(e, "selected", void 0);
10
+ },
11
+ onNavigatorSelect: (o, t) => {
12
+ for (const e of t.instancePath)
13
+ e.component === "Option" && o.setMemoryProp(e, "selected", !0);
14
+ }
15
+ };
16
+ export {
17
+ s as Select,
18
+ l as hooksSelect
19
+ };
@@ -0,0 +1,16 @@
1
+ import { jsxs as t, jsx as o } from "react/jsx-runtime";
2
+ import { $ as e } from "@webstudio-is/template";
3
+ const n = {
4
+ category: "forms",
5
+ description: "A drop-down menu for users to select a single option from a predefined list.",
6
+ order: 4,
7
+ template: /* @__PURE__ */ t(e.Select, { children: [
8
+ /* @__PURE__ */ o(e.Option, { label: "Please choose an option", value: "" }),
9
+ /* @__PURE__ */ o(e.Option, { label: "Option A", value: "a" }),
10
+ /* @__PURE__ */ o(e.Option, { label: "Option B", value: "b" }),
11
+ /* @__PURE__ */ o(e.Option, { label: "Option C", value: "c" })
12
+ ] })
13
+ };
14
+ export {
15
+ n as meta
16
+ };
@@ -0,0 +1,44 @@
1
+ import { SelectIcon as e } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as t } from "@webstudio-is/react-sdk";
3
+ import { select as l } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as o } from "./__generated__/select.props.js";
5
+ const r = {
6
+ select: [
7
+ ...l,
8
+ {
9
+ property: "display",
10
+ value: { type: "keyword", value: "block" }
11
+ }
12
+ ]
13
+ }, c = {
14
+ constraints: {
15
+ relation: "ancestor",
16
+ component: { $nin: ["Button", "Link"] }
17
+ },
18
+ type: "container",
19
+ icon: e,
20
+ presetStyle: r,
21
+ states: [
22
+ ...t,
23
+ { selector: "::placeholder", label: "Placeholder" },
24
+ { selector: ":valid", label: "Valid" },
25
+ { selector: ":invalid", label: "Invalid" },
26
+ { selector: ":required", label: "Required" },
27
+ { selector: ":optional", label: "Optional" }
28
+ ]
29
+ }, p = {
30
+ props: o,
31
+ initialProps: [
32
+ "id",
33
+ "className",
34
+ "name",
35
+ "value",
36
+ "multiple",
37
+ "required",
38
+ "autoFocus"
39
+ ]
40
+ };
41
+ export {
42
+ c as meta,
43
+ p as propsMeta
44
+ };
@@ -0,0 +1,9 @@
1
+ import { forwardRef as a, createElement as t } from "react";
2
+ const o = "hr", p = a(
3
+ (r, e) => t(o, { ...r, ref: e })
4
+ );
5
+ p.displayName = "Separator";
6
+ export {
7
+ p as Separator,
8
+ o as defaultTag
9
+ };
@@ -0,0 +1,48 @@
1
+ import { MinusIcon as e } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as o } from "@webstudio-is/react-sdk";
3
+ import { hr as r } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as t } from "./__generated__/separator.props.js";
5
+ const p = {
6
+ hr: [
7
+ ...r,
8
+ {
9
+ property: "height",
10
+ value: { type: "keyword", value: "1px" }
11
+ },
12
+ {
13
+ property: "backgroundColor",
14
+ value: { type: "keyword", value: "gray" }
15
+ },
16
+ {
17
+ property: "borderTopStyle",
18
+ value: { type: "keyword", value: "none" }
19
+ },
20
+ {
21
+ property: "borderRightStyle",
22
+ value: { type: "keyword", value: "none" }
23
+ },
24
+ {
25
+ property: "borderLeftStyle",
26
+ value: { type: "keyword", value: "none" }
27
+ },
28
+ {
29
+ property: "borderBottomStyle",
30
+ value: { type: "keyword", value: "none" }
31
+ }
32
+ ]
33
+ }, n = {
34
+ category: "general",
35
+ type: "embed",
36
+ description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
37
+ icon: e,
38
+ states: o,
39
+ presetStyle: p,
40
+ order: 5
41
+ }, d = {
42
+ props: t,
43
+ initialProps: ["id", "className"]
44
+ };
45
+ export {
46
+ n as meta,
47
+ d as propsMeta
48
+ };
package/lib/slot.js ADDED
@@ -0,0 +1,14 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as e } from "react";
3
+ const l = e((o, t) => /* @__PURE__ */ r(
4
+ "div",
5
+ {
6
+ ...o,
7
+ ref: t,
8
+ style: { display: o.children ? "contents" : "block" }
9
+ }
10
+ ));
11
+ l.displayName = "Slot";
12
+ export {
13
+ l as Slot
14
+ };
package/lib/slot.ws.js ADDED
@@ -0,0 +1,15 @@
1
+ import { SlotComponentIcon as t } from "@webstudio-is/icons/svg";
2
+ const o = {
3
+ category: "general",
4
+ type: "container",
5
+ description: "Slot is a container for content that you want to reference across the project. Changes made to a Slot's children will be reflected in all other instances of that Slot.",
6
+ icon: t,
7
+ stylable: !1,
8
+ order: 6
9
+ }, n = {
10
+ props: {}
11
+ };
12
+ export {
13
+ o as meta,
14
+ n as propsMeta
15
+ };
package/lib/span.js ADDED
@@ -0,0 +1,7 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as a } from "react";
3
+ const m = a((o, p) => /* @__PURE__ */ r("span", { ...o, ref: p }));
4
+ m.displayName = "Span";
5
+ export {
6
+ m as Span
7
+ };
package/lib/span.ws.js ADDED
@@ -0,0 +1,20 @@
1
+ import { PaintBrushIcon as t } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as o } from "@webstudio-is/react-sdk";
3
+ import { span as r } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as e } from "./__generated__/span.props.js";
5
+ const s = {
6
+ span: r
7
+ }, c = {
8
+ type: "rich-text-child",
9
+ label: "Text",
10
+ icon: t,
11
+ states: o,
12
+ presetStyle: s
13
+ }, n = {
14
+ props: e,
15
+ initialProps: ["id", "className"]
16
+ };
17
+ export {
18
+ c as meta,
19
+ n as propsMeta
20
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { forwardRef as s } from "react";
3
+ const t = s((r, o) => /* @__PURE__ */ p("sub", { ...r, ref: o }));
4
+ t.displayName = "Subscript";
5
+ export {
6
+ t as Subscript
7
+ };