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.

fix; imports/exports

Andras Bacsai921387f78e47
diff --git a/apps/designer/app/designer/features/breakpoints/breakpoints.tsx b/apps/designer/app/designer/features/breakpoints/breakpoints.tsx
index e5201a0ec9..99437785bc 100644
--- a/apps/designer/app/designer/features/breakpoints/breakpoints.tsx
+++ b/apps/designer/app/designer/features/breakpoints/breakpoints.tsx
@@ -25,7 +25,7 @@ import {
} from "./use-subscribe-shortcuts";
import { ConfirmationDialog } from "./confirmation-dialog";
import { useBreakpoints } from "~/shared/nano-states";
-import { utils } from "@webstudio-is/project/index.server";
+import { utils } from "@webstudio-is/project";
declare module "~/shared/pubsub" {
export interface PubsubMap {
diff --git a/apps/designer/app/designer/features/breakpoints/use-subscribe-breakpoints.ts b/apps/designer/app/designer/features/breakpoints/use-subscribe-breakpoints.ts
index d4349cb38c..e989d856ef 100644
--- a/apps/designer/app/designer/features/breakpoints/use-subscribe-breakpoints.ts
+++ b/apps/designer/app/designer/features/breakpoints/use-subscribe-breakpoints.ts
@@ -2,7 +2,7 @@ import { useEffect } from "react";
import { useSubscribe } from "~/shared/pubsub";
import { useSelectedBreakpoint } from "~/designer/shared/nano-states";
import { useBreakpoints } from "~/shared/nano-states";
-import { utils } from "@webstudio-is/project/index.server";
+import { utils } from "@webstudio-is/project";
export const useSubscribeBreakpoints = () => {
const [breakpoints, setBreakpoints] = useBreakpoints();
const [selectedBreakpoint, setSelectedBreakpoint] = useSelectedBreakpoint();
diff --git a/apps/designer/app/designer/features/breakpoints/use-subscribe-shortcuts.ts b/apps/designer/app/designer/features/breakpoints/use-subscribe-shortcuts.ts
index 5c7c7c9a82..8849e6a5ad 100644
--- a/apps/designer/app/designer/features/breakpoints/use-subscribe-shortcuts.ts
+++ b/apps/designer/app/designer/features/breakpoints/use-subscribe-shortcuts.ts
@@ -2,7 +2,7 @@ import { useSubscribe } from "~/shared/pubsub";
import { useBreakpoints } from "~/shared/nano-states";
import { useZoom, useSelectedBreakpoint } from "../../shared/nano-states";
import { minZoom } from "./zoom-setting";
-import { utils } from "@webstudio-is/project/index.server";
+import { utils } from "@webstudio-is/project";
export const useSubscribeSelectBreakpointFromShortcut = () => {
const [breakpoints] = useBreakpoints();
diff --git a/apps/designer/app/designer/features/breakpoints/width-setting.tsx b/apps/designer/app/designer/features/breakpoints/width-setting.tsx
index fbdc194126..4d69bab986 100644
--- a/apps/designer/app/designer/features/breakpoints/width-setting.tsx
+++ b/apps/designer/app/designer/features/breakpoints/width-setting.tsx
@@ -5,7 +5,7 @@ import {
} from "~/designer/shared/nano-states";
import { __DEPRECATED__Text, Flex, Slider } from "@webstudio-is/design-system";
import { useBreakpoints, useIsPreviewMode } from "~/shared/nano-states";
-import { utils } from "@webstudio-is/project/index.server";
+import { utils } from "@webstudio-is/project";
// Doesn't make sense to allow resizing the canvas lower/higher than this.
export const minWidth = 50;
diff --git a/packages/project/index.server.ts b/packages/project/index.server.ts
index e910bb060c..ad6dde9958 100644
--- a/packages/project/index.server.ts
+++ b/packages/project/index.server.ts
@@ -1 +1 @@
-export * from "./src/index";
+export * from "./src/index.server";
diff --git a/packages/project/src/db/types.ts b/packages/project/src/db/types.ts
index 1dd7e6d83d..0ae05d8b90 100644
--- a/packages/project/src/db/types.ts
+++ b/packages/project/src/db/types.ts
@@ -1,5 +1,5 @@
import { z } from "zod";
-import { Project as BaseProject } from "@webstudio-is/prisma-client";
+import { type Project as BaseProject } from "@webstudio-is/prisma-client";
import type { Asset } from "@webstudio-is/asset-uploader";
const TreeHistorySchema = z.array(z.string());
diff --git a/packages/project/src/index.server.ts b/packages/project/src/index.server.ts
new file mode 100644
index 0000000000..a89f5bdf70
--- /dev/null
+++ b/packages/project/src/index.server.ts
@@ -0,0 +1,2 @@
+import * as dbFunctions from "./db";
+export const db = dbFunctions;
diff --git a/packages/project/src/index.ts b/packages/project/src/index.ts
index 77721d7ddc..0f425bcc05 100644
--- a/packages/project/src/index.ts
+++ b/packages/project/src/index.ts
@@ -1,8 +1,5 @@
-import * as dbFunctions from "./db";
import * as breakpointsUtils from "./shared/breakpoints";
import * as treeUtils from "./shared/tree-utils";
export const utils = { breakpoints: breakpointsUtils, tree: treeUtils };
-export const db = dbFunctions;
-
export * from "./db/types";