@webstudio-is/sdk-components-animation 0.207.0 → 0.209.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/__generated__/animate-text.props.js +13 -6
- package/lib/animate-children.js +9 -9
- package/lib/animate-children.ws.js +9 -5
- package/lib/animate-text.js +7 -7
- package/lib/animate-text.ws.js +17 -10
- package/lib/types/animate-children.d.ts +1 -1
- package/lib/types/animate-text.d.ts +8 -1
- package/package.json +11 -11
- package/lib/shared/consts.js +0 -4
- package/lib/types/shared/consts.d.ts +0 -1
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
const e = {
|
|
2
|
-
charWindow: {
|
|
3
|
-
required: !1,
|
|
4
|
-
control: "number",
|
|
5
|
-
type: "number",
|
|
6
|
-
defaultValue: 5
|
|
7
|
-
},
|
|
8
2
|
easing: {
|
|
9
3
|
required: !1,
|
|
10
4
|
control: "select",
|
|
@@ -22,6 +16,19 @@ const e = {
|
|
|
22
16
|
"easeInOutCubic",
|
|
23
17
|
"easeInOutQuart"
|
|
24
18
|
]
|
|
19
|
+
},
|
|
20
|
+
slidingWindow: {
|
|
21
|
+
required: !1,
|
|
22
|
+
control: "number",
|
|
23
|
+
type: "number",
|
|
24
|
+
defaultValue: 5
|
|
25
|
+
},
|
|
26
|
+
splitBy: {
|
|
27
|
+
required: !1,
|
|
28
|
+
control: "select",
|
|
29
|
+
type: "string",
|
|
30
|
+
defaultValue: "char",
|
|
31
|
+
options: ["char", "space", 'symbol "#"', 'symbol "~"']
|
|
25
32
|
}
|
|
26
33
|
};
|
|
27
34
|
export {
|
package/lib/animate-children.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { animationCanPlayOnCanvasAttribute as o } from "@webstudio-is/react-sdk";
|
|
2
3
|
import { forwardRef as m } from "react";
|
|
3
|
-
import { animationCanPlayOnCanvasProperty as o } from "./shared/consts.js";
|
|
4
4
|
const c = m(
|
|
5
|
-
({ debug:
|
|
5
|
+
({ debug: n = !1, action: t, ...e }, s) => /* @__PURE__ */ r("div", { ref: s, style: { display: "contents" }, ...e })
|
|
6
6
|
), a = "AnimateChildren";
|
|
7
7
|
c.displayName = a;
|
|
8
|
-
const
|
|
9
|
-
onNavigatorUnselect: (
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const i = "@webstudio-is/sdk-components-animation", h = {
|
|
9
|
+
onNavigatorUnselect: (n, t) => {
|
|
10
|
+
t.instancePath.length > 0 && t.instancePath[0].component === `${i}:${a}` && n.setMemoryProp(
|
|
11
|
+
t.instancePath[0],
|
|
12
12
|
o,
|
|
13
13
|
void 0
|
|
14
14
|
);
|
|
15
15
|
},
|
|
16
|
-
onNavigatorSelect: (
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
onNavigatorSelect: (n, t) => {
|
|
17
|
+
t.instancePath.length > 0 && t.instancePath[0].component === `${i}:${a}` && n.setMemoryProp(
|
|
18
|
+
t.instancePath[0],
|
|
19
19
|
o,
|
|
20
20
|
!0
|
|
21
21
|
);
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { SlotComponentIcon as n } from "@webstudio-is/icons/svg";
|
|
2
|
-
const
|
|
2
|
+
const o = {
|
|
3
3
|
category: "general",
|
|
4
4
|
type: "container",
|
|
5
5
|
description: "Animate Children",
|
|
6
6
|
icon: n,
|
|
7
7
|
order: 5,
|
|
8
|
-
label: "Animate Children"
|
|
9
|
-
|
|
8
|
+
label: "Animate Children",
|
|
9
|
+
constraints: {
|
|
10
|
+
relation: "child",
|
|
11
|
+
text: !1
|
|
12
|
+
}
|
|
13
|
+
}, i = {
|
|
10
14
|
props: {
|
|
11
15
|
action: {
|
|
12
16
|
required: !1,
|
|
@@ -18,6 +22,6 @@ const i = {
|
|
|
18
22
|
initialProps: ["action"]
|
|
19
23
|
};
|
|
20
24
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
o as meta,
|
|
26
|
+
i as propsMeta
|
|
23
27
|
};
|
package/lib/animate-text.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
const
|
|
4
|
-
({
|
|
5
|
-
),
|
|
6
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
const a = t(
|
|
4
|
+
({ slidingWindow: o = 5, easing: m = "linear", splitBy: s = "char", ...i }, e) => /* @__PURE__ */ r("div", { ref: e, ...i })
|
|
5
|
+
), n = "AnimateText";
|
|
6
|
+
a.displayName = n;
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
a as AnimateText
|
|
9
9
|
};
|
package/lib/animate-text.ws.js
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import { TextIcon as
|
|
2
|
-
import { props as
|
|
3
|
-
const
|
|
1
|
+
import { TextIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { props as e } from "./__generated__/animate-text.props.js";
|
|
3
|
+
const o = {
|
|
4
4
|
category: "general",
|
|
5
5
|
type: "container",
|
|
6
6
|
description: "Animate Text",
|
|
7
|
-
icon:
|
|
7
|
+
icon: t,
|
|
8
8
|
order: 6,
|
|
9
|
-
label: "Animate Text"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
label: "Animate Text",
|
|
10
|
+
constraints: [
|
|
11
|
+
{ relation: "parent", component: { $eq: "AnimateChildren" } },
|
|
12
|
+
{
|
|
13
|
+
relation: "child",
|
|
14
|
+
text: !1
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}, r = {
|
|
18
|
+
props: e,
|
|
19
|
+
initialProps: ["slidingWindow", "easing", "splitBy"]
|
|
13
20
|
};
|
|
14
21
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
o as meta,
|
|
23
|
+
r as propsMeta
|
|
17
24
|
};
|
|
@@ -10,10 +10,17 @@ declare const easings: {
|
|
|
10
10
|
easeInOutCubic: boolean;
|
|
11
11
|
easeInOutQuart: boolean;
|
|
12
12
|
};
|
|
13
|
+
declare const split: {
|
|
14
|
+
char: boolean;
|
|
15
|
+
space: boolean;
|
|
16
|
+
'symbol "#"': boolean;
|
|
17
|
+
'symbol "~"': boolean;
|
|
18
|
+
};
|
|
13
19
|
type AnimateChildrenProps = {
|
|
14
|
-
|
|
20
|
+
slidingWindow?: number;
|
|
15
21
|
easing?: keyof typeof easings;
|
|
16
22
|
children: React.ReactNode;
|
|
23
|
+
splitBy?: keyof typeof split;
|
|
17
24
|
};
|
|
18
25
|
export declare const AnimateText: import("react").ForwardRefExoticComponent<AnimateChildrenProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
26
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-animation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.209.0",
|
|
4
4
|
"description": "Webstudio components for animation",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"nanostores": "^0.11.3",
|
|
50
50
|
"react-error-boundary": "^5.0.0",
|
|
51
51
|
"shallow-equal": "^3.1.0",
|
|
52
|
-
"@webstudio-is/css-engine": "0.
|
|
53
|
-
"@webstudio-is/
|
|
54
|
-
"@webstudio-is/react-sdk": "0.
|
|
55
|
-
"@webstudio-is/
|
|
52
|
+
"@webstudio-is/css-engine": "0.209.0",
|
|
53
|
+
"@webstudio-is/icons": "0.209.0",
|
|
54
|
+
"@webstudio-is/react-sdk": "0.209.0",
|
|
55
|
+
"@webstudio-is/sdk": "0.209.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/react": "^18.2.70",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
65
65
|
"type-fest": "^4.37.0",
|
|
66
66
|
"vitest": "^3.0.8",
|
|
67
|
-
"zod": "^3.
|
|
68
|
-
"@webstudio-is/css-data": "0.0.0",
|
|
67
|
+
"zod": "^3.24.2",
|
|
69
68
|
"@webstudio-is/design-system": "0.0.0",
|
|
70
|
-
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
71
69
|
"@webstudio-is/sdk-cli": "^0.94.0",
|
|
72
|
-
"@webstudio-is/
|
|
73
|
-
"@webstudio-is/
|
|
74
|
-
"@webstudio-is/
|
|
70
|
+
"@webstudio-is/template": "0.209.0",
|
|
71
|
+
"@webstudio-is/css-data": "0.0.0",
|
|
72
|
+
"@webstudio-is/sdk-components-react": "0.209.0",
|
|
73
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
74
|
+
"@webstudio-is/generate-arg-types": "0.0.0"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "vite build --config ../../vite.sdk-components.config.ts",
|
package/lib/shared/consts.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const animationCanPlayOnCanvasProperty = "data-ws-animation-can-play-on-canvas";
|