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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ type Props = ComponentProps<"form"> & {
3
3
  encType?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
4
4
  /** Use this property to reveal the Success and Error states on the canvas so they can be styled. The Initial state is displayed when the page first opens. The Success and Error states are displayed depending on whether the Form submits successfully or unsuccessfully. */
5
5
  state?: "initial" | "success" | "error";
6
+ onStateChange: (state: "initial" | "success" | "error") => void;
6
7
  };
7
8
  export declare const WebhookForm: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLFormElement>>;
8
9
  export {};
@@ -1,5 +1,5 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { SpinnerIcon as r, PlayIcon as a } from "@webstudio-is/icons/svg";
2
+ import { SpinnerIcon as r, PlayIcon as n } from "@webstudio-is/icons/svg";
3
3
  import { $ as e, css as o } from "@webstudio-is/template";
4
4
  const p = {
5
5
  category: "media",
@@ -20,7 +20,7 @@ const p = {
20
20
  "ws:style": o`
21
21
  position: absolute;
22
22
  object-fit: cover;
23
- object-position: cover;
23
+ object-position: center;
24
24
  width: 100%;
25
25
  height: 100%;
26
26
  border-radius: 20px;
@@ -79,7 +79,7 @@ const p = {
79
79
  height: 60px;
80
80
  `,
81
81
  "aria-hidden": !0,
82
- children: /* @__PURE__ */ t(e.HtmlEmbed, { "ws:label": "Play SVG", code: a })
82
+ children: /* @__PURE__ */ t(e.HtmlEmbed, { "ws:label": "Play SVG", code: n })
83
83
  }
84
84
  )
85
85
  }
@@ -1,6 +1,6 @@
1
- import { jsxs as i, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import { SpinnerIcon as r, PlayIcon as l } from "@webstudio-is/icons/svg";
3
- import { $ as e, css as t } from "@webstudio-is/template";
3
+ import { $ as e, css as o } from "@webstudio-is/template";
4
4
  const p = {
5
5
  label: "YouTube",
6
6
  category: "media",
@@ -10,34 +10,34 @@ const p = {
10
10
  e.YouTube,
11
11
  {
12
12
  "ws:label": "YouTube",
13
- "ws:style": t`
13
+ "ws:style": o`
14
14
  position: relative;
15
15
  aspect-ratio: 640/360;
16
16
  width: 100%;
17
17
  `,
18
18
  children: [
19
- /* @__PURE__ */ o(
19
+ /* @__PURE__ */ t(
20
20
  e.VimeoPreviewImage,
21
21
  {
22
22
  "ws:label": "Preview Image",
23
- "ws:style": t`
23
+ "ws:style": o`
24
24
  position: absolute;
25
25
  object-fit: cover;
26
- object-position: cover;
26
+ object-position: center;
27
27
  width: 100%;
28
28
  height: 100%;
29
29
  border-radius: 20px;
30
30
  `,
31
- alt: "Vimeo video preview image",
31
+ alt: "YouTube video preview image",
32
32
  sizes: "100vw",
33
33
  optimize: !0
34
34
  }
35
35
  ),
36
- /* @__PURE__ */ o(
36
+ /* @__PURE__ */ t(
37
37
  e.VimeoSpinner,
38
38
  {
39
39
  "ws:label": "Spinner",
40
- "ws:style": t`
40
+ "ws:style": o`
41
41
  position: absolute;
42
42
  top: 50%;
43
43
  left: 50%;
@@ -46,14 +46,14 @@ const p = {
46
46
  margin-top: -35px;
47
47
  margin-left: -35px;
48
48
  `,
49
- children: /* @__PURE__ */ o(e.HtmlEmbed, { "ws:label": "Spinner SVG", code: r })
49
+ children: /* @__PURE__ */ t(e.HtmlEmbed, { "ws:label": "Spinner SVG", code: r })
50
50
  }
51
51
  ),
52
- /* @__PURE__ */ o(
52
+ /* @__PURE__ */ t(
53
53
  e.VimeoPlayButton,
54
54
  {
55
55
  "ws:label": "Play Button",
56
- "ws:style": t`
56
+ "ws:style": o`
57
57
  position: absolute;
58
58
  width: 140px;
59
59
  height: 80px;
@@ -74,16 +74,16 @@ const p = {
74
74
  }
75
75
  `,
76
76
  "aria-label": "Play button",
77
- children: /* @__PURE__ */ o(
77
+ children: /* @__PURE__ */ t(
78
78
  e.Box,
79
79
  {
80
80
  "ws:label": "Play Icon",
81
- "ws:style": t`
81
+ "ws:style": o`
82
82
  width: 60px;
83
83
  height: 60px;
84
84
  `,
85
85
  "aria-hidden": !0,
86
- children: /* @__PURE__ */ o(e.HtmlEmbed, { "ws:label": "Play SVG", code: l })
86
+ children: /* @__PURE__ */ t(e.HtmlEmbed, { "ws:label": "Play SVG", code: l })
87
87
  }
88
88
  )
89
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk-components-react",
3
- "version": "0.197.0",
3
+ "version": "0.198.0",
4
4
  "description": "Webstudio default library for react",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -49,10 +49,10 @@
49
49
  "colord": "^2.9.3",
50
50
  "micromark": "^4.0.1",
51
51
  "micromark-extension-gfm-table": "^2.1.0",
52
- "@webstudio-is/icons": "0.197.0",
53
- "@webstudio-is/react-sdk": "0.197.0",
54
- "@webstudio-is/image": "0.197.0",
55
- "@webstudio-is/sdk": "0.197.0"
52
+ "@webstudio-is/icons": "0.198.0",
53
+ "@webstudio-is/react-sdk": "0.198.0",
54
+ "@webstudio-is/sdk": "0.198.0",
55
+ "@webstudio-is/image": "0.198.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@testing-library/react": "^14.2.2",
@@ -62,12 +62,14 @@
62
62
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
63
63
  "vitest": "^2.1.8",
64
64
  "@webstudio-is/generate-arg-types": "0.0.0",
65
- "@webstudio-is/template": "0.197.0",
65
+ "@webstudio-is/sdk-cli": "0.94.0",
66
+ "@webstudio-is/template": "0.198.0",
66
67
  "@webstudio-is/tsconfig": "1.0.7"
67
68
  },
68
69
  "scripts": {
69
70
  "build": "vite build --config ../../vite.sdk-components.config.ts",
70
71
  "build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.test.{ts,tsx} !./src/*.ws.ts !./src/*.ws.ts !./src/*.template.tsx' && prettier --write \"**/*.props.ts\"",
72
+ "build:stories": "webstudio-sdk generate-stories && prettier --write \"src/__generated__/*.stories.tsx\"",
71
73
  "dts": "tsc --project tsconfig.dts.json",
72
74
  "test": "vitest run",
73
75
  "typecheck": "tsc"