@webstudio-is/sdk-components-react 0.192.0 → 0.194.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/body.ws.js +8 -9
- package/lib/image.js +29 -31
- package/lib/list-item.ws.js +8 -5
- package/lib/vimeo-play-button.js +11 -8
- package/package.json +8 -7
package/lib/body.ws.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BodyIcon as o } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as t } from "@webstudio-is/react-sdk";
|
|
3
3
|
import { body as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
-
import { props as
|
|
5
|
-
const
|
|
4
|
+
import { props as r } from "./__generated__/body.props.js";
|
|
5
|
+
const a = {
|
|
6
6
|
body: [
|
|
7
7
|
...e,
|
|
8
8
|
{
|
|
@@ -14,17 +14,16 @@ const r = {
|
|
|
14
14
|
value: { type: "keyword", value: "grayscale" }
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
|
-
},
|
|
17
|
+
}, m = {
|
|
18
18
|
type: "container",
|
|
19
19
|
icon: o,
|
|
20
20
|
states: t,
|
|
21
|
-
presetStyle:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
props: a,
|
|
21
|
+
presetStyle: a
|
|
22
|
+
}, y = {
|
|
23
|
+
props: r,
|
|
25
24
|
initialProps: ["id", "className"]
|
|
26
25
|
};
|
|
27
26
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
m as meta,
|
|
28
|
+
y as propsMeta
|
|
30
29
|
};
|
package/lib/image.js
CHANGED
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Image as
|
|
4
|
-
import { ReactSdkContext as
|
|
5
|
-
const
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l, useContext as u } from "react";
|
|
3
|
+
import { Image as v } from "@webstudio-is/image";
|
|
4
|
+
import { ReactSdkContext as x } from "@webstudio-is/react-sdk/runtime";
|
|
5
|
+
const y = l(
|
|
6
6
|
({
|
|
7
|
-
loading:
|
|
8
|
-
width:
|
|
9
|
-
height:
|
|
10
|
-
optimize:
|
|
11
|
-
decoding:
|
|
7
|
+
loading: a = "lazy",
|
|
8
|
+
width: e,
|
|
9
|
+
height: r,
|
|
10
|
+
optimize: m = !0,
|
|
11
|
+
decoding: c,
|
|
12
12
|
// @todo: it's a hack made for the builder and should't be in the runtime at all.
|
|
13
|
-
$webstudio$canvasOnly$assetId:
|
|
14
|
-
...
|
|
15
|
-
},
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return e.startsWith(m) && (i = e.slice(m.length)), /* @__PURE__ */ u(
|
|
21
|
-
y,
|
|
13
|
+
$webstudio$canvasOnly$assetId: d,
|
|
14
|
+
...s
|
|
15
|
+
}, f) => {
|
|
16
|
+
const o = String(s.src ?? ""), { imageLoader: i, renderer: N } = u(x);
|
|
17
|
+
let n = c, t = o;
|
|
18
|
+
return N === "canvas" && (a = "eager", n = "sync", t = d ?? o, e !== void 0 && r !== void 0 && Number.isNaN(e) && Number.isNaN(r) && (m = !1, e = void 0, r = void 0)), /* @__PURE__ */ g(
|
|
19
|
+
v,
|
|
22
20
|
{
|
|
23
|
-
loading:
|
|
24
|
-
decoding:
|
|
25
|
-
optimize:
|
|
26
|
-
width:
|
|
27
|
-
height:
|
|
28
|
-
...
|
|
29
|
-
loader:
|
|
30
|
-
src:
|
|
31
|
-
ref:
|
|
21
|
+
loading: a,
|
|
22
|
+
decoding: n,
|
|
23
|
+
optimize: m,
|
|
24
|
+
width: e,
|
|
25
|
+
height: r,
|
|
26
|
+
...s,
|
|
27
|
+
loader: i,
|
|
28
|
+
src: o,
|
|
29
|
+
ref: f
|
|
32
30
|
},
|
|
33
|
-
|
|
31
|
+
t
|
|
34
32
|
);
|
|
35
33
|
}
|
|
36
34
|
);
|
|
37
|
-
|
|
35
|
+
y.displayName = "Image";
|
|
38
36
|
export {
|
|
39
|
-
|
|
37
|
+
y as Image
|
|
40
38
|
};
|
package/lib/list-item.ws.js
CHANGED
|
@@ -4,11 +4,14 @@ import { li as o } from "@webstudio-is/sdk/normalize.css";
|
|
|
4
4
|
import { props as i } from "./__generated__/list-item.props.js";
|
|
5
5
|
const n = {
|
|
6
6
|
li: o
|
|
7
|
-
},
|
|
7
|
+
}, c = {
|
|
8
8
|
category: "general",
|
|
9
9
|
type: "container",
|
|
10
10
|
constraints: {
|
|
11
|
-
relation
|
|
11
|
+
// cannot use parent relation here
|
|
12
|
+
// because list item can be put inside of collection or slot
|
|
13
|
+
// perhaps can be eventually fixed with tag matchers
|
|
14
|
+
relation: "ancestor",
|
|
12
15
|
component: { $eq: "List" }
|
|
13
16
|
},
|
|
14
17
|
description: "Adds a new item to an existing list.",
|
|
@@ -29,11 +32,11 @@ const n = {
|
|
|
29
32
|
]
|
|
30
33
|
}
|
|
31
34
|
]
|
|
32
|
-
},
|
|
35
|
+
}, m = {
|
|
33
36
|
props: i,
|
|
34
37
|
initialProps: ["id", "className"]
|
|
35
38
|
};
|
|
36
39
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
c as meta,
|
|
41
|
+
m as propsMeta
|
|
39
42
|
};
|
package/lib/vimeo-play-button.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { VimeoContext as
|
|
4
|
-
import { Button as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as r, useContext as a, useCallback as m } from "react";
|
|
3
|
+
import { VimeoContext as s } from "./vimeo.js";
|
|
4
|
+
import { Button as l } from "./button.js";
|
|
5
|
+
import c from "await-interaction-response";
|
|
6
|
+
const f = r(
|
|
7
|
+
(o, i) => {
|
|
8
|
+
const t = a(s), n = m(async () => {
|
|
9
|
+
await c(), t.onInitPlayer();
|
|
10
|
+
}, [t]);
|
|
8
11
|
if (t.status === "initial")
|
|
9
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ e(l, { ...o, onClick: n, ref: i });
|
|
10
13
|
}
|
|
11
14
|
);
|
|
12
15
|
f.displayName = "VimeoPlayButton";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.194.0",
|
|
4
4
|
"description": "Webstudio default library for react",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -42,10 +42,11 @@
|
|
|
42
42
|
"@react-aria/utils": "^3.25.3",
|
|
43
43
|
"colord": "^2.9.3",
|
|
44
44
|
"micromark": "^4.0.0",
|
|
45
|
-
"
|
|
46
|
-
"@webstudio-is/
|
|
47
|
-
"@webstudio-is/
|
|
48
|
-
"@webstudio-is/
|
|
45
|
+
"await-interaction-response": "^0.0.2",
|
|
46
|
+
"@webstudio-is/icons": "0.194.0",
|
|
47
|
+
"@webstudio-is/image": "0.194.0",
|
|
48
|
+
"@webstudio-is/sdk": "0.194.0",
|
|
49
|
+
"@webstudio-is/react-sdk": "0.194.0"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@testing-library/react": "^14.2.2",
|
|
@@ -54,8 +55,8 @@
|
|
|
54
55
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
55
56
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
56
57
|
"vitest": "^2.1.8",
|
|
57
|
-
"@webstudio-is/
|
|
58
|
-
"@webstudio-is/
|
|
58
|
+
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
59
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
59
60
|
},
|
|
60
61
|
"scripts": {
|
|
61
62
|
"build": "vite build --config ../../vite.sdk-components.config.ts",
|