@vllnt/ui 0.3.0-canary.00b20d6 → 0.3.0-canary.29c44b3
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/CHANGELOG.md +16 -5
- package/README.md +1 -1
- package/dist/components/accordion/accordion.js +2 -8
- package/dist/components/activity-heatmap/activity-heatmap.js +21 -23
- package/dist/components/activity-log/activity-log.js +52 -53
- package/dist/components/agent-activity/agent-activity.js +139 -125
- package/dist/components/ai-artifact/ai-artifact.js +115 -76
- package/dist/components/ai-chat-input/ai-chat-input.js +59 -61
- package/dist/components/ai-message-bubble/ai-message-bubble.js +63 -65
- package/dist/components/ai-sidebar/ai-sidebar.js +76 -45
- package/dist/components/ai-source-citation/ai-source-citation.js +38 -32
- package/dist/components/ai-streaming-text/ai-streaming-text.js +33 -35
- package/dist/components/ai-tool-call-display/ai-tool-call-display.js +58 -60
- package/dist/components/alert/alert.js +20 -7
- package/dist/components/alert-dialog/alert-dialog.js +36 -13
- package/dist/components/alert-pulse/alert-pulse.js +69 -69
- package/dist/components/anchor-port/anchor-port.js +26 -28
- package/dist/components/animated-beam/animated-beam.js +50 -51
- package/dist/components/animated-grid-pattern/animated-grid-pattern.js +9 -2
- package/dist/components/animated-list/animated-list.js +21 -25
- package/dist/components/animated-tabs/animated-tabs.js +60 -57
- package/dist/components/animated-testimonials/animated-testimonials.js +8 -2
- package/dist/components/animated-text/animated-text.js +66 -67
- package/dist/components/animated-tooltip/animated-tooltip.js +9 -2
- package/dist/components/auto-reload/auto-reload.js +109 -105
- package/dist/components/avatar/avatar.js +18 -7
- package/dist/components/avatar-group/avatar-group.js +35 -30
- package/dist/components/banner/banner.js +80 -77
- package/dist/components/bento-grid/bento-grid.js +38 -33
- package/dist/components/blur-reveal/blur-reveal.js +34 -29
- package/dist/components/border-beam/border-beam.js +43 -45
- package/dist/components/bottom-activity-strip/bottom-activity-strip.js +5 -5
- package/dist/components/bottom-bar/bottom-bar.js +22 -18
- package/dist/components/button/button.js +18 -14
- package/dist/components/button-group/button-group.js +14 -12
- package/dist/components/candlestick-chart/candlestick-chart.js +52 -54
- package/dist/components/canvas-shell/canvas-shell.js +5 -3
- package/dist/components/canvas-view/canvas-view.js +72 -74
- package/dist/components/card/card.js +35 -12
- package/dist/components/card-flip/card-flip.js +36 -47
- package/dist/components/carousel/carousel.js +78 -60
- package/dist/components/chain-of-thought/chain-of-thought.js +13 -12
- package/dist/components/chart/area-chart.js +66 -67
- package/dist/components/chart/bar-chart.js +68 -70
- package/dist/components/chart/line-chart.js +69 -70
- package/dist/components/chat-dock-section/chat-dock-section.js +43 -45
- package/dist/components/checkbox/checkbox.js +6 -3
- package/dist/components/checkbox-group/checkbox-group.js +44 -38
- package/dist/components/choropleth-map/choropleth-map.js +90 -82
- package/dist/components/chronological-timeline/chronological-timeline.js +75 -72
- package/dist/components/civilization-card/civilization-card.js +59 -56
- package/dist/components/color-picker/color-picker.js +71 -72
- package/dist/components/combobox/combobox.js +57 -58
- package/dist/components/command/command.js +42 -15
- package/dist/components/comment-pin/comment-pin.js +58 -60
- package/dist/components/connector-edge/connector-edge.js +59 -54
- package/dist/components/context-lens/context-lens.js +74 -73
- package/dist/components/context-menu/context-menu.js +55 -17
- package/dist/components/contribution-graph/contribution-graph.js +56 -58
- package/dist/components/conversation-thread/conversation-thread.js +89 -65
- package/dist/components/cookie-consent/cookie-consent.js +114 -115
- package/dist/components/copy-button/copy-button.js +100 -103
- package/dist/components/countdown-timer/countdown-timer.js +45 -49
- package/dist/components/credit-badge/credit-badge.js +26 -22
- package/dist/components/curriculum/curriculum.js +2 -2
- package/dist/components/cursor/cursor.js +28 -24
- package/dist/components/data-list/data-list.js +54 -40
- package/dist/components/date-field/date-field.js +33 -28
- package/dist/components/date-picker/date-picker.js +49 -50
- package/dist/components/date-range-picker/date-range-picker.js +46 -47
- package/dist/components/dialog/dialog.js +25 -9
- package/dist/components/dock/dock.js +59 -52
- package/dist/components/document-sibling-nav/document-sibling-nav.js +10 -5
- package/dist/components/dot-pattern/dot-pattern.js +29 -24
- package/dist/components/drawer/drawer.js +25 -9
- package/dist/components/dropdown-menu/dropdown-menu.js +56 -17
- package/dist/components/edge-label/edge-label.js +17 -15
- package/dist/components/empty-state/empty-state.js +27 -31
- package/dist/components/era-comparison/era-comparison.js +96 -83
- package/dist/components/expandable-cards/expandable-cards.js +7 -2
- package/dist/components/field/field.js +78 -62
- package/dist/components/fieldset/fieldset.js +36 -34
- package/dist/components/file-upload/file-upload.js +4 -3
- package/dist/components/floating-navbar/floating-navbar.js +7 -2
- package/dist/components/floating-toolbar/floating-toolbar.js +49 -51
- package/dist/components/follow-mode/follow-mode.js +67 -69
- package/dist/components/form/form.js +131 -112
- package/dist/components/gantt-chart/gantt-chart.js +49 -51
- package/dist/components/gauge-chart/gauge-chart.js +73 -75
- package/dist/components/geography-quiz-map/geography-quiz-map.js +88 -78
- package/dist/components/glass-card/glass-card.js +19 -17
- package/dist/components/glass-panel/glass-panel.js +16 -14
- package/dist/components/glass-progress/glass-progress.js +7 -3
- package/dist/components/globe-3d/globe-3d.js +70 -66
- package/dist/components/grid/grid.js +24 -18
- package/dist/components/group-hull/group-hull.js +27 -22
- package/dist/components/handoff-beacon/handoff-beacon.js +55 -57
- package/dist/components/heat-map-overlay/heat-map-overlay.js +55 -55
- package/dist/components/heat-overlay/heat-overlay.js +49 -48
- package/dist/components/historic-timeline/historic-timeline.js +57 -59
- package/dist/components/historical-figure-card/historical-figure-card.js +5 -3
- package/dist/components/hover-card/hover-card.js +8 -3
- package/dist/components/infinite-plane/infinite-plane.js +34 -36
- package/dist/components/input/input.js +19 -17
- package/dist/components/input-group/input-group.js +32 -24
- package/dist/components/input-otp/input-otp.js +25 -8
- package/dist/components/interactive-timeline/interactive-timeline.js +38 -15
- package/dist/components/item/item.js +71 -56
- package/dist/components/jarvis-dock/jarvis-dock.js +40 -42
- package/dist/components/kbd/kbd.js +31 -42
- package/dist/components/knowledge-check/knowledge-check.js +50 -58
- package/dist/components/label/label.js +6 -3
- package/dist/components/left-rail/left-rail.js +22 -18
- package/dist/components/link/link.js +28 -30
- package/dist/components/liquid-glass/liquid-glass.js +32 -30
- package/dist/components/list-box/list-box.js +86 -83
- package/dist/components/live-cursor/live-cursor.js +49 -51
- package/dist/components/live-feed/live-feed.js +49 -50
- package/dist/components/magnetic/magnetic.js +37 -32
- package/dist/components/magnetic-button/magnetic-button.js +9 -2
- package/dist/components/map-2d/map-2d.js +120 -101
- package/dist/components/map-timeline/map-timeline.js +188 -170
- package/dist/components/market-treemap/market-treemap.js +8 -3
- package/dist/components/marquee/marquee.js +64 -65
- package/dist/components/menubar/menubar.js +82 -35
- package/dist/components/meteors/meteors.js +36 -33
- package/dist/components/meter/meter.js +53 -55
- package/dist/components/metric-cluster/metric-cluster.js +47 -49
- package/dist/components/metric-gauge/metric-gauge.js +42 -44
- package/dist/components/mini-map-panel/mini-map-panel.js +71 -66
- package/dist/components/model-comparison/model-comparison.js +76 -67
- package/dist/components/multi-select/multi-select.js +100 -102
- package/dist/components/multi-select-lasso/multi-select-lasso.js +5 -5
- package/dist/components/native-select/native-select.js +21 -18
- package/dist/components/navbar-saas/navbar-saas.js +54 -46
- package/dist/components/navigation-menu/navigation-menu.js +38 -13
- package/dist/components/newsletter-signup/newsletter-signup.js +5 -3
- package/dist/components/number-input/number-input.js +4 -3
- package/dist/components/number-ticker/number-ticker.js +50 -51
- package/dist/components/object-card/object-card.js +40 -42
- package/dist/components/object-handle/object-handle.js +33 -30
- package/dist/components/object-inspector/object-inspector.js +40 -42
- package/dist/components/order-book/order-book.js +59 -54
- package/dist/components/overview-board/overview-board.js +91 -87
- package/dist/components/panel/panel.js +69 -55
- package/dist/components/parallel-timeline/parallel-timeline.js +54 -56
- package/dist/components/particles/particles.js +35 -32
- package/dist/components/password-input/password-input.js +35 -36
- package/dist/components/phone-input/phone-input.js +44 -45
- package/dist/components/pie-chart/pie-chart.js +53 -55
- package/dist/components/plan-badge/plan-badge.js +28 -24
- package/dist/components/playback-ghost/playback-ghost.js +46 -48
- package/dist/components/policy-delivery-panel/policy-delivery-panel.js +5 -5
- package/dist/components/popover/popover.js +8 -3
- package/dist/components/presence-stack/presence-stack.js +39 -41
- package/dist/components/presence-sync-indicator/presence-sync-indicator.js +5 -5
- package/dist/components/pricing-table/pricing-table.js +71 -70
- package/dist/components/primary-source-viewer/primary-source-viewer.js +90 -41
- package/dist/components/progress-tracker/progress-tracker.js +1 -1
- package/dist/components/progressive-blur/progressive-blur.js +37 -33
- package/dist/components/prompt-input/prompt-input.js +68 -69
- package/dist/components/prompt-templates/prompt-templates.js +36 -36
- package/dist/components/property-section/property-section.js +28 -30
- package/dist/components/qr-code/qr-code.js +31 -33
- package/dist/components/radar-chart/radar-chart.js +59 -60
- package/dist/components/radio-group/radio-group.js +12 -5
- package/dist/components/reasoning/reasoning.js +54 -48
- package/dist/components/relationship-inspector/relationship-inspector.js +5 -5
- package/dist/components/reveal-text/reveal-text.js +39 -34
- package/dist/components/right-dock/right-dock.js +26 -21
- package/dist/components/role-badge/role-badge.js +22 -19
- package/dist/components/route-map/route-map.js +5 -3
- package/dist/components/routing-assignment-panel/routing-assignment-panel.js +5 -5
- package/dist/components/run-timeline/run-timeline.js +57 -59
- package/dist/components/runtime-overview-panel/runtime-overview-panel.js +5 -5
- package/dist/components/sankey-chart/sankey-chart.js +54 -56
- package/dist/components/scope-selector/scope-selector.js +39 -40
- package/dist/components/scramble-text/scramble-text.js +38 -39
- package/dist/components/scroll-area/scroll-area.js +14 -5
- package/dist/components/scroll-progress/scroll-progress.js +7 -2
- package/dist/components/search-bar/search-bar.js +5 -2
- package/dist/components/search-field/search-field.js +46 -47
- package/dist/components/segmented-control/segmented-control.js +14 -5
- package/dist/components/select/select.js +46 -15
- package/dist/components/selection-halo/selection-halo.js +53 -62
- package/dist/components/selection-presence/selection-presence.js +5 -5
- package/dist/components/separator/separator.js +19 -16
- package/dist/components/sheet/sheet.js +26 -9
- package/dist/components/shimmer-button/shimmer-button.js +8 -3
- package/dist/components/shimmer-text/shimmer-text.js +34 -30
- package/dist/components/shine-border/shine-border.js +32 -28
- package/dist/components/shiny-button/shiny-button.js +7 -3
- package/dist/components/sidebar-provider/sidebar-provider.js +2 -7
- package/dist/components/slider/slider.js +6 -3
- package/dist/components/slideshow/slideshow.js +26 -23
- package/dist/components/snap-guides/snap-guides.js +35 -35
- package/dist/components/sparkles/sparkles.js +34 -30
- package/dist/components/sparkline-grid/sparkline-grid.js +4 -4
- package/dist/components/spinner/unicode-spinner.js +57 -56
- package/dist/components/spinning-text/spinning-text.js +39 -41
- package/dist/components/spotlight-card/spotlight-card.js +7 -2
- package/dist/components/stat-card/stat-card.js +37 -39
- package/dist/components/state-badge-overlay/state-badge-overlay.js +5 -5
- package/dist/components/status-board/status-board.js +20 -22
- package/dist/components/status-indicator/status-indicator.js +38 -40
- package/dist/components/sticky-metric/sticky-metric.js +58 -60
- package/dist/components/story-map/story-map.js +66 -60
- package/dist/components/subscription-card/subscription-card.js +68 -70
- package/dist/components/switch/switch.js +6 -3
- package/dist/components/table/table.js +47 -16
- package/dist/components/tabs/tabs.js +2 -2
- package/dist/components/tag-group/tag-group.js +81 -78
- package/dist/components/tags-input/tags-input.js +59 -60
- package/dist/components/text-animate/text-animate.js +40 -41
- package/dist/components/text-field/text-field.js +49 -50
- package/dist/components/text-reveal/text-reveal.js +36 -33
- package/dist/components/text-shimmer/text-shimmer.js +27 -23
- package/dist/components/textarea/textarea.js +17 -16
- package/dist/components/thinking-block/thinking-block.js +1 -1
- package/dist/components/thread-bubble/thread-bubble.js +51 -53
- package/dist/components/threshold-ring/threshold-ring.js +76 -78
- package/dist/components/ticker-tape/ticker-tape.js +46 -42
- package/dist/components/tilt-card/tilt-card.js +40 -35
- package/dist/components/time-field/time-field.js +33 -28
- package/dist/components/time-picker/time-picker.js +59 -60
- package/dist/components/timeline/timeline.js +70 -66
- package/dist/components/timeline-scrubber/timeline-scrubber.js +5 -3
- package/dist/components/tldr-section/tldr-section.js +9 -6
- package/dist/components/toast/toast.js +32 -11
- package/dist/components/toggle/toggle.js +8 -3
- package/dist/components/toggle-group/toggle-group.js +20 -6
- package/dist/components/toolbar/toolbar.js +60 -56
- package/dist/components/tooltip/tooltip.js +7 -3
- package/dist/components/top-bar/top-bar.js +30 -24
- package/dist/components/transaction-list/transaction-list.js +53 -47
- package/dist/components/tree-view/tree-view.js +72 -76
- package/dist/components/typewriter/typewriter.js +43 -38
- package/dist/components/typography/typography.js +118 -95
- package/dist/components/usage-breakdown/usage-breakdown.js +37 -38
- package/dist/components/viewport-bookmarks/viewport-bookmarks.js +5 -5
- package/dist/components/wallet-card/wallet-card.js +56 -58
- package/dist/components/watchlist/watchlist.js +46 -48
- package/dist/components/workspace-switcher/workspace-switcher.js +58 -52
- package/dist/components/world-breadcrumbs/world-breadcrumbs.js +43 -45
- package/dist/components/world-clock-bar/world-clock-bar.js +33 -35
- package/dist/components/zoom-hud/zoom-hud.js +56 -51
- package/dist/index.d.ts +2911 -2649
- package/package.json +4 -4
- package/styles.css +27 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
_Nothing yet._
|
|
10
|
+
|
|
11
|
+
## [0.3.0] - 2026-06-26
|
|
10
12
|
|
|
11
13
|
### Added
|
|
12
14
|
|
|
@@ -28,7 +30,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
28
30
|
- **Inspector + dock panels** — `PropertySection`, `ObjectInspector`, `RelationshipInspector`, `RuntimeOverviewPanel`, `RoutingAssignmentPanel`, `PolicyDeliveryPanel`.
|
|
29
31
|
- **Runtime overlays** — `AlertPulse`, `ThresholdRing`, `StickyMetric`, `HeatOverlay`, `StateBadgeOverlay`, `MetricCluster`, `JarvisDock`, `ContextLens`.
|
|
30
32
|
- **Time navigation** — `TimelineScrubber`, `PlaybackGhost`, `BottomActivityStrip`, `RunTimeline`.
|
|
31
|
-
-
|
|
33
|
+
- **Form primitives (18)** — `ButtonGroup`, `InputGroup`, `Field`, `Fieldset`, `Item`, `ColorPicker`, `CheckboxGroup`, `NativeSelect`, `ListBox`, `SearchField`, `TextField`, `PhoneInput`, `TimePicker`, `TimeField`, `DateField`, `DateRangePicker`, `RangeCalendar`, `TagGroup`.
|
|
34
|
+
- **Charts / dataviz (5)** — `PieChart`, `RadarChart`, `GaugeChart`, `SankeyChart`, `ContributionGraph` (joining the existing `BarChart` / `LineChart` / `AreaChart`).
|
|
35
|
+
- **AI primitives (3)** — `Reasoning`, `ChainOfThought`, `PromptInput`.
|
|
36
|
+
- **Core primitives (7)** — `Typography`, `Link`, `Toolbar`, `Meter`, `QrCode`, `Grid`, `Panel`.
|
|
37
|
+
- **Motion / effects (37)** — `BentoGrid`, `Sparkles`, `Typewriter`, `AnimatedList`, `Dock`, `MagneticButton`, `TextShimmer`, `AnimatedBeam`, `AnimatedTabs`, `ScrollProgress`, `ShimmerButton`, `ShimmerText`, `AnimatedGridPattern`, `AnimatedTestimonials`, `AnimatedTooltip`, `BlurReveal`, `CardFlip`, `Cursor`, `DotPattern`, `ExpandableCards`, `FloatingNavbar`, `GlassCard`, `GlassProgress`, `LiquidGlass`, `Magnetic`, `Meteors`, `Particles`, `ProgressiveBlur`, `RevealText`, `ScrambleText`, `ShineBorder`, `ShinyButton`, `SpinningText`, `SpotlightCard`, `TextAnimate`, `TextReveal`, `TiltCard`.
|
|
38
|
+
- Total component count: **309** (up from 140).
|
|
32
39
|
|
|
33
40
|
- **OKLCH theming system** — color tokens migrated to the OKLCH color space, with 13 runtime theme presets (`default`, `matrix`, `dracula`, `synthwave`, `tron`, `cyberpunk`, `nord`, `claude`, `chatgpt`, `gemini`, `dusk`, `cyberlime`, `aura`). New public theme exports from `@vllnt/ui`: `THEME_PRESETS`, `DEFAULT_THEME_PRESET`, `CUSTOM_THEME_NAME`, `isThemePresetName`, the `ThemePreset` and `ThemePresetName` types, plus the `useThemePreset` hook (with `UseThemePresetResult`), `setThemePreset`, and `setCustomTheme` for runtime preset switching and user-supplied custom themes.
|
|
34
41
|
|
|
@@ -36,12 +43,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
36
43
|
|
|
37
44
|
### Changed
|
|
38
45
|
|
|
46
|
+
- **BREAKING — React 19 required.** The peer dependency moved to `react` / `react-dom` `>=19`; **React 18 is no longer supported**. Components migrated from `React.forwardRef` to the React 19 ref-as-prop pattern, and `useContext` → `use()`. React-18 consumers must upgrade to React 19.
|
|
47
|
+
- **Internal quality sweep** — cleared the react-doctor backlog: `no-react19-deprecated-apis` 456 → 0, plus state/effect warnings (`useEffectEvent` for effect-captured handlers, derived-state, cascading `setState`) and structural warnings (giant-component splits, render-in-render, polymorphic children, passive listeners).
|
|
48
|
+
- **Shared internals** — extracted reusable hooks/utilities (reference-counted body-scroll-lock that fixes a multi-overlay unlock bug, escape-key, live-date, cached `Intl` formatters, clipboard migration) and a Zod parse seam for the registry shape.
|
|
39
49
|
- Registry installs use a **hybrid CLI strategy** — leaf component source is inlined, sibling registry items resolve via `@vllnt/ui` to keep installs minimal and dedupe shared primitives.
|
|
40
50
|
|
|
41
|
-
###
|
|
51
|
+
### Fixed
|
|
42
52
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
53
|
+
- **Docs sidebar dropped components** — the registry category union omitted four categories (`ai`, `billing`, `data-display`, `educational`), silently hiding ~32 components from the docs sidebar; all now render, with a structural fallback so a missing category can no longer regress.
|
|
54
|
+
- **Theme-adaptive chart colors** — `CandlestickChart` and `SparklineGrid` series colors now follow the active theme and dark mode instead of hardcoded values.
|
|
45
55
|
|
|
46
56
|
## [0.2.1] - 2026-04-21
|
|
47
57
|
|
|
@@ -145,6 +155,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
145
155
|
|
|
146
156
|
- Initial public publish to the public npm registry.
|
|
147
157
|
|
|
158
|
+
[0.3.0]: https://github.com/vllnt/ui/releases/tag/v0.3.0
|
|
148
159
|
[0.2.1]: https://github.com/vllnt/ui/releases/tag/v0.2.1
|
|
149
160
|
[0.2.0]: https://github.com/vllnt/ui/releases/tag/v0.2.0
|
|
150
161
|
[0.1.11]: https://github.com/vllnt/ui/releases/tag/v0.1.11
|
package/README.md
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
createContext,
|
|
5
|
-
useCallback,
|
|
6
|
-
useContext,
|
|
7
|
-
useMemo,
|
|
8
|
-
useState
|
|
9
|
-
} from "react";
|
|
3
|
+
import { createContext, use, useCallback, useMemo, useState } from "react";
|
|
10
4
|
import { cn } from "../../lib/utils";
|
|
11
5
|
const AccordionContext = createContext(null);
|
|
12
6
|
function useAccordionContext() {
|
|
13
|
-
const context =
|
|
7
|
+
const context = use(AccordionContext);
|
|
14
8
|
if (!context) {
|
|
15
9
|
throw new Error("AccordionItem must be used within an Accordion");
|
|
16
10
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
2
|
import { normalizeDate } from "../../lib/format";
|
|
4
3
|
import { cn } from "../../lib/utils";
|
|
5
4
|
const WEEKDAY_LABELS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
@@ -138,28 +137,27 @@ function HeatmapGrid({
|
|
|
138
137
|
] })
|
|
139
138
|
] });
|
|
140
139
|
}
|
|
141
|
-
const ActivityHeatmap =
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
);
|
|
140
|
+
const ActivityHeatmap = ({
|
|
141
|
+
as: Heading = "h2",
|
|
142
|
+
className,
|
|
143
|
+
data,
|
|
144
|
+
description,
|
|
145
|
+
endDate = /* @__PURE__ */ new Date(),
|
|
146
|
+
ref,
|
|
147
|
+
title = "Activity heatmap",
|
|
148
|
+
weeks = 12,
|
|
149
|
+
...props
|
|
150
|
+
}) => {
|
|
151
|
+
const normalizedEndDate = normalizeDate(endDate);
|
|
152
|
+
const gridData = getGridData(data, normalizedEndDate, weeks);
|
|
153
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), ref, ...props, children: [
|
|
154
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
155
|
+
/* @__PURE__ */ jsx(Heading, { className: "text-lg font-semibold tracking-tight", children: title }),
|
|
156
|
+
description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null
|
|
157
|
+
] }),
|
|
158
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto rounded-lg border bg-card p-4 shadow-sm", children: /* @__PURE__ */ jsx(HeatmapGrid, { gridData, weeks }) })
|
|
159
|
+
] });
|
|
160
|
+
};
|
|
163
161
|
ActivityHeatmap.displayName = "ActivityHeatmap";
|
|
164
162
|
export {
|
|
165
163
|
ActivityHeatmap
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
4
|
import { ArrowRight, ChevronLeft, ChevronRight } from "lucide-react";
|
|
5
5
|
import { cn } from "../../lib/utils";
|
|
6
6
|
import { Avatar, AvatarFallback } from "../avatar/avatar";
|
|
@@ -197,60 +197,59 @@ function ActivityLogBody({
|
|
|
197
197
|
] })
|
|
198
198
|
] });
|
|
199
199
|
}
|
|
200
|
-
const ActivityLog =
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
onPageChange?.(nextPage);
|
|
200
|
+
const ActivityLog = ({
|
|
201
|
+
className,
|
|
202
|
+
defaultPage = 1,
|
|
203
|
+
description,
|
|
204
|
+
emptyMessage = "No activity recorded yet.",
|
|
205
|
+
items,
|
|
206
|
+
onPageChange,
|
|
207
|
+
page,
|
|
208
|
+
pageSize = 5,
|
|
209
|
+
ref,
|
|
210
|
+
title = "Activity log",
|
|
211
|
+
...props
|
|
212
|
+
}) => {
|
|
213
|
+
const totalPages = Math.max(1, Math.ceil(items.length / pageSize));
|
|
214
|
+
const [uncontrolledPage, setUncontrolledPage] = useState(defaultPage);
|
|
215
|
+
const currentPage = Math.min(
|
|
216
|
+
Math.max(page ?? uncontrolledPage, 1),
|
|
217
|
+
totalPages
|
|
218
|
+
);
|
|
219
|
+
const pageNumbers = useMemo(
|
|
220
|
+
() => buildPageNumbers(currentPage, totalPages),
|
|
221
|
+
[currentPage, totalPages]
|
|
222
|
+
);
|
|
223
|
+
function handlePageChange(nextPage) {
|
|
224
|
+
if (page === void 0) {
|
|
225
|
+
setUncontrolledPage(nextPage);
|
|
228
226
|
}
|
|
229
|
-
|
|
230
|
-
/* @__PURE__ */ jsx(
|
|
231
|
-
ActivityLogHeader,
|
|
232
|
-
{
|
|
233
|
-
currentPage,
|
|
234
|
-
description,
|
|
235
|
-
title,
|
|
236
|
-
totalPages
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
/* @__PURE__ */ jsx(CardContent, { className: "space-y-4", children: /* @__PURE__ */ jsx(
|
|
240
|
-
ActivityLogBody,
|
|
241
|
-
{
|
|
242
|
-
currentPage,
|
|
243
|
-
emptyMessage,
|
|
244
|
-
items,
|
|
245
|
-
onPageChange: handlePageChange,
|
|
246
|
-
pageNumbers,
|
|
247
|
-
pageSize,
|
|
248
|
-
totalPages
|
|
249
|
-
}
|
|
250
|
-
) })
|
|
251
|
-
] });
|
|
227
|
+
onPageChange?.(nextPage);
|
|
252
228
|
}
|
|
253
|
-
)
|
|
229
|
+
return /* @__PURE__ */ jsxs(Card, { className: cn("w-full", className), ref, ...props, children: [
|
|
230
|
+
/* @__PURE__ */ jsx(
|
|
231
|
+
ActivityLogHeader,
|
|
232
|
+
{
|
|
233
|
+
currentPage,
|
|
234
|
+
description,
|
|
235
|
+
title,
|
|
236
|
+
totalPages
|
|
237
|
+
}
|
|
238
|
+
),
|
|
239
|
+
/* @__PURE__ */ jsx(CardContent, { className: "space-y-4", children: /* @__PURE__ */ jsx(
|
|
240
|
+
ActivityLogBody,
|
|
241
|
+
{
|
|
242
|
+
currentPage,
|
|
243
|
+
emptyMessage,
|
|
244
|
+
items,
|
|
245
|
+
onPageChange: handlePageChange,
|
|
246
|
+
pageNumbers,
|
|
247
|
+
pageSize,
|
|
248
|
+
totalPages
|
|
249
|
+
}
|
|
250
|
+
) })
|
|
251
|
+
] });
|
|
252
|
+
};
|
|
254
253
|
ActivityLog.displayName = "ActivityLog";
|
|
255
254
|
export {
|
|
256
255
|
ActivityLog
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import {
|
|
4
4
|
createContext,
|
|
5
|
-
|
|
5
|
+
use,
|
|
6
6
|
useCallback,
|
|
7
|
-
useContext,
|
|
8
7
|
useId,
|
|
9
8
|
useMemo,
|
|
10
9
|
useState
|
|
@@ -66,50 +65,51 @@ const ACTIVITY_LIVE_REGION_ROLE = {
|
|
|
66
65
|
idle: "status",
|
|
67
66
|
running: "log"
|
|
68
67
|
};
|
|
69
|
-
const AgentActivity =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
]
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
);
|
|
68
|
+
const AgentActivity = ({
|
|
69
|
+
ref,
|
|
70
|
+
...props
|
|
71
|
+
}) => {
|
|
72
|
+
const {
|
|
73
|
+
children,
|
|
74
|
+
className,
|
|
75
|
+
elapsed,
|
|
76
|
+
labels,
|
|
77
|
+
status = "idle",
|
|
78
|
+
...rest
|
|
79
|
+
} = props;
|
|
80
|
+
const resolvedLabels = useMemo(
|
|
81
|
+
() => ({ ...DEFAULT_LABELS, ...labels }),
|
|
82
|
+
[labels]
|
|
83
|
+
);
|
|
84
|
+
return /* @__PURE__ */ jsx(AgentActivityLabelsContext.Provider, { value: resolvedLabels, children: /* @__PURE__ */ jsxs(
|
|
85
|
+
"section",
|
|
86
|
+
{
|
|
87
|
+
"aria-live": status === "running" ? "polite" : "off",
|
|
88
|
+
className: cn(
|
|
89
|
+
"flex flex-col gap-3 rounded-2xl border bg-background p-4",
|
|
90
|
+
className
|
|
91
|
+
),
|
|
92
|
+
"data-status": status,
|
|
93
|
+
ref,
|
|
94
|
+
role: ACTIVITY_LIVE_REGION_ROLE[status],
|
|
95
|
+
...rest,
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsxs("header", { className: "flex items-center justify-between gap-3", children: [
|
|
98
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold tracking-tight text-foreground", children: resolvedLabels.activity }),
|
|
99
|
+
elapsed ? /* @__PURE__ */ jsx(
|
|
100
|
+
"span",
|
|
101
|
+
{
|
|
102
|
+
"aria-label": resolvedLabels.elapsed,
|
|
103
|
+
className: "text-xs font-mono text-muted-foreground",
|
|
104
|
+
children: elapsed
|
|
105
|
+
}
|
|
106
|
+
) : null
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ jsx("ol", { className: "flex flex-col gap-2", children })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
) });
|
|
112
|
+
};
|
|
113
113
|
AgentActivity.displayName = "AgentActivity";
|
|
114
114
|
function getDisplayName(value) {
|
|
115
115
|
if (value !== null && (typeof value === "object" || typeof value === "function") && "displayName" in value && typeof value.displayName === "string") {
|
|
@@ -182,72 +182,74 @@ function StepRow({
|
|
|
182
182
|
) : null
|
|
183
183
|
] });
|
|
184
184
|
}
|
|
185
|
-
const AgentStep =
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
185
|
+
const AgentStep = ({
|
|
186
|
+
ref,
|
|
187
|
+
...props
|
|
188
|
+
}) => {
|
|
189
|
+
const {
|
|
190
|
+
children,
|
|
191
|
+
className,
|
|
192
|
+
defaultOpen = true,
|
|
193
|
+
icon,
|
|
194
|
+
status,
|
|
195
|
+
...rest
|
|
196
|
+
} = props;
|
|
197
|
+
const split = useMemo(() => splitChildren(children), [children]);
|
|
198
|
+
const palette = STATUS_CLASSES[status];
|
|
199
|
+
const hasDetails = split.body.length > 0;
|
|
200
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
201
|
+
const detailsId = useId();
|
|
202
|
+
const labels = use(AgentActivityLabelsContext);
|
|
203
|
+
const handleToggle = useCallback(() => {
|
|
204
|
+
setOpen((value) => !value);
|
|
205
|
+
}, []);
|
|
206
|
+
const contextValue = useMemo(() => ({ status }), [status]);
|
|
207
|
+
const resolvedIcon = icon ?? DEFAULT_STATUS_ICON[status];
|
|
208
|
+
return /* @__PURE__ */ jsx(
|
|
209
|
+
"li",
|
|
210
|
+
{
|
|
211
|
+
className: cn(
|
|
212
|
+
"rounded-xl border ring-1",
|
|
213
|
+
palette.rowClass,
|
|
214
|
+
palette.ringClass,
|
|
215
|
+
className
|
|
216
|
+
),
|
|
217
|
+
"data-status": status,
|
|
218
|
+
ref,
|
|
219
|
+
...rest,
|
|
220
|
+
children: /* @__PURE__ */ jsxs(StepContext.Provider, { value: contextValue, children: [
|
|
221
|
+
/* @__PURE__ */ jsx(
|
|
222
|
+
StepRow,
|
|
223
|
+
{
|
|
224
|
+
detailsId,
|
|
225
|
+
hasDetails,
|
|
226
|
+
header: split.header,
|
|
227
|
+
icon: resolvedIcon,
|
|
228
|
+
iconClass: palette.iconClass,
|
|
229
|
+
labels,
|
|
230
|
+
onToggle: handleToggle,
|
|
231
|
+
open
|
|
232
|
+
}
|
|
217
233
|
),
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
{
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
onToggle: handleToggle,
|
|
232
|
-
open
|
|
233
|
-
}
|
|
234
|
-
),
|
|
235
|
-
hasDetails ? /* @__PURE__ */ jsx(
|
|
236
|
-
"div",
|
|
237
|
-
{
|
|
238
|
-
className: "border-t border-border/60 px-3 py-2 text-xs",
|
|
239
|
-
hidden: !open,
|
|
240
|
-
id: detailsId,
|
|
241
|
-
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 pl-8", children: split.body })
|
|
242
|
-
}
|
|
243
|
-
) : null
|
|
244
|
-
] })
|
|
245
|
-
}
|
|
246
|
-
);
|
|
247
|
-
}
|
|
248
|
-
);
|
|
234
|
+
hasDetails ? /* @__PURE__ */ jsx(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
className: "border-t border-border/60 px-3 py-2 text-xs",
|
|
238
|
+
hidden: !open,
|
|
239
|
+
id: detailsId,
|
|
240
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 pl-8", children: split.body })
|
|
241
|
+
}
|
|
242
|
+
) : null
|
|
243
|
+
] })
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
};
|
|
249
247
|
AgentStep.displayName = "AgentStep";
|
|
250
|
-
const AgentStepTitle =
|
|
248
|
+
const AgentStepTitle = ({
|
|
249
|
+
className,
|
|
250
|
+
ref,
|
|
251
|
+
...rest
|
|
252
|
+
}) => /* @__PURE__ */ jsx(
|
|
251
253
|
"p",
|
|
252
254
|
{
|
|
253
255
|
className: cn(
|
|
@@ -257,18 +259,28 @@ const AgentStepTitle = forwardRef(({ className, ...rest }, ref) => /* @__PURE__
|
|
|
257
259
|
ref,
|
|
258
260
|
...rest
|
|
259
261
|
}
|
|
260
|
-
)
|
|
262
|
+
);
|
|
261
263
|
AgentStepTitle.displayName = "AgentStepTitle";
|
|
262
|
-
const AgentStepDuration =
|
|
264
|
+
const AgentStepDuration = ({
|
|
265
|
+
className,
|
|
266
|
+
ref,
|
|
267
|
+
...rest
|
|
268
|
+
}) => /* @__PURE__ */ jsx(
|
|
263
269
|
"span",
|
|
264
270
|
{
|
|
265
271
|
className: cn("font-mono text-xs text-muted-foreground", className),
|
|
266
272
|
ref,
|
|
267
273
|
...rest
|
|
268
274
|
}
|
|
269
|
-
)
|
|
275
|
+
);
|
|
270
276
|
AgentStepDuration.displayName = "AgentStepDuration";
|
|
271
|
-
const AgentStepProgress =
|
|
277
|
+
const AgentStepProgress = ({
|
|
278
|
+
className,
|
|
279
|
+
label = "Step progress",
|
|
280
|
+
ref,
|
|
281
|
+
value,
|
|
282
|
+
...rest
|
|
283
|
+
}) => {
|
|
272
284
|
const clamped = Math.max(0, Math.min(100, value));
|
|
273
285
|
return /* @__PURE__ */ jsx(
|
|
274
286
|
"div",
|
|
@@ -290,21 +302,23 @@ const AgentStepProgress = forwardRef(({ className, label = "Step progress", valu
|
|
|
290
302
|
)
|
|
291
303
|
}
|
|
292
304
|
);
|
|
293
|
-
}
|
|
305
|
+
};
|
|
294
306
|
AgentStepProgress.displayName = "AgentStepProgress";
|
|
295
|
-
const AgentStepDetail =
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
307
|
+
const AgentStepDetail = ({
|
|
308
|
+
className,
|
|
309
|
+
ref,
|
|
310
|
+
...rest
|
|
311
|
+
}) => /* @__PURE__ */ jsx(
|
|
312
|
+
"div",
|
|
313
|
+
{
|
|
314
|
+
className: cn("text-xs text-muted-foreground", className),
|
|
315
|
+
ref,
|
|
316
|
+
...rest
|
|
317
|
+
}
|
|
304
318
|
);
|
|
305
319
|
AgentStepDetail.displayName = "AgentStepDetail";
|
|
306
320
|
function useAgentStepStatus() {
|
|
307
|
-
return
|
|
321
|
+
return use(StepContext).status;
|
|
308
322
|
}
|
|
309
323
|
export {
|
|
310
324
|
AgentActivity,
|