@webstudio-is/react-sdk 0.33.0 → 0.34.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.
- package/lib/app/custom-components/index.js +2 -3
- package/lib/cjs/app/custom-components/index.cjs +2 -3
- package/lib/cjs/components/body.ws.cjs +2 -3
- package/lib/cjs/components/bold.ws.cjs +2 -3
- package/lib/cjs/components/box.ws.cjs +2 -3
- package/lib/cjs/components/button.ws.cjs +2 -3
- package/lib/cjs/components/component-type.cjs +0 -8
- package/lib/cjs/components/form.ws.cjs +2 -3
- package/lib/cjs/components/heading.ws.cjs +2 -3
- package/lib/cjs/components/image.ws.cjs +2 -3
- package/lib/cjs/components/input.ws.cjs +2 -3
- package/lib/cjs/components/italic.ws.cjs +2 -3
- package/lib/cjs/components/link.ws.cjs +2 -3
- package/lib/cjs/components/paragraph.ws.cjs +2 -3
- package/lib/cjs/components/rich-text-link.ws.cjs +2 -3
- package/lib/cjs/components/span.ws.cjs +2 -3
- package/lib/cjs/components/subscript.ws.cjs +2 -3
- package/lib/cjs/components/superscript.ws.cjs +2 -3
- package/lib/cjs/components/text-block.ws.cjs +2 -3
- package/lib/components/body.ws.js +2 -3
- package/lib/components/bold.ws.js +2 -3
- package/lib/components/box.ws.js +2 -3
- package/lib/components/button.ws.js +2 -3
- package/lib/components/component-type.js +0 -4
- package/lib/components/form.ws.js +2 -3
- package/lib/components/heading.ws.js +2 -3
- package/lib/components/image.ws.js +2 -3
- package/lib/components/input.ws.js +2 -3
- package/lib/components/italic.ws.js +2 -3
- package/lib/components/link.ws.js +2 -3
- package/lib/components/paragraph.ws.js +2 -3
- package/lib/components/rich-text-link.ws.js +2 -3
- package/lib/components/span.ws.js +2 -3
- package/lib/components/subscript.ws.js +2 -3
- package/lib/components/superscript.ws.js +2 -3
- package/lib/components/text-block.ws.js +2 -3
- package/package.json +9 -9
- package/src/app/custom-components/index.ts +3 -3
- package/src/components/body.ws.tsx +3 -3
- package/src/components/bold.ws.tsx +3 -3
- package/src/components/box.ws.ts +3 -3
- package/src/components/button.ws.tsx +3 -3
- package/src/components/component-type.ts +2 -2
- package/src/components/form.ws.tsx +3 -3
- package/src/components/heading.ws.tsx +3 -3
- package/src/components/image.ws.tsx +3 -3
- package/src/components/input.ws.tsx +3 -3
- package/src/components/italic.ws.tsx +3 -3
- package/src/components/link.ws.tsx +3 -3
- package/src/components/paragraph.ws.tsx +3 -3
- package/src/components/rich-text-link.ws.tsx +3 -3
- package/src/components/span.ws.tsx +3 -3
- package/src/components/subscript.ws.tsx +3 -3
- package/src/components/superscript.ws.tsx +3 -3
- package/src/components/text-block.ws.tsx +3 -3
- package/src/components/index.test.ts +0 -7
|
@@ -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:
|
|
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:
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
47
|
+
const propsMeta = {
|
|
49
48
|
props: import_text_block_props.default
|
|
50
|
-
}
|
|
49
|
+
};
|
|
@@ -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 =
|
|
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 =
|
|
8
|
+
const propsMeta = {
|
|
10
9
|
props
|
|
11
|
-
}
|
|
10
|
+
};
|
|
12
11
|
export {
|
|
13
12
|
meta,
|
|
14
13
|
propsMeta
|
package/lib/components/box.ws.js
CHANGED
|
@@ -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 =
|
|
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 =
|
|
9
|
+
const propsMeta = {
|
|
11
10
|
props,
|
|
12
11
|
initialProps: ["type"]
|
|
13
|
-
}
|
|
12
|
+
};
|
|
14
13
|
export {
|
|
15
14
|
meta,
|
|
16
15
|
propsMeta
|
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
9
|
+
const propsMeta = {
|
|
11
10
|
props
|
|
12
|
-
}
|
|
11
|
+
};
|
|
13
12
|
export {
|
|
14
13
|
meta,
|
|
15
14
|
propsMeta
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Link2Icon } from "@webstudio-is/icons";
|
|
2
|
-
import { WsComponentPropsMeta } from "./component-type";
|
|
3
2
|
import props from "./__generated__/rich-text-link.props.json";
|
|
4
3
|
const meta = {
|
|
5
4
|
type: "rich-text-child",
|
|
6
5
|
label: "Link",
|
|
7
6
|
Icon: Link2Icon
|
|
8
7
|
};
|
|
9
|
-
const propsMeta =
|
|
8
|
+
const propsMeta = {
|
|
10
9
|
props
|
|
11
|
-
}
|
|
10
|
+
};
|
|
12
11
|
export {
|
|
13
12
|
meta,
|
|
14
13
|
propsMeta
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { BrushIcon } from "@webstudio-is/icons";
|
|
2
|
-
import { WsComponentPropsMeta } from "./component-type";
|
|
3
2
|
import props from "./__generated__/span.props.json";
|
|
4
3
|
const meta = {
|
|
5
4
|
type: "rich-text-child",
|
|
6
5
|
label: "Styled Text",
|
|
7
6
|
Icon: BrushIcon
|
|
8
7
|
};
|
|
9
|
-
const propsMeta =
|
|
8
|
+
const propsMeta = {
|
|
10
9
|
props
|
|
11
|
-
}
|
|
10
|
+
};
|
|
12
11
|
export {
|
|
13
12
|
meta,
|
|
14
13
|
propsMeta
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { SubscriptIcon } from "@webstudio-is/icons";
|
|
2
|
-
import { WsComponentPropsMeta } from "./component-type";
|
|
3
2
|
import props from "./__generated__/subscript.props.json";
|
|
4
3
|
const meta = {
|
|
5
4
|
type: "rich-text-child",
|
|
6
5
|
label: "Subscript Text",
|
|
7
6
|
Icon: SubscriptIcon
|
|
8
7
|
};
|
|
9
|
-
const propsMeta =
|
|
8
|
+
const propsMeta = {
|
|
10
9
|
props
|
|
11
|
-
}
|
|
10
|
+
};
|
|
12
11
|
export {
|
|
13
12
|
meta,
|
|
14
13
|
propsMeta
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { SuperscriptIcon } from "@webstudio-is/icons";
|
|
2
|
-
import { WsComponentPropsMeta } from "./component-type";
|
|
3
2
|
import props from "./__generated__/superscript.props.json";
|
|
4
3
|
const meta = {
|
|
5
4
|
type: "rich-text-child",
|
|
6
5
|
label: "Superscript Text",
|
|
7
6
|
Icon: SuperscriptIcon
|
|
8
7
|
};
|
|
9
|
-
const propsMeta =
|
|
8
|
+
const propsMeta = {
|
|
10
9
|
props
|
|
11
|
-
}
|
|
10
|
+
};
|
|
12
11
|
export {
|
|
13
12
|
meta,
|
|
14
13
|
propsMeta
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TextIcon } from "@webstudio-is/icons";
|
|
2
|
-
import { WsComponentPropsMeta } from "./component-type";
|
|
3
2
|
import props from "./__generated__/text-block.props.json";
|
|
4
3
|
const presetStyle = {
|
|
5
4
|
minHeight: {
|
|
@@ -15,9 +14,9 @@ const meta = {
|
|
|
15
14
|
presetStyle,
|
|
16
15
|
children: ["Block of text you can edit"]
|
|
17
16
|
};
|
|
18
|
-
const propsMeta =
|
|
17
|
+
const propsMeta = {
|
|
19
18
|
props
|
|
20
|
-
}
|
|
19
|
+
};
|
|
21
20
|
export {
|
|
22
21
|
meta,
|
|
23
22
|
propsMeta
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/react-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Webstudio JavaScript / TypeScript API",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"mitt": "^3.0.0",
|
|
47
47
|
"nanostores": "^0.7.1",
|
|
48
48
|
"warn-once": "^0.1.1",
|
|
49
|
-
"@webstudio-is/asset-uploader": "^0.
|
|
50
|
-
"@webstudio-is/css-data": "^0.
|
|
51
|
-
"@webstudio-is/generate-arg-types": "^0.
|
|
52
|
-
"@webstudio-is/icons": "^0.
|
|
53
|
-
"@webstudio-is/image": "^0.
|
|
54
|
-
"@webstudio-is/prisma-client": "^0.
|
|
55
|
-
"@webstudio-is/project-build": "^0.
|
|
49
|
+
"@webstudio-is/asset-uploader": "^0.34.0",
|
|
50
|
+
"@webstudio-is/css-data": "^0.34.0",
|
|
51
|
+
"@webstudio-is/generate-arg-types": "^0.34.0",
|
|
52
|
+
"@webstudio-is/icons": "^0.34.0",
|
|
53
|
+
"@webstudio-is/image": "^0.34.0",
|
|
54
|
+
"@webstudio-is/prisma-client": "^0.34.0",
|
|
55
|
+
"@webstudio-is/project-build": "^0.34.0"
|
|
56
56
|
},
|
|
57
57
|
"exports": {
|
|
58
58
|
"import": "./lib/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"build": "build-package",
|
|
73
73
|
"build:args": "generate-arg-types './src/components/*.tsx !./src/**/*.stories.tsx !./src/**/*.ws.tsx' && prettier --write \"**/*.props.json\"",
|
|
74
74
|
"typecheck": "tsc --noEmit",
|
|
75
|
-
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
75
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest --passWithNoTests",
|
|
76
76
|
"lint": "eslint ./src --ext .ts,.tsx --max-warnings 0",
|
|
77
77
|
"checks": "pnpm typecheck && pnpm lint && pnpm test",
|
|
78
78
|
"storybook:run": "start-storybook -p 6006",
|
|
@@ -2,7 +2,7 @@ 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";
|
|
5
|
+
import type { WsComponentPropsMeta } from "../../components/component-type";
|
|
6
6
|
|
|
7
7
|
export const customComponents = {
|
|
8
8
|
Image,
|
|
@@ -11,12 +11,12 @@ export const customComponents = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const customComponentPropsMetas = {
|
|
14
|
-
Image:
|
|
14
|
+
Image: {
|
|
15
15
|
props: {
|
|
16
16
|
...imageProps,
|
|
17
17
|
src: { ...imageProps.src, control: "file-image", name: "Source" },
|
|
18
18
|
},
|
|
19
|
-
}
|
|
19
|
+
} as WsComponentPropsMeta,
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// just for completeness, maybe we add soemthing here later
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BodyIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/body.props.json";
|
|
4
4
|
|
|
5
5
|
const presetStyle = {
|
|
@@ -59,6 +59,6 @@ export const meta: WsComponentMeta = {
|
|
|
59
59
|
presetStyle,
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
export const propsMeta =
|
|
62
|
+
export const propsMeta = {
|
|
63
63
|
props,
|
|
64
|
-
}
|
|
64
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FontBoldIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/bold.props.json";
|
|
4
4
|
|
|
5
5
|
export const meta: WsComponentMeta = {
|
|
@@ -8,6 +8,6 @@ export const meta: WsComponentMeta = {
|
|
|
8
8
|
Icon: FontBoldIcon,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const propsMeta =
|
|
11
|
+
export const propsMeta = {
|
|
12
12
|
props,
|
|
13
|
-
}
|
|
13
|
+
} as WsComponentPropsMeta;
|
package/src/components/box.ws.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SquareIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/box.props.json";
|
|
4
4
|
|
|
5
5
|
const presetStyle = {
|
|
@@ -16,7 +16,7 @@ export const meta: WsComponentMeta = {
|
|
|
16
16
|
presetStyle,
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export const propsMeta =
|
|
19
|
+
export const propsMeta = {
|
|
20
20
|
props,
|
|
21
21
|
initialProps: ["tag"],
|
|
22
|
-
}
|
|
22
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/button.props.json";
|
|
4
4
|
|
|
5
5
|
export const meta: WsComponentMeta = {
|
|
@@ -9,7 +9,7 @@ export const meta: WsComponentMeta = {
|
|
|
9
9
|
children: ["Button text you can edit"],
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export const propsMeta =
|
|
12
|
+
export const propsMeta = {
|
|
13
13
|
props,
|
|
14
14
|
initialProps: ["type"],
|
|
15
|
-
}
|
|
15
|
+
} as WsComponentPropsMeta;
|
|
@@ -6,7 +6,7 @@ import { PropMeta } from "@webstudio-is/generate-arg-types";
|
|
|
6
6
|
|
|
7
7
|
// props are separated from the rest of the meta
|
|
8
8
|
// so they can be exported separately and potentially tree-shaken
|
|
9
|
-
|
|
9
|
+
const WsComponentPropsMeta = z.object({
|
|
10
10
|
props: z.record(PropMeta),
|
|
11
11
|
initialProps: z.array(z.string()).optional(),
|
|
12
12
|
});
|
|
@@ -35,7 +35,7 @@ export type WsComponentMeta = {
|
|
|
35
35
|
children?: Array<string>;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
const WsComponentMeta = z.object({
|
|
39
39
|
type: z.enum([
|
|
40
40
|
"body",
|
|
41
41
|
"container",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/form.props.json";
|
|
4
4
|
|
|
5
5
|
const presetStyle = {
|
|
@@ -21,6 +21,6 @@ export const meta: WsComponentMeta = {
|
|
|
21
21
|
presetStyle,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export const propsMeta =
|
|
24
|
+
export const propsMeta = {
|
|
25
25
|
props,
|
|
26
|
-
}
|
|
26
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HeadingIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/heading.props.json";
|
|
4
4
|
|
|
5
5
|
export const meta: WsComponentMeta = {
|
|
@@ -9,7 +9,7 @@ export const meta: WsComponentMeta = {
|
|
|
9
9
|
children: ["Heading you can edit"],
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export const propsMeta =
|
|
12
|
+
export const propsMeta = {
|
|
13
13
|
props,
|
|
14
14
|
initialProps: ["tag"],
|
|
15
|
-
}
|
|
15
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/image.props.json";
|
|
4
4
|
|
|
5
5
|
const presetStyle = {
|
|
@@ -24,10 +24,10 @@ export const meta: WsComponentMeta = {
|
|
|
24
24
|
presetStyle,
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export const propsMeta =
|
|
27
|
+
export const propsMeta = {
|
|
28
28
|
props: {
|
|
29
29
|
...props,
|
|
30
30
|
src: { ...props.src, control: "file-image", name: "Source" },
|
|
31
31
|
},
|
|
32
32
|
initialProps: ["src", "width", "height", "alt", "loading"],
|
|
33
|
-
}
|
|
33
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/input.props.json";
|
|
4
4
|
|
|
5
5
|
export const meta: WsComponentMeta = {
|
|
@@ -8,6 +8,6 @@ export const meta: WsComponentMeta = {
|
|
|
8
8
|
Icon: InputIcon,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const propsMeta =
|
|
11
|
+
export const propsMeta = {
|
|
12
12
|
props,
|
|
13
|
-
}
|
|
13
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FontItalicIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/italic.props.json";
|
|
4
4
|
|
|
5
5
|
const presetStyle = {
|
|
@@ -16,6 +16,6 @@ export const meta: WsComponentMeta = {
|
|
|
16
16
|
presetStyle,
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export const propsMeta =
|
|
19
|
+
export const propsMeta = {
|
|
20
20
|
props,
|
|
21
|
-
}
|
|
21
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Link2Icon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/link.props.json";
|
|
4
4
|
|
|
5
5
|
const presetStyle = {
|
|
@@ -22,7 +22,7 @@ export const meta: WsComponentMeta = {
|
|
|
22
22
|
children: ["Link text you can edit"],
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
export const propsMeta =
|
|
25
|
+
export const propsMeta = {
|
|
26
26
|
props,
|
|
27
27
|
initialProps: ["href"],
|
|
28
|
-
}
|
|
28
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextAlignLeftIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/paragraph.props.json";
|
|
4
4
|
|
|
5
5
|
export const meta: WsComponentMeta = {
|
|
@@ -9,6 +9,6 @@ export const meta: WsComponentMeta = {
|
|
|
9
9
|
children: ["Pragraph you can edit"],
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export const propsMeta =
|
|
12
|
+
export const propsMeta = {
|
|
13
13
|
props,
|
|
14
|
-
}
|
|
14
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Link2Icon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/rich-text-link.props.json";
|
|
4
4
|
|
|
5
5
|
export const meta: WsComponentMeta = {
|
|
@@ -8,6 +8,6 @@ export const meta: WsComponentMeta = {
|
|
|
8
8
|
Icon: Link2Icon,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const propsMeta =
|
|
11
|
+
export const propsMeta = {
|
|
12
12
|
props,
|
|
13
|
-
}
|
|
13
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BrushIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/span.props.json";
|
|
4
4
|
|
|
5
5
|
export const meta: WsComponentMeta = {
|
|
@@ -8,6 +8,6 @@ export const meta: WsComponentMeta = {
|
|
|
8
8
|
Icon: BrushIcon,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const propsMeta =
|
|
11
|
+
export const propsMeta = {
|
|
12
12
|
props,
|
|
13
|
-
}
|
|
13
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SubscriptIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/subscript.props.json";
|
|
4
4
|
|
|
5
5
|
export const meta: WsComponentMeta = {
|
|
@@ -8,6 +8,6 @@ export const meta: WsComponentMeta = {
|
|
|
8
8
|
Icon: SubscriptIcon,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const propsMeta =
|
|
11
|
+
export const propsMeta = {
|
|
12
12
|
props,
|
|
13
|
-
}
|
|
13
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SuperscriptIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/superscript.props.json";
|
|
4
4
|
|
|
5
5
|
export const meta: WsComponentMeta = {
|
|
@@ -8,6 +8,6 @@ export const meta: WsComponentMeta = {
|
|
|
8
8
|
Icon: SuperscriptIcon,
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const propsMeta =
|
|
11
|
+
export const propsMeta = {
|
|
12
12
|
props,
|
|
13
|
-
}
|
|
13
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextIcon } from "@webstudio-is/icons";
|
|
2
|
-
import {
|
|
2
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-type";
|
|
3
3
|
import props from "./__generated__/text-block.props.json";
|
|
4
4
|
|
|
5
5
|
const presetStyle = {
|
|
@@ -18,6 +18,6 @@ export const meta: WsComponentMeta = {
|
|
|
18
18
|
children: ["Block of text you can edit"],
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export const propsMeta =
|
|
21
|
+
export const propsMeta = {
|
|
22
22
|
props,
|
|
23
|
-
}
|
|
23
|
+
} as WsComponentPropsMeta;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { test } from "@jest/globals";
|
|
2
|
-
import { getComponentNames, getComponentMeta } from "./index";
|
|
3
|
-
import { WsComponentMeta } from "./component-type";
|
|
4
|
-
|
|
5
|
-
test.each(getComponentNames())("validating meta definition of %s", (name) => {
|
|
6
|
-
WsComponentMeta.parse(getComponentMeta(name));
|
|
7
|
-
});
|