The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Refactor `EditSecretModal` to use shadcn components (#37258)
Drake Costad6fe8476f334
diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/EditSecretModal.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/EditSecretModal.tsxindex 02bc97521dd..b87b8782648 100644--- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/EditSecretModal.tsx+++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/EditSecretModal.tsx@@ -1,158 +1,207 @@-import { isEmpty } from 'lodash'-import { Eye, EyeOff } from 'lucide-react'-import { useEffect, useState } from 'react'+import { useState } from 'react'+import { EyeOff, Eye } from 'lucide-react'+import { type SubmitHandler, useForm } from 'react-hook-form'+import { zodResolver } from '@hookform/resolvers/zod'+import { z } from 'zod'import { toast } from 'sonner'+import {+ Button,+ Dialog,+ DialogContent,+ DialogFooter,+ DialogHeader,+ DialogSection,+ DialogSectionSeparator,+ DialogTitle,+ Form_Shadcn_,+ FormControl_Shadcn_,+ FormField_Shadcn_,+ Input_Shadcn_,+} from 'ui'+import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'import { useVaultSecretDecryptedValueQuery } from 'data/vault/vault-secret-decrypted-value-query'import { useVaultSecretUpdateMutation } from 'data/vault/vault-secret-update-mutation'import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'import type { VaultSecret } from 'types'-import { Button, Form, Input, Modal } from 'ui'interface EditSecretModalProps {- selectedSecret: VaultSecret | undefined+ visible: boolean+ secret: VaultSecretonClose: () => void}-const EditSecretModal = ({ selectedSecret, onClose }: EditSecretModalProps) => {- const { data: project } = useSelectedProjectQuery()- const [showSecretValue, setShowSecretValue] = useState(false)+const SecretSchema = z.object({+ name: z.string().min(1, 'Please provide a name for your secret'),+ description: z.string().optional(),+ secret: z.string().min(1, 'Please enter your secret value'),+})- const { mutateAsync: updateSecret } = useVaultSecretUpdateMutation()+const formId = 'edit-vault-secret-form'- let INITIAL_VALUES = {- name: selectedSecret?.name ?? '',- description: selectedSecret?.description ?? '',- secret: selectedSecret?.decryptedSecret ?? '',+const EditSecretModal = ({ visible, secret, onClose }: EditSecretModalProps) => {+ const [showSecretValue, setShowSecretValue] = useState(false)+ const { data: project } = useSelectedProjectQuery()+ const { data, isLoading: isLoadingSecretValue } = useVaultSecretDecryptedValueQuery(+ {+ projectRef: project?.ref,+ id: secret.id,+ connectionString: project?.connectionString,+ },+ { enabled: !!project?.ref }+ )+ const values = {+ name: secret.name ?? '',+ description: secret.description ?? '',+ secret: secret.decryptedSecret ?? data ?? '',}+ const form = useForm<z.infer<typeof SecretSchema>>({+ resolver: zodResolver(SecretSchema),+ defaultValues: values,+ values,+ })- useEffect(() => {- if (selectedSecret !== undefined) {- setShowSecretValue(false)- }- }, [selectedSecret])-- const validate = (values: any) => {- const errors: any = {}- if (values.name.length === 0) errors.name = 'Please provide a name for your secret'- if (values.secret.length === 0) errors.secret = 'Please enter your secret value'- return errors- }+ const { mutate: updateSecret, isLoading: isSubmitting } = useVaultSecretUpdateMutation()- const onUpdateSecret = async (values: any, { setSubmitting }: any) => {+ const onSubmit: SubmitHandler<z.infer<typeof SecretSchema>> = async (values) => {if (!project) return console.error('Project is required')- try {- const payload: Partial<VaultSecret> = {}- if (values.name !== selectedSecret?.name) payload.name = values.name- if (values.description !== selectedSecret?.description)- payload.description = values.description- payload.secret = values.secret+ const payload: Partial<VaultSecret> = {+ secret: values.secret,+ }+ if (values.name !== secret.name) payload.name = values.name+ if (values.description !== secret.description) payload.description = values.description- if (!isEmpty(payload) && selectedSecret) {- setSubmitting(true)- const res = await updateSecret({+ if (Object.keys(payload).length > 0) {+ updateSecret(+ {projectRef: project.ref,connectionString: project?.connectionString,- id: selectedSecret.id,+ id: secret.id,...payload,- })- if (!res.error) {- toast.success('Successfully updated secret')- setSubmitting(false)- onClose()- } else {- toast.error(`Failed to update secret: ${res.error.message}`)- setSubmitting(false)+ },+ {+ onSuccess: () => {+ toast.success('Successfully updated secret')+ onClose()+ },+ onError: (error) => {+ toast.error(`Failed to update secret: ${error.message}`)+ },}- }- } finally {+ )}}return (- <Modal- hideFooter- size="medium"- visible={selectedSecret !== undefined}- onCancel={onClose}- header={<h5 className="text-sm text-foreground">Edit secret</h5>}+ <Dialog+ open={visible}+ onOpenChange={(open) => {+ if (!open) {+ form.reset()+ onClose()+ }+ }}>- <Form- id="add-new-secret-form"- initialValues={INITIAL_VALUES}- validate={validate}- validateOnBlur={false}- onSubmit={onUpdateSecret}- >- {({ isSubmitting, resetForm }: any) => {- const {- data,- isLoading: isLoadingSecretValue,- isSuccess: isSuccessSecretValue,- // [Joshen] JFYI this is breaking rules of hooks, will be fixed once we move to- // using react hook form instead- // eslint-disable-next-line react-hooks/rules-of-hooks- } = useVaultSecretDecryptedValueQuery(- {- projectRef: project?.ref!,- id: selectedSecret?.id!,- connectionString: project?.connectionString,- },- { enabled: selectedSecret !== undefined && !!(project?.ref && selectedSecret?.id) }- )-- // [Joshen] JFYI this is breaking rules of hooks, will be fixed once we move to- // using react hook form instead- // eslint-disable-next-line react-hooks/rules-of-hooks- useEffect(() => {- if (selectedSecret !== undefined && isSuccessSecretValue) {- resetForm({- values: { ...INITIAL_VALUES, secret: data },- initialValues: { ...INITIAL_VALUES, secret: data },- })- }- }, [selectedSecret, isSuccessSecretValue])-- return isLoadingSecretValue ? (- <Modal.Content>- <GenericSkeletonLoader />- </Modal.Content>- ) : (- <>- <Modal.Content className="space-y-4">- <Input id="name" label="Name" />- <Input id="description" label="Description" labelOptional="Optional" />- <Input- id="secret"- type={showSecretValue ? 'text' : 'password'}- label="Secret value"- actions={- <div className="mr-1">- <Button- type="default"- icon={showSecretValue ? <EyeOff /> : <Eye />}- onClick={() => setShowSecretValue(!showSecretValue)}- />- </div>- }- />- </Modal.Content>- <Modal.Separator />- <Modal.Content className="flex items-center justify-end space-x-2">- <Button type="default" disabled={isSubmitting} onClick={() => onClose()}>- Cancel- </Button>- <Button htmlType="submit" disabled={isSubmitting} loading={isSubmitting}>- Update secret- </Button>- </Modal.Content>- </>- )- }}- </Form>- </Modal>+ <DialogContent>+ <DialogHeader>+ <DialogTitle>Edit secret</DialogTitle>+ </DialogHeader>+ <DialogSectionSeparator />+ {isLoadingSecretValue ? (+ <DialogSection>+ <GenericSkeletonLoader />+ </DialogSection>+ ) : (+ <>+ <DialogSection>+ <Form_Shadcn_ {...form}>+ <form+ id={formId}+ className="flex flex-col gap-4"+ autoComplete="off"+ onSubmit={form.handleSubmit(onSubmit)}+ >+ <FormField_Shadcn_+ key="name"+ name="name"+ control={form.control}+ render={({ field }) => (+ <FormItemLayout name="name" label="Name">+ <FormControl_Shadcn_>+ <Input_Shadcn_ id="name" {...field} />+ </FormControl_Shadcn_>+ </FormItemLayout>+ )}+ />+ <FormField_Shadcn_+ key="description"+ name="description"+ control={form.control}+ render={({ field }) => (+ <FormItemLayout+ name="description"+ label="Description"+ labelOptional="Optional"+ >+ <FormControl_Shadcn_>+ <Input_Shadcn_ id="description" {...field} data-lpignore="true" />+ </FormControl_Shadcn_>+ </FormItemLayout>+ )}+ />+ <FormField_Shadcn_+ key="secret"+ name="secret"+ control={form.control}+ render={({ field }) => (+ <FormItemLayout name="secret" label="Secret value">+ <FormControl_Shadcn_>+ <div className="relative">+ <Input_Shadcn_+ id="secret"+ type={showSecretValue ? 'text' : 'password'}+ {...field}+ data-lpignore="true"+ />+ <Button+ type="default"+ title={showSecretValue ? `Hide secret value` : `Show secret value`}+ aria-label={+ showSecretValue ? `Hide secret value` : `Show secret value`+ }+ className="absolute right-2 top-1 px-3 py-2"+ icon={showSecretValue ? <EyeOff /> : <Eye />}+ onClick={() => setShowSecretValue(!showSecretValue)}+ />+ </div>+ </FormControl_Shadcn_>+ </FormItemLayout>+ )}+ />+ </form>+ </Form_Shadcn_>+ </DialogSection>+ <DialogFooter>+ <Button+ type="default"+ disabled={isSubmitting}+ onClick={() => {+ form.reset()+ onClose()+ }}+ >+ Cancel+ </Button>+ <Button form={formId} htmlType="submit" loading={isSubmitting}>+ Update secret+ </Button>+ </DialogFooter>+ </>+ )}+ </DialogContent>+ </Dialog>)}diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretRow.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretRow.tsxindex f7b1f5719ff..20a1ace90eb 100644--- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretRow.tsx+++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretRow.tsx@@ -19,17 +19,17 @@ import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'import { Edit3, Eye, EyeOff, Key, Loader, MoreVertical, Trash } from 'lucide-react'import type { VaultSecret } from 'types'+import EditSecretModal from './EditSecretModal'interface SecretRowProps {secret: VaultSecret- onSelectEdit: (secret: VaultSecret) => voidonSelectRemove: (secret: VaultSecret) => void}-const SecretRow = ({ secret, onSelectEdit, onSelectRemove }: SecretRowProps) => {+const SecretRow = ({ secret, onSelectRemove }: SecretRowProps) => {const { ref } = useParams()const { data: project } = useSelectedProjectQuery()-+ const [modal, setModal] = useState<string | null>(null)const [revealSecret, setRevealSecret] = useState(false)const name = secret?.name ?? 'No name provided'@@ -46,6 +46,8 @@ const SecretRow = ({ secret, onSelectEdit, onSelectRemove }: SecretRowProps) =>})+ const onCloseModal = () => setModal(null)+return (<div className="px-6 py-4 flex items-center space-x-4"><div className="space-y-1 min-w-[35%] max-w-[35%]">@@ -94,9 +96,10 @@ const SecretRow = ({ secret, onSelectEdit, onSelectRemove }: SecretRowProps) =>{secret.updated_at === secret.created_at ? 'Added' : 'Updated'} on{' '}{dayjs(secret.updated_at).format('MMM D, YYYY')}</p>+<DropdownMenu><DropdownMenuTrigger asChild>- <Button type="text" className="px-1" icon={<MoreVertical />} />+ <Button title="Manage Secret" type="text" className="px-1" icon={<MoreVertical />} /></DropdownMenuTrigger><DropdownMenuContent side="bottom" align="end" className="w-32"><Tooltip>@@ -104,7 +107,7 @@ const SecretRow = ({ secret, onSelectEdit, onSelectRemove }: SecretRowProps) =><DropdownMenuItemclassName="space-x-2"disabled={!canManageSecrets}- onClick={() => onSelectEdit(secret)}+ onClick={() => setModal(`edit`)}><Edit3 size="14" /><p>Edit</p>@@ -136,6 +139,8 @@ const SecretRow = ({ secret, onSelectEdit, onSelectRemove }: SecretRowProps) =></Tooltip></DropdownMenuContent></DropdownMenu>++ <EditSecretModal visible={modal === `edit`} secret={secret} onClose={onCloseModal} /></div></div>)diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsxindex 8484346130f..43388850602 100644--- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx+++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx@@ -9,22 +9,29 @@ import { DocsButton } from 'components/ui/DocsButton'import { useVaultSecretsQuery } from 'data/vault/vault-secrets-query'import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'-import type { VaultSecret } from 'types'-import { Button, Input, Listbox, Separator } from 'ui'+import {+ Button,+ Input,+ Select_Shadcn_,+ SelectContent_Shadcn_,+ SelectItem_Shadcn_,+ SelectTrigger_Shadcn_,+ SelectValue_Shadcn_,+ Separator,+} from 'ui'import AddNewSecretModal from './AddNewSecretModal'import DeleteSecretModal from './DeleteSecretModal'-import EditSecretModal from './EditSecretModal'import SecretRow from './SecretRow'+import type { VaultSecret } from 'types'export const SecretsManagement = () => {const { search } = useParams()const { data: project } = useSelectedProjectQuery()const [searchValue, setSearchValue] = useState<string>('')- const [selectedSort, setSelectedSort] = useState<'updated_at' | 'name'>('updated_at')const [showAddSecretModal, setShowAddSecretModal] = useState(false)- const [selectedSecretToEdit, setSelectedSecretToEdit] = useState<VaultSecret>()const [selectedSecretToRemove, setSelectedSecretToRemove] = useState<VaultSecret>()+ const [selectedSort, setSelectedSort] = useState('updated_at')const canManageSecrets = useCheckPermissions(PermissionAction.TENANT_SQL_ADMIN_WRITE, 'tables')@@ -49,7 +56,7 @@ export const SecretsManagement = () => {if (selectedSort === 'updated_at') {return Number(new Date(s.updated_at))} else {- return s[selectedSort]+ return s[selectedSort as keyof VaultSecret]}})@@ -81,26 +88,21 @@ export const SecretsManagement = () => {: []}/>- <div className="md:w-44">- <Listbox size="tiny" value={selectedSort} onChange={setSelectedSort}>- <Listbox.Option- id="updated_at"- className="max-w-[180px]"- value="updated_at"- label="Sort by updated at"- >+ <Select_Shadcn_ value={selectedSort} onValueChange={setSelectedSort}>+ <SelectTrigger_Shadcn_ size="tiny" className="md:w-44">+ <SelectValue_Shadcn_ asChild>+ <>Sort by {selectedSort}</>+ </SelectValue_Shadcn_>+ </SelectTrigger_Shadcn_>+ <SelectContent_Shadcn_>+ <SelectItem_Shadcn_ value="updated_at" className="text-xs">Updated at- </Listbox.Option>- <Listbox.Option- id="name"- className="max-w-[180px]"- value="name"- label="Sort by name"- >+ </SelectItem_Shadcn_>+ <SelectItem_Shadcn_ value="name" className="text-xs">Name- </Listbox.Option>- </Listbox>- </div>+ </SelectItem_Shadcn_>+ </SelectContent_Shadcn_>+ </Select_Shadcn_></div><div className="flex items-center gap-x-2"><DocsButton href="https://supabase.com/docs/guides/database/vault" />@@ -134,11 +136,7 @@ export const SecretsManagement = () => {{secrets.map((secret, idx) => {return (<Fragment key={`secret-${idx}`}>- <SecretRow- secret={secret}- onSelectEdit={setSelectedSecretToEdit}- onSelectRemove={setSelectedSecretToRemove}- />+ <SecretRow secret={secret} onSelectRemove={setSelectedSecretToRemove} />{idx !== secrets.length - 1 && <Separator />}</Fragment>)@@ -167,10 +165,6 @@ export const SecretsManagement = () => {</div></div>- <EditSecretModal- selectedSecret={selectedSecretToEdit}- onClose={() => setSelectedSecretToEdit(undefined)}- /><DeleteSecretModalselectedSecret={selectedSecretToRemove}onClose={() => setSelectedSecretToRemove(undefined)}diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/__tests__/EditSecretModal.test.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/__tests__/EditSecretModal.test.tsxnew file mode 100644index 00000000000..92fd59d67e1--- /dev/null+++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/__tests__/EditSecretModal.test.tsx@@ -0,0 +1,103 @@+import { useState } from 'react'+import { describe, expect, it, beforeEach, vi } from 'vitest'+import { mockAnimationsApi } from 'jsdom-testing-mocks'+import { screen, waitFor, fireEvent } from '@testing-library/dom'+import userEvent from '@testing-library/user-event'+import { render } from 'tests/helpers'+import { addAPIMock } from 'tests/lib/msw'+import { ProjectContextProvider } from 'components/layouts/ProjectLayout/ProjectContext'+import EditSecretModal from '../EditSecretModal'+import { routerMock } from 'tests/lib/route-mock'++const secret = {+ id: '47ca58b4-01c5-4a71-8814-c73856b02e0e',+ name: 'test',+ description: 'new text',+ secret: 'NASR0SoksURJ0OorMJ9FzraTzcqSWk5u1PQa2r4c3w9rUVc=',+ created_at: '2025-07-13 12:57:47.62208+00',+ updated_at: '2025-07-13 14:51:37.818223+00',+}++const Page = ({ onClose }: { onClose: () => void }) => {+ const [open, setOpen] = useState(false)++ return (+ <ProjectContextProvider projectRef="default">+ <button onClick={() => setOpen(true)}>Open</button>++ <EditSecretModal+ visible={open}+ secret={secret}+ onClose={() => {+ setOpen(false)+ onClose()+ }}+ />+ </ProjectContextProvider>+ )+}++mockAnimationsApi()++describe(`EditSecretModal`, () => {+ beforeEach(() => {+ // useSelectedProjectQuery -> useParams+ routerMock.setCurrentUrl(`/project/default/integrations/vault/secrets`)+ // 'http://localhost:3000/api/platform/projects/default'+ addAPIMock({+ method: `get`,+ path: `/platform/projects/:ref`,+ // @ts-expect-error+ response: {+ cloud_provider: 'localhost',+ id: 1,+ inserted_at: '2021-08-02T06:40:40.646Z',+ name: 'Default Project',+ organization_id: 1,+ ref: 'default',+ region: 'local',+ status: 'ACTIVE_HEALTHY',+ },+ })+ // 'http://localhost:3000/api/platform/pg-meta/default/query?key=projects-default-secrets-47ca58b4-01c5-4a71-8814-c73856b02e0e'+ // 'http://localhost:3000/api/platform/pg-meta/default/query?key='+ // useVaultSecretDecryptedValueQuery + useVaultSecretUpdateMutation+ // both call the same endpoint but execute different SQL queries+ addAPIMock({+ method: `post`,+ path: `/platform/pg-meta/:ref/query`,+ // @ts-expect-error this path erroneously has a `never` return type when it should be `unknown` since it executes a SQL query+ response: [{ decrypted_secret: 'bar', update_secret: '' }],+ })+ })++ it(`renders a modal pre-filled with the secret's values`, async () => {+ const onClose = vi.fn()+ render(<Page onClose={onClose} />)++ const openButton = screen.getByRole(`button`, { name: `Open` })+ await userEvent.click(openButton)++ await screen.findByRole(`dialog`)++ const nameInput = screen.getByLabelText(`Name`)+ const descriptionInput = screen.getByLabelText(`Description`)+ const valueInput = screen.getByLabelText(`Secret value`)+ const togglePasswordButton = screen.getByRole(`button`, { name: `Show secret value` })+ const submitButton = screen.getByRole(`button`, { name: `Update secret` })++ expect(nameInput).toHaveValue(secret.name)+ expect(descriptionInput).toHaveValue(secret.description)+ expect(valueInput).toHaveAttribute(`type`, `password`)+ await userEvent.click(togglePasswordButton)+ expect(valueInput).toHaveAttribute(`type`, `text`)++ await userEvent.type(nameInput, `updated-name`)+ await userEvent.clear(descriptionInput)+ await userEvent.type(valueInput, `qux`)++ fireEvent.click(submitButton)++ await waitFor(() => expect(onClose).toHaveBeenCalledOnce())+ })+})diff --git a/apps/studio/tests/lib/msw.ts b/apps/studio/tests/lib/msw.tsindex 383df91d8c8..070b38ff798 100644--- a/apps/studio/tests/lib/msw.ts+++ b/apps/studio/tests/lib/msw.ts@@ -44,11 +44,14 @@ export const addAPIMock = <P extends Endpoints | `${Endpoints}?${string}`, M extmethod,path,response,-}: {- method: M- path: P- response: SuccessResponse<TrimQueryParams<P>, M> | HttpResponseResolver-}) => {+}: SuccessResponse<TrimQueryParams<P>, M> extends never+ ? // Don't require a mocked response when the API doesn't return one+ { method: M; path: P; response?: never }+ : {+ method: M+ path: P+ response: SuccessResponse<TrimQueryParams<P>, M> | HttpResponseResolver+ }) => {const fullPath = `${API_URL}${path}`console.log('[MSW] Adding mock:', method.toUpperCase(), fullPath)diff --git a/apps/studio/tests/lib/route-mock.ts b/apps/studio/tests/lib/route-mock.tsindex 9eeed08ce53..4dca8b21498 100644--- a/apps/studio/tests/lib/route-mock.ts+++ b/apps/studio/tests/lib/route-mock.ts@@ -1,11 +1,26 @@+import { glob } from 'fs/promises'import _routerMock from 'next-router-mock'import { createDynamicRouteParser } from 'next-router-mock/dynamic-routes'+import { normalize, posix, sep, join } from 'path'export const routerMock = _routerMock-routerMock.useParser(- createDynamicRouteParser([- // These paths should match those found in the `/pages` folder:- '/projects/[ref]',- ])-)+const pipe =+ <T>(...fns: Array<(arg: T) => T>) =>+ (value: T) =>+ fns.reduce((acc, fn) => fn(acc), value)+// normalize file paths to posix format (windows FS support)+const toPosix = (str: string) => str.replaceAll(sep, posix.sep)+const pagesRoot = toPosix(join(process.cwd(), `./pages`))+// remove the base filepath+const removePrefix = (str: string) => str.replace(pagesRoot, ``)+// remove the file extension or index segment+const removeExt = (str: string) => str.replace(/.tsx|\/index.tsx/, ``)++// Glob the `pages/` directory for all dynamic route segments+const paths = [+ ...(await Array.fromAsync(glob(`${pagesRoot}/**/*\].tsx`))),+ ...(await Array.fromAsync(glob(`${pagesRoot}/**/**\]/**/index.tsx`))),+].map(pipe(normalize, toPosix, removePrefix, removeExt))++routerMock.useParser(createDynamicRouteParser(paths))diff --git a/apps/studio/tests/setup/polyfills.ts b/apps/studio/tests/setup/polyfills.tsindex f8702bb7e71..e37e5482f5a 100644--- a/apps/studio/tests/setup/polyfills.ts+++ b/apps/studio/tests/setup/polyfills.ts@@ -35,3 +35,5 @@ Object.defineProperties(globalThis, {ReadableStream: { value: ReadableStream },TransformStream: { value: TransformStream },})++window.HTMLElement.prototype.hasPointerCapture = vi.fn()diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex a940cf978c9..f22f313f01b 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -537,7 +537,7 @@ importers:devDependencies:'@graphiql/toolkit':specifier: ^0.9.1- version: 0.9.1(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])+ version: 0.9.1(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])'@graphql-codegen/cli':specifier: 5.0.5version: 5.0.5(@parcel/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])@@ -609,7 +609,7 @@ importers:version: 13.2.2graphiql:specifier: ^4.0.2- version: 4.0.2(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])+ version: 4.0.2(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])openapi-types:specifier: ^12.1.3version: 12.1.3@@ -11203,6 +11203,7 @@ packages:resolution: {integrity: sha512-t0q23FIpvHDTtnORW+bDJziGsal5uh9RJTJ1fyH8drd4lICOoXhJ5pLMUZ5C0VQei6dNmwTzzoTRgMkO9JgHEQ==}peerDependencies:eslint: '>= 5'+ bundledDependencies: []resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==}@@ -20653,9 +20654,9 @@ snapshots:'@gar/[email protected]': {}- '@graphiql/[email protected](@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])':+ '@graphiql/[email protected](@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])':dependencies:- '@graphiql/react': 0.32.0(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])+ '@graphiql/react': 0.32.0(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])graphql: 16.11.0react: 18.3.1@@ -20669,10 +20670,10 @@ snapshots:- '@types/react-dom'- graphql-ws- '@graphiql/[email protected](@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])':+ '@graphiql/[email protected](@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])':dependencies:- '@graphiql/react': 0.32.0(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])- '@graphiql/toolkit': 0.11.2(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])+ '@graphiql/react': 0.32.0(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])+ '@graphiql/toolkit': 0.11.2(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])react: 18.3.1react-compiler-runtime: 19.1.0-rc.1([email protected])react-dom: 18.3.1([email protected])@@ -20712,9 +20713,9 @@ snapshots:- '@types/react-dom'- graphql-ws- '@graphiql/[email protected](@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])':+ '@graphiql/[email protected](@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])':dependencies:- '@graphiql/toolkit': 0.11.2(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])+ '@graphiql/toolkit': 0.11.2(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])'@radix-ui/react-dialog': 1.1.11(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-dropdown-menu': 2.1.12(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-tooltip': 1.2.4(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])@@ -20741,13 +20742,13 @@ snapshots:- '@types/react-dom'- graphql-ws- '@graphiql/[email protected](@types/[email protected])([email protected]([email protected])([email protected]))([email protected])':+ '@graphiql/[email protected](@types/[email protected])([email protected]([email protected])([email protected]))([email protected])':dependencies:'@n1ru4l/push-pull-async-iterable-iterator': 3.2.0graphql: 16.11.0meros: 1.3.0(@types/[email protected])optionalDependencies:- graphql-ws: 6.0.4([email protected])([email protected])+ graphql-ws: 6.0.4([email protected])([email protected])transitivePeerDependencies:- '@types/node'@@ -20761,13 +20762,13 @@ snapshots:transitivePeerDependencies:- '@types/node'- '@graphiql/[email protected](@types/[email protected])([email protected]([email protected])([email protected]))([email protected])':+ '@graphiql/[email protected](@types/[email protected])([email protected]([email protected])([email protected]))([email protected])':dependencies:'@n1ru4l/push-pull-async-iterable-iterator': 3.2.0graphql: 16.11.0meros: 1.3.0(@types/[email protected])optionalDependencies:- graphql-ws: 6.0.4([email protected])([email protected])+ graphql-ws: 6.0.4([email protected])([email protected])transitivePeerDependencies:- '@types/node'@@ -31234,11 +31235,11 @@ snapshots:- [email protected](@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected]):+ [email protected](@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected]):dependencies:- '@graphiql/plugin-doc-explorer': 0.0.1(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])- '@graphiql/plugin-history': 0.0.2(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])- '@graphiql/react': 0.32.0(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])+ '@graphiql/plugin-doc-explorer': 0.0.1(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])+ '@graphiql/plugin-history': 0.0.2(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])+ '@graphiql/react': 0.32.0(@codemirror/[email protected])(@emotion/[email protected])(@types/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])graphql: 16.11.0react: 18.3.1react-compiler-runtime: 19.1.0-rc.1([email protected])@@ -31325,13 +31326,6 @@ snapshots:dependencies:graphql: 16.11.0- dependencies:- graphql: 16.11.0- optionalDependencies:- ws: 8.18.1- optional: true-dependencies:graphql: 16.11.0