From d2cc8ff73a647b6bd358052e0bcb3e4c4b897c29 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 02:09:07 +0800
Subject: [PATCH 01/94] init cmdk
---
apps/docs/pages/_app.tsx | 2 +
package-lock.json | 2958 ++++++++---------
packages/ui/index.tsx | 3 +
packages/ui/package.json | 24 +-
.../ui/src/components/Command/AiCommand.tsx | 694 ++++
.../ui/src/components/Command/Command.tsx | 443 +++
.../src/components/Command/Command.utils.tsx | 268 ++
.../ui/src/components/Command/DocsSearch.tsx | 466 +++
.../ui/src/components/Command/LoadingLine.tsx | 16 +
.../src/components/Command/SearchProvider.tsx | 8 +
.../src/components/Command/SearchResult.tsx | 56 +
packages/ui/src/components/Command/index.tsx | 1 +
.../ui/src/components/Dropdown/Dropdown.tsx | 31 +-
packages/ui/src/components/Modal/Modal.tsx | 2 +-
.../ui/src/components/Popover/Popover.tsx | 39 +-
packages/ui/src/utils/cn.ts | 6 +
16 files changed, 3406 insertions(+), 1611 deletions(-)
create mode 100644 packages/ui/src/components/Command/AiCommand.tsx
create mode 100644 packages/ui/src/components/Command/Command.tsx
create mode 100644 packages/ui/src/components/Command/Command.utils.tsx
create mode 100644 packages/ui/src/components/Command/DocsSearch.tsx
create mode 100644 packages/ui/src/components/Command/LoadingLine.tsx
create mode 100644 packages/ui/src/components/Command/SearchProvider.tsx
create mode 100644 packages/ui/src/components/Command/SearchResult.tsx
create mode 100644 packages/ui/src/components/Command/index.tsx
create mode 100644 packages/ui/src/utils/cn.ts
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index f3f6b65f63a..d68bc1e5151 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -11,6 +11,7 @@ import SearchProvider from '~/components/Search/SearchProvider'
import SiteLayout from '~/layouts/SiteLayout'
import { IS_PLATFORM, LOCAL_SUPABASE } from '~/lib/constants'
import { post } from '~/lib/fetchWrappers'
+import { CommandMenu } from 'ui'
import '../styles/algolia-search.scss'
import '../styles/ch.scss'
import '../styles/docsearch.scss'
@@ -84,6 +85,7 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
)}
+
>
)
}
diff --git a/package-lock.json b/package-lock.json
index b0bcd07d8d7..fab5b7bd0b9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3547,6 +3547,32 @@
"npm": ">=6.0.0"
}
},
+ "node_modules/@floating-ui/core": {
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.7.3.tgz",
+ "integrity": "sha512-buc8BXHmG9l82+OQXOFU3Kr2XQx9ys01U/Q9HMIrZ300iLc8HLMgh7dcCqgYzAzf4BkoQvDcXf5Y+CuEZ5JBYg=="
+ },
+ "node_modules/@floating-ui/dom": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.5.4.tgz",
+ "integrity": "sha512-419BMceRLq0RrmTSDxn8hf9R3VCJv2K9PUfugh5JyEFmdjzDo+e8U5EdR8nzKq8Yj1htzLm3b6eQEEam3/rrtg==",
+ "dependencies": {
+ "@floating-ui/core": "^0.7.3"
+ }
+ },
+ "node_modules/@floating-ui/react-dom": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-0.7.2.tgz",
+ "integrity": "sha512-1T0sJcpHgX/u4I1OzIEhlcrvkUN8ln39nz7fMoE/2HDHrPiMFoOGR7++GYyfUmIQHkkrTinaeQsO3XWubjSvGg==",
+ "dependencies": {
+ "@floating-ui/dom": "^0.5.3",
+ "use-isomorphic-layout-effect": "^1.1.1"
+ },
+ "peerDependencies": {
+ "react": ">=16.8.0",
+ "react-dom": ">=16.8.0"
+ }
+ },
"node_modules/@gar/promisify": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",
@@ -5912,18 +5938,19 @@
}
},
"node_modules/@radix-ui/react-accordion": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.0.1.tgz",
- "integrity": "sha512-Ka7BQoyRRPwsOb0YEv0fQU8V8aCXCxAzNVI5BRN7WmPG2E1zQKKxmb86NVDqIj6uSnaahJ1E5S6bX5Lk9hTK+g==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.1.1.tgz",
+ "integrity": "sha512-TQtyyRubYe8DD6DYCovNLTjd2D+TFrNCpr99T5M3cYUbR7BsRxWsxfInjbQ1nHsdy2uPTcnJS5npyXPVfP0piw==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/primitive": "1.0.0",
- "@radix-ui/react-collapsible": "1.0.1",
- "@radix-ui/react-collection": "1.0.1",
+ "@radix-ui/react-collapsible": "1.0.2",
+ "@radix-ui/react-collection": "1.0.2",
"@radix-ui/react-compose-refs": "1.0.0",
"@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-direction": "1.0.0",
"@radix-ui/react-id": "1.0.0",
- "@radix-ui/react-primitive": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.2",
"@radix-ui/react-use-controllable-state": "1.0.0"
},
"peerDependencies": {
@@ -5931,51 +5958,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-collapsible": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.0.1.tgz",
- "integrity": "sha512-0maX4q91iYa4gjt3PsNf7dq/yqSR+HGAE8I5p54dQ6gnveS+ETWlMoijxrhmgV1k8svxpm34mQAtqIrJt4XZmA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "1.0.0",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-context": "1.0.0",
- "@radix-ui/react-id": "1.0.0",
- "@radix-ui/react-presence": "1.0.0",
- "@radix-ui/react-primitive": "1.0.1",
- "@radix-ui/react-use-controllable-state": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/@radix-ui/react-arrow": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-0.1.4.tgz",
@@ -6024,111 +6006,59 @@
}
},
"node_modules/@radix-ui/react-collapsible": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-0.1.6.tgz",
- "integrity": "sha512-Gkf8VuqMc6HTLzA2AxVYnyK6aMczVLpatCjdD9Lj4wlYLXCz9KtiqZYslLMeqnQFLwLyZS0WKX/pQ8j5fioIBw==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.0.2.tgz",
+ "integrity": "sha512-QNiDT6Au8jUU0K1WV+HEd4loH7C5CKQjeXxskwqyiyAkyCmW7qlQM5vSSJCIoQC+OVPyhgafSmGudRP8Qm1/gA==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-controllable-state": "0.1.0",
- "@radix-ui/react-use-layout-effect": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
+ "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
"dependencies": {
- "@babel/runtime": "^7.13.10"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
+ "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-collection": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.1.tgz",
- "integrity": "sha512-uuiFbs+YCKjn3X1DTSx9G7BHApu4GHbi3kgiwsnFUbOKCrwejAJv4eE4Vc8C0Oaxt9T0aV4ox0WCOdx+39Xo+g==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.2.tgz",
+ "integrity": "sha512-s8WdQQ6wNXpaxdZ308KSr8fEWGrg4un8i4r/w7fhiS4ElRNjk5rRcl0/C6TANG2LvLOGIxtzo/jAg6Qf73TEBw==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-compose-refs": "1.0.0",
"@radix-ui/react-context": "1.0.0",
- "@radix-ui/react-primitive": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.2",
"@radix-ui/react-slot": "1.0.1"
},
"peerDependencies": {
@@ -6159,291 +6089,203 @@
}
},
"node_modules/@radix-ui/react-context-menu": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-0.1.6.tgz",
- "integrity": "sha512-0qa6ABaeqD+WYI+8iT0jH0QLLcV8Kv0xI+mZL4FFnG4ec9H0v+yngb5cfBBfs9e/KM8mDzFFpaeegqsQlLNqyQ==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.1.3.tgz",
+ "integrity": "sha512-T+Jpbl/L9eJmlNGdgrl39NUqYTrtHJz4FmjdSc2WDUiZXWMmokK+1K8t/xEcx9q2PvVYfL5UDy9dkzU9UouyGw==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-menu": "0.1.6",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-callback-ref": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-menu": "2.0.4",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-controllable-state": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0",
- "react-dom": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
+ "node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
+ "node_modules/@radix-ui/react-dialog": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.3.tgz",
+ "integrity": "sha512-owNhq36kNPqC2/a+zJRioPg6HHnTn5B/sh/NjTY8r4W9g1L5VJlrzZIVcBr7R9Mg8iLjVmh6MGgMlfoVf/WO/A==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.3",
+ "@radix-ui/react-focus-guards": "1.0.0",
+ "@radix-ui/react-focus-scope": "1.0.2",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-portal": "1.0.2",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-slot": "1.0.1",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.5"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
+ "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.2"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
+ "node_modules/@radix-ui/react-direction": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.0.tgz",
+ "integrity": "sha512-2HV05lGUgYcA6xgLQ4BKPDmtL+QbIZYH5fCOTAOOcJ5O0QbWS3i9lKaurLzliYUDhORI2Qr3pyjhJh44lKA3rQ==",
"dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
+ "@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-dismissable-layer": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-0.1.5.tgz",
- "integrity": "sha512-J+fYWijkX4M4QKwf9dtu1oC0U6e6CEl8WhBp3Ad23yz2Hia0XCo6Pk/mp5CAFy4QBtQedTSkhW05AdtSOEoajQ==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.3.tgz",
+ "integrity": "sha512-nXZOvFjOuHS1ovumntGV7NNoLaEp9JEvTht3MBjP44NSW5hUKj/8OnfN3+8WmB+CEhN44XaGhpHoSsUIEl5P7Q==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-body-pointer-events": "0.1.1",
- "@radix-ui/react-use-callback-ref": "0.1.0",
- "@radix-ui/react-use-escape-keydown": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-escape-keydown": "1.0.2"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
+ "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
+ "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.2.tgz",
+ "integrity": "sha512-DXGim3x74WgUv+iMNCF+cAo8xUHHeqvjx8zs7trKf+FkQKPQXLk2sX7Gx1ysH7Q76xCpZuxIJE7HLPxRE+Q+GA==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
+ "@radix-ui/react-use-callback-ref": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-dropdown-menu": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-0.1.6.tgz",
- "integrity": "sha512-RZhtzjWwJ4ZBN7D8ek4Zn+ilHzYuYta9yIxFnbC0pfqMnSi67IQNONo1tuuNqtFh9SRHacPKc65zo+kBBlxtdg==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.4.tgz",
+ "integrity": "sha512-y6AT9+MydyXcByivdK1+QpjWoKaC7MLjkS/cH1Q3keEyMvDkiY85m8o2Bi6+Z1PPUlCsMULopxagQOSfN0wahg==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-menu": "0.1.6",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-controllable-state": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-menu": "2.0.4",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-controllable-state": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0",
- "react-dom": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-focus-guards": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-0.1.0.tgz",
- "integrity": "sha512-kRx/swAjEfBpQ3ns7J3H4uxpXuWCqN7MpALiSDOXiyo2vkWv0L9sxvbpZeTulINuE3CGMzicVMuNc/VWXjFKOg==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.0.tgz",
+ "integrity": "sha512-UagjDk4ijOAnGu4WMUPj9ahi7/zJJqNZ9ZAiGPp7waUWJO0O1aWXi/udPphI0IUjvrhBsZJGSN66dR2dsueLWQ==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-focus-scope": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-0.1.4.tgz",
- "integrity": "sha512-fbA4ES3H4Wkxp+OeLhvN6SwL7mXNn/aBtUf7DRYxY9+Akrf7dRxl2ck4lgcpPsSg3zSDsEwLcY+h5cmj5yvlug==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.2.tgz",
+ "integrity": "sha512-spwXlNTfeIprt+kaEWE/qYuYT3ZAqJiAGjN/JgdvgVDTu8yc+HuX+WOWXrKliKnLnwck0F6JDkqIERncnih+4A==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-callback-ref": "0.1.0"
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
+ "node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-id": {
@@ -6470,113 +6312,292 @@
}
},
"node_modules/@radix-ui/react-menu": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-0.1.6.tgz",
- "integrity": "sha512-ho3+bhpr3oAFkOBJ8VkUb1BcGoiZBB3OmcWPqa6i5RTUKrzNX/d6rauochu2xDlWjiRtpVuiAcsTVOeIC4FbYQ==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.4.tgz",
+ "integrity": "sha512-mzKR47tZ1t193trEqlQoJvzY4u9vYfVH16ryBrVrCAGZzkgyWnMQYEZdUkM7y8ak9mrkKtJiqB47TlEnubeOFQ==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-collection": "0.1.4",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-dismissable-layer": "0.1.5",
- "@radix-ui/react-focus-guards": "0.1.0",
- "@radix-ui/react-focus-scope": "0.1.4",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-popper": "0.1.4",
- "@radix-ui/react-portal": "0.1.4",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-roving-focus": "0.1.5",
- "@radix-ui/react-use-callback-ref": "0.1.0",
- "@radix-ui/react-use-direction": "0.1.0",
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-collection": "1.0.2",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-direction": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.3",
+ "@radix-ui/react-focus-guards": "1.0.0",
+ "@radix-ui/react-focus-scope": "1.0.2",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-popper": "1.1.1",
+ "@radix-ui/react-portal": "1.0.2",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-roving-focus": "1.0.3",
+ "@radix-ui/react-slot": "1.0.1",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
"aria-hidden": "^1.1.1",
- "react-remove-scroll": "^2.4.0"
+ "react-remove-scroll": "2.5.5"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0",
- "react-dom": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-collection": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-0.1.4.tgz",
- "integrity": "sha512-3muGI15IdgaDFjOcO7xX8a35HQRBRF6LH9pS6UCeZeRmbslkVeHyJRQr2rzICBUoX7zgIA0kXyMDbpQnJGyJTA==",
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-arrow": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
+ "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2"
+ "@radix-ui/react-primitive": "1.0.2"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.1.tgz",
+ "integrity": "sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@floating-ui/react-dom": "0.7.2",
+ "@radix-ui/react-arrow": "1.0.2",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0",
+ "@radix-ui/react-use-rect": "1.0.0",
+ "@radix-ui/react-use-size": "1.0.0",
+ "@radix-ui/rect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-portal": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
+ "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.2"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-rect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
+ "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
+ "@radix-ui/rect": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-size": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
+ "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
+ "@radix-ui/react-use-layout-effect": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/rect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
+ "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ }
+ },
+ "node_modules/@radix-ui/react-popover": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.0.5.tgz",
+ "integrity": "sha512-GRHZ8yD12MrN2NLobHPE8Rb5uHTxd9x372DE9PPNnBjpczAQHcZ5ne0KXG4xpf+RDdXSzdLv9ym6mYJCDTaUZg==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.3",
+ "@radix-ui/react-focus-guards": "1.0.0",
+ "@radix-ui/react-focus-scope": "1.0.2",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-popper": "1.1.1",
+ "@radix-ui/react-portal": "1.0.2",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-slot": "1.0.1",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.5"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-arrow": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
+ "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.2"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.1.tgz",
+ "integrity": "sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@floating-ui/react-dom": "0.7.2",
+ "@radix-ui/react-arrow": "1.0.2",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0",
+ "@radix-ui/react-use-rect": "1.0.0",
+ "@radix-ui/react-use-size": "1.0.0",
+ "@radix-ui/rect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
+ "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.2"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-rect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
+ "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/rect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-size": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
+ "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/rect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
+ "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
}
},
"node_modules/@radix-ui/react-popper": {
@@ -6718,9 +6739,9 @@
}
},
"node_modules/@radix-ui/react-primitive": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.1.tgz",
- "integrity": "sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.2.tgz",
+ "integrity": "sha512-zY6G5Qq4R8diFPNwtyoLRZBxzu1Z+SXMlfYpChN7Dv8gvmx9X3qhDqiLWvKseKVJMuedFeU/Sa0Sy/Ia+t06Dw==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-slot": "1.0.1"
@@ -6731,115 +6752,35 @@
}
},
"node_modules/@radix-ui/react-roving-focus": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-0.1.5.tgz",
- "integrity": "sha512-ClwKPS5JZE+PaHCoW7eu1onvE61pDv4kO8W4t5Ra3qMFQiTJLZMdpBQUhksN//DaVygoLirz4Samdr5Y1x1FSA==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.3.tgz",
+ "integrity": "sha512-stjCkIoMe6h+1fWtXlA6cRfikdBzCLp3SnVk7c48cv/uy3DTGoXhN76YaOYUJuy3aEDvDIKwKR5KSmvrtPvQPQ==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-collection": "0.1.4",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-callback-ref": "0.1.0",
- "@radix-ui/react-use-controllable-state": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-collection": "1.0.2",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-direction": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-controllable-state": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-collection": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-0.1.4.tgz",
- "integrity": "sha512-3muGI15IdgaDFjOcO7xX8a35HQRBRF6LH9pS6UCeZeRmbslkVeHyJRQr2rzICBUoX7zgIA0kXyMDbpQnJGyJTA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
+ "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-slot": {
@@ -6855,98 +6796,48 @@
}
},
"node_modules/@radix-ui/react-tabs": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-0.1.5.tgz",
- "integrity": "sha512-ieVQS1TFr0dX1XA8B+CsSFKOE7kcgEaNWWEfItxj9D1GZjn1o3WqPkW+FhQWDAWZLSKCH2PezYF3MNyO41lgJg==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.0.3.tgz",
+ "integrity": "sha512-4CkF/Rx1GcrusI/JZ1Rvyx4okGUs6wEenWA0RG/N+CwkRhTy7t54y7BLsWUXrAz/GRbBfHQg/Odfs/RoW0CiRA==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-roving-focus": "0.1.5",
- "@radix-ui/react-use-controllable-state": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-direction": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-roving-focus": "1.0.3",
+ "@radix-ui/react-use-controllable-state": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
+ "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
"dependencies": {
- "@babel/runtime": "^7.13.10"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
+ "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-tooltip": {
@@ -7053,18 +6944,6 @@
"react": "^16.8 || ^17.0"
}
},
- "node_modules/@radix-ui/react-use-body-pointer-events": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-body-pointer-events/-/react-use-body-pointer-events-0.1.1.tgz",
- "integrity": "sha512-R8leV2AWmJokTmERM8cMXFHWSiv/fzOLhG/JLmRBhLTAzOj37EQizssq4oW0Z29VcZy2tODMi9Pk/htxwb+xpA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
"node_modules/@radix-ui/react-use-callback-ref": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-0.1.0.tgz",
@@ -7099,17 +6978,6 @@
"react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-use-direction": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-direction/-/react-use-direction-0.1.0.tgz",
- "integrity": "sha512-NajpY/An9TCPSfOVkgWIdXJV+VuWl67PxB6kOKYmtNAFHvObzIoh8o0n9sAuwSAyFCZVq211FEf9gvVDRhOyiA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
"node_modules/@radix-ui/react-use-escape-keydown": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-0.1.0.tgz",
@@ -14104,6 +13972,212 @@
"node": ">=6"
}
},
+ "node_modules/cmdk-supabase": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/cmdk-supabase/-/cmdk-supabase-0.2.2.tgz",
+ "integrity": "sha512-fcsAsk32aZNKs67tq9slQqsx0+x79TelYFSTVlxbDYkssOr8n/DQjGcDWysqYbVMvUNTUHKOms8Sh2wQI8R5DQ==",
+ "dependencies": {
+ "@radix-ui/react-dialog": "1.0.0",
+ "@radix-ui/react-id": "^0.0.6",
+ "command-score": "0.1.2",
+ "use-sync-external-store": "^1.2.0"
+ },
+ "peerDependencies": {
+ "react": "^17.0",
+ "react-dom": "^17.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-dialog": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.0.tgz",
+ "integrity": "sha512-Yn9YU+QlHYLWwV1XfKiqnGVpWYWk6MeBVM6x/bcoyPvxgjQGoeT35482viLPctTMWoMw0PoHgqfSox7Ig+957Q==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.0",
+ "@radix-ui/react-focus-guards": "1.0.0",
+ "@radix-ui/react-focus-scope": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-portal": "1.0.0",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.0",
+ "@radix-ui/react-slot": "1.0.0",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.4"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.0.tgz",
+ "integrity": "sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-dismissable-layer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.0.tgz",
+ "integrity": "sha512-n7kDRfx+LB1zLueRDvZ1Pd0bxdJWDUZNQ/GWoxDn2prnuJKRdxsjulejX/ePkOsLi2tTm6P24mDqlMSgQpsT6g==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.0",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-escape-keydown": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-focus-scope": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.0.tgz",
+ "integrity": "sha512-C4SWtsULLGf/2L4oGeIHlvWQx7Rf+7cX/vKOAD2dXW0A1b5QXwi3wWeaEgW+wn+SEVrraMUk05vLU9fZZz5HbQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.0",
+ "@radix-ui/react-use-callback-ref": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-id": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.0.6.tgz",
+ "integrity": "sha512-PzmraF34fYggsYvTIZVJ5S68WMp3aKUN3HkSmGnz4zn9zpRjkAbbg7Xn3ueQI3FQsLWKgyUfnpsmWFDndpcqYg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-portal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.0.tgz",
+ "integrity": "sha512-a8qyFO/Xb99d8wQdu4o7qnigNjTPG123uADNecz0eX4usnQEj7o+cG4ZX4zkqq98NYekT7UoEQIjxBNWIFuqTA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-primitive": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.0.tgz",
+ "integrity": "sha512-EyXe6mnRlHZ8b6f4ilTDrXmkLShICIuOTTj0GX4w1rp+wSxf3+TD05u1UOITC8VsJ2a9nwHvdXtOXEOl0Cw/zQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-slot": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-slot": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.0.tgz",
+ "integrity": "sha512-3mrKauI/tWXo1Ll+gN5dHcxDPdm/Df1ufcDLCecn+pnCIVcdWE7CujXo8QaXOWRJyZyQWWbpB8eFwHzWXlv5mQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-use-escape-keydown": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.0.tgz",
+ "integrity": "sha512-JwfBCUIfhXRxKExgIqGa4CQsiMemo1Xt0W/B4ei3fpzpvPENKpMKQ8mZSB6Acj3ebrAEgi2xiQvcI1PAAodvyg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-callback-ref": "1.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
+ "node_modules/cmdk-supabase/node_modules/react-remove-scroll": {
+ "version": "2.5.4",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.4.tgz",
+ "integrity": "sha512-xGVKJJr0SJGQVirVFAUZ2k1QLyO6m+2fy0l8Qawbp5Jgrv3DeLalrfMNBFSlmz5kriGGzsVBtGVnf4pTKIhhWA==",
+ "dependencies": {
+ "react-remove-scroll-bar": "^2.3.3",
+ "react-style-singleton": "^2.2.1",
+ "tslib": "^2.1.0",
+ "use-callback-ref": "^1.3.0",
+ "use-sidecar": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
@@ -14233,6 +14307,11 @@
"url": "https://github.com/sponsors/wooorm"
}
},
+ "node_modules/command-score": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/command-score/-/command-score-0.1.2.tgz",
+ "integrity": "sha512-VtDvQpIJBvBatnONUsPzXYFVKQQAhuf3XTNOAsdBxCNO/QCtUUd8LSgjn0GVarBkCad6aJCZfXgrjYbl/KRr7w=="
+ },
"node_modules/commander": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
@@ -24342,6 +24421,14 @@
"node": ">=10"
}
},
+ "node_modules/lucide-react": {
+ "version": "0.124.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.124.0.tgz",
+ "integrity": "sha512-U1TGpFPLVOOIfs4SIeJ1F6gNcdpFpt5GDesgOaak6Tr7jTLkhjCdmBok0UksmpYfehN5zMMW+g37nzU2XHCtnw==",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0"
+ }
+ },
"node_modules/lz-string": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz",
@@ -27834,9 +27921,9 @@
}
},
"node_modules/openai": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/openai/-/openai-3.1.0.tgz",
- "integrity": "sha512-v5kKFH5o+8ld+t0arudj833Mgm3GcgBnbyN9946bj6u7bvel4Yg6YFz2A4HLIYDzmMjIo0s6vSG9x73kOwvdCg==",
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz",
+ "integrity": "sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A==",
"dependencies": {
"axios": "^0.26.0",
"form-data": "^4.0.0"
@@ -31125,9 +31212,9 @@
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
},
"node_modules/react-markdown": {
- "version": "8.0.3",
- "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.3.tgz",
- "integrity": "sha512-We36SfqaKoVNpN1QqsZwWSv/OZt5J15LNgTLWynwAN5b265hrQrsjMtlRNwUvS+YyR3yDM8HpTNc4pK9H/Gc0A==",
+ "version": "8.0.6",
+ "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.6.tgz",
+ "integrity": "sha512-KgPWsYgHuftdx510wwIzpwf+5js/iHqBR+fzxefv8Khk3mFbnioF1bmL2idHN3ler0LMQmICKeDrWnZrX9mtbQ==",
"dependencies": {
"@types/hast": "^2.0.0",
"@types/prop-types": "^15.0.0",
@@ -31140,7 +31227,7 @@
"remark-parse": "^10.0.0",
"remark-rehype": "^10.0.0",
"space-separated-tokens": "^2.0.0",
- "style-to-object": "^0.3.0",
+ "style-to-object": "^0.4.0",
"unified": "^10.0.0",
"unist-util-visit": "^4.0.0",
"vfile": "^5.0.0"
@@ -31266,6 +31353,14 @@
"url": "https://github.com/sponsors/wooorm"
}
},
+ "node_modules/react-markdown/node_modules/style-to-object": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.1.tgz",
+ "integrity": "sha512-HFpbb5gr2ypci7Qw+IOhnP2zOU7e77b+rzM+wTzXzfi1PrtBCX0E7Pk4wL4iTLnhzZ+JgEGAhX81ebTg/aYjQw==",
+ "dependencies": {
+ "inline-style-parser": "0.1.1"
+ }
+ },
"node_modules/react-markdown/node_modules/trough": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz",
@@ -34953,6 +35048,11 @@
"node": ">=10.0.0"
}
},
+ "node_modules/tailwind-merge": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.10.0.tgz",
+ "integrity": "sha512-WFnDXSS4kFTZwjKg5/oZSGzBRU/l+qcbv5NVTzLUQvJ9yovDAP05h0F2+ZFW0Lw9EcgRoc2AfURUdZvnEFrXKg=="
+ },
"node_modules/tailwindcss": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.4.tgz",
@@ -36700,6 +36800,19 @@
"react": ">=16.8.0"
}
},
+ "node_modules/use-isomorphic-layout-effect": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz",
+ "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==",
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/use-memo-one": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.3.tgz",
@@ -38411,24 +38524,32 @@
"dependencies": {
"@headlessui/react": "^1.0.0",
"@mertasan/tailwindcss-variables": "^2.0.1",
- "@radix-ui/colors": "^0.1.8",
- "@radix-ui/react-accordion": "^0.1.5",
- "@radix-ui/react-collapsible": "^0.1.5",
- "@radix-ui/react-context-menu": "^0.1.0",
- "@radix-ui/react-dialog": "^0.1.5",
- "@radix-ui/react-dropdown-menu": "^0.1.4",
- "@radix-ui/react-popover": "^0.1.0",
+ "@radix-ui/react-accordion": "^1.1.0",
+ "@radix-ui/react-collapsible": "^1.0.1",
+ "@radix-ui/react-context-menu": "^2.1.2",
+ "@radix-ui/react-dialog": "^1.0.2",
+ "@radix-ui/react-dropdown-menu": "^2.0.3",
+ "@radix-ui/react-popover": "^1.0.4",
"@radix-ui/react-portal": "^1.0.1",
- "@radix-ui/react-tabs": "^0.1.0",
+ "@radix-ui/react-tabs": "^1.0.2",
+ "@supabase/auth-helpers-react": "^0.3.1",
"@tailwindcss/forms": "^0.4.0",
"@tailwindcss/typography": "^0.5.0",
"autoprefixer": "^10.4.2",
+ "clsx": "^1.2.1",
+ "cmdk-supabase": "^0.2.2",
"deepmerge": "^4.2.2",
"formik": "^2.2.9",
"lodash": "^4.17.20",
+ "lucide-react": "^0.124.0",
+ "openai": "^3.2.1",
"postcss": "^8.4.5",
"prop-types": "^15.7.2",
"react-feather": "^2.0.10",
+ "react-markdown": "^8.0.5",
+ "remark-gfm": "^3.0.1",
+ "sse.js": "^0.6.1",
+ "tailwind-merge": "^1.10.0",
"tailwindcss": "^3.0.15",
"tailwindcss-radix": "^1.6.0"
},
@@ -38438,162 +38559,6 @@
"typescript": "4.3.4"
}
},
- "packages/ui/node_modules/@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-accordion": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-0.1.6.tgz",
- "integrity": "sha512-LOXlqPU6y6EMBopdRIKCWFvMPY1wPTQ4uJiX7ZVxldrMJcM7imBzI3wlRTkPCHZ3FLHmpuw+cQi3du23pzJp1g==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-collapsible": "0.1.6",
- "@radix-ui/react-collection": "0.1.4",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-controllable-state": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-collection": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-0.1.4.tgz",
- "integrity": "sha512-3muGI15IdgaDFjOcO7xX8a35HQRBRF6LH9pS6UCeZeRmbslkVeHyJRQr2rzICBUoX7zgIA0kXyMDbpQnJGyJTA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-dialog": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-0.1.7.tgz",
- "integrity": "sha512-jXt8srGhHBRvEr9jhEAiwwJzWCWZoGRJ030aC9ja/gkRJbZdy0iD3FwXf+Ff4RtsZyLUMHW7VUwFOlz3Ixe1Vw==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-dismissable-layer": "0.1.5",
- "@radix-ui/react-focus-guards": "0.1.0",
- "@radix-ui/react-focus-scope": "0.1.4",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-portal": "0.1.4",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2",
- "@radix-ui/react-use-controllable-state": "0.1.0",
- "aria-hidden": "^1.1.1",
- "react-remove-scroll": "^2.4.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0",
- "react-dom": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-0.1.4.tgz",
- "integrity": "sha512-MO0wRy2eYRTZ/CyOri9NANCAtAtq89DEtg90gicaTlkCfdqCLEBsLb+/q66BZQTr3xX/Vq01nnVfc/TkCqoqvw==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0",
- "react-dom": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-popover": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-0.1.6.tgz",
- "integrity": "sha512-zQzgUqW4RQDb0ItAL1xNW4K4olUrkfV3jeEPs9rG+nsDQurO+W9TT+YZ9H1mmgAJqlthyv1sBRZGdBm4YjtD6Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-dismissable-layer": "0.1.5",
- "@radix-ui/react-focus-guards": "0.1.0",
- "@radix-ui/react-focus-scope": "0.1.4",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-popper": "0.1.4",
- "@radix-ui/react-portal": "0.1.4",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-controllable-state": "0.1.0",
- "aria-hidden": "^1.1.1",
- "react-remove-scroll": "^2.4.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0",
- "react-dom": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-0.1.4.tgz",
- "integrity": "sha512-MO0wRy2eYRTZ/CyOri9NANCAtAtq89DEtg90gicaTlkCfdqCLEBsLb+/q66BZQTr3xX/Vq01nnVfc/TkCqoqvw==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0",
- "react-dom": "^16.8 || ^17.0"
- }
- },
"packages/ui/node_modules/@radix-ui/react-portal": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.1.tgz",
@@ -38620,65 +38585,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "packages/ui/node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.1.tgz",
- "integrity": "sha512-avutXAFL1ehGvAXtPquu0YK5oz6ctS474iM3vNGQIkswrVhdrS52e3uoMQBzZhNRAIE0jBnUyXWNmSjGHhCFcw==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz",
- "integrity": "sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
"packages/ui/node_modules/@tailwindcss/typography": {
"version": "0.5.7",
"license": "MIT",
@@ -38702,6 +38608,14 @@
"csstype": "^3.0.2"
}
},
+ "packages/ui/node_modules/clsx": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
+ "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"packages/ui/node_modules/typescript": {
"version": "4.3.4",
"dev": true,
@@ -41164,6 +41078,28 @@
"integrity": "sha512-8YXBE2ZcU/pImVOHX7MWrSR/X5up7t6rPWZlk34RwZEcdr3ua6X+32pSd6XuOQRN+vbuvYNfA6iey8NbrjuMFQ==",
"dev": true
},
+ "@floating-ui/core": {
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-0.7.3.tgz",
+ "integrity": "sha512-buc8BXHmG9l82+OQXOFU3Kr2XQx9ys01U/Q9HMIrZ300iLc8HLMgh7dcCqgYzAzf4BkoQvDcXf5Y+CuEZ5JBYg=="
+ },
+ "@floating-ui/dom": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-0.5.4.tgz",
+ "integrity": "sha512-419BMceRLq0RrmTSDxn8hf9R3VCJv2K9PUfugh5JyEFmdjzDo+e8U5EdR8nzKq8Yj1htzLm3b6eQEEam3/rrtg==",
+ "requires": {
+ "@floating-ui/core": "^0.7.3"
+ }
+ },
+ "@floating-ui/react-dom": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-0.7.2.tgz",
+ "integrity": "sha512-1T0sJcpHgX/u4I1OzIEhlcrvkUN8ln39nz7fMoE/2HDHrPiMFoOGR7++GYyfUmIQHkkrTinaeQsO3XWubjSvGg==",
+ "requires": {
+ "@floating-ui/dom": "^0.5.3",
+ "use-isomorphic-layout-effect": "^1.1.1"
+ }
+ },
"@gar/promisify": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",
@@ -42968,55 +42904,20 @@
}
},
"@radix-ui/react-accordion": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.0.1.tgz",
- "integrity": "sha512-Ka7BQoyRRPwsOb0YEv0fQU8V8aCXCxAzNVI5BRN7WmPG2E1zQKKxmb86NVDqIj6uSnaahJ1E5S6bX5Lk9hTK+g==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.1.1.tgz",
+ "integrity": "sha512-TQtyyRubYe8DD6DYCovNLTjd2D+TFrNCpr99T5M3cYUbR7BsRxWsxfInjbQ1nHsdy2uPTcnJS5npyXPVfP0piw==",
"requires": {
"@babel/runtime": "^7.13.10",
"@radix-ui/primitive": "1.0.0",
- "@radix-ui/react-collapsible": "1.0.1",
- "@radix-ui/react-collection": "1.0.1",
+ "@radix-ui/react-collapsible": "1.0.2",
+ "@radix-ui/react-collection": "1.0.2",
"@radix-ui/react-compose-refs": "1.0.0",
"@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-direction": "1.0.0",
"@radix-ui/react-id": "1.0.0",
- "@radix-ui/react-primitive": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.2",
"@radix-ui/react-use-controllable-state": "1.0.0"
- },
- "dependencies": {
- "@radix-ui/react-collapsible": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.0.1.tgz",
- "integrity": "sha512-0maX4q91iYa4gjt3PsNf7dq/yqSR+HGAE8I5p54dQ6gnveS+ETWlMoijxrhmgV1k8svxpm34mQAtqIrJt4XZmA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "1.0.0",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-context": "1.0.0",
- "@radix-ui/react-id": "1.0.0",
- "@radix-ui/react-presence": "1.0.0",
- "@radix-ui/react-primitive": "1.0.1",
- "@radix-ui/react-use-controllable-state": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
- "@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
- "@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-arrow": {
@@ -43057,92 +42958,50 @@
}
},
"@radix-ui/react-collapsible": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-0.1.6.tgz",
- "integrity": "sha512-Gkf8VuqMc6HTLzA2AxVYnyK6aMczVLpatCjdD9Lj4wlYLXCz9KtiqZYslLMeqnQFLwLyZS0WKX/pQ8j5fioIBw==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.0.2.tgz",
+ "integrity": "sha512-QNiDT6Au8jUU0K1WV+HEd4loH7C5CKQjeXxskwqyiyAkyCmW7qlQM5vSSJCIoQC+OVPyhgafSmGudRP8Qm1/gA==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-controllable-state": "0.1.0",
- "@radix-ui/react-use-layout-effect": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
},
"dependencies": {
- "@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
+ "@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ }
+ },
+ "@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"requires": {
"@babel/runtime": "^7.13.10"
}
- },
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- },
- "@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- }
}
}
},
"@radix-ui/react-collection": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.1.tgz",
- "integrity": "sha512-uuiFbs+YCKjn3X1DTSx9G7BHApu4GHbi3kgiwsnFUbOKCrwejAJv4eE4Vc8C0Oaxt9T0aV4ox0WCOdx+39Xo+g==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.2.tgz",
+ "integrity": "sha512-s8WdQQ6wNXpaxdZ308KSr8fEWGrg4un8i4r/w7fhiS4ElRNjk5rRcl0/C6TANG2LvLOGIxtzo/jAg6Qf73TEBw==",
"requires": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-compose-refs": "1.0.0",
"@radix-ui/react-context": "1.0.0",
- "@radix-ui/react-primitive": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.2",
"@radix-ui/react-slot": "1.0.1"
}
},
@@ -43163,233 +43022,161 @@
}
},
"@radix-ui/react-context-menu": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-0.1.6.tgz",
- "integrity": "sha512-0qa6ABaeqD+WYI+8iT0jH0QLLcV8Kv0xI+mZL4FFnG4ec9H0v+yngb5cfBBfs9e/KM8mDzFFpaeegqsQlLNqyQ==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.1.3.tgz",
+ "integrity": "sha512-T+Jpbl/L9eJmlNGdgrl39NUqYTrtHJz4FmjdSc2WDUiZXWMmokK+1K8t/xEcx9q2PvVYfL5UDy9dkzU9UouyGw==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-menu": "0.1.6",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-callback-ref": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-menu": "2.0.4",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-controllable-state": "1.0.0"
},
"dependencies": {
- "@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
+ "@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"requires": {
"@babel/runtime": "^7.13.10"
}
- },
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
}
}
},
- "@radix-ui/react-dismissable-layer": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-0.1.5.tgz",
- "integrity": "sha512-J+fYWijkX4M4QKwf9dtu1oC0U6e6CEl8WhBp3Ad23yz2Hia0XCo6Pk/mp5CAFy4QBtQedTSkhW05AdtSOEoajQ==",
+ "@radix-ui/react-dialog": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.3.tgz",
+ "integrity": "sha512-owNhq36kNPqC2/a+zJRioPg6HHnTn5B/sh/NjTY8r4W9g1L5VJlrzZIVcBr7R9Mg8iLjVmh6MGgMlfoVf/WO/A==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-body-pointer-events": "0.1.1",
- "@radix-ui/react-use-callback-ref": "0.1.0",
- "@radix-ui/react-use-escape-keydown": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.3",
+ "@radix-ui/react-focus-guards": "1.0.0",
+ "@radix-ui/react-focus-scope": "1.0.2",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-portal": "1.0.2",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-slot": "1.0.1",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.5"
},
"dependencies": {
- "@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
+ "@radix-ui/react-portal": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
+ "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.2"
+ }
+ },
+ "@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ }
+ },
+ "@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
+ "requires": {
+ "@babel/runtime": "^7.13.10"
+ }
+ }
+ }
+ },
+ "@radix-ui/react-direction": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.0.tgz",
+ "integrity": "sha512-2HV05lGUgYcA6xgLQ4BKPDmtL+QbIZYH5fCOTAOOcJ5O0QbWS3i9lKaurLzliYUDhORI2Qr3pyjhJh44lKA3rQ==",
+ "requires": {
+ "@babel/runtime": "^7.13.10"
+ }
+ },
+ "@radix-ui/react-dismissable-layer": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.3.tgz",
+ "integrity": "sha512-nXZOvFjOuHS1ovumntGV7NNoLaEp9JEvTht3MBjP44NSW5hUKj/8OnfN3+8WmB+CEhN44XaGhpHoSsUIEl5P7Q==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-escape-keydown": "1.0.2"
+ },
+ "dependencies": {
+ "@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"requires": {
"@babel/runtime": "^7.13.10"
}
},
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
+ "@radix-ui/react-use-escape-keydown": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.2.tgz",
+ "integrity": "sha512-DXGim3x74WgUv+iMNCF+cAo8xUHHeqvjx8zs7trKf+FkQKPQXLk2sX7Gx1ysH7Q76xCpZuxIJE7HLPxRE+Q+GA==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
+ "@radix-ui/react-use-callback-ref": "1.0.0"
}
}
}
},
"@radix-ui/react-dropdown-menu": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-0.1.6.tgz",
- "integrity": "sha512-RZhtzjWwJ4ZBN7D8ek4Zn+ilHzYuYta9yIxFnbC0pfqMnSi67IQNONo1tuuNqtFh9SRHacPKc65zo+kBBlxtdg==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.4.tgz",
+ "integrity": "sha512-y6AT9+MydyXcByivdK1+QpjWoKaC7MLjkS/cH1Q3keEyMvDkiY85m8o2Bi6+Z1PPUlCsMULopxagQOSfN0wahg==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-menu": "0.1.6",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-controllable-state": "0.1.0"
- },
- "dependencies": {
- "@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- },
- "@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- }
- }
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-menu": "2.0.4",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-controllable-state": "1.0.0"
}
},
"@radix-ui/react-focus-guards": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-0.1.0.tgz",
- "integrity": "sha512-kRx/swAjEfBpQ3ns7J3H4uxpXuWCqN7MpALiSDOXiyo2vkWv0L9sxvbpZeTulINuE3CGMzicVMuNc/VWXjFKOg==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.0.tgz",
+ "integrity": "sha512-UagjDk4ijOAnGu4WMUPj9ahi7/zJJqNZ9ZAiGPp7waUWJO0O1aWXi/udPphI0IUjvrhBsZJGSN66dR2dsueLWQ==",
"requires": {
"@babel/runtime": "^7.13.10"
}
},
"@radix-ui/react-focus-scope": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-0.1.4.tgz",
- "integrity": "sha512-fbA4ES3H4Wkxp+OeLhvN6SwL7mXNn/aBtUf7DRYxY9+Akrf7dRxl2ck4lgcpPsSg3zSDsEwLcY+h5cmj5yvlug==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.2.tgz",
+ "integrity": "sha512-spwXlNTfeIprt+kaEWE/qYuYT3ZAqJiAGjN/JgdvgVDTu8yc+HuX+WOWXrKliKnLnwck0F6JDkqIERncnih+4A==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-callback-ref": "0.1.0"
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0"
},
"dependencies": {
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
+ "@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"requires": {
"@babel/runtime": "^7.13.10"
}
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
}
}
},
@@ -43413,91 +43200,230 @@
}
},
"@radix-ui/react-menu": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-0.1.6.tgz",
- "integrity": "sha512-ho3+bhpr3oAFkOBJ8VkUb1BcGoiZBB3OmcWPqa6i5RTUKrzNX/d6rauochu2xDlWjiRtpVuiAcsTVOeIC4FbYQ==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.4.tgz",
+ "integrity": "sha512-mzKR47tZ1t193trEqlQoJvzY4u9vYfVH16ryBrVrCAGZzkgyWnMQYEZdUkM7y8ak9mrkKtJiqB47TlEnubeOFQ==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-collection": "0.1.4",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-dismissable-layer": "0.1.5",
- "@radix-ui/react-focus-guards": "0.1.0",
- "@radix-ui/react-focus-scope": "0.1.4",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-popper": "0.1.4",
- "@radix-ui/react-portal": "0.1.4",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-roving-focus": "0.1.5",
- "@radix-ui/react-use-callback-ref": "0.1.0",
- "@radix-ui/react-use-direction": "0.1.0",
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-collection": "1.0.2",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-direction": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.3",
+ "@radix-ui/react-focus-guards": "1.0.0",
+ "@radix-ui/react-focus-scope": "1.0.2",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-popper": "1.1.1",
+ "@radix-ui/react-portal": "1.0.2",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-roving-focus": "1.0.3",
+ "@radix-ui/react-slot": "1.0.1",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
"aria-hidden": "^1.1.1",
- "react-remove-scroll": "^2.4.0"
+ "react-remove-scroll": "2.5.5"
},
"dependencies": {
- "@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
+ "@radix-ui/react-arrow": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
+ "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.2"
+ }
+ },
+ "@radix-ui/react-popper": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.1.tgz",
+ "integrity": "sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@floating-ui/react-dom": "0.7.2",
+ "@radix-ui/react-arrow": "1.0.2",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0",
+ "@radix-ui/react-use-rect": "1.0.0",
+ "@radix-ui/react-use-size": "1.0.0",
+ "@radix-ui/rect": "1.0.0"
+ }
+ },
+ "@radix-ui/react-portal": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
+ "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.2"
+ }
+ },
+ "@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ }
+ },
+ "@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"requires": {
"@babel/runtime": "^7.13.10"
}
},
- "@radix-ui/react-collection": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-0.1.4.tgz",
- "integrity": "sha512-3muGI15IdgaDFjOcO7xX8a35HQRBRF6LH9pS6UCeZeRmbslkVeHyJRQr2rzICBUoX7zgIA0kXyMDbpQnJGyJTA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
+ "@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"requires": {
"@babel/runtime": "^7.13.10"
}
},
- "@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
+ "@radix-ui/react-use-rect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
+ "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/rect": "1.0.0"
+ }
+ },
+ "@radix-ui/react-use-size": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
+ "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ }
+ },
+ "@radix-ui/rect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
+ "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
+ "requires": {
+ "@babel/runtime": "^7.13.10"
+ }
+ }
+ }
+ },
+ "@radix-ui/react-popover": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.0.5.tgz",
+ "integrity": "sha512-GRHZ8yD12MrN2NLobHPE8Rb5uHTxd9x372DE9PPNnBjpczAQHcZ5ne0KXG4xpf+RDdXSzdLv9ym6mYJCDTaUZg==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.3",
+ "@radix-ui/react-focus-guards": "1.0.0",
+ "@radix-ui/react-focus-scope": "1.0.2",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-popper": "1.1.1",
+ "@radix-ui/react-portal": "1.0.2",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-slot": "1.0.1",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.5"
+ },
+ "dependencies": {
+ "@radix-ui/react-arrow": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
+ "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.2"
+ }
+ },
+ "@radix-ui/react-popper": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.1.tgz",
+ "integrity": "sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@floating-ui/react-dom": "0.7.2",
+ "@radix-ui/react-arrow": "1.0.2",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0",
+ "@radix-ui/react-use-rect": "1.0.0",
+ "@radix-ui/react-use-size": "1.0.0",
+ "@radix-ui/rect": "1.0.0"
+ }
+ },
+ "@radix-ui/react-portal": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
+ "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.2"
+ }
+ },
+ "@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ }
+ },
+ "@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"requires": {
"@babel/runtime": "^7.13.10"
}
},
- "@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
+ "@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
+ "@babel/runtime": "^7.13.10"
}
},
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
+ "@radix-ui/react-use-rect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
+ "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
+ "@radix-ui/rect": "1.0.0"
}
},
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
+ "@radix-ui/react-use-size": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
+ "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ }
+ },
+ "@radix-ui/rect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
+ "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
+ "requires": {
+ "@babel/runtime": "^7.13.10"
}
}
}
@@ -43613,101 +43539,38 @@
}
},
"@radix-ui/react-primitive": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.1.tgz",
- "integrity": "sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.2.tgz",
+ "integrity": "sha512-zY6G5Qq4R8diFPNwtyoLRZBxzu1Z+SXMlfYpChN7Dv8gvmx9X3qhDqiLWvKseKVJMuedFeU/Sa0Sy/Ia+t06Dw==",
"requires": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-slot": "1.0.1"
}
},
"@radix-ui/react-roving-focus": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-0.1.5.tgz",
- "integrity": "sha512-ClwKPS5JZE+PaHCoW7eu1onvE61pDv4kO8W4t5Ra3qMFQiTJLZMdpBQUhksN//DaVygoLirz4Samdr5Y1x1FSA==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.3.tgz",
+ "integrity": "sha512-stjCkIoMe6h+1fWtXlA6cRfikdBzCLp3SnVk7c48cv/uy3DTGoXhN76YaOYUJuy3aEDvDIKwKR5KSmvrtPvQPQ==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-collection": "0.1.4",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-callback-ref": "0.1.0",
- "@radix-ui/react-use-controllable-state": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-collection": "1.0.2",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-direction": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-controllable-state": "1.0.0"
},
"dependencies": {
- "@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
+ "@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"requires": {
"@babel/runtime": "^7.13.10"
}
- },
- "@radix-ui/react-collection": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-0.1.4.tgz",
- "integrity": "sha512-3muGI15IdgaDFjOcO7xX8a35HQRBRF6LH9pS6UCeZeRmbslkVeHyJRQr2rzICBUoX7zgIA0kXyMDbpQnJGyJTA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- },
- "@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- }
}
}
},
@@ -43721,78 +43584,38 @@
}
},
"@radix-ui/react-tabs": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-0.1.5.tgz",
- "integrity": "sha512-ieVQS1TFr0dX1XA8B+CsSFKOE7kcgEaNWWEfItxj9D1GZjn1o3WqPkW+FhQWDAWZLSKCH2PezYF3MNyO41lgJg==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.0.3.tgz",
+ "integrity": "sha512-4CkF/Rx1GcrusI/JZ1Rvyx4okGUs6wEenWA0RG/N+CwkRhTy7t54y7BLsWUXrAz/GRbBfHQg/Odfs/RoW0CiRA==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-roving-focus": "0.1.5",
- "@radix-ui/react-use-controllable-state": "0.1.0"
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-direction": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-roving-focus": "1.0.3",
+ "@radix-ui/react-use-controllable-state": "1.0.0"
},
"dependencies": {
- "@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
+ "@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ }
+ },
+ "@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"requires": {
"@babel/runtime": "^7.13.10"
}
- },
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- },
- "@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- }
}
}
},
@@ -43880,15 +43703,6 @@
}
}
},
- "@radix-ui/react-use-body-pointer-events": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-body-pointer-events/-/react-use-body-pointer-events-0.1.1.tgz",
- "integrity": "sha512-R8leV2AWmJokTmERM8cMXFHWSiv/fzOLhG/JLmRBhLTAzOj37EQizssq4oW0Z29VcZy2tODMi9Pk/htxwb+xpA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- }
- },
"@radix-ui/react-use-callback-ref": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-0.1.0.tgz",
@@ -43916,14 +43730,6 @@
}
}
},
- "@radix-ui/react-use-direction": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-direction/-/react-use-direction-0.1.0.tgz",
- "integrity": "sha512-NajpY/An9TCPSfOVkgWIdXJV+VuWl67PxB6kOKYmtNAFHvObzIoh8o0n9sAuwSAyFCZVq211FEf9gvVDRhOyiA==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
"@radix-ui/react-use-escape-keydown": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-0.1.0.tgz",
@@ -49303,6 +49109,158 @@
"integrity": "sha512-3avwM37fSK5oP6M5rQ9CNe99lwxhXDOeSWVPAOYF6OazUTgZCMb0yWlJpmdD74REy1gkEaFiub2ULv4fq9GUhA==",
"dev": true
},
+ "cmdk-supabase": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/cmdk-supabase/-/cmdk-supabase-0.2.2.tgz",
+ "integrity": "sha512-fcsAsk32aZNKs67tq9slQqsx0+x79TelYFSTVlxbDYkssOr8n/DQjGcDWysqYbVMvUNTUHKOms8Sh2wQI8R5DQ==",
+ "requires": {
+ "@radix-ui/react-dialog": "1.0.0",
+ "@radix-ui/react-id": "^0.0.6",
+ "command-score": "0.1.2",
+ "use-sync-external-store": "^1.2.0"
+ },
+ "dependencies": {
+ "@radix-ui/react-dialog": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.0.tgz",
+ "integrity": "sha512-Yn9YU+QlHYLWwV1XfKiqnGVpWYWk6MeBVM6x/bcoyPvxgjQGoeT35482viLPctTMWoMw0PoHgqfSox7Ig+957Q==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.0",
+ "@radix-ui/react-focus-guards": "1.0.0",
+ "@radix-ui/react-focus-scope": "1.0.0",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-portal": "1.0.0",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.0",
+ "@radix-ui/react-slot": "1.0.0",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.4"
+ },
+ "dependencies": {
+ "@radix-ui/react-id": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.0.tgz",
+ "integrity": "sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ }
+ }
+ }
+ },
+ "@radix-ui/react-dismissable-layer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.0.tgz",
+ "integrity": "sha512-n7kDRfx+LB1zLueRDvZ1Pd0bxdJWDUZNQ/GWoxDn2prnuJKRdxsjulejX/ePkOsLi2tTm6P24mDqlMSgQpsT6g==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.0",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-escape-keydown": "1.0.0"
+ }
+ },
+ "@radix-ui/react-focus-scope": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.0.tgz",
+ "integrity": "sha512-C4SWtsULLGf/2L4oGeIHlvWQx7Rf+7cX/vKOAD2dXW0A1b5QXwi3wWeaEgW+wn+SEVrraMUk05vLU9fZZz5HbQ==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.0",
+ "@radix-ui/react-use-callback-ref": "1.0.0"
+ }
+ },
+ "@radix-ui/react-id": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.0.6.tgz",
+ "integrity": "sha512-PzmraF34fYggsYvTIZVJ5S68WMp3aKUN3HkSmGnz4zn9zpRjkAbbg7Xn3ueQI3FQsLWKgyUfnpsmWFDndpcqYg==",
+ "requires": {
+ "@babel/runtime": "^7.13.10"
+ }
+ },
+ "@radix-ui/react-portal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.0.tgz",
+ "integrity": "sha512-a8qyFO/Xb99d8wQdu4o7qnigNjTPG123uADNecz0eX4usnQEj7o+cG4ZX4zkqq98NYekT7UoEQIjxBNWIFuqTA==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.0"
+ }
+ },
+ "@radix-ui/react-presence": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
+ }
+ },
+ "@radix-ui/react-primitive": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.0.tgz",
+ "integrity": "sha512-EyXe6mnRlHZ8b6f4ilTDrXmkLShICIuOTTj0GX4w1rp+wSxf3+TD05u1UOITC8VsJ2a9nwHvdXtOXEOl0Cw/zQ==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-slot": "1.0.0"
+ }
+ },
+ "@radix-ui/react-slot": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.0.tgz",
+ "integrity": "sha512-3mrKauI/tWXo1Ll+gN5dHcxDPdm/Df1ufcDLCecn+pnCIVcdWE7CujXo8QaXOWRJyZyQWWbpB8eFwHzWXlv5mQ==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.0"
+ }
+ },
+ "@radix-ui/react-use-callback-ref": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
+ "requires": {
+ "@babel/runtime": "^7.13.10"
+ }
+ },
+ "@radix-ui/react-use-escape-keydown": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.0.tgz",
+ "integrity": "sha512-JwfBCUIfhXRxKExgIqGa4CQsiMemo1Xt0W/B4ei3fpzpvPENKpMKQ8mZSB6Acj3ebrAEgi2xiQvcI1PAAodvyg==",
+ "requires": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-callback-ref": "1.0.0"
+ }
+ },
+ "@radix-ui/react-use-layout-effect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
+ "requires": {
+ "@babel/runtime": "^7.13.10"
+ }
+ },
+ "react-remove-scroll": {
+ "version": "2.5.4",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.4.tgz",
+ "integrity": "sha512-xGVKJJr0SJGQVirVFAUZ2k1QLyO6m+2fy0l8Qawbp5Jgrv3DeLalrfMNBFSlmz5kriGGzsVBtGVnf4pTKIhhWA==",
+ "requires": {
+ "react-remove-scroll-bar": "^2.3.3",
+ "react-style-singleton": "^2.2.1",
+ "tslib": "^2.1.0",
+ "use-callback-ref": "^1.3.0",
+ "use-sidecar": "^1.1.2"
+ }
+ }
+ }
+ },
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
@@ -49392,6 +49350,11 @@
"resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz",
"integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw=="
},
+ "command-score": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/command-score/-/command-score-0.1.2.tgz",
+ "integrity": "sha512-VtDvQpIJBvBatnONUsPzXYFVKQQAhuf3XTNOAsdBxCNO/QCtUUd8LSgjn0GVarBkCad6aJCZfXgrjYbl/KRr7w=="
+ },
"commander": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
@@ -57821,6 +57784,12 @@
"yallist": "^4.0.0"
}
},
+ "lucide-react": {
+ "version": "0.124.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.124.0.tgz",
+ "integrity": "sha512-U1TGpFPLVOOIfs4SIeJ1F6gNcdpFpt5GDesgOaak6Tr7jTLkhjCdmBok0UksmpYfehN5zMMW+g37nzU2XHCtnw==",
+ "requires": {}
+ },
"lz-string": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz",
@@ -60341,9 +60310,9 @@
}
},
"openai": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/openai/-/openai-3.1.0.tgz",
- "integrity": "sha512-v5kKFH5o+8ld+t0arudj833Mgm3GcgBnbyN9946bj6u7bvel4Yg6YFz2A4HLIYDzmMjIo0s6vSG9x73kOwvdCg==",
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz",
+ "integrity": "sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A==",
"requires": {
"axios": "^0.26.0",
"form-data": "^4.0.0"
@@ -62803,9 +62772,9 @@
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
},
"react-markdown": {
- "version": "8.0.3",
- "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.3.tgz",
- "integrity": "sha512-We36SfqaKoVNpN1QqsZwWSv/OZt5J15LNgTLWynwAN5b265hrQrsjMtlRNwUvS+YyR3yDM8HpTNc4pK9H/Gc0A==",
+ "version": "8.0.6",
+ "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.6.tgz",
+ "integrity": "sha512-KgPWsYgHuftdx510wwIzpwf+5js/iHqBR+fzxefv8Khk3mFbnioF1bmL2idHN3ler0LMQmICKeDrWnZrX9mtbQ==",
"requires": {
"@types/hast": "^2.0.0",
"@types/prop-types": "^15.0.0",
@@ -62818,7 +62787,7 @@
"remark-parse": "^10.0.0",
"remark-rehype": "^10.0.0",
"space-separated-tokens": "^2.0.0",
- "style-to-object": "^0.3.0",
+ "style-to-object": "^0.4.0",
"unified": "^10.0.0",
"unist-util-visit": "^4.0.0",
"vfile": "^5.0.0"
@@ -62885,6 +62854,14 @@
"resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz",
"integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="
},
+ "style-to-object": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.1.tgz",
+ "integrity": "sha512-HFpbb5gr2ypci7Qw+IOhnP2zOU7e77b+rzM+wTzXzfi1PrtBCX0E7Pk4wL4iTLnhzZ+JgEGAhX81ebTg/aYjQw==",
+ "requires": {
+ "inline-style-parser": "0.1.1"
+ }
+ },
"trough": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz",
@@ -66146,6 +66123,11 @@
"strip-ansi": "^6.0.1"
}
},
+ "tailwind-merge": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.10.0.tgz",
+ "integrity": "sha512-WFnDXSS4kFTZwjKg5/oZSGzBRU/l+qcbv5NVTzLUQvJ9yovDAP05h0F2+ZFW0Lw9EcgRoc2AfURUdZvnEFrXKg=="
+ },
"tailwindcss": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.4.tgz",
@@ -66914,160 +66896,39 @@
"requires": {
"@headlessui/react": "^1.0.0",
"@mertasan/tailwindcss-variables": "^2.0.1",
- "@radix-ui/colors": "^0.1.8",
- "@radix-ui/react-accordion": "^0.1.5",
- "@radix-ui/react-collapsible": "^0.1.5",
- "@radix-ui/react-context-menu": "^0.1.0",
- "@radix-ui/react-dialog": "^0.1.5",
- "@radix-ui/react-dropdown-menu": "^0.1.4",
- "@radix-ui/react-popover": "^0.1.0",
+ "@radix-ui/react-accordion": "^1.1.0",
+ "@radix-ui/react-collapsible": "^1.0.1",
+ "@radix-ui/react-context-menu": "^2.1.2",
+ "@radix-ui/react-dialog": "^1.0.2",
+ "@radix-ui/react-dropdown-menu": "^2.0.3",
+ "@radix-ui/react-popover": "^1.0.4",
"@radix-ui/react-portal": "^1.0.1",
- "@radix-ui/react-tabs": "^0.1.0",
+ "@radix-ui/react-tabs": "^1.0.2",
+ "@supabase/auth-helpers-react": "^0.3.1",
"@tailwindcss/forms": "^0.4.0",
"@tailwindcss/typography": "^0.5.0",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"autoprefixer": "^10.4.2",
+ "clsx": "^1.2.1",
+ "cmdk-supabase": "^0.2.2",
"deepmerge": "^4.2.2",
"formik": "^2.2.9",
"lodash": "^4.17.20",
+ "lucide-react": "^0.124.0",
+ "openai": "^3.2.1",
"postcss": "^8.4.5",
"prop-types": "^15.7.2",
"react-feather": "^2.0.10",
+ "react-markdown": "^8.0.5",
+ "remark-gfm": "^3.0.1",
+ "sse.js": "^0.6.1",
+ "tailwind-merge": "^1.10.0",
"tailwindcss": "^3.0.15",
"tailwindcss-radix": "^1.6.0",
"typescript": "4.3.4"
},
"dependencies": {
- "@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-accordion": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-0.1.6.tgz",
- "integrity": "sha512-LOXlqPU6y6EMBopdRIKCWFvMPY1wPTQ4uJiX7ZVxldrMJcM7imBzI3wlRTkPCHZ3FLHmpuw+cQi3du23pzJp1g==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-collapsible": "0.1.6",
- "@radix-ui/react-collection": "0.1.4",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-controllable-state": "0.1.0"
- }
- },
- "@radix-ui/react-collection": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-0.1.4.tgz",
- "integrity": "sha512-3muGI15IdgaDFjOcO7xX8a35HQRBRF6LH9pS6UCeZeRmbslkVeHyJRQr2rzICBUoX7zgIA0kXyMDbpQnJGyJTA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-dialog": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-0.1.7.tgz",
- "integrity": "sha512-jXt8srGhHBRvEr9jhEAiwwJzWCWZoGRJ030aC9ja/gkRJbZdy0iD3FwXf+Ff4RtsZyLUMHW7VUwFOlz3Ixe1Vw==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-dismissable-layer": "0.1.5",
- "@radix-ui/react-focus-guards": "0.1.0",
- "@radix-ui/react-focus-scope": "0.1.4",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-portal": "0.1.4",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2",
- "@radix-ui/react-use-controllable-state": "0.1.0",
- "aria-hidden": "^1.1.1",
- "react-remove-scroll": "^2.4.0"
- },
- "dependencies": {
- "@radix-ui/react-portal": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-0.1.4.tgz",
- "integrity": "sha512-MO0wRy2eYRTZ/CyOri9NANCAtAtq89DEtg90gicaTlkCfdqCLEBsLb+/q66BZQTr3xX/Vq01nnVfc/TkCqoqvw==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- }
- }
- }
- },
- "@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- }
- },
- "@radix-ui/react-popover": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-0.1.6.tgz",
- "integrity": "sha512-zQzgUqW4RQDb0ItAL1xNW4K4olUrkfV3jeEPs9rG+nsDQurO+W9TT+YZ9H1mmgAJqlthyv1sBRZGdBm4YjtD6Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-dismissable-layer": "0.1.5",
- "@radix-ui/react-focus-guards": "0.1.0",
- "@radix-ui/react-focus-scope": "0.1.4",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-popper": "0.1.4",
- "@radix-ui/react-portal": "0.1.4",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-controllable-state": "0.1.0",
- "aria-hidden": "^1.1.1",
- "react-remove-scroll": "^2.4.0"
- },
- "dependencies": {
- "@radix-ui/react-portal": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-0.1.4.tgz",
- "integrity": "sha512-MO0wRy2eYRTZ/CyOri9NANCAtAtq89DEtg90gicaTlkCfdqCLEBsLb+/q66BZQTr3xX/Vq01nnVfc/TkCqoqvw==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- }
- }
- }
- },
"@radix-ui/react-portal": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.1.tgz",
@@ -67084,58 +66945,10 @@
"requires": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-slot": "1.0.1"
- },
- "dependencies": {
- "@radix-ui/react-slot": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.1.tgz",
- "integrity": "sha512-avutXAFL1ehGvAXtPquu0YK5oz6ctS474iM3vNGQIkswrVhdrS52e3uoMQBzZhNRAIE0jBnUyXWNmSjGHhCFcw==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0"
- },
- "dependencies": {
- "@radix-ui/react-compose-refs": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz",
- "integrity": "sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
- }
- }
}
}
}
},
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- },
- "@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- }
- },
"@tailwindcss/typography": {
"version": "0.5.7",
"requires": {
@@ -67154,6 +66967,11 @@
"csstype": "^3.0.2"
}
},
+ "clsx": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
+ "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="
+ },
"typescript": {
"version": "4.3.4",
"dev": true
@@ -67629,6 +67447,12 @@
"integrity": "sha512-fOrzIw2wstbAJuv8PC9Vg4XgwyTLEOdq4y/Z3IhVl8DAE4svRcgyEUvrEXu+BMNgMoc3YND6qLT61kkgEKXh7Q==",
"requires": {}
},
+ "use-isomorphic-layout-effect": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz",
+ "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==",
+ "requires": {}
+ },
"use-memo-one": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.3.tgz",
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index 3edb9ec62c3..4e4381f7e49 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -55,6 +55,9 @@ export * from './src/components/Toggle'
export * from './src/components/Upload'
export * from './src/components/Form'
+// CMD+K
+export * from './src/components/Command'
+
// config
// export { default as Config } from './../ui.config'
diff --git a/packages/ui/package.json b/packages/ui/package.json
index fdcb547ecff..8e60fb31f3e 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -10,24 +10,32 @@
"dependencies": {
"@headlessui/react": "^1.0.0",
"@mertasan/tailwindcss-variables": "^2.0.1",
- "@radix-ui/colors": "^0.1.8",
- "@radix-ui/react-accordion": "^0.1.5",
- "@radix-ui/react-collapsible": "^0.1.5",
- "@radix-ui/react-context-menu": "^0.1.0",
- "@radix-ui/react-dialog": "^0.1.5",
- "@radix-ui/react-dropdown-menu": "^0.1.4",
- "@radix-ui/react-popover": "^0.1.0",
+ "@radix-ui/react-accordion": "^1.1.0",
+ "@radix-ui/react-collapsible": "^1.0.1",
+ "@radix-ui/react-context-menu": "^2.1.2",
+ "@radix-ui/react-dialog": "^1.0.2",
+ "@radix-ui/react-dropdown-menu": "^2.0.3",
+ "@radix-ui/react-popover": "^1.0.4",
"@radix-ui/react-portal": "^1.0.1",
- "@radix-ui/react-tabs": "^0.1.0",
+ "@radix-ui/react-tabs": "^1.0.2",
+ "@supabase/auth-helpers-react": "^0.3.1",
"@tailwindcss/forms": "^0.4.0",
"@tailwindcss/typography": "^0.5.0",
"autoprefixer": "^10.4.2",
+ "clsx": "^1.2.1",
+ "cmdk-supabase": "^0.2.2",
"deepmerge": "^4.2.2",
"formik": "^2.2.9",
"lodash": "^4.17.20",
+ "lucide-react": "^0.124.0",
+ "openai": "^3.2.1",
"postcss": "^8.4.5",
"prop-types": "^15.7.2",
"react-feather": "^2.0.10",
+ "react-markdown": "^8.0.5",
+ "remark-gfm": "^3.0.1",
+ "sse.js": "^0.6.1",
+ "tailwind-merge": "^1.10.0",
"tailwindcss": "^3.0.15",
"tailwindcss-radix": "^1.6.0"
},
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
new file mode 100644
index 00000000000..fbe3deafe94
--- /dev/null
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -0,0 +1,694 @@
+import React, { useEffect, useReducer } from 'react'
+import type { CreateCompletionResponse } from 'openai'
+import { FC, useCallback, useRef, useState } from 'react'
+import ReactMarkdown from 'react-markdown'
+import remarkGfm from 'remark-gfm'
+// @ts-ignore
+import { SSE } from 'sse.js'
+// import clippyImageDark from '../../public/img/clippy-dark.png'
+// import clippyImage from '../../public/img/clippy.png'
+
+import { useSupabaseClient } from '@supabase/auth-helpers-react'
+import { useTheme } from 'common/Providers'
+import Image from 'next/image'
+import {
+ Button,
+ IconAlertCircle,
+ IconAlertTriangle,
+ IconLoader,
+ IconSearch,
+ IconUser,
+ Input,
+ Loading,
+ Modal,
+ Tabs,
+} from 'ui'
+// import components from '~/components'
+// import { IS_PLATFORM } from '~/lib/constants'
+// import { SearchContextValue } from './SearchProvider'
+import SearchResult, { SearchResultType } from './SearchResult'
+import { CommandGroup, CommandItem, CommandInput } from './Command.utils'
+import { IconCopy } from '../Icon/icons/IconCopy'
+
+import { AiIcon, AiIconChat, COMMAND_ROUTES } from './Command'
+
+const questions = [
+ 'How do I get started with Supabase?',
+ 'How do I run Supabase locally?',
+ 'How do I connect to my database?',
+ 'How do I run migrations? ',
+ 'How do I listen to changes in a table?',
+ 'How do I set up authentication?',
+]
+
+const RLSquestions = [
+ 'How do I get started with Supabase?',
+ 'How do I run Supabase locally?',
+ 'How do I connect to my database?',
+ 'How do I run migrations? ',
+ 'How do I listen to changes in a table?',
+ 'How do I set up authentication?',
+]
+
+function getEdgeFunctionUrl() {
+ const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL?.replace(/\/$/, '')
+
+ // if (IS_PLATFORM) {
+ if (true) {
+ // @ts-ignore
+ const [schemeAndProjectId, domain, tld] = supabaseUrl.split('.')
+ return `${schemeAndProjectId}.functions.${domain}.${tld}`
+ } else {
+ return `${supabaseUrl}/functions/v1`
+ }
+}
+
+const edgeFunctionUrl = getEdgeFunctionUrl()
+
+function promptDataReducer(
+ state: any[],
+ action: {
+ index?: number
+ answer?: string | undefined
+ status?: string
+ query?: string | undefined
+ type?: 'remove-last-item' | string
+ }
+) {
+ // console.log('running reducer')
+ // console.log('what is currently in', ...state)
+ // console.log('what is the action payload', action)
+ // set a standard state to use later
+ let current = [...state]
+
+ console.log(action)
+
+ if (action.type) {
+ switch (action.type) {
+ case 'remove-last-item':
+ console.log('removing last item')
+ current.pop()
+ return [...current]
+ break
+
+ default:
+ break
+ }
+ }
+
+ // check that an index is present
+ if (action.index === undefined) return [...state]
+
+ if (!current[action.index]) {
+ current[action.index] = { query: '', answer: '', status: '' }
+ }
+
+ // if (action.answer !== undefined) {
+ current[action.index].answer = action.answer
+ // }
+ if (action.query) {
+ current[action.index].query = action.query
+ }
+ if (action.status) {
+ current[action.index].status = action.status
+ }
+
+ // console.log('what i will update with', current)
+ console.log(current)
+ return [...current]
+
+ throw Error('Unknown action.')
+}
+
+interface IAiCommand {
+ query?: string
+ setQuery?: () => void
+ page?: string
+}
+
+const AiCommand: FC = ({ query, setQuery, page }) => {
+ const { isDarkMode } = useTheme()
+
+ // const { close, query, setQuery } = useSearch()
+ const [answer, setAnswer] = useState('')
+ const [results, setResults] = useState()
+ const [isLoading, setIsLoading] = useState(false)
+ const [isResponding, setIsResponding] = useState(false)
+ const [hasClippyError, setHasClippyError] = useState(false)
+ const [hasSearchError, setHasSearchError] = useState(false)
+ const [selectedTab, setSelectedTab] = useState('clippy-panel')
+ const eventSourceRef = useRef()
+ const supabaseClient = useSupabaseClient()
+
+ const [promptIndex, setPromptIndex] = useState(0)
+ const [promptData, dispatchPromptData] = useReducer(promptDataReducer, [])
+
+ const cantHelp = answer?.trim() === "Sorry, I don't know how to help with that."
+ const status = isLoading
+ ? 'Clippy is searching...'
+ : isResponding
+ ? 'Clippy is responding...'
+ : cantHelp || hasClippyError
+ ? 'Clippy has failed you'
+ : undefined
+
+ // const handleSearchConfirm = useCallback(
+ // async (query: string) => {
+ // console.log('query', query)
+ // // console.log('query', query)
+
+ // setResults(undefined)
+ // setAnswer(undefined)
+ // setIsResponding(false)
+ // setHasClippyError(false)
+ // setHasSearchError(false)
+ // setIsLoading(true)
+
+ // const { error, data: pageSections } = await supabaseClient.functions.invoke('search', {
+ // body: { query: query },
+ // })
+
+ // setIsLoading(false)
+
+ // if (error) {
+ // setIsLoading(false)
+ // setIsResponding(false)
+ // setHasSearchError(true)
+ // console.error(error)
+ // return
+ // }
+
+ // if (!Array.isArray(pageSections)) {
+ // setIsLoading(false)
+ // setIsResponding(false)
+ // setHasSearchError(true)
+ // console.error('Malformed response')
+ // return
+ // }
+
+ // setResults(pageSections)
+ // },
+ // [supabaseClient]
+ // )
+
+ // console.log('current index', promptIndex)
+
+ const handleClippyConfirm = useCallback(
+ async (query: string) => {
+ // setResults(undefined)
+ // const promptIndex = promptIndex
+ console.log('handleClippyConfirm ran')
+ console.log('promptIndex', promptIndex)
+ setAnswer(undefined)
+ setQuery('')
+ dispatchPromptData({ index: promptIndex, answer: undefined, query: query })
+ setIsResponding(false)
+ setHasClippyError(false)
+ setHasSearchError(false)
+ setIsLoading(true)
+
+ let queryToSend = query
+
+ switch (page) {
+ case COMMAND_ROUTES.AI_ASK_ANYTHING:
+ queryToSend = query
+ break
+
+ case COMMAND_ROUTES.AI_RLS_POLICY:
+ queryToSend = `Given this table schema:
+
+ Schema STRIPE has tables:
+ CHARGE with columns [ID, AMOUNT, CREATED, CURRENCY, CUSTOMER_ID]
+ CUSTOMER with columns [ID, NAME, CREATED, SHIPPING_ADDRESS_STATE]
+
+ \n\nAnswer with only an RLS policy in SQL, no other text: ${query}`
+ break
+ default:
+ break
+ }
+
+ console.log('query to send:', queryToSend)
+
+ const eventSource = new SSE(`${edgeFunctionUrl}/clippy-search`, {
+ headers: {
+ apikey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
+ Authorization: `Bearer ${process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY}`,
+ 'Content-Type': 'application/json',
+ },
+ payload: JSON.stringify({ query: queryToSend }),
+ })
+
+ function handleError(err: T) {
+ setIsLoading(false)
+ setIsResponding(false)
+ // setHasClippyError(true)
+ console.error(err)
+ }
+
+ eventSource.addEventListener('error', handleError)
+ eventSource.addEventListener('message', (e: any) => {
+ try {
+ setIsLoading(false)
+
+ if (e.data === '[DONE]') {
+ // console.log('I HAVE FINSHED')
+ setIsResponding(false)
+ setAnswer(undefined)
+ setPromptIndex((x) => {
+ return x + 1
+ })
+ return
+ }
+
+ setIsResponding(true)
+
+ const completionResponse: CreateCompletionResponse = JSON.parse(e.data)
+ const [{ text }] = completionResponse.choices
+
+ console.log('Im going to use index:', promptIndex)
+
+ setAnswer((answer) => {
+ const currentAnswer = answer ?? ''
+
+ dispatchPromptData({
+ index: promptIndex,
+ answer: currentAnswer + text,
+ })
+
+ return (answer ?? '') + text
+ })
+ } catch (err) {
+ handleError(err)
+ }
+ })
+
+ eventSource.stream()
+
+ eventSourceRef.current = eventSource
+
+ setIsLoading(true)
+ },
+ [promptIndex, promptData]
+ )
+
+ const handleConfirm = useCallback(
+ (selectedTab: string, query: string) => {
+ switch (selectedTab) {
+ case 'search-panel':
+ // return handleSearchConfirm(query)
+ case 'clippy-panel':
+ return handleClippyConfirm(query)
+ }
+ },
+ [
+ // handleSearchConfirm,
+ handleClippyConfirm,
+ ]
+ )
+
+ // function handleResetPrompt() {
+ // eventSourceRef.current?.close()
+ // eventSourceRef.current = undefined
+ // setQuery('')
+ // setResults(undefined)
+ // setAnswer(undefined)
+ // setIsResponding(false)
+ // setHasClippyError(false)
+ // setHasSearchError(false)
+ // }
+
+ // console.log(promptData)
+
+ useEffect(() => {
+ if (query) {
+ handleClippyConfirm(query)
+ }
+ }, [])
+
+ const showActions =
+ !query &&
+ page === COMMAND_ROUTES.AI_RLS_POLICY &&
+ !isResponding &&
+ !isLoading &&
+ promptData.length > 0
+
+ return (
+ e.stopPropagation()}>
+
+ {/*
{
+ setSelectedTab(tabId)
+ if (!query) {
+ handleResetPrompt()
+ return
+ }
+ handleConfirm(tabId, query)
+ }}
+ > */}
+ {/*
+
+ {!isLoading && !hasSearchError && !results && (
+
+
+ Search Supabase guides & reference docs
+
+
+ )}
+ {results && results.length > 0 && (
+
+ {results.map((page) => {
+ const pageSections = page.sections.filter((section) => !!section.heading)
+ return (
+
+
+ {pageSections.length > 0 && (
+
+
+
+ {pageSections.map((section) => (
+
+ ))}
+
+
+ )}
+
+ )
+ })}
+
+ )}
+ {isLoading && (
+
+
{}
+
Searching for results
+
+ )}
+ {results && results.length === 0 && (
+
+
+
No results found.
+
+ Try again?
+
+
+ )}
+ {hasSearchError && (
+
+
+
+ Sorry, looks like we're having some issues with search!
+
+
Please try again in a bit.
+
+ Try again?
+
+
+ )}
+
+ */}
+ {/* */}
+ {/* {!isLoading && !answer && !hasClippyError && (
+
+
+
Not sure where to start?
+
+
+ {questions.map((question) => {
+ const key = question.replace(/\s+/g, '_')
+ return (
+
+ {
+ setQuery(question)
+ handleClippyConfirm(question)
+ }}
+ >
+ {question}
+
+
+ )
+ })}
+
+
+
+ )} */}
+
+
+ {promptData.map((prompt, i) => {
+ if (!prompt.query) return <>>
+
+ return (
+ <>
+ {prompt.query && (
+
+ )}
+
+
+ {
+ // cantHelp
+ false ? (
+
+
+
+
Sorry, I don't know how to help with that.
+
+ {/*
+ Try again?
+ */}
+
+ ) : (
+
+
+ {/*
*/}
+
+ {isLoading && promptIndex === i ? (
+
+ ) : (
+
{
+ const supabaseUrl = new URL('https://supabase.com')
+ const linkUrl = new URL(href, 'https://supabase.com')
+
+ if (linkUrl.origin === supabaseUrl.origin) {
+ return linkUrl.toString()
+ }
+
+ return href
+ }}
+ // components={components}
+ >
+ {prompt.answer}
+
+ )}
+
+
+ )
+ }
+
+
+ {showActions && promptIndex === i + 1 && (
+
+ {
+ if (!query) {
+ alert("You've selected me")
+ }
+ }}
+ forceMount
+ >
+
+ Copy SQL to clipboard
+
+ {promptData.length > 1 && (
+ {
+ if (!query) {
+ dispatchPromptData({ type: 'remove-last-item' })
+ setPromptIndex((x) => {
+ return x - 1
+ })
+ // alert('back to previous version')
+ }
+ }}
+ >
+
+ Back to previous version
+
+ )}
+
+
+ Run in SQL editor
+
+
+ )}
+ >
+ )
+ })}
+
+
+ {promptData.length <= 0 && page === COMMAND_ROUTES.AI_ASK_ANYTHING && (
+
+ {questions.map((question) => {
+ const key = question.replace(/\s+/g, '_')
+ return (
+ {
+ if (!query) {
+ handleClippyConfirm(question)
+ }
+ }}
+ forceMount
+ key={key}
+ >
+
+ {question}
+
+ )
+ })}
+
+ )}
+
+ {/* {promptData.length <= 0 && page === COMMAND_ROUTES.AI_RLS_POLICY && (
+
+ {RLSquestions.map((question) => {
+ const key = question.replace(/\s+/g, '_')
+ return (
+ {
+ if (!query) {
+ handleClippyConfirm(question)
+ }
+ }}
+ forceMount
+ key={key}
+ >
+
+ {question}
+
+ )
+ })}
+
+ )} */}
+
+ {/* {isLoading && (
+
+
{}
+
Searching for results
+
+ )} */}
+ {hasClippyError && (
+
+
+
+ Sorry, looks like Clippy is having a hard time!
+
+
Please try again in a bit.
+ {/*
+ Try again?
+ */}
+
+ )}
+
+ {/*
+ esc
+ */}
+
+ {/* {!isLoading && answer && (
+
+
+ Try again
+
+
+ )} */}
+
+
+ {/*
setQuery(e.target.value)}
+ // icon={
}
+ onKeyDown={(e) => {
+ switch (e.key) {
+ case 'Enter':
+ if (!query) {
+ return
+ }
+ handleConfirm(selectedTab, query)
+ return
+ default:
+ return
+ }
+ }}
+ />
+
+
+
+ Powered by OpenAI.
+
+
+ {status ? (
+
+ {(isLoading || isResponding) && }
+ {status}
+
+ ) : (
+ <>>
+ )}
+
+
+
+
+
+ )
+}
+
+export { AiCommand }
diff --git a/packages/ui/src/components/Command/Command.tsx b/packages/ui/src/components/Command/Command.tsx
new file mode 100644
index 00000000000..ed0d5fca7b8
--- /dev/null
+++ b/packages/ui/src/components/Command/Command.tsx
@@ -0,0 +1,443 @@
+import React from 'react'
+import { useRouter } from 'next/router'
+
+import { Calculator, Calendar, CreditCard, Settings, Smile, User } from 'lucide-react'
+import { useCommandState } from 'cmdk-supabase'
+import {
+ CommandDialog,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandItemStale,
+ CommandLabel,
+ CommandList,
+ CommandSeparator,
+ CommandShortcut,
+} from './Command.utils'
+import { IconCloudDrizzle } from '../Icon/icons/IconCloudDrizzle'
+import { IconBook } from '../Icon/icons/IconBook'
+import { IconInbox } from '../Icon/icons/IconInbox'
+import { IconMonitor } from '../Icon/icons/IconMonitor'
+import { Input } from '../Input'
+import { AiCommand } from './AiCommand'
+import { IconSun } from '../Icon/icons/IconSun'
+import { IconMoon } from '../Icon/icons/IconMoon'
+import { IconCopy } from '../Icon/icons/IconCopy'
+import DocsSearch from './DocsSearch'
+// import { SearchProvider } from './SearchProvider'
+
+export const AiIcon = () => (
+
+
+
+)
+
+export const COMMAND_ROUTES = {
+ AI_HOME: 'Supabase AI',
+ AI_ASK_ANYTHING: 'Ask me anything',
+ AI_RLS_POLICY: 'Help me make a RLS policy',
+ DOCS_SEARCH: 'Docs Search',
+}
+
+const AI_CHAT_ROUTES = [COMMAND_ROUTES.AI_ASK_ANYTHING, COMMAND_ROUTES.AI_RLS_POLICY]
+
+export const AiIconChat = () => (
+
+)
+
+interface IActions {
+ toggleTheme: () => void
+}
+
+const ItemHandler = (props: any) => {
+ const search = useCommandState((state) => state.search)
+ if (!search && props.isSubItem) return null
+ return
+}
+
+function CommandMenu({ actions }: { actions: IActions }) {
+ const [open, setOpen] = React.useState(false)
+ const [search, setSearch] = React.useState('')
+ const [aiSearch, setAiSearch] = React.useState('')
+ const [pages, setPages] = React.useState([])
+ const page = pages[pages.length - 1]
+ const [isLoading, setIsLoading] = React.useState(false)
+ const router = useRouter()
+
+ const ThemeOptions = ({ isSubItem = false }) => {
+ return (
+
+ {
+ actions.toggleTheme()
+ setOpen(false)
+ }}
+ >
+ Change Theme to dark
+
+ {
+ actions.toggleTheme()
+ setOpen(false)
+ }}
+ >
+ Change Theme to light
+
+
+ )
+ }
+
+ React.useEffect(() => {
+ const down = (e: KeyboardEvent) => {
+ if (e.key === 'k' && e.metaKey) {
+ setOpen((open) => !open)
+ }
+ }
+
+ document.addEventListener('keydown', down)
+ return () => document.removeEventListener('keydown', down)
+ }, [])
+
+ function handleSetPages(pages: any, keepSearch: any) {
+ setPages(pages)
+ if (!keepSearch) setSearch('')
+ }
+
+ console.log('page', page)
+
+ const showCommandInput = page === undefined || !AI_CHAT_ROUTES.includes(page)
+
+ return (
+ <>
+
+ Press{' '}
+
+ ⌘ J
+
+
+ setOpen(!open)}
+ size={'xlarge'}
+ className={'max-h-[70vh] lg:max-h-[50vh] overflow-hidden overflow-y-auto'}
+ onKeyDown={(e) => {
+ // Escape goes to previous page
+ // Backspace goes to previous page when search is empty
+ if (
+ e.key === 'Escape'
+ // || (e.key === 'Backspace' && !search)
+ ) {
+ e.preventDefault()
+ if (!page) setOpen(false)
+ setSearch('')
+ setPages((pages) => pages.slice(0, -1))
+ }
+ }}
+ >
+ {pages.length > 0 && (
+
+ setPages([])}>{'Home'}
+ {pages.map((page, index) => (
+ {
+ if (index === pages.length - 1) {
+ return
+ }
+ setPages((pages) => pages.slice(0, index - 1))
+ }}
+ >
+ {page}
+
+ ))}
+
+ )}
+ {showCommandInput && (
+
+ )}
+ {/*
+ Change theme…
+ Change theme to dark
+ Change theme to light
+ */}
+
+
+ {!page && (
+ <>
+
+ {
+ console.log('search', search)
+ if (search) {
+ handleSetPages([...pages, 'Supabase AI', 'Ask anything'], true)
+ } else {
+ handleSetPages([...pages, 'Supabase AI'], false)
+ }
+ }}
+ forceMount
+ >
+
+
+ Ask Supabase AI...{' '}
+ {search}
+
+
+ handleSetPages([...pages, 'Docs Search'], true)}
+ forceMount
+ >
+
+
+
+ Search the docs...
+ {search}
+
+
+
+
+
+
+ See what's new
+
+ handleSetPages([...pages, 'Theme'], false)}>
+
+ Change theme
+
+
+
+ Copy current page URL
+
+
+
+ handleSetPages([...pages, 'api-keys'], true)}>
+
+ API keys
+ ⌘B
+
+
+
+ Profile
+ ⌘P
+
+
+
+ Billing
+ ⌘B
+
+
+
+ Settings
+ ⌘S
+
+
+
+
+
+ Profile2
+ ⌘P
+
+
+
+ Billing2
+ ⌘B
+
+
+
+ Settings2
+ ⌘S
+
+
+
+
+ >
+ )}
+ {page === 'docs-search' && (
+ <>
+
+
+
+ Something database
+ ⌘S
+
+
+
+
+
+ Something Auth
+ ⌘S
+
+
+
+ Something Auth 2
+ ⌘S
+
+
+ >
+ )}
+ {page === COMMAND_ROUTES.AI_ASK_ANYTHING && (
+ <>
+
+ >
+ )}
+ {page === COMMAND_ROUTES.DOCS_SEARCH && (
+ <>
+
+ >
+ )}
+ {page === COMMAND_ROUTES.AI_RLS_POLICY && (
+ <>
+
+ >
+ )}
+ {page === 'api-keys' && (
+ <>
+
+
+
+ Copy Anon key
+ ⌘S
+
+
+
+
+ I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM
+
+
+
+
+
+ Copy Service role key
+ ⌘S
+
+
+
+
+ I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM
+
+
+
+
+
+ Roll new keys
+ ⌘S
+
+
+
+ Switch project
+ ⌘S
+
+
+ >
+ )}
+
+ {page === 'Supabase AI' && (
+ <>
+
+ handleSetPages([...pages, COMMAND_ROUTES.AI_ASK_ANYTHING], true)}
+ forceMount
+ >
+
+
+ Ask Supabase AI...{' '}
+ {search}
+
+
+ handleSetPages([...pages, COMMAND_ROUTES.AI_RLS_POLICY], false)}
+ >
+
+ Help me make an RLS policy
+
+
+
+ Help me make an Postgres function
+
+
+
+ Help me make an Postgres trigger
+
+
+
+ Help me make a table
+
+
+ >
+ )}
+ {page === 'Theme' && (
+ <>
+
+ {
+ router.push('https://supabase.com/docs')
+ setOpen(false)
+ }}
+ >
+ Grab api keys
+
+
+
+ >
+ )}
+ {page !== 'Ask anything' || (!page && No results found. )}
+
+
+ {/* */}
+ >
+ )
+}
+
+export { CommandMenu }
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
new file mode 100644
index 00000000000..a98f3e7c6ab
--- /dev/null
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -0,0 +1,268 @@
+import * as React from 'react'
+import { DialogProps } from '@radix-ui/react-dialog'
+import { Command as CommandPrimitive, useCommandState } from 'cmdk-supabase'
+
+import { cn } from './../../utils/cn'
+import { Dialog, DialogContent } from './../Dialog'
+import { IconSearch } from '../Icon/icons/IconSearch'
+import { Modal } from '../Modal'
+import { ModalProps } from '../Modal/Modal'
+import { KeyboardEventHandler } from 'react'
+import { LoadingLine } from './LoadingLine'
+
+const Command = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+Command.displayName = CommandPrimitive.displayName
+
+interface CommandDialogProps extends ModalProps {
+ onKeyDown: KeyboardEventHandler
+}
+
+const CommandDialog = ({ children, onKeyDown, page, ...props }: CommandDialogProps) => {
+ const [animateBounce, setAnimateBounce] = React.useState(false)
+
+ React.useEffect(() => {
+ setAnimateBounce(true)
+ setTimeout(() => setAnimateBounce(false), 126)
+ }, [page])
+
+ return (
+
+ {/* */}
+
+ {children}
+
+ {/* */}
+
+ )
+}
+
+type CommandPrimitiveInputProps = React.ComponentPropsWithoutRef
+
+type CommandInputProps = CommandPrimitiveInputProps & {
+ loading?: boolean
+ _key?: string | number
+}
+
+const CommandInput = React.forwardRef<
+ React.ElementRef,
+ CommandInputProps
+>(({ className, value, loading, onValueChange, _key, ...props }, ref) => (
+
+ {/* */}
+
+
+
+))
+
+CommandInput.displayName = CommandPrimitive.Input.displayName
+
+const CommandList = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+
+CommandList.displayName = CommandPrimitive.List.displayName
+
+const CommandEmpty = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>((props, ref) => (
+
+))
+
+CommandEmpty.displayName = CommandPrimitive.Empty.displayName
+
+type CommandPrimitiveGroupProps = React.ComponentPropsWithoutRef
+
+type CommandGroupProps = CommandPrimitiveGroupProps & {
+ _key?: string | number
+}
+
+const CommandGroup = React.forwardRef<
+ React.ElementRef,
+ CommandGroupProps
+>(({ className, _key, ...props }, ref) => (
+
+))
+
+CommandGroup.displayName = CommandPrimitive.Group.displayName
+
+const CommandSeparator = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+CommandSeparator.displayName = CommandPrimitive.Separator.displayName
+
+const CommandItem = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, type, ...props }, ref) => (
+
+))
+
+const CommandItemStale = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+
+CommandItem.displayName = CommandPrimitive.Item.displayName
+
+const CommandShortcut = ({ className, ...props }: React.HTMLAttributes) => {
+ return (
+
+ )
+}
+CommandShortcut.displayName = 'CommandShortcut'
+
+const CommandLabel = ({ className, ...props }: React.HTMLAttributes) => {
+ return
+}
+
+export {
+ Command,
+ CommandDialog,
+ CommandInput,
+ CommandList,
+ CommandEmpty,
+ CommandGroup,
+ CommandItem,
+ CommandItemStale,
+ CommandShortcut,
+ CommandSeparator,
+ CommandLabel,
+}
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui/src/components/Command/DocsSearch.tsx
new file mode 100644
index 00000000000..c7ed2b2f039
--- /dev/null
+++ b/packages/ui/src/components/Command/DocsSearch.tsx
@@ -0,0 +1,466 @@
+import * as React from 'react'
+import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react'
+import { SSE } from 'sse.js'
+
+import { useSupabaseClient } from '@supabase/auth-helpers-react'
+import { useTheme } from 'common/Providers'
+import {
+ Button,
+ IconAlertTriangle,
+ IconBook,
+ IconChevronRight,
+ IconHash,
+ IconLoader,
+ IconSearch,
+} from 'ui'
+import { CommandGroup, CommandItem, CommandLabel } from './Command.utils'
+
+import { debounce } from 'lodash'
+
+const questions = [
+ 'How do I get started with Supabase?',
+ 'How do I run Supabase locally?',
+ 'How do I connect to my database?',
+ 'How do I run migrations? ',
+ 'How do I listen to changes in a table?',
+ 'How do I set up authentication?',
+]
+
+function getEdgeFunctionUrl() {
+ const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL?.replace(/\/$/, '')
+
+ // if (IS_PLATFORM) {
+ if (true) {
+ // @ts-ignore
+ const [schemeAndProjectId, domain, tld] = supabaseUrl.split('.')
+ return `${schemeAndProjectId}.functions.${domain}.${tld}`
+ } else {
+ return `${supabaseUrl}/functions/v1`
+ }
+}
+
+const edgeFunctionUrl = getEdgeFunctionUrl()
+
+function promptDataReducer(
+ state: any[],
+ action: {
+ index?: number
+ answer?: string | undefined
+ status?: string
+ query?: string | undefined
+ type?: 'remove-last-item' | string
+ }
+) {
+ // console.log('running reducer')
+ // console.log('what is currently in', ...state)
+ // console.log('what is the action payload', action)
+ // set a standard state to use later
+ let current = [...state]
+
+ console.log(action)
+
+ if (action.type) {
+ switch (action.type) {
+ case 'remove-last-item':
+ console.log('removing last item')
+ current.pop()
+ return [...current]
+ break
+
+ default:
+ break
+ }
+ }
+
+ // check that an index is present
+ if (action.index === undefined) return [...state]
+
+ if (!current[action.index]) {
+ current[action.index] = { query: '', answer: '', status: '' }
+ }
+
+ // if (action.answer !== undefined) {
+ current[action.index].answer = action.answer
+ // }
+ if (action.query) {
+ current[action.index].query = action.query
+ }
+ if (action.status) {
+ current[action.index].status = action.status
+ }
+
+ // console.log('what i will update with', current)
+ console.log(current)
+ return [...current]
+
+ throw Error('Unknown action.')
+}
+
+export interface DocsSearchProps {
+ query?: string
+ setQuery?: () => void
+ page?: string
+ isLoading?: boolean
+ setIsLoading?: () => void
+ router: any
+}
+
+const DocsSearch = ({
+ query,
+ setQuery,
+ page,
+ isLoading,
+ setIsLoading,
+ router,
+}: DocsSearchProps) => {
+ const { isDarkMode } = useTheme()
+
+ // const { close, query, setQuery } = useSearch()
+ const [answer, setAnswer] = useState('')
+ const [results, setResults] = useState([])
+ const [isResponding, setIsResponding] = useState(false)
+ const [hasClippyError, setHasClippyError] = useState(false)
+ const [hasSearchError, setHasSearchError] = useState(false)
+ const [selectedTab, setSelectedTab] = useState('clippy-panel')
+ const eventSourceRef = useRef()
+ const supabaseClient = useSupabaseClient()
+
+ const [promptIndex, setPromptIndex] = useState(0)
+ const [promptData, dispatchPromptData] = useReducer(promptDataReducer, [])
+
+ const cantHelp = answer?.trim() === "Sorry, I don't know how to help with that."
+ const status = isLoading
+ ? 'Clippy is searching...'
+ : isResponding
+ ? 'Clippy is responding...'
+ : cantHelp || hasClippyError
+ ? 'Clippy has failed you'
+ : undefined
+
+ const handleSearchConfirm = useCallback(
+ async (query: string) => {
+ console.log('query', query)
+ // console.log('query', query)
+
+ // setResults(undefined)
+ setAnswer(undefined)
+ setIsResponding(false)
+ setHasClippyError(false)
+ setHasSearchError(false)
+ setIsLoading(true)
+
+ const { error, data: pageSections } = await supabaseClient.functions.invoke('search', {
+ body: { query: query },
+ })
+
+ setIsLoading(false)
+
+ if (error) {
+ setIsLoading(false)
+ setIsResponding(false)
+ setHasSearchError(true)
+ console.error(error)
+ return
+ }
+
+ if (!Array.isArray(pageSections)) {
+ setIsLoading(false)
+ setIsResponding(false)
+ setHasSearchError(true)
+ console.error('Malformed response')
+ return
+ }
+
+ setResults(undefined)
+ setResults(pageSections)
+ },
+ [supabaseClient]
+ )
+
+ // console.log('current index', promptIndex)
+
+ function handleResetPrompt() {
+ eventSourceRef.current?.close()
+ eventSourceRef.current = undefined
+ setQuery('')
+ setResults(undefined)
+ setAnswer(undefined)
+ setIsResponding(false)
+ setHasClippyError(false)
+ setHasSearchError(false)
+ }
+
+ // console.log(promptData)
+
+ const debounceFn = useMemo(() => debounce(handleSearchConfirm, 1000), [])
+
+ useEffect(() => {
+ // if (query) {
+ // handleSearchConfirm(query)
+ // }
+ if (query) {
+ debounceFn(query)
+ }
+ }, [query])
+
+ const ChevronArrow = () => (
+
+ )
+
+ const IconContainer = (props) => (
+
+ )
+
+ function TextHighlighter(props) {
+ const [searchText, setSearchText] = useState('')
+
+ // const handleSearch = (event) => {
+ // setSearchText(event.target.value.trim().toLowerCase())
+ // }
+
+ const highlightMatches = (text) => {
+ if (!query) {
+ return text
+ }
+
+ if (!text) return ``
+
+ const regex = new RegExp(query, 'gi')
+ return text.replace(
+ regex,
+ (match) => `${match} `
+ )
+ }
+
+ return
+ }
+
+ return (
+ <>
+ {results &&
+ results.length > 0 &&
+ results.map((page, i) => {
+ const pageSections = page.sections.filter((section) => !!section.heading)
+ return (
+
+ {
+ router.push(`${page.path}`)
+ }}
+ >
+
+
+
+
+ {pageSections.length > 0 && (
+
+ {pageSections.map((section, i) => (
+ //
+
{
+ router.push(
+ `${page.path}${page.type === 'reference' ? '/' : '#'}${section.slug}`
+ )
+ }}
+ key={`${page.meta.title}__${section.heading}-item-index-${i}`}
+ value={`${page.meta.title}__${section.heading}-item-index-${i}`}
+ type="link"
+ >
+
+
+
+ ))}
+
+ )}
+
+ )
+ })}
+ {results?.length <= 0 && (
+
+ {questions.map((question) => {
+ const key = question.replace(/\s+/g, '_')
+ return (
+ {
+ if (!query) {
+ handleSearchConfirm(question)
+ setQuery(question)
+ }
+ }}
+ forceMount
+ key={key}
+ >
+
+ {question}
+
+ )
+ })}
+
+ )}
+ {isLoading && (
+
+ {/*
{} */}
+
Searching for results
+
+ )}
+ {results && results.length === 0 && (
+
+
+
No results found.
+
+ Try again?
+
+
+ )}
+ {hasSearchError && (
+
+
+
+ Sorry, looks like we're having some issues with search!
+
+
Please try again in a bit.
+
+ Try again?
+
+
+ )}
+
+ {/* */}
+ {/* {!isLoading && !answer && !hasClippyError && (
+
+
+
Not sure where to start?
+
+
+ {questions.map((question) => {
+ const key = question.replace(/\s+/g, '_')
+ return (
+
+ {
+ setQuery(question)
+ handleClippyConfirm(question)
+ }}
+ >
+ {question}
+
+
+ )
+ })}
+
+
+
+ )} */}
+
+ {hasClippyError && (
+
+
+
+ Sorry, looks like Clippy is having a hard time!
+
+
Please try again in a bit.
+ {/*
+ Try again?
+ */}
+
+ )}
+
+
+
+
+
+
+ Powered by OpenAI.
+
+
+ {status ? (
+
+ {(isLoading || isResponding) && }
+ {status}
+
+ ) : (
+ <>>
+ )}
+
+
+
+
+ >
+ )
+}
+
+export default DocsSearch
diff --git a/packages/ui/src/components/Command/LoadingLine.tsx b/packages/ui/src/components/Command/LoadingLine.tsx
new file mode 100644
index 00000000000..012cdf62b00
--- /dev/null
+++ b/packages/ui/src/components/Command/LoadingLine.tsx
@@ -0,0 +1,16 @@
+import React from 'react'
+import { cn } from '../../utils/cn'
+
+export const LoadingLine = ({ loading }: { loading: boolean }) => {
+ return (
+
+
+
+ )
+}
diff --git a/packages/ui/src/components/Command/SearchProvider.tsx b/packages/ui/src/components/Command/SearchProvider.tsx
new file mode 100644
index 00000000000..48229bad589
--- /dev/null
+++ b/packages/ui/src/components/Command/SearchProvider.tsx
@@ -0,0 +1,8 @@
+import React, { FC, PropsWithChildren } from 'react'
+import { AiCommand } from './AiCommand'
+
+const SearchProvider: FC = () => {
+ return
+}
+
+export { SearchProvider }
diff --git a/packages/ui/src/components/Command/SearchResult.tsx b/packages/ui/src/components/Command/SearchResult.tsx
new file mode 100644
index 00000000000..091cb0f31e3
--- /dev/null
+++ b/packages/ui/src/components/Command/SearchResult.tsx
@@ -0,0 +1,56 @@
+import React from 'react'
+
+import Link from 'next/link'
+import { FC } from 'react'
+import { IconBookOpen, IconHash } from '~/../../packages/ui'
+// import { useSearch } from './SearchProvider'
+
+export enum SearchResultType {
+ Document = 'document',
+ Section = 'section',
+}
+
+type Props = {
+ href: string
+ type: SearchResultType
+ title: string
+ chip?: string
+}
+
+const SearchResult: FC = ({ href, type, title, chip }) => {
+ // const { close } = useSearch()
+
+ return (
+ //
+
+
+ {getIconByType(type)}
+
+
+ {chip && (
+
+ {chip}
+
+ )}
+
{title}
+
+
+ //
+ )
+}
+
+function getIconByType(type: SearchResultType) {
+ switch (type) {
+ case SearchResultType.Document:
+ return
+ case SearchResultType.Section:
+ return
+ default:
+ throw new Error(`Unknown search result type '${type}'`)
+ }
+}
+
+export default SearchResult
diff --git a/packages/ui/src/components/Command/index.tsx b/packages/ui/src/components/Command/index.tsx
new file mode 100644
index 00000000000..71923a11d52
--- /dev/null
+++ b/packages/ui/src/components/Command/index.tsx
@@ -0,0 +1 @@
+export * from './Command'
diff --git a/packages/ui/src/components/Dropdown/Dropdown.tsx b/packages/ui/src/components/Dropdown/Dropdown.tsx
index 90a343191ff..ea0791eafee 100644
--- a/packages/ui/src/components/Dropdown/Dropdown.tsx
+++ b/packages/ui/src/components/Dropdown/Dropdown.tsx
@@ -50,26 +50,27 @@ function Dropdown({
return (
{isNested ? (
-
+
{children}
-
+
) : (
{children}
)}
-
- {arrow && (
-
- )}
- {overlay}
-
+
+
+ {arrow && (
+
+ )}
+ {overlay}
+
+
)
}
diff --git a/packages/ui/src/components/Modal/Modal.tsx b/packages/ui/src/components/Modal/Modal.tsx
index c475ab11ff1..dd56017ec1e 100644
--- a/packages/ui/src/components/Modal/Modal.tsx
+++ b/packages/ui/src/components/Modal/Modal.tsx
@@ -159,7 +159,7 @@ const Modal = ({
{header && {header}
}
diff --git a/packages/ui/src/components/Popover/Popover.tsx b/packages/ui/src/components/Popover/Popover.tsx
index 010e5f591ce..5c47d177927 100644
--- a/packages/ui/src/components/Popover/Popover.tsx
+++ b/packages/ui/src/components/Popover/Popover.tsx
@@ -16,7 +16,6 @@ interface RootProps {
onOpenChange?: RadixPopoverTypes.PopoverProps['onOpenChange']
open?: boolean
overlay?: React.ReactNode
- portalled?: boolean
showClose?: boolean
side?: RadixPopoverTypes.PopoverContentProps['side']
sideOffset?: RadixPopoverTypes.PopoverContentProps['sideOffset']
@@ -37,7 +36,6 @@ function Popover({
onOpenChange,
open,
overlay,
- portalled,
side = 'bottom',
sideOffset = 6,
style,
@@ -67,24 +65,25 @@ function Popover({
{children}
-
- {arrow && (
-
- )}
- {header && {header}
}
- {overlay}
- {footer && {footer}
}
-
+
+
+ {arrow && (
+
+ )}
+ {header && {header}
}
+ {overlay}
+ {footer && {footer}
}
+
+
)
}
diff --git a/packages/ui/src/utils/cn.ts b/packages/ui/src/utils/cn.ts
new file mode 100644
index 00000000000..5589c557500
--- /dev/null
+++ b/packages/ui/src/utils/cn.ts
@@ -0,0 +1,6 @@
+import { ClassValue, clsx } from 'clsx'
+import { twMerge } from 'tailwind-merge'
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs))
+}
From f69ede49ddc9f4a008c914cdfa97338b0c1ac916 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Thu, 23 Mar 2023 12:25:15 -0600
Subject: [PATCH 02/94] chore(cmdk): command menu context with hooks
---
.../ui/src/components/Command/AiCommand.tsx | 4 +-
.../ui/src/components/Command/Command.tsx | 24 +++++-----
.../src/components/Command/Command.utils.tsx | 46 ++++++++++---------
.../ui/src/components/Command/DocsSearch.tsx | 13 ++----
4 files changed, 42 insertions(+), 45 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index fbe3deafe94..8460139a9c8 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -30,7 +30,7 @@ import SearchResult, { SearchResultType } from './SearchResult'
import { CommandGroup, CommandItem, CommandInput } from './Command.utils'
import { IconCopy } from '../Icon/icons/IconCopy'
-import { AiIcon, AiIconChat, COMMAND_ROUTES } from './Command'
+import { AiIcon, AiIconChat, COMMAND_ROUTES, useCommandMenu } from './Command'
const questions = [
'How do I get started with Supabase?',
@@ -132,13 +132,13 @@ const AiCommand: FC = ({ query, setQuery, page }) => {
// const { close, query, setQuery } = useSearch()
const [answer, setAnswer] = useState('')
const [results, setResults] = useState()
- const [isLoading, setIsLoading] = useState(false)
const [isResponding, setIsResponding] = useState(false)
const [hasClippyError, setHasClippyError] = useState(false)
const [hasSearchError, setHasSearchError] = useState(false)
const [selectedTab, setSelectedTab] = useState('clippy-panel')
const eventSourceRef = useRef()
const supabaseClient = useSupabaseClient()
+ const { isLoading, setIsLoading } = useCommandMenu()
const [promptIndex, setPromptIndex] = useState(0)
const [promptData, dispatchPromptData] = useReducer(promptDataReducer, [])
diff --git a/packages/ui/src/components/Command/Command.tsx b/packages/ui/src/components/Command/Command.tsx
index ed0d5fca7b8..a6ab6dd3125 100644
--- a/packages/ui/src/components/Command/Command.tsx
+++ b/packages/ui/src/components/Command/Command.tsx
@@ -1,4 +1,5 @@
-import React from 'react'
+import * as React from 'react'
+import { createContext, useContext } from 'react'
import { useRouter } from 'next/router'
import { Calculator, Calendar, CreditCard, Settings, Smile, User } from 'lucide-react'
@@ -92,6 +93,13 @@ const ItemHandler = (props: any) => {
return
}
+export interface CommandMenuContextValue {
+ isLoading: boolean
+ setIsLoading: (isLoading: boolean) => void
+}
+export const CommandMenuContext = createContext(undefined)
+export const useCommandMenu = () => useContext(CommandMenuContext)
+
function CommandMenu({ actions }: { actions: IActions }) {
const [open, setOpen] = React.useState(false)
const [search, setSearch] = React.useState('')
@@ -147,7 +155,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
const showCommandInput = page === undefined || !AI_CHAT_ROUTES.includes(page)
return (
- <>
+
Press{' '}
@@ -198,7 +206,6 @@ function CommandMenu({ actions }: { actions: IActions }) {
placeholder="Type a command or search..."
value={search}
onValueChange={setSearch}
- loading={isLoading}
/>
)}
{/*
@@ -327,14 +334,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
)}
{page === COMMAND_ROUTES.DOCS_SEARCH && (
<>
-
+
>
)}
{page === COMMAND_ROUTES.AI_RLS_POLICY && (
@@ -436,7 +436,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
{/* */}
- >
+
)
}
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index a98f3e7c6ab..1c9f710975d 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -9,6 +9,7 @@ import { Modal } from '../Modal'
import { ModalProps } from '../Modal/Modal'
import { KeyboardEventHandler } from 'react'
import { LoadingLine } from './LoadingLine'
+import { useCommandMenu } from './Command'
const Command = React.forwardRef<
React.ElementRef,
@@ -71,33 +72,36 @@ const CommandDialog = ({ children, onKeyDown, page, ...props }: CommandDialogPro
type CommandPrimitiveInputProps = React.ComponentPropsWithoutRef
type CommandInputProps = CommandPrimitiveInputProps & {
- loading?: boolean
_key?: string | number
}
const CommandInput = React.forwardRef<
React.ElementRef,
CommandInputProps
->(({ className, value, loading, onValueChange, _key, ...props }, ref) => (
-
- {/* */}
-
-
-
-))
+>(({ className, value, onValueChange, _key, ...props }, ref) => {
+ const { isLoading } = useCommandMenu()
+
+ return (
+
+ {/* */}
+
+
+
+ )
+})
CommandInput.displayName = CommandPrimitive.Input.displayName
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui/src/components/Command/DocsSearch.tsx
index c7ed2b2f039..434a1bc4ba4 100644
--- a/packages/ui/src/components/Command/DocsSearch.tsx
+++ b/packages/ui/src/components/Command/DocsSearch.tsx
@@ -12,6 +12,7 @@ import {
IconHash,
IconLoader,
IconSearch,
+ useCommandMenu,
} from 'ui'
import { CommandGroup, CommandItem, CommandLabel } from './Command.utils'
@@ -100,19 +101,10 @@ export interface DocsSearchProps {
query?: string
setQuery?: () => void
page?: string
- isLoading?: boolean
- setIsLoading?: () => void
router: any
}
-const DocsSearch = ({
- query,
- setQuery,
- page,
- isLoading,
- setIsLoading,
- router,
-}: DocsSearchProps) => {
+const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
const { isDarkMode } = useTheme()
// const { close, query, setQuery } = useSearch()
@@ -124,6 +116,7 @@ const DocsSearch = ({
const [selectedTab, setSelectedTab] = useState('clippy-panel')
const eventSourceRef = useRef()
const supabaseClient = useSupabaseClient()
+ const { isLoading, setIsLoading } = useCommandMenu()
const [promptIndex, setPromptIndex] = useState(0)
const [promptData, dispatchPromptData] = useReducer(promptDataReducer, [])
From 6ab7ea454899847a9dcce78ec80e27189f8f0466 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 02:27:47 +0800
Subject: [PATCH 03/94] add loading animation
---
.../docs/components/Search/SearchProvider.tsx | 5 ++--
apps/docs/pages/_app.tsx | 1 +
packages/config/ui.config.js | 28 +++++++++++++++++++
.../ui/src/components/Command/LoadingLine.tsx | 5 ++--
4 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/apps/docs/components/Search/SearchProvider.tsx b/apps/docs/components/Search/SearchProvider.tsx
index 4175c159c29..6f34dc541f5 100644
--- a/apps/docs/components/Search/SearchProvider.tsx
+++ b/apps/docs/components/Search/SearchProvider.tsx
@@ -31,12 +31,12 @@ const SearchProvider: FC> = ({ children }) => {
const [query, setQuery] = useState('')
const open = useCallback(() => {
- setIsOpen(true)
+ // setIsOpen(true)
document.body.classList.add('DocSearch--active')
}, [])
const close = useCallback(() => {
- setIsOpen(false)
+ // setIsOpen(false)
document.body.classList.remove('DocSearch--active')
}, [])
@@ -44,7 +44,6 @@ const SearchProvider: FC> = ({ children }) => {
open,
close,
})
-
return (
{children}
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index d68bc1e5151..45b239419d9 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -85,6 +85,7 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
)}
+
>
)
diff --git a/packages/config/ui.config.js b/packages/config/ui.config.js
index 18b5877136b..119b32bba65 100644
--- a/packages/config/ui.config.js
+++ b/packages/config/ui.config.js
@@ -225,6 +225,26 @@ const uiConfig = {
'0%': { transform: 'translate-x-0', opacity: 1 },
'100%': { transform: 'translateX(100%)', opacity: 0 },
},
+ lineLoading: {
+ '0%': {
+ marginLeft: '-10%',
+ width: '80px',
+ },
+ '25%': {
+ width: ' 240px',
+ },
+ '50%': {
+ marginLeft: ' 100%',
+ width: '80px',
+ },
+ '75%': {
+ width: '240px',
+ },
+ '100%': {
+ marginLeft: '-10%',
+ width: '80px',
+ },
+ },
},
animation: {
'fade-in': 'fadeIn 300ms',
@@ -267,6 +287,14 @@ const uiConfig = {
function ({ addUtilities, addVariant }) {
// addVariant('data-open', '&:[data-state=open]')
addUtilities({
+ '.loading-line--animate': {
+ xTransition: 'all 1s ease-in-out',
+ animation: 'ani 1.8s infinite',
+ background: 'rgb(0, 0, 0)',
+ background:
+ 'linear-gradient(90deg,rgba(0, 0, 0, 0) 0%,rgba(255, 255, 255, 0.65) 50%,rgba(0, 0, 0, 0) 100%)',
+ boxShadow: '1px 2px 0 0 white',
+ },
".dropdown-content[data-state='open']": {
animation: 'fadeIn 50ms ease-out',
},
diff --git a/packages/ui/src/components/Command/LoadingLine.tsx b/packages/ui/src/components/Command/LoadingLine.tsx
index 012cdf62b00..0e7164713c7 100644
--- a/packages/ui/src/components/Command/LoadingLine.tsx
+++ b/packages/ui/src/components/Command/LoadingLine.tsx
@@ -3,11 +3,12 @@ import { cn } from '../../utils/cn'
export const LoadingLine = ({ loading }: { loading: boolean }) => {
return (
-
+
From 5d8074e3078eba52dc8dd9b7032d1ad999b410f6 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 02:34:24 +0800
Subject: [PATCH 04/94] fix overlay z index
---
packages/ui/src/lib/theme/defaultTheme.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/ui/src/lib/theme/defaultTheme.ts b/packages/ui/src/lib/theme/defaultTheme.ts
index d5bffd27180..d5cc6ffea72 100644
--- a/packages/ui/src/lib/theme/defaultTheme.ts
+++ b/packages/ui/src/lib/theme/defaultTheme.ts
@@ -1478,6 +1478,7 @@ export default {
opacity-75
data-closed:animate-fade-out-overlay-bg
data-open:animate-fade-in-overlay-bg
+ z-40
`,
scroll_overlay: `
fixed
From 3949190fa7e171dbc5caf50cfbd850c78016343d Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Thu, 23 Mar 2023 13:00:49 -0600
Subject: [PATCH 05/94] refactor(cmdk): replace search with command menu
provider
---
apps/docs/components/Search/SearchButton.tsx | 31 ++---------
apps/docs/pages/_app.tsx | 14 ++---
.../ui/src/components/Command/AiCommand.tsx | 3 +-
.../ui/src/components/Command/Command.tsx | 37 +++++--------
.../src/components/Command/Command.utils.tsx | 2 +-
.../Command/CommandMenuProvider.tsx | 52 +++++++++++++++++++
packages/ui/src/components/Command/index.tsx | 3 ++
7 files changed, 79 insertions(+), 63 deletions(-)
create mode 100644 packages/ui/src/components/Command/CommandMenuProvider.tsx
diff --git a/apps/docs/components/Search/SearchButton.tsx b/apps/docs/components/Search/SearchButton.tsx
index 94da639a526..de86f28d0d8 100644
--- a/apps/docs/components/Search/SearchButton.tsx
+++ b/apps/docs/components/Search/SearchButton.tsx
@@ -1,37 +1,14 @@
-import {
- ButtonHTMLAttributes,
- DetailedHTMLProps,
- FC,
- PropsWithChildren,
- useEffect,
- useRef,
-} from 'react'
-import { useActionKey } from '~/hooks/useActionKey'
-import { useSearch } from './SearchProvider'
+import { ButtonHTMLAttributes, DetailedHTMLProps, FC, PropsWithChildren, useRef } from 'react'
+import { useCommandMenu } from '~/../../packages/ui/src/components/Command/CommandMenuProvider'
const SearchButton: FC<
PropsWithChildren, HTMLButtonElement>>
> = ({ children, ...props }) => {
const searchButtonRef = useRef()
- const { open, setQuery } = useSearch()
-
- useEffect(() => {
- function onKeyDown(event: KeyboardEvent) {
- if (searchButtonRef.current === document.activeElement) {
- if (/[a-zA-Z0-9]/.test(String.fromCharCode(event.keyCode))) {
- open()
- setQuery?.(event.key)
- }
- }
- }
- window.addEventListener('keydown', onKeyDown)
- return () => {
- window.removeEventListener('keydown', onKeyDown)
- }
- }, [open, setQuery])
+ const { setIsOpen } = useCommandMenu()
return (
-
+ setIsOpen(true)} {...props}>
{children}
)
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index d68bc1e5151..f4d0859d366 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -1,17 +1,14 @@
import { createBrowserSupabaseClient } from '@supabase/auth-helpers-nextjs'
import { SessionContextProvider } from '@supabase/auth-helpers-react'
import { ThemeProvider } from 'common/Providers'
-import { DefaultSeo } from 'next-seo'
-import Head from 'next/head'
import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'
import { AppPropsWithLayout } from 'types'
+import { CommandMenuProvider } from 'ui'
import Favicons from '~/components/Favicons'
-import SearchProvider from '~/components/Search/SearchProvider'
import SiteLayout from '~/layouts/SiteLayout'
import { IS_PLATFORM, LOCAL_SUPABASE } from '~/lib/constants'
import { post } from '~/lib/fetchWrappers'
-import { CommandMenu } from 'ui'
import '../styles/algolia-search.scss'
import '../styles/ch.scss'
import '../styles/docsearch.scss'
@@ -69,23 +66,22 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
{IS_PLATFORM || LOCAL_SUPABASE ? (
-
+
-
+
) : (
-
+
-
+
)}
-
>
)
}
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 8460139a9c8..e2e9c42e238 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -30,7 +30,8 @@ import SearchResult, { SearchResultType } from './SearchResult'
import { CommandGroup, CommandItem, CommandInput } from './Command.utils'
import { IconCopy } from '../Icon/icons/IconCopy'
-import { AiIcon, AiIconChat, COMMAND_ROUTES, useCommandMenu } from './Command'
+import { AiIcon, AiIconChat, COMMAND_ROUTES } from './Command'
+import { useCommandMenu } from './CommandMenuProvider'
const questions = [
'How do I get started with Supabase?',
diff --git a/packages/ui/src/components/Command/Command.tsx b/packages/ui/src/components/Command/Command.tsx
index a6ab6dd3125..121b3b55a33 100644
--- a/packages/ui/src/components/Command/Command.tsx
+++ b/packages/ui/src/components/Command/Command.tsx
@@ -26,6 +26,7 @@ import { IconSun } from '../Icon/icons/IconSun'
import { IconMoon } from '../Icon/icons/IconMoon'
import { IconCopy } from '../Icon/icons/IconCopy'
import DocsSearch from './DocsSearch'
+import { useCommandMenu } from './CommandMenuProvider'
// import { SearchProvider } from './SearchProvider'
export const AiIcon = () => (
@@ -93,21 +94,13 @@ const ItemHandler = (props: any) => {
return
}
-export interface CommandMenuContextValue {
- isLoading: boolean
- setIsLoading: (isLoading: boolean) => void
-}
-export const CommandMenuContext = createContext(undefined)
-export const useCommandMenu = () => useContext(CommandMenuContext)
-
function CommandMenu({ actions }: { actions: IActions }) {
- const [open, setOpen] = React.useState(false)
const [search, setSearch] = React.useState('')
const [aiSearch, setAiSearch] = React.useState('')
const [pages, setPages] = React.useState([])
const page = pages[pages.length - 1]
- const [isLoading, setIsLoading] = React.useState(false)
const router = useRouter()
+ const { isOpen, setIsOpen } = useCommandMenu()
const ThemeOptions = ({ isSubItem = false }) => {
return (
@@ -116,7 +109,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
isSubItem={isSubItem}
onSelect={() => {
actions.toggleTheme()
- setOpen(false)
+ setIsOpen(false)
}}
>
Change Theme to dark
@@ -125,7 +118,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
isSubItem={isSubItem}
onSelect={() => {
actions.toggleTheme()
- setOpen(false)
+ setIsOpen(false)
}}
>
Change Theme to light
@@ -137,7 +130,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
React.useEffect(() => {
const down = (e: KeyboardEvent) => {
if (e.key === 'k' && e.metaKey) {
- setOpen((open) => !open)
+ setIsOpen((open) => !open)
}
}
@@ -155,18 +148,12 @@ function CommandMenu({ actions }: { actions: IActions }) {
const showCommandInput = page === undefined || !AI_CHAT_ROUTES.includes(page)
return (
-
-
- Press{' '}
-
- ⌘ J
-
-
+ <>
setOpen(!open)}
+ visible={isOpen}
+ onOpenChange={setIsOpen}
+ onCancel={() => setIsOpen(!open)}
size={'xlarge'}
className={'max-h-[70vh] lg:max-h-[50vh] overflow-hidden overflow-y-auto'}
onKeyDown={(e) => {
@@ -177,7 +164,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
// || (e.key === 'Backspace' && !search)
) {
e.preventDefault()
- if (!page) setOpen(false)
+ if (!page) setIsOpen(false)
setSearch('')
setPages((pages) => pages.slice(0, -1))
}
@@ -423,7 +410,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
{
router.push('https://supabase.com/docs')
- setOpen(false)
+ setIsOpen(false)
}}
>
Grab api keys
@@ -436,7 +423,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
{/* */}
-
+ >
)
}
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 1c9f710975d..8efdce3db6e 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -9,7 +9,7 @@ import { Modal } from '../Modal'
import { ModalProps } from '../Modal/Modal'
import { KeyboardEventHandler } from 'react'
import { LoadingLine } from './LoadingLine'
-import { useCommandMenu } from './Command'
+import { useCommandMenu } from './CommandMenuProvider'
const Command = React.forwardRef<
React.ElementRef,
diff --git a/packages/ui/src/components/Command/CommandMenuProvider.tsx b/packages/ui/src/components/Command/CommandMenuProvider.tsx
new file mode 100644
index 00000000000..7a5f46d2cbf
--- /dev/null
+++ b/packages/ui/src/components/Command/CommandMenuProvider.tsx
@@ -0,0 +1,52 @@
+import * as React from 'react'
+import { createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'
+import { CommandMenu } from './Command'
+
+export interface CommandMenuContextValue {
+ isOpen: boolean
+ setIsOpen: React.Dispatch>
+ isLoading: boolean
+ setIsLoading: React.Dispatch>
+}
+export const CommandMenuContext = createContext(undefined)
+export const useCommandMenu = () => useContext(CommandMenuContext)
+
+const CommandMenuProvider = ({ children }: PropsWithChildren<{}>) => {
+ const [isOpen, setIsOpen] = useState(false)
+ const [isLoading, setIsLoading] = useState(false)
+
+ useKeyboardEvents({ setIsOpen })
+
+ return (
+
+ {children}
+
+
+ )
+}
+
+function useKeyboardEvents({ setIsOpen }: { setIsOpen: (isOpen: boolean) => void }) {
+ useEffect(() => {
+ function onKeyDown(event: KeyboardEvent) {
+ switch (event.key) {
+ case 'Escape':
+ setIsOpen(false)
+ return
+ case 'k':
+ case '/':
+ if (event.metaKey || event.ctrlKey) {
+ setIsOpen(true)
+ }
+ return
+ }
+ }
+
+ window.addEventListener('keydown', onKeyDown)
+
+ return () => {
+ window.removeEventListener('keydown', onKeyDown)
+ }
+ }, [setIsOpen])
+}
+
+export default CommandMenuProvider
diff --git a/packages/ui/src/components/Command/index.tsx b/packages/ui/src/components/Command/index.tsx
index 71923a11d52..4d57b6070e3 100644
--- a/packages/ui/src/components/Command/index.tsx
+++ b/packages/ui/src/components/Command/index.tsx
@@ -1 +1,4 @@
export * from './Command'
+
+export { default as CommandMenuProvider } from './CommandMenuProvider'
+export * from './CommandMenuProvider'
From 3b17c05daf43a482518b004c5dcc55760ff3c978 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 03:02:44 +0800
Subject: [PATCH 06/94] fix anim
---
apps/docs/.env.example | 4 ++--
apps/docs/pages/_app.tsx | 3 +--
packages/config/ui.config.js | 10 ++++------
packages/ui/src/components/Command/LoadingLine.tsx | 7 ++++---
4 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/apps/docs/.env.example b/apps/docs/.env.example
index 7fa24758cb1..72e5b6a0548 100644
--- a/apps/docs/.env.example
+++ b/apps/docs/.env.example
@@ -7,5 +7,5 @@ OPENAI_KEY=
SUPABASE_SERVICE_ROLE_KEY=
# Set IS_PLATFORM to true if you have the api keys and urls
-NEXT_PUBLIC_IS_PLATFORM=false
-NEXT_PUBLIC_LOCAL_SUPABASE=false
+NEXT_PUBLIC_IS_PLATFORM=true
+NEXT_PUBLIC_LOCAL_SUPABASE=true
\ No newline at end of file
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index 45b239419d9..d5c62e87132 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -72,6 +72,7 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
+
@@ -85,8 +86,6 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
)}
-
-
>
)
}
diff --git a/packages/config/ui.config.js b/packages/config/ui.config.js
index 119b32bba65..85592daa262 100644
--- a/packages/config/ui.config.js
+++ b/packages/config/ui.config.js
@@ -234,7 +234,7 @@ const uiConfig = {
width: ' 240px',
},
'50%': {
- marginLeft: ' 100%',
+ marginLeft: '100%',
width: '80px',
},
'75%': {
@@ -270,6 +270,8 @@ const uiConfig = {
'panel-slide-right-out': 'panelSlideRightOut 200ms cubic-bezier(0.87, 0, 0.13, 1)',
'panel-slide-right-in': 'panelSlideRightIn 250ms cubic-bezier(0.87, 0, 0.13, 1)',
+ 'line-loading': 'lineLoading 1.8s infinite',
+
// tailwind class for this is `animate-dropdownFadeIn`
dropdownFadeIn: 'dropdownFadeIn 0.1s ease-out',
// tailwind class for this is `animate-dropdownFadeOut`
@@ -287,13 +289,10 @@ const uiConfig = {
function ({ addUtilities, addVariant }) {
// addVariant('data-open', '&:[data-state=open]')
addUtilities({
- '.loading-line--animate': {
- xTransition: 'all 1s ease-in-out',
- animation: 'ani 1.8s infinite',
+ '.line-loading-bg': {
background: 'rgb(0, 0, 0)',
background:
'linear-gradient(90deg,rgba(0, 0, 0, 0) 0%,rgba(255, 255, 255, 0.65) 50%,rgba(0, 0, 0, 0) 100%)',
- boxShadow: '1px 2px 0 0 white',
},
".dropdown-content[data-state='open']": {
animation: 'fadeIn 50ms ease-out',
@@ -301,7 +300,6 @@ const uiConfig = {
".dropdown-content[data-state='closed']": {
animation: 'fadeOut 50ms ease-in',
},
-
"[data-state='open'] .accordion-content-animation": {
animation: 'slideDown 200ms ease-out',
},
diff --git a/packages/ui/src/components/Command/LoadingLine.tsx b/packages/ui/src/components/Command/LoadingLine.tsx
index 0e7164713c7..b1aef8fa9b8 100644
--- a/packages/ui/src/components/Command/LoadingLine.tsx
+++ b/packages/ui/src/components/Command/LoadingLine.tsx
@@ -3,12 +3,13 @@ import { cn } from '../../utils/cn'
export const LoadingLine = ({ loading }: { loading: boolean }) => {
return (
-
+
From c46741ed8f6fe96e1be20a7d39af3a48e2bf6c2a Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 03:04:18 +0800
Subject: [PATCH 07/94] revert
---
apps/docs/pages/_app.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index d5c62e87132..d68bc1e5151 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -72,7 +72,6 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
-
@@ -86,6 +85,7 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
)}
+
>
)
}
From 1a70f631eb358fc9d55818b76994c380e7b29f72 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 03:05:47 +0800
Subject: [PATCH 08/94] Update .env.example
---
apps/docs/.env.example | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/docs/.env.example b/apps/docs/.env.example
index 72e5b6a0548..7fa24758cb1 100644
--- a/apps/docs/.env.example
+++ b/apps/docs/.env.example
@@ -7,5 +7,5 @@ OPENAI_KEY=
SUPABASE_SERVICE_ROLE_KEY=
# Set IS_PLATFORM to true if you have the api keys and urls
-NEXT_PUBLIC_IS_PLATFORM=true
-NEXT_PUBLIC_LOCAL_SUPABASE=true
\ No newline at end of file
+NEXT_PUBLIC_IS_PLATFORM=false
+NEXT_PUBLIC_LOCAL_SUPABASE=false
From be68898d5e0b05f39affaaaae53f4d62f3edcbb4 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 03:10:51 +0800
Subject: [PATCH 09/94] fix some colors
---
packages/ui/src/components/Command/Command.utils.tsx | 4 +++-
packages/ui/src/components/Command/LoadingLine.tsx | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 1c9f710975d..bafdba88a5f 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -208,7 +208,9 @@ const CommandItem = React.forwardRef<
cursor-default select-none items-center
rounded-md text-sm outline-none
- aria-selected:bg-[#323232]/80
+ aria-selected:bg-scale-400
+
+ dark:aria-selected:bg-[#323232]/80
aria-selected:backdrop-filter
aria-selected:backdrop-blur-md
diff --git a/packages/ui/src/components/Command/LoadingLine.tsx b/packages/ui/src/components/Command/LoadingLine.tsx
index b1aef8fa9b8..ef044ec888f 100644
--- a/packages/ui/src/components/Command/LoadingLine.tsx
+++ b/packages/ui/src/components/Command/LoadingLine.tsx
@@ -3,7 +3,7 @@ import { cn } from '../../utils/cn'
export const LoadingLine = ({ loading }: { loading: boolean }) => {
return (
-
+
Date: Thu, 23 Mar 2023 13:19:10 -0600
Subject: [PATCH 10/94] chore(cmdk): throw error if useCommandMenu used outside
of provider
---
.../ui/src/components/Command/CommandMenuProvider.tsx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/packages/ui/src/components/Command/CommandMenuProvider.tsx b/packages/ui/src/components/Command/CommandMenuProvider.tsx
index 7a5f46d2cbf..7ffc283ca9f 100644
--- a/packages/ui/src/components/Command/CommandMenuProvider.tsx
+++ b/packages/ui/src/components/Command/CommandMenuProvider.tsx
@@ -9,7 +9,15 @@ export interface CommandMenuContextValue {
setIsLoading: React.Dispatch>
}
export const CommandMenuContext = createContext(undefined)
-export const useCommandMenu = () => useContext(CommandMenuContext)
+export const useCommandMenu = () => {
+ const context = useContext(CommandMenuContext)
+
+ if (context === undefined) {
+ throw new Error('useCommandMenu was used outside of CommandMenuProvider')
+ }
+
+ return context
+}
const CommandMenuProvider = ({ children }: PropsWithChildren<{}>) => {
const [isOpen, setIsOpen] = useState(false)
From c193832db5178e83be21239fc893a03f3b8ba9f1 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Thu, 23 Mar 2023 13:27:15 -0600
Subject: [PATCH 11/94] refactor(cmdk): remove old docs search
---
.../components/Navigation/AlgoliaSearch.tsx | 169 -------
apps/docs/components/Navigation/NavBar.tsx | 7 +-
.../Navigation/NavigationMenu/TopNavBar.tsx | 14 +-
.../NavigationMenu/TopNavBarRef.tsx | 3 +-
apps/docs/components/Search/SearchButton.tsx | 17 -
apps/docs/components/Search/SearchModal.tsx | 423 ------------------
.../docs/components/Search/SearchProvider.tsx | 80 ----
apps/docs/components/Search/SearchResult.tsx | 54 ---
.../ui/src/components/Command/AiCommand.tsx | 2 -
.../ui/src/components/Command/Command.tsx | 1 -
.../ui/src/components/Command/DocsSearch.tsx | 9 -
.../src/components/Command/SearchButton.tsx | 21 +
.../src/components/Command/SearchProvider.tsx | 8 -
.../src/components/Command/SearchResult.tsx | 56 ---
packages/ui/src/components/Command/index.tsx | 2 +
15 files changed, 38 insertions(+), 828 deletions(-)
delete mode 100644 apps/docs/components/Navigation/AlgoliaSearch.tsx
delete mode 100644 apps/docs/components/Search/SearchButton.tsx
delete mode 100644 apps/docs/components/Search/SearchModal.tsx
delete mode 100644 apps/docs/components/Search/SearchProvider.tsx
delete mode 100644 apps/docs/components/Search/SearchResult.tsx
create mode 100644 packages/ui/src/components/Command/SearchButton.tsx
delete mode 100644 packages/ui/src/components/Command/SearchProvider.tsx
delete mode 100644 packages/ui/src/components/Command/SearchResult.tsx
diff --git a/apps/docs/components/Navigation/AlgoliaSearch.tsx b/apps/docs/components/Navigation/AlgoliaSearch.tsx
deleted file mode 100644
index eeb954f037a..00000000000
--- a/apps/docs/components/Navigation/AlgoliaSearch.tsx
+++ /dev/null
@@ -1,169 +0,0 @@
-import { render } from 'react-dom'
-import { IconCommand } from 'ui'
-import { createElement, FC, useEffect, useRef, Fragment } from 'react'
-import algoliasearch from 'algoliasearch/lite'
-import { autocomplete, getAlgoliaResults } from '@algolia/autocomplete-js'
-import { createLocalStorageRecentSearchesPlugin } from '@algolia/autocomplete-plugin-recent-searches'
-import { useRouter } from 'next/router'
-
-// [Joshen] We're currently using DocSearch from Algolia as it provides a nice
-// UI out of the box + some good preconfigured search settings (e.g hierarchy).
-// However, we're using our own Algolia account to store the records in the indexes
-// (rather than going through the DocSearch program from Algolia where they'll crawl
-// our site for us). Refer to scripts/build-search on how we're saving the records.
-
-// Using Algolia's autocomplete library gives us full flexbility in terms of customizing
-// our search experience, but that will take time to figure out. Hence why for now we're just
-// using DocSearch with our own records.
-
-// Potentially for search, we could
-// - Go ahead with the DocSearch program and let them crawl our site to generate the records
-// - But we need to ensure that our site is semantically correct first
-// - Use Algolia itself to flesh out our own search logic
-// - The basics are already set up to be honest, but will take time to make it great
-// - Go back to Typesense if we deem that Algolia is not helpful in the long run
-
-const searchClient = algoliasearch(
- process.env.NEXT_PUBLIC_ALGOLIA_APP_ID,
- process.env.NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY
-)
-
-// [Joshen] Not working properly, but lets not get stuck on this
-// Priority just to get a search working
-const recentSearchesPlugin = createLocalStorageRecentSearchesPlugin({
- key: 'docs-search',
- limit: 3,
- //@ts-ignore
- transformSource({ source }) {
- return {
- ...source,
- templates: {
- ...source.templates,
- header({ state }) {
- if (state.query) return null
- return (
-
- Your searches
-
-
- )
- },
- },
- }
- },
-})
-
-interface Props {}
-
-const AlgoliaSearch: FC = ({}) => {
- const searchRef = useRef(null)
- const router = useRouter()
-
- useEffect(() => {
- if (!searchRef.current) {
- return undefined
- }
- const search = autocomplete({
- openOnFocus: true,
- container: searchRef.current,
- defaultActiveItemId: 0,
- detachedMediaQuery: '',
- // @ts-ignore
- renderer: { createElement, Fragment, render },
- placeholder: 'Search docs',
- plugins: [recentSearchesPlugin],
- renderNoResults({ state, render }, root) {
- render(
-
- No results found for {state.query}.
-
,
- root
- )
- },
- navigator: {
- navigate({ itemUrl }) {
- router.push(itemUrl)
- },
- },
- onSelect({ item, setQuery, setIsOpen, refresh }) {
- //console.log('onSelect', item.url)
- },
- // @ts-ignore
- getSources({ query }) {
- return [
- {
- sourceId: 'pages',
- templates: {
- item({ item, components }) {
- return (
-
-
-
- {item.category && (
-
- <>
- {item.category}
- {item.version ? ` (${item.version})` : ''}:
- >
-
- )}
-
-
-
-
-
{item.description as string}
-
-
- )
- },
- },
- getItemUrl({ item }) {
- return item.url
- },
- getItems() {
- // if (!query) return []
- return getAlgoliaResults({
- searchClient,
- queries: [
- {
- indexName: 'dev_docs',
- query,
- },
- ],
- })
- },
- },
- ]
- },
- })
-
- return () => {
- search.destroy()
- }
- }, [])
-
- return (
-
- )
-}
-
-export default AlgoliaSearch
diff --git a/apps/docs/components/Navigation/NavBar.tsx b/apps/docs/components/Navigation/NavBar.tsx
index e86cdb2802e..5096d3589b6 100644
--- a/apps/docs/components/Navigation/NavBar.tsx
+++ b/apps/docs/components/Navigation/NavBar.tsx
@@ -1,13 +1,12 @@
+import { useTheme } from 'common/Providers'
import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
-import { useState, useEffect, FC } from 'react'
-import { IconMenu, IconMoon, IconSearch, IconSun, IconCommand, Listbox } from 'ui'
-import { useTheme } from 'common/Providers'
+import { FC, useEffect, useState } from 'react'
+import { IconCommand, IconMenu, IconMoon, IconSearch, IconSun, Listbox, SearchButton } from 'ui'
import { REFERENCES } from './Navigation.constants'
import { getPageType } from '~/lib/helpers'
-import SearchButton from '../Search/SearchButton'
const NavBar: FC = () => {
const { isDarkMode, toggleTheme } = useTheme()
diff --git a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
index 5e949d870e1..a3c1a9707e3 100644
--- a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
@@ -1,13 +1,21 @@
+import { useTheme } from 'common/Providers'
import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { FC, useEffect, useState } from 'react'
-import { Button, IconCommand, IconMenu, IconMoon, IconSearch, IconSun, Input, Listbox } from 'ui'
+import {
+ Button,
+ IconCommand,
+ IconMenu,
+ IconMoon,
+ IconSearch,
+ IconSun,
+ Listbox,
+ SearchButton,
+} from 'ui'
import { REFERENCES } from '~/components/Navigation/Navigation.constants'
-import { useTheme } from 'common/Providers'
import { getPageType } from '~/lib/helpers'
-import SearchButton from '~/components/Search/SearchButton'
const TopNavBar: FC = () => {
const { isDarkMode, toggleTheme } = useTheme()
diff --git a/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx b/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx
index baa7eaf6bc1..bb655bd3c6c 100644
--- a/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx
@@ -3,10 +3,9 @@ import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { FC, useEffect, useState } from 'react'
-import { Button, IconCommand, IconGitHub, IconMoon, IconSearch, IconSun } from 'ui'
+import { Button, IconCommand, IconGitHub, IconMoon, IconSearch, IconSun, SearchButton } from 'ui'
import { REFERENCES } from '~/components/Navigation/Navigation.constants'
-import SearchButton from '~/components/Search/SearchButton'
import { getPageType } from '~/lib/helpers'
const TopNavBarRef: FC = () => {
diff --git a/apps/docs/components/Search/SearchButton.tsx b/apps/docs/components/Search/SearchButton.tsx
deleted file mode 100644
index de86f28d0d8..00000000000
--- a/apps/docs/components/Search/SearchButton.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import { ButtonHTMLAttributes, DetailedHTMLProps, FC, PropsWithChildren, useRef } from 'react'
-import { useCommandMenu } from '~/../../packages/ui/src/components/Command/CommandMenuProvider'
-
-const SearchButton: FC<
- PropsWithChildren, HTMLButtonElement>>
-> = ({ children, ...props }) => {
- const searchButtonRef = useRef()
- const { setIsOpen } = useCommandMenu()
-
- return (
- setIsOpen(true)} {...props}>
- {children}
-
- )
-}
-
-export default SearchButton
diff --git a/apps/docs/components/Search/SearchModal.tsx b/apps/docs/components/Search/SearchModal.tsx
deleted file mode 100644
index 213035540b1..00000000000
--- a/apps/docs/components/Search/SearchModal.tsx
+++ /dev/null
@@ -1,423 +0,0 @@
-import type { CreateCompletionResponse } from 'openai'
-import { FC, useCallback, useRef, useState } from 'react'
-import ReactMarkdown from 'react-markdown'
-import remarkGfm from 'remark-gfm'
-import { SSE } from 'sse.js'
-import clippyImageDark from '../../public/img/clippy-dark.png'
-import clippyImage from '../../public/img/clippy.png'
-
-import { useSupabaseClient } from '@supabase/auth-helpers-react'
-import { useTheme } from 'common/Providers'
-import Image from 'next/image'
-import {
- Button,
- IconAlertCircle,
- IconAlertTriangle,
- IconLoader,
- IconSearch,
- Input,
- Loading,
- Modal,
- Tabs,
-} from 'ui'
-import components from '~/components'
-import { IS_PLATFORM } from '~/lib/constants'
-import { useSearch } from './SearchProvider'
-import SearchResult, { SearchResultType } from './SearchResult'
-
-const questions = [
- 'How do I get started with Supabase?',
- 'How do I run Supabase locally?',
- 'How do I connect to my database?',
- 'How do I run migrations? ',
- 'How do I listen to changes in a table?',
- 'How do I set up authentication?',
-]
-
-function getEdgeFunctionUrl() {
- const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL?.replace(/\/$/, '')
-
- if (IS_PLATFORM) {
- const [schemeAndProjectId, domain, tld] = supabaseUrl.split('.')
- return `${schemeAndProjectId}.functions.${domain}.${tld}`
- } else {
- return `${supabaseUrl}/functions/v1`
- }
-}
-
-const edgeFunctionUrl = getEdgeFunctionUrl()
-
-const SearchModal: FC = () => {
- const { isDarkMode } = useTheme()
- const { close, query, setQuery } = useSearch()
- const [answer, setAnswer] = useState('')
- const [results, setResults] = useState()
- const [isLoading, setIsLoading] = useState(false)
- const [isResponding, setIsResponding] = useState(false)
- const [hasClippyError, setHasClippyError] = useState(false)
- const [hasSearchError, setHasSearchError] = useState(false)
- const [selectedTab, setSelectedTab] = useState('search-panel')
- const eventSourceRef = useRef()
- const supabaseClient = useSupabaseClient()
-
- const cantHelp = answer?.trim() === "Sorry, I don't know how to help with that."
- const status = isLoading
- ? 'Clippy is searching...'
- : isResponding
- ? 'Clippy is responding...'
- : cantHelp || hasClippyError
- ? 'Clippy has failed you'
- : undefined
-
- const handleSearchConfirm = useCallback(
- async (query: string) => {
- setResults(undefined)
- setAnswer(undefined)
- setIsResponding(false)
- setHasClippyError(false)
- setHasSearchError(false)
- setIsLoading(true)
-
- const { error, data: pageSections } = await supabaseClient.functions.invoke('search', {
- body: { query },
- })
-
- setIsLoading(false)
-
- if (error) {
- setIsLoading(false)
- setIsResponding(false)
- setHasSearchError(true)
- console.error(error)
- return
- }
-
- if (!Array.isArray(pageSections)) {
- setIsLoading(false)
- setIsResponding(false)
- setHasSearchError(true)
- console.error('Malformed response')
- return
- }
-
- setResults(pageSections)
- },
- [supabaseClient]
- )
-
- const handleClippyConfirm = useCallback(async (query: string) => {
- setResults(undefined)
- setAnswer(undefined)
- setIsResponding(false)
- setHasClippyError(false)
- setHasSearchError(false)
- setIsLoading(true)
-
- const eventSource = new SSE(`${edgeFunctionUrl}/clippy-search`, {
- headers: {
- apikey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
- Authorization: `Bearer ${process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY}`,
- 'Content-Type': 'application/json',
- },
- payload: JSON.stringify({ query }),
- })
-
- function handleError(err: T) {
- setIsLoading(false)
- setIsResponding(false)
- setHasClippyError(true)
- console.error(err)
- }
-
- eventSource.addEventListener('error', handleError)
- eventSource.addEventListener('message', (e) => {
- try {
- setIsLoading(false)
-
- if (e.data === '[DONE]') {
- setIsResponding(false)
- return
- }
-
- setIsResponding(true)
-
- const completionResponse: CreateCompletionResponse = JSON.parse(e.data)
- const [{ text }] = completionResponse.choices
-
- setAnswer((answer) => {
- return (answer ?? '') + text
- })
- } catch (err) {
- handleError(err)
- }
- })
-
- eventSource.stream()
-
- eventSourceRef.current = eventSource
-
- setIsLoading(true)
- }, [])
-
- const handleConfirm = useCallback(
- (selectedTab: string, query: string) => {
- switch (selectedTab) {
- case 'search-panel':
- return handleSearchConfirm(query)
- case 'clippy-panel':
- return handleClippyConfirm(query)
- }
- },
- [handleSearchConfirm, handleClippyConfirm]
- )
-
- function handleResetPrompt() {
- eventSourceRef.current?.close()
- eventSourceRef.current = undefined
- setQuery('')
- setResults(undefined)
- setAnswer(undefined)
- setIsResponding(false)
- setHasClippyError(false)
- setHasSearchError(false)
- }
- return (
-
- e.stopPropagation()}
- >
-
-
setQuery(e.target.value)}
- icon={
}
- onKeyDown={(e) => {
- switch (e.key) {
- case 'Enter':
- if (!query) {
- return
- }
- handleConfirm(selectedTab, query)
- return
- default:
- return
- }
- }}
- />
-
-
- esc
-
-
- {!isLoading && answer && (
-
-
- Try again
-
-
- )}
-
-
{
- setSelectedTab(tabId)
- if (!query) {
- handleResetPrompt()
- return
- }
- handleConfirm(tabId, query)
- }}
- >
-
-
- {!isLoading && !hasSearchError && !results && (
-
-
- Search Supabase guides & reference docs
-
-
- )}
- {results && results.length > 0 && (
-
- {results.map((page) => {
- const pageSections = page.sections.filter((section) => !!section.heading)
- return (
-
-
- {pageSections.length > 0 && (
-
-
-
- {pageSections.map((section) => (
-
- ))}
-
-
- )}
-
- )
- })}
-
- )}
- {isLoading && (
-
-
{}
-
Searching for results
-
- )}
- {results && results.length === 0 && (
-
-
-
No results found.
-
- Try again?
-
-
- )}
- {hasSearchError && (
-
-
-
- Sorry, looks like we're having some issues with search!
-
-
Please try again in a bit.
-
- Try again?
-
-
- )}
-
-
-
- {!isLoading && !answer && !hasClippyError && (
-
-
-
Not sure where to start?
-
-
- {questions.map((question) => {
- const key = question.replace(/\s+/g, '_')
- return (
-
- {
- setQuery(question)
- handleClippyConfirm(question)
- }}
- >
- {question}
-
-
- )
- })}
-
-
-
- )}
- {answer && (
-
- {cantHelp ? (
-
-
-
-
Sorry, I don't know how to help with that.
-
-
- Try again?
-
-
- ) : (
-
- {
- const supabaseUrl = new URL('https://supabase.com')
- const linkUrl = new URL(href, 'https://supabase.com')
-
- if (linkUrl.origin === supabaseUrl.origin) {
- return linkUrl.toString()
- }
-
- return href
- }}
- components={components}
- >
- {answer}
-
-
- )}
-
- )}
- {isLoading && (
-
-
{}
-
Searching for results
-
- )}
- {hasClippyError && (
-
-
-
- Sorry, looks like Clippy is having a hard time!
-
-
Please try again in a bit.
-
- Try again?
-
-
- )}
-
-
-
-
- {status ? (
-
- {(isLoading || isResponding) && (
-
- )}
- {status}
-
- ) : (
- <>>
- )}
-
-
-
-
-
-
-
-
- )
-}
-
-export default SearchModal
diff --git a/apps/docs/components/Search/SearchProvider.tsx b/apps/docs/components/Search/SearchProvider.tsx
deleted file mode 100644
index 4175c159c29..00000000000
--- a/apps/docs/components/Search/SearchProvider.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import {
- createContext,
- FC,
- PropsWithChildren,
- useCallback,
- useContext,
- useEffect,
- useState,
-} from 'react'
-import { createPortal } from 'react-dom'
-import SearchModal from './SearchModal'
-
-export type SearchContextValue = {
- isOpen: boolean
- open: () => void
- close: () => void
- query: string
- setQuery: (query: string) => void
-}
-
-export const SearchContext = createContext(null)
-
-export const useSearch = () => {
- const { isOpen, open, close, query, setQuery } = useContext(SearchContext)
-
- return { isOpen, open, close, query, setQuery }
-}
-
-const SearchProvider: FC> = ({ children }) => {
- const [isOpen, setIsOpen] = useState(false)
- const [query, setQuery] = useState('')
-
- const open = useCallback(() => {
- setIsOpen(true)
- document.body.classList.add('DocSearch--active')
- }, [])
-
- const close = useCallback(() => {
- setIsOpen(false)
- document.body.classList.remove('DocSearch--active')
- }, [])
-
- useSearchKeyboardEvents({
- open,
- close,
- })
-
- return (
-
- {children}
- {isOpen && createPortal( , document.body)}
-
- )
-}
-
-function useSearchKeyboardEvents({ open, close }) {
- useEffect(() => {
- function onKeyDown(event: KeyboardEvent) {
- switch (event.key) {
- case 'Escape':
- close()
- return
- case 'k':
- case '/':
- if (event.metaKey || event.ctrlKey) {
- open()
- }
- return
- }
- }
-
- window.addEventListener('keydown', onKeyDown)
-
- return () => {
- window.removeEventListener('keydown', onKeyDown)
- }
- }, [open, close])
-}
-
-export default SearchProvider
diff --git a/apps/docs/components/Search/SearchResult.tsx b/apps/docs/components/Search/SearchResult.tsx
deleted file mode 100644
index d3689024ec5..00000000000
--- a/apps/docs/components/Search/SearchResult.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import Link from 'next/link'
-import { FC } from 'react'
-import { IconBookOpen, IconHash } from '~/../../packages/ui'
-import { useSearch } from './SearchProvider'
-
-export enum SearchResultType {
- Document = 'document',
- Section = 'section',
-}
-
-type Props = {
- href: string
- type: SearchResultType
- title: string
- chip?: string
-}
-
-const SearchResult: FC = ({ href, type, title, chip }) => {
- const { close } = useSearch()
-
- return (
-
-
-
- {getIconByType(type)}
-
-
- {chip && (
-
- {chip}
-
- )}
-
{title}
-
-
-
- )
-}
-
-function getIconByType(type: SearchResultType) {
- switch (type) {
- case SearchResultType.Document:
- return
- case SearchResultType.Section:
- return
- default:
- throw new Error(`Unknown search result type '${type}'`)
- }
-}
-
-export default SearchResult
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index e2e9c42e238..993ff42a773 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -25,8 +25,6 @@ import {
} from 'ui'
// import components from '~/components'
// import { IS_PLATFORM } from '~/lib/constants'
-// import { SearchContextValue } from './SearchProvider'
-import SearchResult, { SearchResultType } from './SearchResult'
import { CommandGroup, CommandItem, CommandInput } from './Command.utils'
import { IconCopy } from '../Icon/icons/IconCopy'
diff --git a/packages/ui/src/components/Command/Command.tsx b/packages/ui/src/components/Command/Command.tsx
index 121b3b55a33..1ff973f7950 100644
--- a/packages/ui/src/components/Command/Command.tsx
+++ b/packages/ui/src/components/Command/Command.tsx
@@ -27,7 +27,6 @@ import { IconMoon } from '../Icon/icons/IconMoon'
import { IconCopy } from '../Icon/icons/IconCopy'
import DocsSearch from './DocsSearch'
import { useCommandMenu } from './CommandMenuProvider'
-// import { SearchProvider } from './SearchProvider'
export const AiIcon = () => (
{
{pageSections.length > 0 && (
{pageSections.map((section, i) => (
- //
, HTMLButtonElement>
+>) => {
+ const searchButtonRef = useRef()
+ const { setIsOpen } = useCommandMenu()
+
+ return (
+ setIsOpen(true)} {...props}>
+ {children}
+
+ )
+}
+
+export default SearchButton
diff --git a/packages/ui/src/components/Command/SearchProvider.tsx b/packages/ui/src/components/Command/SearchProvider.tsx
deleted file mode 100644
index 48229bad589..00000000000
--- a/packages/ui/src/components/Command/SearchProvider.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import React, { FC, PropsWithChildren } from 'react'
-import { AiCommand } from './AiCommand'
-
-const SearchProvider: FC = () => {
- return
-}
-
-export { SearchProvider }
diff --git a/packages/ui/src/components/Command/SearchResult.tsx b/packages/ui/src/components/Command/SearchResult.tsx
deleted file mode 100644
index 091cb0f31e3..00000000000
--- a/packages/ui/src/components/Command/SearchResult.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import React from 'react'
-
-import Link from 'next/link'
-import { FC } from 'react'
-import { IconBookOpen, IconHash } from '~/../../packages/ui'
-// import { useSearch } from './SearchProvider'
-
-export enum SearchResultType {
- Document = 'document',
- Section = 'section',
-}
-
-type Props = {
- href: string
- type: SearchResultType
- title: string
- chip?: string
-}
-
-const SearchResult: FC = ({ href, type, title, chip }) => {
- // const { close } = useSearch()
-
- return (
- //
-
-
- {getIconByType(type)}
-
-
- {chip && (
-
- {chip}
-
- )}
-
{title}
-
-
- //
- )
-}
-
-function getIconByType(type: SearchResultType) {
- switch (type) {
- case SearchResultType.Document:
- return
- case SearchResultType.Section:
- return
- default:
- throw new Error(`Unknown search result type '${type}'`)
- }
-}
-
-export default SearchResult
diff --git a/packages/ui/src/components/Command/index.tsx b/packages/ui/src/components/Command/index.tsx
index 4d57b6070e3..f0302798aee 100644
--- a/packages/ui/src/components/Command/index.tsx
+++ b/packages/ui/src/components/Command/index.tsx
@@ -2,3 +2,5 @@ export * from './Command'
export { default as CommandMenuProvider } from './CommandMenuProvider'
export * from './CommandMenuProvider'
+
+export { default as SearchButton } from './SearchButton'
From 0fa2fb115f6d2a8cf1fc3bea86f1baf6754ad5e6 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Thu, 23 Mar 2023 21:02:44 -0230
Subject: [PATCH 12/94] Add nav items
---
.../src/components/Command/Command.icons.tsx | 46 ++++++++
.../ui/src/components/Command/Command.tsx | 107 +++++++++---------
.../src/components/Command/Command.types.ts | 14 +++
.../components/Command/command-nav-items.json | 48 ++++++++
4 files changed, 163 insertions(+), 52 deletions(-)
create mode 100644 packages/ui/src/components/Command/Command.icons.tsx
create mode 100644 packages/ui/src/components/Command/Command.types.ts
create mode 100644 packages/ui/src/components/Command/command-nav-items.json
diff --git a/packages/ui/src/components/Command/Command.icons.tsx b/packages/ui/src/components/Command/Command.icons.tsx
new file mode 100644
index 00000000000..ccb75965b32
--- /dev/null
+++ b/packages/ui/src/components/Command/Command.icons.tsx
@@ -0,0 +1,46 @@
+import React from 'react'
+export const AiIcon = () => (
+
+
+
+)
+
+export const AiIconChat = () => (
+
+)
diff --git a/packages/ui/src/components/Command/Command.tsx b/packages/ui/src/components/Command/Command.tsx
index 121b3b55a33..29c7ea7ce28 100644
--- a/packages/ui/src/components/Command/Command.tsx
+++ b/packages/ui/src/components/Command/Command.tsx
@@ -28,23 +28,9 @@ import { IconCopy } from '../Icon/icons/IconCopy'
import DocsSearch from './DocsSearch'
import { useCommandMenu } from './CommandMenuProvider'
// import { SearchProvider } from './SearchProvider'
-
-export const AiIcon = () => (
-
-
-
-)
+import navItems from './command-nav-items.json'
+import { NavItem } from './Command.types'
+import { AiIcon } from './Command.icons'
export const COMMAND_ROUTES = {
AI_HOME: 'Supabase AI',
@@ -55,43 +41,38 @@ export const COMMAND_ROUTES = {
const AI_CHAT_ROUTES = [COMMAND_ROUTES.AI_ASK_ANYTHING, COMMAND_ROUTES.AI_RLS_POLICY]
-export const AiIconChat = () => (
-
-)
-
interface IActions {
toggleTheme: () => void
}
-const ItemHandler = (props: any) => {
+const iconComponents = {
+ book: ,
+}
+
+const SearchOnlyItem = (props: any) => {
+ const icon = iconComponents[props.icon]
+ console.log('props', props)
const search = useCommandState((state) => state.search)
+ // if search is empty & items is marked as a subItem, don't show it
+ // ie: only show these items in search results, not top level
if (!search && props.isSubItem) return null
- return
+ return {props.label}
+}
+
+// handleSetPages([...pages, 'Docs Search'], true)} forceMount>
+//
+
+//
+// Search the docs...
+// {search}
+//
+//
+
+{
+ /*
+
+ See what's new
+ */
}
function CommandMenu({ actions }: { actions: IActions }) {
@@ -105,7 +86,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
const ThemeOptions = ({ isSubItem = false }) => {
return (
- {
actions.toggleTheme()
@@ -113,8 +94,8 @@ function CommandMenu({ actions }: { actions: IActions }) {
}}
>
Change Theme to dark
-
-
+ {
actions.toggleTheme()
@@ -122,7 +103,28 @@ function CommandMenu({ actions }: { actions: IActions }) {
}}
>
Change Theme to light
-
+
+
+ )
+ }
+
+ const SearchableChildItems = ({ isSubItem = false }) => {
+ return (
+
+ {/* output only subItems */}
+ {navItems.items
+ .filter((item) => item.sites.includes('docs'))
+ .flatMap((item) => item.subItems)
+ .map((item) => (
+ {
+ console.log('hay')
+ }}
+ />
+ ))}
)
}
@@ -289,6 +291,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
+
>
)}
{page === 'docs-search' && (
diff --git a/packages/ui/src/components/Command/Command.types.ts b/packages/ui/src/components/Command/Command.types.ts
new file mode 100644
index 00000000000..476ebc3c504
--- /dev/null
+++ b/packages/ui/src/components/Command/Command.types.ts
@@ -0,0 +1,14 @@
+
+export interface NavItem {
+ label: string;
+ icon: string;
+ url: string;
+ sites: Site[];
+ subItems?: NavItem[];
+}
+
+export type Site = "docs" | "dashboard";
+
+export interface NavItems {
+ navItems: NavItem[];
+}
diff --git a/packages/ui/src/components/Command/command-nav-items.json b/packages/ui/src/components/Command/command-nav-items.json
new file mode 100644
index 00000000000..514dac78116
--- /dev/null
+++ b/packages/ui/src/components/Command/command-nav-items.json
@@ -0,0 +1,48 @@
+{
+ "items": [
+ {
+ "label": "Home",
+ "icon": "home",
+ "url": "http://www.example.com/home",
+ "sites": ["docs", "dashboard"],
+ "subItems": [
+ {
+ "label": "About",
+ "icon": "book",
+ "url": "http://www.example.com/about",
+ "sites": ["docs", "dashboard"]
+ },
+ {
+ "label": "Services",
+ "icon": "services",
+ "url": "http://www.example.com/services",
+ "sites": ["docs", "dashboard"]
+ },
+ {
+ "label": "Contact",
+ "icon": "contact",
+ "url": "http://www.example.com/contact",
+ "sites": ["docs", "dashboard"]
+ }
+ ]
+ },
+ {
+ "label": "Products",
+ "icon": "products",
+ "url": "http://www.example.com/products",
+ "sites": ["dashboard"],
+ "subItems": [
+ {
+ "label": "Mobile",
+ "icon": "mobile",
+ "url": "http://www.example.com/products/mobile"
+ },
+ {
+ "label": "In person",
+ "icon": "person",
+ "url": "http://www.example.com/products/in-person"
+ }
+ ]
+ }
+ ]
+}
From a8ed7f646651e2ef2c8bfba693acb4f5f9336ab0 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Thu, 23 Mar 2023 17:55:15 -0600
Subject: [PATCH 13/94] refactor(cmdk): component exports and theme toggle
---
apps/docs/components/Navigation/NavBar.tsx | 10 +---
.../Navigation/NavigationMenu/TopNavBar.tsx | 10 +---
.../NavigationMenu/TopNavBarRef.tsx | 11 +---
apps/www/components/DarkModeToggle.tsx | 10 +---
packages/common/Providers.tsx | 25 +++++++--
.../ui/src/components/Command/AiCommand.tsx | 31 +++--------
.../Command/{Command.tsx => CommandMenu.tsx} | 52 +++++--------------
.../Command/CommandMenuProvider.tsx | 15 +++++-
packages/ui/src/components/Command/index.tsx | 11 +++-
9 files changed, 68 insertions(+), 107 deletions(-)
rename packages/ui/src/components/Command/{Command.tsx => CommandMenu.tsx} (93%)
diff --git a/apps/docs/components/Navigation/NavBar.tsx b/apps/docs/components/Navigation/NavBar.tsx
index 5096d3589b6..eb7ee10434f 100644
--- a/apps/docs/components/Navigation/NavBar.tsx
+++ b/apps/docs/components/Navigation/NavBar.tsx
@@ -35,14 +35,6 @@ const NavBar: FC = () => {
{ text: 'Reference', key: 'reference', link: '/reference' },
]
- const toggleDarkMode = () => {
- localStorage.setItem('supabaseDarkMode', (!isDarkMode).toString())
- toggleTheme()
-
- const key = localStorage.getItem('supabaseDarkMode')
- document.documentElement.className = key === 'true' ? 'dark' : ''
- }
-
const onSelectVersion = (version: string) => {
// [Joshen] Ideally we use but this works for now
if (!library) return
@@ -182,7 +174,7 @@ const NavBar: FC = () => {
-
+
toggleTheme()}>
{isDarkMode ? (
) : (
diff --git a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
index a3c1a9707e3..270269d5085 100644
--- a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
@@ -44,14 +44,6 @@ const TopNavBar: FC = () => {
{ text: 'Reference', key: 'reference', link: '/reference' },
]
- const toggleDarkMode = () => {
- localStorage.setItem('supabaseDarkMode', (!isDarkMode).toString())
- toggleTheme()
-
- const key = localStorage.getItem('supabaseDarkMode')
- document.documentElement.className = key === 'true' ? 'dark' : ''
- }
-
const onSelectVersion = (version: string) => {
// [Joshen] Ideally we use
but this works for now
if (!library) return
@@ -155,7 +147,7 @@ const TopNavBar: FC = () => {
-
+
toggleTheme()}>
{isDarkMode ? (
{
{ text: 'Reference', key: 'reference', link: '/reference' },
]
- const toggleDarkMode = () => {
- localStorage.setItem('supabaseDarkMode', (!isDarkMode).toString())
- toggleTheme()
-
- const key = localStorage.getItem('supabaseDarkMode')
- document.documentElement.className = key === 'true' ? 'dark' : ''
- document.documentElement.style.colorScheme = key === 'true' ? 'dark' : ''
- }
-
const onSelectVersion = (version: string) => {
// [Joshen] Ideally we use but this works for now
if (!library) return
@@ -148,7 +139,7 @@ const TopNavBarRef: FC = () => {
-
+
toggleTheme()}>
{isDarkMode ? (
{
- localStorage.setItem('supabaseDarkMode', (!isDarkMode).toString())
- toggleTheme()
-
- const key = localStorage.getItem('supabaseDarkMode')
- document.documentElement.className = key === 'true' ? 'dark' : ''
- }
-
return (
@@ -24,7 +16,7 @@ function DarkModeToggle() {
isDarkMode ? 'bg-scale-500' : 'bg-scale-900'
} mx-5
`}
- onClick={() => toggleDarkMode()}
+ onClick={() => toggleTheme()}
>
Toggle Themes
void
+ /**
+ * Toggle between dark mode and light mode.
+ *
+ * ---
+ *
+ * If `darkMode` left `undefined`, toggles between modes.
+ *
+ * If `darkMode` set, forces
+ * dark mode if `true` and light mode if `false`.
+ */
+ toggleTheme: (darkMode?: boolean) => void
}
interface ThemeProviderProps {
@@ -25,8 +35,15 @@ export const ThemeProvider = ({ children }: ThemeProviderProps) => {
setIsDarkMode(!key || key === 'true')
}, [])
- const toggleTheme = () => {
- setIsDarkMode(!isDarkMode)
+ const toggleTheme: UseThemeProps['toggleTheme'] = (darkMode) => {
+ const newMode = typeof darkMode === 'boolean' ? darkMode : !isDarkMode
+
+ localStorage.setItem('supabaseDarkMode', newMode.toString())
+
+ const key = localStorage.getItem('supabaseDarkMode')
+ document.documentElement.className = key === 'true' ? 'dark' : ''
+
+ setIsDarkMode(newMode)
}
return (
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 993ff42a773..c8dfcdf1e67 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -1,34 +1,19 @@
-import React, { useEffect, useReducer } from 'react'
import type { CreateCompletionResponse } from 'openai'
-import { FC, useCallback, useRef, useState } from 'react'
+import * as React from 'react'
+import { useCallback, useEffect, useReducer, useRef, useState } from 'react'
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
-// @ts-ignore
import { SSE } from 'sse.js'
-// import clippyImageDark from '../../public/img/clippy-dark.png'
-// import clippyImage from '../../public/img/clippy.png'
import { useSupabaseClient } from '@supabase/auth-helpers-react'
import { useTheme } from 'common/Providers'
-import Image from 'next/image'
-import {
- Button,
- IconAlertCircle,
- IconAlertTriangle,
- IconLoader,
- IconSearch,
- IconUser,
- Input,
- Loading,
- Modal,
- Tabs,
-} from 'ui'
+import { IconAlertCircle, IconAlertTriangle, IconLoader, IconUser, Input } from 'ui'
// import components from '~/components'
// import { IS_PLATFORM } from '~/lib/constants'
-import { CommandGroup, CommandItem, CommandInput } from './Command.utils'
import { IconCopy } from '../Icon/icons/IconCopy'
+import { CommandGroup, CommandItem } from './Command.utils'
-import { AiIcon, AiIconChat, COMMAND_ROUTES } from './Command'
+import { AiIcon, AiIconChat, COMMAND_ROUTES } from './CommandMenu'
import { useCommandMenu } from './CommandMenuProvider'
const questions = [
@@ -119,13 +104,13 @@ function promptDataReducer(
throw Error('Unknown action.')
}
-interface IAiCommand {
+export interface AiCommandProps {
query?: string
setQuery?: () => void
page?: string
}
-const AiCommand: FC = ({ query, setQuery, page }) => {
+const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
const { isDarkMode } = useTheme()
// const { close, query, setQuery } = useSearch()
@@ -690,4 +675,4 @@ const AiCommand: FC = ({ query, setQuery, page }) => {
)
}
-export { AiCommand }
+export default AiCommand
diff --git a/packages/ui/src/components/Command/Command.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
similarity index 93%
rename from packages/ui/src/components/Command/Command.tsx
rename to packages/ui/src/components/Command/CommandMenu.tsx
index 1ff973f7950..a1b0d65b22f 100644
--- a/packages/ui/src/components/Command/Command.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -1,32 +1,25 @@
-import * as React from 'react'
-import { createContext, useContext } from 'react'
import { useRouter } from 'next/router'
+import * as React from 'react'
-import { Calculator, Calendar, CreditCard, Settings, Smile, User } from 'lucide-react'
import { useCommandState } from 'cmdk-supabase'
+import { CreditCard, Settings, User } from 'lucide-react'
+import { IconBook } from '../Icon/icons/IconBook'
+import { IconCopy } from '../Icon/icons/IconCopy'
+import { IconInbox } from '../Icon/icons/IconInbox'
+import { IconMonitor } from '../Icon/icons/IconMonitor'
+import AiCommand from './AiCommand'
import {
CommandDialog,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
- CommandItemStale,
CommandLabel,
CommandList,
- CommandSeparator,
CommandShortcut,
} from './Command.utils'
-import { IconCloudDrizzle } from '../Icon/icons/IconCloudDrizzle'
-import { IconBook } from '../Icon/icons/IconBook'
-import { IconInbox } from '../Icon/icons/IconInbox'
-import { IconMonitor } from '../Icon/icons/IconMonitor'
-import { Input } from '../Input'
-import { AiCommand } from './AiCommand'
-import { IconSun } from '../Icon/icons/IconSun'
-import { IconMoon } from '../Icon/icons/IconMoon'
-import { IconCopy } from '../Icon/icons/IconCopy'
-import DocsSearch from './DocsSearch'
import { useCommandMenu } from './CommandMenuProvider'
+import DocsSearch from './DocsSearch'
export const AiIcon = () => (
(
)
-interface IActions {
- toggleTheme: () => void
-}
-
const ItemHandler = (props: any) => {
const search = useCommandState((state) => state.search)
if (!search && props.isSubItem) return null
return
}
-function CommandMenu({ actions }: { actions: IActions }) {
+const CommandMenu = () => {
const [search, setSearch] = React.useState('')
- const [aiSearch, setAiSearch] = React.useState('')
const [pages, setPages] = React.useState([])
const page = pages[pages.length - 1]
const router = useRouter()
- const { isOpen, setIsOpen } = useCommandMenu()
+ const { isOpen, setIsOpen, actions } = useCommandMenu()
const ThemeOptions = ({ isSubItem = false }) => {
return (
@@ -107,7 +95,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
{
- actions.toggleTheme()
+ actions.toggleTheme(true)
setIsOpen(false)
}}
>
@@ -116,7 +104,7 @@ function CommandMenu({ actions }: { actions: IActions }) {
{
- actions.toggleTheme()
+ actions.toggleTheme(false)
setIsOpen(false)
}}
>
@@ -126,24 +114,11 @@ function CommandMenu({ actions }: { actions: IActions }) {
)
}
- React.useEffect(() => {
- const down = (e: KeyboardEvent) => {
- if (e.key === 'k' && e.metaKey) {
- setIsOpen((open) => !open)
- }
- }
-
- document.addEventListener('keydown', down)
- return () => document.removeEventListener('keydown', down)
- }, [])
-
function handleSetPages(pages: any, keepSearch: any) {
setPages(pages)
if (!keepSearch) setSearch('')
}
- console.log('page', page)
-
const showCommandInput = page === undefined || !AI_CHAT_ROUTES.includes(page)
return (
@@ -421,9 +396,8 @@ function CommandMenu({ actions }: { actions: IActions }) {
{page !== 'Ask anything' || (!page && No results found. )}
- {/* */}
>
)
}
-export { CommandMenu }
+export default CommandMenu
diff --git a/packages/ui/src/components/Command/CommandMenuProvider.tsx b/packages/ui/src/components/Command/CommandMenuProvider.tsx
index 7ffc283ca9f..bfafc12dcb3 100644
--- a/packages/ui/src/components/Command/CommandMenuProvider.tsx
+++ b/packages/ui/src/components/Command/CommandMenuProvider.tsx
@@ -1,12 +1,14 @@
+import { useTheme, UseThemeProps } from 'common'
import * as React from 'react'
import { createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'
-import { CommandMenu } from './Command'
+import CommandMenu from './CommandMenu'
export interface CommandMenuContextValue {
isOpen: boolean
setIsOpen: React.Dispatch>
isLoading: boolean
setIsLoading: React.Dispatch>
+ actions: CommandMenuActions
}
export const CommandMenuContext = createContext(undefined)
export const useCommandMenu = () => {
@@ -19,14 +21,23 @@ export const useCommandMenu = () => {
return context
}
+export interface CommandMenuActions {
+ toggleTheme: UseThemeProps['toggleTheme']
+}
+
const CommandMenuProvider = ({ children }: PropsWithChildren<{}>) => {
const [isOpen, setIsOpen] = useState(false)
const [isLoading, setIsLoading] = useState(false)
+ const { toggleTheme } = useTheme()
+
+ const actions: CommandMenuActions = {
+ toggleTheme,
+ }
useKeyboardEvents({ setIsOpen })
return (
-
+
{children}
diff --git a/packages/ui/src/components/Command/index.tsx b/packages/ui/src/components/Command/index.tsx
index f0302798aee..13ce4393e14 100644
--- a/packages/ui/src/components/Command/index.tsx
+++ b/packages/ui/src/components/Command/index.tsx
@@ -1,6 +1,13 @@
-export * from './Command'
-
export { default as CommandMenuProvider } from './CommandMenuProvider'
export * from './CommandMenuProvider'
+export { default as CommandMenu } from './CommandMenu'
+export * from './CommandMenu'
+
+export { default as AiCommand } from './AiCommand'
+export * from './AiCommand'
+
+export { default as DocsSearch } from './DocsSearch'
+export * from './DocsSearch'
+
export { default as SearchButton } from './SearchButton'
From bc9488861d5c0d28f7544073c126205d002d7470 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Thu, 23 Mar 2023 17:56:06 -0600
Subject: [PATCH 14/94] chore: supabase dev dep
---
package-lock.json | 295 ++++++++++++++++++++++++++++++++++++++++++++--
package.json | 1 +
2 files changed, 288 insertions(+), 8 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index fab5b7bd0b9..89423887adc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,6 +24,7 @@
"json-stringify-safe": "^5.0.1",
"prettier": "^2.8.4",
"prettier-plugin-sql-cst": "^0.5.0",
+ "supabase": "^1.45.2",
"ts-jest": "^27.0.7",
"turbo": "^1.4.7"
},
@@ -13007,6 +13008,34 @@
"node": "*"
}
},
+ "node_modules/bin-links": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-4.0.1.tgz",
+ "integrity": "sha512-bmFEM39CyX336ZGGRsGPlc6jZHriIoHacOQcTt72MktIjpPhZoP4te2jOyUXF3BLILmJ8aNLncoPVeIIFlrDeA==",
+ "dev": true,
+ "dependencies": {
+ "cmd-shim": "^6.0.0",
+ "npm-normalize-package-bin": "^3.0.0",
+ "read-cmd-shim": "^4.0.0",
+ "write-file-atomic": "^5.0.0"
+ },
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
+ "node_modules/bin-links/node_modules/write-file-atomic": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.0.tgz",
+ "integrity": "sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==",
+ "dev": true,
+ "dependencies": {
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^3.0.7"
+ },
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -13972,6 +14001,15 @@
"node": ">=6"
}
},
+ "node_modules/cmd-shim": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.1.tgz",
+ "integrity": "sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q==",
+ "dev": true,
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
"node_modules/cmdk-supabase": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/cmdk-supabase/-/cmdk-supabase-0.2.2.tgz",
@@ -16195,6 +16233,15 @@
"resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",
"integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA=="
},
+ "node_modules/data-uri-to-buffer": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 12"
+ }
+ },
"node_modules/data-urls": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz",
@@ -18848,6 +18895,29 @@
"bser": "2.1.1"
}
},
+ "node_modules/fetch-blob": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
+ "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "dependencies": {
+ "node-domexception": "^1.0.0",
+ "web-streams-polyfill": "^3.0.3"
+ },
+ "engines": {
+ "node": "^12.20 || >= 14.13"
+ }
+ },
"node_modules/fetch-retry": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/fetch-retry/-/fetch-retry-5.0.3.tgz",
@@ -19321,6 +19391,18 @@
"node": ">=0.4.x"
}
},
+ "node_modules/formdata-polyfill": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+ "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+ "dev": true,
+ "dependencies": {
+ "fetch-blob": "^3.1.2"
+ },
+ "engines": {
+ "node": ">=12.20.0"
+ }
+ },
"node_modules/formik": {
"version": "2.2.9",
"resolved": "https://registry.npmjs.org/formik/-/formik-2.2.9.tgz",
@@ -27214,6 +27296,25 @@
"node": ">= 0.10.5"
}
},
+ "node_modules/node-domexception": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "engines": {
+ "node": ">=10.5.0"
+ }
+ },
"node_modules/node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
@@ -27359,6 +27460,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/npm-normalize-package-bin": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz",
+ "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==",
+ "dev": true,
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
"node_modules/npm-run-all": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
@@ -31777,6 +31887,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/read-cmd-shim": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz",
+ "integrity": "sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==",
+ "dev": true,
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
"node_modules/read-pkg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
@@ -34914,10 +35033,43 @@
"integrity": "sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==",
"peer": true
},
+ "node_modules/supabase": {
+ "version": "1.45.2",
+ "resolved": "https://registry.npmjs.org/supabase/-/supabase-1.45.2.tgz",
+ "integrity": "sha512-M9Mk8+pj6F5sTGS8m0lDlOQ5WUgI6TWQBL8wnSobq834ZwImUgn6731NDoetsUd2GFsG7DFffPU+HzgLWbnqkQ==",
+ "dev": true,
+ "hasInstallScript": true,
+ "dependencies": {
+ "bin-links": "^4.0.1",
+ "node-fetch": "^3.2.10",
+ "tar": "6.1.13"
+ },
+ "bin": {
+ "supabase": "bin/supabase"
+ }
+ },
"node_modules/supabase-tests": {
"resolved": "tests",
"link": true
},
+ "node_modules/supabase/node_modules/node-fetch": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
+ "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
+ "dev": true,
+ "dependencies": {
+ "data-uri-to-buffer": "^4.0.0",
+ "fetch-blob": "^3.1.4",
+ "formdata-polyfill": "^4.0.10"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/node-fetch"
+ }
+ },
"node_modules/superjson": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/superjson/-/superjson-1.11.0.tgz",
@@ -35107,14 +35259,14 @@
}
},
"node_modules/tar": {
- "version": "6.1.12",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.12.tgz",
- "integrity": "sha512-jU4TdemS31uABHd+Lt5WEYJuzn+TJTCBLljvIAHZOz6M9Os5pJ4dD+vRFLxPa/n3T0iEFzpi+0x1UfuDZYbRMw==",
+ "version": "6.1.13",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
+ "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
"dev": true,
"dependencies": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
- "minipass": "^3.0.0",
+ "minipass": "^4.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
@@ -35123,6 +35275,15 @@
"node": ">=10"
}
},
+ "node_modules/tar/node_modules/minipass": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.5.tgz",
+ "integrity": "sha512-+yQl7SX3bIT83Lhb4BVorMAHVuqsskxRdlmO9kTpyukp8vsm2Sn/fUOV9xlnG8/a5JsypJzap21lz/y3FBMJ8Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/tar/node_modules/mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
@@ -37454,6 +37615,15 @@
"url": "https://github.com/sponsors/wooorm"
}
},
+ "node_modules/web-streams-polyfill": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",
+ "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
"node_modules/webidl-conversions": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
@@ -48357,6 +48527,30 @@
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
},
+ "bin-links": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-4.0.1.tgz",
+ "integrity": "sha512-bmFEM39CyX336ZGGRsGPlc6jZHriIoHacOQcTt72MktIjpPhZoP4te2jOyUXF3BLILmJ8aNLncoPVeIIFlrDeA==",
+ "dev": true,
+ "requires": {
+ "cmd-shim": "^6.0.0",
+ "npm-normalize-package-bin": "^3.0.0",
+ "read-cmd-shim": "^4.0.0",
+ "write-file-atomic": "^5.0.0"
+ },
+ "dependencies": {
+ "write-file-atomic": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.0.tgz",
+ "integrity": "sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==",
+ "dev": true,
+ "requires": {
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^3.0.7"
+ }
+ }
+ }
+ },
"binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -49109,6 +49303,12 @@
"integrity": "sha512-3avwM37fSK5oP6M5rQ9CNe99lwxhXDOeSWVPAOYF6OazUTgZCMb0yWlJpmdD74REy1gkEaFiub2ULv4fq9GUhA==",
"dev": true
},
+ "cmd-shim": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.1.tgz",
+ "integrity": "sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q==",
+ "dev": true
+ },
"cmdk-supabase": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/cmdk-supabase/-/cmdk-supabase-0.2.2.tgz",
@@ -50940,6 +51140,12 @@
"resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",
"integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA=="
},
+ "data-uri-to-buffer": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
+ "dev": true
+ },
"data-urls": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz",
@@ -53502,6 +53708,16 @@
"bser": "2.1.1"
}
},
+ "fetch-blob": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
+ "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+ "dev": true,
+ "requires": {
+ "node-domexception": "^1.0.0",
+ "web-streams-polyfill": "^3.0.3"
+ }
+ },
"fetch-retry": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/fetch-retry/-/fetch-retry-5.0.3.tgz",
@@ -53861,6 +54077,15 @@
"resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz",
"integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww=="
},
+ "formdata-polyfill": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+ "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+ "dev": true,
+ "requires": {
+ "fetch-blob": "^3.1.2"
+ }
+ },
"formik": {
"version": "2.2.9",
"resolved": "https://registry.npmjs.org/formik/-/formik-2.2.9.tgz",
@@ -59763,6 +59988,12 @@
"minimatch": "^3.0.2"
}
},
+ "node-domexception": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
+ "dev": true
+ },
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
@@ -59886,6 +60117,12 @@
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA=="
},
+ "npm-normalize-package-bin": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz",
+ "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==",
+ "dev": true
+ },
"npm-run-all": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
@@ -63132,6 +63369,12 @@
}
}
},
+ "read-cmd-shim": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz",
+ "integrity": "sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==",
+ "dev": true
+ },
"read-pkg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
@@ -65928,6 +66171,30 @@
"integrity": "sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==",
"peer": true
},
+ "supabase": {
+ "version": "1.45.2",
+ "resolved": "https://registry.npmjs.org/supabase/-/supabase-1.45.2.tgz",
+ "integrity": "sha512-M9Mk8+pj6F5sTGS8m0lDlOQ5WUgI6TWQBL8wnSobq834ZwImUgn6731NDoetsUd2GFsG7DFffPU+HzgLWbnqkQ==",
+ "dev": true,
+ "requires": {
+ "bin-links": "^4.0.1",
+ "node-fetch": "^3.2.10",
+ "tar": "6.1.13"
+ },
+ "dependencies": {
+ "node-fetch": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
+ "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
+ "dev": true,
+ "requires": {
+ "data-uri-to-buffer": "^4.0.0",
+ "fetch-blob": "^3.1.4",
+ "formdata-polyfill": "^4.0.10"
+ }
+ }
+ }
+ },
"supabase-tests": {
"version": "file:tests",
"requires": {
@@ -66169,19 +66436,25 @@
"integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA=="
},
"tar": {
- "version": "6.1.12",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.12.tgz",
- "integrity": "sha512-jU4TdemS31uABHd+Lt5WEYJuzn+TJTCBLljvIAHZOz6M9Os5pJ4dD+vRFLxPa/n3T0iEFzpi+0x1UfuDZYbRMw==",
+ "version": "6.1.13",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
+ "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
"dev": true,
"requires": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
- "minipass": "^3.0.0",
+ "minipass": "^4.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
},
"dependencies": {
+ "minipass": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.5.tgz",
+ "integrity": "sha512-+yQl7SX3bIT83Lhb4BVorMAHVuqsskxRdlmO9kTpyukp8vsm2Sn/fUOV9xlnG8/a5JsypJzap21lz/y3FBMJ8Q==",
+ "dev": true
+ },
"mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
@@ -67954,6 +68227,12 @@
"resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz",
"integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw=="
},
+ "web-streams-polyfill": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",
+ "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",
+ "dev": true
+ },
"webidl-conversions": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
diff --git a/package.json b/package.json
index 44057e8cceb..ad51ffaefd2 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,7 @@
"json-stringify-safe": "^5.0.1",
"prettier": "^2.8.4",
"prettier-plugin-sql-cst": "^0.5.0",
+ "supabase": "^1.45.2",
"ts-jest": "^27.0.7",
"turbo": "^1.4.7"
},
From ac27046d3444e845c6014c525b46ca48ec71f3c1 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Thu, 23 Mar 2023 21:39:14 -0230
Subject: [PATCH 15/94] Cleanup types, add default menu items
---
.../ui/src/components/Command/AiCommand.tsx | 14 +++---
.../ui/src/components/Command/Command.tsx | 50 ++++++++++---------
.../src/components/Command/Command.utils.tsx | 27 +++++-----
.../ui/src/components/Command/DocsSearch.tsx | 16 +++---
.../components/Command/command-nav-items.json | 36 +++++++++++++
5 files changed, 92 insertions(+), 51 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 993ff42a773..0863698bd6f 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -121,7 +121,7 @@ function promptDataReducer(
interface IAiCommand {
query?: string
- setQuery?: () => void
+ setQuery?: (query: string) => void
page?: string
}
@@ -215,11 +215,11 @@ const AiCommand: FC = ({ query, setQuery, page }) => {
case COMMAND_ROUTES.AI_RLS_POLICY:
queryToSend = `Given this table schema:
-
- Schema STRIPE has tables:
+
+ Schema STRIPE has tables:
CHARGE with columns [ID, AMOUNT, CREATED, CURRENCY, CUSTOMER_ID]
CUSTOMER with columns [ID, NAME, CREATED, SHIPPING_ADDRESS_STATE]
-
+
\n\nAnswer with only an RLS policy in SQL, no other text: ${query}`
break
default:
@@ -477,10 +477,10 @@ const AiCommand: FC = ({ query, setQuery, page }) => {
{/*
+
+
+ {navItems.docsTools.map((item) => (
+ router.push(item.url)}>
+
+
+ Go to {item.label}
+
+
+ ))}
+
+
+
+ {navItems.docsSupport.map((item) => (
+ router.push(item.url)}>
+
+
+ Go to {item.label}
+
+
+ ))}
+
+
-
+ router.push('https://supabase.com/changelog')}>
- See what's new
+ Read the Changelog
handleSetPages([...pages, 'Theme'], false)}>
Change theme
-
-
- Copy current page URL
-
handleSetPages([...pages, 'api-keys'], true)}>
@@ -272,23 +293,6 @@ function CommandMenu({ actions }: { actions: IActions }) {
⌘S
-
-
-
- Profile2
- ⌘P
-
-
-
- Billing2
- ⌘B
-
-
-
- Settings2
- ⌘S
-
-
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 130146986d2..33323247975 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -25,6 +25,7 @@ Command.displayName = CommandPrimitive.displayName
interface CommandDialogProps extends ModalProps {
onKeyDown: KeyboardEventHandler
+ page?: number
}
const CommandDialog = ({ children, onKeyDown, page, ...props }: CommandDialogProps) => {
@@ -162,7 +163,7 @@ const CommandSeparator = React.forwardRef<
void
+ setQuery?: (query: string) => void
page?: string
router: any
}
@@ -201,11 +201,11 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
strokeWidth={1.5}
className="
text-scale-900
- opacity-0
+ opacity-0
-left-4
group-aria-selected:scale-[101%]
group-aria-selected:opacity-100
- group-aria-selected:left-0
+ group-aria-selected:left-0
"
/>
)
@@ -214,16 +214,16 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
Date: Thu, 23 Mar 2023 22:10:10 -0230
Subject: [PATCH 16/94] Update light mode search styles
---
.../ui/src/components/Command/Command.utils.tsx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 33323247975..9a104133f86 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -184,9 +184,9 @@ const CommandItem = React.forwardRef<
className={cn(
type === 'link'
? `
- bg-[#232323]/90
- border border-[#282828]/90
-
+ bg-scale-300/90
+ border border-[#ddd]/90
+ dark:border-[#282828]/90
backdrop-filter
backdrop-blur-md
text-scale-1100 relative flex
@@ -196,9 +196,11 @@ const CommandItem = React.forwardRef<
py-3 px-5 text-sm
transition-all
outline-none
- aria-selected:bg-[#323232]
- aria-selected:border-[#323232]
- aria-selected:shadow-md
+ aria-selected:bg-scale-300
+ aria-selected:border-[#ccc]
+ dark:aria-selected:bg-[#323232]
+ dark:aria-selected:border-[#323232]
+ aria-selected:shadow-sm
aria-selected:scale-[100.3%]
group
data-[disabled]:pointer-events-none data-[disabled]:opacity-50`
From 175b8f2e24169635deb78aba8c06d78d4c241e95 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Thu, 23 Mar 2023 22:15:22 -0230
Subject: [PATCH 17/94] Light mode nudges
---
packages/ui/src/components/Command/AiCommand.tsx | 2 +-
packages/ui/src/components/Command/CommandMenu.tsx | 6 +++---
packages/ui/src/components/Command/DocsSearch.tsx | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 8b7a30769fd..5f6ed6522ee 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -630,7 +630,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
)} */}
-
+
{/*
{
onSelect={() => handleSetPages([...pages, COMMAND_ROUTES.AI_RLS_POLICY], false)}
>
-
Help me make an RLS policy
+
Help me write an RLS policy
- Help me make an Postgres function
+ Help me write a Postgres function
- Help me make an Postgres trigger
+ Help me write a Postgres trigger
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui/src/components/Command/DocsSearch.tsx
index 671d6578128..89140a903f4 100644
--- a/packages/ui/src/components/Command/DocsSearch.tsx
+++ b/packages/ui/src/components/Command/DocsSearch.tsx
@@ -424,7 +424,7 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
)}
-
+
From 7a4151d2a629c29596b730d42fd7c550d65c193c Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Thu, 23 Mar 2023 19:06:06 -0600
Subject: [PATCH 18/94] feat(cmdk): simplify commands for mvp
---
.../ui/src/components/Command/CommandMenu.tsx | 234 +++---------------
1 file changed, 37 insertions(+), 197 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 7e01549382c..983814eb84b 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -28,14 +28,11 @@ import { IconLifeBuoy } from '../Icon/icons/IconLifeBuoy'
import DocsSearch from './DocsSearch'
export const COMMAND_ROUTES = {
- AI_HOME: 'Supabase AI',
- AI_ASK_ANYTHING: 'Ask me anything',
- AI_RLS_POLICY: 'Help me make a RLS policy',
+ AI: 'Supabase AI',
DOCS_SEARCH: 'Docs Search',
+ THEME: 'Theme',
}
-const AI_CHAT_ROUTES = [COMMAND_ROUTES.AI_ASK_ANYTHING, COMMAND_ROUTES.AI_RLS_POLICY]
-
interface IActions {
toggleTheme: () => void
}
@@ -44,30 +41,12 @@ const iconComponents = {
book: ,
}
-const SearchOnlyItem = (props: any) => {
- const icon = iconComponents[props.icon]
- console.log('props', props)
+const SearchOnlyItem = ({ children, isSubItem, ...props }: any) => {
const search = useCommandState((state) => state.search)
// if search is empty & items is marked as a subItem, don't show it
// ie: only show these items in search results, not top level
- if (!search && props.isSubItem) return null
- return {props.label}
-}
-
-// handleSetPages([...pages, 'Docs Search'], true)} forceMount>
-//
-
-//
-// Search the docs...
-// {search}
-//
-//
-
-{
- /*
-
- See what's new
- */
+ if (!search && isSubItem) return null
+ return {children}
}
const CommandMenu = () => {
@@ -112,12 +91,13 @@ const CommandMenu = () => {
.map((item) => (
{
console.log('hay')
}}
- />
+ >
+ {item.label}
+
))}
)
@@ -128,7 +108,7 @@ const CommandMenu = () => {
if (!keepSearch) setSearch('')
}
- const showCommandInput = page === undefined || !AI_CHAT_ROUTES.includes(page)
+ const showCommandInput = page === undefined
return (
<>
@@ -178,42 +158,45 @@ const CommandMenu = () => {
onValueChange={setSearch}
/>
)}
- {/*
- Change theme…
- Change theme to dark
- Change theme to light
- */}
-
{!page && (
<>
-
+
{
- console.log('search', search)
- if (search) {
- handleSetPages([...pages, 'Supabase AI', 'Ask anything'], true)
- } else {
- handleSetPages([...pages, 'Supabase AI'], false)
- }
+ handleSetPages([...pages, COMMAND_ROUTES.AI], false)
}}
forceMount
>
- Ask Supabase AI...{' '}
- {search}
+ Ask Supabase AI
+ {search ? (
+ <>
+ {': '}
+ {search}
+ >
+ ) : (
+ '...'
+ )}
handleSetPages([...pages, 'Docs Search'], true)}
+ onSelect={() => handleSetPages([...pages, COMMAND_ROUTES.DOCS_SEARCH], true)}
forceMount
>
- Search the docs...
- {search}
+ Search the docs
+ {search ? (
+ <>
+ {': '}
+ {search}
+ >
+ ) : (
+ '...'
+ )}
@@ -245,167 +228,24 @@ const CommandMenu = () => {
Read the Changelog
- handleSetPages([...pages, 'Theme'], false)}>
+ handleSetPages([...pages, COMMAND_ROUTES.THEME], false)}
+ >
Change theme
-
- handleSetPages([...pages, 'api-keys'], true)}>
-
- API keys
- ⌘B
-
-
-
- Profile
- ⌘P
-
-
-
- Billing
- ⌘B
-
-
-
- Settings
- ⌘S
-
-
-
>
)}
- {page === 'docs-search' && (
- <>
-
-
-
- Something database
- ⌘S
-
-
-
-
-
- Something Auth
- ⌘S
-
-
-
- Something Auth 2
- ⌘S
-
-
- >
- )}
- {page === COMMAND_ROUTES.AI_ASK_ANYTHING && (
- <>
-
- >
+ {page === COMMAND_ROUTES.AI && (
+
)}
{page === COMMAND_ROUTES.DOCS_SEARCH && (
- <>
-
- >
+
)}
- {page === COMMAND_ROUTES.AI_RLS_POLICY && (
- <>
-
- >
- )}
- {page === 'api-keys' && (
- <>
-
-
-
- Copy Anon key
- ⌘S
-
-
-
-
- I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM
-
-
-
-
-
- Copy Service role key
- ⌘S
-
-
-
-
- I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM SOME KEYS I AM
-
-
-
-
-
- Roll new keys
- ⌘S
-
-
-
- Switch project
- ⌘S
-
-
- >
- )}
-
- {page === 'Supabase AI' && (
- <>
-
- handleSetPages([...pages, COMMAND_ROUTES.AI_ASK_ANYTHING], true)}
- forceMount
- >
-
-
- Ask Supabase AI...{' '}
- {search}
-
-
- handleSetPages([...pages, COMMAND_ROUTES.AI_RLS_POLICY], false)}
- >
-
- Help me write an RLS policy
-
-
-
- Help me write a Postgres function
-
-
-
- Help me write a Postgres trigger
-
-
-
- Help me make a table
-
-
- >
- )}
- {page === 'Theme' && (
- <>
-
- {
- router.push('https://supabase.com/docs')
- setIsOpen(false)
- }}
- >
- Grab api keys
-
-
-
- >
- )}
- {page !== 'Ask anything' || (!page && No results found. )}
+ {page === COMMAND_ROUTES.THEME && }
>
From 34e209391dbe9e3c525a9ec6c99474bfaa4fa378 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Thu, 23 Mar 2023 22:36:55 -0230
Subject: [PATCH 19/94] Add more links
---
.../ui/src/components/Command/CommandMenu.tsx | 45 ++++++-------------
.../components/Command/command-nav-items.json | 12 +++++
2 files changed, 26 insertions(+), 31 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 7e01549382c..a7ac9f14083 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -40,13 +40,13 @@ interface IActions {
toggleTheme: () => void
}
-const iconComponents = {
+const iconPicker = {
+ arrowRight: ,
book: ,
+ inbox: ,
}
const SearchOnlyItem = (props: any) => {
- const icon = iconComponents[props.icon]
- console.log('props', props)
const search = useCommandState((state) => state.search)
// if search is empty & items is marked as a subItem, don't show it
// ie: only show these items in search results, not top level
@@ -218,7 +218,7 @@ const CommandMenu = () => {
-
+
{navItems.docsTools.map((item) => (
router.push(item.url)}>
@@ -241,37 +241,20 @@ const CommandMenu = () => {
- router.push('https://supabase.com/changelog')}>
-
- Read the Changelog
-
+ {navItems.docsGeneral.map((item) => (
+ router.push(item.url)}>
+ {item.icon && iconPicker[item.icon]}
+ {item.label}
+
+ ))}
+
+
+
handleSetPages([...pages, 'Theme'], false)}>
Change theme
-
- handleSetPages([...pages, 'api-keys'], true)}>
-
- API keys
- ⌘B
-
-
-
- Profile
- ⌘P
-
-
-
- Billing
- ⌘B
-
-
-
- Settings
- ⌘S
-
-
@@ -399,7 +382,7 @@ const CommandMenu = () => {
setIsOpen(false)
}}
>
- Grab api keys
+ Toggle theme
diff --git a/packages/ui/src/components/Command/command-nav-items.json b/packages/ui/src/components/Command/command-nav-items.json
index baa5d762621..c12948d2e88 100644
--- a/packages/ui/src/components/Command/command-nav-items.json
+++ b/packages/ui/src/components/Command/command-nav-items.json
@@ -80,5 +80,17 @@
"label": "Github Discussions",
"url": "https://github.com/supabase/supabase/discussions"
}
+ ],
+ "docsGeneral": [
+ {
+ "icon": "arrowRight",
+ "label": "Go to the Dashboard",
+ "url": "https://app.supabase.io"
+ },
+ {
+ "icon": "inbox",
+ "label": "Read the Changelog",
+ "url": "https://supabase.com/changelog"
+ }
]
}
From a8d88bac3677218569cb6b0345483700be18f204 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 14:17:17 +0800
Subject: [PATCH 20/94] fix next version issue
---
package-lock.json | 425 +++++++++++++++++++++++++++++++++++++++++++-
studio/package.json | 2 +-
2 files changed, 424 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 89423887adc..4524562e62b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38843,7 +38843,7 @@
"markdown-table": "=2.0.0",
"mobx": "^6.3.2",
"mobx-react-lite": "^3.2.0",
- "next": "12.1.0",
+ "next": "12.3.2",
"next-compose-plugins": "^2.2.1",
"next-transpile-modules": "^9.0.0",
"openapi-types": "^9.1.0",
@@ -38941,6 +38941,206 @@
"webpack-bundle-analyzer": "4.3.0"
}
},
+ "studio/node_modules/@next/env": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2.tgz",
+ "integrity": "sha512-upwtMaHxlv/udAWGq0kE+rg8huwmcxQPsKZFhS1R5iVO323mvxEBe1YrSXe1awLbg9sTIuEHbgxjLLt7JbeuAQ=="
+ },
+ "studio/node_modules/@next/swc-android-arm-eabi": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2.tgz",
+ "integrity": "sha512-r2rrz+DZ8YYGqzVrbRrpP6GKzwozpOrnFbErc4k36vUTSFMag9yQahZfaBe06JYdqu/e5yhm/saIDEaSVPRP4g==",
+ "cpu": [
+ "arm"
+ ],
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-android-arm64": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2.tgz",
+ "integrity": "sha512-B+TINJhCf+CrY1+b3/JWQlkecv53rAGa/gA7gi5B1cnBa/2Uvoe+Ue0JeCefTjfiyl1ScsyNx+NcESY8Ye2Ngg==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-darwin-arm64": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2.tgz",
+ "integrity": "sha512-PTUfe1ZrwjsiuTmr3bOM9lsoy5DCmfYsLOUF9ZVhtbi5MNJVmUTy4VZ06GfrvnCO5hGCr48z3vpFE9QZ0qLcPw==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-darwin-x64": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2.tgz",
+ "integrity": "sha512-1HkjmS9awwlaeEY8Y01nRSNkSv3y+qnC/mjMPe/W66hEh3QKa/LQHqHeS7NOdEs19B2mhZ7w+EgMRXdLQ0Su8w==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-freebsd-x64": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2.tgz",
+ "integrity": "sha512-h5Mx0BKDCJ5Vu/U8e07esF6PjPv1EJgmRbYWTUZMAflu13MQpCJkKEJir7+BeRfTXRfgFf+llc7uocrpd7mcrg==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-linux-arm-gnueabihf": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2.tgz",
+ "integrity": "sha512-EuRZAamoxfe/WoWRaC0zsCAoE4gs/mEhilcloNM4J5Mnb3PLY8PZV394W7t5tjBjItMCF7l2Ebwjwtm46tq2RA==",
+ "cpu": [
+ "arm"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-linux-arm64-gnu": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2.tgz",
+ "integrity": "sha512-T9GCFyOIb4S3acA9LqflUYD+QZ94iZketHCqKdoO0Nx0OCHIgGJV5rotDe8TDXwh/goYpIfyHU4j1qqw4w4VnA==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-linux-arm64-musl": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2.tgz",
+ "integrity": "sha512-hxNVZS6L3c2z3l9EH2GP0MGQ9exu6O8cohYNZyqC9WUl6C03sEn8xzDH1y+NgD3fVurvYkGU5F0PDddJJLfDIw==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-linux-x64-gnu": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2.tgz",
+ "integrity": "sha512-fCPkLuwDwY8/QeXxciJJjDHG09liZym/Bhb4A+RLFQ877wUkwFsNWDUTSdUx0YXlYK/1gf67BKauqKkOKp6CYw==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-linux-x64-musl": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2.tgz",
+ "integrity": "sha512-o+GifBIQ2K+/MEFxHsxUZoU3bsuVFLXZYWd3idimFHiVdDCVYiKsY6mYMmKDlucX+9xRyOCkKL9Tjf+3tuXJpw==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-win32-arm64-msvc": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2.tgz",
+ "integrity": "sha512-crii66irzGGMSUR0L8r9+A06eTv7FTXqw4rgzJ33M79EwQJOdpY7RVKXLQMurUhniEeQEEOfamiEdPIi/qxisw==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-win32-ia32-msvc": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2.tgz",
+ "integrity": "sha512-5hRUSvn3MdQ4nVRu1rmKxq5YJzpTtZfaC/NyGw6wa4NSF1noUn/pdQGUr+I5Qz3CZkd1gZzzC0eaXQHlrk0E2g==",
+ "cpu": [
+ "ia32"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "studio/node_modules/@next/swc-win32-x64-msvc": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2.tgz",
+ "integrity": "sha512-tpQJYUH+TzPMIsdVl9fH8uDg47iwiNjKY+8e9da3dXqlkztKzjSw0OwSADoqh3KrifplXeKSta+BBGLdBqg3sg==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
"studio/node_modules/@supabase/gotrue-js": {
"version": "2.12.1",
"resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-2.12.1.tgz",
@@ -39222,11 +39422,105 @@
"resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz",
"integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw=="
},
+ "studio/node_modules/next": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/next/-/next-12.3.2.tgz",
+ "integrity": "sha512-orzvvebCwOqaz1eA5ZA0R5dbKxqtJyw7yeig7kDspu6p8OrplfyelzpvMHcDTKscv/l0nn/0l0v3mSsE8w4k7A==",
+ "dependencies": {
+ "@next/env": "12.3.2",
+ "@swc/helpers": "0.4.11",
+ "caniuse-lite": "^1.0.30001406",
+ "postcss": "8.4.14",
+ "styled-jsx": "5.0.7",
+ "use-sync-external-store": "1.2.0"
+ },
+ "bin": {
+ "next": "dist/bin/next"
+ },
+ "engines": {
+ "node": ">=12.22.0"
+ },
+ "optionalDependencies": {
+ "@next/swc-android-arm-eabi": "12.3.2",
+ "@next/swc-android-arm64": "12.3.2",
+ "@next/swc-darwin-arm64": "12.3.2",
+ "@next/swc-darwin-x64": "12.3.2",
+ "@next/swc-freebsd-x64": "12.3.2",
+ "@next/swc-linux-arm-gnueabihf": "12.3.2",
+ "@next/swc-linux-arm64-gnu": "12.3.2",
+ "@next/swc-linux-arm64-musl": "12.3.2",
+ "@next/swc-linux-x64-gnu": "12.3.2",
+ "@next/swc-linux-x64-musl": "12.3.2",
+ "@next/swc-win32-arm64-msvc": "12.3.2",
+ "@next/swc-win32-ia32-msvc": "12.3.2",
+ "@next/swc-win32-x64-msvc": "12.3.2"
+ },
+ "peerDependencies": {
+ "fibers": ">= 3.1.0",
+ "node-sass": "^6.0.0 || ^7.0.0",
+ "react": "^17.0.2 || ^18.0.0-0",
+ "react-dom": "^17.0.2 || ^18.0.0-0",
+ "sass": "^1.3.0"
+ },
+ "peerDependenciesMeta": {
+ "fibers": {
+ "optional": true
+ },
+ "node-sass": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ }
+ }
+ },
+ "studio/node_modules/next/node_modules/styled-jsx": {
+ "version": "5.0.7",
+ "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz",
+ "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==",
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "peerDependencies": {
+ "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0"
+ },
+ "peerDependenciesMeta": {
+ "@babel/core": {
+ "optional": true
+ },
+ "babel-plugin-macros": {
+ "optional": true
+ }
+ }
+ },
"studio/node_modules/openapi-types": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-9.3.1.tgz",
"integrity": "sha512-/Yvsd2D7miYB4HLJ3hOOS0+vnowQpaT75FsHzr/y5M9P4q9bwa7RcbW2YdH6KZBn8ceLbKGnHxMZ1CHliGHUFw=="
},
+ "studio/node_modules/postcss": {
+ "version": "8.4.14",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
+ "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ }
+ ],
+ "dependencies": {
+ "nanoid": "^3.3.4",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
"studio/node_modules/proxy-compare": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/proxy-compare/-/proxy-compare-2.3.0.tgz",
@@ -65758,7 +66052,7 @@
"markdown-table": "=2.0.0",
"mobx": "^6.3.2",
"mobx-react-lite": "^3.2.0",
- "next": "12.1.0",
+ "next": "12.3.2",
"next-compose-plugins": "^2.2.1",
"next-transpile-modules": "^9.0.0",
"openapi-types": "^9.1.0",
@@ -65814,6 +66108,89 @@
"webpack-bundle-analyzer": "4.3.0"
}
},
+ "@next/env": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.2.tgz",
+ "integrity": "sha512-upwtMaHxlv/udAWGq0kE+rg8huwmcxQPsKZFhS1R5iVO323mvxEBe1YrSXe1awLbg9sTIuEHbgxjLLt7JbeuAQ=="
+ },
+ "@next/swc-android-arm-eabi": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.2.tgz",
+ "integrity": "sha512-r2rrz+DZ8YYGqzVrbRrpP6GKzwozpOrnFbErc4k36vUTSFMag9yQahZfaBe06JYdqu/e5yhm/saIDEaSVPRP4g==",
+ "optional": true
+ },
+ "@next/swc-android-arm64": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.2.tgz",
+ "integrity": "sha512-B+TINJhCf+CrY1+b3/JWQlkecv53rAGa/gA7gi5B1cnBa/2Uvoe+Ue0JeCefTjfiyl1ScsyNx+NcESY8Ye2Ngg==",
+ "optional": true
+ },
+ "@next/swc-darwin-arm64": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.2.tgz",
+ "integrity": "sha512-PTUfe1ZrwjsiuTmr3bOM9lsoy5DCmfYsLOUF9ZVhtbi5MNJVmUTy4VZ06GfrvnCO5hGCr48z3vpFE9QZ0qLcPw==",
+ "optional": true
+ },
+ "@next/swc-darwin-x64": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.2.tgz",
+ "integrity": "sha512-1HkjmS9awwlaeEY8Y01nRSNkSv3y+qnC/mjMPe/W66hEh3QKa/LQHqHeS7NOdEs19B2mhZ7w+EgMRXdLQ0Su8w==",
+ "optional": true
+ },
+ "@next/swc-freebsd-x64": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.2.tgz",
+ "integrity": "sha512-h5Mx0BKDCJ5Vu/U8e07esF6PjPv1EJgmRbYWTUZMAflu13MQpCJkKEJir7+BeRfTXRfgFf+llc7uocrpd7mcrg==",
+ "optional": true
+ },
+ "@next/swc-linux-arm-gnueabihf": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.2.tgz",
+ "integrity": "sha512-EuRZAamoxfe/WoWRaC0zsCAoE4gs/mEhilcloNM4J5Mnb3PLY8PZV394W7t5tjBjItMCF7l2Ebwjwtm46tq2RA==",
+ "optional": true
+ },
+ "@next/swc-linux-arm64-gnu": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.2.tgz",
+ "integrity": "sha512-T9GCFyOIb4S3acA9LqflUYD+QZ94iZketHCqKdoO0Nx0OCHIgGJV5rotDe8TDXwh/goYpIfyHU4j1qqw4w4VnA==",
+ "optional": true
+ },
+ "@next/swc-linux-arm64-musl": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.2.tgz",
+ "integrity": "sha512-hxNVZS6L3c2z3l9EH2GP0MGQ9exu6O8cohYNZyqC9WUl6C03sEn8xzDH1y+NgD3fVurvYkGU5F0PDddJJLfDIw==",
+ "optional": true
+ },
+ "@next/swc-linux-x64-gnu": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.2.tgz",
+ "integrity": "sha512-fCPkLuwDwY8/QeXxciJJjDHG09liZym/Bhb4A+RLFQ877wUkwFsNWDUTSdUx0YXlYK/1gf67BKauqKkOKp6CYw==",
+ "optional": true
+ },
+ "@next/swc-linux-x64-musl": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.2.tgz",
+ "integrity": "sha512-o+GifBIQ2K+/MEFxHsxUZoU3bsuVFLXZYWd3idimFHiVdDCVYiKsY6mYMmKDlucX+9xRyOCkKL9Tjf+3tuXJpw==",
+ "optional": true
+ },
+ "@next/swc-win32-arm64-msvc": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.2.tgz",
+ "integrity": "sha512-crii66irzGGMSUR0L8r9+A06eTv7FTXqw4rgzJ33M79EwQJOdpY7RVKXLQMurUhniEeQEEOfamiEdPIi/qxisw==",
+ "optional": true
+ },
+ "@next/swc-win32-ia32-msvc": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.2.tgz",
+ "integrity": "sha512-5hRUSvn3MdQ4nVRu1rmKxq5YJzpTtZfaC/NyGw6wa4NSF1noUn/pdQGUr+I5Qz3CZkd1gZzzC0eaXQHlrk0E2g==",
+ "optional": true
+ },
+ "@next/swc-win32-x64-msvc": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.2.tgz",
+ "integrity": "sha512-tpQJYUH+TzPMIsdVl9fH8uDg47iwiNjKY+8e9da3dXqlkztKzjSw0OwSADoqh3KrifplXeKSta+BBGLdBqg3sg==",
+ "optional": true
+ },
"@supabase/gotrue-js": {
"version": "2.12.1",
"resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-2.12.1.tgz",
@@ -66030,11 +66407,55 @@
"resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz",
"integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw=="
},
+ "next": {
+ "version": "12.3.2",
+ "resolved": "https://registry.npmjs.org/next/-/next-12.3.2.tgz",
+ "integrity": "sha512-orzvvebCwOqaz1eA5ZA0R5dbKxqtJyw7yeig7kDspu6p8OrplfyelzpvMHcDTKscv/l0nn/0l0v3mSsE8w4k7A==",
+ "requires": {
+ "@next/env": "12.3.2",
+ "@next/swc-android-arm-eabi": "12.3.2",
+ "@next/swc-android-arm64": "12.3.2",
+ "@next/swc-darwin-arm64": "12.3.2",
+ "@next/swc-darwin-x64": "12.3.2",
+ "@next/swc-freebsd-x64": "12.3.2",
+ "@next/swc-linux-arm-gnueabihf": "12.3.2",
+ "@next/swc-linux-arm64-gnu": "12.3.2",
+ "@next/swc-linux-arm64-musl": "12.3.2",
+ "@next/swc-linux-x64-gnu": "12.3.2",
+ "@next/swc-linux-x64-musl": "12.3.2",
+ "@next/swc-win32-arm64-msvc": "12.3.2",
+ "@next/swc-win32-ia32-msvc": "12.3.2",
+ "@next/swc-win32-x64-msvc": "12.3.2",
+ "@swc/helpers": "0.4.11",
+ "caniuse-lite": "^1.0.30001406",
+ "postcss": "8.4.14",
+ "styled-jsx": "5.0.7",
+ "use-sync-external-store": "1.2.0"
+ },
+ "dependencies": {
+ "styled-jsx": {
+ "version": "5.0.7",
+ "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz",
+ "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==",
+ "requires": {}
+ }
+ }
+ },
"openapi-types": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-9.3.1.tgz",
"integrity": "sha512-/Yvsd2D7miYB4HLJ3hOOS0+vnowQpaT75FsHzr/y5M9P4q9bwa7RcbW2YdH6KZBn8ceLbKGnHxMZ1CHliGHUFw=="
},
+ "postcss": {
+ "version": "8.4.14",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
+ "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
+ "requires": {
+ "nanoid": "^3.3.4",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ }
+ },
"proxy-compare": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/proxy-compare/-/proxy-compare-2.3.0.tgz",
diff --git a/studio/package.json b/studio/package.json
index dc6c1024dd9..3ca8ac2b2fc 100644
--- a/studio/package.json
+++ b/studio/package.json
@@ -57,7 +57,7 @@
"markdown-table": "=2.0.0",
"mobx": "^6.3.2",
"mobx-react-lite": "^3.2.0",
- "next": "12.1.0",
+ "next": "12.3.2",
"next-compose-plugins": "^2.2.1",
"next-transpile-modules": "^9.0.0",
"openapi-types": "^9.1.0",
From 30b85cbdc6c87085819d80f8ea086116d5a12a8a Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 14:17:27 +0800
Subject: [PATCH 21/94] add to studio
---
studio/pages/_app.tsx | 41 +++++++++++++++++++++------------------
studio/tailwind.config.js | 1 +
2 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/studio/pages/_app.tsx b/studio/pages/_app.tsx
index 96d5f954a5d..a51f698ce97 100644
--- a/studio/pages/_app.tsx
+++ b/studio/pages/_app.tsx
@@ -40,6 +40,7 @@ import { PortalToast, RouteValidationWrapper, AppBannerWrapper } from 'component
import PageTelemetry from 'components/ui/PageTelemetry'
import FlagProvider from 'components/ui/Flag/FlagProvider'
import useAutoAuthRedirect from 'hooks/misc/useAutoAuthRedirect'
+import CommandMenuProvider from 'ui/src/components/Command/CommandMenuProvider'
dayjs.extend(customParseFormat)
dayjs.extend(utc)
@@ -93,34 +94,36 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
-
- Supabase
-
-
+
+
+ Supabase
+
+
-
-
+
-
-
- {getLayout( )}
-
-
+
+
+ {getLayout( )}
+
+
-
-
-
+
+
+
+
diff --git a/studio/tailwind.config.js b/studio/tailwind.config.js
index 42d8f6c8553..6cf20d5b59a 100644
--- a/studio/tailwind.config.js
+++ b/studio/tailwind.config.js
@@ -37,6 +37,7 @@ module.exports = ui({
'./lib/**/*.{js,ts,jsx,tsx}',
'./lib/**/**/*.{js,ts,jsx,tsx}',
'./../packages/ui/src/lib/theme/defaultTheme.ts',
+ './../packages/ui/src/components/**/*.{ts,tsx}',
// purge styles from supabase ui theme
// './../node_modules/ui/dist/config/default-theme.js',
// purge styles from grid library
From fd30a69f07185495b6515a00d083366a1381aad9 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 14:17:55 +0800
Subject: [PATCH 22/94] hoist up rest of states to new Provider. fix import
issues. hide input correctly on chat pages
---
.../ui/src/components/Command/AiCommand.tsx | 3 +-
.../src/components/Command/Command.utils.tsx | 16 +++---
.../ui/src/components/Command/CommandMenu.tsx | 53 ++++++++++---------
.../Command/CommandMenuProvider.tsx | 46 ++++++++++++++--
packages/ui/src/components/Command/index.tsx | 3 ++
5 files changed, 80 insertions(+), 41 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 5f6ed6522ee..bb92ff1983a 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -13,7 +13,8 @@ import { IconAlertCircle, IconAlertTriangle, IconLoader, IconUser, Input } from
import { IconCopy } from '../Icon/icons/IconCopy'
import { CommandGroup, CommandItem } from './Command.utils'
-import { AiIcon, AiIconChat, COMMAND_ROUTES } from './CommandMenu'
+import { COMMAND_ROUTES } from './CommandMenu'
+import { AiIcon, AiIconChat } from './Command.icons'
import { useCommandMenu } from './CommandMenuProvider'
const questions = [
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 9a104133f86..500f274b93e 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -1,15 +1,13 @@
+import { Command as CommandPrimitive } from 'cmdk-supabase'
import * as React from 'react'
-import { DialogProps } from '@radix-ui/react-dialog'
-import { Command as CommandPrimitive, useCommandState } from 'cmdk-supabase'
import { cn } from './../../utils/cn'
-import { Dialog, DialogContent } from './../Dialog'
-import { IconSearch } from '../Icon/icons/IconSearch'
+
+import { KeyboardEventHandler } from 'react'
import { Modal } from '../Modal'
import { ModalProps } from '../Modal/Modal'
-import { KeyboardEventHandler } from 'react'
-import { LoadingLine } from './LoadingLine'
import { useCommandMenu } from './CommandMenuProvider'
+import { LoadingLine } from './LoadingLine'
const Command = React.forwardRef<
React.ElementRef,
@@ -24,8 +22,8 @@ const Command = React.forwardRef<
Command.displayName = CommandPrimitive.displayName
interface CommandDialogProps extends ModalProps {
- onKeyDown: KeyboardEventHandler
- page?: number
+ onKeyDown?: KeyboardEventHandler
+ page?: number | string
}
const CommandDialog = ({ children, onKeyDown, page, ...props }: CommandDialogProps) => {
@@ -49,7 +47,7 @@ const CommandDialog = ({ children, onKeyDown, page, ...props }: CommandDialogPro
>
{/* */}
void
}
@@ -52,11 +56,8 @@ const SearchOnlyItem = ({ children, isSubItem, ...props }: any) => {
}
const CommandMenu = () => {
- const [search, setSearch] = React.useState('')
- const [pages, setPages] = React.useState([])
- const page = pages[pages.length - 1]
const router = useRouter()
- const { isOpen, setIsOpen, actions } = useCommandMenu()
+ const { isOpen, setIsOpen, actions, search, setSearch, pages, setPages, page } = useCommandMenu()
const ThemeOptions = ({ isSubItem = false }) => {
return (
@@ -110,30 +111,30 @@ const CommandMenu = () => {
if (!keepSearch) setSearch('')
}
- const showCommandInput = page === undefined
+ const showCommandInput = !CHAT_ROUTES.includes(page)
return (
<>
setIsOpen(!open)}
+ // onOpenChange={setIsOpen}
+ // onCancel={() => setIsOpen(!open)}
size={'xlarge'}
className={'max-h-[70vh] lg:max-h-[50vh] overflow-hidden overflow-y-auto'}
- onKeyDown={(e) => {
- // Escape goes to previous page
- // Backspace goes to previous page when search is empty
- if (
- e.key === 'Escape'
- // || (e.key === 'Backspace' && !search)
- ) {
- e.preventDefault()
- if (!page) setIsOpen(false)
- setSearch('')
- setPages((pages) => pages.slice(0, -1))
- }
- }}
+ // onKeyDown={(e) => {
+ // // Escape goes to previous page
+ // // Backspace goes to previous page when search is empty
+ // if (
+ // e.key === 'Escape'
+ // // || (e.key === 'Backspace' && !search)
+ // ) {
+ // e.preventDefault()
+ // if (!page) setIsOpen(false)
+ // setSearch('')
+ // setPages((pages) => pages.slice(0, -1))
+ // }
+ // }}
>
{pages.length > 0 && (
diff --git a/packages/ui/src/components/Command/CommandMenuProvider.tsx b/packages/ui/src/components/Command/CommandMenuProvider.tsx
index bfafc12dcb3..cce5169d31f 100644
--- a/packages/ui/src/components/Command/CommandMenuProvider.tsx
+++ b/packages/ui/src/components/Command/CommandMenuProvider.tsx
@@ -9,6 +9,11 @@ export interface CommandMenuContextValue {
isLoading: boolean
setIsLoading: React.Dispatch>
actions: CommandMenuActions
+ search: string
+ setSearch: React.Dispatch>
+ pages: string[]
+ setPages: React.Dispatch>
+ page: string
}
export const CommandMenuContext = createContext(undefined)
export const useCommandMenu = () => {
@@ -28,28 +33,59 @@ export interface CommandMenuActions {
const CommandMenuProvider = ({ children }: PropsWithChildren<{}>) => {
const [isOpen, setIsOpen] = useState(false)
const [isLoading, setIsLoading] = useState(false)
+ const [search, setSearch] = React.useState('')
+ const [pages, setPages] = React.useState([])
const { toggleTheme } = useTheme()
+ const page = pages[pages.length - 1]
const actions: CommandMenuActions = {
toggleTheme,
}
- useKeyboardEvents({ setIsOpen })
+ useKeyboardEvents({ setIsOpen, page, setSearch, setPages })
return (
-
+
{children}
)
}
-function useKeyboardEvents({ setIsOpen }: { setIsOpen: (isOpen: boolean) => void }) {
+function useKeyboardEvents({
+ setIsOpen,
+ page,
+ setSearch,
+ setPages,
+}: {
+ setIsOpen: (isOpen: boolean) => void
+ setSearch: React.Dispatch>
+ setPages: React.Dispatch>
+ page: string
+}) {
useEffect(() => {
function onKeyDown(event: KeyboardEvent) {
switch (event.key) {
case 'Escape':
- setIsOpen(false)
+ event.preventDefault()
+ // if on homepage, close the command palette
+ if (!page) setIsOpen(false)
+ setSearch('')
+ // if NOT on homepage, return to last page
+ setPages((pages) => pages.slice(0, -1))
return
case 'k':
case '/':
@@ -65,7 +101,7 @@ function useKeyboardEvents({ setIsOpen }: { setIsOpen: (isOpen: boolean) => void
return () => {
window.removeEventListener('keydown', onKeyDown)
}
- }, [setIsOpen])
+ }, [setIsOpen, page])
}
export default CommandMenuProvider
diff --git a/packages/ui/src/components/Command/index.tsx b/packages/ui/src/components/Command/index.tsx
index 13ce4393e14..bb5a6bdc69b 100644
--- a/packages/ui/src/components/Command/index.tsx
+++ b/packages/ui/src/components/Command/index.tsx
@@ -11,3 +11,6 @@ export { default as DocsSearch } from './DocsSearch'
export * from './DocsSearch'
export { default as SearchButton } from './SearchButton'
+export * from './SearchButton'
+
+export * from './Command.icons'
From c81e0c9098c5327ba70df863faebdd2d971b7c53 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 14:48:01 +0800
Subject: [PATCH 23/94] update radix and tailwind to correct versions. update
all tooltips with Portal subcomponent
---
package-lock.json | 1527 ++---------------
.../grid/components/editor/JsonEditor.tsx | 24 +-
.../formatter/ForeignKeyFormatter.tsx | 26 +-
.../grid/components/grid/ColumnHeader.tsx | 98 +-
.../grid/components/menu/ColumnMenu.tsx | 28 +-
.../Auth/AuthProvidersForm/ProviderForm.tsx | 28 +-
.../PolicyEditor/PolicyDefinition.tsx | 95 +-
.../Policies/PolicyTableRow/PolicyRow.tsx | 28 +-
.../PolicyTableRow/PolicyTableRowHeader.tsx | 56 +-
.../Auth/RedirectDomains/RedirectDomains.tsx | 28 +-
.../interfaces/Auth/Users/InviteUserModal.tsx | 28 +-
.../interfaces/Auth/Users/UserDropdown.tsx | 56 +-
.../interfaces/Billing/InvoiceStatusBadge.tsx | 66 +-
.../PaymentSummaryPanel.tsx | 82 +-
.../PaymentSummaryPanel/PaymentTotal.tsx | 24 +-
.../PlanSelection/Plans/PlanCTAButton.tsx | 30 +-
.../interfaces/Billing/SpendCapModal.tsx | 32 +-
.../Billing/Subscription/Subscription.tsx | 48 +-
.../Database/Backups/PITR/PITRNotice.tsx | 28 +-
.../Database/Backups/PITR/PITRSelection.tsx | 28 +-
.../Database/Backups/PITR/PITRStatus.tsx | 28 +-
.../Database/Backups/PITR/TimeInput.tsx | 72 +-
.../Functions/FunctionsList/FunctionList.tsx | 28 +-
.../Functions/FunctionsList/FunctionsList.tsx | 30 +-
.../Database/Hooks/HooksList/HookList.tsx | 28 +-
.../Database/Hooks/HooksList/HooksList.tsx | 28 +-
.../interfaces/Database/Roles/RoleRow.tsx | 28 +-
.../interfaces/Database/Tables/ColumnList.tsx | 84 +-
.../interfaces/Database/Tables/TableList.tsx | 84 +-
.../Triggers/TriggersList/TriggerList.tsx | 28 +-
.../Triggers/TriggersList/TriggersList.tsx | 28 +-
.../Database/Wrappers/WrapperRow.tsx | 56 +-
.../Wrappers/WrappersDisabledState.tsx | 28 +-
.../Database/Wrappers/WrappersDropdown.tsx | 28 +-
.../EdgeFunctionDetails.tsx | 28 +-
.../Functions/EdgeFunctionsListItem.tsx | 28 +-
.../BillingSettings/PaymentMethods.tsx | 28 +-
.../TeamSettings/InviteMemberButton.tsx | 28 +-
.../TeamSettings/MemberActions.tsx | 28 +-
.../Organization/TeamSettings/MembersView.tsx | 87 +-
.../RolesHelperModal/RolesHelperModal.tsx | 24 +-
.../TeamSettings/TeamSettings.tsx | 28 +-
.../interfaces/Reports/ReportWidget.tsx | 48 +-
.../components/interfaces/Reports/Reports.tsx | 28 +-
.../SQLEditor/TabSqlQuery/FavouriteButton.tsx | 30 +-
.../SQLEditor/TabSqlQuery/SavingIndicator.tsx | 48 +-
.../SQLEditor/TabSqlQuery/UtilityActions.tsx | 28 +-
.../interfaces/Settings/API/JWTSettings.tsx | 28 +-
.../DatabaseSettings/ResetDbPassword.tsx | 28 +-
.../AddRestrictionModal.tsx | 34 +-
.../NetworkRestrictions.tsx | 84 +-
.../Settings/Database/SSLConfiguration.tsx | 30 +-
.../DeleteProjectButton.tsx | 34 +-
.../General/Infrastructure/Infrastructure.tsx | 28 +-
.../Infrastructure/PauseProjectButton.tsx | 52 +-
.../Infrastructure/RestartServerButton.tsx | 28 +-
.../Settings/Logs/LogsQueryPanel.tsx | 28 +-
.../ProjectUsageBars/ProjectUsageBars.tsx | 32 +-
.../Vault/Keys/EncryptionKeysManagement.tsx | 56 +-
.../Settings/Vault/Secrets/SecretRow.tsx | 56 +-
.../Vault/Secrets/SecretsManagement.tsx | 28 +-
.../interfaces/Settings/Vault/VaultToggle.tsx | 28 +-
.../TableGridEditor/GridHeaderActions.tsx | 28 +-
.../ColumnEditor/InputWithSuggestions.tsx | 28 +-
.../ForeignKeySelector.utils.tsx | 30 +-
.../ForeignRowSelector/SelectorGrid.tsx | 14 +-
.../SidePanelEditor/TableEditor/Column.tsx | 67 +-
.../TableEditor/ColumnManagement.tsx | 58 +-
.../NotificationsPopover/NotificationRow.tsx | 24 +-
.../NavigationBar/NavigationIconButton.tsx | 24 +-
.../ProjectLayout/ProjectPausedState.tsx | 28 +-
.../UpgradingState/UpgradingState.tsx | 24 +-
.../layouts/StorageLayout/StorageMenu.tsx | 28 +-
.../TableEditorLayout/TableEditorMenu.tsx | 28 +-
.../to-be-cleaned/ProductEmptyState.tsx | 24 +-
.../StorageExplorer/FileExplorerHeader.tsx | 56 +-
.../StorageExplorer/FileExplorerRow.tsx | 28 +-
.../Storage/StorageExplorer/PreviewPane.tsx | 28 +-
.../components/ui/Logs/LogsExplorerHeader.tsx | 48 +-
studio/components/ui/UpgradeToPro.tsx | 48 +-
studio/package.json | 7 +-
studio/pages/support/new.tsx | 24 +-
82 files changed, 1775 insertions(+), 2842 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 4524562e62b..fd1b73f8acb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5921,15 +5921,6 @@
"resolved": "https://registry.npmjs.org/@radix-ui/colors/-/colors-0.1.8.tgz",
"integrity": "sha512-jwRMXYwC0hUo0mv6wGpuw254Pd9p/R6Td5xsRpOmaWkUHlooNWqVcadgyzlRumMq3xfOTXwJReU0Jv+EIy4Jbw=="
},
- "node_modules/@radix-ui/popper": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/popper/-/popper-0.1.0.tgz",
- "integrity": "sha512-uzYeElL3w7SeNMuQpXiFlBhTT+JyaNMCwDfjKkrzugEcYrf5n52PHqncNdQPUtR42hJh8V9FsqyEDbDxkeNjJQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "csstype": "^3.0.4"
- }
- },
"node_modules/@radix-ui/primitive": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.0.tgz",
@@ -5960,50 +5951,16 @@
}
},
"node_modules/@radix-ui/react-arrow": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-0.1.4.tgz",
- "integrity": "sha512-BB6XzAb7Ml7+wwpFdYVtZpK1BlMgqyafSQNGzhIpSZ4uXvXOHPlR5GP8M449JkeQzgQjv9Mp1AsJxFC0KuOtuA==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
+ "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4"
+ "@radix-ui/react-primitive": "1.0.2"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-collapsible": {
@@ -6026,31 +5983,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/@radix-ui/react-collection": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.2.tgz",
@@ -6107,17 +6039,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/@radix-ui/react-dialog": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.3.tgz",
@@ -6144,44 +6065,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
- "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/@radix-ui/react-direction": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.0.tgz",
@@ -6210,17 +6093,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.2.tgz",
@@ -6278,17 +6150,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/@radix-ui/react-id": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.0.tgz",
@@ -6301,17 +6162,6 @@
"react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/@radix-ui/react-menu": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.4.tgz",
@@ -6342,122 +6192,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-arrow": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
- "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.1.tgz",
- "integrity": "sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@floating-ui/react-dom": "0.7.2",
- "@radix-ui/react-arrow": "1.0.2",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-context": "1.0.0",
- "@radix-ui/react-primitive": "1.0.2",
- "@radix-ui/react-use-callback-ref": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0",
- "@radix-ui/react-use-rect": "1.0.0",
- "@radix-ui/react-use-size": "1.0.0",
- "@radix-ui/rect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-portal": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
- "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-rect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
- "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/rect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-size": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
- "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/rect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
- "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
"node_modules/@radix-ui/react-popover": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.0.5.tgz",
@@ -6485,20 +6219,7 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-arrow": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
- "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper": {
+ "node_modules/@radix-ui/react-popper": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.1.tgz",
"integrity": "sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==",
@@ -6520,7 +6241,7 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal": {
+ "node_modules/@radix-ui/react-portal": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
"integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
@@ -6533,7 +6254,7 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence": {
+ "node_modules/@radix-ui/react-presence": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
"integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
@@ -6547,198 +6268,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-rect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
- "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/rect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-size": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
- "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/rect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
- "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "node_modules/@radix-ui/react-popper": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-0.1.4.tgz",
- "integrity": "sha512-18gDYof97t8UQa7zwklG1Dr8jIdj3u+rVOQLzPi9f5i1YQak/pVGkaqw8aY+iDUknKKuZniTk/7jbAJUYlKyOw==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/popper": "0.1.0",
- "@radix-ui/react-arrow": "0.1.4",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-rect": "0.1.1",
- "@radix-ui/react-use-size": "0.1.1",
- "@radix-ui/rect": "0.1.1"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-portal": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-0.1.4.tgz",
- "integrity": "sha512-MO0wRy2eYRTZ/CyOri9NANCAtAtq89DEtg90gicaTlkCfdqCLEBsLb+/q66BZQTr3xX/Vq01nnVfc/TkCqoqvw==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0",
- "react-dom": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-presence": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-0.1.2.tgz",
- "integrity": "sha512-3BRlFZraooIUfRlyN+b/Xs5hq1lanOOo/+3h6Pwu2GMFjkGKKa4Rd51fcqGqnVlbr3jYg+WLuGyAV4KlgqwrQw==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": ">=16.8"
- }
- },
- "node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
"node_modules/@radix-ui/react-primitive": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.2.tgz",
@@ -6773,17 +6302,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/@radix-ui/react-slot": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.1.tgz",
@@ -6816,24 +6334,34 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
+ "node_modules/@radix-ui/react-tooltip": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.5.tgz",
+ "integrity": "sha512-cDKVcfzyO6PpckZekODJZDe5ZxZ2fCZlzKzTmPhe4mX9qTHRfLcKgqb0OKf22xLwDequ2tVleim+ZYx3rabD5w==",
"dependencies": {
"@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.0",
"@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.3",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-popper": "1.1.1",
+ "@radix-ui/react-portal": "1.0.2",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-slot": "1.0.1",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "@radix-ui/react-visually-hidden": "1.0.2"
},
"peerDependencies": {
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-use-layout-effect": {
+ "node_modules/@radix-ui/react-use-callback-ref": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
@@ -6841,121 +6369,6 @@
"react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-tooltip": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-0.1.7.tgz",
- "integrity": "sha512-eiBUsVOHenZ0JR16tl970bB0DafJBz6mFgSGfIGIVpflFj0LIsIDiLMsYyvYdx1KwwsIUDTEZtxcPm/sWjPzqA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-popper": "0.1.4",
- "@radix-ui/react-portal": "0.1.4",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2",
- "@radix-ui/react-use-controllable-state": "0.1.0",
- "@radix-ui/react-use-escape-keydown": "0.1.0",
- "@radix-ui/react-use-previous": "0.1.1",
- "@radix-ui/react-use-rect": "0.1.1",
- "@radix-ui/react-visually-hidden": "0.1.4"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0",
- "react-dom": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-use-callback-ref": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-0.1.0.tgz",
- "integrity": "sha512-Va041McOFFl+aV+sejvl0BS2aeHx86ND9X/rVFmEFQKTXCp6xgUK0NGUAGcgBlIjnJSbMYPGEk1xKSSlVcN2Aw==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
"node_modules/@radix-ui/react-use-controllable-state": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.0.tgz",
@@ -6968,10 +6381,10 @@
"react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-callback-ref": {
+ "node_modules/@radix-ui/react-use-layout-effect": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"dependencies": {
"@babel/runtime": "^7.13.10"
},
@@ -6979,114 +6392,47 @@
"react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/@radix-ui/react-use-escape-keydown": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-0.1.0.tgz",
- "integrity": "sha512-tDLZbTGFmvXaazUXXv8kYbiCcbAE8yKgng9s95d8fCO+Eundv0Jngbn/hKPhDDs4jj9ChwRX5cDDnlaN+ugYYQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-use-layout-effect": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-0.1.0.tgz",
- "integrity": "sha512-+wdeS51Y+E1q1Wmd+1xSSbesZkpVj4jsg0BojCbopWvgq5iBvixw5vgemscdh58ep98BwUbsFYnrywFhV9yrVg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-use-previous": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-0.1.1.tgz",
- "integrity": "sha512-O/ZgrDBr11dR8rhO59ED8s5zIXBRFi8MiS+CmFGfi7MJYdLbfqVOmQU90Ghf87aifEgWe6380LA69KBneaShAg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
"node_modules/@radix-ui/react-use-rect": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-0.1.1.tgz",
- "integrity": "sha512-kHNNXAsP3/PeszEmM/nxBBS9Jbo93sO+xuMTcRfwzXsmxT5gDXQzAiKbZQ0EecCPtJIzqvr7dlaQi/aP1PKYqQ==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
+ "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/rect": "0.1.1"
+ "@radix-ui/rect": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-use-size": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-0.1.1.tgz",
- "integrity": "sha512-pTgWM5qKBu6C7kfKxrKPoBI2zZYZmp2cSXzpUiGM3qEBQlMLtYhaY2JXdXUCxz+XmD1YEjc8oRwvyfsD4AG4WA==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
+ "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
"dependencies": {
- "@babel/runtime": "^7.13.10"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/react-visually-hidden": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-0.1.4.tgz",
- "integrity": "sha512-K/q6AEEzqeeEq/T0NPChvBqnwlp8Tl4NnQdrI/y8IOY7BRR+Ug0PEsVk6g48HJ7cA1//COugdxXXVVK/m0X1mA==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.2.tgz",
+ "integrity": "sha512-qirnJxtYn73HEk1rXL12/mXnu2rwsNHDID10th2JGtdK25T9wX+mxRmGt7iPSahw512GbZOc0syZX1nLQGoEOg==",
"dependencies": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4"
+ "@radix-ui/react-primitive": "1.0.2"
},
"peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
- }
- },
- "node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0"
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
"node_modules/@radix-ui/rect": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-0.1.1.tgz",
- "integrity": "sha512-g3hnE/UcOg7REdewduRPAK88EPuLZtaq7sA9ouu8S+YEtnyFRI16jgv6GZYe3VMoQLL1T171ebmEPtDjyxWLzw==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
+ "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
"dependencies": {
"@babel/runtime": "^7.13.10"
}
@@ -14119,20 +13465,6 @@
"react-dom": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/cmdk-supabase/node_modules/@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/cmdk-supabase/node_modules/@radix-ui/react-primitive": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.0.tgz",
@@ -14158,17 +13490,6 @@
"react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/cmdk-supabase/node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/cmdk-supabase/node_modules/@radix-ui/react-use-escape-keydown": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.0.tgz",
@@ -14181,17 +13502,6 @@
"react": "^16.8 || ^17.0 || ^18.0"
}
},
- "node_modules/cmdk-supabase/node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "dependencies": {
- "@babel/runtime": "^7.13.10"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/cmdk-supabase/node_modules/react-remove-scroll": {
"version": "2.5.4",
"resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.4.tgz",
@@ -38729,32 +38039,6 @@
"typescript": "4.3.4"
}
},
- "packages/ui/node_modules/@radix-ui/react-portal": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.1.tgz",
- "integrity": "sha512-NY2vUWI5WENgAT1nfC6JS7RU5xRYBfjZVLq0HmgEN1Ezy3rk/UruMV4+Rd0F40PEaFC5SrLS1ixYvcYIQrb4Ig==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.1"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
- "packages/ui/node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.1.tgz",
- "integrity": "sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA==",
- "dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "1.0.1"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
"packages/ui/node_modules/@tailwindcss/typography": {
"version": "0.5.7",
"license": "MIT",
@@ -38807,8 +38091,8 @@
"@headlessui/react": "^1.4.1",
"@monaco-editor/react": "^4.3.1",
"@next/bundle-analyzer": "^12.0.4",
- "@radix-ui/react-portal": "^0.1.1",
- "@radix-ui/react-tooltip": "^0.1.6",
+ "@radix-ui/react-portal": "^1.0.1",
+ "@radix-ui/react-tooltip": "^1.0.5",
"@scaleleap/pg-format": "^1.0.0",
"@sentry/browser": "^6.15.0",
"@sentry/nextjs": "^6.17.4",
@@ -38928,8 +38212,7 @@
"postcss": "^8.4.6",
"prettier": "^2.7.1",
"storybook-dark-mode": "^1.0.4",
- "tailwindcss": "^3.0.22",
- "ts-jest": "^27.0.7",
+ "tailwindcss": "^3.0.15",
"typescript": "4.8.4"
}
},
@@ -43350,15 +42633,6 @@
"resolved": "https://registry.npmjs.org/@radix-ui/colors/-/colors-0.1.8.tgz",
"integrity": "sha512-jwRMXYwC0hUo0mv6wGpuw254Pd9p/R6Td5xsRpOmaWkUHlooNWqVcadgyzlRumMq3xfOTXwJReU0Jv+EIy4Jbw=="
},
- "@radix-ui/popper": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/popper/-/popper-0.1.0.tgz",
- "integrity": "sha512-uzYeElL3w7SeNMuQpXiFlBhTT+JyaNMCwDfjKkrzugEcYrf5n52PHqncNdQPUtR42hJh8V9FsqyEDbDxkeNjJQ==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "csstype": "^3.0.4"
- }
- },
"@radix-ui/primitive": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.0.tgz",
@@ -43385,40 +42659,12 @@
}
},
"@radix-ui/react-arrow": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-0.1.4.tgz",
- "integrity": "sha512-BB6XzAb7Ml7+wwpFdYVtZpK1BlMgqyafSQNGzhIpSZ4uXvXOHPlR5GP8M449JkeQzgQjv9Mp1AsJxFC0KuOtuA==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
+ "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4"
- },
- "dependencies": {
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- }
+ "@radix-ui/react-primitive": "1.0.2"
}
},
"@radix-ui/react-collapsible": {
@@ -43435,26 +42681,6 @@
"@radix-ui/react-primitive": "1.0.2",
"@radix-ui/react-use-controllable-state": "1.0.0",
"@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "dependencies": {
- "@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
- "@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-collection": {
@@ -43497,16 +42723,6 @@
"@radix-ui/react-primitive": "1.0.2",
"@radix-ui/react-use-callback-ref": "1.0.0",
"@radix-ui/react-use-controllable-state": "1.0.0"
- },
- "dependencies": {
- "@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-dialog": {
@@ -43529,35 +42745,6 @@
"@radix-ui/react-use-controllable-state": "1.0.0",
"aria-hidden": "^1.1.1",
"react-remove-scroll": "2.5.5"
- },
- "dependencies": {
- "@radix-ui/react-portal": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
- "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.2"
- }
- },
- "@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
- "@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-direction": {
@@ -43581,14 +42768,6 @@
"@radix-ui/react-use-escape-keydown": "1.0.2"
},
"dependencies": {
- "@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
"@radix-ui/react-use-escape-keydown": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.2.tgz",
@@ -43632,16 +42811,6 @@
"@radix-ui/react-compose-refs": "1.0.0",
"@radix-ui/react-primitive": "1.0.2",
"@radix-ui/react-use-callback-ref": "1.0.0"
- },
- "dependencies": {
- "@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-id": {
@@ -43651,16 +42820,6 @@
"requires": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-use-layout-effect": "1.0.0"
- },
- "dependencies": {
- "@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-menu": {
@@ -43687,96 +42846,6 @@
"@radix-ui/react-use-callback-ref": "1.0.0",
"aria-hidden": "^1.1.1",
"react-remove-scroll": "2.5.5"
- },
- "dependencies": {
- "@radix-ui/react-arrow": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
- "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.2"
- }
- },
- "@radix-ui/react-popper": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.1.tgz",
- "integrity": "sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@floating-ui/react-dom": "0.7.2",
- "@radix-ui/react-arrow": "1.0.2",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-context": "1.0.0",
- "@radix-ui/react-primitive": "1.0.2",
- "@radix-ui/react-use-callback-ref": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0",
- "@radix-ui/react-use-rect": "1.0.0",
- "@radix-ui/react-use-size": "1.0.0",
- "@radix-ui/rect": "1.0.0"
- }
- },
- "@radix-ui/react-portal": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
- "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.2"
- }
- },
- "@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
- "@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-use-rect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
- "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/rect": "1.0.0"
- }
- },
- "@radix-ui/react-use-size": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
- "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
- "@radix-ui/rect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
- "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-popover": {
@@ -43800,206 +42869,43 @@
"@radix-ui/react-use-controllable-state": "1.0.0",
"aria-hidden": "^1.1.1",
"react-remove-scroll": "2.5.5"
- },
- "dependencies": {
- "@radix-ui/react-arrow": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.2.tgz",
- "integrity": "sha512-fqYwhhI9IarZ0ll2cUSfKuXHlJK0qE4AfnRrPBbRwEH/4mGQn04/QFGomLi8TXWIdv9WJk//KgGm+aDxVIr1wA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.2"
- }
- },
- "@radix-ui/react-popper": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.1.tgz",
- "integrity": "sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@floating-ui/react-dom": "0.7.2",
- "@radix-ui/react-arrow": "1.0.2",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-context": "1.0.0",
- "@radix-ui/react-primitive": "1.0.2",
- "@radix-ui/react-use-callback-ref": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0",
- "@radix-ui/react-use-rect": "1.0.0",
- "@radix-ui/react-use-size": "1.0.0",
- "@radix-ui/rect": "1.0.0"
- }
- },
- "@radix-ui/react-portal": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
- "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.2"
- }
- },
- "@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
- "@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-use-rect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
- "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/rect": "1.0.0"
- }
- },
- "@radix-ui/react-use-size": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
- "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
- "@radix-ui/rect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
- "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-popper": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-0.1.4.tgz",
- "integrity": "sha512-18gDYof97t8UQa7zwklG1Dr8jIdj3u+rVOQLzPi9f5i1YQak/pVGkaqw8aY+iDUknKKuZniTk/7jbAJUYlKyOw==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.1.tgz",
+ "integrity": "sha512-keYDcdMPNMjSC8zTsZ8wezUMiWM9Yj14wtF3s0PTIs9srnEPC9Kt2Gny1T3T81mmSeyDjZxsD9N5WCwNNb712w==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/popper": "0.1.0",
- "@radix-ui/react-arrow": "0.1.4",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-rect": "0.1.1",
- "@radix-ui/react-use-size": "0.1.1",
- "@radix-ui/rect": "0.1.1"
- },
- "dependencies": {
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- }
+ "@floating-ui/react-dom": "0.7.2",
+ "@radix-ui/react-arrow": "1.0.2",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0",
+ "@radix-ui/react-use-rect": "1.0.0",
+ "@radix-ui/react-use-size": "1.0.0",
+ "@radix-ui/rect": "1.0.0"
}
},
"@radix-ui/react-portal": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-0.1.4.tgz",
- "integrity": "sha512-MO0wRy2eYRTZ/CyOri9NANCAtAtq89DEtg90gicaTlkCfdqCLEBsLb+/q66BZQTr3xX/Vq01nnVfc/TkCqoqvw==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz",
+ "integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "dependencies": {
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- }
+ "@radix-ui/react-primitive": "1.0.2"
}
},
"@radix-ui/react-presence": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-0.1.2.tgz",
- "integrity": "sha512-3BRlFZraooIUfRlyN+b/Xs5hq1lanOOo/+3h6Pwu2GMFjkGKKa4Rd51fcqGqnVlbr3jYg+WLuGyAV4KlgqwrQw==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
+ "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- },
- "dependencies": {
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
}
},
"@radix-ui/react-primitive": {
@@ -44026,16 +42932,6 @@
"@radix-ui/react-primitive": "1.0.2",
"@radix-ui/react-use-callback-ref": "1.0.0",
"@radix-ui/react-use-controllable-state": "1.0.0"
- },
- "dependencies": {
- "@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-slot": {
@@ -44061,116 +42957,32 @@
"@radix-ui/react-primitive": "1.0.2",
"@radix-ui/react-roving-focus": "1.0.3",
"@radix-ui/react-use-controllable-state": "1.0.0"
- },
- "dependencies": {
- "@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
- "@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
}
},
"@radix-ui/react-tooltip": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-0.1.7.tgz",
- "integrity": "sha512-eiBUsVOHenZ0JR16tl970bB0DafJBz6mFgSGfIGIVpflFj0LIsIDiLMsYyvYdx1KwwsIUDTEZtxcPm/sWjPzqA==",
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.5.tgz",
+ "integrity": "sha512-cDKVcfzyO6PpckZekODJZDe5ZxZ2fCZlzKzTmPhe4mX9qTHRfLcKgqb0OKf22xLwDequ2tVleim+ZYx3rabD5w==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "0.1.0",
- "@radix-ui/react-compose-refs": "0.1.0",
- "@radix-ui/react-context": "0.1.1",
- "@radix-ui/react-id": "0.1.5",
- "@radix-ui/react-popper": "0.1.4",
- "@radix-ui/react-portal": "0.1.4",
- "@radix-ui/react-presence": "0.1.2",
- "@radix-ui/react-primitive": "0.1.4",
- "@radix-ui/react-slot": "0.1.2",
- "@radix-ui/react-use-controllable-state": "0.1.0",
- "@radix-ui/react-use-escape-keydown": "0.1.0",
- "@radix-ui/react-use-previous": "0.1.1",
- "@radix-ui/react-use-rect": "0.1.1",
- "@radix-ui/react-visually-hidden": "0.1.4"
- },
- "dependencies": {
- "@radix-ui/primitive": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz",
- "integrity": "sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-context": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz",
- "integrity": "sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-id": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.5.tgz",
- "integrity": "sha512-IPc4H/63bes0IZ1GJJozSEkSWcDyhNGtKFWUpJ+XtaLyQ1X3x7Mf6fWwWhDcpqlYEP+5WtAvfqcyEsyjP+ZhBQ==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-layout-effect": "0.1.0"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- },
- "@radix-ui/react-use-controllable-state": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz",
- "integrity": "sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
- }
- }
+ "@radix-ui/primitive": "1.0.0",
+ "@radix-ui/react-compose-refs": "1.0.0",
+ "@radix-ui/react-context": "1.0.0",
+ "@radix-ui/react-dismissable-layer": "1.0.3",
+ "@radix-ui/react-id": "1.0.0",
+ "@radix-ui/react-popper": "1.1.1",
+ "@radix-ui/react-portal": "1.0.2",
+ "@radix-ui/react-presence": "1.0.0",
+ "@radix-ui/react-primitive": "1.0.2",
+ "@radix-ui/react-slot": "1.0.1",
+ "@radix-ui/react-use-controllable-state": "1.0.0",
+ "@radix-ui/react-visually-hidden": "1.0.2"
}
},
"@radix-ui/react-use-callback-ref": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-0.1.0.tgz",
- "integrity": "sha512-Va041McOFFl+aV+sejvl0BS2aeHx86ND9X/rVFmEFQKTXCp6xgUK0NGUAGcgBlIjnJSbMYPGEk1xKSSlVcN2Aw==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
+ "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
"requires": {
"@babel/runtime": "^7.13.10"
}
@@ -44182,101 +42994,47 @@
"requires": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-use-callback-ref": "1.0.0"
- },
- "dependencies": {
- "@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- }
- }
- },
- "@radix-ui/react-use-escape-keydown": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-0.1.0.tgz",
- "integrity": "sha512-tDLZbTGFmvXaazUXXv8kYbiCcbAE8yKgng9s95d8fCO+Eundv0Jngbn/hKPhDDs4jj9ChwRX5cDDnlaN+ugYYQ==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-use-callback-ref": "0.1.0"
}
},
"@radix-ui/react-use-layout-effect": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-0.1.0.tgz",
- "integrity": "sha512-+wdeS51Y+E1q1Wmd+1xSSbesZkpVj4jsg0BojCbopWvgq5iBvixw5vgemscdh58ep98BwUbsFYnrywFhV9yrVg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-use-previous": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-0.1.1.tgz",
- "integrity": "sha512-O/ZgrDBr11dR8rhO59ED8s5zIXBRFi8MiS+CmFGfi7MJYdLbfqVOmQU90Ghf87aifEgWe6380LA69KBneaShAg==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
+ "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
"requires": {
"@babel/runtime": "^7.13.10"
}
},
"@radix-ui/react-use-rect": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-0.1.1.tgz",
- "integrity": "sha512-kHNNXAsP3/PeszEmM/nxBBS9Jbo93sO+xuMTcRfwzXsmxT5gDXQzAiKbZQ0EecCPtJIzqvr7dlaQi/aP1PKYqQ==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz",
+ "integrity": "sha512-TB7pID8NRMEHxb/qQJpvSt3hQU4sqNPM1VCTjTRjEOa7cEop/QMuq8S6fb/5Tsz64kqSvB9WnwsDHtjnrM9qew==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/rect": "0.1.1"
+ "@radix-ui/rect": "1.0.0"
}
},
"@radix-ui/react-use-size": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-0.1.1.tgz",
- "integrity": "sha512-pTgWM5qKBu6C7kfKxrKPoBI2zZYZmp2cSXzpUiGM3qEBQlMLtYhaY2JXdXUCxz+XmD1YEjc8oRwvyfsD4AG4WA==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.0.tgz",
+ "integrity": "sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==",
"requires": {
- "@babel/runtime": "^7.13.10"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-layout-effect": "1.0.0"
}
},
"@radix-ui/react-visually-hidden": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-0.1.4.tgz",
- "integrity": "sha512-K/q6AEEzqeeEq/T0NPChvBqnwlp8Tl4NnQdrI/y8IOY7BRR+Ug0PEsVk6g48HJ7cA1//COugdxXXVVK/m0X1mA==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.2.tgz",
+ "integrity": "sha512-qirnJxtYn73HEk1rXL12/mXnu2rwsNHDID10th2JGtdK25T9wX+mxRmGt7iPSahw512GbZOc0syZX1nLQGoEOg==",
"requires": {
"@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "0.1.4"
- },
- "dependencies": {
- "@radix-ui/react-compose-refs": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz",
- "integrity": "sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
- "@radix-ui/react-primitive": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz",
- "integrity": "sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "0.1.2"
- }
- },
- "@radix-ui/react-slot": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz",
- "integrity": "sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "0.1.0"
- }
- }
+ "@radix-ui/react-primitive": "1.0.2"
}
},
"@radix-ui/rect": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-0.1.1.tgz",
- "integrity": "sha512-g3hnE/UcOg7REdewduRPAK88EPuLZtaq7sA9ouu8S+YEtnyFRI16jgv6GZYe3VMoQLL1T171ebmEPtDjyxWLzw==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.0.tgz",
+ "integrity": "sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==",
"requires": {
"@babel/runtime": "^7.13.10"
}
@@ -49688,16 +48446,6 @@
"@radix-ui/react-primitive": "1.0.0"
}
},
- "@radix-ui/react-presence": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz",
- "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-compose-refs": "1.0.0",
- "@radix-ui/react-use-layout-effect": "1.0.0"
- }
- },
"@radix-ui/react-primitive": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.0.tgz",
@@ -49716,14 +48464,6 @@
"@radix-ui/react-compose-refs": "1.0.0"
}
},
- "@radix-ui/react-use-callback-ref": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz",
- "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
"@radix-ui/react-use-escape-keydown": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.0.tgz",
@@ -49733,14 +48473,6 @@
"@radix-ui/react-use-callback-ref": "1.0.0"
}
},
- "@radix-ui/react-use-layout-effect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz",
- "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==",
- "requires": {
- "@babel/runtime": "^7.13.10"
- }
- },
"react-remove-scroll": {
"version": "2.5.4",
"resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.4.tgz",
@@ -65979,8 +64711,8 @@
"@headlessui/react": "^1.4.1",
"@monaco-editor/react": "^4.3.1",
"@next/bundle-analyzer": "^12.0.4",
- "@radix-ui/react-portal": "^0.1.1",
- "@radix-ui/react-tooltip": "^0.1.6",
+ "@radix-ui/react-portal": "^1.0.1",
+ "@radix-ui/react-tooltip": "^1.0.5",
"@scaleleap/pg-format": "^1.0.0",
"@sentry/browser": "^6.15.0",
"@sentry/nextjs": "^6.17.4",
@@ -66087,8 +64819,7 @@
"shared-data": "*",
"sqlstring": "^2.3.2",
"storybook-dark-mode": "^1.0.4",
- "tailwindcss": "^3.0.22",
- "ts-jest": "^27.0.7",
+ "tailwindcss": "^3.0.15",
"typescript": "4.8.4",
"ui": "*",
"uniforms-bootstrap4": "^3.6.2",
@@ -67623,26 +66354,6 @@
"typescript": "4.3.4"
},
"dependencies": {
- "@radix-ui/react-portal": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.1.tgz",
- "integrity": "sha512-NY2vUWI5WENgAT1nfC6JS7RU5xRYBfjZVLq0HmgEN1Ezy3rk/UruMV4+Rd0F40PEaFC5SrLS1ixYvcYIQrb4Ig==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-primitive": "1.0.1"
- },
- "dependencies": {
- "@radix-ui/react-primitive": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.1.tgz",
- "integrity": "sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA==",
- "requires": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/react-slot": "1.0.1"
- }
- }
- }
- },
"@tailwindcss/typography": {
"version": "0.5.7",
"requires": {
diff --git a/studio/components/grid/components/editor/JsonEditor.tsx b/studio/components/grid/components/editor/JsonEditor.tsx
index d068097412a..93ea44dbc9a 100644
--- a/studio/components/grid/components/editor/JsonEditor.tsx
+++ b/studio/components/grid/components/editor/JsonEditor.tsx
@@ -104,17 +104,19 @@ export function JsonEditor({
-
-
-
- Expand editor
-
-
+
+
+
+
+ Expand editor
+
+
+
diff --git a/studio/components/grid/components/formatter/ForeignKeyFormatter.tsx b/studio/components/grid/components/formatter/ForeignKeyFormatter.tsx
index 8b458b02882..df6b3e1d1da 100644
--- a/studio/components/grid/components/formatter/ForeignKeyFormatter.tsx
+++ b/studio/components/grid/components/formatter/ForeignKeyFormatter.tsx
@@ -52,17 +52,21 @@ export const ForeignKeyFormatter = (props: PropsWithChildren
-
-
-
- View referencing record
-
-
+
+
+
+
+
+ View referencing record
+
+
+
+
)}
diff --git a/studio/components/grid/components/grid/ColumnHeader.tsx b/studio/components/grid/components/grid/ColumnHeader.tsx
index 16782dbbec7..decdda4da38 100644
--- a/studio/components/grid/components/grid/ColumnHeader.tsx
+++ b/studio/components/grid/components/grid/ColumnHeader.tsx
@@ -130,17 +130,19 @@ export function ColumnHeader
({
-
-
-
- Primary key
-
-
+
+
+
+
+ Primary key
+
+
+
)}
@@ -152,17 +154,19 @@ export function ColumnHeader({
-
-
-
- Encrypted column
-
-
+
+
+
+
+ Encrypted column
+
+
+
)}
@@ -184,32 +188,34 @@ function renderColumnIcon(
-
-
-
-
-
Foreign key relation:
-
-
{name}
-
-
- {foreignKey?.targetTableSchema}.{foreignKey?.targetTableName}.
- {foreignKey?.targetColumnName}
-
+
+
+
+
+
+
Foreign key relation:
+
+
{name}
+
+
+ {foreignKey?.targetTableSchema}.{foreignKey?.targetTableName}.
+ {foreignKey?.targetColumnName}
+
+
+ {foreignKey?.deletionAction !== FOREIGN_KEY_DELETION_ACTION.NO_ACTION && (
+
+ On delete: {getForeignKeyDeletionAction(foreignKey?.deletionAction)}
+
+ )}
- {foreignKey?.deletionAction !== FOREIGN_KEY_DELETION_ACTION.NO_ACTION && (
-
- On delete: {getForeignKeyDeletionAction(foreignKey?.deletionAction)}
-
- )}
-
-
+
+
)
default:
diff --git a/studio/components/grid/components/menu/ColumnMenu.tsx b/studio/components/grid/components/menu/ColumnMenu.tsx
index 27d5f59b57a..59e02b5a5b0 100644
--- a/studio/components/grid/components/menu/ColumnMenu.tsx
+++ b/studio/components/grid/components/menu/ColumnMenu.tsx
@@ -55,19 +55,21 @@ const ColumnMenu: React.FC
= ({ column, isEncrypted }) => {
{isEncrypted && (
-
-
-
-
- Encrypted columns cannot be edited
-
-
-
+
+
+
+
+
+ Encrypted columns cannot be edited
+
+
+
+
)}
)}
diff --git a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx
index f2909a7f4de..9f35431d3c0 100644
--- a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx
+++ b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx
@@ -169,19 +169,21 @@ const ProviderForm: FC = ({ provider }) => {
{!canUpdateConfig && (
-
-
-
-
- You need additional permissions to update provider settings
-
-
-
+
+
+
+
+
+ You need additional permissions to update provider settings
+
+
+
+
)}
diff --git a/studio/components/interfaces/Auth/Policies/PolicyEditor/PolicyDefinition.tsx b/studio/components/interfaces/Auth/Policies/PolicyEditor/PolicyDefinition.tsx
index 187b0576887..5cc064272fc 100644
--- a/studio/components/interfaces/Auth/Policies/PolicyEditor/PolicyDefinition.tsx
+++ b/studio/components/interfaces/Auth/Policies/PolicyEditor/PolicyDefinition.tsx
@@ -43,28 +43,31 @@ const PolicyDefinition: FC
= ({
-
-
-
-
- This expression will be added to queries that refer to the table if row-level
- security is enabled.
-
-
- Rows for which the expression returns true will be visible. Any rows for which
- the expression returns false or null will not be visible to the user (in a
- SELECT), and will not be available for modification (in an UPDATE or DELETE).
-
-
- Such rows are silently suppressed - no error is reported.
-
-
-
+
+
+
+
+
+ This expression will be added to queries that refer to the table if
+ row-level security is enabled.
+
+
+ Rows for which the expression returns true will be visible. Any rows for
+ which the expression returns false or null will not be visible to the user
+ (in a SELECT), and will not be available for modification (in an UPDATE or
+ DELETE).
+
+
+ Such rows are silently suppressed - no error is reported.
+
+
+
+
@@ -87,29 +90,31 @@ const PolicyDefinition: FC = ({
-
-
-
-
- This expression will be used in INSERT and UPDATE queries against the table if
- row-level security is enabled.
-
-
- Only rows for which the expression evaluates to true will be allowed. An error
- will be thrown if the expression evaluates to false or null for any of the
- records inserted or any of the records that result from the update.
-
-
- Note that this expression is evaluated against the proposed new contents of
- the row, not the original contents.
-
-
-
+
+
+
+
+
+ This expression will be used in INSERT and UPDATE queries against the table
+ if row-level security is enabled.
+
+
+ Only rows for which the expression evaluates to true will be allowed. An
+ error will be thrown if the expression evaluates to false or null for any of
+ the records inserted or any of the records that result from the update.
+
+
+ Note that this expression is evaluated against the proposed new contents of
+ the row, not the original contents.
+
+
+
+
diff --git a/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx b/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx
index b3a00e0d638..41518f2742e 100644
--- a/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx
+++ b/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx
@@ -82,19 +82,21 @@ const PolicyRow: FC = ({
/>
{!canUpdatePolicies && (
-
-
-
-
- You need additional permissions to edit RLS policies
-
-
-
+
+
+
+
+
+ You need additional permissions to edit RLS policies
+
+
+
+
)}
)}
diff --git a/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRowHeader.tsx b/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRowHeader.tsx
index 82cfd727e02..b081c241095 100644
--- a/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRowHeader.tsx
+++ b/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRowHeader.tsx
@@ -52,19 +52,21 @@ const PolicyTableRowHeader: FC = ({
{!canCreatePolicies && (
-
-
-
-
- You need additional permissions to create RLS policies
-
-
-
+
+
+
+
+
+ You need additional permissions to create RLS policies
+
+
+
+
)}
@@ -78,19 +80,21 @@ const PolicyTableRowHeader: FC = ({
{!canToggleRLS && (
-
-
-
-
- You need additional permissions to toggle RLS
-
-
-
+
+
+
+
+
+ You need additional permissions to toggle RLS
+
+
+
+
)}
diff --git a/studio/components/interfaces/Auth/RedirectDomains/RedirectDomains.tsx b/studio/components/interfaces/Auth/RedirectDomains/RedirectDomains.tsx
index 14354efddd0..ea58410a4b8 100644
--- a/studio/components/interfaces/Auth/RedirectDomains/RedirectDomains.tsx
+++ b/studio/components/interfaces/Auth/RedirectDomains/RedirectDomains.tsx
@@ -97,19 +97,21 @@ const RedirectDomains = () => {
{!canUpdateConfig && (
-
-
-
-
- You need additional permissions to update redirect URLs
-
-
-
+
+
+
+
+
+ You need additional permissions to update redirect URLs
+
+
+
+
)}
diff --git a/studio/components/interfaces/Auth/Users/InviteUserModal.tsx b/studio/components/interfaces/Auth/Users/InviteUserModal.tsx
index 5f5898714cf..f91f17ef58c 100644
--- a/studio/components/interfaces/Auth/Users/InviteUserModal.tsx
+++ b/studio/components/interfaces/Auth/Users/InviteUserModal.tsx
@@ -63,19 +63,21 @@ const InviteUserModal = () => {
{!canInviteUsers && (
-
-
-
-
- You need additional permissions to invite users
-
-
-
+
+
+
+
+
+ You need additional permissions to invite users
+
+
+
+
)}
= ({ user, canRemoveUser, canRemoveMFAFactors }) =
need to double check with KM / anyone familiar with ABAC
*/}
{!canRemoveMFAFactors && (
-
-
-
-
- You need additional permissions to remove a user's authentication factors.
-
-
-
+
+
+
+
+
+ You need additional permissions to remove a user's authentication factors.
+
+
+
+
)}
@@ -210,19 +212,21 @@ const UserDropdown: FC = ({ user, canRemoveUser, canRemoveMFAFactors }) =
{!canRemoveUser && (
-
-
-
-
- You need additional permissions to delete users
-
-
-
+
+
+
+
+
+ You need additional permissions to delete users
+
+
+
+
)}
>
diff --git a/studio/components/interfaces/Billing/InvoiceStatusBadge.tsx b/studio/components/interfaces/Billing/InvoiceStatusBadge.tsx
index d355b584fea..ecf6a931eef 100644
--- a/studio/components/interfaces/Billing/InvoiceStatusBadge.tsx
+++ b/studio/components/interfaces/Billing/InvoiceStatusBadge.tsx
@@ -48,41 +48,43 @@ const InvoiceStatusBadge: FC = ({ status }) => {
{statusMapping?.label || status}
-
-
-
- {[InvoiceStatus.OPEN, InvoiceStatus.UNCOLLECTIBLE].includes(status) && (
-
- We were not able to collect the money. Make sure you have a valid payment method and
- enough funds. Outstanding invoices may cause restrictions. You can manually pay the
- using the "Pay Now" button.
-
- )}
+
+
+
+
+ {[InvoiceStatus.OPEN, InvoiceStatus.UNCOLLECTIBLE].includes(status) && (
+
+ We were not able to collect the money. Make sure you have a valid payment method and
+ enough funds. Outstanding invoices may cause restrictions. You can manually pay the
+ using the "Pay Now" button.
+
+ )}
- {status === InvoiceStatus.DRAFT && (
-
- The invoice will soon be finalized and charged for.
-
- )}
+ {status === InvoiceStatus.DRAFT && (
+
+ The invoice will soon be finalized and charged for.
+
+ )}
- {status === InvoiceStatus.PAID && (
-
- The invoice has been paid successfully. No action is required on your side.
-
- )}
+ {status === InvoiceStatus.PAID && (
+
+ The invoice has been paid successfully. No action is required on your side.
+
+ )}
- {status === InvoiceStatus.VOID && (
-
- This invoice has been forgiven. No action is required on your side.
-
- )}
-
-
+ {status === InvoiceStatus.VOID && (
+
+ This invoice has been forgiven. No action is required on your side.
+
+ )}
+
+
+
)
}
diff --git a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx
index f45b945ca9d..0a3d3688a42 100644
--- a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx
+++ b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx
@@ -372,20 +372,22 @@ const PaymentSummaryPanel: FC = ({
{!canUpdatePaymentMethods && (
-
-
-
-
- You need additional permissions to add new payment methods to this
- organization
-
-
-
+
+
+
+
+
+ You need additional permissions to add new payment methods to this
+ organization
+
+
+
+
)}
@@ -448,31 +450,35 @@ const PaymentSummaryPanel: FC = ({
{!hasChangesToPlan ? (
-
-
-
-
- No changes made to your subscription
-
-
-
+
+
+
+
+
+ No changes made to your subscription
+
+
+
+
) : !selectedPaymentMethod ? (
-
-
-
- Please select a payment method
-
-
+
+
+
+
+ Please select a payment method
+
+
+
) : (
<>>
)}
diff --git a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentTotal.tsx b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentTotal.tsx
index 5a1b2e824a7..7979c53969e 100644
--- a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentTotal.tsx
+++ b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentTotal.tsx
@@ -54,17 +54,19 @@ const PaymentTotal: FC = ({
onClick={() => setShowCostBreakdown(true)}
/>
-
-
-
- How is this calculated?
-
-
+
+
+
+
+ How is this calculated?
+
+
+
)}
diff --git a/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx b/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx
index ca1595eaf6c..316265f8e2b 100644
--- a/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx
+++ b/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx
@@ -112,19 +112,23 @@ const PlanCTAButton: FC
= ({ plan, currentPlan, onSelectPlan }) => {
{!disabled && projectUpdateDisabled && (
-
-
-
-
- Subscription changes are currently disabled, our engineers are working on a fix
-
-
-
+
+
+
+
+
+
+ Subscription changes are currently disabled, our engineers are working on a fix
+
+
+
+
+
)}
diff --git a/studio/components/interfaces/Billing/SpendCapModal.tsx b/studio/components/interfaces/Billing/SpendCapModal.tsx
index 1b809b51ddb..fddf841e0dd 100644
--- a/studio/components/interfaces/Billing/SpendCapModal.tsx
+++ b/studio/components/interfaces/Billing/SpendCapModal.tsx
@@ -55,20 +55,24 @@ const SpendCapModal: FC = ({ visible, onHide }) => {
className="transition opacity-50 cursor-pointer hover:opacity-100"
/>
-
-
-
-
- Monthly Active Users: A user that has made an API request in the last
- month
-
-
-
+
+
+
+
+
+
+ Monthly Active Users: A user that has made an API request in the
+ last month
+
+
+
+
+
100,000
diff --git a/studio/components/interfaces/Billing/Subscription/Subscription.tsx b/studio/components/interfaces/Billing/Subscription/Subscription.tsx
index 4bf3bf8ad04..8dc90989675 100644
--- a/studio/components/interfaces/Billing/Subscription/Subscription.tsx
+++ b/studio/components/interfaces/Billing/Subscription/Subscription.tsx
@@ -97,29 +97,31 @@ const Subscription: FC
= ({
{!canUpdateSubscription || projectUpdateDisabled ? (
-
-
-
-
- {projectUpdateDisabled ? (
- <>
- Subscription changes are currently disabled.
-
- Our engineers are working on a fix.
- >
- ) : !canUpdateSubscription ? (
- 'You need additional permissions to amend subscriptions'
- ) : (
- ''
- )}
-
-
-
+
+
+
+
+
+ {projectUpdateDisabled ? (
+ <>
+ Subscription changes are currently disabled.
+
+ Our engineers are working on a fix.
+ >
+ ) : !canUpdateSubscription ? (
+ 'You need additional permissions to amend subscriptions'
+ ) : (
+ ''
+ )}
+
+
+
+
) : (
<>>
)}
diff --git a/studio/components/interfaces/Database/Backups/PITR/PITRNotice.tsx b/studio/components/interfaces/Database/Backups/PITR/PITRNotice.tsx
index daab4106406..fecbf2eafd1 100644
--- a/studio/components/interfaces/Database/Backups/PITR/PITRNotice.tsx
+++ b/studio/components/interfaces/Database/Backups/PITR/PITRNotice.tsx
@@ -34,19 +34,21 @@ const PITRNotice = ({}) => {
{!canUpdateSubscription && (
-
-
-
-
- You need additional permissions to amend subscriptions
-
-
-
+
+
+
+
+
+ You need additional permissions to amend subscriptions
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx b/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx
index 6ed84243dd2..bba2f68b3f4 100644
--- a/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx
+++ b/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx
@@ -192,19 +192,21 @@ const PITRSelection = ({}) => {
{isSelectedOutOfRange && (
-
-
-
-
- Selected date is out of range where backups are available
-
-
-
+
+
+
+
+
+ Selected date is out of range where backups are available
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Backups/PITR/PITRStatus.tsx b/studio/components/interfaces/Database/Backups/PITR/PITRStatus.tsx
index b634e1365c7..86983a22ba6 100644
--- a/studio/components/interfaces/Database/Backups/PITR/PITRStatus.tsx
+++ b/studio/components/interfaces/Database/Backups/PITR/PITRStatus.tsx
@@ -55,19 +55,21 @@ const PITRStatus: FC
= ({ selectedTimezone, onUpdateTimezone, onSetConfig
{!canTriggerPhysicalBackup && (
-
-
-
-
- You need additional permissions to trigger a PITR recovery
-
-
-
+
+
+
+
+
+ You need additional permissions to trigger a PITR recovery
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Backups/PITR/TimeInput.tsx b/studio/components/interfaces/Database/Backups/PITR/TimeInput.tsx
index 3b1d4689e74..90b2b7e6032 100644
--- a/studio/components/interfaces/Database/Backups/PITR/TimeInput.tsx
+++ b/studio/components/interfaces/Database/Backups/PITR/TimeInput.tsx
@@ -110,17 +110,19 @@ const TimeInput: FC = ({ defaultTime, minimumTime, maximumTime, onChange
className="w-full text-sm bg-transparent p-0 text-center outline-none border-none focus:ring-0"
/>
-
-
-
- Hours (HH)
-
-
+
+
+
+
+ Hours (HH)
+
+
+
:
@@ -138,17 +140,19 @@ const TimeInput: FC = ({ defaultTime, minimumTime, maximumTime, onChange
className="w-full text-sm bg-transparent p-0 text-center outline-none border-none focus:ring-0"
/>
-
-
-
- Minutes (MM)
-
-
+
+
+
+
+ Minutes (MM)
+
+
+
:
@@ -166,17 +170,19 @@ const TimeInput: FC = ({ defaultTime, minimumTime, maximumTime, onChange
className="w-full text-sm bg-transparent p-0 text-center outline-none border-none focus:ring-0"
/>
-
-
-
- Seconds (SS)
-
-
+
+
+
+
+ Seconds (SS)
+
+
+
{error && {error}
}
diff --git a/studio/components/interfaces/Database/Functions/FunctionsList/FunctionList.tsx b/studio/components/interfaces/Database/Functions/FunctionsList/FunctionList.tsx
index a4d9cdc8423..6987deebd2d 100644
--- a/studio/components/interfaces/Database/Functions/FunctionsList/FunctionList.tsx
+++ b/studio/components/interfaces/Database/Functions/FunctionsList/FunctionList.tsx
@@ -89,19 +89,21 @@ const FunctionList: FC = ({
} />
-
-
-
-
- You need additional permissions to update functions
-
-
-
+
+
+
+
+
+ You need additional permissions to update functions
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Functions/FunctionsList/FunctionsList.tsx b/studio/components/interfaces/Database/Functions/FunctionsList/FunctionsList.tsx
index df69111db50..d9036ab8fa6 100644
--- a/studio/components/interfaces/Database/Functions/FunctionsList/FunctionsList.tsx
+++ b/studio/components/interfaces/Database/Functions/FunctionsList/FunctionsList.tsx
@@ -90,19 +90,23 @@ const FunctionsList: FC
= ({
{!canCreateFunctions && (
-
-
-
-
- You need additional permissions to create functions
-
-
-
+
+
+
+
+
+
+ You need additional permissions to create functions
+
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx b/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx
index 62b75c07cf0..c7155b818e4 100644
--- a/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx
+++ b/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx
@@ -90,19 +90,21 @@ const HookList: FC = ({
} />
-
-
-
-
- You need additional permissions to update webhooks
-
-
-
+
+
+
+
+
+ You need additional permissions to update webhooks
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx b/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx
index e1274b1b097..bd87e81dd5c 100644
--- a/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx
+++ b/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx
@@ -107,19 +107,21 @@ const HooksList = ({
{!canCreateWebhooks && (
-
-
-
-
- You need additional permissions to create webhooks
-
-
-
+
+
+
+
+
+ You need additional permissions to create webhooks
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Roles/RoleRow.tsx b/studio/components/interfaces/Database/Roles/RoleRow.tsx
index d8fcecb0c93..50c7702c4eb 100644
--- a/studio/components/interfaces/Database/Roles/RoleRow.tsx
+++ b/studio/components/interfaces/Database/Roles/RoleRow.tsx
@@ -184,19 +184,21 @@ const RoleRow: FC = ({ role, disabled = false, onSelectDelete }) => {
className="ml-2 relative top-[3px]"
/>
-
-
-
-
- This privilege cannot be updated via the dashboard
-
-
-
+
+
+
+
+
+ This privilege cannot be updated via the dashboard
+
+
+
+
)
}
diff --git a/studio/components/interfaces/Database/Tables/ColumnList.tsx b/studio/components/interfaces/Database/Tables/ColumnList.tsx
index e53ed442863..447e4a82750 100644
--- a/studio/components/interfaces/Database/Tables/ColumnList.tsx
+++ b/studio/components/interfaces/Database/Tables/ColumnList.tsx
@@ -72,19 +72,21 @@ const ColumnList: FC = ({
{!canUpdateColumns && (
-
-
-
-
- You need additional permissions to create columns
-
-
-
+
+
+
+
+
+ You need additional permissions to create columns
+
+
+
+
)}
@@ -140,19 +142,21 @@ const ColumnList: FC
= ({
/>
{!canUpdateColumns && (
-
-
-
-
- You need additional permissions to edit columns
-
-
-
+
+
+
+
+
+ You need additional permissions to edit columns
+
+
+
+
)}
@@ -167,19 +171,21 @@ const ColumnList: FC = ({
/>
{!canUpdateColumns && (
-
-
-
-
- You need additional permissions to delete columns
-
-
-
+
+
+
+
+
+ You need additional permissions to delete columns
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Tables/TableList.tsx b/studio/components/interfaces/Database/Tables/TableList.tsx
index 78381601079..bfb97d7e2ac 100644
--- a/studio/components/interfaces/Database/Tables/TableList.tsx
+++ b/studio/components/interfaces/Database/Tables/TableList.tsx
@@ -134,19 +134,21 @@ const TableList: FC = ({
{!canUpdateTables && (
-
-
-
-
- You need additional permissions to create tables
-
-
-
+
+
+
+
+
+ You need additional permissions to create tables
+
+
+
+
)}
@@ -228,19 +230,21 @@ const TableList: FC = ({
/>
{!canUpdateTables && (
-
-
-
-
- You need additional permissions to edit tables
-
-
-
+
+
+
+
+
+ You need additional permissions to edit tables
+
+
+
+
)}
@@ -255,19 +259,21 @@ const TableList: FC = ({
/>
{!canUpdateTables && (
-
-
-
-
- You need additional permissions to delete tables
-
-
-
+
+
+
+
+
+ You need additional permissions to delete tables
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx b/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx
index f4411eff581..f459c145aa0 100644
--- a/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx
+++ b/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx
@@ -82,19 +82,21 @@ const TriggerList: FC = ({ filterString, schema, editTrigger, deleteTrigg
} />
-
-
-
-
- You need additional permissions to update triggers
-
-
-
+
+
+
+
+
+ You need additional permissions to update triggers
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx b/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
index 2bb4b194b49..75fa2be96dc 100644
--- a/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
+++ b/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
@@ -80,19 +80,21 @@ const TriggersList: FC = ({
{!canCreateTriggers && (
-
-
-
-
- You need additional permissions to create triggers
-
-
-
+
+
+
+
+
+ You need additional permissions to create triggers
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Wrappers/WrapperRow.tsx b/studio/components/interfaces/Database/Wrappers/WrapperRow.tsx
index 896cd11d45e..9628bde820c 100644
--- a/studio/components/interfaces/Database/Wrappers/WrapperRow.tsx
+++ b/studio/components/interfaces/Database/Wrappers/WrapperRow.tsx
@@ -181,19 +181,21 @@ const WrapperRow: FC = ({ wrappers = [], wrapperMeta, isOpen, onOpen }) =
/>
{!canManageWrappers && (
-
-
-
-
- You need additional permissions to edit wrappers
-
-
-
+
+
+
+
+
+ You need additional permissions to edit wrappers
+
+
+
+
)}
)}
@@ -208,19 +210,21 @@ const WrapperRow: FC = ({ wrappers = [], wrapperMeta, isOpen, onOpen }) =
/>
{!canManageWrappers && (
-
-
-
-
- You need additional permissions to add wrappers
-
-
-
+
+
+
+
+
+ You need additional permissions to add wrappers
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx b/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx
index d80ab7d57c5..07ce73df7b4 100644
--- a/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx
+++ b/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx
@@ -131,19 +131,21 @@ const WrappersDisabledState = () => {
{!canToggleWrappers && (
-
-
-
-
- You need additional permissions to enable Wrappers for this project
-
-
-
+
+
+
+
+
+ You need additional permissions to enable Wrappers for this project
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Wrappers/WrappersDropdown.tsx b/studio/components/interfaces/Database/Wrappers/WrappersDropdown.tsx
index 76a5ce5b6b4..ba76b237de1 100644
--- a/studio/components/interfaces/Database/Wrappers/WrappersDropdown.tsx
+++ b/studio/components/interfaces/Database/Wrappers/WrappersDropdown.tsx
@@ -26,19 +26,21 @@ const WrapperDropdown: FC = ({ buttonText = 'Add wrapper', align = 'end'
{buttonText}
-
-
-
-
- You need additional permissions to add wrappers
-
-
-
+
+
+
+
+
+ You need additional permissions to add wrappers
+
+
+
+
)
}
diff --git a/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx b/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx
index af520a18d31..1da604d200e 100644
--- a/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx
+++ b/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx
@@ -276,19 +276,21 @@ const EdgeFunctionDetails: FC = () => {
{!canUpdateEdgeFunction && (
-
-
-
-
- You need additional permissions to delete an edge function
-
-
-
+
+
+
+
+
+ You need additional permissions to delete an edge function
+
+
+
+
)}
diff --git a/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx b/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
index bb1b1f86edd..2c4c666e417 100644
--- a/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
+++ b/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
@@ -78,19 +78,21 @@ const EdgeFunctionsListItem: FC = ({ function: item }) => {
{dayjs(item.updated_at).fromNow()}
-
-
-
-
- Last updated on {dayjs(item.updated_at).format('DD MMM, YYYY HH:mm')}
-
-
-
+
+
+
+
+
+ Last updated on {dayjs(item.updated_at).format('DD MMM, YYYY HH:mm')}
+
+
+
+
diff --git a/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx b/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx
index 2e22372256a..9963a537053 100644
--- a/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx
+++ b/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx
@@ -187,19 +187,21 @@ const PaymentMethods: FC = ({
} />
-
-
-
-
- Your default payment method cannot be deleted
-
-
-
+
+
+
+
+
+ Your default payment method cannot be deleted
+
+
+
+
) : (
{!canInviteMembers && (
-
-
-
-
- You need additional permissions to invite a member to this organization
-
-
-
+
+
+
+
+
+ You need additional permissions to invite a member to this organization
+
+
+
+
)}
= ({ member, roles }) => {
} />
-
-
-
-
- You need additional permissions to manage this team member
-
-
-
+
+
+
+
+
+ You need additional permissions to manage this team member
+
+
+
+
)
diff --git a/studio/components/interfaces/Organization/TeamSettings/MembersView.tsx b/studio/components/interfaces/Organization/TeamSettings/MembersView.tsx
index 7958d26f3f7..ffbb54d6f65 100644
--- a/studio/components/interfaces/Organization/TeamSettings/MembersView.tsx
+++ b/studio/components/interfaces/Organization/TeamSettings/MembersView.tsx
@@ -214,33 +214,38 @@ const MembersView = ({ searchString }: MembersViewProps) => {
{memberIsPendingInvite ? (
-
-
-
-
- Role can only be changed after the user has accepted the invite
-
-
-
+
+
+
+
+
+ Role can only be changed after the user has accepted the
+ invite
+
+
+
+
) : !memberIsUser && !canRemoveRole ? (
-
-
-
-
- You need additional permissions to manage this team member
-
-
-
+
+
+
+
+
+ You need additional permissions to manage this team member
+
+
+
+
) : (
<>>
)}
@@ -252,20 +257,22 @@ const MembersView = ({ searchString }: MembersViewProps) => {
-
-
-
-
- This user has an invalid role, please reach out to us via
- support
-
-
-
+
+
+
+
+
+ This user has an invalid role, please reach out to us via
+ support
+
+
+
+
)}
diff --git a/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.tsx b/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.tsx
index 6c322bf60f3..9f08f55e877 100644
--- a/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.tsx
+++ b/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.tsx
@@ -17,17 +17,19 @@ const RolesHelperModal: FC = ({}) => {
-
-
-
- Only available in Team/Enterprise plan.
-
-
+
+
+
+
+ Only available in Team/Enterprise plan.
+
+
+
)
diff --git a/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx b/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx
index fe2a3ae0e24..42140783088 100644
--- a/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx
+++ b/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx
@@ -97,19 +97,21 @@ const TeamSettings = () => {
{!canLeave && (
-
-
-
-
- An organization requires at least 1 owner
-
-
-
+
+
+
+
+
+ An organization requires at least 1 owner
+
+
+
+
)}
diff --git a/studio/components/interfaces/Reports/ReportWidget.tsx b/studio/components/interfaces/Reports/ReportWidget.tsx
index 72e51182525..def9096eb2e 100644
--- a/studio/components/interfaces/Reports/ReportWidget.tsx
+++ b/studio/components/interfaces/Reports/ReportWidget.tsx
@@ -46,17 +46,19 @@ const ReportWidget: React.FC = (props) => {
-
-
-
- {props.tooltip}
-
-
+
+
+
+
+ {props.tooltip}
+
+
+
)}
@@ -80,17 +82,19 @@ const ReportWidget: React.FC = (props) => {
}}
/>
-
-
-
- Open in Logs Explorer
-
-
+
+
+
+
+ Open in Logs Explorer
+
+
+
diff --git a/studio/components/interfaces/Reports/Reports.tsx b/studio/components/interfaces/Reports/Reports.tsx
index ec43b8041ec..38470af3c10 100644
--- a/studio/components/interfaces/Reports/Reports.tsx
+++ b/studio/components/interfaces/Reports/Reports.tsx
@@ -360,19 +360,21 @@ const Reports = () => {
Add / Remove charts
-
-
-
-
- You need additional permissions to update this project's report
-
-
-
+
+
+
+
+
+ You need additional permissions to update this project's report
+
+
+
+
)}
diff --git a/studio/components/interfaces/SQLEditor/TabSqlQuery/FavouriteButton.tsx b/studio/components/interfaces/SQLEditor/TabSqlQuery/FavouriteButton.tsx
index 59cd87f4141..eb9389602fc 100644
--- a/studio/components/interfaces/SQLEditor/TabSqlQuery/FavouriteButton.tsx
+++ b/studio/components/interfaces/SQLEditor/TabSqlQuery/FavouriteButton.tsx
@@ -112,20 +112,22 @@ const FavouriteButton = () => {
return (
<>
-
-
-
-
- {isFavorite ? 'Remove' : 'Add'} this query {isFavorite ? 'from' : 'to'} your
- Favourites
-
-
-
+
+
+
+
+
+ {isFavorite ? 'Remove' : 'Add'} this query {isFavorite ? 'from' : 'to'} your
+ Favourites
+
+
+
+
= ({ updateSqlSnippet }) => {
-
-
-
- Saving changes...
-
-
+
+
+
+
+ Saving changes...
+
+
+
)}
{(content.savingState === 'CREATING_FAILED' || content.savingState === 'UPDATING_FAILED') && (
@@ -85,17 +87,19 @@ const SavingIndicator: FC = ({ updateSqlSnippet }) => {
-
-
-
- All changes saved
-
-
+
+
+
+
+ All changes saved
+
+
+
)}
diff --git a/studio/components/interfaces/SQLEditor/TabSqlQuery/UtilityActions.tsx b/studio/components/interfaces/SQLEditor/TabSqlQuery/UtilityActions.tsx
index fa06f309151..af809c2676a 100644
--- a/studio/components/interfaces/SQLEditor/TabSqlQuery/UtilityActions.tsx
+++ b/studio/components/interfaces/SQLEditor/TabSqlQuery/UtilityActions.tsx
@@ -46,19 +46,21 @@ const UtilityActions = ({ updateSqlSnippet }: UtilityActionsProps) => {
-
-
-
-
- Queries are not saved as you do not have sufficient permissions
-
-
-
+
+
+
+
+
+ Queries are not saved as you do not have sufficient permissions
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/API/JWTSettings.tsx b/studio/components/interfaces/Settings/API/JWTSettings.tsx
index f05341b37cf..8a0c66ed22a 100644
--- a/studio/components/interfaces/Settings/API/JWTSettings.tsx
+++ b/studio/components/interfaces/Settings/API/JWTSettings.tsx
@@ -165,19 +165,21 @@ const JWTSettings: FC = ({}) => {
Generate a new secret
-
-
-
-
- You need additional permissions to generate a new JWT secret
-
-
-
+
+
+
+
+
+ You need additional permissions to generate a new JWT secret
+
+
+
+
) : (
= ({ disabled = false }) => {
{!canResetDbPassword && (
-
-
-
-
- You need additional permissions to reset the database password
-
-
-
+
+
+
+
+
+ You need additional permissions to reset the database password
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx b/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx
index c2cfd9755f4..b79d99fa3c6 100644
--- a/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx
+++ b/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx
@@ -154,22 +154,24 @@ const AddRestrictionModal: FC = ({
-
-
-
-
- Classless inter-domain routing (CIDR) notation is the notation
- used to identify networks and hosts in the networks. The block
- size tells us how many bits we need to take for the network
- prefix, and is a value between 0 to 32.
-
-
-
+
+
+
+
+
+ Classless inter-domain routing (CIDR) notation is the notation
+ used to identify networks and hosts in the networks. The block
+ size tells us how many bits we need to take for the network
+ prefix, and is a value between 0 to 32.
+
+
+
+
}
diff --git a/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx b/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx
index b3c47c59119..7f09507c99c 100644
--- a/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx
+++ b/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx
@@ -25,19 +25,21 @@ const AllowAllAccessButton: FC<{ disabled: boolean; onClick: (value: boolean) =>
{disabled && (
-
-
-
-
- You need additional permissions to update network restrictions
-
-
-
+
+
+
+
+
+ You need additional permissions to update network restrictions
+
+
+
+
)}
)
@@ -53,19 +55,21 @@ const DisallowAllAccessButton: FC<{ disabled: boolean; onClick: (value: boolean)
{disabled && (
-
-
-
-
- You need additional permissions to update network restrictions
-
-
-
+
+
+
+
+
+ You need additional permissions to update network restrictions
+
+
+
+
)}
)
@@ -118,19 +122,21 @@ const NetworkRestrictions = ({}) => {
{!canUpdateNetworkRestrictions && (
-
-
-
-
- You need additional permissions to update network restrictions
-
-
-
+
+
+
+
+
+ You need additional permissions to update network restrictions
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx b/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx
index 9f1f8596905..92e146e911e 100644
--- a/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx
+++ b/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx
@@ -152,20 +152,22 @@ const SSLConfiguration = () => {
{!hasSSLCertificate && (
-
-
-
-
- Projects before 15:08 (GMT+08), 29th April 2021 do not have SSL certificates
- installed
-
-
-
+
+
+
+
+
+ Projects before 15:08 (GMT+08), 29th April 2021 do not have SSL certificates
+ installed
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
index a316a3b1bf6..7a80c2d4b9f 100644
--- a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
+++ b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
@@ -81,9 +81,9 @@ const DeleteProjectButton: FC = ({ type = 'danger' }) => {
if (!isFree) {
const feedbackRes = await post(`${API_URL}/feedback/downgrade`, {
projectRef,
- reasons: selectedReasons.reduce((a, b) => `${a}- ${b}\n`, ''),
- additionalFeedback: cancellationMessage,
- exitAction: 'delete',
+ reasons: selectedReasons.reduce((a, b) => `${a}- ${b}\n`, ''),
+ additionalFeedback: cancellationMessage,
+ exitAction: 'delete',
})
if (feedbackRes.error) throw feedbackRes.error
}
@@ -98,19 +98,21 @@ const DeleteProjectButton: FC = ({ type = 'danger' }) => {
{!canDeleteProject && (
-
-
-
-
- You need additional permissions to delete this project
-
-
-
+
+
+
+
+
+ You need additional permissions to delete this project
+
+
+
+
)}
= ({}) => {
Latest
-
-
-
-
- Project is on the latest version of Postgres that Supabase supports
-
-
-
+
+
+
+
+
+ Project is on the latest version of Postgres that Supabase supports
+
+
+
+
),
]}
diff --git a/studio/components/interfaces/Settings/General/Infrastructure/PauseProjectButton.tsx b/studio/components/interfaces/Settings/General/Infrastructure/PauseProjectButton.tsx
index 9c198671b9e..449c6f1fb13 100644
--- a/studio/components/interfaces/Settings/General/Infrastructure/PauseProjectButton.tsx
+++ b/studio/components/interfaces/Settings/General/Infrastructure/PauseProjectButton.tsx
@@ -73,31 +73,35 @@ const PauseProjectButton: FC = observer(({ projectRef, projectId }) => {
{isPaused ? (
-
-
-
- Your project is already paused
-
-
+
+
+
+
+ Your project is already paused
+
+
+
) : !canPauseProject ? (
-
-
-
-
- You need additional permissions to pause this project
-
-
-
+
+
+
+
+
+ You need additional permissions to pause this project
+
+
+
+
) : (
<>>
)}
diff --git a/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx b/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
index adbc60926ea..8099afc7b63 100644
--- a/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
+++ b/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
@@ -122,19 +122,21 @@ const RestartServerButton: FC = ({ project }) => {
{!canRestartProject && (
-
-
-
-
- You need additional permissions to restart this project
-
-
-
+
+
+
+
+
+ You need additional permissions to restart this project
+
+
+
+
)}
{!canCreateLogQuery && (
-
-
-
-
- You need additional permissions to save your query
-
-
-
+
+
+
+
+
+ You need additional permissions to save your query
+
+
+
+
)}
)}
diff --git a/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx b/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx
index b91e9c99bb9..13e24dcc18c 100644
--- a/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx
+++ b/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx
@@ -263,21 +263,23 @@ const ProjectUsage: FC = ({ projectRef }) => {
-
-
-
-
- {feature.tooltip}
-
-
-
+
+
+
+
+
+ {feature.tooltip}
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Vault/Keys/EncryptionKeysManagement.tsx b/studio/components/interfaces/Settings/Vault/Keys/EncryptionKeysManagement.tsx
index 63cac0d9820..6010ec432ca 100644
--- a/studio/components/interfaces/Settings/Vault/Keys/EncryptionKeysManagement.tsx
+++ b/studio/components/interfaces/Settings/Vault/Keys/EncryptionKeysManagement.tsx
@@ -157,19 +157,21 @@ const EncryptionKeysManagement: FC = ({}) => {
{!canManageKeys && (
-
-
-
-
- You need additional permissions to add keys
-
-
-
+
+
+
+
+
+ You need additional permissions to add keys
+
+
+
+
)}
@@ -215,19 +217,21 @@ const EncryptionKeysManagement: FC = ({}) => {
/>
{!canManageKeys && (
-
-
-
-
- You need additional permissions to delete keys
-
-
-
+
+
+
+
+
+ You need additional permissions to delete keys
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Vault/Secrets/SecretRow.tsx b/studio/components/interfaces/Settings/Vault/Secrets/SecretRow.tsx
index c3c08a02e92..9ff849dd7ae 100644
--- a/studio/components/interfaces/Settings/Vault/Secrets/SecretRow.tsx
+++ b/studio/components/interfaces/Settings/Vault/Secrets/SecretRow.tsx
@@ -121,19 +121,21 @@ const SecretRow: FC = ({ secret, onSelectEdit, onSelectRemove }) => {
{!canManageSecrets && (
-
-
-
-
- You need additional permissions to edit secrets
-
-
-
+
+
+
+
+
+ You need additional permissions to edit secrets
+
+
+
+
)}
@@ -147,19 +149,21 @@ const SecretRow: FC = ({ secret, onSelectEdit, onSelectRemove }) => {
{!canManageSecrets && (
-
-
-
-
- You need additional permissions to delete secrets
-
-
-
+
+
+
+
+
+ You need additional permissions to delete secrets
+
+
+
+
)}
>
diff --git a/studio/components/interfaces/Settings/Vault/Secrets/SecretsManagement.tsx b/studio/components/interfaces/Settings/Vault/Secrets/SecretsManagement.tsx
index 05ca9c5d11c..b3adab646d4 100644
--- a/studio/components/interfaces/Settings/Vault/Secrets/SecretsManagement.tsx
+++ b/studio/components/interfaces/Settings/Vault/Secrets/SecretsManagement.tsx
@@ -120,19 +120,21 @@ const SecretsManagement: FC = ({}) => {
{!canManageSecrets && (
-
-
-
-
- You need additional permissions to add secrets
-
-
-
+
+
+
+
+
+ You need additional permissions to add secrets
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Vault/VaultToggle.tsx b/studio/components/interfaces/Settings/Vault/VaultToggle.tsx
index 4f7c679b2ba..f03f88633c7 100644
--- a/studio/components/interfaces/Settings/Vault/VaultToggle.tsx
+++ b/studio/components/interfaces/Settings/Vault/VaultToggle.tsx
@@ -128,19 +128,21 @@ const VaultToggle: FC = () => {
{!canToggleVault && (
-
-
-
-
- You need additional permissions to enable Vault for this project
-
-
-
+
+
+
+
+
+ You need additional permissions to enable Vault for this project
+
+
+
+
)}
diff --git a/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx b/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx
index 739df8e8d54..543b78c669c 100644
--- a/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx
+++ b/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx
@@ -55,19 +55,21 @@ const GridHeaderActions: FC = ({
Viewing as read-only
-
-
-
-
- You need additional permissions to manage your project's data
-
-
-
+
+
+
+
+
+ You need additional permissions to manage your project's data
+
+
+
+
)}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx
index 59da15bb67b..af4232ea154 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx
@@ -112,19 +112,21 @@ const InputWithSuggestions: FC
= ({
icon={ }
/>
-
-
-
-
- {suggestionsTooltip || 'Suggestions'}
-
-
-
+
+
+
+
+
+ {suggestionsTooltip || 'Suggestions'}
+
+
+
+
)
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx
index 916a162106b..1e5a32085d2 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx
@@ -33,20 +33,22 @@ export const generateDeletionActionDescription = (deletionAction: string, refere
-
-
-
-
- This is similar to no action, but the restrict check cannot be deferred till later
- in the transaction
-
-
-
+
+
+
+
+
+ This is similar to no action, but the restrict check cannot be deferred till
+ later in the transaction
+
+
+
+
: Deleting a record from {reference} will{' '}
prevent deletion of existing
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/SelectorGrid.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/SelectorGrid.tsx
index f57ba551d13..a77e38a9039 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/SelectorGrid.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/SelectorGrid.tsx
@@ -24,12 +24,14 @@ const columnRender = (name: string, isPrimaryKey = false) => {
-
-
-
- Primary key
-
-
+
+
+
+
+ Primary key
+
+
+
)}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
index 1305a22b45f..a7103481951 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
@@ -102,39 +102,42 @@ const Column: FC = ({
-
-
-
- {column.foreignKey === undefined ? (
-
Edit foreign key relation
- ) : (
-
-
Foreign key relation:
-
-
- {column.foreignKey.source_schema}.{column.foreignKey.source_table_name}.
- {column.foreignKey.source_column_name}
-
-
-
- {column.foreignKey.target_table_schema}.{column.foreignKey.target_table_name}.
- {column.foreignKey.target_column_name}
-
+
+
+
+
+ {column.foreignKey === undefined ? (
+
Edit foreign key relation
+ ) : (
+
+
Foreign key relation:
+
+
+ {column.foreignKey.source_schema}.{column.foreignKey.source_table_name}.
+ {column.foreignKey.source_column_name}
+
+
+
+ {column.foreignKey.target_table_schema}.
+ {column.foreignKey.target_table_name}.{column.foreignKey.target_column_name}
+
+
+ {column.foreignKey.deletion_action !==
+ FOREIGN_KEY_DELETION_ACTION.NO_ACTION && (
+
+ On delete: {getForeignKeyDeletionAction(column.foreignKey.deletion_action)}
+
+ )}
- {column.foreignKey.deletion_action !== FOREIGN_KEY_DELETION_ACTION.NO_ACTION && (
-
- On delete: {getForeignKeyDeletionAction(column.foreignKey.deletion_action)}
-
- )}
-
- )}
-
-
+ )}
+
+
+
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
index cf9b0c06f10..d01b213b3ab 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
@@ -202,20 +202,22 @@ const ColumnManagement: FC
= ({
-
-
-
-
- Recommended to use lowercase and use an underscore to separate words e.g.
- column_name
-
-
-
+
+
+
+
+
+ Recommended to use lowercase and use an underscore to separate words e.g.
+ column_name
+
+
+
+
@@ -230,19 +232,21 @@ const ColumnManagement: FC
= ({
-
-
-
-
- Can be either a value or a SQL expression
-
-
-
+
+
+
+
+
+ Can be either a value or a SQL expression
+
+
+
+
diff --git a/studio/components/layouts/ProjectLayout/LayoutHeader/NotificationsPopover/NotificationRow.tsx b/studio/components/layouts/ProjectLayout/LayoutHeader/NotificationsPopover/NotificationRow.tsx
index 450722f5a8c..0b3fe098097 100644
--- a/studio/components/layouts/ProjectLayout/LayoutHeader/NotificationsPopover/NotificationRow.tsx
+++ b/studio/components/layouts/ProjectLayout/LayoutHeader/NotificationsPopover/NotificationRow.tsx
@@ -97,17 +97,19 @@ const NotificationRow: FC
= ({
onClick={() => dismissNotification(notification.id)}
/>
-
-
-
- Dismiss
-
-
+
+
+
+
+ Dismiss
+
+
+
diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconButton.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconButton.tsx
index e1d751dd6b4..078addfffa2 100644
--- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconButton.tsx
+++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconButton.tsx
@@ -31,17 +31,19 @@ const NavigationIconButton: FC = ({ route, isActive = false }) => {
-
-
-
- {route.label}
-
-
+
+
+
+
+ {route.label}
+
+
+
)
}
diff --git a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
index 8181045826d..0733a2fbc81 100644
--- a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
+++ b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
@@ -72,19 +72,21 @@ const ProjectPausedState: FC = ({ project }) => {
{!canResumeProject && (
-
-
-
-
- You need additional permissions to resume this project
-
-
-
+
+
+
+
+
+ You need additional permissions to resume this project
+
+
+
+
)}
diff --git a/studio/components/layouts/ProjectLayout/UpgradingState/UpgradingState.tsx b/studio/components/layouts/ProjectLayout/UpgradingState/UpgradingState.tsx
index ddee8e564a7..648f86df5de 100644
--- a/studio/components/layouts/ProjectLayout/UpgradingState/UpgradingState.tsx
+++ b/studio/components/layouts/ProjectLayout/UpgradingState/UpgradingState.tsx
@@ -197,17 +197,19 @@ const UpgradingState = () => {
Started on: {initiatedAtUTC} (UTC)
-
-
-
- {initiatedAt}
-
-
+
+
+
+
+ {initiatedAt}
+
+
+
)}
diff --git a/studio/components/layouts/StorageLayout/StorageMenu.tsx b/studio/components/layouts/StorageLayout/StorageMenu.tsx
index 1d2a88de2fd..be1575b9caa 100644
--- a/studio/components/layouts/StorageLayout/StorageMenu.tsx
+++ b/studio/components/layouts/StorageLayout/StorageMenu.tsx
@@ -54,19 +54,21 @@ const StorageMenu: FC = () => {
{!canCreateBuckets && (
-
-
-
-
- You need additional permissions to create buckets
-
-
-
+
+
+
+
+
+ You need additional permissions to create buckets
+
+
+
+
)}
diff --git a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
index 088984868c0..4a4f5d7d7e7 100644
--- a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
+++ b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
@@ -176,19 +176,21 @@ const TableEditorMenu = ({
{!canCreateTables && (
-
-
-
-
- You need additional permissions to create tables
-
-
-
+
+
+
+
+
+ You need additional permissions to create tables
+
+
+
+
)}
diff --git a/studio/components/to-be-cleaned/ProductEmptyState.tsx b/studio/components/to-be-cleaned/ProductEmptyState.tsx
index 304e3ffd4d3..0c22a898885 100644
--- a/studio/components/to-be-cleaned/ProductEmptyState.tsx
+++ b/studio/components/to-be-cleaned/ProductEmptyState.tsx
@@ -45,17 +45,19 @@ const ProductEmptyState: FC = ({
{disabled && disabledMessage.length > 0 && (
-
-
-
- {disabledMessage}
-
-
+
+
+
+
+ {disabledMessage}
+
+
+
)}
)}
diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.tsx b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.tsx
index d3b10ab5108..cf250949884 100644
--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.tsx
+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.tsx
@@ -409,19 +409,21 @@ const FileExplorerHeader: FC = ({
{!canUpdateStorage && (
-
-
-
-
- You need additional permissions to upload files
-
-
-
+
+
+
+
+
+ You need additional permissions to upload files
+
+
+
+
)}
@@ -436,19 +438,21 @@ const FileExplorerHeader: FC = ({
{!canUpdateStorage && (
-
-
-
-
- You need additional permissions to create folders
-
-
-
+
+
+
+
+
+ You need additional permissions to create folders
+
+
+
+
)}
diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx
index 2b80cbabb77..be84f2c6a88 100644
--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx
+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx
@@ -404,19 +404,21 @@ const FileExplorerRow: FC = ({
-
-
-
-
- File is corrupted, please delete and reupload again.
-
-
-
+
+
+
+
+
+ File is corrupted, please delete and reupload again.
+
+
+
+
)}
diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx b/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx
index a248ebe4ad4..2dd3a029e33 100644
--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx
+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx
@@ -255,19 +255,21 @@ const PreviewPane = () => {
{!canUpdateFiles && (
-
-
-
-
- You need additional permissions to delete this file
-
-
-
+
+
+
+
+
+ You need additional permissions to delete this file
+
+
+
+
)}
diff --git a/studio/components/ui/Logs/LogsExplorerHeader.tsx b/studio/components/ui/Logs/LogsExplorerHeader.tsx
index b6d211f92b3..aa4ca18c83a 100644
--- a/studio/components/ui/Logs/LogsExplorerHeader.tsx
+++ b/studio/components/ui/Logs/LogsExplorerHeader.tsx
@@ -135,34 +135,38 @@ const LogsExplorerHeader: FC = ({ subtitle }) => {
-
-
-
- Copied
-
-
+
+
+
+
+ Copied
+
+
+
) : (
-
-
-
- Copy value
-
-
+
+
+
+
+ Copy value
+
+
+
)}
diff --git a/studio/components/ui/UpgradeToPro.tsx b/studio/components/ui/UpgradeToPro.tsx
index ccee10b1295..81ba2eedb2d 100644
--- a/studio/components/ui/UpgradeToPro.tsx
+++ b/studio/components/ui/UpgradeToPro.tsx
@@ -63,29 +63,31 @@ const UpgradeToPro: FC = ({ icon, primaryText, projectRef, secondaryText
{!canUpdateSubscription || projectUpdateDisabled ? (
-
-
-
-
- {projectUpdateDisabled ? (
- <>
- Subscription changes are currently disabled.
-
- Our engineers are working on a fix.
- >
- ) : !canUpdateSubscription ? (
- 'You need additional permissions to amend subscriptions'
- ) : (
- ''
- )}
-
-
-
+
+
+
+
+
+ {projectUpdateDisabled ? (
+ <>
+ Subscription changes are currently disabled.
+
+ Our engineers are working on a fix.
+ >
+ ) : !canUpdateSubscription ? (
+ 'You need additional permissions to amend subscriptions'
+ ) : (
+ ''
+ )}
+
+
+
+
) : (
<>>
)}
diff --git a/studio/package.json b/studio/package.json
index 3ca8ac2b2fc..f88457c8533 100644
--- a/studio/package.json
+++ b/studio/package.json
@@ -21,8 +21,8 @@
"@headlessui/react": "^1.4.1",
"@monaco-editor/react": "^4.3.1",
"@next/bundle-analyzer": "^12.0.4",
- "@radix-ui/react-portal": "^0.1.1",
- "@radix-ui/react-tooltip": "^0.1.6",
+ "@radix-ui/react-portal": "^1.0.1",
+ "@radix-ui/react-tooltip": "^1.0.5",
"@scaleleap/pg-format": "^1.0.0",
"@sentry/browser": "^6.15.0",
"@sentry/nextjs": "^6.17.4",
@@ -142,8 +142,7 @@
"postcss": "^8.4.6",
"prettier": "^2.7.1",
"storybook-dark-mode": "^1.0.4",
- "tailwindcss": "^3.0.22",
- "ts-jest": "^27.0.7",
+ "tailwindcss": "^3.0.15",
"typescript": "4.8.4"
}
}
diff --git a/studio/pages/support/new.tsx b/studio/pages/support/new.tsx
index 4e5ff5c2e5a..a3e256afafa 100644
--- a/studio/pages/support/new.tsx
+++ b/studio/pages/support/new.tsx
@@ -58,17 +58,19 @@ const SupportPage = () => {
-
-
-
- Check Supabase status page
-
-
+
+
+
+
+ Check Supabase status page
+
+
+
From 480d6f331bf3369c953c9546abcea7310bf7b022 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 14:48:07 +0800
Subject: [PATCH 24/94] move cmdk in studio
---
studio/pages/_app.tsx | 48 ++++++++++++++++++++++---------------------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/studio/pages/_app.tsx b/studio/pages/_app.tsx
index a51f698ce97..8451a828264 100644
--- a/studio/pages/_app.tsx
+++ b/studio/pages/_app.tsx
@@ -94,36 +94,38 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
-
-
- Supabase
-
-
+
+ Supabase
+
+
-
-
+ `}
+
-
-
- {getLayout( )}
-
-
+
+
+
+
+ {getLayout( )}
+
+
+
+
-
-
-
-
+
+
+
From cd125b7684e3e9e07c51205a3eba810f0b451d0b Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 16:00:15 +0800
Subject: [PATCH 25/94] fix: remove bad CSS
---
studio/styles/main.scss | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/studio/styles/main.scss b/studio/styles/main.scss
index e3d187c24c4..5a3b5a8a9dc 100644
--- a/studio/styles/main.scss
+++ b/studio/styles/main.scss
@@ -184,10 +184,6 @@ div[data-radix-portal]:not(.portal--toast) {
}
}
-div.fixed.inset-0 {
- z-index: 11 !important;
-}
-
.recharts-tooltip-cursor {
@apply fill-transparent;
}
@@ -236,4 +232,4 @@ div.fixed.inset-0 {
input {
@apply pr-7;
}
-}
\ No newline at end of file
+}
From 487ef6e53e88733ed41b56f5c36fafb56f40d950 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 16:12:43 +0800
Subject: [PATCH 26/94] try out extending interface for @soedirgo
---
packages/ui/src/components/Command/Command.utils.tsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 500f274b93e..096d51fc4c1 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -172,13 +172,16 @@ const CommandSeparator = React.forwardRef<
))
CommandSeparator.displayName = CommandPrimitive.Separator.displayName
+interface ICommandItem extends React.ElementRef {
+ type: 'link' | 'command'
+}
+
const CommandItem = React.forwardRef<
- React.ElementRef,
+ ICommandItem,
React.ComponentPropsWithoutRef
>(({ className, type, ...props }, ref) => (
Date: Fri, 24 Mar 2023 16:47:42 +0800
Subject: [PATCH 27/94] fix type issues
---
apps/www/public/sitemap_www.xml | 28 ++++++++++++++--
apps/www/types/sse.d.ts | 12 +++++++
.../ui/src/components/Command/AiCommand.tsx | 4 +--
.../src/components/Command/Command.utils.tsx | 1 +
.../ui/src/components/Command/CommandMenu.tsx | 32 ++++++++++++-------
.../Command/CommandMenuProvider.tsx | 2 +-
6 files changed, 63 insertions(+), 16 deletions(-)
create mode 100644 apps/www/types/sse.d.ts
diff --git a/apps/www/public/sitemap_www.xml b/apps/www/public/sitemap_www.xml
index a0922df9c0d..0de81dc6170 100644
--- a/apps/www/public/sitemap_www.xml
+++ b/apps/www/public/sitemap_www.xml
@@ -79,7 +79,7 @@
- https://supabase.com/edge-functions
+ https://supabase.com/legal/dpa
weekly
0.5
@@ -91,7 +91,7 @@
- https://supabase.com/legal/dpa
+ https://supabase.com/edge-functions
weekly
0.5
@@ -1058,6 +1058,30 @@
0.5
+
+ https://supabase.com/blog/case-study-happyteams
+ weekly
+ 0.5
+
+
+
+ https://supabase.com/blog/type-constraints-in-65-lines-of-sql
+ weekly
+ 0.5
+
+
+
+ https://supabase.com/blog/geo-queries-with-postgis-in-ionic-angular
+ weekly
+ 0.5
+
+
+
+ https://supabase.com/blog/supabase-beta-update-february-2023
+ weekly
+ 0.5
+
+
https://supabase.com/alternatives/supabase-vs-firebase
weekly
diff --git a/apps/www/types/sse.d.ts b/apps/www/types/sse.d.ts
new file mode 100644
index 00000000000..dbf97ac0836
--- /dev/null
+++ b/apps/www/types/sse.d.ts
@@ -0,0 +1,12 @@
+declare module 'sse.js' {
+ export type SSEOptions = EventSourceInit & {
+ headers?: Record
+ payload?: string
+ method?: string
+ }
+
+ export class SSE extends EventSource {
+ constructor(url: string | URL, sseOptions?: SSEOptions)
+ stream(): void
+ }
+}
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index bb92ff1983a..dd39deb4b34 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -107,7 +107,7 @@ function promptDataReducer(
export interface AiCommandProps {
query?: string
- setQuery?: (query: string) => void
+ setQuery: (query: string) => void
page?: string
}
@@ -216,7 +216,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
const eventSource = new SSE(`${edgeFunctionUrl}/clippy-search`, {
headers: {
- apikey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
+ apikey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY ?? '',
Authorization: `Bearer ${process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY}`,
'Content-Type': 'application/json',
},
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 096d51fc4c1..06c5b5fd85c 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -179,6 +179,7 @@ interface ICommandItem extends React.ElementRef {
const CommandItem = React.forwardRef<
ICommandItem,
React.ComponentPropsWithoutRef
+ // @ts-ignore
>(({ className, type, ...props }, ref) => (
void
}
-const iconPicker = {
+const iconPicker: { [key: string]: React.ReactNode } = {
arrowRight: ,
book: ,
inbox: ,
+ mobile: ,
+ person: ,
+ services: ,
+ contact: ,
+ icon: ,
+ products: ,
}
const SearchOnlyItem = ({ children, isSubItem, ...props }: any) => {
@@ -229,7 +239,7 @@ const CommandMenu = () => {
{navItems.docsGeneral.map((item) => (
router.push(item.url)}>
- {item.icon && iconPicker[item.icon]}
+ {item?.icon && iconPicker[item.icon]}
{item.label}
))}
diff --git a/packages/ui/src/components/Command/CommandMenuProvider.tsx b/packages/ui/src/components/Command/CommandMenuProvider.tsx
index cce5169d31f..aebb9ffd942 100644
--- a/packages/ui/src/components/Command/CommandMenuProvider.tsx
+++ b/packages/ui/src/components/Command/CommandMenuProvider.tsx
@@ -15,7 +15,7 @@ export interface CommandMenuContextValue {
setPages: React.Dispatch>
page: string
}
-export const CommandMenuContext = createContext(undefined)
+export const CommandMenuContext = createContext(undefined)
export const useCommandMenu = () => {
const context = useContext(CommandMenuContext)
From abbc09bf36c90397c16ac42bccfa7cf40f5e769c Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Fri, 24 Mar 2023 18:02:18 +0800
Subject: [PATCH 28/94] Update CommandMenu.tsx
---
packages/ui/src/components/Command/CommandMenu.tsx | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 45a58e68fed..d919a58af90 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -128,23 +128,9 @@ const CommandMenu = () => {
setIsOpen(!open)}
size={'xlarge'}
className={'max-h-[70vh] lg:max-h-[50vh] overflow-hidden overflow-y-auto'}
- // onKeyDown={(e) => {
- // // Escape goes to previous page
- // // Backspace goes to previous page when search is empty
- // if (
- // e.key === 'Escape'
- // // || (e.key === 'Backspace' && !search)
- // ) {
- // e.preventDefault()
- // if (!page) setIsOpen(false)
- // setSearch('')
- // setPages((pages) => pages.slice(0, -1))
- // }
- // }}
>
{pages.length > 0 && (
From a9b78da92effc55cbd2ffa6d0571d0a51b31177c Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 11:10:27 -0600
Subject: [PATCH 29/94] chore(cmdk): remove unused type
---
packages/ui/src/components/Command/CommandMenu.tsx | 4 ----
1 file changed, 4 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index d919a58af90..e0f8c87791c 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -41,10 +41,6 @@ export const CHAT_ROUTES = [
COMMAND_ROUTES.AI_RLS_POLICY,
]
-interface IActions {
- toggleTheme: () => void
-}
-
const iconPicker: { [key: string]: React.ReactNode } = {
arrowRight: ,
book: ,
From 74065416c46926cc279c429188ba0b881ae56386 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 12:06:10 -0600
Subject: [PATCH 30/94] refactor(cmdk): typing and docs search
---
.../ui/src/components/Command/AiCommand.tsx | 5 +-
.../src/components/Command/Command.utils.tsx | 189 ++++++++-------
.../ui/src/components/Command/CommandMenu.tsx | 16 +-
.../ui/src/components/Command/DocsSearch.tsx | 217 ++----------------
4 files changed, 127 insertions(+), 300 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index dd39deb4b34..ae1bdcf8f06 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -518,6 +518,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
{showActions && promptIndex === i + 1 && (
{
if (!query) {
alert("You've selected me")
@@ -530,6 +531,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
{promptData.length > 1 && (
{
if (!query) {
@@ -545,7 +547,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
Back to previous version
)}
-
+
Run in SQL editor
@@ -562,6 +564,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
const key = question.replace(/\s+/g, '_')
return (
{
if (!query) {
handleClippyConfirm(question)
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 06c5b5fd85c..1e346f884c7 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -9,24 +9,27 @@ import { ModalProps } from '../Modal/Modal'
import { useCommandMenu } from './CommandMenuProvider'
import { LoadingLine } from './LoadingLine'
-const Command = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
+type CommandPrimitiveElement = React.ElementRef
+type CommandPrimitiveProps = React.ComponentPropsWithoutRef
+
+export const Command = React.forwardRef(
+ ({ className, ...props }, ref) => (
+
+ )
+)
+
Command.displayName = CommandPrimitive.displayName
-interface CommandDialogProps extends ModalProps {
+export interface CommandDialogProps extends ModalProps {
onKeyDown?: KeyboardEventHandler
page?: number | string
}
-const CommandDialog = ({ children, onKeyDown, page, ...props }: CommandDialogProps) => {
+export const CommandDialog = ({ children, onKeyDown, page, ...props }: CommandDialogProps) => {
const [animateBounce, setAnimateBounce] = React.useState(false)
React.useEffect(() => {
@@ -45,10 +48,7 @@ const CommandDialog = ({ children, onKeyDown, page, ...props }: CommandDialogPro
animateBounce ? 'scale-[101.5%]' : 'scale-100'
)}
>
- {/* */}
{children}
- {/* */}
)
}
+CommandDialog.displayName = 'CommandDialog'
+
+type CommandPrimitiveInputElement = React.ElementRef
type CommandPrimitiveInputProps = React.ComponentPropsWithoutRef
-type CommandInputProps = CommandPrimitiveInputProps & {
- _key?: string | number
-}
-
-const CommandInput = React.forwardRef<
- React.ElementRef,
- CommandInputProps
->(({ className, value, onValueChange, _key, ...props }, ref) => {
+export const CommandInput = React.forwardRef<
+ CommandPrimitiveInputElement,
+ CommandPrimitiveInputProps
+>(({ className, value, onValueChange, ...props }, ref) => {
const { isLoading } = useCommandMenu()
return (
- {/*
*/}
,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
+type CommandPrimitiveListElement = React.ElementRef
+type CommandPrimitiveListProps = React.ComponentPropsWithoutRef
+
+export const CommandList = React.forwardRef(
+ ({ className, ...props }, ref) => (
+
+ )
+)
CommandList.displayName = CommandPrimitive.List.displayName
-const CommandEmpty = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
+type CommandPrimitiveEmptyElement = React.ElementRef
+type CommandPrimitiveEmptyProps = React.ComponentPropsWithoutRef
+
+export const CommandEmpty = React.forwardRef<
+ CommandPrimitiveEmptyElement,
+ CommandPrimitiveEmptyProps
>((props, ref) => (
type CommandPrimitiveGroupProps = React.ComponentPropsWithoutRef
-type CommandGroupProps = CommandPrimitiveGroupProps & {
- _key?: string | number
-}
-
-const CommandGroup = React.forwardRef<
- React.ElementRef,
- CommandGroupProps
->(({ className, _key, ...props }, ref) => (
+export const CommandGroup = React.forwardRef<
+ CommandPrimitiveGroupElement,
+ CommandPrimitiveGroupProps
+>(({ className, ...props }, ref) => (
,
- React.ComponentPropsWithoutRef
+type CommandPrimitiveSeparatorElement = React.ElementRef
+type CommandPrimitiveSeparatorProps = React.ComponentPropsWithoutRef<
+ typeof CommandPrimitive.Separator
+>
+
+export const CommandSeparator = React.forwardRef<
+ CommandPrimitiveSeparatorElement,
+ CommandPrimitiveSeparatorProps
>(({ className, ...props }, ref) => (
))
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName
-interface ICommandItem extends React.ElementRef {
+type CommandPrimitiveItemElement = React.ElementRef
+type CommandPrimitiveItemProps = React.ComponentPropsWithoutRef
+
+export interface CommandItemProps extends CommandPrimitiveItemProps {
type: 'link' | 'command'
}
-const CommandItem = React.forwardRef<
- ICommandItem,
- React.ComponentPropsWithoutRef
- // @ts-ignore
->(({ className, type, ...props }, ref) => (
- (
+ ({ className, type, ...props }, ref) => (
+
-))
-
-const CommandItemStale = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
+ className
+ )}
+ {...props}
+ />
+ )
+)
CommandItem.displayName = CommandPrimitive.Item.displayName
-const CommandShortcut = ({ className, ...props }: React.HTMLAttributes) => {
+export const CommandItemStale = React.forwardRef(
+ ({ className, ...props }, ref) => (
+
+ )
+)
+
+CommandItemStale.displayName = 'CommandItemStale'
+
+export const CommandShortcut = ({ className, ...props }: React.HTMLAttributes) => {
return (
)
}
+
CommandShortcut.displayName = 'CommandShortcut'
-const CommandLabel = ({ className, ...props }: React.HTMLAttributes) => {
+export const CommandLabel = ({ className, ...props }: React.HTMLAttributes) => {
return
}
-export {
- Command,
- CommandDialog,
- CommandInput,
- CommandList,
- CommandEmpty,
- CommandGroup,
- CommandItem,
- CommandItemStale,
- CommandShortcut,
- CommandSeparator,
- CommandLabel,
-}
+CommandShortcut.displayName = 'CommandLabel'
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index e0f8c87791c..4b9c3613930 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -99,6 +99,7 @@ const CommandMenu = () => {
.flatMap((item) => item.subItems)
.map((item) => (
{
@@ -158,6 +159,7 @@ const CommandMenu = () => {
<>
{
handleSetPages([...pages, COMMAND_ROUTES.AI], false)
}}
@@ -177,6 +179,7 @@ const CommandMenu = () => {
handleSetPages([...pages, COMMAND_ROUTES.DOCS_SEARCH], true)}
forceMount
>
@@ -198,7 +201,7 @@ const CommandMenu = () => {
{navItems.docsTools.map((item) => (
- router.push(item.url)}>
+ router.push(item.url)}>
Go to {item.label}
@@ -209,7 +212,7 @@ const CommandMenu = () => {
{navItems.docsSupport.map((item) => (
- router.push(item.url)}>
+ router.push(item.url)}>
Go to {item.label}
@@ -220,7 +223,7 @@ const CommandMenu = () => {
{navItems.docsGeneral.map((item) => (
- router.push(item.url)}>
+ router.push(item.url)}>
{item?.icon && iconPicker[item.icon]}
{item.label}
@@ -228,7 +231,10 @@ const CommandMenu = () => {
- handleSetPages([...pages, 'Theme'], false)}>
+ handleSetPages([...pages, 'Theme'], false)}
+ >
Change theme
@@ -241,7 +247,7 @@ const CommandMenu = () => {
)}
{page === COMMAND_ROUTES.DOCS_SEARCH && (
-
+
)}
{page === COMMAND_ROUTES.THEME && }
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui/src/components/Command/DocsSearch.tsx
index 89140a903f4..da87b4cf609 100644
--- a/packages/ui/src/components/Command/DocsSearch.tsx
+++ b/packages/ui/src/components/Command/DocsSearch.tsx
@@ -27,130 +27,31 @@ const questions = [
'How do I set up authentication?',
]
-function getEdgeFunctionUrl() {
- const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL?.replace(/\/$/, '')
-
- // if (IS_PLATFORM) {
- if (true) {
- // @ts-ignore
- const [schemeAndProjectId, domain, tld] = supabaseUrl.split('.')
- return `${schemeAndProjectId}.functions.${domain}.${tld}`
- } else {
- return `${supabaseUrl}/functions/v1`
- }
-}
-
-const edgeFunctionUrl = getEdgeFunctionUrl()
-
-function promptDataReducer(
- state: any[],
- action: {
- index?: number
- answer?: string | undefined
- status?: string
- query?: string | undefined
- type?: 'remove-last-item' | string
- }
-) {
- // console.log('running reducer')
- // console.log('what is currently in', ...state)
- // console.log('what is the action payload', action)
- // set a standard state to use later
- let current = [...state]
-
- console.log(action)
-
- if (action.type) {
- switch (action.type) {
- case 'remove-last-item':
- console.log('removing last item')
- current.pop()
- return [...current]
- break
-
- default:
- break
- }
- }
-
- // check that an index is present
- if (action.index === undefined) return [...state]
-
- if (!current[action.index]) {
- current[action.index] = { query: '', answer: '', status: '' }
- }
-
- // if (action.answer !== undefined) {
- current[action.index].answer = action.answer
- // }
- if (action.query) {
- current[action.index].query = action.query
- }
- if (action.status) {
- current[action.index].status = action.status
- }
-
- // console.log('what i will update with', current)
- console.log(current)
- return [...current]
-
- throw Error('Unknown action.')
-}
-
export interface DocsSearchProps {
query?: string
setQuery?: (query: string) => void
- page?: string
- router: any
}
-const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
- const { isDarkMode } = useTheme()
-
- // const { close, query, setQuery } = useSearch()
- const [answer, setAnswer] = useState('')
- const [results, setResults] = useState([])
- const [isResponding, setIsResponding] = useState(false)
- const [hasClippyError, setHasClippyError] = useState(false)
+const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
+ const [results, setResults] = useState()
const [hasSearchError, setHasSearchError] = useState(false)
- const [selectedTab, setSelectedTab] = useState('clippy-panel')
- const eventSourceRef = useRef()
const supabaseClient = useSupabaseClient()
const { isLoading, setIsLoading } = useCommandMenu()
- const [promptIndex, setPromptIndex] = useState(0)
- const [promptData, dispatchPromptData] = useReducer(promptDataReducer, [])
-
- const cantHelp = answer?.trim() === "Sorry, I don't know how to help with that."
- const status = isLoading
- ? 'Clippy is searching...'
- : isResponding
- ? 'Clippy is responding...'
- : cantHelp || hasClippyError
- ? 'Clippy has failed you'
- : undefined
-
- const handleSearchConfirm = useCallback(
+ const handleSearch = useCallback(
async (query: string) => {
- console.log('query', query)
- // console.log('query', query)
-
- // setResults(undefined)
- setAnswer(undefined)
- setIsResponding(false)
- setHasClippyError(false)
setHasSearchError(false)
setIsLoading(true)
const { error, data: pageSections } = await supabaseClient.functions.invoke('search', {
- body: { query: query },
+ body: { query },
})
setIsLoading(false)
if (error) {
setIsLoading(false)
- setIsResponding(false)
+
setHasSearchError(true)
console.error(error)
return
@@ -158,41 +59,28 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
if (!Array.isArray(pageSections)) {
setIsLoading(false)
- setIsResponding(false)
setHasSearchError(true)
console.error('Malformed response')
return
}
- setResults(undefined)
setResults(pageSections)
},
[supabaseClient]
)
- // console.log('current index', promptIndex)
-
function handleResetPrompt() {
- eventSourceRef.current?.close()
- eventSourceRef.current = undefined
setQuery('')
setResults(undefined)
- setAnswer(undefined)
- setIsResponding(false)
- setHasClippyError(false)
setHasSearchError(false)
}
- // console.log(promptData)
-
- const debounceFn = useMemo(() => debounce(handleSearchConfirm, 1000), [])
+ const debouncedSearch = useMemo(() => debounce(handleSearch, 1000), [handleSearch])
+ // TODO: can we do this w/o useEffect if query comes from context?
useEffect(() => {
- // if (query) {
- // handleSearchConfirm(query)
- // }
if (query) {
- debounceFn(query)
+ debouncedSearch(query)
}
}, [query])
@@ -233,10 +121,6 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
function TextHighlighter(props) {
const [searchText, setSearchText] = useState('')
- // const handleSearch = (event) => {
- // setSearchText(event.target.value.trim().toLowerCase())
- // }
-
const highlightMatches = (text) => {
if (!query) {
return text
@@ -256,8 +140,7 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
return (
<>
- {results &&
- results.length > 0 &&
+ {results?.length > 0 &&
results.map((page, i) => {
const pageSections = page.sections.filter((section) => !!section.heading)
return (
@@ -271,9 +154,10 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
forceMount
key={`${page.meta.title}-item-index-${i}`}
value={`${page.meta.title}-item-index-${i}`}
- type={'link'}
+ type="link"
onSelect={() => {
- router.push(`${page.path}`)
+ // TODO: replace with Next.js router/Link when cross-project link logic solved
+ window.location.assign(`/docs/${page.path}`)
}}
>
@@ -299,8 +183,11 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
forceMount
className="ml-3 mb-3"
onSelect={() => {
- router.push(
- `${page.path}${page.type === 'reference' ? '/' : '#'}${section.slug}`
+ // TODO: replace with Next.js router/Link when cross-project link logic solved
+ window.location.assign(
+ `/docs/${page.path}${page.type === 'reference' ? '/' : '#'}${
+ section.slug
+ }`
)
}}
key={`${page.meta.title}__${section.heading}-item-index-${i}`}
@@ -331,7 +218,7 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
)
})}
- {results?.length <= 0 && (
+ {results?.length === 0 && (
{questions.map((question) => {
const key = question.replace(/\s+/g, '_')
@@ -340,10 +227,11 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
disabled={isLoading}
onSelect={() => {
if (!query) {
- handleSearchConfirm(question)
+ handleSearch(question)
setQuery(question)
}
}}
+ type="command"
forceMount
key={key}
>
@@ -354,9 +242,8 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
})}
)}
- {isLoading && (
+ {isLoading && !results && (
- {/*
{} */}
Searching for results
)}
@@ -381,68 +268,6 @@ const DocsSearch = ({ query, setQuery, page, router }: DocsSearchProps) => {
)}
-
- {/* */}
- {/* {!isLoading && !answer && !hasClippyError && (
-
-
-
Not sure where to start?
-
-
- {questions.map((question) => {
- const key = question.replace(/\s+/g, '_')
- return (
-
- {
- setQuery(question)
- handleClippyConfirm(question)
- }}
- >
- {question}
-
-
- )
- })}
-
-
-
- )} */}
-
- {hasClippyError && (
-
-
-
- Sorry, looks like Clippy is having a hard time!
-
-
Please try again in a bit.
- {/*
- Try again?
- */}
-
- )}
-
-
-
-
-
-
- Powered by OpenAI.
-
-
- {status ? (
-
- {(isLoading || isResponding) && }
- {status}
-
- ) : (
- <>>
- )}
-
-
-
-
>
)
}
From 80abcb94315ef04030d041ee9963216a5e2c3baa Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 12:08:59 -0600
Subject: [PATCH 31/94] fix(cmdk): search docs immediately
---
packages/ui/src/components/Command/DocsSearch.tsx | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui/src/components/Command/DocsSearch.tsx
index da87b4cf609..2e442fd95ac 100644
--- a/packages/ui/src/components/Command/DocsSearch.tsx
+++ b/packages/ui/src/components/Command/DocsSearch.tsx
@@ -77,6 +77,13 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
const debouncedSearch = useMemo(() => debounce(handleSearch, 1000), [handleSearch])
+ // Search initial query immediately (note - empty useEffect deps)
+ useEffect(() => {
+ if (query) {
+ handleSearch(query)
+ }
+ }, [])
+
// TODO: can we do this w/o useEffect if query comes from context?
useEffect(() => {
if (query) {
From 679bbd45ec367531d27c01d19193a85f81b03b0d Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 12:14:48 -0600
Subject: [PATCH 32/94] refactor(cmdk): rename page to currentPage
---
.../ui/src/components/Command/CommandMenu.tsx | 17 +++++++++--------
.../components/Command/CommandMenuProvider.tsx | 18 +++++++++---------
2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 4b9c3613930..cb9fc38a707 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -63,7 +63,8 @@ const SearchOnlyItem = ({ children, isSubItem, ...props }: any) => {
const CommandMenu = () => {
const router = useRouter()
- const { isOpen, setIsOpen, actions, search, setSearch, pages, setPages, page } = useCommandMenu()
+ const { isOpen, setIsOpen, actions, search, setSearch, pages, setPages, currentPage } =
+ useCommandMenu()
const ThemeOptions = ({ isSubItem = false }) => {
return (
@@ -118,12 +119,12 @@ const CommandMenu = () => {
if (!keepSearch) setSearch('')
}
- const showCommandInput = !CHAT_ROUTES.includes(page)
+ const showCommandInput = !CHAT_ROUTES.includes(currentPage)
return (
<>
setIsOpen(!open)}
size={'xlarge'}
@@ -155,7 +156,7 @@ const CommandMenu = () => {
/>
)}
- {!page && (
+ {!currentPage && (
<>
{
>
)}
- {page === COMMAND_ROUTES.AI && (
-
+ {currentPage === COMMAND_ROUTES.AI && (
+
)}
- {page === COMMAND_ROUTES.DOCS_SEARCH && (
+ {currentPage === COMMAND_ROUTES.DOCS_SEARCH && (
)}
- {page === COMMAND_ROUTES.THEME && }
+ {currentPage === COMMAND_ROUTES.THEME && }
>
diff --git a/packages/ui/src/components/Command/CommandMenuProvider.tsx b/packages/ui/src/components/Command/CommandMenuProvider.tsx
index aebb9ffd942..6d61b5a9285 100644
--- a/packages/ui/src/components/Command/CommandMenuProvider.tsx
+++ b/packages/ui/src/components/Command/CommandMenuProvider.tsx
@@ -13,7 +13,7 @@ export interface CommandMenuContextValue {
setSearch: React.Dispatch>
pages: string[]
setPages: React.Dispatch>
- page: string
+ currentPage?: string
}
export const CommandMenuContext = createContext(undefined)
export const useCommandMenu = () => {
@@ -34,15 +34,15 @@ const CommandMenuProvider = ({ children }: PropsWithChildren<{}>) => {
const [isOpen, setIsOpen] = useState(false)
const [isLoading, setIsLoading] = useState(false)
const [search, setSearch] = React.useState('')
- const [pages, setPages] = React.useState([])
+ const [pages, setPages] = React.useState([])
const { toggleTheme } = useTheme()
- const page = pages[pages.length - 1]
+ const currentPage = pages[pages.length - 1]
const actions: CommandMenuActions = {
toggleTheme,
}
- useKeyboardEvents({ setIsOpen, page, setSearch, setPages })
+ useKeyboardEvents({ setIsOpen, currentPage, setSearch, setPages })
return (
) => {
search,
pages,
setPages,
- page,
+ currentPage,
}}
>
{children}
@@ -67,14 +67,14 @@ const CommandMenuProvider = ({ children }: PropsWithChildren<{}>) => {
function useKeyboardEvents({
setIsOpen,
- page,
+ currentPage,
setSearch,
setPages,
}: {
setIsOpen: (isOpen: boolean) => void
setSearch: React.Dispatch>
setPages: React.Dispatch>
- page: string
+ currentPage?: string
}) {
useEffect(() => {
function onKeyDown(event: KeyboardEvent) {
@@ -82,7 +82,7 @@ function useKeyboardEvents({
case 'Escape':
event.preventDefault()
// if on homepage, close the command palette
- if (!page) setIsOpen(false)
+ if (!currentPage) setIsOpen(false)
setSearch('')
// if NOT on homepage, return to last page
setPages((pages) => pages.slice(0, -1))
@@ -101,7 +101,7 @@ function useKeyboardEvents({
return () => {
window.removeEventListener('keydown', onKeyDown)
}
- }, [setIsOpen, page])
+ }, [setIsOpen, currentPage])
}
export default CommandMenuProvider
From c829457295f9a324b362b3f4e2482af6f212af1a Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 12:25:18 -0600
Subject: [PATCH 33/94] refactor(cmdk): text highlighter
---
.../src/components/Command/Command.utils.tsx | 25 +++++++++++++-
.../ui/src/components/Command/DocsSearch.tsx | 34 ++++---------------
2 files changed, 30 insertions(+), 29 deletions(-)
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 1e346f884c7..9462302b04f 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -3,7 +3,7 @@ import * as React from 'react'
import { cn } from './../../utils/cn'
-import { KeyboardEventHandler } from 'react'
+import { DetailedHTMLProps, HTMLAttributes, KeyboardEventHandler } from 'react'
import { Modal } from '../Modal'
import { ModalProps } from '../Modal/Modal'
import { useCommandMenu } from './CommandMenuProvider'
@@ -270,3 +270,26 @@ export const CommandLabel = ({ className, ...props }: React.HTMLAttributes, HTMLSpanElement> {
+ text: string | undefined
+ query: string | undefined
+}
+
+export const TextHighlighter = ({ text, query, ...props }: TextHighlighterProps) => {
+ const highlightMatches = (text) => {
+ if (!query) {
+ return text
+ }
+
+ if (!text) return ''
+
+ const regex = new RegExp(query, 'gi')
+ return text.replace(regex, (match) => `${match} `)
+ }
+
+ return
+}
+
+TextHighlighter.displayName = 'TextHighlighter'
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui/src/components/Command/DocsSearch.tsx
index 2e442fd95ac..2779e7516c2 100644
--- a/packages/ui/src/components/Command/DocsSearch.tsx
+++ b/packages/ui/src/components/Command/DocsSearch.tsx
@@ -1,20 +1,17 @@
import * as React from 'react'
-import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react'
-import { SSE } from 'sse.js'
+import { useCallback, useEffect, useMemo, useState } from 'react'
import { useSupabaseClient } from '@supabase/auth-helpers-react'
-import { useTheme } from 'common/Providers'
import {
Button,
IconAlertTriangle,
IconBook,
IconChevronRight,
IconHash,
- IconLoader,
IconSearch,
useCommandMenu,
} from 'ui'
-import { CommandGroup, CommandItem, CommandLabel } from './Command.utils'
+import { CommandGroup, CommandItem, CommandLabel, TextHighlighter } from './Command.utils'
import { debounce } from 'lodash'
@@ -125,26 +122,6 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
/>
)
- function TextHighlighter(props) {
- const [searchText, setSearchText] = useState('')
-
- const highlightMatches = (text) => {
- if (!query) {
- return text
- }
-
- if (!text) return ``
-
- const regex = new RegExp(query, 'gi')
- return text.replace(
- regex,
- (match) => `${match} `
- )
- }
-
- return
- }
-
return (
<>
{results?.length > 0 &&
@@ -173,10 +150,10 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
@@ -210,10 +187,11 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
-
+
From fe6aa2cfe53a1671400d8ca0a83c9e0316d826f1 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 12:53:05 -0600
Subject: [PATCH 34/94] fix(cmdk): escape key navigation
---
packages/ui/src/components/Command/CommandMenu.tsx | 4 +++-
packages/ui/src/components/Modal/Modal.tsx | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index cb9fc38a707..c30f97e54e3 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -126,7 +126,9 @@ const CommandMenu = () => {
setIsOpen(!open)}
+ onInteractOutside={() => {
+ setIsOpen(!open)
+ }}
size={'xlarge'}
className={'max-h-[70vh] lg:max-h-[50vh] overflow-hidden overflow-y-auto'}
>
diff --git a/packages/ui/src/components/Modal/Modal.tsx b/packages/ui/src/components/Modal/Modal.tsx
index dd56017ec1e..0b4cbd29be9 100644
--- a/packages/ui/src/components/Modal/Modal.tsx
+++ b/packages/ui/src/components/Modal/Modal.tsx
@@ -161,6 +161,7 @@ const Modal = ({
{header && {header}
}
{/*
Date: Fri, 24 Mar 2023 12:53:52 -0600
Subject: [PATCH 35/94] fix(cmdk): re-focus input after command selection
---
packages/ui/src/components/Command/CommandMenu.tsx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index c30f97e54e3..4cb00bc9644 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -1,6 +1,7 @@
import { useCommandState } from 'cmdk-supabase'
import { useRouter } from 'next/router'
import * as React from 'react'
+import { ElementRef, useRef } from 'react'
import { IconHome } from '../Icon/icons/IconHome'
import { IconArrowRight } from './../Icon/icons/IconArrowRight'
@@ -63,6 +64,7 @@ const SearchOnlyItem = ({ children, isSubItem, ...props }: any) => {
const CommandMenu = () => {
const router = useRouter()
+ const commandInputRef = useRef
>()
const { isOpen, setIsOpen, actions, search, setSearch, pages, setPages, currentPage } =
useCommandMenu()
@@ -117,6 +119,7 @@ const CommandMenu = () => {
function handleSetPages(pages: any, keepSearch: any) {
setPages(pages)
if (!keepSearch) setSearch('')
+ commandInputRef.current?.focus()
}
const showCommandInput = !CHAT_ROUTES.includes(currentPage)
@@ -152,6 +155,7 @@ const CommandMenu = () => {
)}
{showCommandInput && (
Date: Fri, 24 Mar 2023 12:59:56 -0600
Subject: [PATCH 36/94] fix(cmdk): doc search try again display logic
---
packages/ui/src/components/Command/DocsSearch.tsx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui/src/components/Command/DocsSearch.tsx
index 2779e7516c2..c3f61926632 100644
--- a/packages/ui/src/components/Command/DocsSearch.tsx
+++ b/packages/ui/src/components/Command/DocsSearch.tsx
@@ -124,7 +124,8 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
return (
<>
- {results?.length > 0 &&
+ {results &&
+ results.length > 0 &&
results.map((page, i) => {
const pageSections = page.sections.filter((section) => !!section.heading)
return (
@@ -203,8 +204,8 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
)
})}
- {results?.length === 0 && (
-
+ {!results && !hasSearchError && (
+
{questions.map((question) => {
const key = question.replace(/\s+/g, '_')
return (
From a76220deea79aa95768dd5f48aa7da56c2b4f4a2 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 13:06:51 -0600
Subject: [PATCH 37/94] fix(cmdk): clear input when clicking on breadcrumbs
---
packages/ui/src/components/Command/Command.utils.tsx | 2 +-
packages/ui/src/components/Command/CommandMenu.tsx | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 9462302b04f..09397c85211 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -253,7 +253,7 @@ export const CommandShortcut = ({ className, ...props }: React.HTMLAttributes {
)
}
- function handleSetPages(pages: any, keepSearch: any) {
+ function handleSetPages(pages: string[], keepSearch?: boolean) {
setPages(pages)
if (!keepSearch) setSearch('')
commandInputRef.current?.focus()
@@ -137,7 +137,7 @@ const CommandMenu = () => {
>
{pages.length > 0 && (
-
setPages([])}>{'Home'}
+
handleSetPages([])}>{'Home'}
{pages.map((page, index) => (
{
if (index === pages.length - 1) {
return
}
- setPages((pages) => pages.slice(0, index - 1))
+ handleSetPages(pages.slice(0, index - 1))
}}
>
{page}
From 6902624c593550579c6ef9f7edf91dbb6b873839 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 13:31:49 -0600
Subject: [PATCH 38/94] refactor(cmdk): move search/ai props to context
---
.../ui/src/components/Command/AiCommand.tsx | 40 ++++++++-----------
.../ui/src/components/Command/DocsSearch.tsx | 33 +++++++--------
2 files changed, 30 insertions(+), 43 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index ae1bdcf8f06..9477b70a4e8 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -105,16 +105,9 @@ function promptDataReducer(
throw Error('Unknown action.')
}
-export interface AiCommandProps {
- query?: string
- setQuery: (query: string) => void
- page?: string
-}
-
-const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
+const AiCommand = () => {
const { isDarkMode } = useTheme()
- // const { close, query, setQuery } = useSearch()
const [answer, setAnswer] = useState('')
const [results, setResults] = useState()
const [isResponding, setIsResponding] = useState(false)
@@ -122,8 +115,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
const [hasSearchError, setHasSearchError] = useState(false)
const [selectedTab, setSelectedTab] = useState('clippy-panel')
const eventSourceRef = useRef()
- const supabaseClient = useSupabaseClient()
- const { isLoading, setIsLoading } = useCommandMenu()
+ const { isLoading, setIsLoading, currentPage, search, setSearch } = useCommandMenu()
const [promptIndex, setPromptIndex] = useState(0)
const [promptData, dispatchPromptData] = useReducer(promptDataReducer, [])
@@ -185,7 +177,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
console.log('handleClippyConfirm ran')
console.log('promptIndex', promptIndex)
setAnswer(undefined)
- setQuery('')
+ setSearch('')
dispatchPromptData({ index: promptIndex, answer: undefined, query: query })
setIsResponding(false)
setHasClippyError(false)
@@ -194,7 +186,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
let queryToSend = query
- switch (page) {
+ switch (currentPage) {
case COMMAND_ROUTES.AI_ASK_ANYTHING:
queryToSend = query
break
@@ -305,14 +297,14 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
// console.log(promptData)
useEffect(() => {
- if (query) {
- handleClippyConfirm(query)
+ if (search) {
+ handleClippyConfirm(search)
}
}, [])
const showActions =
- !query &&
- page === COMMAND_ROUTES.AI_RLS_POLICY &&
+ !search &&
+ currentPage === COMMAND_ROUTES.AI_RLS_POLICY &&
!isResponding &&
!isLoading &&
promptData.length > 0
@@ -520,7 +512,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
{
- if (!query) {
+ if (!search) {
alert("You've selected me")
}
}}
@@ -534,7 +526,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
type="command"
forceMount
onSelect={() => {
- if (!query) {
+ if (!search) {
dispatchPromptData({ type: 'remove-last-item' })
setPromptIndex((x) => {
return x - 1
@@ -558,7 +550,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
})}
- {promptData.length <= 0 && page === COMMAND_ROUTES.AI_ASK_ANYTHING && (
+ {promptData.length <= 0 && currentPage === COMMAND_ROUTES.AI_ASK_ANYTHING && (
{questions.map((question) => {
const key = question.replace(/\s+/g, '_')
@@ -566,7 +558,7 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
{
- if (!query) {
+ if (!search) {
handleClippyConfirm(question)
}
}}
@@ -641,16 +633,16 @@ const AiCommand = ({ query, setQuery, page }: AiCommandProps) => {
autoFocus
type="textarea"
placeholder={selectedTab === 'search-panel' ? 'Search documentation' : 'Ask a question'}
- value={query}
- onChange={(e) => setQuery(e.target.value)}
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
// icon={ }
onKeyDown={(e) => {
switch (e.key) {
case 'Enter':
- if (!query) {
+ if (!search) {
return
}
- handleConfirm(selectedTab, query)
+ handleConfirm(selectedTab, search)
return
default:
return
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui/src/components/Command/DocsSearch.tsx
index c3f61926632..aa1514e0dee 100644
--- a/packages/ui/src/components/Command/DocsSearch.tsx
+++ b/packages/ui/src/components/Command/DocsSearch.tsx
@@ -24,16 +24,11 @@ const questions = [
'How do I set up authentication?',
]
-export interface DocsSearchProps {
- query?: string
- setQuery?: (query: string) => void
-}
-
-const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
+const DocsSearch = () => {
const [results, setResults] = useState()
const [hasSearchError, setHasSearchError] = useState(false)
const supabaseClient = useSupabaseClient()
- const { isLoading, setIsLoading } = useCommandMenu()
+ const { isLoading, setIsLoading, search, setSearch } = useCommandMenu()
const handleSearch = useCallback(
async (query: string) => {
@@ -67,7 +62,7 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
)
function handleResetPrompt() {
- setQuery('')
+ setSearch('')
setResults(undefined)
setHasSearchError(false)
}
@@ -76,17 +71,17 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
// Search initial query immediately (note - empty useEffect deps)
useEffect(() => {
- if (query) {
- handleSearch(query)
+ if (search) {
+ handleSearch(search)
}
}, [])
// TODO: can we do this w/o useEffect if query comes from context?
useEffect(() => {
- if (query) {
- debouncedSearch(query)
+ if (search) {
+ debouncedSearch(search)
}
- }, [query])
+ }, [search])
const ChevronArrow = () => (
{
@@ -188,11 +183,11 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
-
+
@@ -212,9 +207,9 @@ const DocsSearch = ({ query, setQuery }: DocsSearchProps) => {
{
- if (!query) {
+ if (!search) {
handleSearch(question)
- setQuery(question)
+ setSearch(question)
}
}}
type="command"
From 6a1658d1f909ddbd7ebebf2371aee3b1a2c4afa4 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 14:03:47 -0600
Subject: [PATCH 39/94] refactor(cmdk): remove unused props
---
packages/ui/src/components/Command/CommandMenu.tsx | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index dfbfcf3b85c..34084d23021 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -250,12 +250,8 @@ const CommandMenu = () => {
>
)}
- {currentPage === COMMAND_ROUTES.AI && (
-
- )}
- {currentPage === COMMAND_ROUTES.DOCS_SEARCH && (
-
- )}
+ {currentPage === COMMAND_ROUTES.AI && }
+ {currentPage === COMMAND_ROUTES.DOCS_SEARCH && }
{currentPage === COMMAND_ROUTES.THEME && }
From 4d86993e157da7c470e8cc0fe303b2a60acbe49a Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 15:41:28 -0600
Subject: [PATCH 40/94] fix(cmdk): sse.js type definition in ui package
---
packages/ui/src/types/sse.d.ts | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 packages/ui/src/types/sse.d.ts
diff --git a/packages/ui/src/types/sse.d.ts b/packages/ui/src/types/sse.d.ts
new file mode 100644
index 00000000000..dbf97ac0836
--- /dev/null
+++ b/packages/ui/src/types/sse.d.ts
@@ -0,0 +1,12 @@
+declare module 'sse.js' {
+ export type SSEOptions = EventSourceInit & {
+ headers?: Record
+ payload?: string
+ method?: string
+ }
+
+ export class SSE extends EventSource {
+ constructor(url: string | URL, sseOptions?: SSEOptions)
+ stream(): void
+ }
+}
From f00ff47f6bb4071515e568b4fd0e91699ef13f93 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 15:47:02 -0600
Subject: [PATCH 41/94] fix(cmdk): move sse.js types to studio
---
{packages/ui/src => studio}/types/sse.d.ts | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename {packages/ui/src => studio}/types/sse.d.ts (100%)
diff --git a/packages/ui/src/types/sse.d.ts b/studio/types/sse.d.ts
similarity index 100%
rename from packages/ui/src/types/sse.d.ts
rename to studio/types/sse.d.ts
From ee5d2e1708ec36b7a9f24840fb2021c20cc7401a Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 15:48:45 -0600
Subject: [PATCH 42/94] chore(cmdk): clean up ai command
---
.../ui/src/components/Command/AiCommand.tsx | 440 +++---------------
1 file changed, 61 insertions(+), 379 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 9477b70a4e8..7d34e38f364 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -5,16 +5,10 @@ import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { SSE } from 'sse.js'
-import { useSupabaseClient } from '@supabase/auth-helpers-react'
-import { useTheme } from 'common/Providers'
-import { IconAlertCircle, IconAlertTriangle, IconLoader, IconUser, Input } from 'ui'
-// import components from '~/components'
-// import { IS_PLATFORM } from '~/lib/constants'
-import { IconCopy } from '../Icon/icons/IconCopy'
+import { Button, IconAlertCircle, IconAlertTriangle, IconLoader, IconUser, Input } from 'ui'
import { CommandGroup, CommandItem } from './Command.utils'
-
-import { COMMAND_ROUTES } from './CommandMenu'
import { AiIcon, AiIconChat } from './Command.icons'
+import { COMMAND_ROUTES } from './CommandMenu'
import { useCommandMenu } from './CommandMenuProvider'
const questions = [
@@ -26,15 +20,6 @@ const questions = [
'How do I set up authentication?',
]
-const RLSquestions = [
- 'How do I get started with Supabase?',
- 'How do I run Supabase locally?',
- 'How do I connect to my database?',
- 'How do I run migrations? ',
- 'How do I listen to changes in a table?',
- 'How do I set up authentication?',
-]
-
function getEdgeFunctionUrl() {
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL?.replace(/\/$/, '')
@@ -60,22 +45,14 @@ function promptDataReducer(
type?: 'remove-last-item' | string
}
) {
- // console.log('running reducer')
- // console.log('what is currently in', ...state)
- // console.log('what is the action payload', action)
// set a standard state to use later
let current = [...state]
- console.log(action)
-
if (action.type) {
switch (action.type) {
case 'remove-last-item':
- console.log('removing last item')
current.pop()
return [...current]
- break
-
default:
break
}
@@ -88,9 +65,8 @@ function promptDataReducer(
current[action.index] = { query: '', answer: '', status: '' }
}
- // if (action.answer !== undefined) {
current[action.index].answer = action.answer
- // }
+
if (action.query) {
current[action.index].query = action.query
}
@@ -98,22 +74,13 @@ function promptDataReducer(
current[action.index].status = action.status
}
- // console.log('what i will update with', current)
- console.log(current)
return [...current]
-
- throw Error('Unknown action.')
}
const AiCommand = () => {
- const { isDarkMode } = useTheme()
-
const [answer, setAnswer] = useState('')
- const [results, setResults] = useState()
const [isResponding, setIsResponding] = useState(false)
const [hasClippyError, setHasClippyError] = useState(false)
- const [hasSearchError, setHasSearchError] = useState(false)
- const [selectedTab, setSelectedTab] = useState('clippy-panel')
const eventSourceRef = useRef()
const { isLoading, setIsLoading, currentPage, search, setSearch } = useCommandMenu()
@@ -129,96 +96,28 @@ const AiCommand = () => {
? 'Clippy has failed you'
: undefined
- // const handleSearchConfirm = useCallback(
- // async (query: string) => {
- // console.log('query', query)
- // // console.log('query', query)
-
- // setResults(undefined)
- // setAnswer(undefined)
- // setIsResponding(false)
- // setHasClippyError(false)
- // setHasSearchError(false)
- // setIsLoading(true)
-
- // const { error, data: pageSections } = await supabaseClient.functions.invoke('search', {
- // body: { query: query },
- // })
-
- // setIsLoading(false)
-
- // if (error) {
- // setIsLoading(false)
- // setIsResponding(false)
- // setHasSearchError(true)
- // console.error(error)
- // return
- // }
-
- // if (!Array.isArray(pageSections)) {
- // setIsLoading(false)
- // setIsResponding(false)
- // setHasSearchError(true)
- // console.error('Malformed response')
- // return
- // }
-
- // setResults(pageSections)
- // },
- // [supabaseClient]
- // )
-
- // console.log('current index', promptIndex)
-
- const handleClippyConfirm = useCallback(
+ const handleConfirm = useCallback(
async (query: string) => {
- // setResults(undefined)
- // const promptIndex = promptIndex
- console.log('handleClippyConfirm ran')
- console.log('promptIndex', promptIndex)
setAnswer(undefined)
setSearch('')
- dispatchPromptData({ index: promptIndex, answer: undefined, query: query })
+ dispatchPromptData({ index: promptIndex, answer: undefined, query })
setIsResponding(false)
setHasClippyError(false)
- setHasSearchError(false)
setIsLoading(true)
- let queryToSend = query
-
- switch (currentPage) {
- case COMMAND_ROUTES.AI_ASK_ANYTHING:
- queryToSend = query
- break
-
- case COMMAND_ROUTES.AI_RLS_POLICY:
- queryToSend = `Given this table schema:
-
- Schema STRIPE has tables:
- CHARGE with columns [ID, AMOUNT, CREATED, CURRENCY, CUSTOMER_ID]
- CUSTOMER with columns [ID, NAME, CREATED, SHIPPING_ADDRESS_STATE]
-
- \n\nAnswer with only an RLS policy in SQL, no other text: ${query}`
- break
- default:
- break
- }
-
- console.log('query to send:', queryToSend)
-
const eventSource = new SSE(`${edgeFunctionUrl}/clippy-search`, {
headers: {
apikey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY ?? '',
Authorization: `Bearer ${process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY}`,
'Content-Type': 'application/json',
},
- payload: JSON.stringify({ query: queryToSend }),
+ payload: JSON.stringify({ query }),
})
function handleError(err: T) {
setIsLoading(false)
setIsResponding(false)
- // setHasClippyError(true)
+ setHasClippyError(true)
console.error(err)
}
@@ -228,7 +127,6 @@ const AiCommand = () => {
setIsLoading(false)
if (e.data === '[DONE]') {
- // console.log('I HAVE FINSHED')
setIsResponding(false)
setAnswer(undefined)
setPromptIndex((x) => {
@@ -242,8 +140,6 @@ const AiCommand = () => {
const completionResponse: CreateCompletionResponse = JSON.parse(e.data)
const [{ text }] = completionResponse.choices
- console.log('Im going to use index:', promptIndex)
-
setAnswer((answer) => {
const currentAnswer = answer ?? ''
@@ -268,37 +164,18 @@ const AiCommand = () => {
[promptIndex, promptData]
)
- const handleConfirm = useCallback(
- (selectedTab: string, query: string) => {
- switch (selectedTab) {
- case 'search-panel':
- // return handleSearchConfirm(query)
- case 'clippy-panel':
- return handleClippyConfirm(query)
- }
- },
- [
- // handleSearchConfirm,
- handleClippyConfirm,
- ]
- )
-
- // function handleResetPrompt() {
- // eventSourceRef.current?.close()
- // eventSourceRef.current = undefined
- // setQuery('')
- // setResults(undefined)
- // setAnswer(undefined)
- // setIsResponding(false)
- // setHasClippyError(false)
- // setHasSearchError(false)
- // }
-
- // console.log(promptData)
+ function handleResetPrompt() {
+ eventSourceRef.current?.close()
+ eventSourceRef.current = undefined
+ setSearch('')
+ setAnswer(undefined)
+ setIsResponding(false)
+ setHasClippyError(false)
+ }
useEffect(() => {
if (search) {
- handleClippyConfirm(search)
+ handleConfirm(search)
}
}, [])
@@ -312,90 +189,6 @@ const AiCommand = () => {
return (
e.stopPropagation()}>
- {/*
{
- setSelectedTab(tabId)
- if (!query) {
- handleResetPrompt()
- return
- }
- handleConfirm(tabId, query)
- }}
- > */}
- {/*
-
- {!isLoading && !hasSearchError && !results && (
-
-
- Search Supabase guides & reference docs
-
-
- )}
- {results && results.length > 0 && (
-
- {results.map((page) => {
- const pageSections = page.sections.filter((section) => !!section.heading)
- return (
-
-
- {pageSections.length > 0 && (
-
-
-
- {pageSections.map((section) => (
-
- ))}
-
-
- )}
-
- )
- })}
-
- )}
- {isLoading && (
-
-
{}
-
Searching for results
-
- )}
- {results && results.length === 0 && (
-
-
-
No results found.
-
- Try again?
-
-
- )}
- {hasSearchError && (
-
-
-
- Sorry, looks like we're having some issues with search!
-
-
Please try again in a bit.
-
- Try again?
-
-
- )}
-
- */}
- {/* */}
{/* {!isLoading && !answer && !hasClippyError && (
@@ -439,112 +232,46 @@ const AiCommand = () => {
)}
- {
- // cantHelp
- false ? (
-
-
-
-
Sorry, I don't know how to help with that.
-
- {/*
- Try again?
- */}
-
- ) : (
-
-
- {/*
*/}
-
- {isLoading && promptIndex === i ? (
-
- ) : (
-
{
- const supabaseUrl = new URL('https://supabase.com')
- const linkUrl = new URL(href, 'https://supabase.com')
-
- if (linkUrl.origin === supabaseUrl.origin) {
- return linkUrl.toString()
- }
-
- return href
- }}
- // components={components}
- >
- {prompt.answer}
-
- )}
-
+ {cantHelp ? (
+
+
+
+
Sorry, I don't know how to help with that.
- )
- }
-
+
+ Try again?
+
+
+ ) : (
+
+
+
+ {isLoading && promptIndex === i ? (
+
+ ) : (
+ // TODO: pull in markdown components from docs for better styling (code blocks, etc)
+
{
+ const supabaseUrl = new URL('https://supabase.com')
+ const linkUrl = new URL(href, 'https://supabase.com')
- {showActions && promptIndex === i + 1 && (
-
- {
- if (!search) {
- alert("You've selected me")
- }
- }}
- forceMount
- >
-
- Copy SQL to clipboard
-
- {promptData.length > 1 && (
- {
- if (!search) {
- dispatchPromptData({ type: 'remove-last-item' })
- setPromptIndex((x) => {
- return x - 1
- })
- // alert('back to previous version')
- }
- }}
- >
-
- Back to previous version
-
- )}
-
-
- Run in SQL editor
-
-
- )}
+ if (linkUrl.origin === supabaseUrl.origin) {
+ return linkUrl.toString()
+ }
+
+ return href
+ }}
+ >
+ {prompt.answer}
+
+ )}
+
+
+ )}
+
>
)
})}
@@ -559,7 +286,7 @@ const AiCommand = () => {
type="command"
onSelect={() => {
if (!search) {
- handleClippyConfirm(question)
+ handleConfirm(question)
}
}}
forceMount
@@ -572,35 +299,6 @@ const AiCommand = () => {
})}
)}
-
- {/* {promptData.length <= 0 && page === COMMAND_ROUTES.AI_RLS_POLICY && (
-
- {RLSquestions.map((question) => {
- const key = question.replace(/\s+/g, '_')
- return (
- {
- if (!query) {
- handleClippyConfirm(question)
- }
- }}
- forceMount
- key={key}
- >
-
- {question}
-
- )
- })}
-
- )} */}
-
- {/* {isLoading && (
-
-
{}
-
Searching for results
-
- )} */}
{hasClippyError && (
@@ -608,41 +306,27 @@ const AiCommand = () => {
Sorry, looks like Clippy is having a hard time!
Please try again in a bit.
- {/*
+
Try again?
- */}
-
- )}
-
- {/*
- esc
- */}
-
- {/* {!isLoading && answer && (
-
-
- Try again
- )} */}
+ )}
- {/*
setSearch(e.target.value)}
- // icon={
}
onKeyDown={(e) => {
switch (e.key) {
case 'Enter':
if (!search) {
return
}
- handleConfirm(selectedTab, search)
+ handleConfirm(search)
return
default:
return
@@ -651,17 +335,15 @@ const AiCommand = () => {
/>
-
+
Powered by OpenAI.
- {status ? (
+ {status && (
{(isLoading || isResponding) && }
{status}
- ) : (
- <>>
)}
From 7ee8a624dc12a7505bbd871b456add0a22ad3c56 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 16:12:18 -0600
Subject: [PATCH 43/94] fix(cmdk): type errors
---
.../ui/src/components/Command/AiCommand.tsx | 11 +++++--
.../src/components/Command/Command.utils.tsx | 8 +++--
.../ui/src/components/Command/CommandMenu.tsx | 4 +--
.../ui/src/components/Command/DocsSearch.tsx | 30 +++++++++++++++++--
.../src/components/Command/SearchButton.tsx | 2 +-
packages/ui/src/types/sse.d.ts | 12 ++++++++
packages/ui/tsconfig.json | 14 +++++++++
7 files changed, 69 insertions(+), 12 deletions(-)
create mode 100644 packages/ui/src/types/sse.d.ts
create mode 100644 packages/ui/tsconfig.json
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 7d34e38f364..721fb2c5dbb 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -23,9 +23,14 @@ const questions = [
function getEdgeFunctionUrl() {
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL?.replace(/\/$/, '')
- // if (IS_PLATFORM) {
- if (true) {
- // @ts-ignore
+ if (!supabaseUrl) {
+ throw new Error('Missing environment variable NEXT_PUBLIC_SUPABASE_URL')
+ }
+
+ // https://github.com/supabase/supabase-js/blob/10d3423506cbd56345f7f6ab2ec2093c8db629d4/src/SupabaseClient.ts#L96
+ const isPlatform = supabaseUrl.match(/(supabase\.co)|(supabase\.in)/)
+
+ if (isPlatform) {
const [schemeAndProjectId, domain, tld] = supabaseUrl.split('.')
return `${schemeAndProjectId}.functions.${domain}.${tld}`
} else {
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 09397c85211..aeb016d1341 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -278,13 +278,15 @@ export interface TextHighlighterProps
}
export const TextHighlighter = ({ text, query, ...props }: TextHighlighterProps) => {
- const highlightMatches = (text) => {
+ const highlightMatches = (text?: string) => {
+ if (!text) {
+ return ''
+ }
+
if (!query) {
return text
}
- if (!text) return ''
-
const regex = new RegExp(query, 'gi')
return text.replace(regex, (match) => `${match} `)
}
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 34084d23021..18a9639045f 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -64,7 +64,7 @@ const SearchOnlyItem = ({ children, isSubItem, ...props }: any) => {
const CommandMenu = () => {
const router = useRouter()
- const commandInputRef = useRef>()
+ const commandInputRef = useRef>(null)
const { isOpen, setIsOpen, actions, search, setSearch, pages, setPages, currentPage } =
useCommandMenu()
@@ -122,7 +122,7 @@ const CommandMenu = () => {
commandInputRef.current?.focus()
}
- const showCommandInput = !CHAT_ROUTES.includes(currentPage)
+ const showCommandInput = !currentPage || !CHAT_ROUTES.includes(currentPage)
return (
<>
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui/src/components/Command/DocsSearch.tsx
index aa1514e0dee..faa0e0f7630 100644
--- a/packages/ui/src/components/Command/DocsSearch.tsx
+++ b/packages/ui/src/components/Command/DocsSearch.tsx
@@ -24,8 +24,30 @@ const questions = [
'How do I set up authentication?',
]
+export enum PageType {
+ Markdown = 'markdown',
+ Reference = 'reference',
+}
+
+export interface PageSection {
+ slug: string
+ heading: string
+}
+
+export interface PageMetadata {
+ title: string
+ description: string
+}
+
+export interface PageResult {
+ type: PageType
+ path: string
+ meta: PageMetadata
+ sections: PageSection[]
+}
+
const DocsSearch = () => {
- const [results, setResults] = useState()
+ const [results, setResults] = useState()
const [hasSearchError, setHasSearchError] = useState(false)
const supabaseClient = useSupabaseClient()
const { isLoading, setIsLoading, search, setSearch } = useCommandMenu()
@@ -97,7 +119,9 @@ const DocsSearch = () => {
/>
)
- const IconContainer = (props) => (
+ const IconContainer = (
+ props: React.DetailedHTMLProps, HTMLDivElement>
+ ) => (
Date: Fri, 24 Mar 2023 17:30:31 -0600
Subject: [PATCH 44/94] feat(cmdk): gpt-3.5-turbo mvp
---
.../ui/src/components/Command/AiCommand.tsx | 53 +++++-------
supabase/functions/clippy-search/index.ts | 82 +++++++++++++++++--
supabase/functions/search/index.ts | 3 +
3 files changed, 100 insertions(+), 38 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 721fb2c5dbb..676405dac00 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -1,13 +1,16 @@
-import type { CreateCompletionResponse } from 'openai'
-import * as React from 'react'
+import type {
+ ChatCompletionResponseMessage,
+ CreateChatCompletionResponse,
+ CreateChatCompletionResponseChoicesInner,
+} from 'openai'
import { useCallback, useEffect, useReducer, useRef, useState } from 'react'
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { SSE } from 'sse.js'
import { Button, IconAlertCircle, IconAlertTriangle, IconLoader, IconUser, Input } from 'ui'
-import { CommandGroup, CommandItem } from './Command.utils'
import { AiIcon, AiIconChat } from './Command.icons'
+import { CommandGroup, CommandItem } from './Command.utils'
import { COMMAND_ROUTES } from './CommandMenu'
import { useCommandMenu } from './CommandMenuProvider'
@@ -20,6 +23,13 @@ const questions = [
'How do I set up authentication?',
]
+type CreateChatCompletionResponseChoicesInnerDelta = Omit<
+ CreateChatCompletionResponseChoicesInner,
+ 'message'
+> & {
+ delta: Partial
+}
+
function getEdgeFunctionUrl() {
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL?.replace(/\/$/, '')
@@ -142,8 +152,14 @@ const AiCommand = () => {
setIsResponding(true)
- const completionResponse: CreateCompletionResponse = JSON.parse(e.data)
- const [{ text }] = completionResponse.choices
+ const completionResponse: CreateChatCompletionResponse = JSON.parse(e.data)
+ const [
+ {
+ delta: { content },
+ },
+ ] = completionResponse.choices as CreateChatCompletionResponseChoicesInnerDelta[]
+
+ const text = content ?? ''
setAnswer((answer) => {
const currentAnswer = answer ?? ''
@@ -194,33 +210,6 @@ const AiCommand = () => {
return (
e.stopPropagation()}>
- {/* {!isLoading && !answer && !hasClippyError && (
-
-
-
Not sure where to start?
-
-
- {questions.map((question) => {
- const key = question.replace(/\s+/g, '_')
- return (
-
- {
- setQuery(question)
- handleClippyConfirm(question)
- }}
- >
- {question}
-
-
- )
- })}
-
-
-
- )} */}
-
{promptData.map((prompt, i) => {
if (!prompt.query) return <>>
diff --git a/supabase/functions/clippy-search/index.ts b/supabase/functions/clippy-search/index.ts
index 5ca3b422246..de86010809b 100644
--- a/supabase/functions/clippy-search/index.ts
+++ b/supabase/functions/clippy-search/index.ts
@@ -3,7 +3,13 @@ import 'https://deno.land/x/xhr@0.2.1/mod.ts'
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2.5.0'
import { codeBlock, oneLine } from 'https://esm.sh/common-tags@1.8.2'
import GPT3Tokenizer from 'https://esm.sh/gpt3-tokenizer@1.1.5'
-import { Configuration, CreateCompletionRequest, OpenAIApi } from 'https://esm.sh/openai@3.1.0'
+import {
+ ChatCompletionRequestMessage,
+ ChatCompletionRequestMessageRoleEnum,
+ Configuration,
+ CreateChatCompletionRequest,
+ OpenAIApi,
+} from 'https://esm.sh/openai@3.2.1'
import { ApplicationError, UserError } from '../common/errors.ts'
const openAiKey = Deno.env.get('OPENAI_KEY')
@@ -46,6 +52,9 @@ serve(async (req) => {
throw new UserError('Missing query in request data')
}
+ // Intentionally log the query
+ console.log({ query })
+
const sanitizedQuery = query.trim()
const supabaseClient = createClient(supabaseUrl, supabaseServiceKey)
@@ -127,15 +136,76 @@ serve(async (req) => {
Answer as markdown (including related code snippets if available):
`
- const completionOptions: CreateCompletionRequest = {
- model: 'text-davinci-003',
- prompt,
- max_tokens: 512,
+ const messages: ChatCompletionRequestMessage[] = [
+ {
+ role: ChatCompletionRequestMessageRoleEnum.System,
+ content: codeBlock`
+ ${oneLine`
+ You are a very enthusiastic Supabase AI who loves
+ to help people! Given the following information from
+ the Supabase documentation, answer the user's question using
+ only that information, outputted in markdown format.
+ `}
+
+ ${oneLine`
+ If you are unsure
+ and the answer is not explicitly written in the documentation, say
+ "Sorry, I don't know how to help with that."
+ `}
+
+ ${oneLine`
+ Always include related code snippets if available.
+ `}
+ `,
+ },
+ {
+ role: ChatCompletionRequestMessageRoleEnum.User,
+ content: codeBlock`
+ Here is the Supabase documentation:
+ ${contextText}
+ `,
+ },
+ {
+ role: ChatCompletionRequestMessageRoleEnum.User,
+ content: codeBlock`
+ ${oneLine`
+ Answer my next question using only the above documentation.
+ You must also follow the below rules when answering:
+ `}
+ ${oneLine`
+ - Do not make up answers that are not provided in the documentation.
+ `}
+ ${oneLine`
+ - If you are unsure and the answer is not explicitly written
+ in the documentation context, say
+ "Sorry, I don't know how to help with that."
+ `}
+ ${oneLine`
+ - Prefer splitting your response into multiple paragraphs.
+ `}
+ ${oneLine`
+ - Output as markdown with code snippets if available.
+ `}
+ `,
+ },
+ {
+ role: ChatCompletionRequestMessageRoleEnum.User,
+ content: codeBlock`
+ Here is my question:
+ ${oneLine`${sanitizedQuery}`}
+ `,
+ },
+ ]
+
+ const completionOptions: CreateChatCompletionRequest = {
+ model: 'gpt-3.5-turbo',
+ messages,
+ max_tokens: 1024,
temperature: 0,
stream: true,
}
- const response = await fetch('https://api.openai.com/v1/completions', {
+ const response = await fetch('https://api.openai.com/v1/chat/completions', {
headers: {
Authorization: `Bearer ${openAiKey}`,
'Content-Type': 'application/json',
diff --git a/supabase/functions/search/index.ts b/supabase/functions/search/index.ts
index a9a09ab2866..3d5c91c2904 100644
--- a/supabase/functions/search/index.ts
+++ b/supabase/functions/search/index.ts
@@ -45,6 +45,9 @@ serve(async (req) => {
throw new UserError('Missing query in request data')
}
+ // Intentionally log the query
+ console.log({ query })
+
const sanitizedQuery = query.trim()
const supabaseClient = createClient
(supabaseUrl, supabaseServiceKey)
From 539854a11943c95f3e7b382233c86f1a7bd2e9d0 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 18:05:10 -0600
Subject: [PATCH 45/94] fix(cmdk): carry over search query when selecting ai
---
packages/ui/src/components/Command/AiCommand.tsx | 7 -------
packages/ui/src/components/Command/CommandMenu.tsx | 2 +-
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 676405dac00..f737be5cb45 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -200,13 +200,6 @@ const AiCommand = () => {
}
}, [])
- const showActions =
- !search &&
- currentPage === COMMAND_ROUTES.AI_RLS_POLICY &&
- !isResponding &&
- !isLoading &&
- promptData.length > 0
-
return (
e.stopPropagation()}>
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 18a9639045f..e9af9c8b85a 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -168,7 +168,7 @@ const CommandMenu = () => {
{
- handleSetPages([...pages, COMMAND_ROUTES.AI], false)
+ handleSetPages([...pages, COMMAND_ROUTES.AI], true)
}}
forceMount
>
From d36551b71ebee6b6ba742a99c3017f8df7184a44 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Fri, 24 Mar 2023 18:10:28 -0600
Subject: [PATCH 46/94] fix(cmdk): show ai example questions
---
packages/ui/src/components/Command/AiCommand.tsx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index f737be5cb45..33d245c2775 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -11,7 +11,6 @@ import { SSE } from 'sse.js'
import { Button, IconAlertCircle, IconAlertTriangle, IconLoader, IconUser, Input } from 'ui'
import { AiIcon, AiIconChat } from './Command.icons'
import { CommandGroup, CommandItem } from './Command.utils'
-import { COMMAND_ROUTES } from './CommandMenu'
import { useCommandMenu } from './CommandMenuProvider'
const questions = [
@@ -264,7 +263,7 @@ const AiCommand = () => {
})}
- {promptData.length <= 0 && currentPage === COMMAND_ROUTES.AI_ASK_ANYTHING && (
+ {promptData.length === 0 && !hasClippyError && (
{questions.map((question) => {
const key = question.replace(/\s+/g, '_')
From 146fcfc7d3aa78c2a07f76b06c1e3482979eb4ce Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Sat, 25 Mar 2023 08:46:48 -0230
Subject: [PATCH 47/94] Fix active styles
---
packages/ui/src/components/Command/Command.utils.tsx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index aeb016d1341..f9f601d1bf0 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -189,8 +189,6 @@ export const CommandItem = React.forwardRef
Date: Sat, 25 Mar 2023 09:07:23 -0230
Subject: [PATCH 48/94] Add dashboard nav items
---
.../Command/dashboard-nav-items.json | 96 +++++++++++++++++++
1 file changed, 96 insertions(+)
create mode 100644 packages/ui/src/components/Command/dashboard-nav-items.json
diff --git a/packages/ui/src/components/Command/dashboard-nav-items.json b/packages/ui/src/components/Command/dashboard-nav-items.json
new file mode 100644
index 00000000000..c12948d2e88
--- /dev/null
+++ b/packages/ui/src/components/Command/dashboard-nav-items.json
@@ -0,0 +1,96 @@
+{
+ "items": [
+ {
+ "label": "Home",
+ "icon": "home",
+ "url": "http://www.example.com/home",
+ "sites": ["docs", "dashboard"],
+ "subItems": [
+ {
+ "label": "About",
+ "icon": "book",
+ "url": "http://www.example.com/about",
+ "sites": ["docs", "dashboard"]
+ },
+ {
+ "label": "Services",
+ "icon": "services",
+ "url": "http://www.example.com/services",
+ "sites": ["docs", "dashboard"]
+ },
+ {
+ "label": "Contact",
+ "icon": "contact",
+ "url": "http://www.example.com/contact",
+ "sites": ["docs", "dashboard"]
+ }
+ ]
+ },
+ {
+ "label": "Products",
+ "icon": "products",
+ "url": "http://www.example.com/products",
+ "sites": ["dashboard"],
+ "subItems": [
+ {
+ "label": "Mobile",
+ "icon": "mobile",
+ "url": "http://www.example.com/products/mobile"
+ },
+ {
+ "label": "In person",
+ "icon": "person",
+ "url": "http://www.example.com/products/in-person"
+ }
+ ]
+ }
+ ],
+ "docsTools": [
+ {
+ "label": "Database",
+ "url": "https://supabase.com/docs/guides/database"
+ },
+ {
+ "label": "Auth",
+ "url": "https://supabase.com/docs/guides/auth/overview"
+ },
+ {
+ "label": "Edge Functions",
+ "url": "https://supabase.com/docs/guides/functions"
+ },
+ {
+ "label": "Realtime",
+ "url": "https://supabase.com/docs/guides/realtime"
+ },
+ {
+ "label": "Storage",
+ "url": "https://supabase.com/docs/guides/storage"
+ }
+ ],
+ "docsSupport": [
+ {
+ "label": "Support",
+ "url": "https://supabase.com/support"
+ },
+ {
+ "label": "System Status",
+ "url": "https://status.supabase.com/"
+ },
+ {
+ "label": "Github Discussions",
+ "url": "https://github.com/supabase/supabase/discussions"
+ }
+ ],
+ "docsGeneral": [
+ {
+ "icon": "arrowRight",
+ "label": "Go to the Dashboard",
+ "url": "https://app.supabase.io"
+ },
+ {
+ "icon": "inbox",
+ "label": "Read the Changelog",
+ "url": "https://supabase.com/changelog"
+ }
+ ]
+}
From d2401641d92e659d6aa15f467740c61c6026906d Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Sat, 25 Mar 2023 12:34:05 -0230
Subject: [PATCH 49/94] Move shortcuts bar to own file
---
.../Command/CommandMenuShortcuts.tsx | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 packages/ui/src/components/Command/CommandMenuShortcuts.tsx
diff --git a/packages/ui/src/components/Command/CommandMenuShortcuts.tsx b/packages/ui/src/components/Command/CommandMenuShortcuts.tsx
new file mode 100644
index 00000000000..bf0ae4581e1
--- /dev/null
+++ b/packages/ui/src/components/Command/CommandMenuShortcuts.tsx
@@ -0,0 +1,25 @@
+import React from 'react'
+import { CommandShortcut } from './Command.utils'
+import { useCommandMenu } from './CommandMenuProvider'
+
+export default function CommandMenuShortcuts() {
+ const { setPages, pages } = useCommandMenu()
+ return (
+
+ setPages([])}>{'Home'}
+ {pages.map((page, index) => (
+ {
+ if (index === pages.length - 1) {
+ return
+ }
+ setPages(pages.slice(0, index - 1))
+ }}
+ >
+ {page}
+
+ ))}
+
+ )
+}
From 57a1083f8f3b2bc349b95f04888045b272aa7735 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Sat, 25 Mar 2023 12:34:24 -0230
Subject: [PATCH 50/94] Start Dashboard specific files
---
.../Command/sections/DashboardTableEditor.tsx | 55 +++++++++++++++++++
.../Command/utils/dashboard-nav-items.json | 27 +++++++++
2 files changed, 82 insertions(+)
create mode 100644 packages/ui/src/components/Command/sections/DashboardTableEditor.tsx
create mode 100644 packages/ui/src/components/Command/utils/dashboard-nav-items.json
diff --git a/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx b/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx
new file mode 100644
index 00000000000..48b560416f5
--- /dev/null
+++ b/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx
@@ -0,0 +1,55 @@
+import { useRouter } from 'next/router'
+import * as React from 'react'
+import { IconArrowRight } from '../../Icon/icons/IconArrowRight'
+import dashboardItems from '../utils/dashboard-nav-items.json'
+import { CommandGroup, CommandItem, CommandLabel, CommandList } from '../Command.utils'
+import { useCommandMenu } from '../CommandMenuProvider'
+
+export default function DashboardTableEditor() {
+ const router = useRouter()
+ const { setPages, currentPage, pages } = useCommandMenu()
+ console.log('currentPage', currentPage)
+
+ return (
+
+
+ {!currentPage && (
+ <>
+ setPages([...pages, 'projects'])}>
+ Search projects…
+
+ setPages([...pages, 'teams'])}>
+ Join a team…
+
+ >
+ )}
+
+ {currentPage === 'projects' && (
+ <>
+
+
+ projects sub item
+
+
+ Project B
+ >
+ )}
+
+ {currentPage === 'teams' && (
+ <>
+ Team 1
+ Team 2
+ >
+ )}
+
+ {/* {dashboardItems.tools.items.map((item) => (
+ router.push(item.url)}>
+
+
+ Go to {item.label}
+
+
+ ))} */}
+
+ )
+}
diff --git a/packages/ui/src/components/Command/utils/dashboard-nav-items.json b/packages/ui/src/components/Command/utils/dashboard-nav-items.json
new file mode 100644
index 00000000000..3f85105ec7c
--- /dev/null
+++ b/packages/ui/src/components/Command/utils/dashboard-nav-items.json
@@ -0,0 +1,27 @@
+{
+ "tools": {
+ "label": "Dashboard Tools",
+ "items": [
+ {
+ "label": "dashboard - Database",
+ "url": "https://supabase.com/docs/guides/database"
+ },
+ {
+ "label": "dashboard - Auth",
+ "url": "https://supabase.com/docs/guides/auth/overview"
+ },
+ {
+ "label": "dashboard - Edge Functions",
+ "url": "https://supabase.com/docs/guides/functions"
+ },
+ {
+ "label": "dashboard - Realtime",
+ "url": "https://supabase.com/docs/guides/realtime"
+ },
+ {
+ "label": "dashboard - Storage",
+ "url": "https://supabase.com/docs/guides/storage"
+ }
+ ]
+ }
+}
From 8a6c6872bb2a591327e8a908f8e0bfa54a484ebe Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Sat, 25 Mar 2023 12:34:57 -0230
Subject: [PATCH 51/94] Add separate dashboard file
---
.../ui/src/components/Command/CommandMenu.tsx | 27 +++++--------------
.../docs-nav-items.json} | 0
2 files changed, 7 insertions(+), 20 deletions(-)
rename packages/ui/src/components/Command/{command-nav-items.json => utils/docs-nav-items.json} (100%)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index e9af9c8b85a..ca2aba5bde3 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -14,7 +14,7 @@ import { IconPhone } from './../Icon/icons/IconPhone'
import { IconUser } from './../Icon/icons/IconUser'
import AiCommand from './AiCommand'
-import navItems from './command-nav-items.json'
+import navItems from './utils/docs-nav-items.json'
import { AiIcon } from './Command.icons'
import {
CommandDialog,
@@ -27,6 +27,8 @@ import {
} from './Command.utils'
import { useCommandMenu } from './CommandMenuProvider'
import DocsSearch from './DocsSearch'
+import DashboardTableEditor from './sections/DashboardTableEditor'
+import CommandMenuShortcuts from './CommandMenuShortcuts'
export const COMMAND_ROUTES = {
AI: 'Supabase AI',
@@ -135,24 +137,7 @@ const CommandMenu = () => {
size={'xlarge'}
className={'max-h-[70vh] lg:max-h-[50vh] overflow-hidden overflow-y-auto'}
>
- {pages.length > 0 && (
-
- handleSetPages([])}>{'Home'}
- {pages.map((page, index) => (
- {
- if (index === pages.length - 1) {
- return
- }
- handleSetPages(pages.slice(0, index - 1))
- }}
- >
- {page}
-
- ))}
-
- )}
+ {pages.length > 0 && }
{showCommandInput && (
{
-
+
{navItems.docsTools.map((item) => (
router.push(item.url)}>
@@ -217,6 +202,8 @@ const CommandMenu = () => {
))}
+
+
{navItems.docsSupport.map((item) => (
router.push(item.url)}>
diff --git a/packages/ui/src/components/Command/command-nav-items.json b/packages/ui/src/components/Command/utils/docs-nav-items.json
similarity index 100%
rename from packages/ui/src/components/Command/command-nav-items.json
rename to packages/ui/src/components/Command/utils/docs-nav-items.json
From 7df3151384b88fda2d5f9936b748d1b1fd6bd45b Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Sat, 25 Mar 2023 12:45:43 -0230
Subject: [PATCH 52/94] Move everything in the hook
---
.../ui/src/components/Command/CommandMenu.tsx | 15 +++------------
.../Command/sections/DashboardTableEditor.tsx | 1 +
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index ca2aba5bde3..3beb7a0fea6 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -118,12 +118,6 @@ const CommandMenu = () => {
)
}
- function handleSetPages(pages: string[], keepSearch?: boolean) {
- setPages(pages)
- if (!keepSearch) setSearch('')
- commandInputRef.current?.focus()
- }
-
const showCommandInput = !currentPage || !CHAT_ROUTES.includes(currentPage)
return (
@@ -153,7 +147,7 @@ const CommandMenu = () => {
{
- handleSetPages([...pages, COMMAND_ROUTES.AI], true)
+ setPages([...pages, COMMAND_ROUTES.AI])
}}
forceMount
>
@@ -172,7 +166,7 @@ const CommandMenu = () => {
handleSetPages([...pages, COMMAND_ROUTES.DOCS_SEARCH], true)}
+ onSelect={() => setPages([...pages, COMMAND_ROUTES.DOCS_SEARCH])}
forceMount
>
@@ -225,10 +219,7 @@ const CommandMenu = () => {
- handleSetPages([...pages, 'Theme'], false)}
- >
+ setPages([...pages, 'Theme'])}>
Change theme
diff --git a/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx b/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx
index 48b560416f5..8b4a6a6fb99 100644
--- a/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx
+++ b/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx
@@ -9,6 +9,7 @@ export default function DashboardTableEditor() {
const router = useRouter()
const { setPages, currentPage, pages } = useCommandMenu()
console.log('currentPage', currentPage)
+ console.log('pages', pages)
return (
From 65456beffa1987b6bd7795c26a5cf18090e3f372 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Sat, 25 Mar 2023 15:05:20 -0230
Subject: [PATCH 53/94] Add new menu items
---
.../ui/src/components/Command/CommandMenu.tsx | 3 ++
.../Command/sections/DashboardTableEditor.tsx | 7 ---
.../Command/utils/dashboard-nav-items.json | 50 ++++++++++++++++++-
3 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 3beb7a0fea6..7692fe9a3d3 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -70,6 +70,9 @@ const CommandMenu = () => {
const { isOpen, setIsOpen, actions, search, setSearch, pages, setPages, currentPage } =
useCommandMenu()
+ console.log('currentPage page', currentPage)
+ console.log('pages page', pages)
+
const ThemeOptions = ({ isSubItem = false }) => {
return (
diff --git a/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx b/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx
index 8b4a6a6fb99..df63bc8ff39 100644
--- a/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx
+++ b/packages/ui/src/components/Command/sections/DashboardTableEditor.tsx
@@ -8,8 +8,6 @@ import { useCommandMenu } from '../CommandMenuProvider'
export default function DashboardTableEditor() {
const router = useRouter()
const { setPages, currentPage, pages } = useCommandMenu()
- console.log('currentPage', currentPage)
- console.log('pages', pages)
return (
@@ -27,11 +25,6 @@ export default function DashboardTableEditor() {
{currentPage === 'projects' && (
<>
-
-
- projects sub item
-
-
Project B
>
)}
diff --git a/packages/ui/src/components/Command/utils/dashboard-nav-items.json b/packages/ui/src/components/Command/utils/dashboard-nav-items.json
index 3f85105ec7c..86b94adb9fb 100644
--- a/packages/ui/src/components/Command/utils/dashboard-nav-items.json
+++ b/packages/ui/src/components/Command/utils/dashboard-nav-items.json
@@ -4,7 +4,18 @@
"items": [
{
"label": "dashboard - Database",
- "url": "https://supabase.com/docs/guides/database"
+ "url": "https://supabase.com/docs/guides/database",
+ "subItems": [
+ {
+ "label": "Triggers",
+ "url": "http://www.example.com/triggers"
+ },
+ {
+ "label": "Functions",
+ "icon": "functions",
+ "url": "http://www.example.com/functions"
+ }
+ ]
},
{
"label": "dashboard - Auth",
@@ -23,5 +34,42 @@
"url": "https://supabase.com/docs/guides/storage"
}
]
+ },
+ "settings": {
+ "label": "Dashboard Settings",
+ "items": [
+ {
+ "label": "settings - Database general",
+ "url": "https://supabase.com/docs/guides/database"
+ },
+ {
+ "label": "settings - Database settings",
+ "url": "https://supabase.com/docs/guides/auth/overview"
+ },
+ {
+ "label": "settings - API settings",
+ "url": "https://supabase.com/docs/guides/functions"
+ },
+ {
+ "label": "settings - Auth settings",
+ "url": "https://supabase.com/docs/guides/realtime"
+ },
+ {
+ "label": "settings - Storage settings",
+ "url": "https://supabase.com/docs/guides/storage"
+ },
+ {
+ "label": "settings - subscription settings",
+ "url": "https://supabase.com/docs/guides/storage"
+ },
+ {
+ "label": "settings - usage settings",
+ "url": "https://supabase.com/docs/guides/storage"
+ },
+ {
+ "label": "settings - invoices settings",
+ "url": "https://supabase.com/docs/guides/storage"
+ }
+ ]
}
}
From 063c999c4bf6ab00c1ef7bcb714c2123651290ae Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Sat, 25 Mar 2023 15:31:31 -0230
Subject: [PATCH 54/94] Add shared items with actual dashboard items
---
.../ui/src/components/Command/CommandMenu.tsx | 20 ++++++++++++-
.../Command/utils/shared-nav-items.json | 28 +++++++++++++++++++
2 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 packages/ui/src/components/Command/utils/shared-nav-items.json
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 7692fe9a3d3..e4ca4a21f44 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -15,6 +15,7 @@ import { IconUser } from './../Icon/icons/IconUser'
import AiCommand from './AiCommand'
import navItems from './utils/docs-nav-items.json'
+import sharedItems from './utils/shared-nav-items.json'
import { AiIcon } from './Command.icons'
import {
CommandDialog,
@@ -64,6 +65,8 @@ const SearchOnlyItem = ({ children, isSubItem, ...props }: any) => {
return {children}
}
+const projectRef = ''
+
const CommandMenu = () => {
const router = useRouter()
const commandInputRef = useRef>(null)
@@ -199,7 +202,22 @@ const CommandMenu = () => {
))}
-
+
+ {sharedItems.sharedTools.map((item) => {
+ const itemUrl = projectRef ? item.url.replace('_', projectRef) : item.url
+
+ return (
+ router.push(itemUrl)}>
+
+
+ Dashboard: {item.label}
+
+
+ )
+ })}
+
+
+ {/* */}
{navItems.docsSupport.map((item) => (
diff --git a/packages/ui/src/components/Command/utils/shared-nav-items.json b/packages/ui/src/components/Command/utils/shared-nav-items.json
new file mode 100644
index 00000000000..aa2abb16c52
--- /dev/null
+++ b/packages/ui/src/components/Command/utils/shared-nav-items.json
@@ -0,0 +1,28 @@
+{
+ "sharedTools": [
+ {
+ "label": "Table Editor",
+ "url": "https://app.supabase.com/project/_/editor"
+ },
+ {
+ "label": "SQL Editor",
+ "url": "https://app.supabase.com/project/_/sql"
+ },
+ {
+ "label": "Database",
+ "url": "https://app.supabase.com/project/_/database/tables"
+ },
+ {
+ "label": "Auth",
+ "url": "https://app.supabase.com/project/_/auth/users"
+ },
+ {
+ "label": "Storage",
+ "url": "https://app.supabase.com/project/_/storage"
+ },
+ {
+ "label": "Project Settings",
+ "url": "https://app.supabase.com/project/_/settings/general"
+ }
+ ]
+}
From e53214f3bca7a6af7db0c71801ef624600287d2a Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Mon, 27 Mar 2023 14:42:41 +0800
Subject: [PATCH 55/94] remove old prop
---
studio/components/interfaces/Settings/Logs/LogsFilterPopover.tsx | 1 -
studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx | 1 -
2 files changed, 2 deletions(-)
diff --git a/studio/components/interfaces/Settings/Logs/LogsFilterPopover.tsx b/studio/components/interfaces/Settings/Logs/LogsFilterPopover.tsx
index 94297f85347..d830bc030fe 100644
--- a/studio/components/interfaces/Settings/Logs/LogsFilterPopover.tsx
+++ b/studio/components/interfaces/Settings/Logs/LogsFilterPopover.tsx
@@ -77,7 +77,6 @@ const LogsFilterPopover: React.FC = ({
)}
}
- portalled
showClose
side="bottom"
>
diff --git a/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx b/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
index 1a4f927f322..9baa2711c85 100644
--- a/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
+++ b/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
@@ -102,7 +102,6 @@ const LogsQueryPanel = ({
}`}
>
From 9c0779b7a760cc024ede07dab5094842bce0df5f Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Mon, 27 Mar 2023 14:43:04 +0800
Subject: [PATCH 56/94] rename prop due to new radix version
---
packages/ui/src/components/ContextMenu/ContextMenu.tsx | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/packages/ui/src/components/ContextMenu/ContextMenu.tsx b/packages/ui/src/components/ContextMenu/ContextMenu.tsx
index bbf300a4540..5a364ca4d5e 100644
--- a/packages/ui/src/components/ContextMenu/ContextMenu.tsx
+++ b/packages/ui/src/components/ContextMenu/ContextMenu.tsx
@@ -43,7 +43,7 @@ function ContextMenu({
@@ -152,11 +152,7 @@ interface RadioGroupProps {
onChange?(x: string): void
}
-export function RadioGroup({
- children,
- value: propsValue,
- onChange,
-}: RadioGroupProps) {
+export function RadioGroup({ children, value: propsValue, onChange }: RadioGroupProps) {
const [value, setValue] = useState(propsValue ? propsValue : '')
const handleChange = (e: string) => {
From de4ccdeb7b6f6a4a110a250c9da434ea8a7e2609 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Mon, 27 Mar 2023 14:43:46 +0800
Subject: [PATCH 57/94] fix: new react uses new FocusEvent
---
.../ui/src/components/Form/FormContext.tsx | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/packages/ui/src/components/Form/FormContext.tsx b/packages/ui/src/components/Form/FormContext.tsx
index d49db95209b..108b23b8cb0 100644
--- a/packages/ui/src/components/Form/FormContext.tsx
+++ b/packages/ui/src/components/Form/FormContext.tsx
@@ -4,7 +4,7 @@ interface ContextProps {
formContextOnChange: any
values: any
errors: any
- handleBlur: React.FocusEventHandler | null
+ handleBlur: ((e: React.FocusEvent) => void) | null
touched: any
fieldLevelValidation: any
}
@@ -25,14 +25,7 @@ const FormContext = createContext({
})
export const FormContextProvider = (props: Provider) => {
- const {
- formContextOnChange,
- values,
- errors,
- handleBlur,
- touched,
- fieldLevelValidation,
- } = props
+ const { formContextOnChange, values, errors, handleBlur, touched, fieldLevelValidation } = props
const value = {
formContextOnChange: formContextOnChange,
@@ -43,18 +36,14 @@ export const FormContextProvider = (props: Provider) => {
fieldLevelValidation: fieldLevelValidation,
}
- return (
- {props.children}
- )
+ return {props.children}
}
// context helper to avoid using a consumer component
export const useFormContext = () => {
const context = useContext(FormContext)
if (context === undefined) {
- throw new Error(
- `useFormContextOnChange must be used within a FormContextProvider.`
- )
+ throw new Error(`useFormContextOnChange must be used within a FormContextProvider.`)
}
return context
}
From 42f517558f48d0bb3592e736e412301fd0435c9e Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Mon, 27 Mar 2023 14:44:00 +0800
Subject: [PATCH 58/94] remove old portalled prop.
---
packages/ui/src/components/Popover/Popover.stories.tsx | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/packages/ui/src/components/Popover/Popover.stories.tsx b/packages/ui/src/components/Popover/Popover.stories.tsx
index ba4d741ba9f..ae252d77219 100644
--- a/packages/ui/src/components/Popover/Popover.stories.tsx
+++ b/packages/ui/src/components/Popover/Popover.stories.tsx
@@ -1,10 +1,7 @@
import { Button } from '../Button'
-import { Divider } from '../Divider'
-import { IconChevronDown } from '../../index'
-import Typography from '../Typography'
+import { IconChevronDown } from '../Icon/icons/IconChevronDown'
import { Popover } from '.'
-import { IconLogIn } from '../Icon/icons/IconLogIn'
import { Input } from '../Input'
export default {
@@ -19,7 +16,6 @@ export const Default = (args: any) => (
side="bottom"
align="end"
size="content"
- portalled
showClose
header={
From 8de25a7d722d40b911cdb85d19f203982f83e5ff Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Mon, 27 Mar 2023 14:49:56 +0800
Subject: [PATCH 59/94] fix: _app type issues in Next due to new next version
and react
---
studio/types/next.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/studio/types/next.ts b/studio/types/next.ts
index 629d626cc8b..440e552e411 100644
--- a/studio/types/next.ts
+++ b/studio/types/next.ts
@@ -2,11 +2,11 @@ import { NextPage } from 'next'
import { AppProps } from 'next/app'
import { ComponentType, ReactElement, ReactNode } from 'react'
-export type AppPropsWithLayout = AppProps & {
+export type AppPropsWithLayout = AppProps<{ dehydratedState: any }> & {
Component: NextPageWithLayout
}
-export type NextPageWithLayout = NextPage
& {
+export type NextPageWithLayout
= NextPage
& {
getLayout?: (page: ReactElement) => ReactNode
}
From b9e96254d34a02cbd557bd5d1e12666de7a112fe Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Mon, 27 Mar 2023 14:50:08 +0800
Subject: [PATCH 60/94] fix: tooltip now uses a global provider
---
studio/pages/_app.tsx | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/studio/pages/_app.tsx b/studio/pages/_app.tsx
index 8451a828264..b75a65ae542 100644
--- a/studio/pages/_app.tsx
+++ b/studio/pages/_app.tsx
@@ -41,6 +41,7 @@ import PageTelemetry from 'components/ui/PageTelemetry'
import FlagProvider from 'components/ui/Flag/FlagProvider'
import useAutoAuthRedirect from 'hooks/misc/useAutoAuthRedirect'
import CommandMenuProvider from 'ui/src/components/Command/CommandMenuProvider'
+import { TooltipProvider } from '@radix-ui/react-tooltip'
dayjs.extend(customParseFormat)
dayjs.extend(utc)
@@ -114,13 +115,15 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
-
-
-
- {getLayout( )}
-
-
-
+
+
+
+
+ {getLayout( )}
+
+
+
+
From 9252f4debc8f22bdb2ed3f8e201ab64981c02f1d Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Mon, 27 Mar 2023 16:47:21 +0800
Subject: [PATCH 61/94] fix: styles in links
---
.../src/components/Command/Command.utils.tsx | 68 +++++++++++--------
.../ui/src/components/Command/DocsSearch.tsx | 4 +-
2 files changed, 42 insertions(+), 30 deletions(-)
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index f9f601d1bf0..97c2a89408f 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -178,7 +178,7 @@ type CommandPrimitiveItemElement = React.ElementRef
export interface CommandItemProps extends CommandPrimitiveItemProps {
- type: 'link' | 'command'
+ type: 'link' | 'block-link' | 'command'
}
export const CommandItem = React.forwardRef(
@@ -186,42 +186,54 @@ export const CommandItem = React.forwardRef {
forceMount
key={`${page.meta.title}-item-index-${i}`}
value={`${page.meta.title}-item-index-${i}`}
- type="link"
+ type="block-link"
onSelect={() => {
// TODO: replace with Next.js router/Link when cross-project link logic solved
window.location.assign(`/docs/${page.path}`)
@@ -196,7 +196,7 @@ const DocsSearch = () => {
}}
key={`${page.meta.title}__${section.heading}-item-index-${i}`}
value={`${page.meta.title}__${section.heading}-item-index-${i}`}
- type="link"
+ type="block-link"
>
From cbd573b77dc426b6c750f24150a15425ae7db358 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 00:07:57 +0800
Subject: [PATCH 62/94] fix x index issue
---
packages/ui/src/lib/theme/defaultTheme.ts | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/packages/ui/src/lib/theme/defaultTheme.ts b/packages/ui/src/lib/theme/defaultTheme.ts
index d5cc6ffea72..53809a966fe 100644
--- a/packages/ui/src/lib/theme/defaultTheme.ts
+++ b/packages/ui/src/lib/theme/defaultTheme.ts
@@ -1478,7 +1478,6 @@ export default {
opacity-75
data-closed:animate-fade-out-overlay-bg
data-open:animate-fade-in-overlay-bg
- z-40
`,
scroll_overlay: `
fixed
@@ -1487,7 +1486,7 @@ export default {
place-items-center
overflow-y-auto
data-open:animate-overlay-show data-closed:animate-overlay-hide
- z-50
+
`,
separator: `
w-full
From e164cfd3d889e3192a386c1a9cd58846d6a64dad Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Mon, 27 Mar 2023 22:31:12 -0230
Subject: [PATCH 63/94] Add site prop for provider
---
apps/docs/pages/_app.tsx | 4 ++--
studio/pages/_app.tsx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index f4d0859d366..f26400c6502 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -66,7 +66,7 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
{IS_PLATFORM || LOCAL_SUPABASE ? (
-
+
@@ -75,7 +75,7 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
) : (
-
+
diff --git a/studio/pages/_app.tsx b/studio/pages/_app.tsx
index b75a65ae542..f9c80b2081a 100644
--- a/studio/pages/_app.tsx
+++ b/studio/pages/_app.tsx
@@ -109,7 +109,7 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
window.dataLayer = window.dataLayer || [];
function gtag(){window.dataLayer.push(arguments);}
gtag('js', new Date());
-
+
gtag('config', '${process.env.NEXT_PUBLIC_GA4_MEASUREMENT_ID}', { 'send_page_view': false });
`}
@@ -118,7 +118,7 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
-
+
{getLayout( )}
From 811759aca206d5f0969ff7f80e916ec77d28cc07 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Mon, 27 Mar 2023 22:31:37 -0230
Subject: [PATCH 64/94] Start separating docs sections
---
.../ui/src/components/Command/CommandMenu.tsx | 84 +++++++------------
1 file changed, 30 insertions(+), 54 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index e4ca4a21f44..b7e0e07a269 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -30,6 +30,8 @@ import { useCommandMenu } from './CommandMenuProvider'
import DocsSearch from './DocsSearch'
import DashboardTableEditor from './sections/DashboardTableEditor'
import CommandMenuShortcuts from './CommandMenuShortcuts'
+import SearchOnlyItem from './SearchOnlyItem'
+import SearchableStudioItems from './SearchableStudioItems'
export const COMMAND_ROUTES = {
AI: 'Supabase AI',
@@ -57,20 +59,13 @@ const iconPicker: { [key: string]: React.ReactNode } = {
products: ,
}
-const SearchOnlyItem = ({ children, isSubItem, ...props }: any) => {
- const search = useCommandState((state) => state.search)
- // if search is empty & items is marked as a subItem, don't show it
- // ie: only show these items in search results, not top level
- if (!search && isSubItem) return null
- return {children}
-}
-
const projectRef = ''
const CommandMenu = () => {
const router = useRouter()
+
const commandInputRef = useRef>(null)
- const { isOpen, setIsOpen, actions, search, setSearch, pages, setPages, currentPage } =
+ const { isOpen, setIsOpen, actions, search, setSearch, pages, setPages, currentPage, site } =
useCommandMenu()
console.log('currentPage page', currentPage)
@@ -101,29 +96,6 @@ const CommandMenu = () => {
)
}
- const SearchableChildItems = ({ isSubItem = false }) => {
- return (
-
- {/* output only subItems */}
- {navItems.items
- .filter((item) => item.sites.includes('docs'))
- .flatMap((item) => item.subItems)
- .map((item) => (
- {
- console.log('hay')
- }}
- >
- {item.label}
-
- ))}
-
- )
- }
-
const showCommandInput = !currentPage || !CHAT_ROUTES.includes(currentPage)
return (
@@ -191,31 +163,35 @@ const CommandMenu = () => {
-
- {navItems.docsTools.map((item) => (
- router.push(item.url)}>
-
-
- Go to {item.label}
-
-
- ))}
-
-
-
- {sharedItems.sharedTools.map((item) => {
- const itemUrl = projectRef ? item.url.replace('_', projectRef) : item.url
-
- return (
- router.push(itemUrl)}>
+ {site === 'docs' && (
+
+ {sharedItems.tools.map((item) => (
+ router.push(item.url)}>
- Dashboard: {item.label}
+ Go to {item.label}
- )
- })}
-
+ ))}
+
+ )}
+
+ {site === 'studio' && (
+
+ {sharedItems.tools.map((item) => {
+ const itemUrl = projectRef ? item.url.replace('_', projectRef) : item.url
+
+ return (
+ router.push(itemUrl)}>
+
+
+ Go to {item.label}
+
+
+ )
+ })}
+
+ )}
{/* */}
@@ -246,7 +222,7 @@ const CommandMenu = () => {
-
+ {site === 'studio' && }
>
)}
{currentPage === COMMAND_ROUTES.AI && }
From 2edef6843dc4548d71753204995792dd5821013f Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Mon, 27 Mar 2023 22:31:50 -0230
Subject: [PATCH 65/94] Allow for site prop
---
.../ui/src/components/Command/CommandMenuProvider.tsx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/packages/ui/src/components/Command/CommandMenuProvider.tsx b/packages/ui/src/components/Command/CommandMenuProvider.tsx
index 6d61b5a9285..53ceccf2cbd 100644
--- a/packages/ui/src/components/Command/CommandMenuProvider.tsx
+++ b/packages/ui/src/components/Command/CommandMenuProvider.tsx
@@ -14,6 +14,7 @@ export interface CommandMenuContextValue {
pages: string[]
setPages: React.Dispatch>
currentPage?: string
+ site: 'studio' | 'docs'
}
export const CommandMenuContext = createContext(undefined)
export const useCommandMenu = () => {
@@ -30,7 +31,10 @@ export interface CommandMenuActions {
toggleTheme: UseThemeProps['toggleTheme']
}
-const CommandMenuProvider = ({ children }: PropsWithChildren<{}>) => {
+const CommandMenuProvider = ({
+ children,
+ site,
+}: PropsWithChildren<{ site: 'studio' | 'docs' }>) => {
const [isOpen, setIsOpen] = useState(false)
const [isLoading, setIsLoading] = useState(false)
const [search, setSearch] = React.useState('')
@@ -57,6 +61,7 @@ const CommandMenuProvider = ({ children }: PropsWithChildren<{}>) => {
pages,
setPages,
currentPage,
+ site,
}}
>
{children}
@@ -64,7 +69,6 @@ const CommandMenuProvider = ({ children }: PropsWithChildren<{}>) => {
)
}
-
function useKeyboardEvents({
setIsOpen,
currentPage,
From 4fb69fc38221bdad67b715efe41792aaf6684b33 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Mon, 27 Mar 2023 22:32:03 -0230
Subject: [PATCH 66/94] Move searchable item component out
---
.../src/components/Command/SearchOnlyItem.tsx | 11 ++++++
.../Command/SearchableStudioItems.tsx | 34 +++++++++++++++++++
2 files changed, 45 insertions(+)
create mode 100644 packages/ui/src/components/Command/SearchOnlyItem.tsx
create mode 100644 packages/ui/src/components/Command/SearchableStudioItems.tsx
diff --git a/packages/ui/src/components/Command/SearchOnlyItem.tsx b/packages/ui/src/components/Command/SearchOnlyItem.tsx
new file mode 100644
index 00000000000..33f43ff78cc
--- /dev/null
+++ b/packages/ui/src/components/Command/SearchOnlyItem.tsx
@@ -0,0 +1,11 @@
+import { useCommandState } from 'cmdk-supabase'
+import React from 'react'
+import { CommandItem } from './Command.utils'
+
+export default function SearchOnlyItem({ children, isSubItem, ...props }: any) {
+ const search = useCommandState((state) => state.search)
+ // if search is empty & items is marked as a subItem, don't show it
+ // ie: only show these items in search results, not top level
+ if (!search && isSubItem) return null
+ return {children}
+}
diff --git a/packages/ui/src/components/Command/SearchableStudioItems.tsx b/packages/ui/src/components/Command/SearchableStudioItems.tsx
new file mode 100644
index 00000000000..6e0f89557d6
--- /dev/null
+++ b/packages/ui/src/components/Command/SearchableStudioItems.tsx
@@ -0,0 +1,34 @@
+import React from 'react'
+import { CommandGroup } from './Command.utils'
+import SearchOnlyItem from './SearchOnlyItem'
+import { useRouter } from 'next/router'
+
+import sharedItems from './utils/shared-nav-items.json'
+import { IconSearch } from '../Icon/icons/IconSearch'
+sharedItems.tools.map((item) => {
+ if (item.subItems) {
+ item.subItems.map((subItem) => {
+ console.log('sharedItems', subItem.label)
+ })
+ }
+})
+export default function SearchableStudioItems() {
+ const router = useRouter()
+ return (
+
+ {sharedItems.tools
+ .filter((item) => item.subItems) // filter items with subItems
+ .flatMap((item) =>
+ item.subItems?.map((subItem) => (
+ router.push(subItem.url)}
+ >
+ {subItem.label}
+
+ ))
+ )}
+
+ )
+}
From 2c9fea27d8f7d2f419c010bac20c92210dee440d Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Mon, 27 Mar 2023 22:32:11 -0230
Subject: [PATCH 67/94] Add searchable nav items
---
.../Command/utils/shared-nav-items.json | 154 +++++++++++++++++-
1 file changed, 150 insertions(+), 4 deletions(-)
diff --git a/packages/ui/src/components/Command/utils/shared-nav-items.json b/packages/ui/src/components/Command/utils/shared-nav-items.json
index aa2abb16c52..2de26f9866e 100644
--- a/packages/ui/src/components/Command/utils/shared-nav-items.json
+++ b/packages/ui/src/components/Command/utils/shared-nav-items.json
@@ -1,5 +1,5 @@
{
- "sharedTools": [
+ "tools": [
{
"label": "Table Editor",
"url": "https://app.supabase.com/project/_/editor"
@@ -10,19 +10,165 @@
},
{
"label": "Database",
- "url": "https://app.supabase.com/project/_/database/tables"
+ "url": "https://app.supabase.com/project/_/database/tables",
+ "subItems": [
+ {
+ "label": "Tables",
+ "url": "https://app.supabase.com/project/_/database/tables"
+ },
+ {
+ "label": "Triggers",
+ "url": "https://app.supabase.com/project/_/database/triggers"
+ },
+ {
+ "label": "Functions",
+ "url": "https://app.supabase.com/project/_/database/functions"
+ },
+ {
+ "label": "Extensions",
+ "url": "https://app.supabase.com/project/_/database/extensions"
+ },
+ {
+ "label": "Roles",
+ "url": "https://app.supabase.com/project/_/database/roles"
+ },
+ {
+ "label": "Replication",
+ "url": "https://app.supabase.com/project/_/database/replication"
+ },
+ {
+ "label": "Webhooks",
+ "url": "https://app.supabase.com/project/_/database/webhooks"
+ },
+ {
+ "label": "Backups",
+ "url": "https://app.supabase.com/project/_/database/backups/scheduled"
+ }
+ ]
},
{
"label": "Auth",
- "url": "https://app.supabase.com/project/_/auth/users"
+ "url": "https://app.supabase.com/project/_/auth/users",
+ "subItems": [
+ {
+ "label": "Users",
+ "url": "https://app.supabase.com/project/_/auth/users"
+ },
+ {
+ "label": "Policies",
+ "url": "https://app.supabase.com/project/_/auth/policies"
+ },
+ {
+ "label": "Providers",
+ "url": "https://app.supabase.com/project/_/auth/providers"
+ },
+ {
+ "label": "Email Templates",
+ "url": "https://app.supabase.com/project/_/auth/templates"
+ },
+ {
+ "label": "URL Configuration",
+ "url": "https://app.supabase.com/project/_/auth/url-configuration"
+ }
+ ]
},
{
"label": "Storage",
"url": "https://app.supabase.com/project/_/storage"
},
+ {
+ "label": "Edge Functions",
+ "url": "https://app.supabase.com/project/_/functions"
+ },
+ {
+ "label": "Logs",
+ "url": "https://app.supabase.com/project/_/logs/explorer",
+ "subItems": [
+ {
+ "label": "Postgres logs",
+ " url": "https://app.supabase.com/project/_/logs/postgres-logs"
+ },
+ {
+ "label": "PostgREST logs",
+ " url": "https://app.supabase.com/project/_/logs/postgrest-logs"
+ },
+ {
+ "label": "Postgres logs",
+ " url": "https://app.supabase.com/project/_/logs/pgbouncer-logs"
+ },
+ {
+ "label": "Auth logs logs",
+ " url": "https://app.supabase.com/project/_/logs/auth-logs"
+ },
+ {
+ "label": "Storage logs",
+ " url": "https://app.supabase.com/project/_/logs/storage-logs"
+ },
+ {
+ "label": "realtime logs",
+ " url": "https://app.supabase.com/project/_/logs/realtime-logs"
+ }
+ ]
+ },
+ {
+ "label": "API Docs",
+ "url": "https://app.supabase.com/project/_/api",
+ "subItems": [
+ {
+ "label": "Auth docs",
+ "url": "https://app.supabase.com/project/_/api?page=auth"
+ },
+ {
+ "label": "User management docs",
+ "url": "https://app.supabase.com/project/_/api?page=users"
+ },
+ {
+ "label": "Graphql",
+ "url": "https://app.supabase.com/project/_/api/graphiql"
+ }
+ ]
+ },
{
"label": "Project Settings",
- "url": "https://app.supabase.com/project/_/settings/general"
+ "url": "https://app.supabase.com/project/_/settings/general",
+ "subItems": [
+ {
+ "label": "General settings",
+ "url": "https://app.supabase.com/project/_/settings/general"
+ },
+ {
+ "label": "Database settings",
+ "url": "https://app.supabase.com/project/_/settings/database"
+ },
+ {
+ "label": "API settings",
+ "url": "https://app.supabase.com/project/_/settings/api"
+ },
+ {
+ "label": "Auth settings",
+ "url": "https://app.supabase.com/project/_/settings/auth"
+ },
+ {
+ "label": "Storage settings",
+ "url": "https://app.supabase.com/project/_/settings/storage"
+ },
+ {
+ "label": "Subscription settings",
+ "url": "https://app.supabase.com/project/_/settings/billing/subscription"
+ },
+ {
+ "label": "Project Usage",
+ "url": "https://app.supabase.com/project/_/settings/billing/usage"
+ },
+ {
+ "label": "Project Invoices",
+ "url": "https://app.supabase.com/project/_/settings/billing/invoices"
+ },
+ {
+ "label": "Project Invoices",
+ "url": "https://app.supabase.com/project/_/settings/billing/invoices"
+ }
+ ]
}
]
}
From 8296bd868b0357190d1c3ab379871191860ee335 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Mon, 27 Mar 2023 22:47:24 -0230
Subject: [PATCH 68/94] Fix type error
---
.../src/components/Command/SearchableStudioItems.tsx | 9 +--------
.../components/Command/utils/shared-nav-items.json | 12 ++++++------
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/packages/ui/src/components/Command/SearchableStudioItems.tsx b/packages/ui/src/components/Command/SearchableStudioItems.tsx
index 6e0f89557d6..4ff8c6aecb7 100644
--- a/packages/ui/src/components/Command/SearchableStudioItems.tsx
+++ b/packages/ui/src/components/Command/SearchableStudioItems.tsx
@@ -4,14 +4,7 @@ import SearchOnlyItem from './SearchOnlyItem'
import { useRouter } from 'next/router'
import sharedItems from './utils/shared-nav-items.json'
-import { IconSearch } from '../Icon/icons/IconSearch'
-sharedItems.tools.map((item) => {
- if (item.subItems) {
- item.subItems.map((subItem) => {
- console.log('sharedItems', subItem.label)
- })
- }
-})
+
export default function SearchableStudioItems() {
const router = useRouter()
return (
diff --git a/packages/ui/src/components/Command/utils/shared-nav-items.json b/packages/ui/src/components/Command/utils/shared-nav-items.json
index 2de26f9866e..262bf61aae7 100644
--- a/packages/ui/src/components/Command/utils/shared-nav-items.json
+++ b/packages/ui/src/components/Command/utils/shared-nav-items.json
@@ -86,27 +86,27 @@
"subItems": [
{
"label": "Postgres logs",
- " url": "https://app.supabase.com/project/_/logs/postgres-logs"
+ "url": "https://app.supabase.com/project/_/logs/postgres-logs"
},
{
"label": "PostgREST logs",
- " url": "https://app.supabase.com/project/_/logs/postgrest-logs"
+ "url": "https://app.supabase.com/project/_/logs/postgrest-logs"
},
{
"label": "Postgres logs",
- " url": "https://app.supabase.com/project/_/logs/pgbouncer-logs"
+ "url": "https://app.supabase.com/project/_/logs/pgbouncer-logs"
},
{
"label": "Auth logs logs",
- " url": "https://app.supabase.com/project/_/logs/auth-logs"
+ "url": "https://app.supabase.com/project/_/logs/auth-logs"
},
{
"label": "Storage logs",
- " url": "https://app.supabase.com/project/_/logs/storage-logs"
+ "url": "https://app.supabase.com/project/_/logs/storage-logs"
},
{
"label": "realtime logs",
- " url": "https://app.supabase.com/project/_/logs/realtime-logs"
+ "url": "https://app.supabase.com/project/_/logs/realtime-logs"
}
]
},
From 53aab94dd4ff2327002e4a35d046b6e54a450ca2 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 11:46:38 +0800
Subject: [PATCH 69/94] chore: remove new CMD+K. added Clippy modal back into
docs
---
.../NavigationMenu/TopNavBarRef.tsx | 4 +-
apps/docs/components/Search/SearchButton.tsx | 40 ++
apps/docs/components/Search/SearchModal.tsx | 423 ++++++++++++++++++
.../docs/components/Search/SearchProvider.tsx | 80 ++++
apps/docs/components/Search/SearchResult.tsx | 54 +++
apps/docs/pages/_app.tsx | 15 +-
studio/pages/_app.tsx | 8 +-
7 files changed, 614 insertions(+), 10 deletions(-)
create mode 100644 apps/docs/components/Search/SearchButton.tsx
create mode 100644 apps/docs/components/Search/SearchModal.tsx
create mode 100644 apps/docs/components/Search/SearchProvider.tsx
create mode 100644 apps/docs/components/Search/SearchResult.tsx
diff --git a/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx b/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx
index 7501f116c2a..0a2bdb7a696 100644
--- a/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/TopNavBarRef.tsx
@@ -3,11 +3,13 @@ import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { FC, useEffect, useState } from 'react'
-import { Button, IconCommand, IconGitHub, IconMoon, IconSearch, IconSun, SearchButton } from 'ui'
+import { Button, IconCommand, IconGitHub, IconMoon, IconSearch, IconSun } from 'ui'
import { REFERENCES } from '~/components/Navigation/Navigation.constants'
import { getPageType } from '~/lib/helpers'
+import SearchButton from '~/components/Search/SearchButton'
+
const TopNavBarRef: FC = () => {
const { isDarkMode, toggleTheme } = useTheme()
const [mounted, setMounted] = useState(false)
diff --git a/apps/docs/components/Search/SearchButton.tsx b/apps/docs/components/Search/SearchButton.tsx
new file mode 100644
index 00000000000..94da639a526
--- /dev/null
+++ b/apps/docs/components/Search/SearchButton.tsx
@@ -0,0 +1,40 @@
+import {
+ ButtonHTMLAttributes,
+ DetailedHTMLProps,
+ FC,
+ PropsWithChildren,
+ useEffect,
+ useRef,
+} from 'react'
+import { useActionKey } from '~/hooks/useActionKey'
+import { useSearch } from './SearchProvider'
+
+const SearchButton: FC<
+ PropsWithChildren, HTMLButtonElement>>
+> = ({ children, ...props }) => {
+ const searchButtonRef = useRef()
+ const { open, setQuery } = useSearch()
+
+ useEffect(() => {
+ function onKeyDown(event: KeyboardEvent) {
+ if (searchButtonRef.current === document.activeElement) {
+ if (/[a-zA-Z0-9]/.test(String.fromCharCode(event.keyCode))) {
+ open()
+ setQuery?.(event.key)
+ }
+ }
+ }
+ window.addEventListener('keydown', onKeyDown)
+ return () => {
+ window.removeEventListener('keydown', onKeyDown)
+ }
+ }, [open, setQuery])
+
+ return (
+
+ {children}
+
+ )
+}
+
+export default SearchButton
diff --git a/apps/docs/components/Search/SearchModal.tsx b/apps/docs/components/Search/SearchModal.tsx
new file mode 100644
index 00000000000..213035540b1
--- /dev/null
+++ b/apps/docs/components/Search/SearchModal.tsx
@@ -0,0 +1,423 @@
+import type { CreateCompletionResponse } from 'openai'
+import { FC, useCallback, useRef, useState } from 'react'
+import ReactMarkdown from 'react-markdown'
+import remarkGfm from 'remark-gfm'
+import { SSE } from 'sse.js'
+import clippyImageDark from '../../public/img/clippy-dark.png'
+import clippyImage from '../../public/img/clippy.png'
+
+import { useSupabaseClient } from '@supabase/auth-helpers-react'
+import { useTheme } from 'common/Providers'
+import Image from 'next/image'
+import {
+ Button,
+ IconAlertCircle,
+ IconAlertTriangle,
+ IconLoader,
+ IconSearch,
+ Input,
+ Loading,
+ Modal,
+ Tabs,
+} from 'ui'
+import components from '~/components'
+import { IS_PLATFORM } from '~/lib/constants'
+import { useSearch } from './SearchProvider'
+import SearchResult, { SearchResultType } from './SearchResult'
+
+const questions = [
+ 'How do I get started with Supabase?',
+ 'How do I run Supabase locally?',
+ 'How do I connect to my database?',
+ 'How do I run migrations? ',
+ 'How do I listen to changes in a table?',
+ 'How do I set up authentication?',
+]
+
+function getEdgeFunctionUrl() {
+ const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL?.replace(/\/$/, '')
+
+ if (IS_PLATFORM) {
+ const [schemeAndProjectId, domain, tld] = supabaseUrl.split('.')
+ return `${schemeAndProjectId}.functions.${domain}.${tld}`
+ } else {
+ return `${supabaseUrl}/functions/v1`
+ }
+}
+
+const edgeFunctionUrl = getEdgeFunctionUrl()
+
+const SearchModal: FC = () => {
+ const { isDarkMode } = useTheme()
+ const { close, query, setQuery } = useSearch()
+ const [answer, setAnswer] = useState('')
+ const [results, setResults] = useState()
+ const [isLoading, setIsLoading] = useState(false)
+ const [isResponding, setIsResponding] = useState(false)
+ const [hasClippyError, setHasClippyError] = useState(false)
+ const [hasSearchError, setHasSearchError] = useState(false)
+ const [selectedTab, setSelectedTab] = useState('search-panel')
+ const eventSourceRef = useRef()
+ const supabaseClient = useSupabaseClient()
+
+ const cantHelp = answer?.trim() === "Sorry, I don't know how to help with that."
+ const status = isLoading
+ ? 'Clippy is searching...'
+ : isResponding
+ ? 'Clippy is responding...'
+ : cantHelp || hasClippyError
+ ? 'Clippy has failed you'
+ : undefined
+
+ const handleSearchConfirm = useCallback(
+ async (query: string) => {
+ setResults(undefined)
+ setAnswer(undefined)
+ setIsResponding(false)
+ setHasClippyError(false)
+ setHasSearchError(false)
+ setIsLoading(true)
+
+ const { error, data: pageSections } = await supabaseClient.functions.invoke('search', {
+ body: { query },
+ })
+
+ setIsLoading(false)
+
+ if (error) {
+ setIsLoading(false)
+ setIsResponding(false)
+ setHasSearchError(true)
+ console.error(error)
+ return
+ }
+
+ if (!Array.isArray(pageSections)) {
+ setIsLoading(false)
+ setIsResponding(false)
+ setHasSearchError(true)
+ console.error('Malformed response')
+ return
+ }
+
+ setResults(pageSections)
+ },
+ [supabaseClient]
+ )
+
+ const handleClippyConfirm = useCallback(async (query: string) => {
+ setResults(undefined)
+ setAnswer(undefined)
+ setIsResponding(false)
+ setHasClippyError(false)
+ setHasSearchError(false)
+ setIsLoading(true)
+
+ const eventSource = new SSE(`${edgeFunctionUrl}/clippy-search`, {
+ headers: {
+ apikey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
+ Authorization: `Bearer ${process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY}`,
+ 'Content-Type': 'application/json',
+ },
+ payload: JSON.stringify({ query }),
+ })
+
+ function handleError(err: T) {
+ setIsLoading(false)
+ setIsResponding(false)
+ setHasClippyError(true)
+ console.error(err)
+ }
+
+ eventSource.addEventListener('error', handleError)
+ eventSource.addEventListener('message', (e) => {
+ try {
+ setIsLoading(false)
+
+ if (e.data === '[DONE]') {
+ setIsResponding(false)
+ return
+ }
+
+ setIsResponding(true)
+
+ const completionResponse: CreateCompletionResponse = JSON.parse(e.data)
+ const [{ text }] = completionResponse.choices
+
+ setAnswer((answer) => {
+ return (answer ?? '') + text
+ })
+ } catch (err) {
+ handleError(err)
+ }
+ })
+
+ eventSource.stream()
+
+ eventSourceRef.current = eventSource
+
+ setIsLoading(true)
+ }, [])
+
+ const handleConfirm = useCallback(
+ (selectedTab: string, query: string) => {
+ switch (selectedTab) {
+ case 'search-panel':
+ return handleSearchConfirm(query)
+ case 'clippy-panel':
+ return handleClippyConfirm(query)
+ }
+ },
+ [handleSearchConfirm, handleClippyConfirm]
+ )
+
+ function handleResetPrompt() {
+ eventSourceRef.current?.close()
+ eventSourceRef.current = undefined
+ setQuery('')
+ setResults(undefined)
+ setAnswer(undefined)
+ setIsResponding(false)
+ setHasClippyError(false)
+ setHasSearchError(false)
+ }
+ return (
+
+ e.stopPropagation()}
+ >
+
+
setQuery(e.target.value)}
+ icon={
}
+ onKeyDown={(e) => {
+ switch (e.key) {
+ case 'Enter':
+ if (!query) {
+ return
+ }
+ handleConfirm(selectedTab, query)
+ return
+ default:
+ return
+ }
+ }}
+ />
+
+
+ esc
+
+
+ {!isLoading && answer && (
+
+
+ Try again
+
+
+ )}
+
+
{
+ setSelectedTab(tabId)
+ if (!query) {
+ handleResetPrompt()
+ return
+ }
+ handleConfirm(tabId, query)
+ }}
+ >
+
+
+ {!isLoading && !hasSearchError && !results && (
+
+
+ Search Supabase guides & reference docs
+
+
+ )}
+ {results && results.length > 0 && (
+
+ {results.map((page) => {
+ const pageSections = page.sections.filter((section) => !!section.heading)
+ return (
+
+
+ {pageSections.length > 0 && (
+
+
+
+ {pageSections.map((section) => (
+
+ ))}
+
+
+ )}
+
+ )
+ })}
+
+ )}
+ {isLoading && (
+
+
{}
+
Searching for results
+
+ )}
+ {results && results.length === 0 && (
+
+
+
No results found.
+
+ Try again?
+
+
+ )}
+ {hasSearchError && (
+
+
+
+ Sorry, looks like we're having some issues with search!
+
+
Please try again in a bit.
+
+ Try again?
+
+
+ )}
+
+
+
+ {!isLoading && !answer && !hasClippyError && (
+
+
+
Not sure where to start?
+
+
+ {questions.map((question) => {
+ const key = question.replace(/\s+/g, '_')
+ return (
+
+ {
+ setQuery(question)
+ handleClippyConfirm(question)
+ }}
+ >
+ {question}
+
+
+ )
+ })}
+
+
+
+ )}
+ {answer && (
+
+ {cantHelp ? (
+
+
+
+
Sorry, I don't know how to help with that.
+
+
+ Try again?
+
+
+ ) : (
+
+ {
+ const supabaseUrl = new URL('https://supabase.com')
+ const linkUrl = new URL(href, 'https://supabase.com')
+
+ if (linkUrl.origin === supabaseUrl.origin) {
+ return linkUrl.toString()
+ }
+
+ return href
+ }}
+ components={components}
+ >
+ {answer}
+
+
+ )}
+
+ )}
+ {isLoading && (
+
+
{}
+
Searching for results
+
+ )}
+ {hasClippyError && (
+
+
+
+ Sorry, looks like Clippy is having a hard time!
+
+
Please try again in a bit.
+
+ Try again?
+
+
+ )}
+
+
+
+
+ {status ? (
+
+ {(isLoading || isResponding) && (
+
+ )}
+ {status}
+
+ ) : (
+ <>>
+ )}
+
+
+
+
+
+
+
+
+ )
+}
+
+export default SearchModal
diff --git a/apps/docs/components/Search/SearchProvider.tsx b/apps/docs/components/Search/SearchProvider.tsx
new file mode 100644
index 00000000000..4175c159c29
--- /dev/null
+++ b/apps/docs/components/Search/SearchProvider.tsx
@@ -0,0 +1,80 @@
+import {
+ createContext,
+ FC,
+ PropsWithChildren,
+ useCallback,
+ useContext,
+ useEffect,
+ useState,
+} from 'react'
+import { createPortal } from 'react-dom'
+import SearchModal from './SearchModal'
+
+export type SearchContextValue = {
+ isOpen: boolean
+ open: () => void
+ close: () => void
+ query: string
+ setQuery: (query: string) => void
+}
+
+export const SearchContext = createContext(null)
+
+export const useSearch = () => {
+ const { isOpen, open, close, query, setQuery } = useContext(SearchContext)
+
+ return { isOpen, open, close, query, setQuery }
+}
+
+const SearchProvider: FC> = ({ children }) => {
+ const [isOpen, setIsOpen] = useState(false)
+ const [query, setQuery] = useState('')
+
+ const open = useCallback(() => {
+ setIsOpen(true)
+ document.body.classList.add('DocSearch--active')
+ }, [])
+
+ const close = useCallback(() => {
+ setIsOpen(false)
+ document.body.classList.remove('DocSearch--active')
+ }, [])
+
+ useSearchKeyboardEvents({
+ open,
+ close,
+ })
+
+ return (
+
+ {children}
+ {isOpen && createPortal( , document.body)}
+
+ )
+}
+
+function useSearchKeyboardEvents({ open, close }) {
+ useEffect(() => {
+ function onKeyDown(event: KeyboardEvent) {
+ switch (event.key) {
+ case 'Escape':
+ close()
+ return
+ case 'k':
+ case '/':
+ if (event.metaKey || event.ctrlKey) {
+ open()
+ }
+ return
+ }
+ }
+
+ window.addEventListener('keydown', onKeyDown)
+
+ return () => {
+ window.removeEventListener('keydown', onKeyDown)
+ }
+ }, [open, close])
+}
+
+export default SearchProvider
diff --git a/apps/docs/components/Search/SearchResult.tsx b/apps/docs/components/Search/SearchResult.tsx
new file mode 100644
index 00000000000..d3689024ec5
--- /dev/null
+++ b/apps/docs/components/Search/SearchResult.tsx
@@ -0,0 +1,54 @@
+import Link from 'next/link'
+import { FC } from 'react'
+import { IconBookOpen, IconHash } from '~/../../packages/ui'
+import { useSearch } from './SearchProvider'
+
+export enum SearchResultType {
+ Document = 'document',
+ Section = 'section',
+}
+
+type Props = {
+ href: string
+ type: SearchResultType
+ title: string
+ chip?: string
+}
+
+const SearchResult: FC = ({ href, type, title, chip }) => {
+ const { close } = useSearch()
+
+ return (
+
+
+
+ {getIconByType(type)}
+
+
+ {chip && (
+
+ {chip}
+
+ )}
+
{title}
+
+
+
+ )
+}
+
+function getIconByType(type: SearchResultType) {
+ switch (type) {
+ case SearchResultType.Document:
+ return
+ case SearchResultType.Section:
+ return
+ default:
+ throw new Error(`Unknown search result type '${type}'`)
+ }
+}
+
+export default SearchResult
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index f26400c6502..1557f8ec9d7 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -4,8 +4,9 @@ import { ThemeProvider } from 'common/Providers'
import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'
import { AppPropsWithLayout } from 'types'
-import { CommandMenuProvider } from 'ui'
+// import { CommandMenuProvider } from 'ui'
import Favicons from '~/components/Favicons'
+import SearchProvider from '~/components/Search/SearchProvider'
import SiteLayout from '~/layouts/SiteLayout'
import { IS_PLATFORM, LOCAL_SUPABASE } from '~/lib/constants'
import { post } from '~/lib/fetchWrappers'
@@ -66,20 +67,24 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
{IS_PLATFORM || LOCAL_SUPABASE ? (
-
+
+ {/* */}
-
+ {/* */}
+
) : (
-
+
+ {/* */}
-
+ {/* */}
+
)}
>
diff --git a/studio/pages/_app.tsx b/studio/pages/_app.tsx
index f9c80b2081a..054c4fe8cfa 100644
--- a/studio/pages/_app.tsx
+++ b/studio/pages/_app.tsx
@@ -40,7 +40,7 @@ import { PortalToast, RouteValidationWrapper, AppBannerWrapper } from 'component
import PageTelemetry from 'components/ui/PageTelemetry'
import FlagProvider from 'components/ui/Flag/FlagProvider'
import useAutoAuthRedirect from 'hooks/misc/useAutoAuthRedirect'
-import CommandMenuProvider from 'ui/src/components/Command/CommandMenuProvider'
+// import CommandMenuProvider from 'ui/src/components/Command/CommandMenuProvider'
import { TooltipProvider } from '@radix-ui/react-tooltip'
dayjs.extend(customParseFormat)
@@ -118,9 +118,9 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
-
- {getLayout( )}
-
+ {/* */}
+ {getLayout( )}
+ {/* */}
From 05453de3dbf25d0cf26396f512cd37061bb3e724 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 14:01:13 +0800
Subject: [PATCH 70/94] update react-markdown
---
package-lock.json | 4 ++--
packages/ui/package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index fd1b73f8acb..90bde5cb45b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38026,7 +38026,7 @@
"postcss": "^8.4.5",
"prop-types": "^15.7.2",
"react-feather": "^2.0.10",
- "react-markdown": "^8.0.5",
+ "react-markdown": "^8.0.3",
"remark-gfm": "^3.0.1",
"sse.js": "^0.6.1",
"tailwind-merge": "^1.10.0",
@@ -66345,7 +66345,7 @@
"postcss": "^8.4.5",
"prop-types": "^15.7.2",
"react-feather": "^2.0.10",
- "react-markdown": "^8.0.5",
+ "react-markdown": "^8.0.3",
"remark-gfm": "^3.0.1",
"sse.js": "^0.6.1",
"tailwind-merge": "^1.10.0",
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 8e60fb31f3e..19657ecd01d 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -32,7 +32,7 @@
"postcss": "^8.4.5",
"prop-types": "^15.7.2",
"react-feather": "^2.0.10",
- "react-markdown": "^8.0.5",
+ "react-markdown": "^8.0.3",
"remark-gfm": "^3.0.1",
"sse.js": "^0.6.1",
"tailwind-merge": "^1.10.0",
From b92ea6348c259b6e7b1a5a3e0da7200400bfb6a9 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 15:13:07 +0800
Subject: [PATCH 71/94] comment out cmd k
---
packages/ui/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index 4e4381f7e49..8ed9dcc7a4a 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -56,7 +56,7 @@ export * from './src/components/Upload'
export * from './src/components/Form'
// CMD+K
-export * from './src/components/Command'
+// export * from './src/components/Command'
// config
From 838ab7cd5daf811884989b891d77d6bc5f44c76d Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 15:28:20 +0800
Subject: [PATCH 72/94] fix potential button issues
---
.../components/BuiltWithSupabase/index.tsx | 16 ++++--
.../Carousels/SplitCodeBlockCarousel.tsx | 4 +-
apps/www/components/Hero.tsx | 16 ++++--
.../components/Sections/GithubExamples.tsx | 16 ++++--
.../Sections/TwitterSocialProof.tsx | 30 ++++------
apps/www/pages/404.tsx | 8 ++-
apps/www/pages/database/Database.tsx | 8 ++-
apps/www/pages/pricing/index.tsx | 8 ++-
apps/www/pages/realtime/Realtime.tsx | 18 +++---
apps/www/pages/security.mdx | 8 ++-
apps/www/pages/storage/Storage.tsx | 57 ++++++++++---------
.../Functions/TerminalInstructions.tsx | 2 +-
.../LayoutHeader/HelpPopover.tsx | 8 ++-
studio/pages/join/index.tsx | 12 ++--
14 files changed, 112 insertions(+), 99 deletions(-)
diff --git a/apps/www/components/BuiltWithSupabase/index.tsx b/apps/www/components/BuiltWithSupabase/index.tsx
index 48d746c84c1..b467d87e570 100644
--- a/apps/www/components/BuiltWithSupabase/index.tsx
+++ b/apps/www/components/BuiltWithSupabase/index.tsx
@@ -16,18 +16,22 @@ const BuiltExamples = () => {
There are many example apps and starter projects to get going
diff --git a/apps/www/components/Carousels/SplitCodeBlockCarousel.tsx b/apps/www/components/Carousels/SplitCodeBlockCarousel.tsx
index c8f6c619d70..51d62b25d1e 100644
--- a/apps/www/components/Carousels/SplitCodeBlockCarousel.tsx
+++ b/apps/www/components/Carousels/SplitCodeBlockCarousel.tsx
@@ -126,9 +126,7 @@ function SplitCodeBlockCarousel(props: SplitCodeBlockCarousel) {
{extension.url && (
-
- View documentation
-
+ View documentation
)}
diff --git a/apps/www/components/Hero.tsx b/apps/www/components/Hero.tsx
index af950a66c16..e97cd31fa74 100644
--- a/apps/www/components/Hero.tsx
+++ b/apps/www/components/Hero.tsx
@@ -40,14 +40,18 @@ const Hero = () => {
diff --git a/apps/www/components/Sections/GithubExamples.tsx b/apps/www/components/Sections/GithubExamples.tsx
index 16b1c23d20c..85e3cb4e279 100644
--- a/apps/www/components/Sections/GithubExamples.tsx
+++ b/apps/www/components/Sections/GithubExamples.tsx
@@ -32,18 +32,22 @@ function GithubExamples() {
diff --git a/apps/www/components/Sections/TwitterSocialProof.tsx b/apps/www/components/Sections/TwitterSocialProof.tsx
index 66f2e9e5591..a657c2a20d2 100644
--- a/apps/www/components/Sections/TwitterSocialProof.tsx
+++ b/apps/www/components/Sections/TwitterSocialProof.tsx
@@ -37,28 +37,18 @@ function TwitterSocialProof() {
diff --git a/apps/www/pages/404.tsx b/apps/www/pages/404.tsx
index f31fe7d4dd3..321108babe9 100644
--- a/apps/www/pages/404.tsx
+++ b/apps/www/pages/404.tsx
@@ -61,9 +61,11 @@ const Error404 = () => {
diff --git a/apps/www/pages/database/Database.tsx b/apps/www/pages/database/Database.tsx
index ce752e0b7bf..4f3639cd5b5 100644
--- a/apps/www/pages/database/Database.tsx
+++ b/apps/www/pages/database/Database.tsx
@@ -298,9 +298,11 @@ function Database() {
text="We only show a few of the extensions supported by supabase here, but we preinstall many more that you can use right away."
/>
-
}>
- Explore documentation
-
+
+ }>
+ Explore documentation
+
+
diff --git a/apps/www/pages/pricing/index.tsx b/apps/www/pages/pricing/index.tsx
index 013b34c1752..a21572a338c 100644
--- a/apps/www/pages/pricing/index.tsx
+++ b/apps/www/pages/pricing/index.tsx
@@ -178,9 +178,11 @@ export default function IndexPage() {
{description}
-
- Get started
-
+
+
+ Get started
+
+
)
diff --git a/apps/www/pages/realtime/Realtime.tsx b/apps/www/pages/realtime/Realtime.tsx
index 890332c1478..ab01e1b7783 100644
--- a/apps/www/pages/realtime/Realtime.tsx
+++ b/apps/www/pages/realtime/Realtime.tsx
@@ -145,9 +145,9 @@ function RealtimePage() {
@@ -163,9 +163,9 @@ function RealtimePage() {
Store and synchronize online user state consistently across clients.
@@ -181,9 +181,9 @@ function RealtimePage() {
Send any data to any client subscribed to the same Channel.
diff --git a/apps/www/pages/security.mdx b/apps/www/pages/security.mdx
index 2d8f57f2243..5277691489c 100644
--- a/apps/www/pages/security.mdx
+++ b/apps/www/pages/security.mdx
@@ -130,9 +130,11 @@ As a database company, being SOC2 compliant is important when handling sensitive
diff --git a/apps/www/pages/storage/Storage.tsx b/apps/www/pages/storage/Storage.tsx
index e73eb303c40..e6296c35362 100644
--- a/apps/www/pages/storage/Storage.tsx
+++ b/apps/www/pages/storage/Storage.tsx
@@ -188,15 +188,16 @@ function StoragePage() {
text="Serve from the edge to reduce latency."
/>
-
}
- >
- Explore docs
-
+
+ }
+ >
+ Explore docs
+
+
@@ -206,15 +207,16 @@ function StoragePage() {
text="Resize and compress your media before you serve it."
/>
-
}
- >
- Explore docs
-
+
+ }
+ >
+ Explore docs
+
+
,
@@ -252,15 +254,16 @@ function StoragePage() {
- }
- >
- Explore documentation
-
+
+ }
+ >
+ Explore documentation
+
+
diff --git a/studio/components/interfaces/Functions/TerminalInstructions.tsx b/studio/components/interfaces/Functions/TerminalInstructions.tsx
index a5770812ef0..0a933c1d0b9 100644
--- a/studio/components/interfaces/Functions/TerminalInstructions.tsx
+++ b/studio/components/interfaces/Functions/TerminalInstructions.tsx
@@ -143,7 +143,7 @@ const TerminalInstructions: FC
= ({ closable = false, removeBorder = fals
href="https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions"
>
- }>
+ }>
Examples
diff --git a/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx b/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
index 0436b50b488..7f8bdc90e39 100644
--- a/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
+++ b/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
@@ -37,9 +37,11 @@ const HelpPopover: FC = () => {
From 48199a504cf09bc89a3da217fe989e49c87fa466 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 15:32:16 +0800
Subject: [PATCH 73/94] realign popover
---
.../TableGridEditor/SidePanelEditor/TableEditor/Column.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
index a7103481951..d9b4c832d28 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
@@ -193,6 +193,7 @@ const Column: FC = ({
Extra options
From 4e2fd74c6a560df8b6aeff44c2f7bb3c92147e36 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 15:40:39 +0800
Subject: [PATCH 74/94] init fixing tests with a container for Providers needed
---
studio/tests/pages/projects/reports/api-report.test.js | 7 ++++++-
studio/tests/setup/container.js | 10 ++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
create mode 100644 studio/tests/setup/container.js
diff --git a/studio/tests/pages/projects/reports/api-report.test.js b/studio/tests/pages/projects/reports/api-report.test.js
index 92cb474d077..42fa59c5b44 100644
--- a/studio/tests/pages/projects/reports/api-report.test.js
+++ b/studio/tests/pages/projects/reports/api-report.test.js
@@ -3,6 +3,7 @@ import { render } from '../../../helpers'
import { waitFor, screen } from '@testing-library/react'
import { ApiReport } from 'pages/project/[ref]/reports/api-overview'
import userEvent from '@testing-library/user-event'
+import Container from 'tests/setup/container'
beforeEach(() => {
// reset mocks between tests
@@ -20,7 +21,11 @@ test(`static elements`, async () => {
})
test('refresh button', async () => {
- render( )
+ render(
+
+
+
+ )
await waitFor(() => expect(get).toBeCalled())
get.mockReset()
userEvent.click(await screen.findByText(/Refresh/))
diff --git a/studio/tests/setup/container.js b/studio/tests/setup/container.js
new file mode 100644
index 00000000000..11128179d5f
--- /dev/null
+++ b/studio/tests/setup/container.js
@@ -0,0 +1,10 @@
+import * as Tooltip from '@radix-ui/react-tooltip'
+/**
+ * Test renders can be wrapped in this container if it requires the Providers needed
+ */
+
+export default (props) => (
+ <>
+ {props.children}
+ >
+)
From 1971bc68ea50991fce4d5b9bbe82b01cb0d8517d Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 15:41:33 +0800
Subject: [PATCH 75/94] Update container.js
---
studio/tests/setup/container.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/studio/tests/setup/container.js b/studio/tests/setup/container.js
index 11128179d5f..ed2597f213b 100644
--- a/studio/tests/setup/container.js
+++ b/studio/tests/setup/container.js
@@ -1,6 +1,6 @@
import * as Tooltip from '@radix-ui/react-tooltip'
/**
- * Test renders can be wrapped in this container if it requires the Providers needed
+ * Test renders can be wrapped in this container if it requires a context Provider
*/
export default (props) => (
From 8925c07ee3b8595489e42e65d34079ad7437f3b3 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 15:51:23 +0800
Subject: [PATCH 76/94] add portal to new tooltips
---
.../TableEditorLayout/TableEditorMenu.tsx | 53 ++++++++++---------
1 file changed, 28 insertions(+), 25 deletions(-)
diff --git a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
index 7e6aeb4d727..44736f7dbfc 100644
--- a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
+++ b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
@@ -309,18 +309,19 @@ const TableEditorMenu = ({
-
-
-
-
- Sort By
-
-
+
+
+
+
+ Sort By
+
+
+
@@ -434,19 +435,21 @@ const EntityListItem = ({
)}
-
-
-
-
- {formatTooltipText(entity.type)}
-
-
-
+
+
+
+
+
+ {formatTooltipText(entity.type)}
+
+
+
+
}
action={
From 0ec5bee59b969d11003783ad668d37853aa39d69 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 15:52:10 +0800
Subject: [PATCH 77/94] add disableHoverableContent to table list tooltips
---
.../components/layouts/TableEditorLayout/TableEditorMenu.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
index 44736f7dbfc..2ad3668090f 100644
--- a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
+++ b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
@@ -400,7 +400,7 @@ const EntityListItem = ({
hoverText={entity.comment ? entity.comment : entity.name}
isActive={isActive}
icon={
-
+
{entity.type === ENTITY_TYPE.TABLE ? (
-
+
Date: Tue, 28 Mar 2023 15:59:50 +0800
Subject: [PATCH 78/94] fix tests for tooltip provider
---
studio/tests/helpers.tsx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/studio/tests/helpers.tsx b/studio/tests/helpers.tsx
index 6aacb05b4de..8dbd99290f2 100644
--- a/studio/tests/helpers.tsx
+++ b/studio/tests/helpers.tsx
@@ -5,6 +5,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { render as originalRender } from '@testing-library/react'
import { RootStore } from 'stores'
import { StoreProvider } from 'hooks'
+import { TooltipProvider } from '@radix-ui/react-tooltip'
interface SelectorOptions {
container?: HTMLElement
}
@@ -68,7 +69,9 @@ const ReactQueryTestConfig: React.FC = ({ children }) => {
return (
- {children}
+
+ {children}
+
)
}
From 31059cbb0d6e582b5891f90a1333d9d282281019 Mon Sep 17 00:00:00 2001
From: Joshen Lim
Date: Tue, 28 Mar 2023 16:02:38 +0800
Subject: [PATCH 79/94] remove container in jest
---
studio/tests/pages/projects/reports/api-report.test.js | 7 +------
studio/tests/setup/container.js | 10 ----------
2 files changed, 1 insertion(+), 16 deletions(-)
delete mode 100644 studio/tests/setup/container.js
diff --git a/studio/tests/pages/projects/reports/api-report.test.js b/studio/tests/pages/projects/reports/api-report.test.js
index 42fa59c5b44..92cb474d077 100644
--- a/studio/tests/pages/projects/reports/api-report.test.js
+++ b/studio/tests/pages/projects/reports/api-report.test.js
@@ -3,7 +3,6 @@ import { render } from '../../../helpers'
import { waitFor, screen } from '@testing-library/react'
import { ApiReport } from 'pages/project/[ref]/reports/api-overview'
import userEvent from '@testing-library/user-event'
-import Container from 'tests/setup/container'
beforeEach(() => {
// reset mocks between tests
@@ -21,11 +20,7 @@ test(`static elements`, async () => {
})
test('refresh button', async () => {
- render(
-
-
-
- )
+ render( )
await waitFor(() => expect(get).toBeCalled())
get.mockReset()
userEvent.click(await screen.findByText(/Refresh/))
diff --git a/studio/tests/setup/container.js b/studio/tests/setup/container.js
deleted file mode 100644
index ed2597f213b..00000000000
--- a/studio/tests/setup/container.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import * as Tooltip from '@radix-ui/react-tooltip'
-/**
- * Test renders can be wrapped in this container if it requires a context Provider
- */
-
-export default (props) => (
- <>
- {props.children}
- >
-)
From 7c451745164abe6e6bbee2efb2a3b668c0f560f7 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 16:42:33 +0800
Subject: [PATCH 80/94] Update UpgradePrompt.tsx
---
.../interfaces/Settings/Logs/UpgradePrompt.tsx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx b/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx
index f6351377d9d..431cfb6afe9 100644
--- a/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx
+++ b/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx
@@ -62,13 +62,14 @@ const UpgradePrompt: React.FC = ({ show, setShowUpgradePrompt }) => {
-
+
setShowUpgradePrompt(false)}>
Close
-
-
-
Upgrade
+
+
+ Upgrade
+
From ddeca96379dac1ea254a79e5d7242750ec5dfa5d Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 16:50:59 +0800
Subject: [PATCH 81/94] fix buttons
---
.../Settings/ProjectUsageBars/ProjectUsageBars.tsx | 8 ++++++--
studio/components/interfaces/Support/Success.tsx | 4 +++-
studio/components/layouts/ProjectLayout/BuildingState.tsx | 4 +++-
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx b/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx
index 13e24dcc18c..a5439c7878b 100644
--- a/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx
+++ b/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx
@@ -136,7 +136,9 @@ const ProjectUsage: FC = ({ projectRef }) => {
for a full breakdown of available plans.
- Upgrade to Pro
+
+ Upgrade to Pro
+
) : (
@@ -148,7 +150,9 @@ const ProjectUsage: FC = ({ projectRef }) => {
spend cap and pay for over-usage beyond the quota.
- Configure Spend Cap
+
+ Configure Spend Cap
+
)}
diff --git a/studio/components/interfaces/Support/Success.tsx b/studio/components/interfaces/Support/Success.tsx
index 0293f7283a0..45663e5d379 100644
--- a/studio/components/interfaces/Support/Success.tsx
+++ b/studio/components/interfaces/Support/Success.tsx
@@ -71,7 +71,9 @@ const Success: FC = ({ sentCategory = '' }) => {
diff --git a/studio/components/layouts/ProjectLayout/BuildingState.tsx b/studio/components/layouts/ProjectLayout/BuildingState.tsx
index 01b4af13c10..06c7c221db9 100644
--- a/studio/components/layouts/ProjectLayout/BuildingState.tsx
+++ b/studio/components/layouts/ProjectLayout/BuildingState.tsx
@@ -111,7 +111,9 @@ const BuildingState: FC = ({ project }) => {
support ticket.
- Contact support team
+
+ Contact support team
+
>
}
From 1389a07e388961751dfcf4cd1139e7b3b86730f0 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 16:51:55 +0800
Subject: [PATCH 82/94] fix search button
---
apps/docs/components/Navigation/NavBar.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/apps/docs/components/Navigation/NavBar.tsx b/apps/docs/components/Navigation/NavBar.tsx
index eb7ee10434f..f4d7f6e0098 100644
--- a/apps/docs/components/Navigation/NavBar.tsx
+++ b/apps/docs/components/Navigation/NavBar.tsx
@@ -3,11 +3,13 @@ import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { FC, useEffect, useState } from 'react'
-import { IconCommand, IconMenu, IconMoon, IconSearch, IconSun, Listbox, SearchButton } from 'ui'
+import { IconCommand, IconMenu, IconMoon, IconSearch, IconSun, Listbox } from 'ui'
import { REFERENCES } from './Navigation.constants'
import { getPageType } from '~/lib/helpers'
+import SearchButton from '../Search/SearchButton'
+
const NavBar: FC = () => {
const { isDarkMode, toggleTheme } = useTheme()
const [mounted, setMounted] = useState(false)
From 3f29f51262e23cf0a21570ff415e50030e4130e8 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 16:57:58 +0800
Subject: [PATCH 83/94] Update TopNavBar.tsx
---
.../Navigation/NavigationMenu/TopNavBar.tsx | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
index 270269d5085..5b4b97fafa9 100644
--- a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
@@ -3,20 +3,13 @@ import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { FC, useEffect, useState } from 'react'
-import {
- Button,
- IconCommand,
- IconMenu,
- IconMoon,
- IconSearch,
- IconSun,
- Listbox,
- SearchButton,
-} from 'ui'
+import { Button, IconCommand, IconMenu, IconMoon, IconSearch, IconSun, Listbox } from 'ui'
import { REFERENCES } from '~/components/Navigation/Navigation.constants'
import { getPageType } from '~/lib/helpers'
+import SearchButton from './../../Search/SearchButton'
+
const TopNavBar: FC = () => {
const { isDarkMode, toggleTheme } = useTheme()
const [mounted, setMounted] = useState(false)
From a67a5bae0f59ab391b19c1ae404668fea23d5743 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 21:55:22 +0800
Subject: [PATCH 84/94] Update Dropdown.tsx
---
.../ui/src/components/Dropdown/Dropdown.tsx | 51 ++++++++++++-------
1 file changed, 32 insertions(+), 19 deletions(-)
diff --git a/packages/ui/src/components/Dropdown/Dropdown.tsx b/packages/ui/src/components/Dropdown/Dropdown.tsx
index ea0791eafee..eee51ca4a23 100644
--- a/packages/ui/src/components/Dropdown/Dropdown.tsx
+++ b/packages/ui/src/components/Dropdown/Dropdown.tsx
@@ -50,27 +50,40 @@ function Dropdown({
return (
{isNested ? (
-
- {children}
-
+
+
+ {children}
+
+
+ {arrow && (
+
+ )}
+ {overlay}
+
+
) : (
- {children}
+ <>
+ {children}
+
+
+ {arrow && (
+
+ )}
+ {overlay}
+
+
+ >
)}
-
-
-
- {arrow && (
-
- )}
- {overlay}
-
-
)
}
From 35c4226acb9b0435e444a5e97342f5cb0eb36c34 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Tue, 28 Mar 2023 11:51:46 -0230
Subject: [PATCH 85/94] Fix checkbox
---
studio/components/interfaces/Reports/Reports.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/studio/components/interfaces/Reports/Reports.tsx b/studio/components/interfaces/Reports/Reports.tsx
index 38470af3c10..ecf0223e60c 100644
--- a/studio/components/interfaces/Reports/Reports.tsx
+++ b/studio/components/interfaces/Reports/Reports.tsx
@@ -275,7 +275,7 @@ const Reports = () => {
return (
x.attribute === metric.key)}
+ checked={config.layout?.some((x: any) => x.attribute === metric.key)}
onChange={(e) => handleChartSelection({ metric, value: e })}
>
From c081de1f8488d7fd2abf9c5bbf50dd89a8a92658 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 23:03:12 +0800
Subject: [PATCH 86/94] Update Dropdown to not be silly
---
.../ui/src/components/Dropdown/Dropdown.tsx | 102 +++++++-----------
1 file changed, 38 insertions(+), 64 deletions(-)
diff --git a/packages/ui/src/components/Dropdown/Dropdown.tsx b/packages/ui/src/components/Dropdown/Dropdown.tsx
index eee51ca4a23..e328194b241 100644
--- a/packages/ui/src/components/Dropdown/Dropdown.tsx
+++ b/packages/ui/src/components/Dropdown/Dropdown.tsx
@@ -3,23 +3,19 @@ import React, { useState } from 'react'
import * as RadixDropdown from '@radix-ui/react-dropdown-menu'
import { IconCheck } from '../Icon/icons/IconCheck'
-// @ts-ignore
-// import DropdownStyles from './Dropdown.module.css'
-
import type * as RadixDropdownTypes from '@radix-ui/react-dropdown-menu/'
import styleHandler from '../../lib/theme/styleHandler'
import { IconTarget } from '../Icon/icons/IconTarget'
-interface RootProps {
+interface RootProps extends RadixDropdownTypes.DropdownMenuProps {
open?: boolean
arrow?: boolean
- onOpenChange?: RadixDropdownTypes.DropdownMenuProps['onOpenChange'] // DropdownMenu['onOpenChange']
side?: RadixDropdownTypes.DropdownMenuContentProps['side']
align?: RadixDropdownTypes.DropdownMenuContentProps['align']
sideOffset?: RadixDropdownTypes.DropdownMenuContentProps['sideOffset']
- overlay?: React.ReactNode
- children?: React.ReactNode
+ overlay?: RadixDropdownTypes.DropdownMenuContentProps['children']
+ children?: RadixDropdownTypes.DropdownMenuTriggerProps['children']
size?: 'tiny' | 'small' | 'medium' | 'large' | 'xlarge' | 'content'
className?: string
style?: React.CSSProperties
@@ -27,8 +23,6 @@ interface RootProps {
}
function Dropdown({
- open,
- onOpenChange,
align = 'center', //Default value
side = 'bottom', //Default value
sideOffset = 6,
@@ -39,6 +33,7 @@ function Dropdown({
style,
arrow,
isNested,
+ ...props
}: RootProps) {
let __styles = styleHandler('dropdown')
@@ -48,7 +43,7 @@ function Dropdown({
}
return (
-
+
{isNested ? (
@@ -88,31 +83,23 @@ function Dropdown({
)
}
-export function RightSlot({ children }: any) {
+export function RightSlot({ children }: { children: React.ReactNode }) {
let __styles = styleHandler('dropdown')
return {children}
}
-interface ItemProps {
- className?: string
+interface ItemProps extends RadixDropdownTypes.DropdownMenuItemProps {
children: React.ReactNode
icon?: React.ReactNode
- disabled?: boolean
- onClick?: (event: Event) => void
- rightSlot?: React.ReactNode
}
-export function Item({ className, children, icon, disabled, onClick, rightSlot }: ItemProps) {
+export function Item({ icon, ...props }: ItemProps) {
let __styles = styleHandler('dropdown')
return (
-
+
{icon && icon}
- {children}
+ {props.children}
)
}
@@ -137,33 +124,32 @@ export function Misc({ children, icon }: ItemProps) {
)
}
-interface CheckboxProps {
- children: React.ReactNode
- checked?: boolean
- onChange?(x: boolean): void
- disabled?: boolean
- ItemIndicator?: React.ReactNode
-}
-
export function Separator() {
let __styles = styleHandler('dropdown')
return
}
+// to do : remove onChange omit in favour of using onCheckedChange
+interface CheckboxProps extends Omit {
+ ItemIndicator?: React.ReactNode
+ onChange?(x: boolean): void
+}
+
export function Checkbox({
- children,
checked: propsChecked,
- onChange,
- disabled,
ItemIndicator,
+ onChange,
+ ...props
}: CheckboxProps) {
- const [checked, setChecked] = useState(propsChecked ? propsChecked : false)
+ const [checked, setChecked] = useState(propsChecked ?? false)
let __styles = styleHandler('dropdown')
- const handleChange = (e: boolean) => {
+ const handleChange = (e: any) => {
+ // to do : remove onChange in favour of using onCheckedChange
if (onChange) onChange(e)
+ if (props.onCheckedChange) props.onCheckedChange(e)
setChecked(e)
}
@@ -172,70 +158,58 @@ export function Checkbox({
checked={checked}
onCheckedChange={handleChange}
className={`${__styles.item} ${__styles.input}`}
- disabled={disabled}
+ {...props}
>
{ItemIndicator ? ItemIndicator : }
- {children}
+ {props.children}
)
}
-interface RadioProps {
- children: React.ReactNode
- value: string
+interface RadioProps extends RadixDropdownTypes.DropdownMenuRadioItemProps {
ItemIndicator?: React.ReactNode
- disabled?: boolean
}
-export function Radio({ children, value, ItemIndicator, disabled }: RadioProps) {
+export function Radio({ ItemIndicator, ...props }: RadioProps) {
let __styles = styleHandler('dropdown')
return (
-
+
{ItemIndicator ? ItemIndicator : }
- {children}
+ {props.children}
)
}
-interface RadioGroupProps {
- children: React.ReactNode
- value: string
+// to do : remove onChange omit in favour of using onValueChange
+interface RadioGroupProps extends Omit {
onChange?(x: string): void
}
-export function RadioGroup({ children, value: propsValue, onChange }: RadioGroupProps) {
+export function RadioGroup({ value: propsValue, onChange, ...props }: RadioGroupProps) {
const [value, setValue] = useState(propsValue ? propsValue : '')
- const handleChange = (e: string) => {
+ const handleChange = (e: any) => {
+ // to do : remove onChange in favour of using onValueChange
if (onChange) onChange(e)
+ if (props.onValueChange) props.onValueChange(e)
setValue(e)
}
- return (
-
- {children}
-
- )
+ return
}
-interface LabelProps {
- children: React.ReactNode
-}
+interface LabelProps extends RadixDropdownTypes.DropdownMenuLabelProps {}
-export function Label({ children }: LabelProps) {
+export function Label({ ...props }: LabelProps) {
let __styles = styleHandler('dropdown')
- return {children}
+ return
}
Dropdown.Item = Item
From c608a2ad2efd9a883d86bccae3da8c531e2649f8 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Tue, 28 Mar 2023 23:05:43 +0800
Subject: [PATCH 87/94] Update Dropdown.tsx
---
packages/ui/src/components/Dropdown/Dropdown.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/ui/src/components/Dropdown/Dropdown.tsx b/packages/ui/src/components/Dropdown/Dropdown.tsx
index e328194b241..29580333fa0 100644
--- a/packages/ui/src/components/Dropdown/Dropdown.tsx
+++ b/packages/ui/src/components/Dropdown/Dropdown.tsx
@@ -130,7 +130,7 @@ export function Separator() {
return
}
-// to do : remove onChange omit in favour of using onCheckedChange
+// to do : remove onChange omit in favor of using onCheckedChange
interface CheckboxProps extends Omit {
ItemIndicator?: React.ReactNode
onChange?(x: boolean): void
@@ -147,7 +147,7 @@ export function Checkbox({
let __styles = styleHandler('dropdown')
const handleChange = (e: any) => {
- // to do : remove onChange in favour of using onCheckedChange
+ // to do : remove onChange in favor of using onCheckedChange
if (onChange) onChange(e)
if (props.onCheckedChange) props.onCheckedChange(e)
setChecked(e)
@@ -186,7 +186,7 @@ export function Radio({ ItemIndicator, ...props }: RadioProps) {
)
}
-// to do : remove onChange omit in favour of using onValueChange
+// to do : remove onChange omit in favor of using onValueChange
interface RadioGroupProps extends Omit {
onChange?(x: string): void
}
@@ -195,7 +195,7 @@ export function RadioGroup({ value: propsValue, onChange, ...props }: RadioGroup
const [value, setValue] = useState(propsValue ? propsValue : '')
const handleChange = (e: any) => {
- // to do : remove onChange in favour of using onValueChange
+ // to do : remove onChange in favor of using onValueChange
if (onChange) onChange(e)
if (props.onValueChange) props.onValueChange(e)
setValue(e)
From 67e3d8b1fcf0ba8677507aaa736f0ae35e050a2b Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Tue, 28 Mar 2023 16:20:50 -0230
Subject: [PATCH 88/94] Fix api report dropdown
---
studio/components/interfaces/Reports/ReportFilterBar.tsx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/studio/components/interfaces/Reports/ReportFilterBar.tsx b/studio/components/interfaces/Reports/ReportFilterBar.tsx
index 6b0dba60aca..1731f2301d8 100644
--- a/studio/components/interfaces/Reports/ReportFilterBar.tsx
+++ b/studio/components/interfaces/Reports/ReportFilterBar.tsx
@@ -99,7 +99,7 @@ const ReportFilterBar: FC = ({
]
const [showAdder, setShowAdder] = useState(false)
const [currentProductFilter, setCurrentProductFilter] = useState<
- null | typeof PRODUCT_FILTERS[number]
+ null | (typeof PRODUCT_FILTERS)[number]
>(null)
const [addFilterValues, setAddFilterValues] = useState({
key: filterKeys[0],
@@ -116,7 +116,7 @@ const ReportFilterBar: FC = ({
}
const handleProductFilterChange = async (
- nextProductFilter: null | typeof PRODUCT_FILTERS[number]
+ nextProductFilter: null | (typeof PRODUCT_FILTERS)[number]
) => {
const toRemove = PRODUCT_FILTERS.map(
(productFilter) =>
@@ -156,6 +156,7 @@ const ReportFilterBar: FC = ({
All Requests
+
{PRODUCT_FILTERS.map((productFilter) => {
const Icon = productFilter.icon
return (
@@ -163,7 +164,7 @@ const ReportFilterBar: FC = ({
key={productFilter.key}
disabled={productFilter.key === currentProductFilter?.key}
onClick={() => handleProductFilterChange(productFilter)}
- className="hover:bg-scale-600"
+ className="group relative text-xs text-scale-1100 px-4 py-1.5 flex items-center space-x-2 cursor-pointer focus:bg-scale-300 dark:focus:bg-scale-500 focus:text-scale-1200 border-none focus:outline-none hover:bg-scale-600"
icon={ }
>
Date: Wed, 29 Mar 2023 12:21:39 +0800
Subject: [PATCH 89/94] Update Dropdown.tsx
---
packages/ui/src/components/Dropdown/Dropdown.tsx | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/packages/ui/src/components/Dropdown/Dropdown.tsx b/packages/ui/src/components/Dropdown/Dropdown.tsx
index 29580333fa0..3d1b320b907 100644
--- a/packages/ui/src/components/Dropdown/Dropdown.tsx
+++ b/packages/ui/src/components/Dropdown/Dropdown.tsx
@@ -7,6 +7,7 @@ import type * as RadixDropdownTypes from '@radix-ui/react-dropdown-menu/'
import styleHandler from '../../lib/theme/styleHandler'
import { IconTarget } from '../Icon/icons/IconTarget'
+import { cn } from '../../utils/cn'
interface RootProps extends RadixDropdownTypes.DropdownMenuProps {
open?: boolean
@@ -93,11 +94,11 @@ interface ItemProps extends RadixDropdownTypes.DropdownMenuItemProps {
icon?: React.ReactNode
}
-export function Item({ icon, ...props }: ItemProps) {
+export function Item({ icon, className, ...props }: ItemProps) {
let __styles = styleHandler('dropdown')
return (
-
+
{icon && icon}
{props.children}
@@ -140,6 +141,7 @@ export function Checkbox({
checked: propsChecked,
ItemIndicator,
onChange,
+ className,
...props
}: CheckboxProps) {
const [checked, setChecked] = useState(propsChecked ?? false)
@@ -157,7 +159,7 @@ export function Checkbox({
@@ -173,11 +175,11 @@ interface RadioProps extends RadixDropdownTypes.DropdownMenuRadioItemProps {
ItemIndicator?: React.ReactNode
}
-export function Radio({ ItemIndicator, ...props }: RadioProps) {
+export function Radio({ ItemIndicator, className, ...props }: RadioProps) {
let __styles = styleHandler('dropdown')
return (
-
+
{ItemIndicator ? ItemIndicator : }
@@ -206,10 +208,10 @@ export function RadioGroup({ value: propsValue, onChange, ...props }: RadioGroup
interface LabelProps extends RadixDropdownTypes.DropdownMenuLabelProps {}
-export function Label({ ...props }: LabelProps) {
+export function Label({ className, ...props }: LabelProps) {
let __styles = styleHandler('dropdown')
- return
+ return
}
Dropdown.Item = Item
From 82381a46d1425a492875ce8d4789b98af46db560 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Wed, 29 Mar 2023 12:22:53 +0800
Subject: [PATCH 90/94] remove classes
---
studio/components/interfaces/Reports/ReportFilterBar.tsx | 1 -
1 file changed, 1 deletion(-)
diff --git a/studio/components/interfaces/Reports/ReportFilterBar.tsx b/studio/components/interfaces/Reports/ReportFilterBar.tsx
index 1731f2301d8..15bc75c22ec 100644
--- a/studio/components/interfaces/Reports/ReportFilterBar.tsx
+++ b/studio/components/interfaces/Reports/ReportFilterBar.tsx
@@ -164,7 +164,6 @@ const ReportFilterBar: FC = ({
key={productFilter.key}
disabled={productFilter.key === currentProductFilter?.key}
onClick={() => handleProductFilterChange(productFilter)}
- className="group relative text-xs text-scale-1100 px-4 py-1.5 flex items-center space-x-2 cursor-pointer focus:bg-scale-300 dark:focus:bg-scale-500 focus:text-scale-1200 border-none focus:outline-none hover:bg-scale-600"
icon={ }
>
Date: Wed, 29 Mar 2023 14:40:07 +0800
Subject: [PATCH 91/94] fix: overlay z-index issues
---
packages/ui/src/lib/theme/defaultTheme.ts | 8 ++++++--
studio/styles/main.scss | 4 ++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/packages/ui/src/lib/theme/defaultTheme.ts b/packages/ui/src/lib/theme/defaultTheme.ts
index 53809a966fe..d239b4e71d1 100644
--- a/packages/ui/src/lib/theme/defaultTheme.ts
+++ b/packages/ui/src/lib/theme/defaultTheme.ts
@@ -972,6 +972,7 @@ export default {
sidepanel: {
base: `
+ z-50
bg-scale-100 dark:bg-scale-300
flex flex-col
fixed
@@ -1023,6 +1024,7 @@ export default {
bg-scale-300 dark:bg-scale-500
`,
overlay: `
+ z-50
fixed
bg-scale-300
dark:bg-scale-100
@@ -1210,12 +1212,12 @@ export default {
data-open:text-scale-1200
`,
content: `
+ z-50
bg-scale-100 dark:bg-scale-300
border border-scale-300 dark:border-scale-500
rounded
shadow-lg
py-1.5
-
origin-dropdown
data-open:animate-dropdown-content-show
data-closed:animate-dropdown-content-hide
@@ -1297,6 +1299,7 @@ export default {
`,
content: `
+ z-50
bg-scale-100 dark:bg-scale-300
border border-scale-300 dark:border-scale-500
rounded
@@ -1469,6 +1472,7 @@ export default {
xxxlarge: `sm:align-middle sm:w-full max-w-7xl`,
},
overlay: `
+ z-50
fixed
bg-scale-300
dark:bg-scale-100
@@ -1480,13 +1484,13 @@ export default {
data-open:animate-fade-in-overlay-bg
`,
scroll_overlay: `
+ z-50
fixed
inset-0
grid
place-items-center
overflow-y-auto
data-open:animate-overlay-show data-closed:animate-overlay-hide
-
`,
separator: `
w-full
diff --git a/studio/styles/main.scss b/studio/styles/main.scss
index 5a3b5a8a9dc..d835f55f74c 100644
--- a/studio/styles/main.scss
+++ b/studio/styles/main.scss
@@ -233,3 +233,7 @@ div[data-radix-portal]:not(.portal--toast) {
@apply pr-7;
}
}
+
+[data-radix-popper-content-wrapper] {
+ @apply z-50 #{!important};
+}
From 15133428e6dbea3c9fc916bfe96ff60becb276de Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Wed, 29 Mar 2023 14:40:38 +0800
Subject: [PATCH 92/94] Update main.scss
---
studio/styles/main.scss | 1 +
1 file changed, 1 insertion(+)
diff --git a/studio/styles/main.scss b/studio/styles/main.scss
index d835f55f74c..b25a92f920c 100644
--- a/studio/styles/main.scss
+++ b/studio/styles/main.scss
@@ -234,6 +234,7 @@ div[data-radix-portal]:not(.portal--toast) {
}
}
+// to do: remove this CSS and do the same thing in a reusable tooltip component
[data-radix-popper-content-wrapper] {
@apply z-50 #{!important};
}
From 1324bcef18972b87f476a695b71f4ad58186e689 Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Wed, 29 Mar 2023 14:43:48 +0800
Subject: [PATCH 93/94] fix tooltips in new changes
---
.../interfaces/Auth/Users/AddUserDropdown.tsx | 56 ++++++++++---------
1 file changed, 30 insertions(+), 26 deletions(-)
diff --git a/studio/components/interfaces/Auth/Users/AddUserDropdown.tsx b/studio/components/interfaces/Auth/Users/AddUserDropdown.tsx
index f1b9156df4a..3cacf12808d 100644
--- a/studio/components/interfaces/Auth/Users/AddUserDropdown.tsx
+++ b/studio/components/interfaces/Auth/Users/AddUserDropdown.tsx
@@ -47,19 +47,21 @@ const AddUserDropdown = ({ projectKpsVersion }: AddUserDropdownProps) => {
{!canInviteUsers && (
-
-
-
-
- You need additional permissions to invite users
-
-
-
+
+
+
+
+
+ You need additional permissions to invite users
+
+
+
+
)}
)}
@@ -76,19 +78,21 @@ const AddUserDropdown = ({ projectKpsVersion }: AddUserDropdownProps) => {
{!canCreateUsers && (
-
-
-
-
- You need additional permissions to create users
-
-
-
+
+
+
+
+
+ You need additional permissions to create users
+
+
+
+
)}
>
From 7eb1f93d560a9966bda891d2ab34ccaa86ceb32d Mon Sep 17 00:00:00 2001
From: Jonathan Summers-Muir
Date: Wed, 29 Mar 2023 14:55:41 +0800
Subject: [PATCH 94/94] fix css
---
studio/styles/ui.scss | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/studio/styles/ui.scss b/studio/styles/ui.scss
index 8903cb37368..b9191559f62 100644
--- a/studio/styles/ui.scss
+++ b/studio/styles/ui.scss
@@ -418,8 +418,9 @@
rect {
@apply fill-blue-500 stroke-blue-500;
}
- path, circle {
- @apply stroke-blue-900 fill-blue-500;;
+ path,
+ circle {
+ @apply stroke-blue-900 fill-blue-500;
}
}
@@ -430,4 +431,4 @@
line {
@apply stroke-green-500;
}
-}
\ No newline at end of file
+}