Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

remove unused stuff

Oleg Isonen95a5e5429271
diff --git a/apps/designer/app/canvas/features/wrapper-component/index.ts b/apps/designer/app/canvas/features/wrapper-component/index.ts
index 750ef14699..5547e9088a 100644
--- a/apps/designer/app/canvas/features/wrapper-component/index.ts
+++ b/apps/designer/app/canvas/features/wrapper-component/index.ts
@@ -1,2 +1 @@
export { WrapperComponentDev } from "./wrapper-component";
-export * from "./wrapper-component-css";
diff --git a/apps/designer/app/canvas/features/wrapper-component/wrapper-component-css.tsx b/apps/designer/app/canvas/features/wrapper-component/wrapper-component-css.tsx
deleted file mode 100644
index d71b8a3346..0000000000
--- a/apps/designer/app/canvas/features/wrapper-component/wrapper-component-css.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import { globalCss } from "@webstudio-is/design-system";
-
-const voidElements =
- "area, base, br, col, embed, hr, img, input, link, meta, source, track, wbr";
-
-// Helper styles on for canvas in design mode
-const styles = {
- "[data-ws-component]": {
- // When double clicking into an element to edit text, it should not select the word.
- userSelect: "none",
- },
- [`[data-ws-component]:not(${voidElements}):not(body):empty`]: {
- outline: "1px dashed #555",
- outlineOffset: -1,
- paddingTop: 50,
- paddingRight: 50,
- },
- "[data-ws-component][contenteditable], [data-ws-component]:focus": {
- outline: 0,
- },
- "[data-ws-component][contenteditable]": {
- boxShadow: "0 0 0px 4px rgb(36 150 255 / 20%)",
- },
- // Text Editor wraps each line into a p, so we need to make sure there is no jump between regular rendering and editing
- "[data-ws-component][contenteditable] p": {
- margin: 0,
- },
-};
-
-// @todo rewrite to use css engine and remove stitches from canvas entirely
-export const wrapperComponentGlobalStyles = globalCss(styles);
diff --git a/apps/designer/app/canvas/features/wrapper-component/wrapper-component.tsx b/apps/designer/app/canvas/features/wrapper-component/wrapper-component.tsx
index 846675c5f7..0ee5cbca50 100644
--- a/apps/designer/app/canvas/features/wrapper-component/wrapper-component.tsx
+++ b/apps/designer/app/canvas/features/wrapper-component/wrapper-component.tsx
@@ -7,7 +7,6 @@ import {
components,
type Instance,
type OnChangeChildren,
- type Breakpoint,
} from "@webstudio-is/react-sdk";
import { useCssRules } from "@webstudio-is/css-engine";
import { useTextEditingInstanceId } from "~/shared/nano-states";
@@ -40,14 +39,12 @@ const ContentEditable = ({
type WrapperComponentDevProps = {
instance: Instance;
- breakpoints: Array<Breakpoint>;
children: Array<JSX.Element | string>;
onChangeChildren?: OnChangeChildren;
};
export const WrapperComponentDev = ({
instance,
- breakpoints,
children,
onChangeChildren,
...rest
diff --git a/packages/react-sdk/src/tree/wrapper-component.tsx b/packages/react-sdk/src/tree/wrapper-component.tsx
index 7f0cd718f1..42ed1e02a9 100644
--- a/packages/react-sdk/src/tree/wrapper-component.tsx
+++ b/packages/react-sdk/src/tree/wrapper-component.tsx
@@ -28,14 +28,12 @@ export const renderWrapperComponentChildren = (
type WrapperComponentProps = {
instance: Instance;
- breakpoints: Array<Breakpoint>;
children: Array<JSX.Element | string>;
onChangeChildren?: OnChangeChildren;
};
export const WrapperComponent = ({
instance,
- breakpoints,
onChangeChildren, // prevent it from passing to sdk component
children,
...rest