@mechane-ai/elements 0.69.1 → 0.69.2

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/dist/catalog.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@mechane-ai/elements",
3
- "version": "0.69.1",
3
+ "version": "0.69.2",
4
4
  "recipes": [
5
5
  {
6
6
  "slug": "allocation-report",
@@ -90,15 +90,12 @@
90
90
  {
91
91
  "slug": "research-history",
92
92
  "title": "Research History",
93
- "description": "Show when research questions, findings, comparisons and decisions appeared. Select an event to open its source thread or evidence. Use a separate lineage graph for explicit artifact parents.",
93
+ "description": "Show one kind of research event, such as decisions, with lanes for its groups. Inspect events with the arrow keys and open their source pages with Enter or a press.",
94
94
  "path": "recipes/research-history.tsx",
95
95
  "story": "recipes-research-history--example",
96
96
  "imports": [
97
- "import { Text, TextLink } from '@mechane-ai/elements';",
98
97
  "import { EventStrip } from '@mechane-ai/elements/charts/timeline';",
99
98
  "import type { EventStripItem, EventStripLane } from '@mechane-ai/elements/charts/timeline';",
100
- "import { LineageGraph } from '@mechane-ai/elements/kits/research';",
101
- "import type { LineageNode } from '@mechane-ai/elements/kits/research';",
102
99
  "import { PageInset, PageLayout } from '@mechane-ai/elements/layout';"
103
100
  ]
104
101
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mechane-ai/elements",
3
- "version": "0.69.1",
3
+ "version": "0.69.2",
4
4
  "description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,50 +1,42 @@
1
- import { Text, TextLink } from '@mechane-ai/elements';
2
1
  import { EventStrip } from '@mechane-ai/elements/charts/timeline';
3
2
  import type { EventStripItem, EventStripLane } from '@mechane-ai/elements/charts/timeline';
4
- import { LineageGraph } from '@mechane-ai/elements/kits/research';
5
- import type { LineageNode } from '@mechane-ai/elements/kits/research';
6
3
  import { PageInset, PageLayout } from '@mechane-ai/elements/layout';
7
- import { useState } from 'react';
8
4
 
9
- type EvidenceEvent = EventStripItem & { readonly href: string; readonly linkLabel: string };
5
+ type ResearchEvent = EventStripItem & { readonly href: string };
10
6
 
11
7
  type ResearchHistoryProps = {
8
+ readonly title: string;
12
9
  readonly lanes: ReadonlyArray<EventStripLane>;
13
- readonly events: ReadonlyArray<EvidenceEvent>;
14
- readonly artifacts: ReadonlyArray<LineageNode>;
10
+ readonly events: ReadonlyArray<ResearchEvent>;
11
+ readonly openSource: (href: string) => void;
15
12
  };
16
13
 
17
14
  const clock = { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit', timeZone: 'UTC' } as const;
18
15
 
19
16
  /**
20
- * Show when research questions, findings, comparisons and decisions appeared. Select an event to open its source thread
21
- * or evidence. Use a separate lineage graph for explicit artifact parents.
17
+ * Show one kind of research event, such as decisions, with lanes for its groups. Inspect events with the arrow keys and
18
+ * open their source pages with Enter or a press.
22
19
  */
23
- export function ResearchHistory({ lanes, events, artifacts }: ResearchHistoryProps) {
24
- const [selectedId, select] = useState<string | null>(null);
25
- const selected = events.find((event) => event.id === selectedId);
20
+ export function ResearchHistory({ title, lanes, events, openSource }: ResearchHistoryProps) {
21
+ function activateEvent(id: string): void {
22
+ const event = events.find((candidate) => candidate.id === id);
23
+
24
+ if (event !== undefined) {
25
+ openSource(event.href);
26
+ }
27
+ }
26
28
 
27
29
  return (
28
- <PageLayout title="Research history">
30
+ <PageLayout title={title}>
29
31
  <PageInset>
30
32
  <EventStrip
31
- title="Research timeline"
33
+ title="Timeline"
32
34
  locale="en-US"
33
- description="Points show post times. Bars show recorded task intervals."
34
35
  lanes={lanes}
35
36
  events={events}
36
37
  timeFormat={clock}
37
- selected={selected?.id ?? null}
38
- onSelectedChange={select}
38
+ onSelectedChange={activateEvent}
39
39
  />
40
- {selected !== undefined && (
41
- <Text>
42
- <TextLink href={selected.href}>{selected.linkLabel}</TextLink>
43
- </Text>
44
- )}
45
- {artifacts.length > 0 && (
46
- <LineageGraph title="Artifact ancestry" locale="en-US" nodes={artifacts} defaultScope="all" />
47
- )}
48
40
  </PageInset>
49
41
  </PageLayout>
50
42
  );
@@ -2,6 +2,15 @@
2
2
 
3
3
  Newest first. Each section lists what an application must change, then what it may adopt.
4
4
 
5
+ ## 0.69.2
6
+
7
+ The `research-history` recipe shows one kind of event with a direct route to each source. Existing component APIs
8
+ require no changes.
9
+
10
+ ## 0.69.1
11
+
12
+ An `EventStrip` time window clips marks. Its readout and accessible table retain the recorded endpoints and duration.
13
+
5
14
  ## 0.67.0
6
15
 
7
16
  - Import `CollectionPage` and `CollectionSection` from `@mechane-ai/elements/collections`. Give the collection its read
@@ -78,10 +78,10 @@ persistence and every asynchronous operation.
78
78
  - **Workspace dashboard.** Look up `workspace-report` for linked charts, metrics and a drill-down table inside a
79
79
  persistent shell. Look up `workspace-files` for loading, empty and detail views, or `session-timeline` for agent
80
80
  activity. Each recipe's catalog entry names a runnable Storybook example.
81
- - **Research history.** Look up `research-history` for a full-width `EventStrip`, native links for evidence and a
82
- `LineageGraph` for recorded artifact parents. Use source IDs and timestamps. Show posts as points and give bars a
83
- duration only when the source supplies both endpoints. Keep existing rows visible during history reads and show when
84
- older results are still missing.
81
+ - **Research history.** Start with `research-history` for one kind of event on a full-width `EventStrip`. Use source IDs
82
+ and timestamps. Arrow keys inspect the chart. Enter or a press opens the source page through the app's router. Put
83
+ evidence details and artifact ancestry on their own pages. Give intervals a duration only when the source supplies
84
+ both endpoints. Keep loaded events visible while older history loads and say when coverage is incomplete.
85
85
  - **Searchable collection.** Start with the `searchable-collection` recipe. The collection owns its heading, query
86
86
  controls and read boundary. Supply all authorized rows for local search, or a controlled query for paged data. Link
87
87
  each record to its detail route and restore the query and position on Back.
@@ -5,6 +5,10 @@ route so people can copy the address, open another tab and return to their place
5
5
  own destination. Keep a chart and its breakdown together when both answer the same question. A persistent inspector is
6
6
  appropriate when the task requires simultaneous context, such as inspecting a trace while scrubbing it.
7
7
 
8
+ Give an overview one representation of its records. For a timeline, show one kind of event and open the source page when
9
+ the reader activates a mark. Keep the chart's keyboard readout and accessible data. Put record details and related
10
+ investigations on their own routes.
11
+
8
12
  ## Surfaces and copy
9
13
 
10
14
  Use the collection directly in its working pane. Its heading and row dividers span both edges. The heading and cells own