@grackle-ai/web-components 0.108.3 → 0.110.1

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 (30) hide show
  1. package/.rush/temp/3629cc83b3804ac8bcea27905e83162210fb5dd6.tar.log +240 -0
  2. package/.rush/temp/{28d8c029b5d0c4a740412c3ca7a7aa456ad48c1b.untar.log → 3629cc83b3804ac8bcea27905e83162210fb5dd6.untar.log} +2 -2
  3. package/.rush/temp/chunked-rush-logs/web-components._phase_build.chunks.jsonl +18 -0
  4. package/.rush/temp/chunked-rush-logs/web-components._phase_test.chunks.jsonl +121 -0
  5. package/.rush/temp/f2b8b611fc00c7b912256986db4cc966d6560387.tar.log +12 -0
  6. package/.rush/temp/{9f397c070a4229568e12d273f46cf0cda84b9bd2.untar.log → f2b8b611fc00c7b912256986db4cc966d6560387.untar.log} +2 -2
  7. package/.rush/temp/operation/_phase_build/all.log +5 -5
  8. package/.rush/temp/operation/_phase_build/log-chunks.jsonl +5 -5
  9. package/.rush/temp/operation/_phase_build/state.json +1 -1
  10. package/.rush/temp/operation/_phase_test/all.log +21 -21
  11. package/.rush/temp/operation/_phase_test/log-chunks.jsonl +21 -21
  12. package/.rush/temp/operation/_phase_test/state.json +1 -1
  13. package/README.md +95 -0
  14. package/dist/index.css +1 -1
  15. package/dist/index.js +5826 -5732
  16. package/package.json +2 -2
  17. package/rush-logs/web-components._phase_build.cache.log +1 -1
  18. package/rush-logs/web-components._phase_build.log +18 -0
  19. package/rush-logs/web-components._phase_test.cache.log +1 -1
  20. package/rush-logs/web-components._phase_test.log +121 -0
  21. package/src/components/layout/AppNav.module.scss +6 -0
  22. package/src/components/layout/AppNav.stories.tsx +47 -0
  23. package/src/components/layout/AppNav.tsx +24 -10
  24. package/src/components/panels/EnvironmentEditPanel.stories.tsx +87 -1
  25. package/src/components/panels/EnvironmentEditPanel.tsx +143 -34
  26. package/src/context/GrackleContextTypes.ts +3 -1
  27. package/src/hooks/types.ts +21 -0
  28. package/src/index.ts +2 -2
  29. package/src/mocks/MockGrackleProvider.tsx +7 -0
  30. package/temp/build/lint/_eslint-5eVG3S6w.json +810 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- "nonCachedDurationMs": 109771.140082
2
+ "nonCachedDurationMs": 113591.533197
3
3
  }
package/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # @grackle-ai/web-components
2
+
3
+ <p align="center">
4
+ <a href="https://www.npmjs.com/package/@grackle-ai/web-components"><img src="https://img.shields.io/npm/v/@grackle-ai/web-components.svg" alt="npm version" /></a>
5
+ <a href="https://github.com/nick-pape/grackle/actions/workflows/ci.yml"><img src="https://github.com/nick-pape/grackle/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI" /></a>
6
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <img src="https://raw.githubusercontent.com/nick-pape/grackle/main/apps/docs-site/static/img/grackle-logo.png" alt="Grackle" width="200" />
11
+ </p>
12
+
13
+ Presentational React component library for the Grackle web UI, documented and developed in Storybook.
14
+
15
+ ## Overview
16
+
17
+ `@grackle-ai/web-components` is the shared React 19 component library that powers the Grackle web dashboard. It contains the pure, presentational building blocks of the UI -- everything from buttons and toasts to the task tree, the dependency-graph view, and the full set of settings panels -- along with the contexts, hooks, types, and utilities they rely on.
18
+
19
+ Components accept data and callbacks as props and contain no direct server access, so they render the same in Storybook as they do in the live app. The library is consumed primarily by [`@grackle-ai/web`](https://github.com/nick-pape/grackle/tree/main/packages/web), which wires these components up to live server state. Shared protobuf-generated types come from [`@grackle-ai/common`](https://github.com/nick-pape/grackle/tree/main/packages/common).
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ npm install @grackle-ai/web-components
25
+ ```
26
+
27
+ This library targets **React 19** (`react` and `react-dom` `^19`). It also pulls in the rendering dependencies it needs out of the box, including `@xyflow/react` and `@dagrejs/dagre` (graph views), `motion` (animation), `lucide-react` (icons), `react-router` (navigation helpers), and `react-markdown` + `remark-gfm` + `rehype-prism-plus` (Markdown rendering).
28
+
29
+ ## What's Included
30
+
31
+ Components are grouped by area under `src/components/`:
32
+
33
+ | Category | Examples |
34
+ |----------|----------|
35
+ | **Display primitives** | `Button`, `SplitButton`, `CopyButton`, `Tooltip`, `Breadcrumbs`, `ConfirmDialog`, `Skeleton`, `Spinner`, `SplashScreen`, `FloatingActionBar` |
36
+ | **Event stream** | `EventStream`, `EventRenderer`, `EventHoverRow`, `SessionPicker`, `SessionAttemptSelector` |
37
+ | **Tool cards** | `ToolCard`, `FileEditCard`, `FileReadCard`, `ShellCard`, `SearchCard`, `TodoCard`, `MetadataCard`, `AgentToolCard`, `GenericToolCard` |
38
+ | **Layout** | `AppNav`, `Sidebar`, `StatusBar`, `BottomStatusBar` |
39
+ | **Lists** | `TaskList`, `EnvironmentNav`, `FindingsNav` |
40
+ | **DAG visualization** | `DagView`, `TaskNode`, `useDagLayout` (React Flow + dagre) |
41
+ | **Knowledge graph** | `KnowledgeGraph`, `KnowledgeDetailPanel`, `KnowledgeNav` |
42
+ | **Panels** | `TaskEditPanel`, `TaskOverviewPanel`, `EnvironmentEditPanel`, `FindingsPanel`, `TokensPanel`, `AppearancePanel`, `AboutPanel`, `PluginsPanel`, `GitHubAccountsPanel`, `CredentialProvidersPanel`, `KeyboardShortcutsPanel`, `WorkpadPanel` |
43
+ | **Editable fields** | `EditableTextField`, `EditableTextArea`, `EditableSelect`, `EditableCheckbox`, `EnvironmentSelect`, `useEditableField` |
44
+ | **Notifications** | `Toast`, `ToastContainer`, `Callout`, `UpdateBanner` |
45
+ | **Workspace & boards** | `WorkspaceBoard`, `WorkspaceFormFields` |
46
+ | **Personas & schedules** | `PersonaManager`, `McpToolSelector`, `ScheduleManager` |
47
+ | **Chat & streams** | `ChatInput`, `StreamList`, `StreamDetailPanel` |
48
+ | **Settings** | `SettingsNav` |
49
+
50
+ Alongside the components, the package exports:
51
+
52
+ - **Contexts** -- `ToastProvider`, `ThemeProvider`, `SidebarProvider`, and `GrackleContext` with their hooks.
53
+ - **Hooks** -- `useSmartScroll`, `useEventSelection`, and shared domain types/guards from `hooks/types`.
54
+ - **Utilities** -- navigation URL builders, task-status styling, token/cost/time formatting, breadcrumb builders, session-event grouping, and dashboard KPI helpers.
55
+ - **Themes** -- the `THEMES` registry (`getThemeById`, `DEFAULT_THEME_ID`).
56
+ - **Mocks & test utilities** -- `MockGrackleProvider` plus Storybook decorators (`withMockGrackle`, `withMockGrackleRoute`).
57
+
58
+ The package entry point is `src/index.ts`; see it for the complete list of exports.
59
+
60
+ ## Storybook
61
+
62
+ Every component ships with `.stories.tsx` stories, which serve as both the development environment and living documentation. The hosted Storybook is published to GitHub Pages at **https://nick-pape.github.io/grackle/components/**.
63
+
64
+ ```bash
65
+ # From the package directory -- run Storybook locally on port 6006
66
+ rushx storybook
67
+
68
+ # Build the static Storybook site (output: storybook-static/)
69
+ rushx build-storybook
70
+
71
+ # Run Storybook interaction tests headlessly
72
+ rushx test-storybook
73
+ ```
74
+
75
+ The Storybook base path is configurable via the `STORYBOOK_BASE` environment variable (defaults to `/`), which the publish workflow sets when deploying to GitHub Pages.
76
+
77
+ ## Development
78
+
79
+ ```bash
80
+ # From the repo root -- install dependencies and build all packages
81
+ rush install && rush build
82
+
83
+ # Build just this package (Heft)
84
+ rush build -t @grackle-ai/web-components
85
+ ```
86
+
87
+ ### Run tests
88
+
89
+ ```bash
90
+ rushx test # Vitest unit tests
91
+ ```
92
+
93
+ ## License
94
+
95
+ MIT