@webstudio-is/sdk-components-react 0.195.0 → 0.197.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) 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 -21
  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.template.js +11 -0
  11. package/lib/button.ws.js +2 -18
  12. package/lib/checkbox.template.js +14 -0
  13. package/lib/checkbox.ws.js +5 -25
  14. package/lib/code-text.ws.js +6 -6
  15. package/lib/components.js +35 -33
  16. package/lib/content-embed.template.js +83 -0
  17. package/lib/form.ws.js +1 -1
  18. package/lib/heading.template.js +11 -0
  19. package/lib/heading.ws.js +15 -31
  20. package/lib/image.ws.js +17 -22
  21. package/lib/input.ws.js +1 -1
  22. package/lib/italic.ws.js +1 -1
  23. package/lib/label.template.js +10 -0
  24. package/lib/label.ws.js +13 -28
  25. package/lib/link.template.js +11 -0
  26. package/lib/link.ws.js +3 -23
  27. package/lib/list-item.template.js +11 -0
  28. package/lib/list-item.ws.js +12 -28
  29. package/lib/list.template.js +15 -0
  30. package/lib/list.ws.js +10 -54
  31. package/lib/markdown-embed.js +10 -5
  32. package/lib/markdown-embed.template.js +75 -0
  33. package/lib/markdown-embed.ws.js +9 -87
  34. package/lib/metas.js +59 -59
  35. package/lib/option.ws.js +4 -5
  36. package/lib/paragraph.template.js +11 -0
  37. package/lib/paragraph.ws.js +12 -28
  38. package/lib/props.js +32 -30
  39. package/lib/radio-button.template.js +14 -0
  40. package/lib/radio-button.ws.js +7 -27
  41. package/lib/rich-text-link.ws.js +3 -5
  42. package/lib/select.template.js +16 -0
  43. package/lib/select.ws.js +11 -63
  44. package/lib/separator.ws.js +2 -2
  45. package/lib/span.ws.js +1 -1
  46. package/lib/subscript.ws.js +1 -1
  47. package/lib/superscript.ws.js +1 -1
  48. package/lib/templates.js +36 -0
  49. package/lib/text.template.js +11 -0
  50. package/lib/text.ws.js +8 -24
  51. package/lib/textarea.ws.js +1 -1
  52. package/lib/time.ws.js +5 -6
  53. package/lib/types/__generated__/blockquote.props.d.ts +1 -1
  54. package/lib/types/__generated__/body.props.d.ts +1 -1
  55. package/lib/types/__generated__/bold.props.d.ts +1 -1
  56. package/lib/types/__generated__/box.props.d.ts +1 -1
  57. package/lib/types/__generated__/button.props.d.ts +1 -1
  58. package/lib/types/__generated__/checkbox.props.d.ts +1 -1
  59. package/lib/types/__generated__/code-text.props.d.ts +1 -1
  60. package/lib/types/__generated__/form.props.d.ts +1 -1
  61. package/lib/types/__generated__/fragment.props.d.ts +1 -1
  62. package/lib/types/__generated__/heading.props.d.ts +1 -1
  63. package/lib/types/__generated__/html-embed.props.d.ts +1 -1
  64. package/lib/types/__generated__/image.props.d.ts +1 -1
  65. package/lib/types/__generated__/input.props.d.ts +1 -1
  66. package/lib/types/__generated__/italic.props.d.ts +1 -1
  67. package/lib/types/__generated__/label.props.d.ts +1 -1
  68. package/lib/types/__generated__/link.props.d.ts +1 -1
  69. package/lib/types/__generated__/list-item.props.d.ts +1 -1
  70. package/lib/types/__generated__/list.props.d.ts +1 -1
  71. package/lib/types/__generated__/markdown-embed.props.d.ts +1 -1
  72. package/lib/types/__generated__/option.props.d.ts +1 -1
  73. package/lib/types/__generated__/paragraph.props.d.ts +1 -1
  74. package/lib/types/__generated__/radio-button.props.d.ts +1 -1
  75. package/lib/types/__generated__/rich-text-link.props.d.ts +1 -1
  76. package/lib/types/__generated__/select.props.d.ts +1 -1
  77. package/lib/types/__generated__/separator.props.d.ts +1 -1
  78. package/lib/types/__generated__/slot.props.d.ts +1 -1
  79. package/lib/types/__generated__/span.props.d.ts +1 -1
  80. package/lib/types/__generated__/subscript.props.d.ts +1 -1
  81. package/lib/types/__generated__/superscript.props.d.ts +1 -1
  82. package/lib/types/__generated__/text.props.d.ts +1 -1
  83. package/lib/types/__generated__/textarea.props.d.ts +1 -1
  84. package/lib/types/__generated__/time.props.d.ts +1 -1
  85. package/lib/types/__generated__/vimeo-play-button.props.d.ts +1 -1
  86. package/lib/types/__generated__/vimeo-preview-image.props.d.ts +1 -1
  87. package/lib/types/__generated__/vimeo-spinner.props.d.ts +1 -1
  88. package/lib/types/__generated__/vimeo.props.d.ts +1 -1
  89. package/lib/types/__generated__/webhook-form.props.d.ts +1 -1
  90. package/lib/types/__generated__/xml-node.props.d.ts +1 -1
  91. package/lib/types/__generated__/xml-time.props.d.ts +1 -1
  92. package/lib/types/__generated__/youtube.props.d.ts +2 -0
  93. package/lib/types/blockquote.template.d.ts +2 -0
  94. package/lib/types/blockquote.ws.d.ts +1 -1
  95. package/lib/types/body.ws.d.ts +1 -1
  96. package/lib/types/bold.ws.d.ts +1 -1
  97. package/lib/types/box.ws.d.ts +1 -1
  98. package/lib/types/button.template.d.ts +2 -0
  99. package/lib/types/button.ws.d.ts +1 -1
  100. package/lib/types/checkbox.d.ts +1 -1
  101. package/lib/types/checkbox.template.d.ts +2 -0
  102. package/lib/types/checkbox.ws.d.ts +1 -1
  103. package/lib/types/code-text.ws.d.ts +1 -1
  104. package/lib/types/components.d.ts +1 -0
  105. package/lib/types/content-embed.template.d.ts +2 -0
  106. package/lib/types/form.ws.d.ts +1 -1
  107. package/lib/types/fragment.ws.d.ts +1 -1
  108. package/lib/types/heading.template.d.ts +2 -0
  109. package/lib/types/heading.ws.d.ts +1 -1
  110. package/lib/types/html-embed.ws.d.ts +1 -1
  111. package/lib/types/image.ws.d.ts +1 -9
  112. package/lib/types/input.ws.d.ts +1 -1
  113. package/lib/types/italic.ws.d.ts +1 -1
  114. package/lib/types/label.template.d.ts +2 -0
  115. package/lib/types/label.ws.d.ts +1 -1
  116. package/lib/types/link.template.d.ts +2 -0
  117. package/lib/types/link.ws.d.ts +1 -1
  118. package/lib/types/list-item.template.d.ts +2 -0
  119. package/lib/types/list-item.ws.d.ts +1 -1
  120. package/lib/types/list.template.d.ts +2 -0
  121. package/lib/types/list.ws.d.ts +1 -1
  122. package/lib/types/markdown-embed.template.d.ts +2 -0
  123. package/lib/types/markdown-embed.ws.d.ts +1 -1
  124. package/lib/types/metas.d.ts +1 -1
  125. package/lib/types/option.ws.d.ts +1 -1
  126. package/lib/types/paragraph.template.d.ts +2 -0
  127. package/lib/types/paragraph.ws.d.ts +1 -1
  128. package/lib/types/props.d.ts +1 -0
  129. package/lib/types/radio-button.d.ts +1 -1
  130. package/lib/types/radio-button.template.d.ts +2 -0
  131. package/lib/types/radio-button.ws.d.ts +1 -1
  132. package/lib/types/rich-text-link.ws.d.ts +1 -1
  133. package/lib/types/select.template.d.ts +2 -0
  134. package/lib/types/select.ws.d.ts +1 -1
  135. package/lib/types/separator.ws.d.ts +1 -1
  136. package/lib/types/slot.ws.d.ts +1 -1
  137. package/lib/types/span.ws.d.ts +1 -1
  138. package/lib/types/subscript.ws.d.ts +1 -1
  139. package/lib/types/superscript.ws.d.ts +1 -1
  140. package/lib/types/templates.d.ts +17 -0
  141. package/lib/types/text.template.d.ts +2 -0
  142. package/lib/types/text.ws.d.ts +1 -1
  143. package/lib/types/textarea.ws.d.ts +1 -1
  144. package/lib/types/time.ws.d.ts +1 -1
  145. package/lib/types/vimeo-play-button.ws.d.ts +1 -1
  146. package/lib/types/vimeo-preview-image.d.ts +21 -21
  147. package/lib/types/vimeo-preview-image.ws.d.ts +1 -1
  148. package/lib/types/vimeo-spinner.ws.d.ts +1 -1
  149. package/lib/types/vimeo.d.ts +12 -2
  150. package/lib/types/vimeo.template.d.ts +2 -0
  151. package/lib/types/vimeo.ws.d.ts +1 -1
  152. package/lib/types/webhook-form.template.d.ts +2 -0
  153. package/lib/types/webhook-form.ws.d.ts +1 -1
  154. package/lib/types/xml-node.ws.d.ts +1 -1
  155. package/lib/types/xml-time.ws.d.ts +1 -1
  156. package/lib/types/youtube.d.ts +143 -0
  157. package/lib/types/youtube.template.d.ts +2 -0
  158. package/lib/types/youtube.ws.d.ts +3 -0
  159. package/lib/vimeo-play-button.ws.js +8 -8
  160. package/lib/vimeo-preview-image.ws.js +17 -9
  161. package/lib/vimeo-spinner.ws.js +8 -8
  162. package/lib/vimeo.js +88 -87
  163. package/lib/vimeo.template.js +93 -0
  164. package/lib/vimeo.ws.js +14 -302
  165. package/lib/webhook-form.template.js +49 -0
  166. package/lib/webhook-form.ws.js +17 -118
  167. package/lib/xml-node.js +18 -14
  168. package/lib/xml-node.ws.js +4 -5
  169. package/lib/xml-time.ws.js +4 -5
  170. package/lib/youtube.js +200 -0
  171. package/lib/youtube.template.js +97 -0
  172. package/lib/youtube.ws.js +51 -0
  173. package/package.json +16 -9
  174. package/lib/content-embed.ws.js +0 -77
  175. package/lib/types/__generated__/local-date.props.d.ts +0 -2
  176. package/lib/types/content-embed.ws.d.ts +0 -2
package/lib/link.ws.js CHANGED
@@ -1,30 +1,23 @@
1
1
  import { LinkIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/react-sdk";
2
+ import { defaultStates as t } from "@webstudio-is/sdk";
3
3
  import { a as r } from "@webstudio-is/sdk/normalize.css";
4
4
  import { props as o } from "./__generated__/link.props.js";
5
- const n = {
5
+ const a = {
6
6
  a: [
7
7
  ...r,
8
- {
9
- property: "minHeight",
10
- value: { type: "unit", unit: "em", value: 1 }
11
- },
12
8
  {
13
9
  property: "display",
14
10
  value: { type: "keyword", value: "inline-block" }
15
11
  }
16
12
  ]
17
13
  }, l = {
18
- category: "general",
19
14
  type: "container",
20
- description: "Use a link to send your users to another page, section, or resource. Configure links in the Settings panel.",
21
15
  icon: e,
22
16
  constraints: {
23
17
  relation: "ancestor",
24
18
  component: { $nin: ["Button", "Link"] }
25
19
  },
26
- presetStyle: n,
27
- order: 1,
20
+ presetStyle: a,
28
21
  states: [
29
22
  ...t,
30
23
  {
@@ -36,19 +29,6 @@ const n = {
36
29
  selector: "[aria-current=page]",
37
30
  label: "Current page"
38
31
  }
39
- ],
40
- template: [
41
- {
42
- type: "instance",
43
- component: "Link",
44
- children: [
45
- {
46
- type: "text",
47
- value: "Link text you can edit",
48
- placeholder: !0
49
- }
50
- ]
51
- }
52
32
  ]
53
33
  }, c = {
54
34
  props: {
@@ -0,0 +1,11 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { $ as e } from "@webstudio-is/template";
3
+ const i = {
4
+ category: "typography",
5
+ description: "Adds a new item to an existing list.",
6
+ order: 5,
7
+ template: /* @__PURE__ */ t(e.ListItem, {})
8
+ };
9
+ export {
10
+ i as meta
11
+ };
@@ -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
7
- }, c = {
8
- category: "general",
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
+ }, m = {
9
8
  type: "container",
10
9
  constraints: {
11
10
  // cannot use parent relation here
@@ -14,29 +13,14 @@ 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: 4,
22
- template: [
23
- {
24
- type: "instance",
25
- component: "ListItem",
26
- children: [
27
- {
28
- type: "text",
29
- value: "List Item text you can edit",
30
- placeholder: !0
31
- }
32
- ]
33
- }
34
- ]
35
- }, m = {
36
- props: i,
17
+ states: o,
18
+ presetStyle: s
19
+ }, c = {
20
+ props: r,
37
21
  initialProps: ["id", "className"]
38
22
  };
39
23
  export {
40
- c as meta,
41
- m as propsMeta
24
+ m as meta,
25
+ c as propsMeta
42
26
  };
@@ -0,0 +1,15 @@
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import { $ as e, PlaceholderValue as i } from "@webstudio-is/template";
3
+ const s = {
4
+ category: "typography",
5
+ description: "Groups content, like links in a menu or steps in a recipe.",
6
+ order: 4,
7
+ template: /* @__PURE__ */ n(e.List, { children: [
8
+ /* @__PURE__ */ t(e.ListItem, { children: new i("List Item text you can edit") }),
9
+ /* @__PURE__ */ t(e.ListItem, { children: new i("List Item text you can edit") }),
10
+ /* @__PURE__ */ t(e.ListItem, { children: new i("List Item text you can edit") })
11
+ ] })
12
+ };
13
+ export {
14
+ s as meta
15
+ };
package/lib/list.ws.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { ListIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/react-sdk";
3
- import { ol as o, ul as r } from "@webstudio-is/sdk/normalize.css";
2
+ import { defaultStates as r } from "@webstudio-is/sdk";
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 = {
6
6
  ol: [
7
- ...o,
7
+ ...t,
8
8
  {
9
9
  property: "marginTop",
10
10
  value: { type: "keyword", value: "0" }
@@ -19,7 +19,7 @@ const a = {
19
19
  }
20
20
  ],
21
21
  ul: [
22
- ...r,
22
+ ...o,
23
23
  {
24
24
  property: "marginTop",
25
25
  value: { type: "keyword", value: "0" }
@@ -33,60 +33,16 @@ const a = {
33
33
  value: { type: "keyword", value: "40px" }
34
34
  }
35
35
  ]
36
- }, y = {
37
- category: "general",
36
+ }, d = {
38
37
  type: "container",
39
- description: "Groups content, like links in a menu or steps in a recipe.",
40
38
  icon: e,
41
- states: t,
42
- presetStyle: a,
43
- order: 3,
44
- template: [
45
- {
46
- type: "instance",
47
- component: "List",
48
- children: [
49
- {
50
- type: "instance",
51
- component: "ListItem",
52
- children: [
53
- {
54
- type: "text",
55
- value: "List Item text you can edit",
56
- placeholder: !0
57
- }
58
- ]
59
- },
60
- {
61
- type: "instance",
62
- component: "ListItem",
63
- children: [
64
- {
65
- type: "text",
66
- value: "List Item text you can edit",
67
- placeholder: !0
68
- }
69
- ]
70
- },
71
- {
72
- type: "instance",
73
- component: "ListItem",
74
- children: [
75
- {
76
- type: "text",
77
- value: "List Item text you can edit",
78
- placeholder: !0
79
- }
80
- ]
81
- }
82
- ]
83
- }
84
- ]
85
- }, c = {
39
+ states: r,
40
+ presetStyle: a
41
+ }, s = {
86
42
  props: p,
87
43
  initialProps: ["id", "className", "ordered", "start", "reversed"]
88
44
  };
89
45
  export {
90
- y as meta,
91
- c as propsMeta
46
+ d as meta,
47
+ s as propsMeta
92
48
  };
@@ -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,39 +1,23 @@
1
1
  import { TextAlignLeftIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as e } from "@webstudio-is/react-sdk";
3
- import { p as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as r } from "./__generated__/paragraph.props.js";
5
- const a = {
6
- p: o
7
- }, s = {
8
- category: "text",
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
+ const n = {
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
- states: e,
17
- presetStyle: a,
18
- order: 2,
19
- template: [
20
- {
21
- type: "instance",
22
- component: "Paragraph",
23
- children: [
24
- {
25
- type: "text",
26
- value: "Paragraph text you can edit",
27
- placeholder: !0
28
- }
29
- ]
30
- }
31
- ]
32
- }, m = {
33
- props: r,
14
+ states: o,
15
+ presetStyle: n
16
+ }, c = {
17
+ props: e,
34
18
  initialProps: ["id", "className"]
35
19
  };
36
20
  export {
37
- s as meta,
38
- m as propsMeta
21
+ m as meta,
22
+ c as propsMeta
39
23
  };