diff --git a/studio/components/interfaces/SQLEditor/AskAIWidget.tsx b/studio/components/interfaces/SQLEditor/AskAIWidget.tsx index b76b893e063..917fd1fc8b4 100644 --- a/studio/components/interfaces/SQLEditor/AskAIWidget.tsx +++ b/studio/components/interfaces/SQLEditor/AskAIWidget.tsx @@ -1,4 +1,4 @@ -import { motion } from 'framer-motion' +import { m } from 'framer-motion' import { useCallback } from 'react' import { AiIcon, IconCornerDownLeft, Input } from 'ui' @@ -11,12 +11,12 @@ const AskAIWidget = () => { }, []) return ( - - + { } /> - + AI generated code may be incorrect. - + ) } diff --git a/studio/components/interfaces/SQLEditor/SQLEditor.tsx b/studio/components/interfaces/SQLEditor/SQLEditor.tsx index 696b240d91e..3ef74a0d503 100644 --- a/studio/components/interfaces/SQLEditor/SQLEditor.tsx +++ b/studio/components/interfaces/SQLEditor/SQLEditor.tsx @@ -2,7 +2,7 @@ import { useParams } from 'common' import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext' import { useSqlEditMutation } from 'data/ai/sql-edit-mutation' import { useExecuteSqlMutation } from 'data/sql/execute-sql-mutation' -import { motion } from 'framer-motion' +import { m } from 'framer-motion' import { useLocalStorage, useStore } from 'hooks' import useLatest from 'hooks/misc/useLatest' import dynamic from 'next/dynamic' @@ -168,7 +168,7 @@ const SQLEditor = () => { return (
{!isEditSqlLoading ? ( - { disabled={isDiffOpen} inputRef={inputRef} icon={ - { }} > - + } inputClassName="w-full !border-brand-900 border-none py-4 focus:!ring-0 placeholder:text-scale-900" iconContainerClassName="transition text-scale-800 text-brand-900" @@ -296,9 +296,9 @@ const SQLEditor = () => { } }} /> - + ) : ( - { damping: 30, }} > - { }} > - - + + )} { collapsed={isUtilityPanelCollapsed ? 1 : undefined} onDragEnd={onDragEnd} > - { ) : ( <> {isDiffOpen && ( - { fontSize: 13, }} /> - + )} - @@ -399,10 +399,10 @@ const SQLEditor = () => { // onOpenAiWidget={() => setIsAiWidgetOpen(true)} // onCloseAiWidget={() => setIsAiWidgetOpen(false)} /> - + )} - +
{isLoading ? (
Loading...
diff --git a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLTemplates.tsx b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLTemplates.tsx index a2b54e78be8..fa8ef4ff3c2 100644 --- a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLTemplates.tsx +++ b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLTemplates.tsx @@ -3,14 +3,13 @@ import { partition } from 'lodash' import { observer } from 'mobx-react-lite' import { useParams, useTelemetryProps } from 'common' -import { stripIndent } from 'common-tags' import { SQL_TEMPLATES, sqlAiDisclaimerComment, } from 'components/interfaces/SQLEditor/SQLEditor.constants' import { useSqlGenerateMutation } from 'data/ai/sql-generate-mutation' import { SqlSnippet } from 'data/content/sql-snippets-query' -import { motion } from 'framer-motion' +import { m } from 'framer-motion' import { useCheckPermissions, useStore } from 'hooks' import { uuidv4 } from 'lib/helpers' import { useProfile } from 'lib/profile' @@ -64,16 +63,16 @@ const SQLTemplates = observer(() => { return (
- What do you want to build? - +
{!isSqlGenerateLoading ? ( - { }, 200) }} icon={ - { }} > - + } inputClassName="w-full border-none py-4 focus:!ring-0" iconContainerClassName="transition text-scale-800 text-brand-900" @@ -155,9 +154,9 @@ const SQLTemplates = observer(() => {
} /> - + ) : ( - { damping: 30, }} > - { }} > - - + + )}
diff --git a/studio/pages/_app.tsx b/studio/pages/_app.tsx index 6051ab68387..4fd2df38d7e 100644 --- a/studio/pages/_app.tsx +++ b/studio/pages/_app.tsx @@ -54,6 +54,9 @@ import Favicons from 'components/head/Favicons' import { IS_PLATFORM } from 'lib/constants' import { SessionContextProvider } from '@supabase/auth-helpers-react' import { createClient } from '@supabase/supabase-js' +import { LazyMotion } from 'framer-motion' + +const motionFeatures = () => import('./motion-features').then((res) => res.default) dayjs.extend(customParseFormat) dayjs.extend(utc) @@ -143,7 +146,9 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) { - {getLayout()} + + {getLayout()} + diff --git a/studio/pages/motion-features.ts b/studio/pages/motion-features.ts new file mode 100644 index 00000000000..1c8f87e9fe2 --- /dev/null +++ b/studio/pages/motion-features.ts @@ -0,0 +1,2 @@ +import { domMax } from 'framer-motion' +export default domMax