Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions apps/builder/app/canvas/canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import { wsImageLoader } from "@webstudio-is/image";
import { ReactSdkContext } from "@webstudio-is/react-sdk/runtime";
import * as baseComponents from "@webstudio-is/sdk-components-react";
import * as baseComponentMetas from "@webstudio-is/sdk-components-react/metas";
import * as baseComponentPropsMetas from "@webstudio-is/sdk-components-react/props";
import { hooks as baseComponentHooks } from "@webstudio-is/sdk-components-react/hooks";
import * as baseComponentTemplates from "@webstudio-is/sdk-components-react/templates";
import * as animationComponents from "@webstudio-is/sdk-components-animation";
import * as animationComponentMetas from "@webstudio-is/sdk-components-animation/metas";
import * as animationComponentPropsMetas from "@webstudio-is/sdk-components-animation/props";
import * as animationTemplates from "@webstudio-is/sdk-components-animation/templates";
import { hooks as animationComponentHooks } from "@webstudio-is/sdk-components-animation/hooks";
import * as radixComponents from "@webstudio-is/sdk-components-react-radix";
Expand Down Expand Up @@ -248,7 +246,7 @@ export const Canvas = () => {
registerComponentLibrary({
components: baseComponents,
metas: baseComponentMetas,
propsMetas: baseComponentPropsMetas,
propsMetas: {},
hooks: baseComponentHooks,
templates: baseComponentTemplates,
});
Expand All @@ -274,7 +272,7 @@ export const Canvas = () => {
namespace: "@webstudio-is/sdk-components-animation",
components: animationComponents,
metas: animationComponentMetas,
propsMetas: animationComponentPropsMetas,
propsMetas: {},
hooks: animationComponentHooks,
templates: animationTemplates,
});
Expand Down
5 changes: 0 additions & 5 deletions packages/sdk-components-animation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
"types": "./lib/types/metas.d.ts",
"import": "./lib/metas.js"
},
"./props": {
"webstudio": "./src/props.ts",
"types": "./lib/types/props.d.ts",
"import": "./lib/props.js"
},
"./hooks": {
"webstudio": "./src/hooks.ts",
"types": "./lib/types/hooks.d.ts",
Expand Down
7 changes: 2 additions & 5 deletions packages/sdk-components-animation/src/animate-children.ws.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AnimationGroupIcon } from "@webstudio-is/icons/svg";
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
import type { WsComponentMeta } from "@webstudio-is/sdk";
import { animation } from "./shared/meta";

export const meta: WsComponentMeta = {
Expand All @@ -17,9 +17,7 @@ export const meta: WsComponentMeta = {
animation.VideoAnimation,
],
},
};

export const propsMeta: WsComponentPropsMeta = {
initialProps: ["action"],
props: {
action: {
required: false,
Expand All @@ -28,5 +26,4 @@ export const propsMeta: WsComponentPropsMeta = {
description: "Animation Action",
},
},
initialProps: ["action"],
};
11 changes: 3 additions & 8 deletions packages/sdk-components-animation/src/animate-text.ws.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TextAnimationIcon } from "@webstudio-is/icons/svg";
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
import type { WsComponentMeta } from "@webstudio-is/sdk";
import { div } from "@webstudio-is/sdk/normalize.css";
import { props } from "./__generated__/animate-text.props";

Expand All @@ -14,12 +14,7 @@ export const meta: WsComponentMeta = {
category: "none",
children: ["instance"],
},
presetStyle: {
div,
},
};

export const propsMeta: WsComponentPropsMeta = {
props,
presetStyle: { div },
initialProps: ["slidingWindow", "easing", "splitBy"],
props,
};
4 changes: 0 additions & 4 deletions packages/sdk-components-animation/src/props.ts

This file was deleted.

11 changes: 3 additions & 8 deletions packages/sdk-components-animation/src/stagger-animation.ws.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { StaggerAnimationIcon } from "@webstudio-is/icons/svg";
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
import type { WsComponentMeta } from "@webstudio-is/sdk";
import { div } from "@webstudio-is/sdk/normalize.css";
import { props } from "./__generated__/stagger-animation.props";

Expand All @@ -14,12 +14,7 @@ export const meta: WsComponentMeta = {
category: "none",
children: ["instance"],
},
presetStyle: {
div,
},
};

export const propsMeta: WsComponentPropsMeta = {
props,
presetStyle: { div },
initialProps: ["slidingWindow", "easing"],
props,
};
9 changes: 2 additions & 7 deletions packages/sdk-components-animation/src/video-animation.ws.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PlayIcon } from "@webstudio-is/icons/svg";
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
import type { WsComponentMeta } from "@webstudio-is/sdk";
import { props } from "./__generated__/video-animation.props";
import { div } from "@webstudio-is/sdk/normalize.css";

Expand All @@ -10,12 +10,7 @@ export const meta: WsComponentMeta = {
category: "none",
children: ["instance"],
},
presetStyle: {
div,
},
};

export const propsMeta: WsComponentPropsMeta = {
presetStyle: { div },
props,
initialProps: ["timeline"],
};
Empty file.
Empty file.
Empty file.
5 changes: 0 additions & 5 deletions packages/sdk-components-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
"types": "./lib/types/metas.d.ts",
"import": "./lib/metas.js"
},
"./props": {
"webstudio": "./src/props.ts",
"types": "./lib/types/props.d.ts",
"import": "./lib/props.js"
},
"./hooks": {
"webstudio": "./src/hooks.ts",
"types": "./lib/types/hooks.d.ts",
Expand Down
6 changes: 1 addition & 5 deletions packages/sdk-components-react/src/blockquote.ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
defaultStates,
type PresetStyle,
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import type { defaultTag } from "./blockquote";
import { props } from "./__generated__/blockquote.props";
Expand Down Expand Up @@ -64,9 +63,6 @@ export const meta: WsComponentMeta = {
icon: BlockquoteIcon,
states: defaultStates,
presetStyle,
};

export const propsMeta: WsComponentPropsMeta = {
initialProps: ["id", "class", "cite"],
props,
initialProps: ["id", "className", "cite"],
};
6 changes: 1 addition & 5 deletions packages/sdk-components-react/src/body.ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
defaultStates,
type PresetStyle,
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import { body } from "@webstudio-is/sdk/normalize.css";
import { props } from "./__generated__/body.props";
Expand All @@ -27,9 +26,6 @@ export const meta: WsComponentMeta = {
icon: BodyIcon,
states: defaultStates,
presetStyle,
};

export const propsMeta: WsComponentPropsMeta = {
initialProps: ["id", "class"],
props,
initialProps: ["id", "className"],
};
19 changes: 3 additions & 16 deletions packages/sdk-components-react/src/bold.ws.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
import { BoldIcon } from "@webstudio-is/icons/svg";
import {
defaultStates,
type PresetStyle,
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import { defaultStates, type WsComponentMeta } from "@webstudio-is/sdk";
import { b } from "@webstudio-is/sdk/normalize.css";
import { props } from "./__generated__/bold.props";
import type { defaultTag } from "./bold";

const presetStyle = {
b,
} satisfies PresetStyle<typeof defaultTag>;

export const meta: WsComponentMeta = {
label: "Bold Text",
icon: BoldIcon,
states: defaultStates,
presetStyle,
};

export const propsMeta: WsComponentPropsMeta = {
presetStyle: { b },
initialProps: ["id", "class"],
props,
initialProps: ["id", "className"],
};
11 changes: 2 additions & 9 deletions packages/sdk-components-react/src/box.ws.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { BoxIcon } from "@webstudio-is/icons/svg";
import {
defaultStates,
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import { defaultStates, type WsComponentMeta } from "@webstudio-is/sdk";
import {
div,
address,
Expand Down Expand Up @@ -37,9 +33,7 @@ export const meta: WsComponentMeta = {
section,
},
order: 0,
};

export const propsMeta: WsComponentPropsMeta = {
initialProps: ["tag", "id", "class"],
props: {
...props,
tag: {
Expand All @@ -61,5 +55,4 @@ export const propsMeta: WsComponentPropsMeta = {
],
},
},
initialProps: ["tag", "id", "className"],
};
6 changes: 1 addition & 5 deletions packages/sdk-components-react/src/button.ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
defaultStates,
type PresetStyle,
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import { button } from "@webstudio-is/sdk/normalize.css";
import { props } from "./__generated__/button.props";
Expand All @@ -21,9 +20,6 @@ export const meta: WsComponentMeta = {
{ selector: ":disabled", label: "Disabled" },
{ selector: ":enabled", label: "Enabled" },
],
};

export const propsMeta: WsComponentPropsMeta = {
initialProps: ["id", "class", "type", "aria-label"],
props,
initialProps: ["id", "className", "type", "aria-label"],
};
6 changes: 1 addition & 5 deletions packages/sdk-components-react/src/checkbox.ws.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { CheckboxCheckedIcon } from "@webstudio-is/icons/svg";
import {
type WsComponentMeta,
type WsComponentPropsMeta,
type PresetStyle,
defaultStates,
} from "@webstudio-is/sdk";
Expand Down Expand Up @@ -32,9 +31,6 @@ export const meta: WsComponentMeta = {
{ selector: ":read-only", label: "Read Only" },
{ selector: ":read-write", label: "Read Write" },
],
};

export const propsMeta: WsComponentPropsMeta = {
initialProps: ["id", "class", "name", "value", "required", "checked"],
props,
initialProps: ["id", "className", "name", "value", "required", "checked"],
};
6 changes: 1 addition & 5 deletions packages/sdk-components-react/src/code-text.ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
defaultStates,
type PresetStyle,
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import { code } from "@webstudio-is/sdk/normalize.css";
import type { defaultTag } from "./code-text";
Expand Down Expand Up @@ -51,9 +50,7 @@ export const meta: WsComponentMeta = {
states: defaultStates,
presetStyle,
order: 5,
};

export const propsMeta: WsComponentPropsMeta = {
initialProps: ["id", "class", "lang", "code"],
props: {
...props,
code: {
Expand All @@ -62,5 +59,4 @@ export const propsMeta: WsComponentPropsMeta = {
type: "string",
},
},
initialProps: ["id", "className", "lang", "code"],
};
6 changes: 1 addition & 5 deletions packages/sdk-components-react/src/form.ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
defaultStates,
type PresetStyle,
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import { form } from "@webstudio-is/sdk/normalize.css";
import type { defaultTag } from "./form";
Expand All @@ -24,9 +23,6 @@ export const meta: WsComponentMeta = {
states: defaultStates,
presetStyle,
order: 0,
};

export const propsMeta: WsComponentPropsMeta = {
initialProps: ["id", "class", "action"],
props,
initialProps: ["id", "className", "action"],
};
6 changes: 1 addition & 5 deletions packages/sdk-components-react/src/fragment.ws.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
import type { WsComponentMeta } from "@webstudio-is/sdk";

export const meta: WsComponentMeta = {
icon: "",
};

export const propsMeta: WsComponentPropsMeta = {
props: {},
};
10 changes: 2 additions & 8 deletions packages/sdk-components-react/src/head-link.ws.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { ResourceIcon } from "@webstudio-is/icons/svg";
import {
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import type { WsComponentMeta } from "@webstudio-is/sdk";
import { props } from "./__generated__/head-link.props";

export const meta: WsComponentMeta = {
Expand All @@ -11,9 +8,6 @@ export const meta: WsComponentMeta = {
category: "none",
children: [],
},
};

export const propsMeta: WsComponentPropsMeta = {
props,
initialProps: ["rel", "hrefLang", "href", "type", "as"],
props,
};
10 changes: 2 additions & 8 deletions packages/sdk-components-react/src/head-meta.ws.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { WindowInfoIcon } from "@webstudio-is/icons/svg";
import {
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import type { WsComponentMeta } from "@webstudio-is/sdk";
import { props } from "./__generated__/head-meta.props";

export const meta: WsComponentMeta = {
Expand All @@ -11,9 +8,6 @@ export const meta: WsComponentMeta = {
category: "none",
children: [],
},
};

export const propsMeta: WsComponentPropsMeta = {
props,
initialProps: ["name", "property", "content"],
props,
};
9 changes: 1 addition & 8 deletions packages/sdk-components-react/src/head-slot.ws.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { HeaderIcon } from "@webstudio-is/icons/svg";
import {
type WsComponentMeta,
type WsComponentPropsMeta,
} from "@webstudio-is/sdk";
import type { WsComponentMeta } from "@webstudio-is/sdk";
import { props } from "./__generated__/head-slot.props";

export const meta: WsComponentMeta = {
Expand All @@ -12,9 +9,5 @@ export const meta: WsComponentMeta = {
category: "instance",
children: ["HeadLink", "HeadMeta", "HeadTitle"],
},
};

export const propsMeta: WsComponentPropsMeta = {
props,
initialProps: [],
};
Loading