d1s 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.next/.next/BUILD_ID +1 -1
- package/dist/.next/.next/app-build-manifest.json +28 -28
- package/dist/.next/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/.next/build-manifest.json +3 -3
- package/dist/.next/.next/cache/.rscinfo +1 -1
- package/dist/.next/.next/cache/.tsbuildinfo +1 -1
- package/dist/.next/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/1.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/10.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/11.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/12.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/2.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/3.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/4.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/5.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/6.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/7.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/8.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/9.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/.next/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/dist/.next/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/1.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/2.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/3.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/.next/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/dist/.next/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/.next/.next/next-server.js.nft.json +1 -1
- package/dist/.next/.next/prerender-manifest.json +1 -1
- package/dist/.next/.next/required-server-files.json +1 -1
- package/dist/.next/.next/server/app/_not-found/page.js +1 -1
- package/dist/.next/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/.next/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/_not-found.html +1 -1
- package/dist/.next/.next/server/app/_not-found.rsc +4 -4
- package/dist/.next/.next/server/app/api/cloudflare/route.js +1 -1
- package/dist/.next/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/databases/route.js +1 -1
- package/dist/.next/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/migrations/sync/route.js +5 -5
- package/dist/.next/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/migrations/sync-files/route.js +3 -3
- package/dist/.next/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/pull-data/confirm/route.js +1 -1
- package/dist/.next/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js +2 -2
- package/dist/.next/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/pull-remote/preview/route.js +4 -4
- package/dist/.next/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/push-remote/confirm/route.js +5 -5
- package/dist/.next/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/push-remote/preview/route.js +4 -4
- package/dist/.next/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/query/route.js +3 -3
- package/dist/.next/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/tables/[name]/route.js +5 -5
- package/dist/.next/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/tables/route.js +2 -2
- package/dist/.next/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/api/update/route.js +1 -1
- package/dist/.next/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app/index.html +2 -2
- package/dist/.next/.next/server/app/index.rsc +5 -5
- package/dist/.next/.next/server/app/page.js +7 -7
- package/dist/.next/.next/server/app/page.js.nft.json +1 -1
- package/dist/.next/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/.next/server/app-paths-manifest.json +1 -1
- package/dist/.next/.next/server/chunks/226.js +12 -12
- package/dist/.next/.next/server/chunks/391.js +1 -1
- package/dist/.next/.next/server/chunks/572.js +1 -0
- package/dist/.next/.next/server/chunks/992.js +3 -3
- package/dist/.next/.next/server/middleware-build-manifest.js +1 -1
- package/dist/.next/.next/server/next-font-manifest.js +1 -1
- package/dist/.next/.next/server/next-font-manifest.json +1 -1
- package/dist/.next/.next/server/pages/404.html +1 -1
- package/dist/.next/.next/server/pages/500.html +1 -1
- package/dist/.next/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/.next/static/chunks/{576-c4daf274bb6469a1.js → 576-18a2209e1ed26aad.js} +1 -1
- package/dist/.next/.next/static/chunks/{92-c4466e0f1ca8a3a8.js → 92-5f7522943fcb72a8.js} +1 -1
- package/dist/.next/.next/static/chunks/app/{layout-be6ee67cf0c92654.js → layout-40ec07d04681ba81.js} +1 -1
- package/dist/.next/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +1 -0
- package/dist/.next/.next/static/chunks/app/page-f2bc307c0d8acdaa.js +1 -0
- package/dist/.next/.next/static/chunks/{main-app-fa35024de9bd9284.js → main-app-4506e88db72db4b7.js} +1 -1
- package/dist/.next/.next/static/css/{9f6c25c5400f83d3.css → 7c16f57d325d0d7d.css} +1 -1
- package/dist/.next/.next/static/ejYPqJ2kVicVp5EFWOZIC/_buildManifest.js +1 -0
- package/dist/.next/.next/static/ejYPqJ2kVicVp5EFWOZIC/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/gABGrAoO8IPArDo_Ns_7g/_buildManifest.js +1 -0
- package/dist/.next/.next/static/gABGrAoO8IPArDo_Ns_7g/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/gh-QfIUVo4FTTduYCVKT6/_buildManifest.js +1 -0
- package/dist/.next/.next/static/gh-QfIUVo4FTTduYCVKT6/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/media/8d697b304b401681-s.woff2 +0 -0
- package/dist/.next/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
- package/dist/.next/.next/static/thaCy2qVeNqYYhdayr13C/_buildManifest.js +1 -0
- package/dist/.next/.next/static/thaCy2qVeNqYYhdayr13C/_ssgManifest.js +1 -0
- package/dist/.next/.next/static/ybCx6L6gHqtODbKmlhU-d/_buildManifest.js +1 -0
- package/dist/.next/.next/static/ybCx6L6gHqtODbKmlhU-d/_ssgManifest.js +1 -0
- package/dist/.next/.next/trace +3 -3
- package/dist/.next/.next/types/app/api/cloudflare/route.ts +1 -1
- package/dist/.next/.next/types/app/api/databases/route.ts +1 -1
- package/dist/.next/.next/types/app/api/migrations/sync/route.ts +1 -1
- package/dist/.next/.next/types/app/api/migrations/sync-files/route.ts +1 -1
- package/dist/.next/.next/types/app/api/pull-data/confirm/route.ts +1 -1
- package/dist/.next/.next/types/app/api/pull-remote/confirm/route.ts +1 -1
- package/dist/.next/.next/types/app/api/pull-remote/preview/route.ts +1 -1
- package/dist/.next/.next/types/app/api/push-remote/confirm/route.ts +1 -1
- package/dist/.next/.next/types/app/api/push-remote/preview/route.ts +1 -1
- package/dist/.next/.next/types/app/api/query/route.ts +1 -1
- package/dist/.next/.next/types/app/api/tables/[name]/route.ts +1 -1
- package/dist/.next/.next/types/app/api/tables/route.ts +1 -1
- package/dist/.next/.next/types/app/api/update/route.ts +1 -1
- package/dist/.next/.next/types/app/page.ts +1 -1
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +28 -28
- package/dist/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/build-manifest.json +3 -3
- package/dist/.next/cache/.rscinfo +1 -1
- package/dist/.next/cache/.tsbuildinfo +1 -1
- package/dist/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/.next/cache/webpack/client-production/1.pack +0 -0
- package/dist/.next/cache/webpack/client-production/2.pack +0 -0
- package/dist/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/dist/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/.next/next-server.js.nft.json +1 -1
- package/dist/.next/prerender-manifest.json +1 -1
- package/dist/.next/required-server-files.json +1 -1
- package/dist/.next/server/app/_not-found/page.js +1 -1
- package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +4 -4
- package/dist/.next/server/app/api/cloudflare/route.js +1 -1
- package/dist/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/databases/route.js +1 -1
- package/dist/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/migrations/sync/route.js +5 -5
- package/dist/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/migrations/sync-files/route.js +3 -3
- package/dist/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pull-data/confirm/route.js +1 -1
- package/dist/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pull-remote/confirm/route.js +2 -2
- package/dist/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/pull-remote/preview/route.js +4 -4
- package/dist/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/push-remote/confirm/route.js +5 -5
- package/dist/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/push-remote/preview/route.js +4 -4
- package/dist/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/query/route.js +3 -3
- package/dist/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/tables/[name]/route.js +5 -5
- package/dist/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/tables/route.js +2 -2
- package/dist/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/api/update/route.js +1 -1
- package/dist/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/index.html +2 -2
- package/dist/.next/server/app/index.rsc +5 -5
- package/dist/.next/server/app/page.js +7 -7
- package/dist/.next/server/app/page.js.nft.json +1 -1
- package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app-paths-manifest.json +1 -1
- package/dist/.next/server/chunks/226.js +12 -12
- package/dist/.next/server/chunks/391.js +1 -1
- package/dist/.next/server/chunks/572.js +1 -0
- package/dist/.next/server/chunks/992.js +3 -3
- package/dist/.next/server/middleware-build-manifest.js +1 -1
- package/dist/.next/server/next-font-manifest.js +1 -1
- package/dist/.next/server/next-font-manifest.json +1 -1
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/static/IX-QLbm7scYnyqWeeimal/_buildManifest.js +1 -0
- package/dist/.next/static/IX-QLbm7scYnyqWeeimal/_ssgManifest.js +1 -0
- package/dist/.next/static/chunks/{576-c4daf274bb6469a1.js → 576-18a2209e1ed26aad.js} +1 -1
- package/dist/.next/static/chunks/{92-c4466e0f1ca8a3a8.js → 92-5f7522943fcb72a8.js} +1 -1
- package/dist/.next/static/chunks/app/{layout-be6ee67cf0c92654.js → layout-40ec07d04681ba81.js} +1 -1
- package/dist/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +1 -0
- package/dist/.next/static/chunks/{main-app-fa35024de9bd9284.js → main-app-4506e88db72db4b7.js} +1 -1
- package/dist/.next/static/css/{9f6c25c5400f83d3.css → 7c16f57d325d0d7d.css} +1 -1
- package/dist/.next/static/media/8d697b304b401681-s.woff2 +0 -0
- package/dist/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
- package/dist/.next/trace +3 -14
- package/dist/.next/types/app/api/cloudflare/route.ts +1 -1
- package/dist/.next/types/app/api/databases/route.ts +1 -1
- package/dist/.next/types/app/api/migrations/sync/route.ts +1 -1
- package/dist/.next/types/app/api/migrations/sync-files/route.ts +1 -1
- package/dist/.next/types/app/api/pull-data/confirm/route.ts +1 -1
- package/dist/.next/types/app/api/pull-remote/confirm/route.ts +1 -1
- package/dist/.next/types/app/api/pull-remote/preview/route.ts +1 -1
- package/dist/.next/types/app/api/push-remote/confirm/route.ts +1 -1
- package/dist/.next/types/app/api/push-remote/preview/route.ts +1 -1
- package/dist/.next/types/app/api/query/route.ts +1 -1
- package/dist/.next/types/app/api/tables/[name]/route.ts +1 -1
- package/dist/.next/types/app/api/tables/route.ts +1 -1
- package/dist/.next/types/app/api/update/route.ts +1 -1
- package/dist/.next/types/app/page.ts +1 -1
- package/dist/app/api/tables/[name]/route.js +22 -10
- package/dist/app/globals.css +39 -0
- package/dist/d1-studio.js +2 -2
- package/dist/lib/data-type-handlers.js +426 -0
- package/dist/lib/sql-operations.js +32 -8
- package/dist/lib/sql-sanitizer.js +233 -0
- package/package.json +3 -9
- package/dist/.next/.next/server/chunks/90.js +0 -1
- package/dist/.next/.next/static/chunks/app/page-36ed30b2266617f3.js +0 -1
- package/dist/.next/server/chunks/90.js +0 -1
- package/dist/.next/static/chunks/app/page-36ed30b2266617f3.js +0 -1
- package/dist/app/app/api/cloudflare/route.js +0 -150
- package/dist/app/app/api/databases/route.js +0 -71
- package/dist/app/app/api/migrations/sync/route.js +0 -174
- package/dist/app/app/api/migrations/sync-files/route.js +0 -172
- package/dist/app/app/api/pull-data/confirm/route.js +0 -230
- package/dist/app/app/api/pull-remote/confirm/route.js +0 -278
- package/dist/app/app/api/pull-remote/preview/route.js +0 -144
- package/dist/app/app/api/push-remote/confirm/route.js +0 -196
- package/dist/app/app/api/push-remote/preview/route.js +0 -179
- package/dist/app/app/api/query/route.js +0 -168
- package/dist/app/app/api/tables/[name]/route.js +0 -174
- package/dist/app/app/api/tables/route.js +0 -178
- package/dist/app/app/api/update/route.js +0 -45
- package/dist/app/app/globals.css +0 -93
- package/dist/app/app/layout.jsx +0 -35
- package/dist/app/app/page.jsx +0 -34
- package/next.config.mjs +0 -18
- package/postcss.config.mjs +0 -8
- package/scripts/studio.js +0 -199
- package/scripts/test.js +0 -366
- package/src/app/api/cloudflare/route.js +0 -150
- package/src/app/api/databases/route.js +0 -71
- package/src/app/api/migrations/sync/route.js +0 -174
- package/src/app/api/migrations/sync-files/route.js +0 -172
- package/src/app/api/pull-data/confirm/route.js +0 -230
- package/src/app/api/pull-remote/confirm/route.js +0 -278
- package/src/app/api/pull-remote/preview/route.js +0 -144
- package/src/app/api/push-remote/confirm/route.js +0 -196
- package/src/app/api/push-remote/preview/route.js +0 -179
- package/src/app/api/query/route.js +0 -168
- package/src/app/api/tables/[name]/route.js +0 -174
- package/src/app/api/tables/route.js +0 -178
- package/src/app/api/update/route.js +0 -45
- package/src/app/globals.css +0 -93
- package/src/app/layout.jsx +0 -35
- package/src/app/page.jsx +0 -34
- package/src/components/cloudflare-credentials-modal.jsx +0 -94
- package/src/components/column-selector.jsx +0 -133
- package/src/components/column-sorting.jsx +0 -65
- package/src/components/delete-records-dialog.jsx +0 -64
- package/src/components/download-button.jsx +0 -205
- package/src/components/edit-error-alert.jsx +0 -30
- package/src/components/editable-cell.jsx +0 -163
- package/src/components/editable-row.jsx +0 -169
- package/src/components/environment-handler.jsx +0 -332
- package/src/components/environment-select.jsx +0 -62
- package/src/components/pull-preview-toast.jsx +0 -215
- package/src/components/push-error-alert.jsx +0 -72
- package/src/components/push-preview-toast.jsx +0 -183
- package/src/components/query-results.jsx +0 -112
- package/src/components/refresh-button.jsx +0 -61
- package/src/components/resize-columns.jsx +0 -101
- package/src/components/sidebar.jsx +0 -254
- package/src/components/sql-editor.jsx +0 -411
- package/src/components/sql-error-display.jsx +0 -167
- package/src/components/sync-migrations-button.jsx +0 -87
- package/src/components/table-error-dialog.jsx +0 -65
- package/src/components/table-toolbar.jsx +0 -285
- package/src/components/table-view.jsx +0 -843
- package/src/components/ui/alert.jsx +0 -47
- package/src/components/ui/button.jsx +0 -48
- package/src/components/ui/card.jsx +0 -50
- package/src/components/ui/checkbox.jsx +0 -24
- package/src/components/ui/collapsible.jsx +0 -11
- package/src/components/ui/dialog.jsx +0 -96
- package/src/components/ui/dropdown-menu.jsx +0 -158
- package/src/components/ui/input.jsx +0 -19
- package/src/components/ui/scroll-area.jsx +0 -40
- package/src/components/ui/select.jsx +0 -121
- package/src/components/ui/separator.jsx +0 -25
- package/src/components/ui/sheet.jsx +0 -109
- package/src/components/ui/sidebar.jsx +0 -620
- package/src/components/ui/skeleton.jsx +0 -14
- package/src/components/ui/table.jsx +0 -86
- package/src/components/ui/tabs.jsx +0 -43
- package/src/components/ui/toast.jsx +0 -86
- package/src/components/ui/toaster.jsx +0 -35
- package/src/components/ui/tooltip.jsx +0 -28
- package/src/components/update-banner.jsx +0 -93
- package/src/context/database-context.js +0 -510
- package/src/hooks/use-mobile.jsx +0 -19
- package/src/hooks/use-sql-error.ts +0 -23
- package/src/hooks/use-toast.js +0 -155
- package/src/lib/database-queue.js +0 -37
- package/src/lib/error.js +0 -20
- package/src/lib/find-wrangler-config.js +0 -74
- package/src/lib/license.js +0 -99
- package/src/lib/logger.js +0 -58
- package/src/lib/migrations.js +0 -415
- package/src/lib/parse-sql-error.js +0 -200
- package/src/lib/request-deduplication.js +0 -24
- package/src/lib/schema-operations.js +0 -106
- package/src/lib/sql-error-types.js +0 -14
- package/src/lib/sql-operations.js +0 -647
- package/src/lib/utils.js +0 -6
- package/src/lib/version-utils.js +0 -34
- /package/dist/.next/.next/static/{OUHnbB-64afrrZQL0Srn5 → FEsQ9jwPUQv5A3fwg6Opl}/_buildManifest.js +0 -0
- /package/dist/.next/.next/static/{OUHnbB-64afrrZQL0Srn5 → FEsQ9jwPUQv5A3fwg6Opl}/_ssgManifest.js +0 -0
- /package/dist/.next/.next/static/{ZBTCAyp1kO5FdEHMU-Dw2 → Y9mYu4WBghepP5oT_3OdR}/_buildManifest.js +0 -0
- /package/dist/.next/.next/static/{ZBTCAyp1kO5FdEHMU-Dw2 → Y9mYu4WBghepP5oT_3OdR}/_ssgManifest.js +0 -0
- /package/dist/.next/.next/static/{bHYW7fgIBDF8-Q33_WPoE → ae3gNmoSGm-R5LJC4UagI}/_buildManifest.js +0 -0
- /package/dist/.next/.next/static/{bHYW7fgIBDF8-Q33_WPoE → ae3gNmoSGm-R5LJC4UagI}/_ssgManifest.js +0 -0
- /package/dist/.next/{static/ZBTCAyp1kO5FdEHMU-Dw2 → .next/static/bKfUJeuvAQlBmR3TjrfkH}/_buildManifest.js +0 -0
- /package/dist/.next/{static/ZBTCAyp1kO5FdEHMU-Dw2 → .next/static/bKfUJeuvAQlBmR3TjrfkH}/_ssgManifest.js +0 -0
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
const Table = React.forwardRef(({ className, ...props }, ref) => (
|
|
6
|
-
<div className="relative w-full overflow-auto">
|
|
7
|
-
<table
|
|
8
|
-
ref={ref}
|
|
9
|
-
className={cn("w-full caption-bottom text-sm", className)}
|
|
10
|
-
{...props} />
|
|
11
|
-
</div>
|
|
12
|
-
))
|
|
13
|
-
Table.displayName = "Table"
|
|
14
|
-
|
|
15
|
-
const TableHeader = React.forwardRef(({ className, ...props }, ref) => (
|
|
16
|
-
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
|
|
17
|
-
))
|
|
18
|
-
TableHeader.displayName = "TableHeader"
|
|
19
|
-
|
|
20
|
-
const TableBody = React.forwardRef(({ className, ...props }, ref) => (
|
|
21
|
-
<tbody
|
|
22
|
-
ref={ref}
|
|
23
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
24
|
-
{...props} />
|
|
25
|
-
))
|
|
26
|
-
TableBody.displayName = "TableBody"
|
|
27
|
-
|
|
28
|
-
const TableFooter = React.forwardRef(({ className, ...props }, ref) => (
|
|
29
|
-
<tfoot
|
|
30
|
-
ref={ref}
|
|
31
|
-
className={cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)}
|
|
32
|
-
{...props} />
|
|
33
|
-
))
|
|
34
|
-
TableFooter.displayName = "TableFooter"
|
|
35
|
-
|
|
36
|
-
const TableRow = React.forwardRef(({ className, ...props }, ref) => (
|
|
37
|
-
<tr
|
|
38
|
-
ref={ref}
|
|
39
|
-
className={cn(
|
|
40
|
-
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
41
|
-
className
|
|
42
|
-
)}
|
|
43
|
-
{...props} />
|
|
44
|
-
))
|
|
45
|
-
TableRow.displayName = "TableRow"
|
|
46
|
-
|
|
47
|
-
const TableHead = React.forwardRef(({ className, ...props }, ref) => (
|
|
48
|
-
<th
|
|
49
|
-
ref={ref}
|
|
50
|
-
className={cn(
|
|
51
|
-
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
52
|
-
className
|
|
53
|
-
)}
|
|
54
|
-
{...props} />
|
|
55
|
-
))
|
|
56
|
-
TableHead.displayName = "TableHead"
|
|
57
|
-
|
|
58
|
-
const TableCell = React.forwardRef(({ className, ...props }, ref) => (
|
|
59
|
-
<td
|
|
60
|
-
ref={ref}
|
|
61
|
-
className={cn(
|
|
62
|
-
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
63
|
-
className
|
|
64
|
-
)}
|
|
65
|
-
{...props} />
|
|
66
|
-
))
|
|
67
|
-
TableCell.displayName = "TableCell"
|
|
68
|
-
|
|
69
|
-
const TableCaption = React.forwardRef(({ className, ...props }, ref) => (
|
|
70
|
-
<caption
|
|
71
|
-
ref={ref}
|
|
72
|
-
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
73
|
-
{...props} />
|
|
74
|
-
))
|
|
75
|
-
TableCaption.displayName = "TableCaption"
|
|
76
|
-
|
|
77
|
-
export {
|
|
78
|
-
Table,
|
|
79
|
-
TableHeader,
|
|
80
|
-
TableBody,
|
|
81
|
-
TableFooter,
|
|
82
|
-
TableHead,
|
|
83
|
-
TableRow,
|
|
84
|
-
TableCell,
|
|
85
|
-
TableCaption,
|
|
86
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const Tabs = TabsPrimitive.Root
|
|
9
|
-
|
|
10
|
-
const TabsList = React.forwardRef(({ className, ...props }, ref) => (
|
|
11
|
-
<TabsPrimitive.List
|
|
12
|
-
ref={ref}
|
|
13
|
-
className={cn(
|
|
14
|
-
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
15
|
-
className
|
|
16
|
-
)}
|
|
17
|
-
{...props} />
|
|
18
|
-
))
|
|
19
|
-
TabsList.displayName = TabsPrimitive.List.displayName
|
|
20
|
-
|
|
21
|
-
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (
|
|
22
|
-
<TabsPrimitive.Trigger
|
|
23
|
-
ref={ref}
|
|
24
|
-
className={cn(
|
|
25
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
26
|
-
className
|
|
27
|
-
)}
|
|
28
|
-
{...props} />
|
|
29
|
-
))
|
|
30
|
-
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
|
|
31
|
-
|
|
32
|
-
const TabsContent = React.forwardRef(({ className, ...props }, ref) => (
|
|
33
|
-
<TabsPrimitive.Content
|
|
34
|
-
ref={ref}
|
|
35
|
-
className={cn(
|
|
36
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
37
|
-
className
|
|
38
|
-
)}
|
|
39
|
-
{...props} />
|
|
40
|
-
))
|
|
41
|
-
TabsContent.displayName = TabsPrimitive.Content.displayName
|
|
42
|
-
|
|
43
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent }
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from "react"
|
|
3
|
-
import * as ToastPrimitives from "@radix-ui/react-toast"
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
|
-
import { X } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
const ToastProvider = ToastPrimitives.Provider
|
|
10
|
-
|
|
11
|
-
const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (
|
|
12
|
-
<ToastPrimitives.Viewport
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn(
|
|
15
|
-
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props} />
|
|
19
|
-
))
|
|
20
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName
|
|
21
|
-
|
|
22
|
-
const toastVariants = cva(
|
|
23
|
-
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
24
|
-
{
|
|
25
|
-
variants: {
|
|
26
|
-
variant: {
|
|
27
|
-
default: "border bg-background text-foreground",
|
|
28
|
-
destructive:
|
|
29
|
-
"destructive group border-destructive bg-destructive text-destructive-foreground",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
defaultVariants: {
|
|
33
|
-
variant: "default",
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
|
|
39
|
-
return (
|
|
40
|
-
(<ToastPrimitives.Root
|
|
41
|
-
ref={ref}
|
|
42
|
-
className={cn(toastVariants({ variant }), className)}
|
|
43
|
-
{...props} />)
|
|
44
|
-
);
|
|
45
|
-
})
|
|
46
|
-
Toast.displayName = ToastPrimitives.Root.displayName
|
|
47
|
-
|
|
48
|
-
const ToastAction = React.forwardRef(({ className, ...props }, ref) => (
|
|
49
|
-
<ToastPrimitives.Action
|
|
50
|
-
ref={ref}
|
|
51
|
-
className={cn(
|
|
52
|
-
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
53
|
-
className
|
|
54
|
-
)}
|
|
55
|
-
{...props} />
|
|
56
|
-
))
|
|
57
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName
|
|
58
|
-
|
|
59
|
-
const ToastClose = React.forwardRef(({ className, ...props }, ref) => (
|
|
60
|
-
<ToastPrimitives.Close
|
|
61
|
-
ref={ref}
|
|
62
|
-
className={cn(
|
|
63
|
-
"absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
64
|
-
className
|
|
65
|
-
)}
|
|
66
|
-
toast-close=""
|
|
67
|
-
{...props}>
|
|
68
|
-
<X className="h-4 w-4" />
|
|
69
|
-
</ToastPrimitives.Close>
|
|
70
|
-
))
|
|
71
|
-
ToastClose.displayName = ToastPrimitives.Close.displayName
|
|
72
|
-
|
|
73
|
-
const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (
|
|
74
|
-
<ToastPrimitives.Title
|
|
75
|
-
ref={ref}
|
|
76
|
-
className={cn("text-sm font-semibold [&+div]:text-xs", className)}
|
|
77
|
-
{...props} />
|
|
78
|
-
))
|
|
79
|
-
ToastTitle.displayName = ToastPrimitives.Title.displayName
|
|
80
|
-
|
|
81
|
-
const ToastDescription = React.forwardRef(({ className, ...props }, ref) => (
|
|
82
|
-
<ToastPrimitives.Description ref={ref} className={cn("text-sm opacity-90", className)} {...props} />
|
|
83
|
-
))
|
|
84
|
-
ToastDescription.displayName = ToastPrimitives.Description.displayName
|
|
85
|
-
|
|
86
|
-
export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { useToast } from "@/hooks/use-toast"
|
|
4
|
-
import {
|
|
5
|
-
Toast,
|
|
6
|
-
ToastClose,
|
|
7
|
-
ToastDescription,
|
|
8
|
-
ToastProvider,
|
|
9
|
-
ToastTitle,
|
|
10
|
-
ToastViewport,
|
|
11
|
-
} from "@/components/ui/toast"
|
|
12
|
-
|
|
13
|
-
export function Toaster() {
|
|
14
|
-
const { toasts } = useToast()
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
(<ToastProvider>
|
|
18
|
-
{toasts.map(function ({ id, title, description, action, ...props }) {
|
|
19
|
-
return (
|
|
20
|
-
(<Toast key={id} {...props}>
|
|
21
|
-
<div className="grid gap-1">
|
|
22
|
-
{title && <ToastTitle>{title}</ToastTitle>}
|
|
23
|
-
{description && (
|
|
24
|
-
<ToastDescription>{description}</ToastDescription>
|
|
25
|
-
)}
|
|
26
|
-
</div>
|
|
27
|
-
{action}
|
|
28
|
-
<ToastClose />
|
|
29
|
-
</Toast>)
|
|
30
|
-
);
|
|
31
|
-
})}
|
|
32
|
-
<ToastViewport />
|
|
33
|
-
</ToastProvider>)
|
|
34
|
-
);
|
|
35
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const TooltipProvider = TooltipPrimitive.Provider
|
|
9
|
-
|
|
10
|
-
const Tooltip = TooltipPrimitive.Root
|
|
11
|
-
|
|
12
|
-
const TooltipTrigger = TooltipPrimitive.Trigger
|
|
13
|
-
|
|
14
|
-
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (
|
|
15
|
-
<TooltipPrimitive.Portal>
|
|
16
|
-
<TooltipPrimitive.Content
|
|
17
|
-
ref={ref}
|
|
18
|
-
sideOffset={sideOffset}
|
|
19
|
-
className={cn(
|
|
20
|
-
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
{...props} />
|
|
24
|
-
</TooltipPrimitive.Portal>
|
|
25
|
-
))
|
|
26
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
27
|
-
|
|
28
|
-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// components/update-banner.jsx
|
|
2
|
-
'use client'
|
|
3
|
-
|
|
4
|
-
import { useEffect, useState } from 'react';
|
|
5
|
-
import { Info } from 'lucide-react';
|
|
6
|
-
import axios from 'axios';
|
|
7
|
-
|
|
8
|
-
export default function UpdateBanner() {
|
|
9
|
-
const [updateInfo, setUpdateInfo] = useState(null);
|
|
10
|
-
const [visible, setVisible] = useState(false);
|
|
11
|
-
const [loading, setLoading] = useState(true);
|
|
12
|
-
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
const checkForUpdates = async () => {
|
|
15
|
-
try {
|
|
16
|
-
setLoading(true);
|
|
17
|
-
|
|
18
|
-
// Check if we've already dismissed this specific version update
|
|
19
|
-
const dismissedVersion = localStorage.getItem('dismissedVersion');
|
|
20
|
-
|
|
21
|
-
const { data } = await axios.get('/api/update');
|
|
22
|
-
|
|
23
|
-
if (data?.update) {
|
|
24
|
-
// Only show if the user hasn't dismissed this specific version
|
|
25
|
-
if (dismissedVersion !== data.update.latest) {
|
|
26
|
-
setUpdateInfo(data.update);
|
|
27
|
-
setVisible(true);
|
|
28
|
-
} else {
|
|
29
|
-
setVisible(false);
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
setVisible(false);
|
|
33
|
-
}
|
|
34
|
-
} catch (error) {
|
|
35
|
-
console.error('Error checking for updates:', error);
|
|
36
|
-
setVisible(false);
|
|
37
|
-
} finally {
|
|
38
|
-
setLoading(false);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// Check immediately and then daily
|
|
43
|
-
checkForUpdates();
|
|
44
|
-
const interval = setInterval(checkForUpdates, 24 * 60 * 60 * 1000); // Check daily
|
|
45
|
-
|
|
46
|
-
return () => clearInterval(interval);
|
|
47
|
-
}, []);
|
|
48
|
-
|
|
49
|
-
// If banner is dismissed or no update info, don't render and reset CSS variable
|
|
50
|
-
if (!updateInfo || !visible || loading) {
|
|
51
|
-
// Reset the banner height when hidden
|
|
52
|
-
if (typeof document !== 'undefined') {
|
|
53
|
-
document.documentElement.style.setProperty('--banner-height', '0px');
|
|
54
|
-
}
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Set the banner height CSS variable when visible
|
|
59
|
-
if (typeof document !== 'undefined') {
|
|
60
|
-
document.documentElement.style.setProperty('--banner-height', '37px'); // Adjust based on actual banner height
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const handleClose = () => {
|
|
64
|
-
// Store the dismissed version to avoid showing the same update again
|
|
65
|
-
if (updateInfo?.latest) {
|
|
66
|
-
localStorage.setItem('dismissedVersion', updateInfo.latest);
|
|
67
|
-
}
|
|
68
|
-
setVisible(false);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<div className="fixed top-0 left-0 right-0 z-50 bg-yellow-200 border-b border-yellow-500 px-3 py-2 font-sans">
|
|
73
|
-
<div className="flex items-center justify-center relative">
|
|
74
|
-
{/* Info icon and text centered */}
|
|
75
|
-
<div className="flex items-center gap-2 mx-auto">
|
|
76
|
-
<Info className="h-4 w-4 text-neutral-900" />
|
|
77
|
-
<span className="text-sm font-medium">
|
|
78
|
-
Version {updateInfo.latest} is available — npm install -g d1s@latest
|
|
79
|
-
</span>
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
{/* Close button positioned absolutely on the right */}
|
|
83
|
-
<button
|
|
84
|
-
onClick={handleClose}
|
|
85
|
-
className="absolute right-0 text-neutral-500 hover:text-neutral-700"
|
|
86
|
-
aria-label="Close update banner"
|
|
87
|
-
>
|
|
88
|
-
×
|
|
89
|
-
</button>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
);
|
|
93
|
-
}
|