@outsidedata/dolex 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +38 -108
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,31 +4,15 @@
4
4
 
5
5
  Every AI assistant suggests a bar chart. Dolex suggests the *right* chart — bump charts for rankings, beeswarms for distributions, connected dot plots for two-metric comparisons, waffle charts for precise proportions.
6
6
 
7
- ## Features
8
-
9
- - **43 Visualization Patterns** across 7 categories: comparison, distribution, composition, time, relationship, flow, and geo
10
- - **Pattern Selector** — analyzes data shape + user intent, scores every pattern, returns ranked recommendations with reasoning
11
- - **Data Source Connectors** — connect CSV, SQLite, PostgreSQL, or MySQL; query with a declarative DSL including joins, aggregations, and time bucketing
12
- - **React Components** — 43 thin-wrapper components with D3 lifecycle management
13
- - **HTML Builders** — 43 self-contained HTML documents, perfect for MCP Apps / iframes
14
- - **MCP Server** — 17 tools for Claude Desktop, ChatGPT, VS Code, and any MCP-compatible client
15
- - **Dashboard Builder** — multi-view dashboards with global filters and cross-view interactions
16
- - **Compound Visualizations** — chart + data table with linked highlighting
17
- - **Design System** — dark/light themes with color palettes, typography, and spacing tokens
18
- - **Smart Labels** — truncation, abbreviation, collision avoidance, adaptive strategies
19
- - **Offline Maps** — choropleth and proportional symbol maps with 33 embedded TopoJSON files covering world, continents, US states/counties, and 17 country subdivision maps
20
-
21
7
  ## Install
22
8
 
23
9
  ```bash
24
10
  npm install @outsidedata/dolex
25
11
  ```
26
12
 
27
- ## MCP Server Setup
28
-
29
- ### Claude Desktop
13
+ ## Claude Desktop
30
14
 
31
- Add this to your Claude Desktop configuration file (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
15
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
32
16
 
33
17
  ```json
34
18
  {
@@ -41,15 +25,15 @@ Add this to your Claude Desktop configuration file (`~/Library/Application Suppo
41
25
  }
42
26
  ```
43
27
 
44
- Restart Claude Desktop. You'll see Dolex's 17 tools available in the tool picker.
28
+ Restart Claude Desktop. Dolex's 17 tools appear in the tool picker.
45
29
 
46
- ### Claude Code
30
+ ## Claude Code
47
31
 
48
32
  ```bash
49
33
  claude mcp add dolex -- npx @outsidedata/dolex
50
34
  ```
51
35
 
52
- ### Other MCP Clients
36
+ ## Other MCP Clients
53
37
 
54
38
  Any MCP-compatible client (ChatGPT, VS Code, Goose, etc.) can connect via stdio:
55
39
 
@@ -57,29 +41,35 @@ Any MCP-compatible client (ChatGPT, VS Code, Goose, etc.) can connect via stdio:
57
41
  npx @outsidedata/dolex
58
42
  ```
59
43
 
60
- ### MCP Tools
44
+ ## What It Does
45
+
46
+ You give Claude your data and ask a question. Dolex analyzes the data shape and your intent, then picks the right visualization from 43 handcrafted patterns — not the obvious chart, the *informative* one.
47
+
48
+ Charts render inline in the conversation as interactive HTML. No external dependencies, no CDN calls, fully offline.
61
49
 
62
- | Tool | Description |
50
+ ### Tools
51
+
52
+ | Tool | What it does |
63
53
  |------|-------------|
64
- | `visualize` | Takes inline data + intent, returns visualization recommendations |
65
- | `visualize_from_source` | Takes a data source + DSL query + intent, returns visualization recommendations |
66
- | `list_patterns` | Browse all 43 available patterns |
67
- | `refine_visualization` | Tweak a visualization — sort, limit, flip axes, change colors, update title |
68
- | `add_source` | Connect a data source (CSV, SQLite, PostgreSQL, MySQL) |
69
- | `list_sources` | List all connected data sources |
70
- | `remove_source` | Disconnect and remove a data source |
71
- | `describe_source` | Column profiles for a data source |
72
- | `analyze_source` | Generate a structured analysis plan with ready-to-execute DSL queries |
73
- | `query_source` | Run a declarative DSL query against a data source |
74
- | `create_dashboard` | Multi-view dashboard with global filters and cross-view interactions |
75
- | `refine_dashboard` | Iterate on a dashboard — add/remove views, change layout, filters, themes |
76
- | `server_status` | Inspect cached data in server memory |
77
- | `clear_cache` | Clear cached specs and query results |
54
+ | `visualize` | Inline data + intent ranked chart recommendations |
55
+ | `visualize_from_source` | Data source + DSL query + intent chart recommendations |
56
+ | `list_patterns` | Browse all 43 patterns |
57
+ | `refine_visualization` | Tweak a chart — sort, limit, flip axes, colors, title |
58
+ | `add_source` | Connect CSV, SQLite, PostgreSQL, or MySQL |
59
+ | `list_sources` | List connected sources |
60
+ | `remove_source` | Disconnect a source |
61
+ | `describe_source` | Column profiles and sample rows |
62
+ | `analyze_source` | Auto-generate an analysis plan with DSL queries |
63
+ | `query_source` | Run a declarative query (joins, aggregations, filters) |
64
+ | `create_dashboard` | Multi-view dashboard with filters and cross-filtering |
65
+ | `refine_dashboard` | Iterate on a dashboard |
66
+ | `server_status` | Inspect cached data |
67
+ | `clear_cache` | Clear cached specs and results |
78
68
  | `report_bug` | Generate a sanitized bug report |
79
- | `export_html` | Return full self-contained HTML for a visualization |
80
- | `screenshot` | Render a visualization to PNG via headless Chromium |
69
+ | `export_html` | Get raw HTML for a chart |
70
+ | `screenshot` | Render a chart to PNG |
81
71
 
82
- ## Pattern Catalog
72
+ ### Patterns
83
73
 
84
74
  | Category | Patterns |
85
75
  |----------|----------|
@@ -91,78 +81,18 @@ npx @outsidedata/dolex
91
81
  | **Flow** (4) | Sankey, Alluvial, Chord, Funnel |
92
82
  | **Geo** (2) | Choropleth, Proportional Symbol |
93
83
 
94
- ## Library Usage
95
-
96
- ### Pattern Selection
97
-
98
- ```typescript
99
- import { selectPattern, registry } from '@outsidedata/dolex';
100
-
101
- const result = selectPattern(data, columns, 'compare rankings over time');
102
- console.log(result.recommended.pattern.name); // "Bump Chart"
103
- console.log(result.recommended.reasoning);
104
-
105
- const patterns = registry.getAll(); // 43 patterns
106
- const comparison = registry.getByCategory('comparison'); // 9 patterns
107
- ```
108
-
109
- ### React Components
110
-
111
- ```tsx
112
- import { BumpChart, Beeswarm, Waffle, Scatter, Line } from '@outsidedata/dolex/react';
113
-
114
- function Dashboard({ spec }) {
115
- return <BumpChart spec={spec} width={800} height={500} />;
116
- }
117
- ```
118
-
119
- Available components: `Bar`, `DivergingBar`, `SlopeChart`, `BumpChart`, `ConnectedDotPlot`, `Lollipop`, `Bullet`, `GroupedBar`, `Waterfall`, `Histogram`, `Beeswarm`, `StripPlot`, `Violin`, `Ridgeline`, `BoxPlot`, `DensityPlot`, `StackedBar`, `Waffle`, `Treemap`, `Sunburst`, `CirclePack`, `Metric`, `Donut`, `Marimekko`, `Icicle`, `Line`, `Area`, `SmallMultiples`, `SparklineGrid`, `CalendarHeatmap`, `StreamGraph`, `HorizonChart`, `Scatter`, `ConnectedScatter`, `ParallelCoordinates`, `Radar`, `Heatmap`, `Sankey`, `Alluvial`, `Chord`, `Funnel`, `Choropleth`, `ProportionalSymbol`
120
-
121
- ### HTML Builders (MCP Apps / Iframes)
122
-
123
- ```typescript
124
- import { buildChartHtml } from '@outsidedata/dolex/html';
125
-
126
- const html = buildChartHtml(spec);
127
- // Complete self-contained HTML document with embedded D3 + data
128
- ```
129
-
130
- ### Theme
84
+ ### Data Connectors
131
85
 
132
- ```typescript
133
- import { theme, getTheme } from '@outsidedata/dolex/theme';
134
-
135
- const dark = getTheme('dark');
136
- const palette = dark.palettes.categorical;
137
- ```
86
+ - **CSV** — load local CSV files into an in-memory SQLite database
87
+ - **SQLite** read-only access to SQLite databases
88
+ - **PostgreSQL** — connect to Postgres instances
89
+ - **MySQL** connect to MySQL instances
138
90
 
139
- ### Smart Labels
91
+ All connectors support the declarative DSL query language with joins, aggregations, groupBy (with time bucketing), filters, orderBy, and limit.
140
92
 
141
- ```typescript
142
- import { labelStrategy, truncateLabel, abbreviate } from '@outsidedata/dolex/utils';
93
+ ### Offline Maps
143
94
 
144
- const strategy = labelStrategy(['January Sales', 'February Sales', ...], 400);
145
- ```
146
-
147
- ## Exports Map
148
-
149
- | Import Path | Contents |
150
- |-------------|----------|
151
- | `@outsidedata/dolex` | Types, patterns, theme, utilities, HTML builders |
152
- | `@outsidedata/dolex/react` | React components (requires React >=18) |
153
- | `@outsidedata/dolex/html` | Self-contained HTML chart builders |
154
- | `@outsidedata/dolex/theme` | Design system tokens |
155
- | `@outsidedata/dolex/utils` | Smart labels, responsive, export utilities |
156
- | `@outsidedata/dolex/patterns` | Pattern registry and selector |
157
-
158
- ## Development
159
-
160
- ```bash
161
- npm run build # TypeScript compilation
162
- npm test # Run tests (818 tests)
163
- npm run dev # Watch mode for MCP server
164
- npm run mcp:stdio # Run MCP server via tsx
165
- ```
95
+ 33 TopoJSON files ship with the package — world maps, US states/counties, 6 continent maps, and 17 country subdivision maps (Germany, France, Japan, China, etc.). All map data is embedded inline in the chart HTML. No CDN calls, ever.
166
96
 
167
97
  ## License
168
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outsidedata/dolex",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Visualization intelligence for AI — 43 handcrafted chart patterns with React components, MCP server, and self-contained HTML builders",
5
5
  "type": "module",
6
6
  "license": "MIT",