@mechane-ai/elements 0.65.0 → 0.67.0
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/README.md +21 -10
- package/dist/ai.js +285 -203
- package/dist/{article-BrUa4Wz1.js → article-anMy8fA5.js} +6 -6
- package/dist/article.js +1 -1
- package/dist/catalog.json +81 -34
- package/dist/{categorical-values-AXJkMt-Y.js → categorical-values-Bh7ZkEQn.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +1 -1
- package/dist/charts/plot.js +3 -3
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +2 -2
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +2 -2
- package/dist/{code-block-BDRmjlES.js → code-block-DbW_t9U4.js} +1 -1
- package/dist/collections.js +1 -1
- package/dist/{commands-rzsDElrG.js → commands-C7Zrp-tG.js} +2 -2
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-DRaNf1mD.js → content-link-BN4NPp0u.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/{dates-wu-gKO2C.js → dates-OTq-xU33.js} +2 -2
- package/dist/{dumbbell-plot-VFajQtEW.js → dumbbell-plot-BQDGe0sQ.js} +3 -3
- package/dist/{embedding-map-BqDEmy88.js → embedding-map-DmmknG7A.js} +6 -6
- package/dist/feedback.js +1 -1
- package/dist/{figure-frame-Dd-pOeZN.js → figure-frame-DlyNTDzh.js} +22 -21
- package/dist/forms/dates.js +1 -1
- package/dist/{forms-Bjx7JQ30.js → forms-iAOjGRTO.js} +1 -1
- package/dist/forms.js +2 -2
- package/dist/{image-grid-Dpyqxgwy.js → image-grid-CxEAQvTf.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +13 -13
- package/dist/kits/interpretability.js +47 -43
- package/dist/kits/operations.js +80 -79
- package/dist/kits/research.js +364 -499
- package/dist/kits/training.js +108 -107
- package/dist/layout.js +1 -1
- package/dist/lesson.js +3 -3
- package/dist/{markdown--nfaDoR1.js → markdown-Diffqqm7.js} +2 -2
- package/dist/mdx.js +6 -6
- package/dist/navigation/commands.js +1 -1
- package/dist/{navigation-Cp3p0gss.js → navigation-CTnYtVD8.js} +1 -1
- package/dist/navigation.js +3 -3
- package/dist/packages/ai/src/index.d.ts +2 -0
- package/dist/packages/ai/src/message-reactions.d.ts +51 -0
- package/dist/packages/ai/src/message.d.ts +3 -1
- package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
- package/dist/packages/collections/src/card-columns.d.ts +30 -0
- package/dist/packages/collections/src/collection-page.d.ts +43 -0
- package/dist/packages/collections/src/column-card.d.ts +15 -0
- package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
- package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
- package/dist/packages/collections/src/data-table.d.ts +2 -2
- package/dist/packages/collections/src/index.d.ts +5 -0
- package/dist/packages/collections/src/table-query.d.ts +9 -1
- package/dist/packages/feedback/src/feedback.d.ts +0 -4
- package/dist/packages/feedback/src/index.d.ts +1 -1
- package/dist/packages/kits/src/research/index.d.ts +0 -2
- package/dist/{param-CwT1RvUS.js → param-CKr8EYxF.js} +1 -1
- package/dist/{pierre-diff-DuvK3kLF.js → pierre-diff-DXVIwW7o.js} +1 -1
- package/dist/{plot-layout-CvkeUuG6.js → plot-layout-CVzSbcU7.js} +24 -23
- package/dist/{plot-surface-yy37R4vs.js → plot-surface-CBhI1alw.js} +1 -1
- package/dist/{reference-lines-AMeDkYlo.js → reference-lines-C970JwWZ.js} +1 -1
- package/dist/{scene-BRhI8XSy.js → scene-C3dCxckI.js} +6 -6
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-BMOCaa8R.js → slope-chart-DekEJxsy.js} +4 -4
- package/dist/{src-9n2M1V_y.js → src-BCAelv4f.js} +3 -3
- package/dist/{src-BgmAkau8.js → src-Bkov5TTa.js} +171 -164
- package/dist/{src-Bns-5joF.js → src-BsqbWDxS.js} +4 -4
- package/dist/{src-BdyO4PgQ.js → src-CIyuaSCi.js} +101 -107
- package/dist/{src-Tu6d_Pm8.js → src-Dc1t1ugL.js} +958 -585
- package/dist/{src-C5SH3jjU.js → src-DceyVyL0.js} +2 -2
- package/dist/{src-C_E29-DX.js → src-Dlh99sPD.js} +1 -1
- package/dist/styles2.css +21 -1
- package/dist/{time-series-CTNVqoUQ.js → time-series-BSNnijxf.js} +8 -8
- package/dist/{timeline-DrsDtEIW.js → timeline-CnxfYSIg.js} +4 -4
- package/dist/{token-heatmap-DddArdH8.js → token-heatmap-CJaXo56P.js} +3 -3
- package/dist/{token-predictions-CBykmPID.js → token-predictions-Bi7aKPnh.js} +3 -3
- package/dist/{transport-r1QgELf8.js → transport-CXj0DV6o.js} +4 -4
- package/dist/{tree-diagram-BIJFK4pl.js → tree-diagram-BxOZsjr1.js} +4 -4
- package/dist/{treemap-DgmEw_mr.js → treemap-B2yOAetT.js} +4 -4
- package/dist/{use-tween-BWf44Jy4.js → use-tween-C1TWJwce.js} +1 -1
- package/dist/{violin-plot-BYJnv6sG.js → violin-plot-W2L_2JRo.js} +3 -3
- package/dist/{waterfall-BNseqMas.js → waterfall-Bt73N2Ng.js} +4 -4
- package/package.json +1 -1
- package/recipes/searchable-collection.tsx +74 -76
- package/skills/extend-elements/SKILL.md +2 -1
- package/skills/review-elements/SKILL.md +11 -7
- package/skills/upgrade-elements/SKILL.md +3 -1
- package/skills/upgrade-elements/references/releases.md +20 -0
- package/skills/use-elements/SKILL.md +8 -6
- package/skills/use-elements/references/collections.md +59 -12
- package/skills/use-elements/references/conversations.md +32 -0
- package/skills/use-elements/references/editorial-restraint.md +17 -29
- package/skills/use-elements/references/figures.md +6 -2
- package/skills/use-elements/references/workspace.md +5 -5
- package/dist/packages/kits/src/research/collection-page.d.ts +0 -71
|
@@ -5,30 +5,38 @@ application owns requests, URL state, permissions and saved preferences.
|
|
|
5
5
|
|
|
6
6
|
## Declare the query
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Use `CollectionPage` or `CollectionSection` for a titled collection. Supply its read state and a local or controlled
|
|
9
|
+
query. The composition places the search and filter controls in its title row and renders the table and its matching
|
|
10
|
+
placeholder. Start with the installed catalog's `searchable-collection` recipe.
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
| ------------ | ------------------------------------------------------------------------------------------------------- |
|
|
12
|
-
| `local` | The app holds every row. Supply a search accessor and filter dimensions; the table filters and windows. |
|
|
13
|
-
| `controlled` | A server pages the rows. Supply search and filter values with callbacks, and reset the page on change. |
|
|
14
|
-
| `frame` | A shared header already holds the controls. Declare them once with `TableQueryFrame`. |
|
|
15
|
-
| `static` | The table is a fixed reference. Give a concrete `reason`. |
|
|
12
|
+
For example, a finite project list supplies its rows and search fields together.
|
|
16
13
|
|
|
17
14
|
```tsx
|
|
18
|
-
<
|
|
19
|
-
|
|
15
|
+
<CollectionPage
|
|
16
|
+
title="Projects"
|
|
20
17
|
columns={columns}
|
|
21
|
-
rows={projects}
|
|
22
18
|
getRowId={(project) => project.id}
|
|
19
|
+
read={{ state: 'ready', rows: projects }}
|
|
23
20
|
empty="No projects."
|
|
24
21
|
query={{
|
|
25
22
|
mode: 'local',
|
|
26
23
|
search: (project) => project.name,
|
|
27
24
|
filters: [{ id: 'status', label: 'Status', value: (project) => project.status }],
|
|
28
25
|
}}
|
|
26
|
+
rowAction={{ href: (project) => projectHref(project.id) }}
|
|
29
27
|
/>
|
|
30
28
|
```
|
|
31
29
|
|
|
30
|
+
A lower-level `DataTable` can also present rows inside a custom report. It takes a stable `getRowId`, a `caption`, an
|
|
31
|
+
`empty` state and a `query`.
|
|
32
|
+
|
|
33
|
+
| Query mode | Use it when |
|
|
34
|
+
| ------------ | ------------------------------------------------------------------------------------------------------- |
|
|
35
|
+
| `local` | The app holds every row. Supply a search accessor and filter dimensions; the table filters and windows. |
|
|
36
|
+
| `controlled` | A server pages the rows. Supply search and filter values with callbacks, and reset the page on change. |
|
|
37
|
+
| `frame` | An explicit custom report owns a shared query frame for several representations of the same result. |
|
|
38
|
+
| `static` | The table is a fixed reference. Give a concrete `reason`. |
|
|
39
|
+
|
|
32
40
|
To leave out only search or only filters, replace that capability with `{ reason: '…' }`. For a paged source, apply
|
|
33
41
|
search, filters and sort to the whole result before the server takes a page, with a unique key as the last sort field.
|
|
34
42
|
|
|
@@ -87,9 +95,48 @@ key handler around it.
|
|
|
87
95
|
- Register a shortcut with `useCommandShortcuts` from `/navigation/commands`, beside the action's owner, with an
|
|
88
96
|
explicit `isEnabled`. `CommandPalette` lists the same action records and registers nothing by mounting.
|
|
89
97
|
|
|
98
|
+
## Cards in columns
|
|
99
|
+
|
|
100
|
+
Use `CardColumns` for records grouped by a state the reader moves them between, such as tasks. Use `DataTable` when
|
|
101
|
+
records are compared across shared columns, and `Timeline` for events in time order.
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
<CardColumns
|
|
105
|
+
label="Tasks by state"
|
|
106
|
+
locale="en-US"
|
|
107
|
+
columns={states.map((state) => ({
|
|
108
|
+
id: state.id,
|
|
109
|
+
title: state.title,
|
|
110
|
+
items: tasks.filter((t) => t.state === state.id),
|
|
111
|
+
}))}
|
|
112
|
+
getCardId={(task) => task.id}
|
|
113
|
+
getCard={(task) => ({
|
|
114
|
+
title: task.title,
|
|
115
|
+
href: `/tasks/${task.id}`,
|
|
116
|
+
status: <Badge tone={task.tone}>{task.stateTitle}</Badge>,
|
|
117
|
+
meta: <Timestamp dateTime={task.updated} label={task.updatedLabel} />,
|
|
118
|
+
moveTargets: task.allowedStates,
|
|
119
|
+
})}
|
|
120
|
+
onMoveCard={({ item, toColumnId }) => requestMove(item.id, toColumnId)}
|
|
121
|
+
/>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- The app filters and orders the records into columns, in display order. `CardColumns` neither sorts nor counts for you.
|
|
125
|
+
- `onMoveCard` reports a request. Nothing moves until the app supplies new `columns`, so show a pending or failed move
|
|
126
|
+
in the card's `status` or `actions`. Leave `onMoveCard` out for a read-only board.
|
|
127
|
+
- `moveTargets` lists the column ids a card may move to. The app computes it from its rules. An empty list removes the
|
|
128
|
+
card's move control.
|
|
129
|
+
- Pass `status="pending"` or `"failed"` while the read is not ready. A column with no cards then shows a placeholder or
|
|
130
|
+
an error and a dash for its count, never an empty message. Cards already supplied stay visible during a refresh.
|
|
131
|
+
- `columnHeight="bounded"` (the default) caps each column and scrolls its cards. `"fill"` takes the height of the
|
|
132
|
+
parent.
|
|
133
|
+
- There is no drag and drop. Each card's move button is its own Tab stop, so a board with many cards has many stops.
|
|
134
|
+
- Take every word through `labels`, and pass `empty` on a column that needs its own empty text.
|
|
135
|
+
|
|
90
136
|
## A selected record
|
|
91
137
|
|
|
92
|
-
|
|
93
|
-
|
|
138
|
+
Use a detail link for reading one record. If the task requires inspecting a record while operating on the list,
|
|
139
|
+
`Inspector` puts the list in `master` and the selected record in `detail`, side by side when there is room and stacked
|
|
140
|
+
in a narrow container. Change `revealKey` when the selection changes so a stacked detail scrolls into view. `Details`
|
|
94
141
|
renders labeled fields. `Metric` and `MetricGrid` summarize a record or a period; pass `isLoading` to reserve their
|
|
95
142
|
space. `Timestamp` takes an ISO datetime and a label the app formatted with an explicit locale and time zone.
|
|
@@ -19,6 +19,38 @@ Compose `Conversation.Root`, `Viewport`, `Content` and one `Item` per message, w
|
|
|
19
19
|
end-aligned user messages. Render text with `Markdown` from `/content/markdown`. `MessageAction` is a named icon button
|
|
20
20
|
that shows on hover and focus. `ReplyIndicator` shows a supplied waiting label; remove it when real output arrives.
|
|
21
21
|
|
|
22
|
+
## Reactions
|
|
23
|
+
|
|
24
|
+
Pass `MessageReactions` to a `Message`'s `reactions` slot. Unlike `actions`, which appear on hover, reactions stay
|
|
25
|
+
visible.
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
<Message
|
|
29
|
+
author="Ada Example"
|
|
30
|
+
reactions={
|
|
31
|
+
<MessageReactions
|
|
32
|
+
locale="en-US"
|
|
33
|
+
reactions={[{ emoji: '👍', name: 'Thumbs up', count: 3, isReacted: true }]}
|
|
34
|
+
choices={[
|
|
35
|
+
{ emoji: '👍', name: 'Thumbs up' },
|
|
36
|
+
{ emoji: '🎉', name: 'Party popper' },
|
|
37
|
+
]}
|
|
38
|
+
onReactionToggle={({ emoji, isReacted }) => requestReaction(messageId, emoji, isReacted)}
|
|
39
|
+
/>
|
|
40
|
+
}
|
|
41
|
+
>
|
|
42
|
+
Done.
|
|
43
|
+
</Message>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- `reactions` holds only emoji with at least one person, in display order. Give each a `name` in words. A button is
|
|
47
|
+
named from it and the count, such as "Thumbs up, 3", and reports whether it is pressed.
|
|
48
|
+
- `choices` is the app's list of emoji for the add control. Elements ships no emoji data or picker. With no choices the
|
|
49
|
+
add control is left out.
|
|
50
|
+
- Both a chip and a menu choice call `onReactionToggle` with the emoji and the state the viewer asks for. Nothing
|
|
51
|
+
changes until the app supplies new `reactions`, so it owns counts, permission and failed writes. `isDisabled` keeps
|
|
52
|
+
counts visible and stops reacting.
|
|
53
|
+
|
|
22
54
|
## The prompt
|
|
23
55
|
|
|
24
56
|
`PromptInput` takes `value`, `onValueChange` and `onSubmit`. The app owns the draft, the request identity, the result
|
|
@@ -1,35 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# One task per page
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lead with the action the reader came to take. A collection opens with its titled list. Link each record to its detail
|
|
4
|
+
route so people can copy the address, open another tab and return to their place. Give an independent investigation its
|
|
5
|
+
own destination. Keep a chart and its breakdown together when both answer the same question. A persistent inspector is
|
|
6
|
+
appropriate when the task requires simultaneous context, such as inspecting a trace while scrubbing it.
|
|
4
7
|
|
|
5
|
-
##
|
|
8
|
+
## Surfaces and copy
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
investigation its own route.
|
|
10
|
+
Use the collection directly in its working pane. Its heading and row dividers span both edges. The heading and cells own
|
|
11
|
+
their inner padding. Use a reading column for an article or form. Compare both outer edges and the first text position
|
|
12
|
+
independently before adding a wrapper.
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
Give each sentence a job. A label identifies a choice. A qualification identifies a material limit on the data. A
|
|
15
|
+
validation or access error explains what the user can do. Put optional methods and long identifiers in the detail view
|
|
16
|
+
or a named disclosure. Remove copy that narrates ordinary controls, repeats the heading or describes internal matching
|
|
17
|
+
rules. Chart descriptions can identify a non-obvious sample, split or source.
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
content in `PageInset`. Headers, tables and plots supply their own visual structure. Use a `Panel` for a unit that needs
|
|
16
|
-
its own boundary, such as a separate decision.
|
|
19
|
+
## Background updates
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
write UI instructions (`"Hover to inspect..."`, `"Click any cell..."`, `"Check rows to filter"`) or restate what the
|
|
22
|
-
title, axes, and legend already show (`"Dashed curve marks..."`, `"Higher is better..."`).
|
|
23
|
-
- Keep table rows scannable: concise single-line primary labels, short badge tokens, and tabular numbers. Put long prose
|
|
24
|
-
and raw metadata in the click-through inspector pane or drawer.
|
|
25
|
-
- Never show raw backend slugs (`w5_v3_d1536_t115...`) in primary labels; map them to short human labels and keep the
|
|
26
|
-
raw identifier in the inspector with `CopyValue`.
|
|
27
|
-
|
|
28
|
-
## Shell & collection Lego blocks
|
|
29
|
-
|
|
30
|
-
- **Area-forking rail:** Put top-level areas in `AppShell.rail` and Settings/account controls in `AppShell.railFooter`.
|
|
31
|
-
Swap `AppShell.sidebar` to show only the active area's pages—never duplicate every page on both the rail and sidebar.
|
|
32
|
-
- Keep successful background reads quiet. A pending explicit refresh belongs on the action the user pressed. Show
|
|
33
|
-
stale-data or failure feedback beside affected records with a useful recovery action.
|
|
34
|
-
- Use `CollectionPage` for a finite, locally searchable collection. Use a controlled `DataTable` when a server owns
|
|
35
|
-
paging, filtering or sorting. Searching only the loaded page gives incomplete results.
|
|
21
|
+
Keep a usable authorized collection in place during a refresh. An explicit refresh reports progress on its trigger. When
|
|
22
|
+
stale data matters to the task, expose its status and recovery on an existing stable control. Preserve a visible
|
|
23
|
+
recovery path for a failed initial read. A reconnect or status change must leave the row under the pointer in place.
|
|
@@ -78,7 +78,7 @@ The last bin has `"count": null`. The chart draws it hollow, not as zero.
|
|
|
78
78
|
## Check and draw it
|
|
79
79
|
|
|
80
80
|
```tsx
|
|
81
|
-
import {
|
|
81
|
+
import { Status } from '@mechane-ai/elements';
|
|
82
82
|
import { useState } from 'react';
|
|
83
83
|
|
|
84
84
|
function AgentFigure({ input }: { readonly input: unknown }) {
|
|
@@ -86,7 +86,11 @@ function AgentFigure({ input }: { readonly input: unknown }) {
|
|
|
86
86
|
const result = validateFigureSpec(input);
|
|
87
87
|
|
|
88
88
|
if (result.kind === 'invalid') {
|
|
89
|
-
return
|
|
89
|
+
return (
|
|
90
|
+
<Status tone="negative" role="alert">
|
|
91
|
+
{result.message}
|
|
92
|
+
</Status>
|
|
93
|
+
);
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
return <Figure spec={result.spec} selected={selected} onSelectedChange={(id) => setSelected(id)} />;
|
|
@@ -23,11 +23,11 @@ centered prose or a form with a bounded line length. Keep a wide plot's horizont
|
|
|
23
23
|
both outer edges of each section header and table to the working pane at each viewport width. An inspector or drawer can
|
|
24
24
|
be its own working pane.
|
|
25
25
|
|
|
26
|
-
Use `CollectionPage` from `/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
Use `CollectionPage` from `/collections` for the primary list, or `CollectionSection` under a page heading. Search and
|
|
27
|
+
filters belong to the collection title row. The collection handles pending geometry, focus and query controls. The app
|
|
28
|
+
supplies the local or controlled query and the row's destination. For distinct reading or editing tasks use linked
|
|
29
|
+
routes. Use a `Workbench` when the reader needs simultaneous context, such as inspecting a trace while scrubbing its
|
|
30
|
+
timeline.
|
|
31
31
|
|
|
32
32
|
Use `SegmentedControl` from `/forms` to switch between a few views; one item is always checked. Use `ToggleGroup` for
|
|
33
33
|
independent pressed choices. Both size to their content. Put either beside an Elements field and select, compare their
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
-
import type { DataTableColumn, DataTableRowAction, DataTableSort, DataTableSortDetails, LocalTableQuery } from '../../../collections/src/index.ts';
|
|
3
|
-
import { PageLayout } from '../../../layout/src/index.ts';
|
|
4
|
-
export type CollectionStatus = 'loading' | 'ready' | 'failed';
|
|
5
|
-
/** A named scope partition shown as a segmented switcher in the collection header with live item counts. */
|
|
6
|
-
export type CollectionScope<Row> = {
|
|
7
|
-
readonly id: string;
|
|
8
|
-
readonly label: string;
|
|
9
|
-
readonly match: (row: Row) => boolean;
|
|
10
|
-
};
|
|
11
|
-
type SortableColumns<Row> = {
|
|
12
|
-
readonly columns: ReadonlyArray<DataTableColumn<Row>>;
|
|
13
|
-
readonly sort: DataTableSort | undefined;
|
|
14
|
-
readonly onSortChange: (sort: DataTableSort | undefined, details: DataTableSortDetails) => void;
|
|
15
|
-
} | {
|
|
16
|
-
readonly columns: ReadonlyArray<DataTableColumn<Row> & {
|
|
17
|
-
readonly canSort?: false;
|
|
18
|
-
}>;
|
|
19
|
-
readonly sort?: never;
|
|
20
|
-
readonly onSortChange?: never;
|
|
21
|
-
};
|
|
22
|
-
type SharedCollectionProps<Row extends object> = SortableColumns<Row> & {
|
|
23
|
-
readonly title: string;
|
|
24
|
-
readonly caption?: string;
|
|
25
|
-
readonly rows: ReadonlyArray<Row>;
|
|
26
|
-
readonly getRowId: (row: Row) => string;
|
|
27
|
-
/** Local full-text search accessor, or an explicit exception reason when search is omitted. */
|
|
28
|
-
readonly search: LocalTableQuery<Row>['search'];
|
|
29
|
-
/** Local filter dimensions rendered in the top toolbar filter menu, or an explicit exception reason. */
|
|
30
|
-
readonly filters: LocalTableQuery<Row>['filters'];
|
|
31
|
-
/** Optional custom row transformer (e.g. sorting) applied after local search and filtering. */
|
|
32
|
-
readonly transformRows?: (rows: ReadonlyArray<Row>) => ReadonlyArray<Row>;
|
|
33
|
-
/** Optional segmented scopes (e.g. Active / All) that partition rows before local search and filtering. */
|
|
34
|
-
readonly scopes?: ReadonlyArray<CollectionScope<Row>> | undefined;
|
|
35
|
-
readonly defaultScopeId?: string | undefined;
|
|
36
|
-
readonly actions?: ReactNode;
|
|
37
|
-
readonly notice?: ReactNode;
|
|
38
|
-
readonly rowAction?: DataTableRowAction<Row> | undefined;
|
|
39
|
-
readonly activeRowId?: string | undefined;
|
|
40
|
-
readonly rowSizing?: 'fixed' | 'content' | undefined;
|
|
41
|
-
readonly empty: ReactNode;
|
|
42
|
-
readonly filteredEmpty?: ReactNode;
|
|
43
|
-
/** Read lifecycle state: `'loading'` reserves geometry with `DataTablePlaceholder` inside `AsyncRegion`. */
|
|
44
|
-
readonly status?: CollectionStatus;
|
|
45
|
-
readonly failure?: ReactNode;
|
|
46
|
-
readonly placeholderRows?: number;
|
|
47
|
-
};
|
|
48
|
-
export type CollectionPageProps<Row extends object> = SharedCollectionProps<Row> & {
|
|
49
|
-
readonly navigation?: ComponentProps<typeof PageLayout>['navigation'];
|
|
50
|
-
/** Optional right-hand inspector pane rendered inside a resizable Workbench split when open. */
|
|
51
|
-
readonly inspector?: {
|
|
52
|
-
readonly label: string;
|
|
53
|
-
readonly content: ReactNode;
|
|
54
|
-
} | undefined;
|
|
55
|
-
};
|
|
56
|
-
export type CollectionSectionProps<Row extends object> = SharedCollectionProps<Row> & {
|
|
57
|
-
readonly id?: string;
|
|
58
|
-
readonly meta?: ReactNode;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Full-width collection page Lego block: wires `PageLayout`, top-bar search and filter controls (`/` and `⌘F`), active
|
|
62
|
-
* filter chips, `AsyncRegion` + `DataTablePlaceholder` loading states, edge-to-edge `CollectionLayout`, and an optional
|
|
63
|
-
* resizable `Workbench` inspector.
|
|
64
|
-
*/
|
|
65
|
-
export declare function CollectionPage<Row extends object>(props: CollectionPageProps<Row>): ReactNode;
|
|
66
|
-
/**
|
|
67
|
-
* Full-width collection section for tabbed or multi-section views. Wires `SectionHeading`, top-bar search and filters,
|
|
68
|
-
* active filter chips, `AsyncRegion` loading placeholders, and edge-to-edge `DataTable`.
|
|
69
|
-
*/
|
|
70
|
-
export declare function CollectionSection<Row extends object>(props: CollectionSectionProps<Row>): ReactNode;
|
|
71
|
-
export {};
|