@overdoser/react-toolkit 0.11.0 → 0.12.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/AGENTS.md +2 -2
- package/CHANGELOG.md +53 -0
- package/components/Draggable/Draggable.d.ts +1 -1
- package/components/Draggable/Draggable.js +94 -84
- package/components/Timeline/GanttTimeline.d.ts +10 -0
- package/components/Timeline/GanttTimeline.js +193 -189
- package/components/Timeline/HistoryTimeline.d.ts +10 -0
- package/components/Timeline/HistoryTimeline.js +197 -193
- package/components/Timeline/Timeline.module.scss.js +114 -100
- package/components/Timeline/TimelineShared.d.ts +23 -2
- package/components/Timeline/TimelineShared.js +200 -127
- package/components/Timeline/TraceTimeline.d.ts +10 -0
- package/components/Timeline/TraceTimeline.js +646 -590
- package/components/Timeline/TraceTimeline.module.scss.js +118 -114
- package/components/Timeline/index.d.ts +1 -0
- package/components/Timeline/useTimeline.d.ts +11 -0
- package/components/Timeline/useTimeline.js +36 -32
- package/index.css +1 -1
- package/index.d.ts +1 -1
- package/index.layered.css +1 -1
- package/llms.txt +6 -3
- package/manifest.json +604 -165
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -446,7 +446,7 @@ Compound: `Draggable.Handle` — place inside to restrict the grab area (e.g. a
|
|
|
446
446
|
- `defaultPosition?: { x: number; y: number }` — uncontrolled initial offset. Default `{ x: 0, y: 0 }`.
|
|
447
447
|
- `position?: { x: number; y: number }` — controlled offset; pair with `onDrag` to update it.
|
|
448
448
|
- `axis?: 'both' | 'x' | 'y'` — default `'both'`.
|
|
449
|
-
- `bounds?: 'viewport' | 'parent' | 'none'` — default `'viewport'`. Clamps movement to the viewport / parent element, or unconstrained.
|
|
449
|
+
- `bounds?: 'viewport' | 'parent' | 'none'` — default `'viewport'`. Clamps movement to the viewport / parent element, or unconstrained. Clamping applies during drags and re-applies whenever the element or its bounds resize (content growth, window resize), so a dragged element can never end up stuck outside its bounds.
|
|
450
450
|
- `keyboardStep?: number` — px per arrow-key press on a focused handle. Default `10`.
|
|
451
451
|
- `disabled?: boolean` — default `false`.
|
|
452
452
|
- `onDragStart?(pos)`, `onDrag?(pos)`, `onDragEnd?(pos)` — each receives `{ x, y }`.
|
|
@@ -1286,14 +1286,14 @@ Three event-timeline views sharing one interaction model: wheel-zoom anchored at
|
|
|
1286
1286
|
|
|
1287
1287
|
Theming: `--crk-timeline-1..6` category palette (cycled over services/tags/rows), plus `--crk-timeline-*` chrome tokens (ink, muted, hairline, grid, accent, highlight amber…) defaulting to the design's warm paper palette; `--crk-timeline-font-mono` / `--crk-timeline-font-display` for the data/display fonts.
|
|
1288
1288
|
|
|
1289
|
-
**Summary panel (all three):** `showSummary` (default `false`; `true` on TraceTimeline) adds a dense one-line-per-item panel beside the timeline — every item numbered chronologically from `01`, a contiguous highlight band over the items currently visible in the viewport (auto-follows drag-panning by keeping the band centered in the list; suppressed while the pointer is over the panel so it can scroll independently), and click-to-navigate: the timeline smooth-scrolls (~900ms ease-out deceleration, cancelled by user wheel/grab, instant under `prefers-reduced-motion`) to center the picked item. `summaryPlacement` docks it `'left'` (default; `'bubble'` on TraceTimeline) / `'right'` of the timeline, renders it full-width `'top'` / `'bottom'` (rows flow into responsive columns), `'floating'` — a draggable palette anchored over the timeline, grabbed by its header (viewport-bounded, arrow-key movable when the handle is focused); `summaryDefaultPosition?: { x, y }` sets the floating start offset — or `'bubble'`: a collapsed pill anchored bottom-left of the timeline (heading + count + service-colored glyph) that expands in place into a draggable 262px panel with a "Tinted rows are in the viewport" footer; collapsing always snaps it back to its home corner (the dragged position is deliberately not persisted).
|
|
1289
|
+
**Summary panel (all three):** `showSummary` (default `false`; `true` on TraceTimeline) adds a dense one-line-per-item panel beside the timeline — every item numbered chronologically from `01`, a contiguous highlight band over the items currently visible in the viewport (auto-follows drag-panning by keeping the band centered in the list; suppressed while the pointer is over the panel so it can scroll independently), and click-to-navigate: the timeline smooth-scrolls (~900ms ease-out deceleration, cancelled by user wheel/grab, instant under `prefers-reduced-motion`) to center the picked item. `summaryPlacement` docks it `'left'` (default; `'bubble'` on TraceTimeline) / `'right'` of the timeline, renders it full-width `'top'` / `'bottom'` (rows flow into responsive columns), `'floating'` — a draggable palette anchored over the timeline, grabbed by its header (viewport-bounded, arrow-key movable when the handle is focused); `summaryDefaultPosition?: { x, y }` sets the floating start offset — or `'bubble'`: a collapsed pill anchored bottom-left of the timeline (heading + count + service-colored glyph) that expands in place into a draggable 262px panel with a "Tinted rows are in the viewport" footer; collapsing always snaps it back to its home corner (the dragged position is deliberately not persisted). The expanded panel's header has a dock toggle: docked, the panel becomes a full-height column flush left of the timeline card and the card shrinks to make room (nothing is overlaid, so sticky labels stay visible; no longer draggable). The visible divider strip between panel and card is a drag handle — drag (or arrow-key when focused) to resize summary vs timeline. Undocking floats the panel again, and dockedness — unlike the drag offset — survives collapse/re-expand.
|
|
1290
1290
|
|
|
1291
1291
|
**Customization layers (all three):** (1) `--crk-timeline-*` tokens for colors/fonts; (2) `classes` for per-element class overrides; (3) **render-prop slots to inject custom components** — `renderChip`/`renderCard`/`renderBar`+`renderRowLabel` replace an item's inner content (positioning/geometry stays component-owned), `renderTooltip(item, ctx)` replaces tooltip content (return `null` to suppress it for that item), `renderDetails(item, { close, … })` replaces the side-panel content (the sticky panel shell is kept; call `close()` from your own ✕). Each slot receives a context object (`*ItemContext`: resolved `color`, live flag, `durationMs`, index/number where relevant).
|
|
1292
1292
|
|
|
1293
1293
|
#### TraceTimeline
|
|
1294
1294
|
One correlated request/response flow (a "manifest", an order, a saga) as duration bars on a single proportional time band (UTC display). Overlapping bars pack into vertical sub-rows; each event gets a collision-free description chip (`Origin → Target` tinted badges, bold operation id, start ISO) placed by a 3-pass nudging algorithm (never overlaps another chip; slides with an elbow line or accepts a stem crossing rather than hiding). Sticky two-rail UTC axis: cursor timestamp chip, teal `▸ start` chip for the hovered event, tick clock labels, `YYYY-MM-DD` labels only on day changes, and a sticky current-date label. Events whose interval contains the cursor time get a "hot" ring.
|
|
1295
1295
|
|
|
1296
|
-
**Dock rail + drawers (default on):** a sticky 44px icon rail on the far right toggles one docked drawer at a time — *Event details* (the request/response panel, now with its own uppercase header, an empty state until an event is picked, and Copy buttons beside the Request/Response payloads) or *Full log* (420px: every event vertically — number, method/status chips, `source → service`, clock, op, path, then REQUEST/RESPONSE payloads stacked full-width, each with a Copy button that doesn't select the row). Nothing is docked initially; clicking an event opens the details drawer. Timeline↔log stay in sync both ways: clicking a timeline event (or summary row) scrolls an open log to that entry and flashes it; clicking a log entry selects the event and centers the timeline on it (centering waits for the drawer-induced resize to settle). `showDock={false}` removes the rail and full log — the details panel then simply opens/closes with the selection as before. The events-summary bubble (see the summary panel section) is also on by default.
|
|
1296
|
+
**Dock rail + drawers (default on):** a sticky 44px icon rail on the far right toggles one docked drawer at a time — *Event details* (the request/response panel, now with its own uppercase header, an empty state until an event is picked, and Copy buttons beside the Request/Response payloads) or *Full log* (420px default: every event vertically — number, method/status chips, `source → service`, clock, op, path, then REQUEST/RESPONSE payloads stacked full-width, each with a Copy button that doesn't select the row). Drawers dock into the card row itself, flush against the timeline (full card height, square touching corners — no gap, so the canvas keeps every other pixel); the divider strip between card and drawer is a drag handle to resize drawer vs timeline (arrow keys work when it's focused). Nothing is docked initially; clicking an event opens the details drawer. Timeline↔log stay in sync both ways: clicking a timeline event (or summary row) scrolls an open log to that entry and flashes it; clicking a log entry selects the event and centers the timeline on it (centering waits for the drawer-induced resize to settle). `showDock={false}` removes the rail and full log — the details panel then simply opens/closes with the selection as before. The events-summary bubble (see the summary panel section) is also on by default.
|
|
1297
1297
|
|
|
1298
1298
|
`TraceTimelineEvent`: `{ id: string; service: string; source?; op?; requestId?; method?; url?; label?; query?: Record<string,string>; reqHeaders?; reqBody?; status?: number; resHeaders?; resBody?; start: number; end?: number | null }` — only `id`, `service`, `start` required; extra fields allowed (searched by `highlight`). `end` unset = in flight (dashed bar, pulsing dot, "now" line, "Awaiting response…" panel).
|
|
1299
1299
|
|
|
@@ -1307,6 +1307,7 @@ Props:
|
|
|
1307
1307
|
- `compactRows?: boolean` — default `false`.
|
|
1308
1308
|
- `showGridlines?: boolean` — default `true`.
|
|
1309
1309
|
- `showControls?: boolean` — default `true` (zoom −/%/+/Fit).
|
|
1310
|
+
- `wheelZoom?: 'ctrl' | 'free' | 'none'` — default `'ctrl'`: zooms only while Ctrl/Cmd is held (plain scrolling passes through to the page; trackpad pinch still zooms — browsers report it as a ctrlKey wheel). `'free'` zooms on any scroll; `'none'` disables wheel zoom entirely (toolbar buttons still work).
|
|
1310
1311
|
- `showLegend?: boolean` — default `true`.
|
|
1311
1312
|
- `showSummary?: boolean` — default `true`. Summary panel (see above); picking a row also selects the event.
|
|
1312
1313
|
- `summaryPlacement?: 'bubble' | 'left' | 'right' | 'top' | 'bottom' | 'floating'` — default `'bubble'`; `summaryDefaultPosition?: { x, y }` for floating.
|
|
@@ -1344,6 +1345,7 @@ Props:
|
|
|
1344
1345
|
- `showSearch?: boolean` — default `true`; `renderSearch?: ({ value, setValue }) => ReactNode` replaces the built-in box.
|
|
1345
1346
|
- `tagColors?: Record<string, string>` — overrides; known tags map to the palette, unknown tags cycle it.
|
|
1346
1347
|
- `showControls?: boolean` — default `true` (orientation + spacing toggles + zoom).
|
|
1348
|
+
- `wheelZoom?: 'ctrl' | 'free' | 'none'` — default `'ctrl'`: zooms only while Ctrl/Cmd is held (plain scrolling passes through to the page; trackpad pinch still zooms — browsers report it as a ctrlKey wheel). `'free'` zooms on any scroll; `'none'` disables wheel zoom entirely (toolbar buttons still work).
|
|
1347
1349
|
- `showLegend?: boolean` — default `true` (tag bullets).
|
|
1348
1350
|
- `showSummary?: boolean` — default `false`. Summary panel (see above); numbering matches the card numbers.
|
|
1349
1351
|
- `summaryPlacement?: 'left' | 'right' | 'top' | 'bottom' | 'floating' | 'bubble'` — default `'left'`; `summaryDefaultPosition?: { x, y }` for floating.
|
|
@@ -1376,6 +1378,7 @@ Props:
|
|
|
1376
1378
|
- `compactRows?: boolean` — default `false` (42px rows instead of 54px).
|
|
1377
1379
|
- `showGridlines?: boolean` — default `true`.
|
|
1378
1380
|
- `showControls?: boolean` — default `true`.
|
|
1381
|
+
- `wheelZoom?: 'ctrl' | 'free' | 'none'` — default `'ctrl'`: zooms only while Ctrl/Cmd is held (plain scrolling passes through to the page; trackpad pinch still zooms — browsers report it as a ctrlKey wheel). `'free'` zooms on any scroll; `'none'` disables wheel zoom entirely (toolbar buttons still work).
|
|
1379
1382
|
- `showSummary?: boolean` — default `false`. Summary panel (see above; heading "Tasks").
|
|
1380
1383
|
- `summaryPlacement?: 'left' | 'right' | 'top' | 'bottom' | 'floating' | 'bubble'` — default `'left'`; `summaryDefaultPosition?: { x, y }` for floating.
|
|
1381
1384
|
- `maxHeight?: number | string` — default `'74vh'`.
|