Skip to content

Commit 0eea205

Browse files
authored
refactor: merge base and animation props with component metas (#5214)
Related #5211
1 parent 72345fb commit 0eea205

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+136
-483
lines changed

apps/builder/app/canvas/canvas.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ import { wsImageLoader } from "@webstudio-is/image";
88
import { ReactSdkContext } from "@webstudio-is/react-sdk/runtime";
99
import * as baseComponents from "@webstudio-is/sdk-components-react";
1010
import * as baseComponentMetas from "@webstudio-is/sdk-components-react/metas";
11-
import * as baseComponentPropsMetas from "@webstudio-is/sdk-components-react/props";
1211
import { hooks as baseComponentHooks } from "@webstudio-is/sdk-components-react/hooks";
1312
import * as baseComponentTemplates from "@webstudio-is/sdk-components-react/templates";
1413
import * as animationComponents from "@webstudio-is/sdk-components-animation";
1514
import * as animationComponentMetas from "@webstudio-is/sdk-components-animation/metas";
16-
import * as animationComponentPropsMetas from "@webstudio-is/sdk-components-animation/props";
1715
import * as animationTemplates from "@webstudio-is/sdk-components-animation/templates";
1816
import { hooks as animationComponentHooks } from "@webstudio-is/sdk-components-animation/hooks";
1917
import * as radixComponents from "@webstudio-is/sdk-components-react-radix";
@@ -248,7 +246,7 @@ export const Canvas = () => {
248246
registerComponentLibrary({
249247
components: baseComponents,
250248
metas: baseComponentMetas,
251-
propsMetas: baseComponentPropsMetas,
249+
propsMetas: {},
252250
hooks: baseComponentHooks,
253251
templates: baseComponentTemplates,
254252
});
@@ -274,7 +272,7 @@ export const Canvas = () => {
274272
namespace: "@webstudio-is/sdk-components-animation",
275273
components: animationComponents,
276274
metas: animationComponentMetas,
277-
propsMetas: animationComponentPropsMetas,
275+
propsMetas: {},
278276
hooks: animationComponentHooks,
279277
templates: animationTemplates,
280278
});

packages/sdk-components-animation/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
"types": "./lib/types/metas.d.ts",
2525
"import": "./lib/metas.js"
2626
},
27-
"./props": {
28-
"webstudio": "./src/props.ts",
29-
"types": "./lib/types/props.d.ts",
30-
"import": "./lib/props.js"
31-
},
3227
"./hooks": {
3328
"webstudio": "./src/hooks.ts",
3429
"types": "./lib/types/hooks.d.ts",

packages/sdk-components-animation/src/animate-children.ws.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AnimationGroupIcon } from "@webstudio-is/icons/svg";
2-
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
2+
import type { WsComponentMeta } from "@webstudio-is/sdk";
33
import { animation } from "./shared/meta";
44

55
export const meta: WsComponentMeta = {
@@ -17,9 +17,7 @@ export const meta: WsComponentMeta = {
1717
animation.VideoAnimation,
1818
],
1919
},
20-
};
21-
22-
export const propsMeta: WsComponentPropsMeta = {
20+
initialProps: ["action"],
2321
props: {
2422
action: {
2523
required: false,
@@ -28,5 +26,4 @@ export const propsMeta: WsComponentPropsMeta = {
2826
description: "Animation Action",
2927
},
3028
},
31-
initialProps: ["action"],
3229
};
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { TextAnimationIcon } from "@webstudio-is/icons/svg";
2-
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
2+
import type { WsComponentMeta } from "@webstudio-is/sdk";
33
import { div } from "@webstudio-is/sdk/normalize.css";
44
import { props } from "./__generated__/animate-text.props";
55

@@ -14,12 +14,7 @@ export const meta: WsComponentMeta = {
1414
category: "none",
1515
children: ["instance"],
1616
},
17-
presetStyle: {
18-
div,
19-
},
20-
};
21-
22-
export const propsMeta: WsComponentPropsMeta = {
23-
props,
17+
presetStyle: { div },
2418
initialProps: ["slidingWindow", "easing", "splitBy"],
19+
props,
2520
};

packages/sdk-components-animation/src/props.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { StaggerAnimationIcon } from "@webstudio-is/icons/svg";
2-
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
2+
import type { WsComponentMeta } from "@webstudio-is/sdk";
33
import { div } from "@webstudio-is/sdk/normalize.css";
44
import { props } from "./__generated__/stagger-animation.props";
55

@@ -14,12 +14,7 @@ export const meta: WsComponentMeta = {
1414
category: "none",
1515
children: ["instance"],
1616
},
17-
presetStyle: {
18-
div,
19-
},
20-
};
21-
22-
export const propsMeta: WsComponentPropsMeta = {
23-
props,
17+
presetStyle: { div },
2418
initialProps: ["slidingWindow", "easing"],
19+
props,
2520
};
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { PlayIcon } from "@webstudio-is/icons/svg";
2-
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
2+
import type { WsComponentMeta } from "@webstudio-is/sdk";
33
import { props } from "./__generated__/video-animation.props";
44
import { div } from "@webstudio-is/sdk/normalize.css";
55

@@ -10,12 +10,7 @@ export const meta: WsComponentMeta = {
1010
category: "none",
1111
children: ["instance"],
1212
},
13-
presetStyle: {
14-
div,
15-
},
16-
};
17-
18-
export const propsMeta: WsComponentPropsMeta = {
13+
presetStyle: { div },
1914
props,
2015
initialProps: ["timeline"],
2116
};

packages/sdk-components-react-radix/src/props.ts

Whitespace-only changes.

packages/sdk-components-react-remix/src/props.ts

Whitespace-only changes.

packages/sdk-components-react-router/src/props.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)