@webstudio-is/react-sdk 0.33.0 → 0.35.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 (68) hide show
  1. package/lib/app/custom-components/index.js +2 -3
  2. package/lib/cjs/app/custom-components/index.cjs +2 -3
  3. package/lib/cjs/components/body.ws.cjs +2 -3
  4. package/lib/cjs/components/bold.ws.cjs +2 -3
  5. package/lib/cjs/components/box.ws.cjs +2 -3
  6. package/lib/cjs/components/button.ws.cjs +2 -3
  7. package/lib/cjs/components/component-type.cjs +0 -8
  8. package/lib/cjs/components/form.ws.cjs +2 -3
  9. package/lib/cjs/components/heading.ws.cjs +2 -3
  10. package/lib/cjs/components/image.ws.cjs +2 -3
  11. package/lib/cjs/components/input.ws.cjs +2 -3
  12. package/lib/cjs/components/italic.ws.cjs +2 -3
  13. package/lib/cjs/components/link.ws.cjs +2 -3
  14. package/lib/cjs/components/paragraph.ws.cjs +2 -3
  15. package/lib/cjs/components/rich-text-link.ws.cjs +2 -3
  16. package/lib/cjs/components/span.ws.cjs +2 -3
  17. package/lib/cjs/components/subscript.ws.cjs +2 -3
  18. package/lib/cjs/components/superscript.ws.cjs +2 -3
  19. package/lib/cjs/components/text-block.ws.cjs +2 -3
  20. package/lib/cjs/css/index.cjs +0 -1
  21. package/lib/cjs/tree/create-elements-tree.cjs +6 -13
  22. package/lib/cjs/tree/wrapper-component.cjs +2 -1
  23. package/lib/components/body.ws.js +2 -3
  24. package/lib/components/bold.ws.js +2 -3
  25. package/lib/components/box.ws.js +2 -3
  26. package/lib/components/button.ws.js +2 -3
  27. package/lib/components/component-type.js +0 -4
  28. package/lib/components/form.ws.js +2 -3
  29. package/lib/components/heading.ws.js +2 -3
  30. package/lib/components/image.ws.js +2 -3
  31. package/lib/components/input.ws.js +2 -3
  32. package/lib/components/italic.ws.js +2 -3
  33. package/lib/components/link.ws.js +2 -3
  34. package/lib/components/paragraph.ws.js +2 -3
  35. package/lib/components/rich-text-link.ws.js +2 -3
  36. package/lib/components/span.ws.js +2 -3
  37. package/lib/components/subscript.ws.js +2 -3
  38. package/lib/components/superscript.ws.js +2 -3
  39. package/lib/components/text-block.ws.js +2 -3
  40. package/lib/css/index.js +0 -1
  41. package/lib/tree/create-elements-tree.js +6 -13
  42. package/lib/tree/wrapper-component.js +2 -1
  43. package/package.json +9 -9
  44. package/src/app/custom-components/index.ts +3 -3
  45. package/src/components/body.ws.tsx +3 -3
  46. package/src/components/bold.ws.tsx +3 -3
  47. package/src/components/box.ws.ts +3 -3
  48. package/src/components/button.ws.tsx +3 -3
  49. package/src/components/component-type.ts +2 -2
  50. package/src/components/form.ws.tsx +3 -3
  51. package/src/components/heading.ws.tsx +3 -3
  52. package/src/components/image.ws.tsx +3 -3
  53. package/src/components/input.ws.tsx +3 -3
  54. package/src/components/italic.ws.tsx +3 -3
  55. package/src/components/link.ws.tsx +3 -3
  56. package/src/components/paragraph.ws.tsx +3 -3
  57. package/src/components/rich-text-link.ws.tsx +3 -3
  58. package/src/components/span.ws.tsx +3 -3
  59. package/src/components/subscript.ws.tsx +3 -3
  60. package/src/components/superscript.ws.tsx +3 -3
  61. package/src/components/text-block.ws.tsx +3 -3
  62. package/src/css/index.ts +0 -1
  63. package/src/tree/create-elements-tree.tsx +0 -28
  64. package/src/tree/wrapper-component.tsx +1 -3
  65. package/lib/cjs/css/breakpoints.cjs +0 -29
  66. package/lib/css/breakpoints.js +0 -9
  67. package/src/components/index.test.ts +0 -7
  68. package/src/css/breakpoints.ts +0 -10
@@ -2,19 +2,18 @@ import { Image } from "./image";
2
2
  import { Link } from "./link";
3
3
  import { RichTextLink } from "./rich-text-link";
4
4
  import { imageProps } from "@webstudio-is/image";
5
- import { WsComponentPropsMeta } from "../../components/component-type";
6
5
  const customComponents = {
7
6
  Image,
8
7
  Link,
9
8
  RichTextLink
10
9
  };
11
10
  const customComponentPropsMetas = {
12
- Image: WsComponentPropsMeta.parse({
11
+ Image: {
13
12
  props: {
14
13
  ...imageProps,
15
14
  src: { ...imageProps.src, control: "file-image", name: "Source" }
16
15
  }
17
- })
16
+ }
18
17
  };
19
18
  const customComponentMetas = {};
20
19
  export {
@@ -27,18 +27,17 @@ var import_image = require("./image");
27
27
  var import_link = require("./link");
28
28
  var import_rich_text_link = require("./rich-text-link");
29
29
  var import_image2 = require("@webstudio-is/image");
30
- var import_component_type = require("../../components/component-type");
31
30
  const customComponents = {
32
31
  Image: import_image.Image,
33
32
  Link: import_link.Link,
34
33
  RichTextLink: import_rich_text_link.RichTextLink
35
34
  };
36
35
  const customComponentPropsMetas = {
37
- Image: import_component_type.WsComponentPropsMeta.parse({
36
+ Image: {
38
37
  props: {
39
38
  ...import_image2.imageProps,
40
39
  src: { ...import_image2.imageProps.src, control: "file-image", name: "Source" }
41
40
  }
42
- })
41
+ }
43
42
  };
44
43
  const customComponentMetas = {};
@@ -29,7 +29,6 @@ __export(body_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(body_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_body_props = __toESM(require("./__generated__/body.props.json"), 1);
34
33
  const presetStyle = {
35
34
  marginTop: {
@@ -86,6 +85,6 @@ const meta = {
86
85
  Icon: import_icons.BodyIcon,
87
86
  presetStyle
88
87
  };
89
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
88
+ const propsMeta = {
90
89
  props: import_body_props.default
91
- });
90
+ };
@@ -29,13 +29,12 @@ __export(bold_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(bold_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_bold_props = __toESM(require("./__generated__/bold.props.json"), 1);
34
33
  const meta = {
35
34
  type: "rich-text-child",
36
35
  label: "Bold Text",
37
36
  Icon: import_icons.FontBoldIcon
38
37
  };
39
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
38
+ const propsMeta = {
40
39
  props: import_bold_props.default
41
- });
40
+ };
@@ -29,7 +29,6 @@ __export(box_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(box_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_box_props = __toESM(require("./__generated__/box.props.json"), 1);
34
33
  const presetStyle = {
35
34
  boxSizing: {
@@ -43,7 +42,7 @@ const meta = {
43
42
  Icon: import_icons.SquareIcon,
44
43
  presetStyle
45
44
  };
46
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
45
+ const propsMeta = {
47
46
  props: import_box_props.default,
48
47
  initialProps: ["tag"]
49
- });
48
+ };
@@ -29,7 +29,6 @@ __export(button_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(button_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_button_props = __toESM(require("./__generated__/button.props.json"), 1);
34
33
  const meta = {
35
34
  type: "rich-text",
@@ -37,7 +36,7 @@ const meta = {
37
36
  Icon: import_icons.ButtonIcon,
38
37
  children: ["Button text you can edit"]
39
38
  };
40
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
39
+ const propsMeta = {
41
40
  props: import_button_props.default,
42
41
  initialProps: ["type"]
43
- });
42
+ };
@@ -3,10 +3,6 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
6
  var __copyProps = (to, from, except, desc) => {
11
7
  if (from && typeof from === "object" || typeof from === "function") {
12
8
  for (let key of __getOwnPropNames(from))
@@ -17,10 +13,6 @@ var __copyProps = (to, from, except, desc) => {
17
13
  };
18
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
15
  var component_type_exports = {};
20
- __export(component_type_exports, {
21
- WsComponentMeta: () => WsComponentMeta,
22
- WsComponentPropsMeta: () => WsComponentPropsMeta
23
- });
24
16
  module.exports = __toCommonJS(component_type_exports);
25
17
  var import_zod = require("zod");
26
18
  var import_generate_arg_types = require("@webstudio-is/generate-arg-types");
@@ -29,7 +29,6 @@ __export(form_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(form_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_form_props = __toESM(require("./__generated__/form.props.json"), 1);
34
33
  const presetStyle = {
35
34
  minHeight: {
@@ -48,6 +47,6 @@ const meta = {
48
47
  Icon: import_icons.FormIcon,
49
48
  presetStyle
50
49
  };
51
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
50
+ const propsMeta = {
52
51
  props: import_form_props.default
53
- });
52
+ };
@@ -29,7 +29,6 @@ __export(heading_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(heading_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_heading_props = __toESM(require("./__generated__/heading.props.json"), 1);
34
33
  const meta = {
35
34
  type: "rich-text",
@@ -37,7 +36,7 @@ const meta = {
37
36
  Icon: import_icons.HeadingIcon,
38
37
  children: ["Heading you can edit"]
39
38
  };
40
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
39
+ const propsMeta = {
41
40
  props: import_heading_props.default,
42
41
  initialProps: ["tag"]
43
- });
42
+ };
@@ -29,7 +29,6 @@ __export(image_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(image_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_image_props = __toESM(require("./__generated__/image.props.json"), 1);
34
33
  const presetStyle = {
35
34
  maxWidth: {
@@ -48,10 +47,10 @@ const meta = {
48
47
  Icon: import_icons.ImageIcon,
49
48
  presetStyle
50
49
  };
51
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
50
+ const propsMeta = {
52
51
  props: {
53
52
  ...import_image_props.default,
54
53
  src: { ...import_image_props.default.src, control: "file-image", name: "Source" }
55
54
  },
56
55
  initialProps: ["src", "width", "height", "alt", "loading"]
57
- });
56
+ };
@@ -29,13 +29,12 @@ __export(input_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(input_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_input_props = __toESM(require("./__generated__/input.props.json"), 1);
34
33
  const meta = {
35
34
  type: "control",
36
35
  label: "Input",
37
36
  Icon: import_icons.InputIcon
38
37
  };
39
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
38
+ const propsMeta = {
40
39
  props: import_input_props.default
41
- });
40
+ };
@@ -29,7 +29,6 @@ __export(italic_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(italic_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_italic_props = __toESM(require("./__generated__/italic.props.json"), 1);
34
33
  const presetStyle = {
35
34
  fontStyle: {
@@ -43,6 +42,6 @@ const meta = {
43
42
  Icon: import_icons.FontItalicIcon,
44
43
  presetStyle
45
44
  };
46
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
45
+ const propsMeta = {
47
46
  props: import_italic_props.default
48
- });
47
+ };
@@ -29,7 +29,6 @@ __export(link_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(link_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_link_props = __toESM(require("./__generated__/link.props.json"), 1);
34
33
  const presetStyle = {
35
34
  minHeight: {
@@ -49,7 +48,7 @@ const meta = {
49
48
  presetStyle,
50
49
  children: ["Link text you can edit"]
51
50
  };
52
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
51
+ const propsMeta = {
53
52
  props: import_link_props.default,
54
53
  initialProps: ["href"]
55
- });
54
+ };
@@ -29,7 +29,6 @@ __export(paragraph_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(paragraph_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_paragraph_props = __toESM(require("./__generated__/paragraph.props.json"), 1);
34
33
  const meta = {
35
34
  type: "rich-text",
@@ -37,6 +36,6 @@ const meta = {
37
36
  Icon: import_icons.TextAlignLeftIcon,
38
37
  children: ["Pragraph you can edit"]
39
38
  };
40
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
39
+ const propsMeta = {
41
40
  props: import_paragraph_props.default
42
- });
41
+ };
@@ -29,13 +29,12 @@ __export(rich_text_link_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(rich_text_link_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_rich_text_link_props = __toESM(require("./__generated__/rich-text-link.props.json"), 1);
34
33
  const meta = {
35
34
  type: "rich-text-child",
36
35
  label: "Link",
37
36
  Icon: import_icons.Link2Icon
38
37
  };
39
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
38
+ const propsMeta = {
40
39
  props: import_rich_text_link_props.default
41
- });
40
+ };
@@ -29,13 +29,12 @@ __export(span_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(span_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_span_props = __toESM(require("./__generated__/span.props.json"), 1);
34
33
  const meta = {
35
34
  type: "rich-text-child",
36
35
  label: "Styled Text",
37
36
  Icon: import_icons.BrushIcon
38
37
  };
39
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
38
+ const propsMeta = {
40
39
  props: import_span_props.default
41
- });
40
+ };
@@ -29,13 +29,12 @@ __export(subscript_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(subscript_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_subscript_props = __toESM(require("./__generated__/subscript.props.json"), 1);
34
33
  const meta = {
35
34
  type: "rich-text-child",
36
35
  label: "Subscript Text",
37
36
  Icon: import_icons.SubscriptIcon
38
37
  };
39
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
38
+ const propsMeta = {
40
39
  props: import_subscript_props.default
41
- });
40
+ };
@@ -29,13 +29,12 @@ __export(superscript_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(superscript_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_superscript_props = __toESM(require("./__generated__/superscript.props.json"), 1);
34
33
  const meta = {
35
34
  type: "rich-text-child",
36
35
  label: "Superscript Text",
37
36
  Icon: import_icons.SuperscriptIcon
38
37
  };
39
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
38
+ const propsMeta = {
40
39
  props: import_superscript_props.default
41
- });
40
+ };
@@ -29,7 +29,6 @@ __export(text_block_ws_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(text_block_ws_exports);
31
31
  var import_icons = require("@webstudio-is/icons");
32
- var import_component_type = require("./component-type");
33
32
  var import_text_block_props = __toESM(require("./__generated__/text-block.props.json"), 1);
34
33
  const presetStyle = {
35
34
  minHeight: {
@@ -45,6 +44,6 @@ const meta = {
45
44
  presetStyle,
46
45
  children: ["Block of text you can edit"]
47
46
  };
48
- const propsMeta = import_component_type.WsComponentPropsMeta.parse({
47
+ const propsMeta = {
49
48
  props: import_text_block_props.default
50
- });
49
+ };
@@ -17,4 +17,3 @@ var css_exports = {};
17
17
  module.exports = __toCommonJS(css_exports);
18
18
  __reExport(css_exports, require("./get-browser-style"), module.exports);
19
19
  __reExport(css_exports, require("./categories"), module.exports);
20
- __reExport(css_exports, require("./breakpoints"), module.exports);
@@ -31,13 +31,11 @@ const createElementsTree = ({
31
31
  instance,
32
32
  propsByInstanceIdStore,
33
33
  assetsStore,
34
- Component,
35
- onChangeChildren
34
+ Component
36
35
  }) => {
37
36
  const children = createInstanceChildrenElements({
38
37
  Component,
39
- children: instance.children,
40
- onChangeChildren
38
+ children: instance.children
41
39
  });
42
40
  const body = createInstanceElement({
43
41
  Component,
@@ -60,8 +58,7 @@ const createElementsTree = ({
60
58
  };
61
59
  const createInstanceChildrenElements = ({
62
60
  children,
63
- Component,
64
- onChangeChildren
61
+ Component
65
62
  }) => {
66
63
  const elements = [];
67
64
  for (const child of children) {
@@ -71,13 +68,11 @@ const createInstanceChildrenElements = ({
71
68
  }
72
69
  const children2 = createInstanceChildrenElements({
73
70
  children: child.children,
74
- Component,
75
- onChangeChildren
71
+ Component
76
72
  });
77
73
  const element = createInstanceElement({
78
74
  instance: child,
79
75
  Component,
80
- onChangeChildren,
81
76
  children: children2
82
77
  });
83
78
  elements.push(element);
@@ -87,14 +82,12 @@ const createInstanceChildrenElements = ({
87
82
  const createInstanceElement = ({
88
83
  Component,
89
84
  instance,
90
- children = [],
91
- onChangeChildren
85
+ children = []
92
86
  }) => {
93
87
  const props = {
94
88
  instance,
95
89
  children,
96
- key: instance.id,
97
- onChangeChildren
90
+ key: instance.id
98
91
  };
99
92
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {
100
93
  ...props
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  var wrapper_component_exports = {};
20
20
  __export(wrapper_component_exports, {
21
21
  WrapperComponent: () => WrapperComponent,
22
+ collapsedAttribute: () => collapsedAttribute,
22
23
  componentAttribute: () => componentAttribute,
23
24
  idAttribute: () => idAttribute,
24
25
  renderWrapperComponentChildren: () => renderWrapperComponentChildren
@@ -47,7 +48,6 @@ const renderWrapperComponentChildren = (children) => {
47
48
  };
48
49
  const WrapperComponent = ({
49
50
  instance,
50
- onChangeChildren,
51
51
  children,
52
52
  ...rest
53
53
  }) => {
@@ -69,3 +69,4 @@ const WrapperComponent = ({
69
69
  };
70
70
  const idAttribute = "data-ws-id";
71
71
  const componentAttribute = "data-ws-component";
72
+ const collapsedAttribute = "data-ws-collapsed";
@@ -1,5 +1,4 @@
1
1
  import { BodyIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/body.props.json";
4
3
  const presetStyle = {
5
4
  marginTop: {
@@ -56,9 +55,9 @@ const meta = {
56
55
  Icon: BodyIcon,
57
56
  presetStyle
58
57
  };
59
- const propsMeta = WsComponentPropsMeta.parse({
58
+ const propsMeta = {
60
59
  props
61
- });
60
+ };
62
61
  export {
63
62
  meta,
64
63
  propsMeta
@@ -1,14 +1,13 @@
1
1
  import { FontBoldIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/bold.props.json";
4
3
  const meta = {
5
4
  type: "rich-text-child",
6
5
  label: "Bold Text",
7
6
  Icon: FontBoldIcon
8
7
  };
9
- const propsMeta = WsComponentPropsMeta.parse({
8
+ const propsMeta = {
10
9
  props
11
- });
10
+ };
12
11
  export {
13
12
  meta,
14
13
  propsMeta
@@ -1,5 +1,4 @@
1
1
  import { SquareIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/box.props.json";
4
3
  const presetStyle = {
5
4
  boxSizing: {
@@ -13,10 +12,10 @@ const meta = {
13
12
  Icon: SquareIcon,
14
13
  presetStyle
15
14
  };
16
- const propsMeta = WsComponentPropsMeta.parse({
15
+ const propsMeta = {
17
16
  props,
18
17
  initialProps: ["tag"]
19
- });
18
+ };
20
19
  export {
21
20
  meta,
22
21
  propsMeta
@@ -1,5 +1,4 @@
1
1
  import { ButtonIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/button.props.json";
4
3
  const meta = {
5
4
  type: "rich-text",
@@ -7,10 +6,10 @@ const meta = {
7
6
  Icon: ButtonIcon,
8
7
  children: ["Button text you can edit"]
9
8
  };
10
- const propsMeta = WsComponentPropsMeta.parse({
9
+ const propsMeta = {
11
10
  props,
12
11
  initialProps: ["type"]
13
- });
12
+ };
14
13
  export {
15
14
  meta,
16
15
  propsMeta
@@ -18,7 +18,3 @@ const WsComponentMeta = z.object({
18
18
  presetStyle: z.optional(z.any()),
19
19
  children: z.optional(z.array(z.string()))
20
20
  });
21
- export {
22
- WsComponentMeta,
23
- WsComponentPropsMeta
24
- };
@@ -1,5 +1,4 @@
1
1
  import { FormIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/form.props.json";
4
3
  const presetStyle = {
5
4
  minHeight: {
@@ -18,9 +17,9 @@ const meta = {
18
17
  Icon: FormIcon,
19
18
  presetStyle
20
19
  };
21
- const propsMeta = WsComponentPropsMeta.parse({
20
+ const propsMeta = {
22
21
  props
23
- });
22
+ };
24
23
  export {
25
24
  meta,
26
25
  propsMeta
@@ -1,5 +1,4 @@
1
1
  import { HeadingIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/heading.props.json";
4
3
  const meta = {
5
4
  type: "rich-text",
@@ -7,10 +6,10 @@ const meta = {
7
6
  Icon: HeadingIcon,
8
7
  children: ["Heading you can edit"]
9
8
  };
10
- const propsMeta = WsComponentPropsMeta.parse({
9
+ const propsMeta = {
11
10
  props,
12
11
  initialProps: ["tag"]
13
- });
12
+ };
14
13
  export {
15
14
  meta,
16
15
  propsMeta
@@ -1,5 +1,4 @@
1
1
  import { ImageIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/image.props.json";
4
3
  const presetStyle = {
5
4
  maxWidth: {
@@ -18,13 +17,13 @@ const meta = {
18
17
  Icon: ImageIcon,
19
18
  presetStyle
20
19
  };
21
- const propsMeta = WsComponentPropsMeta.parse({
20
+ const propsMeta = {
22
21
  props: {
23
22
  ...props,
24
23
  src: { ...props.src, control: "file-image", name: "Source" }
25
24
  },
26
25
  initialProps: ["src", "width", "height", "alt", "loading"]
27
- });
26
+ };
28
27
  export {
29
28
  meta,
30
29
  propsMeta
@@ -1,14 +1,13 @@
1
1
  import { InputIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/input.props.json";
4
3
  const meta = {
5
4
  type: "control",
6
5
  label: "Input",
7
6
  Icon: InputIcon
8
7
  };
9
- const propsMeta = WsComponentPropsMeta.parse({
8
+ const propsMeta = {
10
9
  props
11
- });
10
+ };
12
11
  export {
13
12
  meta,
14
13
  propsMeta
@@ -1,5 +1,4 @@
1
1
  import { FontItalicIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/italic.props.json";
4
3
  const presetStyle = {
5
4
  fontStyle: {
@@ -13,9 +12,9 @@ const meta = {
13
12
  Icon: FontItalicIcon,
14
13
  presetStyle
15
14
  };
16
- const propsMeta = WsComponentPropsMeta.parse({
15
+ const propsMeta = {
17
16
  props
18
- });
17
+ };
19
18
  export {
20
19
  meta,
21
20
  propsMeta
@@ -1,5 +1,4 @@
1
1
  import { Link2Icon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/link.props.json";
4
3
  const presetStyle = {
5
4
  minHeight: {
@@ -19,10 +18,10 @@ const meta = {
19
18
  presetStyle,
20
19
  children: ["Link text you can edit"]
21
20
  };
22
- const propsMeta = WsComponentPropsMeta.parse({
21
+ const propsMeta = {
23
22
  props,
24
23
  initialProps: ["href"]
25
- });
24
+ };
26
25
  export {
27
26
  meta,
28
27
  propsMeta
@@ -1,5 +1,4 @@
1
1
  import { TextAlignLeftIcon } from "@webstudio-is/icons";
2
- import { WsComponentPropsMeta } from "./component-type";
3
2
  import props from "./__generated__/paragraph.props.json";
4
3
  const meta = {
5
4
  type: "rich-text",
@@ -7,9 +6,9 @@ const meta = {
7
6
  Icon: TextAlignLeftIcon,
8
7
  children: ["Pragraph you can edit"]
9
8
  };
10
- const propsMeta = WsComponentPropsMeta.parse({
9
+ const propsMeta = {
11
10
  props
12
- });
11
+ };
13
12
  export {
14
13
  meta,
15
14
  propsMeta