torch-glare-mcp 1.3.0 → 1.3.1
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.
|
@@ -140,6 +140,8 @@ Inbox auto-detects `isRead`, `isStarred`, `hasAttachment`, `priority`. Override
|
|
|
140
140
|
| `views` | `ViewVisibility` | all on (tree auto) | Per-view toggle: `{ table?, kanban?, inbox?, tree? }`. Omitted keys default to `true` (Tree auto-hides without hierarchy). |
|
|
141
141
|
| `kanbanGroupBy` | `string` | `"status"` | Dot-path to the field used for Kanban columns. |
|
|
142
142
|
| `inboxConfig` | `InboxConfig` | auto-detected | Map of starred/read/attachment/priority field paths for Inbox. |
|
|
143
|
+
| `inboxItemHref` | `(item, id) => string` | — | When set, each Inbox row becomes a link to the returned href. |
|
|
144
|
+
| `inboxLinkComponent` | `ElementType` | `"a"` | Component used to render Inbox item links when `inboxItemHref` is set. Pass your router's link (Next.js `Link`, React Router `Link`) for client-side navigation; defaults to a plain `<a>` (full-page nav). |
|
|
143
145
|
| `treeConfig` | `TreeConfig` | auto-detected | `childrenField`, `parentField`, `idField`, `nodeLabel`, `defaultExpanded`. |
|
|
144
146
|
| `filterState` | `FilterState` | uncontrolled | Controlled filter state. Pair with `onFilterChange`. |
|
|
145
147
|
| `onFilterChange` | `(state: FilterState) => void` | — | Fires when any filter changes. When provided, the layout is controlled. |
|
|
@@ -82,18 +82,26 @@ function Mailbox() {
|
|
|
82
82
|
|
|
83
83
|
### Link rows to routes (framework-agnostic)
|
|
84
84
|
|
|
85
|
-
`itemHref` turns each row into a link.
|
|
86
|
-
|
|
85
|
+
`itemHref` turns each row into a link. By default the card renders a plain `<a>`
|
|
86
|
+
(full-page navigation), so it works in any framework. For client-side routing,
|
|
87
|
+
pass your router's link via `linkComponent` — this is what makes navigation
|
|
88
|
+
behave consistently across environments. Without it you get a normal `<a>`.
|
|
87
89
|
|
|
88
90
|
```tsx
|
|
91
|
+
// Next.js
|
|
92
|
+
import Link from "next/link"
|
|
93
|
+
|
|
89
94
|
<InboxView
|
|
90
95
|
data={state.flatItems}
|
|
91
96
|
fields={state.resolvedFields}
|
|
92
97
|
config={state.config}
|
|
93
98
|
itemHref={(item, id) => `/messages/${id}`}
|
|
99
|
+
linkComponent={Link} // React Router users pass their <Link> the same way
|
|
94
100
|
/>
|
|
95
101
|
```
|
|
96
102
|
|
|
103
|
+
> Via `DataViewsLayout` (tab mode) the same prop is named `inboxLinkComponent`.
|
|
104
|
+
|
|
97
105
|
## API Reference
|
|
98
106
|
|
|
99
107
|
### `InboxViewProps`
|
|
@@ -111,6 +119,7 @@ by default, so it works in any framework.
|
|
|
111
119
|
| `onFilterChange` | `(filters: FilterState) => void` | `undefined` | Fires when a filter changes. |
|
|
112
120
|
| `showFilters` | `boolean` | `true` | Show the integrated filter panel. |
|
|
113
121
|
| `itemHref` | `(item: DynamicRecord, id: any) => string` | `undefined` | When set, each row becomes a link to the returned href. |
|
|
122
|
+
| `linkComponent` | `ElementType` | `"a"` | Component used to render each item's link when `itemHref` is set. Pass your router's link (Next.js `Link`, React Router `Link`) for client-side navigation. Defaults to a plain `<a>` (full-page nav). |
|
|
114
123
|
| `selectedItemId` | `any` | `undefined` | Id of the currently selected row (drives the detail pane + highlight). |
|
|
115
124
|
| `renderDetail` | `(item: DynamicRecord \| null) => ReactNode` | `undefined` | Renders the right-hand detail pane for the selected item. |
|
|
116
125
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "torch-glare-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "MCP server for TORCH Glare component library — gives AI assistants full access to component docs, API references, code examples, and design system info",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|