From 7ad1bc9e2be43d2eb96201270364fb9e4fbdbee9 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 14 Jul 2022 11:18:16 +0200 Subject: [PATCH] Rename sdk to react-sdk --- apps/designer/app/canvas/canvas.tsx | 2 +- .../features/wrapper-component/text-editor/editor.tsx | 2 +- .../wrapper-component/text-editor/example-text-editor.tsx | 2 +- .../wrapper-component/text-editor/nodes/node-instance.tsx | 2 +- .../text-editor/plugins/plugin-instance.tsx | 2 +- .../text-editor/plugins/plugin-on-change.tsx | 2 +- .../text-editor/plugins/plugin-toolbar-connector.tsx | 2 +- .../text-editor/utils/to-lexical-nodes.tsx | 2 +- .../wrapper-component/text-editor/utils/to-updates.ts | 2 +- .../app/canvas/features/wrapper-component/use-css.tsx | 2 +- .../app/canvas/features/wrapper-component/use-draggable.ts | 2 +- .../canvas/features/wrapper-component/wrapper-component.tsx | 2 +- apps/designer/app/canvas/shared/breakpoints.ts | 2 +- apps/designer/app/canvas/shared/copy-paste.ts | 2 +- apps/designer/app/canvas/shared/immerhin.ts | 2 +- apps/designer/app/canvas/shared/instance.ts | 2 +- apps/designer/app/canvas/shared/nano-states.ts | 2 +- apps/designer/app/canvas/shared/props.ts | 2 +- apps/designer/app/canvas/shared/style.ts | 2 +- apps/designer/app/canvas/shared/sync/queue.ts | 2 +- apps/designer/app/canvas/shared/use-drag-drop-handlers.ts | 2 +- apps/designer/app/canvas/shared/use-publish-scroll-state.ts | 2 +- apps/designer/app/canvas/shared/use-shortcuts.ts | 2 +- .../app/canvas/shared/use-track-selected-element.ts | 2 +- apps/designer/app/critical-css.ts | 2 +- apps/designer/app/designer/designer.tsx | 6 +++++- .../app/designer/features/breadcrumbs/breadcrumbs.tsx | 2 +- .../designer/features/breakpoints/breakpoints-editor.tsx | 2 +- .../app/designer/features/breakpoints/breakpoints.tsx | 6 +++++- .../designer/features/breakpoints/confirmation-dialog.tsx | 2 +- apps/designer/app/designer/features/breakpoints/preview.tsx | 2 +- .../app/designer/features/breakpoints/trigger-button.tsx | 2 +- .../features/breakpoints/use-subscribe-breakpoints.ts | 2 +- .../features/breakpoints/use-subscribe-shortcuts.ts | 2 +- .../features/breakpoints/use-update-canvas-width.ts | 2 +- apps/designer/app/designer/features/inspector/inspector.tsx | 2 +- apps/designer/app/designer/features/props-panel/control.tsx | 2 +- .../designer/features/props-panel/props-panel.stories.tsx | 2 +- .../app/designer/features/props-panel/props-panel.tsx | 2 +- .../designer/features/props-panel/use-props-logic.test.ts | 2 +- .../app/designer/features/props-panel/use-props-logic.ts | 4 ++-- .../sidebar-left/panels/components/component-thumb.tsx | 2 +- .../features/sidebar-left/panels/components/components.tsx | 2 +- .../sidebar-left/panels/components/custom-drag-layer.tsx | 2 +- .../app/designer/features/sidebar-left/panels/tree.tsx | 2 +- .../app/designer/features/sidebar-left/sidebar-left.tsx | 2 +- .../app/designer/features/style-panel/dependencies.ts | 2 +- .../designer/features/style-panel/get-inherited-style.ts | 4 ++-- .../designer/features/style-panel/lib/spacing-widget.tsx | 2 +- .../style-panel/lib/utils/get-css-rule-for-breakpoint.ts | 2 +- .../style-panel/lib/utils/use-is-from-current-breakpoint.ts | 2 +- .../app/designer/features/style-panel/parse-css-value.ts | 4 ++-- .../app/designer/features/style-panel/render-property.tsx | 2 +- .../designer/app/designer/features/style-panel/settings.tsx | 2 +- .../app/designer/features/style-panel/style-panel.tsx | 2 +- .../app/designer/features/style-panel/use-style-data.ts | 2 +- apps/designer/app/designer/features/topbar/menu/menu.tsx | 2 +- apps/designer/app/designer/features/topbar/preview.tsx | 2 +- apps/designer/app/designer/features/topbar/publish.tsx | 2 +- apps/designer/app/designer/features/topbar/share.tsx | 2 +- apps/designer/app/designer/features/topbar/topbar.tsx | 2 +- .../app/designer/features/tree-preview/tree-preview.tsx | 2 +- .../features/workspace/canvas-tools/canvas-tools.tsx | 2 +- .../canvas-tools/hooks/use-subscribe-editing-instance-id.ts | 2 +- .../canvas-tools/hooks/use-subscribe-instance-rect.ts | 2 +- .../canvas-tools/hooks/use-subscribe-selection-rect.ts | 2 +- .../features/workspace/canvas-tools/outline/label.tsx | 2 +- .../workspace/canvas-tools/text-toolbar/text-toolbar.tsx | 2 +- apps/designer/app/designer/features/workspace/workspace.tsx | 2 +- .../designer/app/designer/shared/breakpoints/will-render.ts | 2 +- .../app/designer/shared/client-settings/settings.ts | 2 +- .../designer/shared/instance/use-selected-instance-path.ts | 2 +- apps/designer/app/designer/shared/nano-states/index.ts | 2 +- .../app/designer/shared/shortcuts/use-publish-shortcuts.ts | 2 +- apps/designer/app/designer/shared/tree/tree.tsx | 2 +- apps/designer/app/routes/designer/$id.tsx | 2 +- apps/designer/app/routes/index.tsx | 2 +- apps/designer/app/routes/preview/$projectId.tsx | 2 +- apps/designer/app/routes/rest/breakpoints.$projectId.ts | 2 +- apps/designer/app/routes/rest/patch.ts | 2 +- apps/designer/app/routes/rest/project/clone.$domain.ts | 2 +- apps/designer/app/routes/rest/props.$projectId.ts | 2 +- apps/designer/app/routes/rest/tree.$projectId.ts | 2 +- apps/designer/app/shared/breakpoints/sort.test.ts | 5 ++++- apps/designer/app/shared/canvas-components/draggable.ts | 2 +- apps/designer/app/shared/canvas-components/instance-data.ts | 2 +- .../app/shared/canvas-components/primitives/bold.tsx | 2 +- .../app/shared/canvas-components/primitives/box.tsx | 2 +- .../app/shared/canvas-components/primitives/button.tsx | 2 +- .../app/shared/canvas-components/primitives/form.tsx | 2 +- .../app/shared/canvas-components/primitives/heading.tsx | 2 +- .../app/shared/canvas-components/primitives/input.tsx | 2 +- .../app/shared/canvas-components/primitives/italic.tsx | 2 +- .../app/shared/canvas-components/primitives/link.tsx | 2 +- .../app/shared/canvas-components/primitives/paragraph.tsx | 2 +- .../app/shared/canvas-components/primitives/text-block.tsx | 2 +- .../shared/css-utils/delete-css-rules-by-breakpoint.test.ts | 2 +- .../app/shared/css-utils/delete-css-rules-by-breakpoint.ts | 2 +- apps/designer/app/shared/db/breakpoints.server.ts | 2 +- apps/designer/app/shared/db/canvas.server.ts | 2 +- apps/designer/app/shared/db/project.server.ts | 2 +- apps/designer/app/shared/db/props.server.ts | 2 +- apps/designer/app/shared/db/tree.server.ts | 2 +- apps/designer/app/shared/documents/canvas.tsx | 2 +- apps/designer/app/shared/documents/designer.tsx | 2 +- apps/designer/app/shared/error/error-message.tsx | 2 +- apps/designer/app/shared/nano-states/nano-states.ts | 2 +- .../app/shared/nano-states/use-subscribe-scroll-state.ts | 2 +- apps/designer/app/shared/props-utils/clone-props.ts | 2 +- apps/designer/app/shared/props-utils/delete-prop.test.ts | 2 +- apps/designer/app/shared/props-utils/delete-prop.ts | 2 +- apps/designer/app/shared/props-utils/update-props.test.ts | 5 ++++- apps/designer/app/shared/props-utils/update-props.ts | 5 ++++- apps/designer/app/shared/style-panel-configs/configs.ts | 2 +- apps/designer/app/shared/style-panel-configs/types.ts | 2 +- apps/designer/app/shared/tree-utils/clone-instance.test.ts | 2 +- apps/designer/app/shared/tree-utils/clone-instance.ts | 2 +- apps/designer/app/shared/tree-utils/create-instance.ts | 2 +- apps/designer/app/shared/tree-utils/delete-instance.test.ts | 2 +- apps/designer/app/shared/tree-utils/delete-instance.ts | 2 +- .../shared/tree-utils/find-closest-sibling-instance.test.ts | 2 +- .../app/shared/tree-utils/find-closest-sibling-instance.ts | 2 +- apps/designer/app/shared/tree-utils/find-instance.ts | 2 +- .../app/shared/tree-utils/find-parent-instance.test.ts | 2 +- apps/designer/app/shared/tree-utils/find-parent-instance.ts | 2 +- .../app/shared/tree-utils/get-instance-path.test.ts | 2 +- apps/designer/app/shared/tree-utils/get-instance-path.ts | 2 +- apps/designer/app/shared/tree-utils/index.ts | 5 ++++- apps/designer/app/shared/tree-utils/insert-instance.test.ts | 2 +- apps/designer/app/shared/tree-utils/insert-instance.ts | 2 +- apps/designer/app/shared/tree-utils/populate.ts | 2 +- .../designer/app/shared/tree-utils/set-instance-children.ts | 4 ++-- apps/designer/app/shared/tree-utils/set-instance-style.ts | 2 +- apps/designer/package.json | 4 ++-- packages/{webstudio-sdk => webstudio-react-sdk}/.gitignore | 0 .../.storybook/main.js | 0 .../.storybook/preview.js | 0 packages/{webstudio-sdk => webstudio-react-sdk}/LICENSE | 0 packages/{webstudio-sdk => webstudio-react-sdk}/README.md | 0 .../bin/generate-arg-types.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/bin/mdn-data.ts | 0 .../bin/popularity-index.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/jest.config.js | 0 .../{webstudio-sdk => webstudio-react-sdk}/package.json | 3 +-- .../prisma/schema.prisma | 0 .../src/arg-types/utils.ts | 0 .../src/components/bold.props.json | 0 .../src/components/bold.stories.tsx | 0 .../src/components/bold.tsx | 0 .../src/components/box.props.json | 0 .../src/components/box.stories.tsx | 0 .../src/components/box.tsx | 0 .../src/components/button.props.json | 0 .../src/components/button.stories.tsx | 0 .../src/components/button.tsx | 0 .../src/components/form.props.json | 0 .../src/components/form.stories.tsx | 0 .../src/components/form.tsx | 0 .../src/components/heading.props.json | 0 .../src/components/heading.stories.tsx | 0 .../src/components/heading.tsx | 0 .../src/components/index.ts | 0 .../src/components/input.props.json | 0 .../src/components/input.stories.tsx | 0 .../src/components/input.tsx | 0 .../src/components/italic.props.json | 0 .../src/components/italic.stories.tsx | 0 .../src/components/italic.tsx | 0 .../src/components/link.props.json | 0 .../src/components/link.stories.tsx | 0 .../src/components/link.tsx | 0 .../src/components/meta.ts | 0 .../src/components/paragraph.props.json | 0 .../src/components/paragraph.stories.tsx | 0 .../src/components/paragraph.tsx | 0 .../src/components/text-block.props.json | 0 .../src/components/text-block.stories.tsx | 0 .../src/components/text-block.tsx | 0 .../src/css/breakpoints.ts | 0 .../src/css/categories.ts | 0 .../src/css/get-browser-style.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/src/css/index.ts | 0 .../src/css/keyword-values.ts | 0 .../src/css/properties.ts | 0 .../src/css/schema.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/src/css/types.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/src/css/units.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/src/db/index.ts | 0 .../src/db/instance.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/src/db/types.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/src/index.ts | 0 .../src/prisma.server.ts | 0 .../src/pubsub/index.ts | 0 .../src/pubsub/publish.ts | 0 .../src/pubsub/subscribe.ts | 0 .../src/stitches/critical-css.tsx | 0 .../src/stitches/css.ts | 0 .../src/stitches/index.ts | 0 .../src/stitches/to-css.test.ts | 0 .../src/stitches/to-css.ts | 0 .../src/tree/create-elements-tree.tsx | 0 .../src/tree/index.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/src/tree/root.ts | 0 .../src/tree/wrapper-component.tsx | 0 .../src/user-props/all-user-props.ts | 0 .../src/user-props/index.ts | 0 .../src/user-props/schema.ts | 0 .../src/user-props/types.ts | 0 .../src/user-props/use-user-props.ts | 0 .../{webstudio-sdk => webstudio-react-sdk}/tsconfig.json | 0 210 files changed, 160 insertions(+), 141 deletions(-) rename packages/{webstudio-sdk => webstudio-react-sdk}/.gitignore (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/.storybook/main.js (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/.storybook/preview.js (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/LICENSE (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/README.md (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/bin/generate-arg-types.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/bin/mdn-data.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/bin/popularity-index.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/jest.config.js (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/package.json (96%) rename packages/{webstudio-sdk => webstudio-react-sdk}/prisma/schema.prisma (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/arg-types/utils.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/bold.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/bold.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/bold.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/box.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/box.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/box.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/button.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/button.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/button.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/form.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/form.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/form.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/heading.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/heading.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/heading.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/index.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/input.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/input.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/input.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/italic.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/italic.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/italic.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/link.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/link.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/link.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/meta.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/paragraph.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/paragraph.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/paragraph.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/text-block.props.json (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/text-block.stories.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/components/text-block.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/css/breakpoints.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/css/categories.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/css/get-browser-style.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/css/index.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/css/keyword-values.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/css/properties.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/css/schema.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/css/types.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/css/units.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/db/index.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/db/instance.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/db/types.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/index.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/prisma.server.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/pubsub/index.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/pubsub/publish.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/pubsub/subscribe.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/stitches/critical-css.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/stitches/css.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/stitches/index.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/stitches/to-css.test.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/stitches/to-css.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/tree/create-elements-tree.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/tree/index.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/tree/root.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/tree/wrapper-component.tsx (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/user-props/all-user-props.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/user-props/index.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/user-props/schema.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/user-props/types.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/src/user-props/use-user-props.ts (100%) rename packages/{webstudio-sdk => webstudio-react-sdk}/tsconfig.json (100%) diff --git a/apps/designer/app/canvas/canvas.tsx b/apps/designer/app/canvas/canvas.tsx index 54698f3a67..51184b827e 100644 --- a/apps/designer/app/canvas/canvas.tsx +++ b/apps/designer/app/canvas/canvas.tsx @@ -11,7 +11,7 @@ import { WrapperComponent, globalStyles, useSubscribe, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { createElementsTree, setInstanceChildrenMutable, diff --git a/apps/designer/app/canvas/features/wrapper-component/text-editor/editor.tsx b/apps/designer/app/canvas/features/wrapper-component/text-editor/editor.tsx index 307ac56461..13b4bee56c 100644 --- a/apps/designer/app/canvas/features/wrapper-component/text-editor/editor.tsx +++ b/apps/designer/app/canvas/features/wrapper-component/text-editor/editor.tsx @@ -1,4 +1,4 @@ -import { type ChildrenUpdates, type Instance } from "@webstudio-is/sdk"; +import { type ChildrenUpdates, type Instance } from "@webstudio-is/react-sdk"; import { RichTextPlugin, HistoryPlugin } from "./lexical"; import { InstancePlugin } from "./plugins/plugin-instance"; import { ToolbarConnectorPlugin } from "./plugins/plugin-toolbar-connector"; diff --git a/apps/designer/app/canvas/features/wrapper-component/text-editor/example-text-editor.tsx b/apps/designer/app/canvas/features/wrapper-component/text-editor/example-text-editor.tsx index bacd6b430a..dd11ae6984 100644 --- a/apps/designer/app/canvas/features/wrapper-component/text-editor/example-text-editor.tsx +++ b/apps/designer/app/canvas/features/wrapper-component/text-editor/example-text-editor.tsx @@ -3,7 +3,7 @@ import { publish, useAllUserProps, type Instance, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { createInstance } from "~/shared/tree-utils"; import { Box, Button } from "~/shared/design-system"; import { LexicalComposer, ContentEditable } from "./lexical"; diff --git a/apps/designer/app/canvas/features/wrapper-component/text-editor/nodes/node-instance.tsx b/apps/designer/app/canvas/features/wrapper-component/text-editor/nodes/node-instance.tsx index ccf8d77c80..36eeb229f9 100644 --- a/apps/designer/app/canvas/features/wrapper-component/text-editor/nodes/node-instance.tsx +++ b/apps/designer/app/canvas/features/wrapper-component/text-editor/nodes/node-instance.tsx @@ -1,5 +1,5 @@ import { render } from "react-dom"; -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { type EditorConfig, type SerializedTextNode, diff --git a/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-instance.tsx b/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-instance.tsx index aa01decb64..9b3857f056 100644 --- a/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-instance.tsx +++ b/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-instance.tsx @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import { useSubscribe, type Instance } from "@webstudio-is/sdk"; +import { useSubscribe, type Instance } from "@webstudio-is/react-sdk"; import { $createInstanceNode, InstanceNode } from "../nodes/node-instance"; import { createCommand, diff --git a/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-on-change.tsx b/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-on-change.tsx index 84bbe25c86..a4426d566d 100644 --- a/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-on-change.tsx +++ b/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-on-change.tsx @@ -1,4 +1,4 @@ -import { type ChildrenUpdates } from "@webstudio-is/sdk"; +import { type ChildrenUpdates } from "@webstudio-is/react-sdk"; import { useState } from "react"; import { useDebounce } from "react-use"; import { diff --git a/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-toolbar-connector.tsx b/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-toolbar-connector.tsx index 43290ddbe7..9e25af4341 100644 --- a/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-toolbar-connector.tsx +++ b/apps/designer/app/canvas/features/wrapper-component/text-editor/plugins/plugin-toolbar-connector.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef } from "react"; -import { publish } from "@webstudio-is/sdk"; +import { publish } from "@webstudio-is/react-sdk"; import { $isRangeSelection, diff --git a/apps/designer/app/canvas/features/wrapper-component/text-editor/utils/to-lexical-nodes.tsx b/apps/designer/app/canvas/features/wrapper-component/text-editor/utils/to-lexical-nodes.tsx index 5eccc17277..3733257ba2 100644 --- a/apps/designer/app/canvas/features/wrapper-component/text-editor/utils/to-lexical-nodes.tsx +++ b/apps/designer/app/canvas/features/wrapper-component/text-editor/utils/to-lexical-nodes.tsx @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { $createInstanceNode } from "../nodes/node-instance"; import { $createTextNode, diff --git a/apps/designer/app/canvas/features/wrapper-component/text-editor/utils/to-updates.ts b/apps/designer/app/canvas/features/wrapper-component/text-editor/utils/to-updates.ts index 5d9f40a5d2..bab585d8fb 100644 --- a/apps/designer/app/canvas/features/wrapper-component/text-editor/utils/to-updates.ts +++ b/apps/designer/app/canvas/features/wrapper-component/text-editor/utils/to-updates.ts @@ -1,4 +1,4 @@ -import { type ChildrenUpdates } from "@webstudio-is/sdk"; +import { type ChildrenUpdates } from "@webstudio-is/react-sdk"; import { type SerializedTextNode, type SerializedElementNode, diff --git a/apps/designer/app/canvas/features/wrapper-component/use-css.tsx b/apps/designer/app/canvas/features/wrapper-component/use-css.tsx index 5d1f4bf898..6ef597e021 100644 --- a/apps/designer/app/canvas/features/wrapper-component/use-css.tsx +++ b/apps/designer/app/canvas/features/wrapper-component/use-css.tsx @@ -5,7 +5,7 @@ import { type CSS, useSubscribe, toValue, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { type StyleUpdates } from "~/shared/canvas-components"; type UseCssProps = { diff --git a/apps/designer/app/canvas/features/wrapper-component/use-draggable.ts b/apps/designer/app/canvas/features/wrapper-component/use-draggable.ts index 640570e43b..edc06b3d85 100644 --- a/apps/designer/app/canvas/features/wrapper-component/use-draggable.ts +++ b/apps/designer/app/canvas/features/wrapper-component/use-draggable.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useRef } from "react"; import { useDrag } from "react-dnd"; -import { type Instance, publish } from "@webstudio-is/sdk"; +import { type Instance, publish } from "@webstudio-is/react-sdk"; import { type DragData } from "~/shared/canvas-components"; //import { usePointerOutline } from "~/canvas/hooks"; 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 bb54f0d132..b73f7c6262 100644 --- a/apps/designer/app/canvas/features/wrapper-component/wrapper-component.tsx +++ b/apps/designer/app/canvas/features/wrapper-component/wrapper-component.tsx @@ -6,7 +6,7 @@ import { toCss, useUserProps, renderWrapperComponentChildren, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { primitives } from "~/shared/canvas-components"; import { useBreakpoints, useTextEditingInstanceId } from "~/shared/nano-states"; import { useCss } from "./use-css"; diff --git a/apps/designer/app/canvas/shared/breakpoints.ts b/apps/designer/app/canvas/shared/breakpoints.ts index 48f337a5a2..6194233984 100644 --- a/apps/designer/app/canvas/shared/breakpoints.ts +++ b/apps/designer/app/canvas/shared/breakpoints.ts @@ -5,7 +5,7 @@ import { useSubscribe, setBreakpoints, publish, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { deleteCssRulesByBreakpoint } from "~/shared/css-utils"; import { breakpointsContainer, diff --git a/apps/designer/app/canvas/shared/copy-paste.ts b/apps/designer/app/canvas/shared/copy-paste.ts index 170bb9ad78..f3ac30c9d0 100644 --- a/apps/designer/app/canvas/shared/copy-paste.ts +++ b/apps/designer/app/canvas/shared/copy-paste.ts @@ -3,7 +3,7 @@ import { type Instance, allUserPropsContainer, publish, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { selectedInstanceContainer } from "./nano-states"; import { cloneInstance } from "~/shared/tree-utils"; import { cloneProps } from "~/shared/props-utils"; diff --git a/apps/designer/app/canvas/shared/immerhin.ts b/apps/designer/app/canvas/shared/immerhin.ts index 5a10fca37b..da576cdbdb 100644 --- a/apps/designer/app/canvas/shared/immerhin.ts +++ b/apps/designer/app/canvas/shared/immerhin.ts @@ -1,4 +1,4 @@ -import { allUserPropsContainer } from "@webstudio-is/sdk"; +import { allUserPropsContainer } from "@webstudio-is/react-sdk"; import store from "immerhin"; import { rootInstanceContainer, diff --git a/apps/designer/app/canvas/shared/instance.ts b/apps/designer/app/canvas/shared/instance.ts index 974a51bddc..50f4e9ecd8 100644 --- a/apps/designer/app/canvas/shared/instance.ts +++ b/apps/designer/app/canvas/shared/instance.ts @@ -9,7 +9,7 @@ import { useAllUserProps, useSubscribe, publish, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { deleteInstanceMutable, populateInstance, diff --git a/apps/designer/app/canvas/shared/nano-states.ts b/apps/designer/app/canvas/shared/nano-states.ts index d41ec81289..3e627733d0 100644 --- a/apps/designer/app/canvas/shared/nano-states.ts +++ b/apps/designer/app/canvas/shared/nano-states.ts @@ -1,5 +1,5 @@ import { createValueContainer, useValue } from "react-nano-state"; -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { type DropData } from "~/shared/canvas-components"; const dropDataContainer = createValueContainer(); diff --git a/apps/designer/app/canvas/shared/props.ts b/apps/designer/app/canvas/shared/props.ts index e3ca91a2ad..1d1fd6e926 100644 --- a/apps/designer/app/canvas/shared/props.ts +++ b/apps/designer/app/canvas/shared/props.ts @@ -3,7 +3,7 @@ import { useSubscribe, allUserPropsContainer, DeleteProp, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import store from "immerhin"; import { updateAllUserPropsMutable, diff --git a/apps/designer/app/canvas/shared/style.ts b/apps/designer/app/canvas/shared/style.ts index a402079bff..5fe49e1da4 100644 --- a/apps/designer/app/canvas/shared/style.ts +++ b/apps/designer/app/canvas/shared/style.ts @@ -1,5 +1,5 @@ import store from "immerhin"; -import { useSubscribe } from "@webstudio-is/sdk"; +import { useSubscribe } from "@webstudio-is/react-sdk"; import { type StyleUpdates } from "~/shared/canvas-components"; import { setInstanceStyleMutable } from "~/shared/tree-utils"; import { useSelectedInstance } from "./nano-states"; diff --git a/apps/designer/app/canvas/shared/sync/queue.ts b/apps/designer/app/canvas/shared/sync/queue.ts index 87ceb8c2af..b39b94e1b7 100644 --- a/apps/designer/app/canvas/shared/sync/queue.ts +++ b/apps/designer/app/canvas/shared/sync/queue.ts @@ -1,5 +1,5 @@ import { type SyncStatus } from "~/shared/sync"; -import { publish } from "@webstudio-is/sdk"; +import { publish } from "@webstudio-is/react-sdk"; // @todo because of limitation with nested models and saving tree as a Json type // we load that entire Json to manipulate and if a second request happens before the first one has written diff --git a/apps/designer/app/canvas/shared/use-drag-drop-handlers.ts b/apps/designer/app/canvas/shared/use-drag-drop-handlers.ts index a7eaa1e1f4..a6d3939f70 100644 --- a/apps/designer/app/canvas/shared/use-drag-drop-handlers.ts +++ b/apps/designer/app/canvas/shared/use-drag-drop-handlers.ts @@ -1,5 +1,5 @@ import { useState } from "react"; -import { publish, useSubscribe } from "@webstudio-is/sdk"; +import { publish, useSubscribe } from "@webstudio-is/react-sdk"; import { type DragData, type DropData } from "~/shared/canvas-components"; import { findInstanceById } from "~/shared/tree-utils"; import { diff --git a/apps/designer/app/canvas/shared/use-publish-scroll-state.ts b/apps/designer/app/canvas/shared/use-publish-scroll-state.ts index 2100719285..74da482fe9 100644 --- a/apps/designer/app/canvas/shared/use-publish-scroll-state.ts +++ b/apps/designer/app/canvas/shared/use-publish-scroll-state.ts @@ -1,4 +1,4 @@ -import { publish } from "@webstudio-is/sdk"; +import { publish } from "@webstudio-is/react-sdk"; import { useScrollState } from "~/shared/dom-hooks"; export const usePublishScrollState = () => { diff --git a/apps/designer/app/canvas/shared/use-shortcuts.ts b/apps/designer/app/canvas/shared/use-shortcuts.ts index 3dda3eb38b..d1a9049258 100644 --- a/apps/designer/app/canvas/shared/use-shortcuts.ts +++ b/apps/designer/app/canvas/shared/use-shortcuts.ts @@ -1,6 +1,6 @@ import { useHotkeys } from "react-hotkeys-hook"; import store from "immerhin"; -import { type Instance, publish, useSubscribe } from "@webstudio-is/sdk"; +import { type Instance, publish, useSubscribe } from "@webstudio-is/react-sdk"; import { shortcuts, options } from "~/shared/shortcuts"; import { useSelectedInstance } from "./nano-states"; import { copy, paste } from "./copy-paste"; diff --git a/apps/designer/app/canvas/shared/use-track-selected-element.ts b/apps/designer/app/canvas/shared/use-track-selected-element.ts index 036b7acbbf..12c4c8e0d4 100644 --- a/apps/designer/app/canvas/shared/use-track-selected-element.ts +++ b/apps/designer/app/canvas/shared/use-track-selected-element.ts @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef } from "react"; -import { type Instance, publish, useSubscribe } from "@webstudio-is/sdk"; +import { type Instance, publish, useSubscribe } from "@webstudio-is/react-sdk"; import { useSelectedElement, useSelectedInstance } from "./nano-states"; import { useRootInstance, diff --git a/apps/designer/app/critical-css.ts b/apps/designer/app/critical-css.ts index 06e22d2d86..5d068dc5d4 100644 --- a/apps/designer/app/critical-css.ts +++ b/apps/designer/app/critical-css.ts @@ -1,7 +1,7 @@ import { insertCriticalCss as insert, getCssText as getCanvasCssText, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { getCssText as getDesignerCssText } from "~/shared/design-system"; import config from "./config"; diff --git a/apps/designer/app/designer/designer.tsx b/apps/designer/app/designer/designer.tsx index 9be7dbb5e3..69fc597be3 100644 --- a/apps/designer/app/designer/designer.tsx +++ b/apps/designer/app/designer/designer.tsx @@ -1,7 +1,11 @@ import { useCallback, useState } from "react"; import { DndProvider } from "react-dnd"; import { HTML5Backend } from "react-dnd-html5-backend"; -import { type Project, useSubscribe, usePublish } from "@webstudio-is/sdk"; +import { + type Project, + useSubscribe, + usePublish, +} from "@webstudio-is/react-sdk"; import type { Config } from "~/config"; import type { HoveredInstanceData, diff --git a/apps/designer/app/designer/features/breadcrumbs/breadcrumbs.tsx b/apps/designer/app/designer/features/breadcrumbs/breadcrumbs.tsx index 16e4fb1dd2..efd7c69f30 100644 --- a/apps/designer/app/designer/features/breadcrumbs/breadcrumbs.tsx +++ b/apps/designer/app/designer/features/breadcrumbs/breadcrumbs.tsx @@ -1,7 +1,7 @@ import { ChevronRightIcon } from "~/shared/icons"; import { Button, Flex, Text, darkTheme } from "~/shared/design-system"; import { useSelectedInstancePath } from "../../shared/instance/use-selected-instance-path"; -import { type Publish, type Instance } from "@webstudio-is/sdk"; +import { type Publish, type Instance } from "@webstudio-is/react-sdk"; import { useSelectedInstanceData } from "~/designer/shared/nano-states"; type BreadcrumbProps = { diff --git a/apps/designer/app/designer/features/breakpoints/breakpoints-editor.tsx b/apps/designer/app/designer/features/breakpoints/breakpoints-editor.tsx index b96feb2e6d..4f40c40b30 100644 --- a/apps/designer/app/designer/features/breakpoints/breakpoints-editor.tsx +++ b/apps/designer/app/designer/features/breakpoints/breakpoints-editor.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import useDebounce from "react-use/lib/useDebounce"; -import { type Breakpoint, type Publish } from "@webstudio-is/sdk"; +import { type Breakpoint, type Publish } from "@webstudio-is/react-sdk"; import { Button, TextField, Flex, Text } from "~/shared/design-system"; import { PlusIcon, TrashIcon } from "~/shared/icons"; import ObjectId from "bson-objectid"; diff --git a/apps/designer/app/designer/features/breakpoints/breakpoints.tsx b/apps/designer/app/designer/features/breakpoints/breakpoints.tsx index a3c657f709..47120e9f4e 100644 --- a/apps/designer/app/designer/features/breakpoints/breakpoints.tsx +++ b/apps/designer/app/designer/features/breakpoints/breakpoints.tsx @@ -1,5 +1,9 @@ import { useEffect, useState } from "react"; -import { useSubscribe, type Breakpoint, type Publish } from "@webstudio-is/sdk"; +import { + useSubscribe, + type Breakpoint, + type Publish, +} from "@webstudio-is/react-sdk"; import { DropdownMenu, DropdownMenuContent, diff --git a/apps/designer/app/designer/features/breakpoints/confirmation-dialog.tsx b/apps/designer/app/designer/features/breakpoints/confirmation-dialog.tsx index f80d5198f8..11554c9332 100644 --- a/apps/designer/app/designer/features/breakpoints/confirmation-dialog.tsx +++ b/apps/designer/app/designer/features/breakpoints/confirmation-dialog.tsx @@ -1,4 +1,4 @@ -import { type Breakpoint } from "@webstudio-is/sdk"; +import { type Breakpoint } from "@webstudio-is/react-sdk"; import { Button, Flex, Text } from "~/shared/design-system"; type ConfirmationDialogProps = { diff --git a/apps/designer/app/designer/features/breakpoints/preview.tsx b/apps/designer/app/designer/features/breakpoints/preview.tsx index 675cb36885..558792e460 100644 --- a/apps/designer/app/designer/features/breakpoints/preview.tsx +++ b/apps/designer/app/designer/features/breakpoints/preview.tsx @@ -1,4 +1,4 @@ -import { type Breakpoint } from "@webstudio-is/sdk"; +import { type Breakpoint } from "@webstudio-is/react-sdk"; import { Paragraph, Flex, Text } from "~/shared/design-system"; type PreviewProps = { diff --git a/apps/designer/app/designer/features/breakpoints/trigger-button.tsx b/apps/designer/app/designer/features/breakpoints/trigger-button.tsx index 5f7133055b..607edafc7b 100644 --- a/apps/designer/app/designer/features/breakpoints/trigger-button.tsx +++ b/apps/designer/app/designer/features/breakpoints/trigger-button.tsx @@ -1,5 +1,5 @@ import { forwardRef, type ComponentProps, type ElementRef } from "react"; -import { type Breakpoint } from "@webstudio-is/sdk"; +import { type Breakpoint } from "@webstudio-is/react-sdk"; import { useCanvasWidth, useZoom, 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 d94ed831c3..7501c9d9f5 100644 --- a/apps/designer/app/designer/features/breakpoints/use-subscribe-breakpoints.ts +++ b/apps/designer/app/designer/features/breakpoints/use-subscribe-breakpoints.ts @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import { Breakpoint, useSubscribe } from "@webstudio-is/sdk"; +import { Breakpoint, useSubscribe } from "@webstudio-is/react-sdk"; import { useSelectedBreakpoint } from "~/designer/shared/nano-states"; import { sort } from "~/shared/breakpoints"; import { useBreakpoints } from "~/shared/nano-states"; 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 1150a2cf0a..61ea3615b3 100644 --- a/apps/designer/app/designer/features/breakpoints/use-subscribe-shortcuts.ts +++ b/apps/designer/app/designer/features/breakpoints/use-subscribe-shortcuts.ts @@ -1,4 +1,4 @@ -import { useSubscribe } from "@webstudio-is/sdk"; +import { useSubscribe } from "@webstudio-is/react-sdk"; import { sort } from "~/shared/breakpoints"; import { useBreakpoints } from "~/shared/nano-states"; import { useZoom, useSelectedBreakpoint } from "../../shared/nano-states"; diff --git a/apps/designer/app/designer/features/breakpoints/use-update-canvas-width.ts b/apps/designer/app/designer/features/breakpoints/use-update-canvas-width.ts index d8d91f2fca..e35ec8c238 100644 --- a/apps/designer/app/designer/features/breakpoints/use-update-canvas-width.ts +++ b/apps/designer/app/designer/features/breakpoints/use-update-canvas-width.ts @@ -1,4 +1,4 @@ -import { useSubscribe } from "@webstudio-is/sdk"; +import { useSubscribe } from "@webstudio-is/react-sdk"; import { useCallback, useEffect } from "react"; import { useSelectedBreakpoint, diff --git a/apps/designer/app/designer/features/inspector/inspector.tsx b/apps/designer/app/designer/features/inspector/inspector.tsx index 61c9287aee..02973722b9 100644 --- a/apps/designer/app/designer/features/inspector/inspector.tsx +++ b/apps/designer/app/designer/features/inspector/inspector.tsx @@ -1,4 +1,4 @@ -import type { Publish } from "@webstudio-is/sdk"; +import type { Publish } from "@webstudio-is/react-sdk"; import { Text, Tabs, diff --git a/apps/designer/app/designer/features/props-panel/control.tsx b/apps/designer/app/designer/features/props-panel/control.tsx index 947464cdab..38572e6bfd 100644 --- a/apps/designer/app/designer/features/props-panel/control.tsx +++ b/apps/designer/app/designer/features/props-panel/control.tsx @@ -1,4 +1,4 @@ -import { UserProp } from "@webstudio-is/sdk"; +import { UserProp } from "@webstudio-is/react-sdk"; import React, { ComponentProps } from "react"; import { Flex, diff --git a/apps/designer/app/designer/features/props-panel/props-panel.stories.tsx b/apps/designer/app/designer/features/props-panel/props-panel.stories.tsx index 9792f7615e..0571e84210 100644 --- a/apps/designer/app/designer/features/props-panel/props-panel.stories.tsx +++ b/apps/designer/app/designer/features/props-panel/props-panel.stories.tsx @@ -1,5 +1,5 @@ import { ComponentStoryObj } from "@storybook/react"; -import { componentsMeta, type UserProp } from "@webstudio-is/sdk"; +import { componentsMeta, type UserProp } from "@webstudio-is/react-sdk"; import { PropsPanel } from "./props-panel"; export default { diff --git a/apps/designer/app/designer/features/props-panel/props-panel.tsx b/apps/designer/app/designer/features/props-panel/props-panel.tsx index f9539d0904..2465d9b862 100644 --- a/apps/designer/app/designer/features/props-panel/props-panel.tsx +++ b/apps/designer/app/designer/features/props-panel/props-panel.tsx @@ -3,7 +3,7 @@ import { type Instance, type Publish, type UserProp, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { Control } from "~/designer/features/props-panel/control"; import { CollapsibleSection, ComponentInfo } from "~/designer/shared/inspector"; import type { SelectedInstanceData } from "~/shared/canvas-components"; diff --git a/apps/designer/app/designer/features/props-panel/use-props-logic.test.ts b/apps/designer/app/designer/features/props-panel/use-props-logic.test.ts index 3cecac102e..15eb0496ec 100644 --- a/apps/designer/app/designer/features/props-panel/use-props-logic.test.ts +++ b/apps/designer/app/designer/features/props-panel/use-props-logic.test.ts @@ -1,5 +1,5 @@ import { renderHook, act } from "@testing-library/react-hooks"; -import { components, UserProp } from "@webstudio-is/sdk"; +import { components, UserProp } from "@webstudio-is/react-sdk"; import { nanoid } from "nanoid"; import { SelectedInstanceData } from "~/shared/canvas-components"; import { usePropsLogic } from "./use-props-logic"; diff --git a/apps/designer/app/designer/features/props-panel/use-props-logic.ts b/apps/designer/app/designer/features/props-panel/use-props-logic.ts index 79ae9e1995..f388597a7e 100644 --- a/apps/designer/app/designer/features/props-panel/use-props-logic.ts +++ b/apps/designer/app/designer/features/props-panel/use-props-logic.ts @@ -3,8 +3,8 @@ import type { Publish, UserProp, UserPropsUpdates, -} from "@webstudio-is/sdk"; -import { componentsMeta } from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; +import { componentsMeta } from "@webstudio-is/react-sdk"; import ObjectId from "bson-objectid"; import produce from "immer"; import uniqBy from "lodash/uniqBy"; diff --git a/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx b/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx index 82d682fa7a..ddfd8df268 100644 --- a/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx +++ b/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { forwardRef, type ElementRef, type ComponentProps } from "react"; import { primitives } from "~/shared/canvas-components"; import { Flex, Text, styled } from "~/shared/design-system"; diff --git a/apps/designer/app/designer/features/sidebar-left/panels/components/components.tsx b/apps/designer/app/designer/features/sidebar-left/panels/components/components.tsx index 9ff340da79..41b6c842cc 100644 --- a/apps/designer/app/designer/features/sidebar-left/panels/components/components.tsx +++ b/apps/designer/app/designer/features/sidebar-left/panels/components/components.tsx @@ -1,7 +1,7 @@ import { useEffect, useRef, type MouseEventHandler, useCallback } from "react"; import { useDrag } from "react-dnd"; import { getEmptyImage } from "react-dnd-html5-backend"; -import { type Instance, type Publish } from "@webstudio-is/sdk"; +import { type Instance, type Publish } from "@webstudio-is/react-sdk"; import { Flex } from "~/shared/design-system"; import { PlusIcon } from "~/shared/icons"; import { primitives, type DragData } from "~/shared/canvas-components"; diff --git a/apps/designer/app/designer/features/sidebar-left/panels/components/custom-drag-layer.tsx b/apps/designer/app/designer/features/sidebar-left/panels/components/custom-drag-layer.tsx index ab551a938a..5d652e996c 100644 --- a/apps/designer/app/designer/features/sidebar-left/panels/components/custom-drag-layer.tsx +++ b/apps/designer/app/designer/features/sidebar-left/panels/components/custom-drag-layer.tsx @@ -1,7 +1,7 @@ import { useEffect } from "react"; import { createPortal } from "react-dom"; import { useDragLayer, type XYCoord } from "react-dnd"; -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { useCanvasRect, useZoom } from "~/designer/shared/nano-states"; import { ComponentThumb } from "./component-thumb"; diff --git a/apps/designer/app/designer/features/sidebar-left/panels/tree.tsx b/apps/designer/app/designer/features/sidebar-left/panels/tree.tsx index ee3637e369..cf7751175b 100644 --- a/apps/designer/app/designer/features/sidebar-left/panels/tree.tsx +++ b/apps/designer/app/designer/features/sidebar-left/panels/tree.tsx @@ -1,4 +1,4 @@ -import { type Instance, type Publish } from "@webstudio-is/sdk"; +import { type Instance, type Publish } from "@webstudio-is/react-sdk"; import { ListNestedIcon } from "~/shared/icons"; import { Flex } from "~/shared/design-system"; import { type SelectedInstanceData } from "~/shared/canvas-components"; diff --git a/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx b/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx index dd17e0af18..ab9de19a47 100644 --- a/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx +++ b/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx @@ -1,5 +1,5 @@ import { useState, useCallback } from "react"; -import { useSubscribe, type Publish } from "@webstudio-is/sdk"; +import { useSubscribe, type Publish } from "@webstudio-is/react-sdk"; import { Box, SidebarTabs, diff --git a/apps/designer/app/designer/features/style-panel/dependencies.ts b/apps/designer/app/designer/features/style-panel/dependencies.ts index dbacc15f96..c2049cb281 100644 --- a/apps/designer/app/designer/features/style-panel/dependencies.ts +++ b/apps/designer/app/designer/features/style-panel/dependencies.ts @@ -1,4 +1,4 @@ -import type { AppliesTo, StyleProperty } from "@webstudio-is/sdk"; +import type { AppliesTo, StyleProperty } from "@webstudio-is/react-sdk"; const displayInline = [ "inline", diff --git a/apps/designer/app/designer/features/style-panel/get-inherited-style.ts b/apps/designer/app/designer/features/style-panel/get-inherited-style.ts index 0b2d924b07..7751b31dd9 100644 --- a/apps/designer/app/designer/features/style-panel/get-inherited-style.ts +++ b/apps/designer/app/designer/features/style-panel/get-inherited-style.ts @@ -2,8 +2,8 @@ import { properties, type StyleValue, type StyleProperty, -} from "@webstudio-is/sdk"; -import { type Instance } from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; export type InheritedStyle = { [property in StyleProperty]: { diff --git a/apps/designer/app/designer/features/style-panel/lib/spacing-widget.tsx b/apps/designer/app/designer/features/style-panel/lib/spacing-widget.tsx index f932d1c84f..0b95652f29 100644 --- a/apps/designer/app/designer/features/style-panel/lib/spacing-widget.tsx +++ b/apps/designer/app/designer/features/style-panel/lib/spacing-widget.tsx @@ -3,7 +3,7 @@ import { toValue, type StyleProperty, type StyleValue, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { Box } from "~/shared/design-system"; import { SetProperty } from "../use-style-data"; import { useIsFromCurrentBreakpoint } from "./utils/use-is-from-current-breakpoint"; diff --git a/apps/designer/app/designer/features/style-panel/lib/utils/get-css-rule-for-breakpoint.ts b/apps/designer/app/designer/features/style-panel/lib/utils/get-css-rule-for-breakpoint.ts index e82a7427b7..41deecf87d 100644 --- a/apps/designer/app/designer/features/style-panel/lib/utils/get-css-rule-for-breakpoint.ts +++ b/apps/designer/app/designer/features/style-panel/lib/utils/get-css-rule-for-breakpoint.ts @@ -1,4 +1,4 @@ -import { type CssRule, type Breakpoint } from "@webstudio-is/sdk"; +import { type CssRule, type Breakpoint } from "@webstudio-is/react-sdk"; /** * Find a instance css rule that is set on the provided breakpoint. diff --git a/apps/designer/app/designer/features/style-panel/lib/utils/use-is-from-current-breakpoint.ts b/apps/designer/app/designer/features/style-panel/lib/utils/use-is-from-current-breakpoint.ts index 8a201c7e28..3a51a48642 100644 --- a/apps/designer/app/designer/features/style-panel/lib/utils/use-is-from-current-breakpoint.ts +++ b/apps/designer/app/designer/features/style-panel/lib/utils/use-is-from-current-breakpoint.ts @@ -1,5 +1,5 @@ import { useMemo } from "react"; -import { type StyleProperty } from "@webstudio-is/sdk"; +import { type StyleProperty } from "@webstudio-is/react-sdk"; import { useSelectedBreakpoint, useSelectedInstanceData, diff --git a/apps/designer/app/designer/features/style-panel/parse-css-value.ts b/apps/designer/app/designer/features/style-panel/parse-css-value.ts index bac7a0d98d..71fa329dab 100644 --- a/apps/designer/app/designer/features/style-panel/parse-css-value.ts +++ b/apps/designer/app/designer/features/style-panel/parse-css-value.ts @@ -1,6 +1,6 @@ import hyphenate from "hyphenate-style-name"; -import { units } from "@webstudio-is/sdk"; -import type { StyleProperty, StyleValue, Unit } from "@webstudio-is/sdk"; +import { units } from "@webstudio-is/react-sdk"; +import type { StyleProperty, StyleValue, Unit } from "@webstudio-is/react-sdk"; const unitRegex = new RegExp(`${units.join("|")}`); diff --git a/apps/designer/app/designer/features/style-panel/render-property.tsx b/apps/designer/app/designer/features/style-panel/render-property.tsx index ce5fe23a6e..8688b15bee 100644 --- a/apps/designer/app/designer/features/style-panel/render-property.tsx +++ b/apps/designer/app/designer/features/style-panel/render-property.tsx @@ -6,7 +6,7 @@ import { type StyleProperty, type Category, type StyleValue, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import type { SetProperty } from "./use-style-data"; import type { InheritedStyle } from "./get-inherited-style"; import { ColorPicker } from "./lib/color-picker"; diff --git a/apps/designer/app/designer/features/style-panel/settings.tsx b/apps/designer/app/designer/features/style-panel/settings.tsx index 5e6c920ed6..52170ecf1d 100644 --- a/apps/designer/app/designer/features/style-panel/settings.tsx +++ b/apps/designer/app/designer/features/style-panel/settings.tsx @@ -5,7 +5,7 @@ import { type CssRule, type Category, type Style, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { Flex, Collapsible, Button } from "~/shared/design-system"; import { TriangleRightIcon, TriangleDownIcon } from "~/shared/icons"; import { styleConfigs, type StyleConfig } from "~/shared/style-panel-configs"; diff --git a/apps/designer/app/designer/features/style-panel/style-panel.tsx b/apps/designer/app/designer/features/style-panel/style-panel.tsx index 7a70538239..2795024f0b 100644 --- a/apps/designer/app/designer/features/style-panel/style-panel.tsx +++ b/apps/designer/app/designer/features/style-panel/style-panel.tsx @@ -1,4 +1,4 @@ -import type { Publish } from "@webstudio-is/sdk"; +import type { Publish } from "@webstudio-is/react-sdk"; import { willRender } from "~/designer/shared/breakpoints"; import { Box, Card, Paragraph } from "~/shared/design-system"; import type { SelectedInstanceData } from "~/shared/canvas-components"; diff --git a/apps/designer/app/designer/features/style-panel/use-style-data.ts b/apps/designer/app/designer/features/style-panel/use-style-data.ts index 43848bfcaa..552b10bcbe 100644 --- a/apps/designer/app/designer/features/style-panel/use-style-data.ts +++ b/apps/designer/app/designer/features/style-panel/use-style-data.ts @@ -3,7 +3,7 @@ import type { SelectedInstanceData, StyleUpdates, } from "~/shared/canvas-components"; -import { type StyleProperty, type Publish } from "@webstudio-is/sdk"; +import { type StyleProperty, type Publish } from "@webstudio-is/react-sdk"; import { useSelectedBreakpoint } from "../../shared/nano-states"; import { parseCssValue } from "./parse-css-value"; import { getInheritedStyle } from "./get-inherited-style"; diff --git a/apps/designer/app/designer/features/topbar/menu/menu.tsx b/apps/designer/app/designer/features/topbar/menu/menu.tsx index 98a08dea96..0076891deb 100644 --- a/apps/designer/app/designer/features/topbar/menu/menu.tsx +++ b/apps/designer/app/designer/features/topbar/menu/menu.tsx @@ -1,5 +1,5 @@ import { useNavigate } from "react-router-dom"; -import { type Publish } from "@webstudio-is/sdk"; +import { type Publish } from "@webstudio-is/react-sdk"; import { DropdownMenu, DropdownMenuContent, diff --git a/apps/designer/app/designer/features/topbar/preview.tsx b/apps/designer/app/designer/features/topbar/preview.tsx index 5cdb4cd59a..2989bf3a2d 100644 --- a/apps/designer/app/designer/features/topbar/preview.tsx +++ b/apps/designer/app/designer/features/topbar/preview.tsx @@ -1,4 +1,4 @@ -import { useSubscribe, type Publish } from "@webstudio-is/sdk"; +import { useSubscribe, type Publish } from "@webstudio-is/react-sdk"; import { EyeOpenIcon } from "~/shared/icons"; import { SimpleToggle } from "~/shared/design-system"; import { useIsPreviewMode } from "~/shared/nano-states"; diff --git a/apps/designer/app/designer/features/topbar/publish.tsx b/apps/designer/app/designer/features/topbar/publish.tsx index d3007edbf5..4eacdbbd74 100644 --- a/apps/designer/app/designer/features/topbar/publish.tsx +++ b/apps/designer/app/designer/features/topbar/publish.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import { useFetcher } from "@remix-run/react"; import { useId } from "@radix-ui/react-id"; import { RocketIcon, ExternalLinkIcon } from "~/shared/icons"; -import { type Project } from "@webstudio-is/sdk"; +import { type Project } from "@webstudio-is/react-sdk"; import { Button, Flex, diff --git a/apps/designer/app/designer/features/topbar/share.tsx b/apps/designer/app/designer/features/topbar/share.tsx index 85f1ca94e7..f701ec51b1 100644 --- a/apps/designer/app/designer/features/topbar/share.tsx +++ b/apps/designer/app/designer/features/topbar/share.tsx @@ -8,7 +8,7 @@ import { TextField, } from "~/shared/design-system"; import { Share1Icon } from "~/shared/icons"; -import { type Project } from "@webstudio-is/sdk"; +import { type Project } from "@webstudio-is/react-sdk"; import { useIsShareDialogOpen } from "../../shared/nano-states"; type ShareButtonProps = { path: string; project: Project }; diff --git a/apps/designer/app/designer/features/topbar/topbar.tsx b/apps/designer/app/designer/features/topbar/topbar.tsx index 5712a2f21c..463682d88a 100644 --- a/apps/designer/app/designer/features/topbar/topbar.tsx +++ b/apps/designer/app/designer/features/topbar/topbar.tsx @@ -1,4 +1,4 @@ -import type { Project, Publish } from "@webstudio-is/sdk"; +import type { Project, Publish } from "@webstudio-is/react-sdk"; import { darkTheme, Flex, type CSS } from "~/shared/design-system"; import type { Config } from "~/config"; import { PreviewButton } from "./preview"; diff --git a/apps/designer/app/designer/features/tree-preview/tree-preview.tsx b/apps/designer/app/designer/features/tree-preview/tree-preview.tsx index a1b9e0dd6e..fd70b8a7f4 100644 --- a/apps/designer/app/designer/features/tree-preview/tree-preview.tsx +++ b/apps/designer/app/designer/features/tree-preview/tree-preview.tsx @@ -1,4 +1,4 @@ -import { Instance, useSubscribe } from "@webstudio-is/sdk"; +import { Instance, useSubscribe } from "@webstudio-is/react-sdk"; import produce from "immer"; import { useState } from "react"; import { Tree } from "~/designer/shared/tree"; diff --git a/apps/designer/app/designer/features/workspace/canvas-tools/canvas-tools.tsx b/apps/designer/app/designer/features/workspace/canvas-tools/canvas-tools.tsx index c3d67cc669..425c5f68c3 100644 --- a/apps/designer/app/designer/features/workspace/canvas-tools/canvas-tools.tsx +++ b/apps/designer/app/designer/features/workspace/canvas-tools/canvas-tools.tsx @@ -1,4 +1,4 @@ -import { type Publish } from "@webstudio-is/sdk"; +import { type Publish } from "@webstudio-is/react-sdk"; import { Box } from "~/shared/design-system"; import { useIsPreviewMode, diff --git a/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-editing-instance-id.ts b/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-editing-instance-id.ts index 6c53994424..95892904ce 100644 --- a/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-editing-instance-id.ts +++ b/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-editing-instance-id.ts @@ -1,4 +1,4 @@ -import { type Instance, useSubscribe } from "@webstudio-is/sdk"; +import { type Instance, useSubscribe } from "@webstudio-is/react-sdk"; import { useTextEditingInstanceId } from "~/shared/nano-states"; export const useSubscribeTextEditingInstanceId = () => { diff --git a/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-instance-rect.ts b/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-instance-rect.ts index 53ac4871bd..d83b97900e 100644 --- a/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-instance-rect.ts +++ b/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-instance-rect.ts @@ -1,4 +1,4 @@ -import { useSubscribe } from "@webstudio-is/sdk"; +import { useSubscribe } from "@webstudio-is/react-sdk"; import { useSelectedInstanceRect, useHoveredInstanceRect, diff --git a/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-selection-rect.ts b/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-selection-rect.ts index 533b4229fd..6a46994513 100644 --- a/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-selection-rect.ts +++ b/apps/designer/app/designer/features/workspace/canvas-tools/hooks/use-subscribe-selection-rect.ts @@ -1,4 +1,4 @@ -import { useSubscribe } from "@webstudio-is/sdk"; +import { useSubscribe } from "@webstudio-is/react-sdk"; import { useSelectionRect } from "~/designer/shared/nano-states"; export const useSubscribeSelectionRect = () => { diff --git a/apps/designer/app/designer/features/workspace/canvas-tools/outline/label.tsx b/apps/designer/app/designer/features/workspace/canvas-tools/outline/label.tsx index 5df30b9c7c..3541b5d55e 100644 --- a/apps/designer/app/designer/features/workspace/canvas-tools/outline/label.tsx +++ b/apps/designer/app/designer/features/workspace/canvas-tools/outline/label.tsx @@ -1,7 +1,7 @@ import { useCallback, useState } from "react"; import { styled } from "~/shared/design-system"; import { primitives } from "~/shared/canvas-components"; -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; type LabelPosition = "top" | "inside" | "bottom"; type LabelRefCallback = (element: HTMLElement | null) => void; diff --git a/apps/designer/app/designer/features/workspace/canvas-tools/text-toolbar/text-toolbar.tsx b/apps/designer/app/designer/features/workspace/canvas-tools/text-toolbar/text-toolbar.tsx index 9c2fe1cddd..9212427acd 100644 --- a/apps/designer/app/designer/features/workspace/canvas-tools/text-toolbar/text-toolbar.tsx +++ b/apps/designer/app/designer/features/workspace/canvas-tools/text-toolbar/text-toolbar.tsx @@ -1,4 +1,4 @@ -import { type Instance, type Publish } from "@webstudio-is/sdk"; +import { type Instance, type Publish } from "@webstudio-is/react-sdk"; import { useMemo, useState, type MouseEventHandler } from "react"; import { useSelectedInstanceData, diff --git a/apps/designer/app/designer/features/workspace/workspace.tsx b/apps/designer/app/designer/features/workspace/workspace.tsx index 5193e1ebe9..916e0f0332 100644 --- a/apps/designer/app/designer/features/workspace/workspace.tsx +++ b/apps/designer/app/designer/features/workspace/workspace.tsx @@ -1,7 +1,7 @@ import { Box, Flex } from "~/shared/design-system"; import { useCanvasWidth, useZoom } from "~/designer/shared/nano-states"; import { CanvasTools } from "./canvas-tools"; -import { type Publish } from "@webstudio-is/sdk"; +import { type Publish } from "@webstudio-is/react-sdk"; const workspaceStyle = { flexGrow: 1, diff --git a/apps/designer/app/designer/shared/breakpoints/will-render.ts b/apps/designer/app/designer/shared/breakpoints/will-render.ts index 3e7c87dbae..d88ca03121 100644 --- a/apps/designer/app/designer/shared/breakpoints/will-render.ts +++ b/apps/designer/app/designer/shared/breakpoints/will-render.ts @@ -1,4 +1,4 @@ -import { type Breakpoint } from "@webstudio-is/sdk"; +import { type Breakpoint } from "@webstudio-is/react-sdk"; export const willRender = (breakpoint: Breakpoint, canvasWidth: number) => canvasWidth >= breakpoint.minWidth; diff --git a/apps/designer/app/designer/shared/client-settings/settings.ts b/apps/designer/app/designer/shared/client-settings/settings.ts index 1395a81e90..5396a6f62f 100644 --- a/apps/designer/app/designer/shared/client-settings/settings.ts +++ b/apps/designer/app/designer/shared/client-settings/settings.ts @@ -1,4 +1,4 @@ -import { useSubscribe } from "@webstudio-is/sdk"; +import { useSubscribe } from "@webstudio-is/react-sdk"; import { sentryException } from "~/shared/sentry"; import * as values from "./values"; diff --git a/apps/designer/app/designer/shared/instance/use-selected-instance-path.ts b/apps/designer/app/designer/shared/instance/use-selected-instance-path.ts index ab8374924e..418a95bf28 100644 --- a/apps/designer/app/designer/shared/instance/use-selected-instance-path.ts +++ b/apps/designer/app/designer/shared/instance/use-selected-instance-path.ts @@ -1,4 +1,4 @@ -import { Instance } from "@webstudio-is/sdk"; +import { Instance } from "@webstudio-is/react-sdk"; import { useMemo } from "react"; import { useRootInstance } from "~/shared/nano-states"; import { getInstancePath } from "~/shared/tree-utils"; diff --git a/apps/designer/app/designer/shared/nano-states/index.ts b/apps/designer/app/designer/shared/nano-states/index.ts index 96635904c9..cd80eed337 100644 --- a/apps/designer/app/designer/shared/nano-states/index.ts +++ b/apps/designer/app/designer/shared/nano-states/index.ts @@ -1,5 +1,5 @@ import { createValueContainer, useValue } from "react-nano-state"; -import { type Breakpoint } from "@webstudio-is/sdk"; +import { type Breakpoint } from "@webstudio-is/react-sdk"; import { type SelectedInstanceData, type HoveredInstanceData, diff --git a/apps/designer/app/designer/shared/shortcuts/use-publish-shortcuts.ts b/apps/designer/app/designer/shared/shortcuts/use-publish-shortcuts.ts index 95a14b76de..2f6e6faef5 100644 --- a/apps/designer/app/designer/shared/shortcuts/use-publish-shortcuts.ts +++ b/apps/designer/app/designer/shared/shortcuts/use-publish-shortcuts.ts @@ -1,5 +1,5 @@ import { useHotkeys } from "react-hotkeys-hook"; -import { type Publish } from "@webstudio-is/sdk"; +import { type Publish } from "@webstudio-is/react-sdk"; import { shortcuts, options } from "~/shared/shortcuts"; const names = Object.keys(shortcuts) as Array; diff --git a/apps/designer/app/designer/shared/tree/tree.tsx b/apps/designer/app/designer/shared/tree/tree.tsx index cf464888fb..863661dc49 100644 --- a/apps/designer/app/designer/shared/tree/tree.tsx +++ b/apps/designer/app/designer/shared/tree/tree.tsx @@ -1,5 +1,5 @@ import { useState, useMemo, useEffect } from "react"; -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { Flex, Text, diff --git a/apps/designer/app/routes/designer/$id.tsx b/apps/designer/app/routes/designer/$id.tsx index e76fddaf30..fcd0192276 100644 --- a/apps/designer/app/routes/designer/$id.tsx +++ b/apps/designer/app/routes/designer/$id.tsx @@ -1,6 +1,6 @@ import { useLoaderData } from "@remix-run/react"; import { LoaderFunction, redirect } from "@remix-run/node"; -import type { Project } from "@webstudio-is/sdk"; +import type { Project } from "@webstudio-is/react-sdk"; import { Designer, links } from "~/designer"; import * as db from "~/shared/db"; import config from "~/config"; diff --git a/apps/designer/app/routes/index.tsx b/apps/designer/app/routes/index.tsx index 26211f87dd..7158259251 100644 --- a/apps/designer/app/routes/index.tsx +++ b/apps/designer/app/routes/index.tsx @@ -1,6 +1,6 @@ import { redirect, type LoaderFunction } from "@remix-run/node"; import { useLoaderData } from "@remix-run/react"; -import { Root, type Data } from "@webstudio-is/sdk"; +import { Root, type Data } from "@webstudio-is/react-sdk"; import config from "~/config"; import * as db from "~/shared/db"; import Document from "./canvas"; diff --git a/apps/designer/app/routes/preview/$projectId.tsx b/apps/designer/app/routes/preview/$projectId.tsx index d301de6831..321694dc05 100644 --- a/apps/designer/app/routes/preview/$projectId.tsx +++ b/apps/designer/app/routes/preview/$projectId.tsx @@ -1,6 +1,6 @@ import { useLoaderData } from "@remix-run/react"; import type { LoaderFunction } from "@remix-run/node"; -import { Root } from "@webstudio-is/sdk"; +import { Root } from "@webstudio-is/react-sdk"; import { loadPreviewData, type PreviewData, type ErrorData } from "~/shared/db"; import env, { Env } from "~/env.server"; diff --git a/apps/designer/app/routes/rest/breakpoints.$projectId.ts b/apps/designer/app/routes/rest/breakpoints.$projectId.ts index 1d373faa6a..d623f2602f 100644 --- a/apps/designer/app/routes/rest/breakpoints.$projectId.ts +++ b/apps/designer/app/routes/rest/breakpoints.$projectId.ts @@ -1,5 +1,5 @@ import type { LoaderFunction } from "@remix-run/node"; -import type { Breakpoint } from "@webstudio-is/sdk"; +import type { Breakpoint } from "@webstudio-is/react-sdk"; import * as db from "~/shared/db"; export type ErrorData = { diff --git a/apps/designer/app/routes/rest/patch.ts b/apps/designer/app/routes/rest/patch.ts index 72fc77a85b..d8195be96a 100644 --- a/apps/designer/app/routes/rest/patch.ts +++ b/apps/designer/app/routes/rest/patch.ts @@ -1,7 +1,7 @@ import { type ActionFunction } from "@remix-run/node"; import * as db from "~/shared/db"; import { type SyncItem } from "immerhin"; -import { type Project, type Tree } from "@webstudio-is/sdk"; +import { type Project, type Tree } from "@webstudio-is/react-sdk"; const updaters = { root: db.tree.patchRoot, diff --git a/apps/designer/app/routes/rest/project/clone.$domain.ts b/apps/designer/app/routes/rest/project/clone.$domain.ts index 6c4a09021c..ba7156d9f2 100644 --- a/apps/designer/app/routes/rest/project/clone.$domain.ts +++ b/apps/designer/app/routes/rest/project/clone.$domain.ts @@ -1,5 +1,5 @@ import { type LoaderFunction, redirect } from "@remix-run/node"; -import type { User } from "@webstudio-is/sdk"; +import type { User } from "@webstudio-is/react-sdk"; import * as db from "~/shared/db"; import { ensureUserCookie } from "~/shared/session"; import config from "~/config"; diff --git a/apps/designer/app/routes/rest/props.$projectId.ts b/apps/designer/app/routes/rest/props.$projectId.ts index 6fd6f34345..9e6af9379e 100644 --- a/apps/designer/app/routes/rest/props.$projectId.ts +++ b/apps/designer/app/routes/rest/props.$projectId.ts @@ -1,5 +1,5 @@ import { type LoaderFunction } from "@remix-run/node"; -import { type InstanceProps } from "@webstudio-is/sdk"; +import { type InstanceProps } from "@webstudio-is/react-sdk"; import * as db from "~/shared/db"; type ErrorData = { diff --git a/apps/designer/app/routes/rest/tree.$projectId.ts b/apps/designer/app/routes/rest/tree.$projectId.ts index a9d1210755..1d50d90686 100644 --- a/apps/designer/app/routes/rest/tree.$projectId.ts +++ b/apps/designer/app/routes/rest/tree.$projectId.ts @@ -1,5 +1,5 @@ import { type LoaderFunction } from "@remix-run/node"; -import type { Tree } from "@webstudio-is/sdk"; +import type { Tree } from "@webstudio-is/react-sdk"; import * as db from "~/shared/db"; export type ErrorData = { diff --git a/apps/designer/app/shared/breakpoints/sort.test.ts b/apps/designer/app/shared/breakpoints/sort.test.ts index 0e63be85ad..5140abd247 100644 --- a/apps/designer/app/shared/breakpoints/sort.test.ts +++ b/apps/designer/app/shared/breakpoints/sort.test.ts @@ -1,4 +1,7 @@ -import { initialBreakpoints, type BaseBreakpoint } from "@webstudio-is/sdk"; +import { + initialBreakpoints, + type BaseBreakpoint, +} from "@webstudio-is/react-sdk"; import { sort } from "./sort"; describe("Breakpoints sorting for visual rendering", () => { diff --git a/apps/designer/app/shared/canvas-components/draggable.ts b/apps/designer/app/shared/canvas-components/draggable.ts index aaa302391d..8e621c9e77 100644 --- a/apps/designer/app/shared/canvas-components/draggable.ts +++ b/apps/designer/app/shared/canvas-components/draggable.ts @@ -1,5 +1,5 @@ import type { XYCoord } from "react-dnd"; -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; export type DragData = { instance: Instance; diff --git a/apps/designer/app/shared/canvas-components/instance-data.ts b/apps/designer/app/shared/canvas-components/instance-data.ts index ff087c3ae6..9af88bd561 100644 --- a/apps/designer/app/shared/canvas-components/instance-data.ts +++ b/apps/designer/app/shared/canvas-components/instance-data.ts @@ -6,7 +6,7 @@ import { type StyleProperty, type StyleValue, type Breakpoint, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; export type SelectedInstanceData = { id: Instance["id"]; diff --git a/apps/designer/app/shared/canvas-components/primitives/bold.tsx b/apps/designer/app/shared/canvas-components/primitives/bold.tsx index 3f93698ae4..36d186909d 100644 --- a/apps/designer/app/shared/canvas-components/primitives/bold.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/bold.tsx @@ -1,4 +1,4 @@ -import { components } from "@webstudio-is/sdk"; +import { components } from "@webstudio-is/react-sdk"; export { FontBoldIcon as Icon } from "~/shared/icons"; export const canAcceptChild = (): boolean => { diff --git a/apps/designer/app/shared/canvas-components/primitives/box.tsx b/apps/designer/app/shared/canvas-components/primitives/box.tsx index 70246d083c..17ce6cff6d 100644 --- a/apps/designer/app/shared/canvas-components/primitives/box.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/box.tsx @@ -1,4 +1,4 @@ -import { type Style, components } from "@webstudio-is/sdk"; +import { type Style, components } from "@webstudio-is/react-sdk"; export { SquareIcon as Icon } from "~/shared/icons"; // Webstudio specific default styles for the node type. diff --git a/apps/designer/app/shared/canvas-components/primitives/button.tsx b/apps/designer/app/shared/canvas-components/primitives/button.tsx index 0ef49526a4..8657972881 100644 --- a/apps/designer/app/shared/canvas-components/primitives/button.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/button.tsx @@ -1,4 +1,4 @@ -import { type Style, components } from "@webstudio-is/sdk"; +import { type Style, components } from "@webstudio-is/react-sdk"; export { ButtonIcon as Icon } from "~/shared/icons"; // Webstudio specific default styles for the node type. diff --git a/apps/designer/app/shared/canvas-components/primitives/form.tsx b/apps/designer/app/shared/canvas-components/primitives/form.tsx index b27e4ca8a2..6ed77f094e 100644 --- a/apps/designer/app/shared/canvas-components/primitives/form.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/form.tsx @@ -1,4 +1,4 @@ -import { type Style, components } from "@webstudio-is/sdk"; +import { type Style, components } from "@webstudio-is/react-sdk"; export { FormIcon as Icon } from "~/shared/icons"; // Webstudio specific default styles for the node type. diff --git a/apps/designer/app/shared/canvas-components/primitives/heading.tsx b/apps/designer/app/shared/canvas-components/primitives/heading.tsx index 4fd1c7fc01..268e0c4984 100644 --- a/apps/designer/app/shared/canvas-components/primitives/heading.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/heading.tsx @@ -1,4 +1,4 @@ -import { type Style, components } from "@webstudio-is/sdk"; +import { type Style, components } from "@webstudio-is/react-sdk"; export { HeadingIcon as Icon } from "~/shared/icons"; // Webstudio specific default styles for the node type. diff --git a/apps/designer/app/shared/canvas-components/primitives/input.tsx b/apps/designer/app/shared/canvas-components/primitives/input.tsx index fc6d396e26..4d87f23d83 100644 --- a/apps/designer/app/shared/canvas-components/primitives/input.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/input.tsx @@ -1,4 +1,4 @@ -import { type Style, components } from "@webstudio-is/sdk"; +import { type Style, components } from "@webstudio-is/react-sdk"; export { InputIcon as Icon } from "~/shared/icons"; // Webstudio specific default styles for the node type. diff --git a/apps/designer/app/shared/canvas-components/primitives/italic.tsx b/apps/designer/app/shared/canvas-components/primitives/italic.tsx index 56a89e6550..be5c1add67 100644 --- a/apps/designer/app/shared/canvas-components/primitives/italic.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/italic.tsx @@ -1,4 +1,4 @@ -import { components } from "@webstudio-is/sdk"; +import { components } from "@webstudio-is/react-sdk"; export { FontBoldIcon as Icon } from "~/shared/icons"; export const canAcceptChild = (): boolean => { diff --git a/apps/designer/app/shared/canvas-components/primitives/link.tsx b/apps/designer/app/shared/canvas-components/primitives/link.tsx index 00de0fea8a..77d6cebdb2 100644 --- a/apps/designer/app/shared/canvas-components/primitives/link.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/link.tsx @@ -1,4 +1,4 @@ -import { type Style, components } from "@webstudio-is/sdk"; +import { type Style, components } from "@webstudio-is/react-sdk"; export { Link2Icon as Icon } from "~/shared/icons"; // Webstudio specific default styles for the node type. diff --git a/apps/designer/app/shared/canvas-components/primitives/paragraph.tsx b/apps/designer/app/shared/canvas-components/primitives/paragraph.tsx index c244294c8e..a9909ac89f 100644 --- a/apps/designer/app/shared/canvas-components/primitives/paragraph.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/paragraph.tsx @@ -1,4 +1,4 @@ -import { type Style, components } from "@webstudio-is/sdk"; +import { type Style, components } from "@webstudio-is/react-sdk"; export { TextAlignLeftIcon as Icon } from "~/shared/icons"; // Webstudio specific default styles for the node type. diff --git a/apps/designer/app/shared/canvas-components/primitives/text-block.tsx b/apps/designer/app/shared/canvas-components/primitives/text-block.tsx index ab9a8c4fea..834ded5071 100644 --- a/apps/designer/app/shared/canvas-components/primitives/text-block.tsx +++ b/apps/designer/app/shared/canvas-components/primitives/text-block.tsx @@ -1,4 +1,4 @@ -import { type Style, components } from "@webstudio-is/sdk"; +import { type Style, components } from "@webstudio-is/react-sdk"; export { TextIcon as Icon } from "~/shared/icons"; // Webstudio specific default styles for the node type. diff --git a/apps/designer/app/shared/css-utils/delete-css-rules-by-breakpoint.test.ts b/apps/designer/app/shared/css-utils/delete-css-rules-by-breakpoint.test.ts index 0fd4962d04..ca5e949419 100644 --- a/apps/designer/app/shared/css-utils/delete-css-rules-by-breakpoint.test.ts +++ b/apps/designer/app/shared/css-utils/delete-css-rules-by-breakpoint.test.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { deleteCssRulesByBreakpoint } from "./delete-css-rules-by-breakpoint"; describe("Delete breakpoint", () => { diff --git a/apps/designer/app/shared/css-utils/delete-css-rules-by-breakpoint.ts b/apps/designer/app/shared/css-utils/delete-css-rules-by-breakpoint.ts index cca6aac8d4..f78818eca3 100644 --- a/apps/designer/app/shared/css-utils/delete-css-rules-by-breakpoint.ts +++ b/apps/designer/app/shared/css-utils/delete-css-rules-by-breakpoint.ts @@ -1,4 +1,4 @@ -import { type Instance, type Breakpoint } from "@webstudio-is/sdk"; +import { type Instance, type Breakpoint } from "@webstudio-is/react-sdk"; export const deleteCssRulesByBreakpoint = ( instance: Instance, diff --git a/apps/designer/app/shared/db/breakpoints.server.ts b/apps/designer/app/shared/db/breakpoints.server.ts index a4a6acdcc6..02bf1990ac 100644 --- a/apps/designer/app/shared/db/breakpoints.server.ts +++ b/apps/designer/app/shared/db/breakpoints.server.ts @@ -4,7 +4,7 @@ import { type Tree, type Breakpoint, BreakpointsSchema, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import ObjectId from "bson-objectid"; import { applyPatches, type Patch } from "immer"; import { prisma } from "./prisma.server"; diff --git a/apps/designer/app/shared/db/canvas.server.ts b/apps/designer/app/shared/db/canvas.server.ts index 01cac5077e..033fbefb72 100644 --- a/apps/designer/app/shared/db/canvas.server.ts +++ b/apps/designer/app/shared/db/canvas.server.ts @@ -1,4 +1,4 @@ -import { type Data } from "@webstudio-is/sdk"; +import { type Data } from "@webstudio-is/react-sdk"; import * as db from "."; import { Project } from "./project.server"; diff --git a/apps/designer/app/shared/db/project.server.ts b/apps/designer/app/shared/db/project.server.ts index da6baf4a51..b858586b47 100644 --- a/apps/designer/app/shared/db/project.server.ts +++ b/apps/designer/app/shared/db/project.server.ts @@ -1,6 +1,6 @@ import slugify from "slugify"; import { nanoid } from "nanoid"; -import type { Project as BaseProject, User } from "@webstudio-is/sdk"; +import type { Project as BaseProject, User } from "@webstudio-is/react-sdk"; import { z } from "zod"; import { prisma, Prisma } from "./prisma.server"; import * as db from "."; diff --git a/apps/designer/app/shared/db/props.server.ts b/apps/designer/app/shared/db/props.server.ts index 0d4ef73a71..deb3c0e0bf 100644 --- a/apps/designer/app/shared/db/props.server.ts +++ b/apps/designer/app/shared/db/props.server.ts @@ -2,7 +2,7 @@ import { type Tree, type AllUserProps, UserPropsSchema, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { applyPatches, type Patch } from "immer"; import { prisma } from "./prisma.server"; import { Project } from "./project.server"; diff --git a/apps/designer/app/shared/db/tree.server.ts b/apps/designer/app/shared/db/tree.server.ts index cf8c194d64..2143eb34cb 100644 --- a/apps/designer/app/shared/db/tree.server.ts +++ b/apps/designer/app/shared/db/tree.server.ts @@ -3,7 +3,7 @@ import { type Breakpoint, type Tree, InstanceSchema, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import { applyPatches, type Patch } from "immer"; import { prisma } from "./prisma.server"; import { createInstance } from "~/shared/tree-utils"; diff --git a/apps/designer/app/shared/documents/canvas.tsx b/apps/designer/app/shared/documents/canvas.tsx index 084f5ac598..b4d239ff39 100644 --- a/apps/designer/app/shared/documents/canvas.tsx +++ b/apps/designer/app/shared/documents/canvas.tsx @@ -6,7 +6,7 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; -import { CriticalCss } from "@webstudio-is/sdk"; +import { CriticalCss } from "@webstudio-is/react-sdk"; import { Env } from "~/shared/env"; /** diff --git a/apps/designer/app/shared/documents/designer.tsx b/apps/designer/app/shared/documents/designer.tsx index 859680748d..4638c4919a 100644 --- a/apps/designer/app/shared/documents/designer.tsx +++ b/apps/designer/app/shared/documents/designer.tsx @@ -1,5 +1,5 @@ import { Links, LiveReload, Meta, Outlet, Scripts } from "@remix-run/react"; -import { CriticalCss } from "@webstudio-is/sdk"; +import { CriticalCss } from "@webstudio-is/react-sdk"; import { Env } from "~/shared/env"; import { useThemeProps } from "~/shared/theme"; diff --git a/apps/designer/app/shared/error/error-message.tsx b/apps/designer/app/shared/error/error-message.tsx index d715dd0afb..71c0e1aecd 100644 --- a/apps/designer/app/shared/error/error-message.tsx +++ b/apps/designer/app/shared/error/error-message.tsx @@ -1,4 +1,4 @@ -import { publish } from "@webstudio-is/sdk"; +import { publish } from "@webstudio-is/react-sdk"; import { useEffect } from "react"; export const ErrorMessage = ({ message }: { message: string }) => { diff --git a/apps/designer/app/shared/nano-states/nano-states.ts b/apps/designer/app/shared/nano-states/nano-states.ts index 4c280c16e5..f8a24be2cb 100644 --- a/apps/designer/app/shared/nano-states/nano-states.ts +++ b/apps/designer/app/shared/nano-states/nano-states.ts @@ -1,5 +1,5 @@ import { createValueContainer, useValue } from "react-nano-state"; -import { type Breakpoint, type Instance } from "@webstudio-is/sdk"; +import { type Breakpoint, type Instance } from "@webstudio-is/react-sdk"; export const rootInstanceContainer = createValueContainer< Instance | undefined diff --git a/apps/designer/app/shared/nano-states/use-subscribe-scroll-state.ts b/apps/designer/app/shared/nano-states/use-subscribe-scroll-state.ts index b90b2755ce..9ddc2f5857 100644 --- a/apps/designer/app/shared/nano-states/use-subscribe-scroll-state.ts +++ b/apps/designer/app/shared/nano-states/use-subscribe-scroll-state.ts @@ -1,4 +1,4 @@ -import { useSubscribe } from "@webstudio-is/sdk"; +import { useSubscribe } from "@webstudio-is/react-sdk"; import { useIsScrolling } from "./nano-states"; export const useSubscribeScrollState = () => { diff --git a/apps/designer/app/shared/props-utils/clone-props.ts b/apps/designer/app/shared/props-utils/clone-props.ts index 7f8b51d9d5..7f33ae3e53 100644 --- a/apps/designer/app/shared/props-utils/clone-props.ts +++ b/apps/designer/app/shared/props-utils/clone-props.ts @@ -1,6 +1,6 @@ import ObjectId from "bson-objectid"; import produce from "immer"; -import { type InstanceProps, type Instance } from "@webstudio-is/sdk"; +import { type InstanceProps, type Instance } from "@webstudio-is/react-sdk"; export const cloneProps = ( instanceProps: InstanceProps, diff --git a/apps/designer/app/shared/props-utils/delete-prop.test.ts b/apps/designer/app/shared/props-utils/delete-prop.test.ts index 98ad18490a..9fb33cd998 100644 --- a/apps/designer/app/shared/props-utils/delete-prop.test.ts +++ b/apps/designer/app/shared/props-utils/delete-prop.test.ts @@ -1,4 +1,4 @@ -import { type AllUserProps } from "@webstudio-is/sdk"; +import { type AllUserProps } from "@webstudio-is/react-sdk"; import { deletePropMutable } from "./delete-prop"; describe("Delete prop", () => { diff --git a/apps/designer/app/shared/props-utils/delete-prop.ts b/apps/designer/app/shared/props-utils/delete-prop.ts index 947bd79f21..8252b54296 100644 --- a/apps/designer/app/shared/props-utils/delete-prop.ts +++ b/apps/designer/app/shared/props-utils/delete-prop.ts @@ -1,4 +1,4 @@ -import { type AllUserProps, type DeleteProp } from "@webstudio-is/sdk"; +import { type AllUserProps, type DeleteProp } from "@webstudio-is/react-sdk"; export const deletePropMutable = ( allProps: AllUserProps, diff --git a/apps/designer/app/shared/props-utils/update-props.test.ts b/apps/designer/app/shared/props-utils/update-props.test.ts index c17b2a80af..56191d76ec 100644 --- a/apps/designer/app/shared/props-utils/update-props.test.ts +++ b/apps/designer/app/shared/props-utils/update-props.test.ts @@ -1,4 +1,7 @@ -import { type AllUserProps, type UserPropsUpdates } from "@webstudio-is/sdk"; +import { + type AllUserProps, + type UserPropsUpdates, +} from "@webstudio-is/react-sdk"; import { updateAllUserPropsMutable } from "./update-props"; describe("Update props", () => { diff --git a/apps/designer/app/shared/props-utils/update-props.ts b/apps/designer/app/shared/props-utils/update-props.ts index 63c6ef3d7c..4513d7776e 100644 --- a/apps/designer/app/shared/props-utils/update-props.ts +++ b/apps/designer/app/shared/props-utils/update-props.ts @@ -1,4 +1,7 @@ -import { type AllUserProps, type UserPropsUpdates } from "@webstudio-is/sdk"; +import { + type AllUserProps, + type UserPropsUpdates, +} from "@webstudio-is/react-sdk"; export const updateAllUserPropsMutable = ( allUserProps: AllUserProps, diff --git a/apps/designer/app/shared/style-panel-configs/configs.ts b/apps/designer/app/shared/style-panel-configs/configs.ts index ade8891c5a..e38341f0c7 100644 --- a/apps/designer/app/shared/style-panel-configs/configs.ts +++ b/apps/designer/app/shared/style-panel-configs/configs.ts @@ -4,7 +4,7 @@ import { keywordValues, type Category, type StyleProperty, -} from "@webstudio-is/sdk"; +} from "@webstudio-is/react-sdk"; import type { StyleConfig, Control } from "./types"; import { humanizeString } from "../string-utils"; diff --git a/apps/designer/app/shared/style-panel-configs/types.ts b/apps/designer/app/shared/style-panel-configs/types.ts index 985a1a089f..4501ba413a 100644 --- a/apps/designer/app/shared/style-panel-configs/types.ts +++ b/apps/designer/app/shared/style-panel-configs/types.ts @@ -1,4 +1,4 @@ -import type { StyleProperty, AppliesTo } from "@webstudio-is/sdk"; +import type { StyleProperty, AppliesTo } from "@webstudio-is/react-sdk"; type BaseStyleConfig = { label: string; diff --git a/apps/designer/app/shared/tree-utils/clone-instance.test.ts b/apps/designer/app/shared/tree-utils/clone-instance.test.ts index 59fb08459c..9bbc8bf24d 100644 --- a/apps/designer/app/shared/tree-utils/clone-instance.test.ts +++ b/apps/designer/app/shared/tree-utils/clone-instance.test.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { cloneInstance } from "./clone-instance"; const getIds = (instance: Instance, ids: Array = []) => { diff --git a/apps/designer/app/shared/tree-utils/clone-instance.ts b/apps/designer/app/shared/tree-utils/clone-instance.ts index 6b3460ff54..c3f549313b 100644 --- a/apps/designer/app/shared/tree-utils/clone-instance.ts +++ b/apps/designer/app/shared/tree-utils/clone-instance.ts @@ -1,6 +1,6 @@ import ObjectId from "bson-objectid"; import produce from "immer"; -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; const updateIds = (instance: Instance) => { instance.id = ObjectId().toString(); diff --git a/apps/designer/app/shared/tree-utils/create-instance.ts b/apps/designer/app/shared/tree-utils/create-instance.ts index a54ef85a8c..d30cb3e7be 100644 --- a/apps/designer/app/shared/tree-utils/create-instance.ts +++ b/apps/designer/app/shared/tree-utils/create-instance.ts @@ -1,5 +1,5 @@ import ObjectId from "bson-objectid"; -import { type CssRule, type Instance } from "@webstudio-is/sdk"; +import { type CssRule, type Instance } from "@webstudio-is/react-sdk"; import { primitives } from "~/shared/canvas-components"; export const createInstance = ({ diff --git a/apps/designer/app/shared/tree-utils/delete-instance.test.ts b/apps/designer/app/shared/tree-utils/delete-instance.test.ts index e086bc68d7..4091ffdf11 100644 --- a/apps/designer/app/shared/tree-utils/delete-instance.test.ts +++ b/apps/designer/app/shared/tree-utils/delete-instance.test.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { deleteInstanceMutable } from "./delete-instance"; describe("Delete instance", () => { diff --git a/apps/designer/app/shared/tree-utils/delete-instance.ts b/apps/designer/app/shared/tree-utils/delete-instance.ts index d95284d843..6f0b3dcae6 100644 --- a/apps/designer/app/shared/tree-utils/delete-instance.ts +++ b/apps/designer/app/shared/tree-utils/delete-instance.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; export const deleteInstanceMutable = ( instance: Instance, diff --git a/apps/designer/app/shared/tree-utils/find-closest-sibling-instance.test.ts b/apps/designer/app/shared/tree-utils/find-closest-sibling-instance.test.ts index b7549a4e90..c40bd0bb9c 100644 --- a/apps/designer/app/shared/tree-utils/find-closest-sibling-instance.test.ts +++ b/apps/designer/app/shared/tree-utils/find-closest-sibling-instance.test.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { findClosestSiblingInstance } from "./find-closest-sibling-instance"; describe("Find closest sibling instance", () => { diff --git a/apps/designer/app/shared/tree-utils/find-closest-sibling-instance.ts b/apps/designer/app/shared/tree-utils/find-closest-sibling-instance.ts index 61238ae385..e08cead7fb 100644 --- a/apps/designer/app/shared/tree-utils/find-closest-sibling-instance.ts +++ b/apps/designer/app/shared/tree-utils/find-closest-sibling-instance.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; export const findClosestSiblingInstance = ( instance: Instance, diff --git a/apps/designer/app/shared/tree-utils/find-instance.ts b/apps/designer/app/shared/tree-utils/find-instance.ts index b4e30d54a7..c77b332305 100644 --- a/apps/designer/app/shared/tree-utils/find-instance.ts +++ b/apps/designer/app/shared/tree-utils/find-instance.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; // @todo should be optimized because it will be a frequent operation on a potentially large tree. export const findInstanceById = ( diff --git a/apps/designer/app/shared/tree-utils/find-parent-instance.test.ts b/apps/designer/app/shared/tree-utils/find-parent-instance.test.ts index 693518f0a3..af14509cff 100644 --- a/apps/designer/app/shared/tree-utils/find-parent-instance.test.ts +++ b/apps/designer/app/shared/tree-utils/find-parent-instance.test.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { findParentInstance } from "./find-parent-instance"; describe("Find parent instance", () => { diff --git a/apps/designer/app/shared/tree-utils/find-parent-instance.ts b/apps/designer/app/shared/tree-utils/find-parent-instance.ts index 47c857f6ed..d17f7f10ef 100644 --- a/apps/designer/app/shared/tree-utils/find-parent-instance.ts +++ b/apps/designer/app/shared/tree-utils/find-parent-instance.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; export const findParentInstance = ( instance: Instance, diff --git a/apps/designer/app/shared/tree-utils/get-instance-path.test.ts b/apps/designer/app/shared/tree-utils/get-instance-path.test.ts index 4e9599053d..f41a16dc91 100644 --- a/apps/designer/app/shared/tree-utils/get-instance-path.test.ts +++ b/apps/designer/app/shared/tree-utils/get-instance-path.test.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { getInstancePath } from "./get-instance-path"; const getIds = (array: Array<{ id: string }>) => array.map((item) => item.id); diff --git a/apps/designer/app/shared/tree-utils/get-instance-path.ts b/apps/designer/app/shared/tree-utils/get-instance-path.ts index 811c80a5a9..8de86bd075 100644 --- a/apps/designer/app/shared/tree-utils/get-instance-path.ts +++ b/apps/designer/app/shared/tree-utils/get-instance-path.ts @@ -1,4 +1,4 @@ -import { Instance } from "@webstudio-is/sdk"; +import { Instance } from "@webstudio-is/react-sdk"; export const getInstancePath = ( instance: Instance, diff --git a/apps/designer/app/shared/tree-utils/index.ts b/apps/designer/app/shared/tree-utils/index.ts index add3a420da..e510e32304 100644 --- a/apps/designer/app/shared/tree-utils/index.ts +++ b/apps/designer/app/shared/tree-utils/index.ts @@ -3,7 +3,10 @@ export * from "./delete-instance"; export * from "./insert-instance"; export * from "./populate"; export * from "./find-instance"; -export { createElementsTree, type OnChangeChildren } from "@webstudio-is/sdk"; +export { + createElementsTree, + type OnChangeChildren, +} from "@webstudio-is/react-sdk"; export * from "./set-instance-style"; export * from "./set-instance-children"; export * from "./get-instance-path"; diff --git a/apps/designer/app/shared/tree-utils/insert-instance.test.ts b/apps/designer/app/shared/tree-utils/insert-instance.test.ts index 242f4ffcbb..4562b883a8 100644 --- a/apps/designer/app/shared/tree-utils/insert-instance.test.ts +++ b/apps/designer/app/shared/tree-utils/insert-instance.test.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { insertInstanceMutable } from "./insert-instance"; import { createInstance } from "./create-instance"; diff --git a/apps/designer/app/shared/tree-utils/insert-instance.ts b/apps/designer/app/shared/tree-utils/insert-instance.ts index d801ab452f..e65f793877 100644 --- a/apps/designer/app/shared/tree-utils/insert-instance.ts +++ b/apps/designer/app/shared/tree-utils/insert-instance.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; export type InstanceInsertionSpec = { parentId: Instance["id"]; diff --git a/apps/designer/app/shared/tree-utils/populate.ts b/apps/designer/app/shared/tree-utils/populate.ts index 60ffb271d7..7329f4df0a 100644 --- a/apps/designer/app/shared/tree-utils/populate.ts +++ b/apps/designer/app/shared/tree-utils/populate.ts @@ -1,4 +1,4 @@ -import { type Instance } from "@webstudio-is/sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { primitives } from "~/shared/canvas-components"; /** diff --git a/apps/designer/app/shared/tree-utils/set-instance-children.ts b/apps/designer/app/shared/tree-utils/set-instance-children.ts index 55d6ce4b49..6c0db9da76 100644 --- a/apps/designer/app/shared/tree-utils/set-instance-children.ts +++ b/apps/designer/app/shared/tree-utils/set-instance-children.ts @@ -1,5 +1,5 @@ -import { type ChildrenUpdates } from "@webstudio-is/sdk"; -import { type Instance } from "@webstudio-is/sdk"; +import { type ChildrenUpdates } from "@webstudio-is/react-sdk"; +import { type Instance } from "@webstudio-is/react-sdk"; import { createInstance } from "./create-instance"; import { findInstanceById } from "./find-instance"; diff --git a/apps/designer/app/shared/tree-utils/set-instance-style.ts b/apps/designer/app/shared/tree-utils/set-instance-style.ts index ad0b3c8f13..193bd482ec 100644 --- a/apps/designer/app/shared/tree-utils/set-instance-style.ts +++ b/apps/designer/app/shared/tree-utils/set-instance-style.ts @@ -1,4 +1,4 @@ -import { Breakpoint, type Instance } from "@webstudio-is/sdk"; +import { Breakpoint, type Instance } from "@webstudio-is/react-sdk"; import { type StyleUpdates } from "~/shared/canvas-components"; import { findInstanceById } from "./find-instance"; diff --git a/apps/designer/package.json b/apps/designer/package.json index b37a66cd6e..6c064b6831 100644 --- a/apps/designer/package.json +++ b/apps/designer/package.json @@ -9,7 +9,7 @@ "typecheck": "tsc -b", "lint": "eslint . --ext .ts,.tsx --max-warnings 0", "test": "jest", - "setup": "cp ../../node_modules/@webstudio-is/sdk/prisma/schema.prisma prisma/ && yarn migrate && yarn generate", + "setup": "cp ../../node_modules/@webstudio-is/react-sdk/prisma/schema.prisma prisma/ && yarn migrate && yarn generate", "checks": "yarn lint && yarn typecheck && yarn prettier --check && yarn test", "migrate": "prisma migrate dev", "generate": "prisma generate", @@ -55,7 +55,7 @@ "@sentry/remix": "^7.5.0", "@stitches/react": "^1.2.7", "@vercel/node": "^2.4.1", - "@webstudio-is/sdk": "*", + "@webstudio-is/react-sdk": "*", "bson-objectid": "^2.0.2", "camelcase": "^6.3.0", "debug": "^4.3.4", diff --git a/packages/webstudio-sdk/.gitignore b/packages/webstudio-react-sdk/.gitignore similarity index 100% rename from packages/webstudio-sdk/.gitignore rename to packages/webstudio-react-sdk/.gitignore diff --git a/packages/webstudio-sdk/.storybook/main.js b/packages/webstudio-react-sdk/.storybook/main.js similarity index 100% rename from packages/webstudio-sdk/.storybook/main.js rename to packages/webstudio-react-sdk/.storybook/main.js diff --git a/packages/webstudio-sdk/.storybook/preview.js b/packages/webstudio-react-sdk/.storybook/preview.js similarity index 100% rename from packages/webstudio-sdk/.storybook/preview.js rename to packages/webstudio-react-sdk/.storybook/preview.js diff --git a/packages/webstudio-sdk/LICENSE b/packages/webstudio-react-sdk/LICENSE similarity index 100% rename from packages/webstudio-sdk/LICENSE rename to packages/webstudio-react-sdk/LICENSE diff --git a/packages/webstudio-sdk/README.md b/packages/webstudio-react-sdk/README.md similarity index 100% rename from packages/webstudio-sdk/README.md rename to packages/webstudio-react-sdk/README.md diff --git a/packages/webstudio-sdk/bin/generate-arg-types.ts b/packages/webstudio-react-sdk/bin/generate-arg-types.ts similarity index 100% rename from packages/webstudio-sdk/bin/generate-arg-types.ts rename to packages/webstudio-react-sdk/bin/generate-arg-types.ts diff --git a/packages/webstudio-sdk/bin/mdn-data.ts b/packages/webstudio-react-sdk/bin/mdn-data.ts similarity index 100% rename from packages/webstudio-sdk/bin/mdn-data.ts rename to packages/webstudio-react-sdk/bin/mdn-data.ts diff --git a/packages/webstudio-sdk/bin/popularity-index.ts b/packages/webstudio-react-sdk/bin/popularity-index.ts similarity index 100% rename from packages/webstudio-sdk/bin/popularity-index.ts rename to packages/webstudio-react-sdk/bin/popularity-index.ts diff --git a/packages/webstudio-sdk/jest.config.js b/packages/webstudio-react-sdk/jest.config.js similarity index 100% rename from packages/webstudio-sdk/jest.config.js rename to packages/webstudio-react-sdk/jest.config.js diff --git a/packages/webstudio-sdk/package.json b/packages/webstudio-react-sdk/package.json similarity index 96% rename from packages/webstudio-sdk/package.json rename to packages/webstudio-react-sdk/package.json index 5631295df0..82f8ef3b18 100644 --- a/packages/webstudio-sdk/package.json +++ b/packages/webstudio-react-sdk/package.json @@ -1,9 +1,8 @@ { - "name": "@webstudio-is/sdk", + "name": "@webstudio-is/react-sdk", "version": "0.5.0", "description": "Webstudio JavaScript / TypeScript API", "author": "Webstudio ", - "repository": "git@github.com:webstudio-is/webstudio-sdk.git", "homepage": "https://webstudio.is", "scripts": { "build": "yarn build:mdn-data && yarn build:args", diff --git a/packages/webstudio-sdk/prisma/schema.prisma b/packages/webstudio-react-sdk/prisma/schema.prisma similarity index 100% rename from packages/webstudio-sdk/prisma/schema.prisma rename to packages/webstudio-react-sdk/prisma/schema.prisma diff --git a/packages/webstudio-sdk/src/arg-types/utils.ts b/packages/webstudio-react-sdk/src/arg-types/utils.ts similarity index 100% rename from packages/webstudio-sdk/src/arg-types/utils.ts rename to packages/webstudio-react-sdk/src/arg-types/utils.ts diff --git a/packages/webstudio-sdk/src/components/bold.props.json b/packages/webstudio-react-sdk/src/components/bold.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/bold.props.json rename to packages/webstudio-react-sdk/src/components/bold.props.json diff --git a/packages/webstudio-sdk/src/components/bold.stories.tsx b/packages/webstudio-react-sdk/src/components/bold.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/bold.stories.tsx rename to packages/webstudio-react-sdk/src/components/bold.stories.tsx diff --git a/packages/webstudio-sdk/src/components/bold.tsx b/packages/webstudio-react-sdk/src/components/bold.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/bold.tsx rename to packages/webstudio-react-sdk/src/components/bold.tsx diff --git a/packages/webstudio-sdk/src/components/box.props.json b/packages/webstudio-react-sdk/src/components/box.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/box.props.json rename to packages/webstudio-react-sdk/src/components/box.props.json diff --git a/packages/webstudio-sdk/src/components/box.stories.tsx b/packages/webstudio-react-sdk/src/components/box.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/box.stories.tsx rename to packages/webstudio-react-sdk/src/components/box.stories.tsx diff --git a/packages/webstudio-sdk/src/components/box.tsx b/packages/webstudio-react-sdk/src/components/box.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/box.tsx rename to packages/webstudio-react-sdk/src/components/box.tsx diff --git a/packages/webstudio-sdk/src/components/button.props.json b/packages/webstudio-react-sdk/src/components/button.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/button.props.json rename to packages/webstudio-react-sdk/src/components/button.props.json diff --git a/packages/webstudio-sdk/src/components/button.stories.tsx b/packages/webstudio-react-sdk/src/components/button.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/button.stories.tsx rename to packages/webstudio-react-sdk/src/components/button.stories.tsx diff --git a/packages/webstudio-sdk/src/components/button.tsx b/packages/webstudio-react-sdk/src/components/button.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/button.tsx rename to packages/webstudio-react-sdk/src/components/button.tsx diff --git a/packages/webstudio-sdk/src/components/form.props.json b/packages/webstudio-react-sdk/src/components/form.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/form.props.json rename to packages/webstudio-react-sdk/src/components/form.props.json diff --git a/packages/webstudio-sdk/src/components/form.stories.tsx b/packages/webstudio-react-sdk/src/components/form.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/form.stories.tsx rename to packages/webstudio-react-sdk/src/components/form.stories.tsx diff --git a/packages/webstudio-sdk/src/components/form.tsx b/packages/webstudio-react-sdk/src/components/form.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/form.tsx rename to packages/webstudio-react-sdk/src/components/form.tsx diff --git a/packages/webstudio-sdk/src/components/heading.props.json b/packages/webstudio-react-sdk/src/components/heading.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/heading.props.json rename to packages/webstudio-react-sdk/src/components/heading.props.json diff --git a/packages/webstudio-sdk/src/components/heading.stories.tsx b/packages/webstudio-react-sdk/src/components/heading.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/heading.stories.tsx rename to packages/webstudio-react-sdk/src/components/heading.stories.tsx diff --git a/packages/webstudio-sdk/src/components/heading.tsx b/packages/webstudio-react-sdk/src/components/heading.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/heading.tsx rename to packages/webstudio-react-sdk/src/components/heading.tsx diff --git a/packages/webstudio-sdk/src/components/index.ts b/packages/webstudio-react-sdk/src/components/index.ts similarity index 100% rename from packages/webstudio-sdk/src/components/index.ts rename to packages/webstudio-react-sdk/src/components/index.ts diff --git a/packages/webstudio-sdk/src/components/input.props.json b/packages/webstudio-react-sdk/src/components/input.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/input.props.json rename to packages/webstudio-react-sdk/src/components/input.props.json diff --git a/packages/webstudio-sdk/src/components/input.stories.tsx b/packages/webstudio-react-sdk/src/components/input.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/input.stories.tsx rename to packages/webstudio-react-sdk/src/components/input.stories.tsx diff --git a/packages/webstudio-sdk/src/components/input.tsx b/packages/webstudio-react-sdk/src/components/input.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/input.tsx rename to packages/webstudio-react-sdk/src/components/input.tsx diff --git a/packages/webstudio-sdk/src/components/italic.props.json b/packages/webstudio-react-sdk/src/components/italic.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/italic.props.json rename to packages/webstudio-react-sdk/src/components/italic.props.json diff --git a/packages/webstudio-sdk/src/components/italic.stories.tsx b/packages/webstudio-react-sdk/src/components/italic.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/italic.stories.tsx rename to packages/webstudio-react-sdk/src/components/italic.stories.tsx diff --git a/packages/webstudio-sdk/src/components/italic.tsx b/packages/webstudio-react-sdk/src/components/italic.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/italic.tsx rename to packages/webstudio-react-sdk/src/components/italic.tsx diff --git a/packages/webstudio-sdk/src/components/link.props.json b/packages/webstudio-react-sdk/src/components/link.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/link.props.json rename to packages/webstudio-react-sdk/src/components/link.props.json diff --git a/packages/webstudio-sdk/src/components/link.stories.tsx b/packages/webstudio-react-sdk/src/components/link.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/link.stories.tsx rename to packages/webstudio-react-sdk/src/components/link.stories.tsx diff --git a/packages/webstudio-sdk/src/components/link.tsx b/packages/webstudio-react-sdk/src/components/link.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/link.tsx rename to packages/webstudio-react-sdk/src/components/link.tsx diff --git a/packages/webstudio-sdk/src/components/meta.ts b/packages/webstudio-react-sdk/src/components/meta.ts similarity index 100% rename from packages/webstudio-sdk/src/components/meta.ts rename to packages/webstudio-react-sdk/src/components/meta.ts diff --git a/packages/webstudio-sdk/src/components/paragraph.props.json b/packages/webstudio-react-sdk/src/components/paragraph.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/paragraph.props.json rename to packages/webstudio-react-sdk/src/components/paragraph.props.json diff --git a/packages/webstudio-sdk/src/components/paragraph.stories.tsx b/packages/webstudio-react-sdk/src/components/paragraph.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/paragraph.stories.tsx rename to packages/webstudio-react-sdk/src/components/paragraph.stories.tsx diff --git a/packages/webstudio-sdk/src/components/paragraph.tsx b/packages/webstudio-react-sdk/src/components/paragraph.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/paragraph.tsx rename to packages/webstudio-react-sdk/src/components/paragraph.tsx diff --git a/packages/webstudio-sdk/src/components/text-block.props.json b/packages/webstudio-react-sdk/src/components/text-block.props.json similarity index 100% rename from packages/webstudio-sdk/src/components/text-block.props.json rename to packages/webstudio-react-sdk/src/components/text-block.props.json diff --git a/packages/webstudio-sdk/src/components/text-block.stories.tsx b/packages/webstudio-react-sdk/src/components/text-block.stories.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/text-block.stories.tsx rename to packages/webstudio-react-sdk/src/components/text-block.stories.tsx diff --git a/packages/webstudio-sdk/src/components/text-block.tsx b/packages/webstudio-react-sdk/src/components/text-block.tsx similarity index 100% rename from packages/webstudio-sdk/src/components/text-block.tsx rename to packages/webstudio-react-sdk/src/components/text-block.tsx diff --git a/packages/webstudio-sdk/src/css/breakpoints.ts b/packages/webstudio-react-sdk/src/css/breakpoints.ts similarity index 100% rename from packages/webstudio-sdk/src/css/breakpoints.ts rename to packages/webstudio-react-sdk/src/css/breakpoints.ts diff --git a/packages/webstudio-sdk/src/css/categories.ts b/packages/webstudio-react-sdk/src/css/categories.ts similarity index 100% rename from packages/webstudio-sdk/src/css/categories.ts rename to packages/webstudio-react-sdk/src/css/categories.ts diff --git a/packages/webstudio-sdk/src/css/get-browser-style.ts b/packages/webstudio-react-sdk/src/css/get-browser-style.ts similarity index 100% rename from packages/webstudio-sdk/src/css/get-browser-style.ts rename to packages/webstudio-react-sdk/src/css/get-browser-style.ts diff --git a/packages/webstudio-sdk/src/css/index.ts b/packages/webstudio-react-sdk/src/css/index.ts similarity index 100% rename from packages/webstudio-sdk/src/css/index.ts rename to packages/webstudio-react-sdk/src/css/index.ts diff --git a/packages/webstudio-sdk/src/css/keyword-values.ts b/packages/webstudio-react-sdk/src/css/keyword-values.ts similarity index 100% rename from packages/webstudio-sdk/src/css/keyword-values.ts rename to packages/webstudio-react-sdk/src/css/keyword-values.ts diff --git a/packages/webstudio-sdk/src/css/properties.ts b/packages/webstudio-react-sdk/src/css/properties.ts similarity index 100% rename from packages/webstudio-sdk/src/css/properties.ts rename to packages/webstudio-react-sdk/src/css/properties.ts diff --git a/packages/webstudio-sdk/src/css/schema.ts b/packages/webstudio-react-sdk/src/css/schema.ts similarity index 100% rename from packages/webstudio-sdk/src/css/schema.ts rename to packages/webstudio-react-sdk/src/css/schema.ts diff --git a/packages/webstudio-sdk/src/css/types.ts b/packages/webstudio-react-sdk/src/css/types.ts similarity index 100% rename from packages/webstudio-sdk/src/css/types.ts rename to packages/webstudio-react-sdk/src/css/types.ts diff --git a/packages/webstudio-sdk/src/css/units.ts b/packages/webstudio-react-sdk/src/css/units.ts similarity index 100% rename from packages/webstudio-sdk/src/css/units.ts rename to packages/webstudio-react-sdk/src/css/units.ts diff --git a/packages/webstudio-sdk/src/db/index.ts b/packages/webstudio-react-sdk/src/db/index.ts similarity index 100% rename from packages/webstudio-sdk/src/db/index.ts rename to packages/webstudio-react-sdk/src/db/index.ts diff --git a/packages/webstudio-sdk/src/db/instance.ts b/packages/webstudio-react-sdk/src/db/instance.ts similarity index 100% rename from packages/webstudio-sdk/src/db/instance.ts rename to packages/webstudio-react-sdk/src/db/instance.ts diff --git a/packages/webstudio-sdk/src/db/types.ts b/packages/webstudio-react-sdk/src/db/types.ts similarity index 100% rename from packages/webstudio-sdk/src/db/types.ts rename to packages/webstudio-react-sdk/src/db/types.ts diff --git a/packages/webstudio-sdk/src/index.ts b/packages/webstudio-react-sdk/src/index.ts similarity index 100% rename from packages/webstudio-sdk/src/index.ts rename to packages/webstudio-react-sdk/src/index.ts diff --git a/packages/webstudio-sdk/src/prisma.server.ts b/packages/webstudio-react-sdk/src/prisma.server.ts similarity index 100% rename from packages/webstudio-sdk/src/prisma.server.ts rename to packages/webstudio-react-sdk/src/prisma.server.ts diff --git a/packages/webstudio-sdk/src/pubsub/index.ts b/packages/webstudio-react-sdk/src/pubsub/index.ts similarity index 100% rename from packages/webstudio-sdk/src/pubsub/index.ts rename to packages/webstudio-react-sdk/src/pubsub/index.ts diff --git a/packages/webstudio-sdk/src/pubsub/publish.ts b/packages/webstudio-react-sdk/src/pubsub/publish.ts similarity index 100% rename from packages/webstudio-sdk/src/pubsub/publish.ts rename to packages/webstudio-react-sdk/src/pubsub/publish.ts diff --git a/packages/webstudio-sdk/src/pubsub/subscribe.ts b/packages/webstudio-react-sdk/src/pubsub/subscribe.ts similarity index 100% rename from packages/webstudio-sdk/src/pubsub/subscribe.ts rename to packages/webstudio-react-sdk/src/pubsub/subscribe.ts diff --git a/packages/webstudio-sdk/src/stitches/critical-css.tsx b/packages/webstudio-react-sdk/src/stitches/critical-css.tsx similarity index 100% rename from packages/webstudio-sdk/src/stitches/critical-css.tsx rename to packages/webstudio-react-sdk/src/stitches/critical-css.tsx diff --git a/packages/webstudio-sdk/src/stitches/css.ts b/packages/webstudio-react-sdk/src/stitches/css.ts similarity index 100% rename from packages/webstudio-sdk/src/stitches/css.ts rename to packages/webstudio-react-sdk/src/stitches/css.ts diff --git a/packages/webstudio-sdk/src/stitches/index.ts b/packages/webstudio-react-sdk/src/stitches/index.ts similarity index 100% rename from packages/webstudio-sdk/src/stitches/index.ts rename to packages/webstudio-react-sdk/src/stitches/index.ts diff --git a/packages/webstudio-sdk/src/stitches/to-css.test.ts b/packages/webstudio-react-sdk/src/stitches/to-css.test.ts similarity index 100% rename from packages/webstudio-sdk/src/stitches/to-css.test.ts rename to packages/webstudio-react-sdk/src/stitches/to-css.test.ts diff --git a/packages/webstudio-sdk/src/stitches/to-css.ts b/packages/webstudio-react-sdk/src/stitches/to-css.ts similarity index 100% rename from packages/webstudio-sdk/src/stitches/to-css.ts rename to packages/webstudio-react-sdk/src/stitches/to-css.ts diff --git a/packages/webstudio-sdk/src/tree/create-elements-tree.tsx b/packages/webstudio-react-sdk/src/tree/create-elements-tree.tsx similarity index 100% rename from packages/webstudio-sdk/src/tree/create-elements-tree.tsx rename to packages/webstudio-react-sdk/src/tree/create-elements-tree.tsx diff --git a/packages/webstudio-sdk/src/tree/index.ts b/packages/webstudio-react-sdk/src/tree/index.ts similarity index 100% rename from packages/webstudio-sdk/src/tree/index.ts rename to packages/webstudio-react-sdk/src/tree/index.ts diff --git a/packages/webstudio-sdk/src/tree/root.ts b/packages/webstudio-react-sdk/src/tree/root.ts similarity index 100% rename from packages/webstudio-sdk/src/tree/root.ts rename to packages/webstudio-react-sdk/src/tree/root.ts diff --git a/packages/webstudio-sdk/src/tree/wrapper-component.tsx b/packages/webstudio-react-sdk/src/tree/wrapper-component.tsx similarity index 100% rename from packages/webstudio-sdk/src/tree/wrapper-component.tsx rename to packages/webstudio-react-sdk/src/tree/wrapper-component.tsx diff --git a/packages/webstudio-sdk/src/user-props/all-user-props.ts b/packages/webstudio-react-sdk/src/user-props/all-user-props.ts similarity index 100% rename from packages/webstudio-sdk/src/user-props/all-user-props.ts rename to packages/webstudio-react-sdk/src/user-props/all-user-props.ts diff --git a/packages/webstudio-sdk/src/user-props/index.ts b/packages/webstudio-react-sdk/src/user-props/index.ts similarity index 100% rename from packages/webstudio-sdk/src/user-props/index.ts rename to packages/webstudio-react-sdk/src/user-props/index.ts diff --git a/packages/webstudio-sdk/src/user-props/schema.ts b/packages/webstudio-react-sdk/src/user-props/schema.ts similarity index 100% rename from packages/webstudio-sdk/src/user-props/schema.ts rename to packages/webstudio-react-sdk/src/user-props/schema.ts diff --git a/packages/webstudio-sdk/src/user-props/types.ts b/packages/webstudio-react-sdk/src/user-props/types.ts similarity index 100% rename from packages/webstudio-sdk/src/user-props/types.ts rename to packages/webstudio-react-sdk/src/user-props/types.ts diff --git a/packages/webstudio-sdk/src/user-props/use-user-props.ts b/packages/webstudio-react-sdk/src/user-props/use-user-props.ts similarity index 100% rename from packages/webstudio-sdk/src/user-props/use-user-props.ts rename to packages/webstudio-react-sdk/src/user-props/use-user-props.ts diff --git a/packages/webstudio-sdk/tsconfig.json b/packages/webstudio-react-sdk/tsconfig.json similarity index 100% rename from packages/webstudio-sdk/tsconfig.json rename to packages/webstudio-react-sdk/tsconfig.json