@mechane-ai/elements 0.64.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.
Files changed (130) hide show
  1. package/README.md +39 -27
  2. package/dist/ai.js +285 -203
  3. package/dist/{article-BopqPz1K.js → article-anMy8fA5.js} +6 -6
  4. package/dist/article.js +1 -1
  5. package/dist/catalog.json +137 -46
  6. package/dist/{categorical-values-8LA9KXhi.js → categorical-values-Bh7ZkEQn.js} +1 -1
  7. package/dist/charts/cartesian.js +1 -1
  8. package/dist/charts/comparison.js +1 -1
  9. package/dist/charts/distribution.js +1 -1
  10. package/dist/charts/figure.js +12 -12
  11. package/dist/charts/graph.js +1 -1
  12. package/dist/charts/hierarchy.js +1 -1
  13. package/dist/charts/image.js +1 -1
  14. package/dist/charts/matrix.js +1 -1
  15. package/dist/charts/plot.js +3 -3
  16. package/dist/charts/relationship.js +1 -1
  17. package/dist/charts/text.js +1 -1
  18. package/dist/charts/timeline.js +2 -2
  19. package/dist/charts/trend.js +1 -1
  20. package/dist/charts.js +2 -2
  21. package/dist/{code-block-BjQUIvvw.js → code-block-DbW_t9U4.js} +1 -1
  22. package/dist/collections.js +1 -1
  23. package/dist/{commands-BI9rWGpb.js → commands-C7Zrp-tG.js} +2 -2
  24. package/dist/content/code.js +1 -1
  25. package/dist/content/diff.js +3 -3
  26. package/dist/content/link.js +1 -1
  27. package/dist/content/markdown.js +1 -1
  28. package/dist/content/tree.js +2 -2
  29. package/dist/{content-link-C3RAJ2kP.js → content-link-BN4NPp0u.js} +1 -1
  30. package/dist/content.js +1 -1
  31. package/dist/{dates-D1v_jiva.js → dates-OTq-xU33.js} +2 -2
  32. package/dist/{dumbbell-plot-QGjFMk0X.js → dumbbell-plot-BQDGe0sQ.js} +3 -3
  33. package/dist/{embedding-map-D_RNxsCD.js → embedding-map-DmmknG7A.js} +6 -6
  34. package/dist/feedback.js +1 -1
  35. package/dist/{figure-frame-CF3298LZ.js → figure-frame-DlyNTDzh.js} +22 -21
  36. package/dist/forms/dates.js +1 -1
  37. package/dist/{forms-DlKhXUlc.js → forms-iAOjGRTO.js} +1 -1
  38. package/dist/forms.js +2 -2
  39. package/dist/{image-grid-BXsgVBnB.js → image-grid-CxEAQvTf.js} +3 -3
  40. package/dist/index.js +1 -1
  41. package/dist/kits/evaluation.js +13 -13
  42. package/dist/kits/interpretability.js +47 -43
  43. package/dist/kits/operations.js +80 -79
  44. package/dist/kits/research.js +364 -520
  45. package/dist/kits/training.js +108 -107
  46. package/dist/layout.js +1 -1
  47. package/dist/lesson.js +3 -3
  48. package/dist/{markdown-B92daSMP.js → markdown-Diffqqm7.js} +2 -2
  49. package/dist/mdx.js +6 -6
  50. package/dist/navigation/commands.js +1 -1
  51. package/dist/{navigation-D3vnWiVv.js → navigation-CTnYtVD8.js} +1 -1
  52. package/dist/navigation.js +4 -4
  53. package/dist/packages/ai/src/index.d.ts +2 -0
  54. package/dist/packages/ai/src/message-reactions.d.ts +51 -0
  55. package/dist/packages/ai/src/message.d.ts +3 -1
  56. package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
  57. package/dist/packages/collections/src/card-columns.d.ts +30 -0
  58. package/dist/packages/collections/src/collection-page.d.ts +43 -0
  59. package/dist/packages/collections/src/column-card.d.ts +15 -0
  60. package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
  61. package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
  62. package/dist/packages/collections/src/data-table.d.ts +2 -2
  63. package/dist/packages/collections/src/index.d.ts +5 -0
  64. package/dist/packages/collections/src/table-query.d.ts +13 -4
  65. package/dist/packages/collections/src/use-collection-controls.d.ts +6 -0
  66. package/dist/packages/feedback/src/feedback.d.ts +0 -4
  67. package/dist/packages/feedback/src/index.d.ts +1 -1
  68. package/dist/packages/kits/src/research/index.d.ts +0 -2
  69. package/dist/packages/layout/src/app-shell.d.ts +3 -1
  70. package/dist/packages/layout/src/index.d.ts +4 -4
  71. package/dist/packages/layout/src/page-inset.d.ts +5 -0
  72. package/dist/packages/layout/src/page-layout.d.ts +4 -9
  73. package/dist/packages/layout/src/page-toolbar.d.ts +1 -2
  74. package/dist/packages/layout/src/reading-column.d.ts +4 -0
  75. package/dist/packages/layout/src/record-page.d.ts +4 -6
  76. package/dist/packages/layout/src/sidebar.d.ts +3 -1
  77. package/dist/packages/layout/src/workbench.d.ts +2 -6
  78. package/dist/packages/navigation/src/current-page-click.d.ts +3 -0
  79. package/dist/packages/navigation/src/index.d.ts +1 -0
  80. package/dist/{param-DfOYi9wL.js → param-CKr8EYxF.js} +1 -1
  81. package/dist/{pierre-diff-DP_TXXIt.js → pierre-diff-DXVIwW7o.js} +1 -1
  82. package/dist/{plot-layout-BfXmAi71.js → plot-layout-CVzSbcU7.js} +24 -23
  83. package/dist/{plot-surface-UQgDiTVe.js → plot-surface-CBhI1alw.js} +1 -1
  84. package/dist/{reference-lines-BRHB78Wb.js → reference-lines-C970JwWZ.js} +1 -1
  85. package/dist/{scene-DlVQupfw.js → scene-C3dCxckI.js} +6 -6
  86. package/dist/scene.js +1 -1
  87. package/dist/{slope-chart-CjXcvoRJ.js → slope-chart-DekEJxsy.js} +4 -4
  88. package/dist/{src-DojhQZKX.js → src-BCAelv4f.js} +376 -399
  89. package/dist/{src-BYmv3_AL.js → src-Bkov5TTa.js} +204 -191
  90. package/dist/{src-BdQGb362.js → src-BsqbWDxS.js} +4 -4
  91. package/dist/{src-DPcnDU5H.js → src-CIyuaSCi.js} +101 -107
  92. package/dist/src-Dc1t1ugL.js +2612 -0
  93. package/dist/{src-BYnmQkDq.js → src-DceyVyL0.js} +2 -2
  94. package/dist/{src-BI1xQE7D.js → src-Dlh99sPD.js} +46 -32
  95. package/dist/styles2.css +35 -41
  96. package/dist/{time-series-Dg3DZRGx.js → time-series-BSNnijxf.js} +8 -8
  97. package/dist/{timeline-C2IVroD3.js → timeline-CnxfYSIg.js} +4 -4
  98. package/dist/{token-heatmap-CZtIPU60.js → token-heatmap-CJaXo56P.js} +3 -3
  99. package/dist/{token-predictions-BJ5L-Lrm.js → token-predictions-Bi7aKPnh.js} +3 -3
  100. package/dist/{transport-D9e0H2we.js → transport-CXj0DV6o.js} +4 -4
  101. package/dist/{tree-diagram-DRAJiqjW.js → tree-diagram-BxOZsjr1.js} +4 -4
  102. package/dist/{treemap-BdELCV7E.js → treemap-B2yOAetT.js} +4 -4
  103. package/dist/{use-tween-COV8bEYL.js → use-tween-C1TWJwce.js} +1 -1
  104. package/dist/{violin-plot-DuxqWnuD.js → violin-plot-W2L_2JRo.js} +3 -3
  105. package/dist/{waterfall-D4ewGb4u.js → waterfall-Bt73N2Ng.js} +4 -4
  106. package/package.json +1 -1
  107. package/recipes/allocation-report.tsx +4 -4
  108. package/recipes/calendar-workspace.tsx +14 -10
  109. package/recipes/consequential-form.tsx +4 -4
  110. package/recipes/searchable-collection.tsx +66 -58
  111. package/recipes/sectioned-report.tsx +17 -18
  112. package/recipes/session-timeline.tsx +59 -0
  113. package/recipes/tabbed-workspace.tsx +7 -8
  114. package/recipes/workspace-files.tsx +94 -0
  115. package/recipes/workspace-report.tsx +130 -0
  116. package/skills/extend-elements/SKILL.md +21 -0
  117. package/skills/review-elements/SKILL.md +20 -13
  118. package/skills/upgrade-elements/SKILL.md +3 -1
  119. package/skills/upgrade-elements/references/releases.md +36 -0
  120. package/skills/use-elements/SKILL.md +13 -7
  121. package/skills/use-elements/references/collections.md +67 -14
  122. package/skills/use-elements/references/conversations.md +32 -0
  123. package/skills/use-elements/references/editorial-restraint.md +17 -34
  124. package/skills/use-elements/references/figures.md +6 -2
  125. package/skills/use-elements/references/reports.md +4 -1
  126. package/skills/use-elements/references/workspace.md +18 -14
  127. package/dist/packages/kits/src/research/collection-page.d.ts +0 -72
  128. package/dist/packages/layout/src/detail-page.d.ts +0 -9
  129. package/dist/packages/layout/src/page-content.d.ts +0 -5
  130. package/dist/src-P19zz_aO.js +0 -2235
package/README.md CHANGED
@@ -128,14 +128,14 @@ Every path below belongs to `@mechane-ai/elements`. There is one package, versio
128
128
  | `/navigation` | Tabs, page navigation, breadcrumbs, skip links, and shortcut labels. |
129
129
  | `/navigation/commands` | Command palette and scoped application-owned shortcuts. |
130
130
  | `/layout` | Application shell, sidebar, toolbars, compound record pages, and resizable panes. |
131
- | `/collections` | Tables, inspectors, collection controls, timelines, metrics, and timestamps. |
131
+ | `/collections` | Tables, inspectors, collection controls, timelines, card columns, metrics, and timestamps. |
132
132
  | `/content` | Trace, JSON, recorded logs, stack traces, media, and playback controls. |
133
133
  | `/content/link` | Safe content links without a renderer dependency. |
134
134
  | `/content/markdown` | Completed and streaming Markdown, embedded headings, and inert previews. |
135
135
  | `/content/code` | Source-preserving code highlighting. |
136
136
  | `/content/diff` | File changes and patches. |
137
137
  | `/content/tree` | File paths, statuses, and controlled selection. |
138
- | `/ai` | Conversations, messages, prompts, approvals, sources, and citations. |
138
+ | `/ai` | Conversations, messages, message reactions, prompts, approvals, sources, and citations. |
139
139
  | `/charts` | Figure props, formats, tone scope, linked inspection, frames, legends, and grids. |
140
140
  | `/charts/cartesian` | Lines, ranges, areas, sparklines, small multiples, bars, bridges, and scatter plots. |
141
141
  | `/charts/distribution` | Histograms, cumulative distributions, intervals, ranked values, box, violin, strip, and ridgeline plots. |
@@ -179,9 +179,9 @@ input limits, and readable fallbacks.
179
179
 
180
180
  Choose the
181
181
  [containing task and layout](https://github.com/mechane-ai/mechane/blob/main/workspaces/core/docs/visual-system.md#composition-decisions)
182
- before adding a surface. Stack related page sections. `PageContent` insets content, `PageSection` combines inset content
183
- with full-width finite rows, and `CollectionLayout` gives a primary collection its available height. Dialogs, inspectors
184
- and structured message Cards retain their own containing width. `Panel` bounds an independent unit.
182
+ before adding a surface. Stack related page sections. `PageInset` insets a form or prose. `PageSection` gives its
183
+ heading and children the full pane width, and `CollectionLayout` gives a primary collection its available height.
184
+ Dialogs, inspectors and structured message Cards retain their own containing width. `Panel` bounds an independent unit.
185
185
 
186
186
  Use Elements' `render` composition and named variants for appearance. Native attributes, events, and refs remain
187
187
  available. Typed `xstyle` inputs permit placement styles compiled by the application's StyleX setup. Applications own
@@ -199,7 +199,8 @@ supplies the same gap between these targets as between the primary links. Supply
199
199
  `Avatar` supports `shape="circle"` for an initials or photo trigger. Applications supply selection, URLs, native link
200
200
  handlers, and action callbacks. Omit the rail for a sidebar that collapses to page icons.
201
201
  `SidebarFooter layout="navigation"` holds persistent controls in the contextual sidebar and reserves their intrinsic
202
- height while its pages scroll independently.
202
+ height while its pages scroll independently. Put the workspace selector in `AppShell.sidebarControls`. The shell aligns
203
+ controls with navigation rows, hides them when collapsed to icons and shows them in the phone drawer.
203
204
 
204
205
  Use `PageLayout` for a screen. Give it the page title, actions, and optional `navigation` with the destination links,
205
206
  selected ID, and view actions. The toolbar and navigation keep their natural height above the scrolling body. Wrap each
@@ -219,11 +220,11 @@ Navigation closes the mobile drawer and preserves focus set by the destination.
219
220
  `AppShell shouldFocus` temporarily hides navigation while retaining its expansion state. `ViewStack.Panel` keeps
220
221
  inactive content mounted and measurable but removes it from keyboard and assistive-technology navigation. The
221
222
  application owns which view is active and when to unmount it; use this for a draft or reading position that must survive
222
- inspection. `WorkbenchScroll` requires an accessible `label`; its `isFlush` mode leaves list insets to the table. Its
223
- `scrollRestorationId` identifies the actual scroll region for application-owned restoration. Layout wrappers leave
224
- sequential keyboard navigation to their controls. Tables and viewers add a named scroll stop when overflow needs one.
225
- Interactive charts have one Tab stop, a local datum cursor, and arrow-key inspection. Enter or Space activates supplied
226
- selection; Escape dismisses the readout while retaining the cursor.
223
+ inspection. `WorkbenchScroll` requires an accessible `label`; its contents fill the pane, and table cells own their
224
+ insets. Its `scrollRestorationId` identifies the actual scroll region for application-owned restoration. Layout wrappers
225
+ leave sequential keyboard navigation to their controls. Tables and viewers add a named scroll stop when overflow needs
226
+ one. Interactive charts have one Tab stop, a local datum cursor, and arrow-key inspection. Enter or Space activates
227
+ supplied selection; Escape dismisses the readout while retaining the cursor.
227
228
 
228
229
  Change callbacks receive the UI SDK's change details after the value. `details.reason` names what happened, such as
229
230
  `input-change`, `clear-press` or `item-press`, and `details.source` says whether a pointer, the keyboard, an agent or
@@ -235,8 +236,9 @@ filter's `onChange`, `FilterChips` `onRemove`, a chart's `onSelectedChange` and
235
236
  supplies the accessible name with the panel content and owns opening, closing, and focus restoration. The inspector
236
237
  replaces the main column at compact widths while keeping that column mounted.
237
238
 
238
- Every `DataTable` requires a `query`. For a finite list, supply the complete authorized rows and declare how users can
239
- search and filter them.
239
+ Use `CollectionPage` for a list and `CollectionSection` beneath an existing page title, both from `/collections`. Give
240
+ the collection a read state and a query. It places search and filter controls beside the title and renders the matching
241
+ placeholder and full-width rows. For a finite list, supply all authorized records and declare its searchable fields.
240
242
 
241
243
  ```tsx
242
244
  query={{
@@ -247,8 +249,8 @@ query={{
247
249
  ```
248
250
 
249
251
  For paged records use `mode: 'controlled'` with query values and callbacks. Apply search and filters before server
250
- pagination. When an enclosing collection already supplies the controls, declare its capabilities with `TableQueryFrame`
251
- and use `mode: 'frame'` on its table. A static table, or an individual capability that does not apply, requires a
252
+ pagination. Use the lower-level `TableQueryFrame` with a frame-owned `DataTable` only when building a custom report
253
+ whose controls govern several representations of the same result. A static table or unavailable capability requires a
252
254
  reason.
253
255
 
254
256
  Each `DataTable` column declares a role: `primary`, `text`, `status`, `number`, `timestamp`, or `actions`. Roles own
@@ -268,6 +270,14 @@ arrow keys move between them. `CollectionEnd` renders nothing when complete unle
268
270
  body content, without interpreting domain events. The events share one Tab stop on the UI SDK timeline, and arrow keys
269
271
  move between them.
270
272
 
273
+ `CardColumns` shows records as cards in named columns, such as tasks by state. Supply `columns` with each column's
274
+ records in display order, `getCard` to map a record onto a `CardSummary` (title, owner mark, status, metadata and
275
+ actions), a stable `getCardId` and a `locale` for the counts. With `onMoveCard`, each card has a move menu that reports
276
+ the card, its column and the destination; a card's `moveTargets` limits the destinations. There is no drag and drop.
277
+ Columns scroll sideways when they do not fit, and each scrolls its cards inside a bounded height. Pass `status` while a
278
+ read is pending or failed so an unloaded column never looks empty. Each card's move button is its own Tab stop. The
279
+ application owns the records, who may move a card and the result of a move.
280
+
271
281
  `CommandActivity` from `/ai` presents a collapsed Bash command with supplied execution state. Its `CommandDetails` body
272
282
  is also available for an existing trace disclosure. Supply command and output text separately, with explicit omission
273
283
  notices when a preview is shortened. Commands use Bash highlighting; output stays plain unless the application supplies
@@ -275,10 +285,12 @@ a known `outputLanguage`. The embedded code and log variants share compact frame
275
285
  overall `ReplyIndicator` progress below command activity.
276
286
 
277
287
  `Message` reserves space for secondary actions and reveals them on hover and keyboard focus; touch devices keep them
278
- visible. `MessageAction` supplies a named icon button and tooltip. Keep errors, decisions, and current activity outside
279
- that action region. `MessageBoundary` groups expandable context between messages. `PromptInput` keeps its label
280
- accessible while integrating the submit control into the input frame. The application owns submission identity,
281
- acknowledgement, and draft retention.
288
+ visible. `MessageAction` supplies a named icon button and tooltip. `MessageReactions`, passed to the `reactions` slot,
289
+ shows reaction chips with counts that stay visible, and an add control that opens a menu of the emoji the application
290
+ supplies. Both report one `onReactionToggle` request and change nothing until the application supplies new reactions.
291
+ Keep errors, decisions, and current activity outside that action region. `MessageBoundary` groups expandable context
292
+ between messages. `PromptInput` keeps its label accessible while integrating the submit control into the input frame.
293
+ The application owns submission identity, acknowledgement, and draft retention.
282
294
 
283
295
  `AgentAvatar` derives a repeatable shape and palette from a supplied seed, or renders an explicit appearance.
284
296
  `AgentAvatarPicker` accepts that appearance and reports changes; applications own storage. Keep the same seed for a
@@ -293,14 +305,14 @@ Use a chart's `report` input for a self-contained analytical report with a compa
293
305
  summary choices, scoped actions and matching placeholders, with links to the maintained examples. Embedded charts use
294
306
  their ordinary frame within the containing region. The application owns periods, aggregates, coverage and read state.
295
307
 
296
- Keep full-width tables outside `PageContent` so their cell insets remain the only gutter. `PageSection` owns the inset
297
- for its optional `summary` and leaves its `breakdown` full width. Pass summary content directly; omit it when a section
298
- contains only rows. Absent, `null` and `false` summaries reserve no empty space. `ContentTabs` uses `defaultSelectedId`
299
- for an initial local choice. Give shareable views real links in the navigation slot on `PageLayout` or
300
- `RecordPage.Layout`. `SettingsSection` keeps wide tables inside their scroll region, and `SettingsRow` aligns labels and
301
- controls. Use `isPlaceholder` on a decorative row without a control ID; ready rows require a real `controlId` for their
302
- label. `FormActions` owns submission rows and their internal spacing. The enclosing section owns the gap before and
303
- after the actions.
308
+ Keep full-width tables outside `PageInset` so their cell insets remain the only gutter. `PageSection` owns the inset for
309
+ its optional `summary`. Pass the table as ordinary children. Its scroll viewport and the heading extend to both section
310
+ edges. Wrap a standalone form or prose in `ReadingColumn` to set a centered reading measure. Absent, `null` and `false`
311
+ summaries reserve no empty space. `ContentTabs` uses `defaultSelectedId` for an initial local choice. Give shareable
312
+ views real links in the navigation slot on `PageLayout` or `RecordPage.Layout`. `SettingsSection` keeps wide tables
313
+ inside their scroll region, and `SettingsRow` aligns labels and controls. Use `isPlaceholder` on a decorative row
314
+ without a control ID; ready rows require a real `controlId` for their label. `FormActions` owns submission rows and
315
+ their internal spacing. The enclosing section owns the gap before and after the actions.
304
316
 
305
317
  Elements 0.29 removes `ReportSection`. Move its metric summary into the explanatory chart's `report.summary` or
306
318
  `report.seriesValues`. Use ordinary `Stack` composition when content already belongs to an existing region.