gridsmith-ui 0.17.3 → 0.19.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.
Files changed (37) hide show
  1. package/README.md +19 -13
  2. package/dist/charts.js +3 -3
  3. package/dist/charts.js.map +1 -1
  4. package/dist/chat.js +4 -4
  5. package/dist/{chunk-CIVSNXFG.js → chunk-5PDTHKW3.js} +17 -9
  6. package/dist/chunk-5PDTHKW3.js.map +1 -0
  7. package/dist/{chunk-XGSQOMEY.js → chunk-EQDR57AM.js} +4 -4
  8. package/dist/{chunk-XGSQOMEY.js.map → chunk-EQDR57AM.js.map} +1 -1
  9. package/dist/{chunk-EMCSARQO.js → chunk-ILIODA7W.js} +3 -3
  10. package/dist/{chunk-EMCSARQO.js.map → chunk-ILIODA7W.js.map} +1 -1
  11. package/dist/{chunk-OENJCGTJ.js → chunk-JN37OVTP.js} +4 -4
  12. package/dist/{chunk-OENJCGTJ.js.map → chunk-JN37OVTP.js.map} +1 -1
  13. package/dist/{chunk-4KVFH5KC.js → chunk-M2QRNBDQ.js} +4 -3
  14. package/dist/chunk-M2QRNBDQ.js.map +1 -0
  15. package/dist/{chunk-Z63OSN64.js → chunk-NCIZQYXQ.js} +7 -4
  16. package/dist/chunk-NCIZQYXQ.js.map +1 -0
  17. package/dist/{chunk-PVTGMCVR.js → chunk-XYDIBW3J.js} +4 -4
  18. package/dist/{chunk-PVTGMCVR.js.map → chunk-XYDIBW3J.js.map} +1 -1
  19. package/dist/data-grid.js +3 -3
  20. package/dist/editor.js +3 -3
  21. package/dist/editor.js.map +1 -1
  22. package/dist/index.d.ts +155 -55
  23. package/dist/index.js +576 -207
  24. package/dist/index.js.map +1 -1
  25. package/dist/kanban.js +3 -3
  26. package/dist/resizable.d.ts +8 -1
  27. package/dist/resizable.js +35 -15
  28. package/dist/resizable.js.map +1 -1
  29. package/dist/roots.css +164 -2
  30. package/dist/tailwind.css +14 -0
  31. package/dist/utils.js +1 -1
  32. package/dist/virtualized.js +1 -1
  33. package/dist-static/tailwind.css +14 -0
  34. package/package.json +2 -2
  35. package/dist/chunk-4KVFH5KC.js.map +0 -1
  36. package/dist/chunk-CIVSNXFG.js.map +0 -1
  37. package/dist/chunk-Z63OSN64.js.map +0 -1
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # gridsmith-ui
2
2
 
3
- 98 React components with a CSS custom property theming engine, 14 chart components, and 5 icon packs.
3
+ 103 React components with a CSS custom property theming engine, 13 chart components, and 5 icon packs.
4
4
 
5
5
  ## Installation
6
6
 
7
- gridsmith-ui needs React 19. On a React 18 project, upgrade `react`, `react-dom`, `@types/react` and `@types/react-dom` to 19 first; installing with `--force` or `--legacy-peer-deps` gives an app that cannot run.
7
+ gridsmith-ui needs React 19. On a React 18 project, upgrade `react`, `react-dom`, `@types/react` and `@types/react-dom` to 19 first; installing with `--force` or `--legacy-peer-deps` gives an app that cannot run. On React 18, `AppShell` and `PageContainer` stop with an error that says so.
8
8
 
9
9
  ```bash
10
10
  npm install gridsmith-ui
@@ -18,7 +18,7 @@ npm install recharts
18
18
 
19
19
  ### Heavy components (optional)
20
20
 
21
- Five components depend on large third-party libraries. They live in their own entry points so the main bundle stays small — install the library only if you use the component:
21
+ Seven components depend on large third-party libraries. They live in six entry points of their own so the main bundle stays small — install the library only if you use the component:
22
22
 
23
23
  ```bash
24
24
  npm install @tiptap/react @tiptap/pm @tiptap/starter-kit lowlight \
@@ -28,18 +28,19 @@ npm install @tiptap/react @tiptap/pm @tiptap/starter-kit lowlight \
28
28
  @tiptap/extension-table @tiptap/extension-table-cell @tiptap/extension-table-header \
29
29
  @tiptap/extension-table-row @tiptap/extension-task-item @tiptap/extension-task-list \
30
30
  @tiptap/extension-text-align @tiptap/extension-text-style @tiptap/extension-underline # gridsmith-ui/editor
31
+ npm install react-markdown remark-gfm # gridsmith-ui/chat
31
32
  npm install @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities # gridsmith-ui/kanban
32
33
  npm install @tanstack/react-table # gridsmith-ui/data-grid
33
34
  npm install @tanstack/react-virtual # gridsmith-ui/virtualized
34
35
  npm install react-resizable-panels # gridsmith-ui/resizable
35
36
  ```
36
37
 
37
- ### Icon packs (optional)
38
+ ### Icon packs
38
39
 
39
- The `Icon` component uses `lucide-react` by default. Other packs are loaded on demand — install only what you need:
40
+ The `Icon` component uses `lucide-react` by default, and every other pack falls back to it for a missing name, so always install it. Other packs are loaded on demand — install only what you need:
40
41
 
41
42
  ```bash
42
- # Default (recommended)
43
+ # Default and fallback (required)
43
44
  npm install lucide-react
44
45
 
45
46
  # Alternative packs
@@ -58,11 +59,13 @@ Import the design tokens and Tailwind bindings in your CSS entry point:
58
59
  @import "gridsmith-ui/roots.css";
59
60
  @import "gridsmith-ui/tokens.css";
60
61
  @import "gridsmith-ui/tailwind.css";
62
+ @source "../node_modules/gridsmith-ui/dist/*.js";
61
63
  ```
62
64
 
63
65
  - **roots.css** — the CSS custom property engine (L1 roots, L2 derived scales, L3 semantics)
64
- - **tokens.css** — default Precision Minimal preset values (optional: use `generate-tokens.ts` to customise)
66
+ - **tokens.css** — default Precision Minimal preset values (a Gridsmith project imports the `tokens_css` from `get_tokens` called with `css: true`, saved as `gridsmith-tokens.css`, instead)
65
67
  - **tailwind.css** — maps `--ds-*` tokens to Tailwind utilities (`p-ds-4`, `text-2xs`, `opacity-disabled`)
68
+ - **@source** — tells Tailwind to scan the compiled components; without it they render unstyled. It must come after every `@import`.
66
69
 
67
70
  For the fastest icon rendering on cold loads, call `preloadPack` in your entry point before `createRoot`:
68
71
 
@@ -75,13 +78,14 @@ preloadPack("lucide");
75
78
 
76
79
  | Import path | What it provides |
77
80
  |---|---|
78
- | `gridsmith-ui` | 97 components (actions, forms, data display, navigation, overlays, feedback, layout) |
79
- | `gridsmith-ui/charts` | 14 chart components (Bar, Line, Area, Pie, Composite, Scatter, Radar, RadialBar, Funnel, Treemap, Sankey, Sparkline, ChartContainer) + `useChartColors` hook |
81
+ | `gridsmith-ui` | 96 components (actions, forms, data display, navigation, overlays, feedback, layout) |
82
+ | `gridsmith-ui/charts` | 13 chart components (Bar, Line, Area, Pie, Composite, Scatter, Radar, RadialBar, Funnel, Treemap, Sankey, Sparkline, ChartContainer) + `useChartColors` hook + `categoryKind()` |
80
83
  | `gridsmith-ui/editor` | `RichTextEditor` (requires the tiptap packages + `lowlight`) |
84
+ | `gridsmith-ui/chat` | `MarkdownContent` for chat replies; pass it to `ChatMessageList`'s `renderContent` (requires `react-markdown` + `remark-gfm`) |
81
85
  | `gridsmith-ui/kanban` | `KanbanBoard` (requires `@dnd-kit/*`) |
82
86
  | `gridsmith-ui/data-grid` | `DataGrid` (requires `@tanstack/react-table`) |
83
87
  | `gridsmith-ui/virtualized` | `VirtualizedList` (requires `@tanstack/react-virtual`) |
84
- | `gridsmith-ui/resizable` | `ResizablePanelGroup`, `ResizablePanel`, `ResizableHandle` (requires `react-resizable-panels`) |
88
+ | `gridsmith-ui/resizable` | `ResizablePanelGroup`, `ResizablePanel`, `ResizableHandle`, `SplitView` (requires `react-resizable-panels`) |
85
89
  | `gridsmith-ui/icons` | `Icon`, `IconProvider`, `preloadPack` — 5 icon packs with two-phase loading |
86
90
  | `gridsmith-ui/utils` | `cn()` — className merge utility (clsx + tailwind-merge) |
87
91
  | `gridsmith-ui/roots.css` | CSS custom property engine |
@@ -94,10 +98,11 @@ preloadPack("lucide");
94
98
  import { Button, Card, Input, Table } from "gridsmith-ui";
95
99
  import { BarChart, LineChart } from "gridsmith-ui/charts";
96
100
  import { RichTextEditor } from "gridsmith-ui/editor";
101
+ import { MarkdownContent } from "gridsmith-ui/chat";
97
102
  import { KanbanBoard } from "gridsmith-ui/kanban";
98
103
  import { DataGrid } from "gridsmith-ui/data-grid";
99
104
  import { VirtualizedList } from "gridsmith-ui/virtualized";
100
- import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from "gridsmith-ui/resizable";
105
+ import { ResizablePanelGroup, ResizablePanel, ResizableHandle, SplitView } from "gridsmith-ui/resizable";
101
106
  import { Icon, IconProvider } from "gridsmith-ui/icons";
102
107
  import { cn } from "gridsmith-ui/utils";
103
108
  ```
@@ -134,10 +139,11 @@ Wrap your app in `<IconProvider>` to select a pack:
134
139
 
135
140
  | Package | Required |
136
141
  |---------|----------|
137
- | `react` / `react-dom` | Yes (^18 or ^19) |
138
- | `lucide-react` | Optional (default icon pack) |
142
+ | `react` / `react-dom` | Yes (^19) |
143
+ | `lucide-react` | Yes (the default icon pack and every pack's fallback) |
139
144
  | `recharts` | Optional (required for `gridsmith-ui/charts`) |
140
145
  | `@tiptap/*`, `lowlight` | Optional (required for `gridsmith-ui/editor`) |
146
+ | `react-markdown`, `remark-gfm` | Optional (required for `gridsmith-ui/chat`) |
141
147
  | `@dnd-kit/*` | Optional (required for `gridsmith-ui/kanban`) |
142
148
  | `@tanstack/react-table` | Optional (required for `gridsmith-ui/data-grid`) |
143
149
  | `@tanstack/react-virtual` | Optional (required for `gridsmith-ui/virtualized`) |
package/dist/charts.js CHANGED
@@ -1,6 +1,6 @@
1
- import { Skeleton } from './chunk-Z63OSN64.js';
1
+ import { TITLE_TEXT, Skeleton } from './chunk-NCIZQYXQ.js';
2
2
  import { mergeRefs } from './chunk-7Q46JXSK.js';
3
- import { cn, GLASS_SURFACE } from './chunk-4KVFH5KC.js';
3
+ import { cn, GLASS_SURFACE } from './chunk-M2QRNBDQ.js';
4
4
  import { createContext, forwardRef, useContext, useRef, useState, useMemo, useLayoutEffect, useEffect, useId, useSyncExternalStore, Children, isValidElement } from 'react';
5
5
  import { ResponsiveContainer, BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Bar, LineChart as LineChart$1, Line, AreaChart as AreaChart$1, Area, PieChart as PieChart$1, Pie, Cell, ComposedChart, ScatterChart as ScatterChart$1, ZAxis, Scatter, RadarChart as RadarChart$1, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, RadialBarChart as RadialBarChart$1, RadialBar, FunnelChart as FunnelChart$1, Funnel, LabelList, Treemap, Sankey, Text, Legend, Rectangle } from 'recharts';
6
6
  import { createPortal } from 'react-dom';
@@ -1720,7 +1720,7 @@ var Sparkline = forwardRef(function Sparkline2({
1720
1720
  )
1721
1721
  ] }) }) });
1722
1722
  });
1723
- var CHART_TITLE_CLASSES = "font-[family-name:var(--ds-font-display)] text-lg font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]";
1723
+ var CHART_TITLE_CLASSES = TITLE_TEXT;
1724
1724
  function ChartContainer({
1725
1725
  height = "auto",
1726
1726
  title,