Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
fix types, enable async imports in ts
Oleg Isonend99adaf32924
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.tsxindex 6f630ab5f9..3f1d2910cf 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@@ -12,7 +12,7 @@ import { config } from "./config";import { useEffect } from "react";import { useSelectedElement } from "~/canvas/shared/nano-states";-type EditorProps = {+export type EditorProps = {editable: JSX.Element;instance: Instance;onChange: (updates: ChildrenUpdates) => void;@@ -41,7 +41,7 @@ const Editor = ({ instance, editable, onChange }: EditorProps) => {);};-const EditorConfigured = (props) => {+const EditorConfigured = (props: EditorProps) => {return (<LexicalComposer initialConfig={config}><Editor {...props} />diff --git a/apps/designer/app/canvas/features/wrapper-component/text-editor/lazy-editor.tsx b/apps/designer/app/canvas/features/wrapper-component/text-editor/lazy-editor.tsxindex 6d4ef29815..9ddfbab3a5 100644--- a/apps/designer/app/canvas/features/wrapper-component/text-editor/lazy-editor.tsx+++ b/apps/designer/app/canvas/features/wrapper-component/text-editor/lazy-editor.tsx@@ -1,10 +1,11 @@-import { memo, lazy, Suspense } from "react";+import { memo, lazy, Suspense, ComponentProps } from "react";+import type { EditorProps } from "./editor";const EditorLazy = lazy(() => import("./editor"));-const EditorWithSuspense = (props) => {+const EditorWithSuspense = (props: EditorProps) => {return (- <Suspense fallback={<div>Loading...</div>}>+ <Suspense fallback={props.editable}><EditorLazy {...props} /></Suspense>);diff --git a/packages/tsconfig/remix.json b/packages/tsconfig/remix.jsonindex aa57d759c2..80cd315097 100644--- a/packages/tsconfig/remix.json+++ b/packages/tsconfig/remix.json@@ -5,8 +5,9 @@"compilerOptions": {"noEmit": true,"jsx": "react-jsx",- "target": "ES2019",- "lib": ["DOM", "DOM.Iterable", "ES2019"]+ "target": "ES2020",+ "module": "ES2020",+ "lib": ["DOM", "DOM.Iterable", "ES2020"]},"include": ["app", "remix.env.d.ts"],"exclude": ["node_modules"]