@railtownai/railtracks-visualizer 0.0.17 → 0.0.19
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/README.md +32 -0
- package/dist/cjs/index.js +594 -31
- package/dist/esm/index.js +595 -32
- package/dist/types/components/FileSelector.d.ts +5 -2
- package/dist/types/components/Timeline.d.ts +1 -1
- package/dist/types/components/Visualizer.d.ts +1 -1
- package/dist/types/components/icons/AnthropicIcon.d.ts +2 -1
- package/dist/types/components/icons/GoogleIcon.d.ts +2 -1
- package/dist/types/components/icons/OpenAIIcon.d.ts +2 -1
- package/dist/types/components/icons/index.d.ts +1 -1
- package/dist/types/components/ui/select.d.ts +8 -8
- package/dist/types/components/ui/sheet.d.ts +2 -5
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useTheme.d.ts +7 -0
- package/dist/types/lib/GlobalStyles.d.ts +2 -0
- package/dist/types/lib/ThemeProvider.d.ts +14 -0
- package/dist/types/lib/index.d.ts +3 -0
- package/dist/types/lib/theme.d.ts +65 -0
- package/dist/types/lib/utils.d.ts +32 -10
- package/package.json +3 -7
package/README.md
CHANGED
|
@@ -46,6 +46,38 @@ A React-based visualizer for RailTracks agentic flows
|
|
|
46
46
|
- **Inspection Panel**: Detailed view of nodes and edges
|
|
47
47
|
- **Playback Controls**: Play/pause timeline progression
|
|
48
48
|
- **Portable Styling**: Uses emotion for self-contained, portable styles
|
|
49
|
+
- **Graceful Theme Handling**: Works out of the box with default light theme, no ThemeProvider required
|
|
50
|
+
- **Dark Mode Support**: Full dark mode compatibility with automatic theme detection
|
|
51
|
+
- **Icon Integration**: Support for OpenAI, Anthropic, and Google AI provider icons
|
|
52
|
+
|
|
53
|
+
## 🎨 Theming
|
|
54
|
+
|
|
55
|
+
The component includes built-in theme support with graceful fallbacks:
|
|
56
|
+
|
|
57
|
+
- **Default Theme**: Uses a light theme by default
|
|
58
|
+
- **No Provider Required**: Works without wrapping in a ThemeProvider
|
|
59
|
+
- **Graceful Fallbacks**: If theme context is unavailable, falls back to default light theme
|
|
60
|
+
- **Custom Themes**: Can be wrapped in ThemeProvider for custom theming
|
|
61
|
+
|
|
62
|
+
### Basic Usage (No ThemeProvider Required)
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import { Visualizer } from "@railtownai/railtracks-visualizer";
|
|
66
|
+
|
|
67
|
+
// Works out of the box with default light theme
|
|
68
|
+
<Visualizer flowData={data} />;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Custom Theming (Optional)
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import { Visualizer, ThemeProvider, darkTheme } from "@railtownai/railtracks-visualizer";
|
|
75
|
+
|
|
76
|
+
// Wrap with ThemeProvider for custom themes
|
|
77
|
+
<ThemeProvider theme={darkTheme}>
|
|
78
|
+
<Visualizer flowData={data} />
|
|
79
|
+
</ThemeProvider>;
|
|
80
|
+
```
|
|
49
81
|
|
|
50
82
|
## 🔧 Development
|
|
51
83
|
|