diff --git a/.changeset/dark-mode-page-background.md b/.changeset/dark-mode-page-background.md deleted file mode 100644 index bd02643b..00000000 --- a/.changeset/dark-mode-page-background.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -Fix white page background around Studio in dark mode. When Studio runs in a full-page shell whose document has no host-authored background, the resolved theme now syncs to the document root (`color-scheme` plus Studio's background color), so overscroll areas and the space behind Studio's rounded corners match the active theme. Host pages that style their own ``/`` background are left untouched. diff --git a/.changeset/fix-postgres-enum-array-updates.md b/.changeset/fix-postgres-enum-array-updates.md deleted file mode 100644 index 98479f89..00000000 --- a/.changeset/fix-postgres-enum-array-updates.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -Fix PostgreSQL enum array cell updates failing with "Update Operation failed" by always writing array values as explicit `array[...]` expressions with an array-type cast instead of relying on driver-specific array parameter serialization. Also preserve the original error name when errors are deserialized from the Studio BFF transport. diff --git a/.changeset/fix-sslrootcert-forwarding.md b/.changeset/fix-sslrootcert-forwarding.md deleted file mode 100644 index de345bc8..00000000 --- a/.changeset/fix-sslrootcert-forwarding.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -# Support libpq SSL parameters in Postgres connection strings - -Consume `sslrootcert`, `sslcert`, `sslkey`, `sslpassword`, and `sslmode` client-side when building the postgres.js client instead of forwarding them to the server, which rejected connections with `unrecognized configuration parameter "sslrootcert"`. The new `createPostgresJSConnectionConfig` helper in `@prisma/studio-core/data/postgresjs` translates a connection string into a stripped connection string plus TLS options (reading certificate files from disk) for `postgres()`. diff --git a/.changeset/grid-column-sizing-survives-pinning.md b/.changeset/grid-column-sizing-survives-pinning.md deleted file mode 100644 index 39a02f48..00000000 --- a/.changeset/grid-column-sizing-survives-pinning.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -Fix grid column widths being reset when columns are pinned or unpinned. Resizing a column and then changing any column's pin state (which round-trips through the URL-backed `pinnedColumnIds` prop) wiped all user column widths and custom column ordering back to defaults. The reset now only happens when the set of columns itself changes. diff --git a/.changeset/mariadb-introspection-compat.md b/.changeset/mariadb-introspection-compat.md deleted file mode 100644 index b38a27af..00000000 --- a/.changeset/mariadb-introspection-compat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -Fix MySQL introspection failing on MariaDB. The adapter now detects MariaDB via `select version()` and uses a dedicated tables query that returns one row per column and groups the result on the client, avoiding `json_arrayagg` (missing before MariaDB 10.5), JSON casts (invalid syntax on MariaDB), and any server-side string aggregation that would be truncated at `group_concat_max_len`. Introspection also parses string-encoded `json_arrayagg` payloads returned by some MySQL transports. diff --git a/.changeset/plenty-pumas-repeat.md b/.changeset/plenty-pumas-repeat.md deleted file mode 100644 index 6c25082d..00000000 --- a/.changeset/plenty-pumas-repeat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -Fix `TypeError: crypto.randomUUID is not a function` when Studio is served over plain HTTP on a non-localhost host (non-secure context, e.g. `http://192.168.x.x:5555`). UUID generation now falls back to a UUIDv4 built from `crypto.getRandomValues` when `crypto.randomUUID` is unavailable. diff --git a/.changeset/postgres-datatype-aliases.md b/.changeset/postgres-datatype-aliases.md deleted file mode 100644 index 31598746..00000000 --- a/.changeset/postgres-datatype-aliases.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -# Show common PostgreSQL type aliases - -Display native PostgreSQL catalog type names by their common SQL aliases (`int8` -> `bigint`, `int4` -> `integer`, `int2` -> `smallint`, `float8` -> `double precision`, `float4` -> `real`, `bool` -> `boolean`, `bpchar` -> `char`) in the table header, filter column picker, and schema visualizer, including array types (`int8[]` -> `bigint[]`). diff --git a/.changeset/schema-visualizer-remember-layout.md b/.changeset/schema-visualizer-remember-layout.md deleted file mode 100644 index 18e5de88..00000000 --- a/.changeset/schema-visualizer-remember-layout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": minor ---- - -Remember the schema visualizer's manual table layout. Dragged node positions are now stored in localStorage-backed UI state scoped per schema, so a manual arrangement survives leaving the visualizer and full page reloads. Tables without a remembered position (for example newly created ones) fall back to ELK auto-layout, and the `Reset layout` action clears the remembered layout. diff --git a/.changeset/smooth-horizontal-scroll.md b/.changeset/smooth-horizontal-scroll.md deleted file mode 100644 index d02d5646..00000000 --- a/.changeset/smooth-horizontal-scroll.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -Fix broken horizontal scrolling in wide data tables. The column virtualization window now follows scrolling synchronously and only re-renders the grid when the set of mounted columns changes, so scrolling no longer jumps between columns and the last column is reachable. Focused-cell auto-scroll now runs at most once per focus change, so clicking a cell to edit no longer snaps the viewport back and off-screen focus targets no longer fight user scrolling. Also corrects the virtualization window offset when columns are pinned. diff --git a/.changeset/sqlite-date-like-columns-text.md b/.changeset/sqlite-date-like-columns-text.md deleted file mode 100644 index 69037204..00000000 --- a/.changeset/sqlite-date-like-columns-text.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -# Fix SQLite date-like column edits producing NaN - -SQLite columns declared as `date`, `datetime`, or `timestamp` get NUMERIC affinity, so Studio treated their date-string values as numbers and coerced edits to `NaN`. Date-like declared types are now edited as text and stored as-is, and numeric cell edits, pastes, and filters only coerce input to a number when it actually parses as one — non-numeric text is kept as text, matching SQLite's NUMERIC-affinity semantics, so `NaN` is never written. diff --git a/.changeset/table-row-count-display.md b/.changeset/table-row-count-display.md deleted file mode 100644 index 7db7a1e6..00000000 --- a/.changeset/table-row-count-display.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": minor ---- - -Show the total row count of the current result set in the data grid footer. The count uses the same filtered total that drives pagination, so it respects active filters and row search, formats with thousands separators, and hides when the adapter cannot count rows. diff --git a/.changeset/tidy-lions-tap.md b/.changeset/tidy-lions-tap.md deleted file mode 100644 index 3a18c605..00000000 --- a/.changeset/tidy-lions-tap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -Fix saving staged cell edits silently failing for rows loaded beyond the first batch when infinite scroll is enabled. Row update, delete, and insert mutations now target the same rows-collection scope the grid displays instead of the paginated first page. diff --git a/.changeset/uuid-filter-v6-v8.md b/.changeset/uuid-filter-v6-v8.md deleted file mode 100644 index 8c32c2d6..00000000 --- a/.changeset/uuid-filter-v6-v8.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@prisma/studio-core": patch ---- - -Allow UUID v6–v8 values in column filters. diff --git a/CHANGELOG.md b/CHANGELOG.md index 85ee9aa6..4474d23d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ # @prisma/studio-core +## 0.34.0 + +### Minor Changes + +- dc44731: Remember the schema visualizer's manual table layout. Dragged node positions are now stored in localStorage-backed UI state scoped per schema, so a manual arrangement survives leaving the visualizer and full page reloads. Tables without a remembered position (for example newly created ones) fall back to ELK auto-layout, and the `Reset layout` action clears the remembered layout. +- 1fbd26b: Show the total row count of the current result set in the data grid footer. The count uses the same filtered total that drives pagination, so it respects active filters and row search, formats with thousands separators, and hides when the adapter cannot count rows. + +### Patch Changes + +- 1b72949: Fix white page background around Studio in dark mode. When Studio runs in a full-page shell whose document has no host-authored background, the resolved theme now syncs to the document root (`color-scheme` plus Studio's background color), so overscroll areas and the space behind Studio's rounded corners match the active theme. Host pages that style their own ``/`` background are left untouched. +- 6415faf: Fix PostgreSQL enum array cell updates failing with "Update Operation failed" by always writing array values as explicit `array[...]` expressions with an array-type cast instead of relying on driver-specific array parameter serialization. Also preserve the original error name when errors are deserialized from the Studio BFF transport. +- 3e1c902: # Support libpq SSL parameters in Postgres connection strings + + Consume `sslrootcert`, `sslcert`, `sslkey`, `sslpassword`, and `sslmode` client-side when building the postgres.js client instead of forwarding them to the server, which rejected connections with `unrecognized configuration parameter "sslrootcert"`. The new `createPostgresJSConnectionConfig` helper in `@prisma/studio-core/data/postgresjs` translates a connection string into a stripped connection string plus TLS options (reading certificate files from disk) for `postgres()`. + +- 3f4d84c: Fix grid column widths being reset when columns are pinned or unpinned. Resizing a column and then changing any column's pin state (which round-trips through the URL-backed `pinnedColumnIds` prop) wiped all user column widths and custom column ordering back to defaults. The reset now only happens when the set of columns itself changes. +- df3f210: Fix MySQL introspection failing on MariaDB. The adapter now detects MariaDB via `select version()` and uses a dedicated tables query that returns one row per column and groups the result on the client, avoiding `json_arrayagg` (missing before MariaDB 10.5), JSON casts (invalid syntax on MariaDB), and any server-side string aggregation that would be truncated at `group_concat_max_len`. Introspection also parses string-encoded `json_arrayagg` payloads returned by some MySQL transports. +- f6b4652: Fix `TypeError: crypto.randomUUID is not a function` when Studio is served over plain HTTP on a non-localhost host (non-secure context, e.g. `http://192.168.x.x:5555`). UUID generation now falls back to a UUIDv4 built from `crypto.getRandomValues` when `crypto.randomUUID` is unavailable. +- 9eeb555: # Show common PostgreSQL type aliases + + Display native PostgreSQL catalog type names by their common SQL aliases (`int8` -> `bigint`, `int4` -> `integer`, `int2` -> `smallint`, `float8` -> `double precision`, `float4` -> `real`, `bool` -> `boolean`, `bpchar` -> `char`) in the table header, filter column picker, and schema visualizer, including array types (`int8[]` -> `bigint[]`). + +- 6c9e625: Fix broken horizontal scrolling in wide data tables. The column virtualization window now follows scrolling synchronously and only re-renders the grid when the set of mounted columns changes, so scrolling no longer jumps between columns and the last column is reachable. Focused-cell auto-scroll now runs at most once per focus change, so clicking a cell to edit no longer snaps the viewport back and off-screen focus targets no longer fight user scrolling. Also corrects the virtualization window offset when columns are pinned. +- cb4f6d5: # Fix SQLite date-like column edits producing NaN + + SQLite columns declared as `date`, `datetime`, or `timestamp` get NUMERIC affinity, so Studio treated their date-string values as numbers and coerced edits to `NaN`. Date-like declared types are now edited as text and stored as-is, and numeric cell edits, pastes, and filters only coerce input to a number when it actually parses as one — non-numeric text is kept as text, matching SQLite's NUMERIC-affinity semantics, so `NaN` is never written. + +- 3fec72a: Fix saving staged cell edits silently failing for rows loaded beyond the first batch when infinite scroll is enabled. Row update, delete, and insert mutations now target the same rows-collection scope the grid displays instead of the paginated first page. +- 099b7da: Allow UUID v6–v8 values in column filters. + ## 0.33.0 ### Minor Changes diff --git a/package.json b/package.json index 14cfde60..22566819 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@prisma/studio-core", - "version": "0.33.0", + "version": "0.34.0", "description": "Modular Prisma Studio components", "repository": { "type": "git",