From 53ce33ca12894da12d8766bc4eafd5fdeb5ebd16 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 18:10:33 +0000 Subject: [PATCH] docs(fields): correct the four Cell Renderer imports and bring the blocks under the type gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Cell Renderer example on grid, object, summary and vector each imported a symbol @object-ui/fields does not export. Re-fenced as ts and measured on origin/main, all four produced TS2724. Two different defects, per the ruling on the card: - summary / object have a real renderer under a different name — getCellRenderer's standardMap routes `summary` to the exported FormulaCellRenderer and `object` to the exported JsonCellRenderer. The imports are renamed. - grid / vector have no exported renderer at all — standardMap answers both with an inline anonymous component, so there is no symbol to import. Their snippets now show the real, supported path: getCellRenderer(type). No new exports were minted, and no FRAGMENT_MARKER was added: declared fragments stay at 111 while blocks-to-compile goes 181 -> 185. The rendered-output comments beside each import were corrected in the same pass — they described output the code does not produce (`grid` renders "[Grid]", not "5 rows"; `vector` renders "[Vector]", not a component preview; FormulaCellRenderer stringifies rather than formatting with tabular numbers; JsonCellRenderer never emits a literal "[Object]"). Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe --- content/docs/fields/grid.mdx | 12 ++++++++---- content/docs/fields/object.mdx | 12 ++++++++---- content/docs/fields/summary.mdx | 11 +++++++---- content/docs/fields/vector.mdx | 12 ++++++++---- 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/content/docs/fields/grid.mdx b/content/docs/fields/grid.mdx index 8a35a0792f..6475b83929 100644 --- a/content/docs/fields/grid.mdx +++ b/content/docs/fields/grid.mdx @@ -158,12 +158,16 @@ const gridValue = [ ## Cell Renderer -In tables/grids, displays row count: +In tables/grids, a `grid` value is shown as a compact placeholder, not as a +nested table. It has no named renderer export of its own — the component is +resolved by field type, which is the supported path for every type: -```plaintext -import { GridCellRenderer } from '@object-ui/fields'; +```ts +import { getCellRenderer } from '@object-ui/fields'; + +const GridCell = getCellRenderer('grid'); -// Renders: "5 rows" +// renders: [Grid] ``` ## Full Grid Functionality diff --git a/content/docs/fields/object.mdx b/content/docs/fields/object.mdx index 380e394074..aefb22fcdf 100644 --- a/content/docs/fields/object.mdx +++ b/content/docs/fields/object.mdx @@ -122,12 +122,16 @@ The object field stores data as parsed JSON: ## Cell Renderer -In tables/grids, displays formatted JSON preview: +In tables/grids, an `object` value is rendered by the JSON cell renderer — +`getCellRenderer('object')` resolves to this same component, shared with `json`, +`composite` and `record`: -```plaintext -import { ObjectCellRenderer } from '@object-ui/fields'; +```ts +import { JsonCellRenderer } from '@object-ui/fields'; -// Shows: [Object] or truncated JSON in read-only mode +// renders single-line JSON, +// truncated to the column width with the full text in the cell's `title`. +// A null or empty value renders an em-dash instead. ``` ## Schema Validation diff --git a/content/docs/fields/summary.mdx b/content/docs/fields/summary.mdx index 79015625ba..7e7dd24532 100644 --- a/content/docs/fields/summary.mdx +++ b/content/docs/fields/summary.mdx @@ -99,12 +99,15 @@ interface SummaryFieldSchema { ## Cell Renderer -In tables/grids, displays with tabular numbers: +In tables/grids, a `summary` value is rendered by the formula cell renderer — +`getCellRenderer('summary')` resolves to this same component: -```plaintext -import { SummaryCellRenderer } from '@object-ui/fields'; +```ts +import { FormulaCellRenderer } from '@object-ui/fields'; -// Renders: 15,750.50 (formatted with proper precision) +// renders the computed +// value as monospace text: 15750.5 +// A null or empty value renders an em-dash instead. ``` ## Backend Implementation diff --git a/content/docs/fields/vector.mdx b/content/docs/fields/vector.mdx index 57a32a5ee0..91945d782d 100644 --- a/content/docs/fields/vector.mdx +++ b/content/docs/fields/vector.mdx @@ -67,12 +67,16 @@ const embedding: number[] = [ ## Cell Renderer -In tables/grids, displays compact preview: +In tables/grids, a `vector` value is shown as a compact placeholder, not as its +components. It has no named renderer export of its own — the component is +resolved by field type, which is the supported path for every type: -```plaintext -import { VectorCellRenderer } from '@object-ui/fields'; +```ts +import { getCellRenderer } from '@object-ui/fields'; + +const VectorCell = getCellRenderer('vector'); -// Renders: [0.1234, -0.5678, 0.9012...] (768D) +// renders: [Vector] ``` ## Vector Operations