gridsmith-ui 0.24.0 → 0.25.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 (78) hide show
  1. package/README.md +8 -6
  2. package/dist/MentionList-CoNBRFGR.d.ts +8 -0
  3. package/dist/charts.d.ts +42 -1
  4. package/dist/charts.js +320 -89
  5. package/dist/charts.js.map +1 -1
  6. package/dist/chat.js +5 -4
  7. package/dist/chat.js.map +1 -1
  8. package/dist/{chunk-MV7JXWXK.js → chunk-3CUKJ4VP.js} +7 -6
  9. package/dist/chunk-3CUKJ4VP.js.map +1 -0
  10. package/dist/{chunk-SBTBMAIU.js → chunk-FHMCAOAH.js} +6 -6
  11. package/dist/{chunk-SBTBMAIU.js.map → chunk-FHMCAOAH.js.map} +1 -1
  12. package/dist/chunk-HP7WUZPK.js +80 -0
  13. package/dist/chunk-HP7WUZPK.js.map +1 -0
  14. package/dist/{chunk-4LDYR7QP.js → chunk-HYMXAIXN.js} +53 -13
  15. package/dist/chunk-HYMXAIXN.js.map +1 -0
  16. package/dist/{chunk-7TOJ4G7S.js → chunk-HZIP4EJI.js} +14 -9
  17. package/dist/chunk-HZIP4EJI.js.map +1 -0
  18. package/dist/{chunk-CXMV7SXJ.js → chunk-MD2EFMES.js} +5 -77
  19. package/dist/chunk-MD2EFMES.js.map +1 -0
  20. package/dist/{chunk-IVCVNAXG.js → chunk-OTCEJN64.js} +3 -3
  21. package/dist/{chunk-IVCVNAXG.js.map → chunk-OTCEJN64.js.map} +1 -1
  22. package/dist/{chunk-SVP2IG4S.js → chunk-QGSCF7PN.js} +7 -7
  23. package/dist/chunk-QGSCF7PN.js.map +1 -0
  24. package/dist/{chunk-2PWGJ4PK.js → chunk-QM4SJKWV.js} +11 -6
  25. package/dist/chunk-QM4SJKWV.js.map +1 -0
  26. package/dist/chunk-RWKCAKN3.js +209 -0
  27. package/dist/chunk-RWKCAKN3.js.map +1 -0
  28. package/dist/{chunk-6XAU44U4.js → chunk-W7GCEJEH.js} +9 -22
  29. package/dist/chunk-W7GCEJEH.js.map +1 -0
  30. package/dist/{chunk-NCIZQYXQ.js → chunk-X2HEV7FB.js} +33 -3
  31. package/dist/chunk-X2HEV7FB.js.map +1 -0
  32. package/dist/data-grid.d.ts +1 -1
  33. package/dist/data-grid.js +12 -11
  34. package/dist/data-grid.js.map +1 -1
  35. package/dist/editor-mentions.d.ts +30 -0
  36. package/dist/editor-mentions.js +160 -0
  37. package/dist/editor-mentions.js.map +1 -0
  38. package/dist/editor.d.ts +23 -3
  39. package/dist/editor.js +57 -8
  40. package/dist/editor.js.map +1 -1
  41. package/dist/{feather-2JFSFLXN.js → feather-W26ERBQV.js} +11 -3
  42. package/dist/feather-W26ERBQV.js.map +1 -0
  43. package/dist/{heroicons-4AQ4YBVG.js → heroicons-MY43466C.js} +21 -7
  44. package/dist/heroicons-MY43466C.js.map +1 -0
  45. package/dist/icons.d.ts +11 -4
  46. package/dist/icons.js +1 -1
  47. package/dist/index.d.ts +150 -28
  48. package/dist/index.js +299 -218
  49. package/dist/index.js.map +1 -1
  50. package/dist/kanban.js +6 -5
  51. package/dist/kanban.js.map +1 -1
  52. package/dist/{lucide-RZC2FEMS.js → lucide-CMPVM3PS.js} +11 -3
  53. package/dist/lucide-CMPVM3PS.js.map +1 -0
  54. package/dist/{phosphor-CEN25FLM.js → phosphor-RMHZOW2O.js} +11 -3
  55. package/dist/phosphor-RMHZOW2O.js.map +1 -0
  56. package/dist/resizable.js +8 -7
  57. package/dist/resizable.js.map +1 -1
  58. package/dist/roots.css +10 -0
  59. package/dist/{tabler-YXXC7Y6B.js → tabler-MJVEYHA5.js} +11 -3
  60. package/dist/tabler-MJVEYHA5.js.map +1 -0
  61. package/dist/{use-pagination-DiJo0aW5.d.ts → use-pagination-BnKOnBdz.d.ts} +3 -0
  62. package/dist/virtualized.d.ts +1 -1
  63. package/dist/virtualized.js +6 -5
  64. package/dist/virtualized.js.map +1 -1
  65. package/package.json +29 -21
  66. package/dist/chunk-2PWGJ4PK.js.map +0 -1
  67. package/dist/chunk-4LDYR7QP.js.map +0 -1
  68. package/dist/chunk-6XAU44U4.js.map +0 -1
  69. package/dist/chunk-7TOJ4G7S.js.map +0 -1
  70. package/dist/chunk-CXMV7SXJ.js.map +0 -1
  71. package/dist/chunk-MV7JXWXK.js.map +0 -1
  72. package/dist/chunk-NCIZQYXQ.js.map +0 -1
  73. package/dist/chunk-SVP2IG4S.js.map +0 -1
  74. package/dist/feather-2JFSFLXN.js.map +0 -1
  75. package/dist/heroicons-4AQ4YBVG.js.map +0 -1
  76. package/dist/lucide-RZC2FEMS.js.map +0 -1
  77. package/dist/phosphor-CEN25FLM.js.map +0 -1
  78. package/dist/tabler-YXXC7Y6B.js.map +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # gridsmith-ui
2
2
 
3
- 103 React components with a CSS custom property theming engine, 13 chart components, and 5 icon packs.
3
+ React components and charts with a CSS custom property theming engine, and 5 icon packs.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,16 +18,17 @@ npm install recharts
18
18
 
19
19
  ### Heavy components (optional)
20
20
 
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:
21
+ Some components depend on large third-party libraries. They live in 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 \
25
25
  @tiptap/extension-code-block-lowlight @tiptap/extension-color @tiptap/extension-font-family \
26
- @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-link \
26
+ @tiptap/extension-highlight @tiptap/extension-image \
27
27
  @tiptap/extension-placeholder @tiptap/extension-subscript @tiptap/extension-superscript \
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
- @tiptap/extension-text-align @tiptap/extension-text-style @tiptap/extension-underline # gridsmith-ui/editor
30
+ @tiptap/extension-text-align @tiptap/extension-text-style # gridsmith-ui/editor
31
+ npm install @tiptap/extension-mention@<v> @tiptap/suggestion@<v> # gridsmith-ui/editor-mentions: <v> is your @tiptap/core version (npm ls @tiptap/core)
31
32
  npm install react-markdown remark-gfm # gridsmith-ui/chat
32
33
  npm install @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities # gridsmith-ui/kanban
33
34
  npm install @tanstack/react-table # gridsmith-ui/data-grid
@@ -78,9 +79,10 @@ preloadPack("lucide");
78
79
 
79
80
  | Import path | What it provides |
80
81
  |---|---|
81
- | `gridsmith-ui` | 96 components (actions, forms, data display, navigation, overlays, feedback, layout) |
82
+ | `gridsmith-ui` | Every component outside the entry points below (actions, forms, data display, navigation, overlays, feedback, layout) |
82
83
  | `gridsmith-ui/charts` | 13 chart components (Bar, Line, Area, Pie, Composite, Scatter, Radar, RadialBar, Funnel, Treemap, Sankey, Sparkline, ChartContainer) + `useChartColors` hook + `categoryKind()` |
83
84
  | `gridsmith-ui/editor` | `RichTextEditor` (requires the tiptap packages + `lowlight`) |
85
+ | `gridsmith-ui/editor-mentions` | `useMentions`, @mentions for `RichTextEditor` (requires `@tiptap/extension-mention` and `@tiptap/suggestion` at your other tiptap packages' version) |
84
86
  | `gridsmith-ui/chat` | `MarkdownContent` for chat replies; pass it to `ChatMessageList`'s `renderContent` (requires `react-markdown` + `remark-gfm`) |
85
87
  | `gridsmith-ui/kanban` | `KanbanBoard` (requires `@dnd-kit/*`) |
86
88
  | `gridsmith-ui/data-grid` | `DataGrid` (requires `@tanstack/react-table`) |
@@ -142,7 +144,7 @@ Wrap your app in `<IconProvider>` to select a pack:
142
144
  | `react` / `react-dom` | Yes (^19) |
143
145
  | `lucide-react` | Yes (the default icon pack and every pack's fallback) |
144
146
  | `recharts` | Optional (required for `gridsmith-ui/charts`) |
145
- | `@tiptap/*`, `lowlight` | Optional (required for `gridsmith-ui/editor`) |
147
+ | `@tiptap/*`, `lowlight` | Optional (required for `gridsmith-ui/editor`). The mention packages for `gridsmith-ui/editor-mentions` aren't declared: install them at your `@tiptap/core` version, as tiptap's packages must all be one version |
146
148
  | `react-markdown`, `remark-gfm` | Optional (required for `gridsmith-ui/chat`) |
147
149
  | `@dnd-kit/*` | Optional (required for `gridsmith-ui/kanban`) |
148
150
  | `@tanstack/react-table` | Optional (required for `gridsmith-ui/data-grid`) |
@@ -0,0 +1,8 @@
1
+ interface MentionSuggestion {
2
+ id: string;
3
+ label: string;
4
+ avatar?: string;
5
+ description?: string;
6
+ }
7
+
8
+ export type { MentionSuggestion as M };
package/dist/charts.d.ts CHANGED
@@ -22,6 +22,15 @@ declare function categoryKind(labels: ReadonlyArray<unknown>): CategoryKind;
22
22
 
23
23
  type XAxisInterval = number | "preserveStart" | "preserveEnd" | "preserveStartEnd" | "equidistantPreserveStart";
24
24
 
25
+ /**
26
+ * How a chart's values read (Sprint 25.17 A27, R28-50, P21). "number" (the default): plain numbers, compact on the axis
27
+ * from five digits up (1M, 750K; 1,234 as it is). "percent": values are percentages out of 100 (45 reads 45%; multiply a fraction by
28
+ * 100 first). "milliseconds": durations in ms (120 ms, 1.5 s, 2 min). "bytes": sizes in bytes, in the units of 1,000 the
29
+ * browser's own formats name (1.5 MB). A function formats both the axis and the tooltip itself. Everything is in the
30
+ * page's language (its `lang`, in the visitor's formats where they speak it: formatLocale).
31
+ */
32
+ type ValueFormat = "number" | "percent" | "milliseconds" | "bytes" | ((value: number) => string);
33
+
25
34
  interface BarDef {
26
35
  dataKey: string;
27
36
  label?: string;
@@ -68,6 +77,11 @@ interface BarChartProps {
68
77
  xAxisLabel?: string;
69
78
  /** The value axis's title, drawn horizontally above the axis. */
70
79
  yAxisLabel?: string;
80
+ /**
81
+ * How the values read: "number" (the default) is compact on the axis from five digits up, in the page's language (1M, 750K), and in full in
82
+ * the tooltip; "percent", "milliseconds" or "bytes" add their unit; a function formats both itself (Sprint 25.17 A27).
83
+ */
84
+ valueFormat?: ValueFormat;
71
85
  animated?: boolean;
72
86
  "aria-label"?: string;
73
87
  className?: string;
@@ -100,6 +114,11 @@ interface LineChartProps {
100
114
  xAxisLabel?: string;
101
115
  /** The value axis's title, drawn horizontally above the axis. */
102
116
  yAxisLabel?: string;
117
+ /**
118
+ * How the values read: "number" (the default) is compact on the axis from five digits up, in the page's language (1M, 750K), and in full in
119
+ * the tooltip; "percent", "milliseconds" or "bytes" add their unit; a function formats both itself (Sprint 25.17 A27).
120
+ */
121
+ valueFormat?: ValueFormat;
103
122
  animated?: boolean;
104
123
  "aria-label"?: string;
105
124
  className?: string;
@@ -132,6 +151,11 @@ interface AreaChartProps {
132
151
  xAxisLabel?: string;
133
152
  /** The value axis's title, drawn horizontally above the axis. */
134
153
  yAxisLabel?: string;
154
+ /**
155
+ * How the values read: "number" (the default) is compact on the axis from five digits up, in the page's language (1M, 750K), and in full in
156
+ * the tooltip; "percent", "milliseconds" or "bytes" add their unit; a function formats both itself (Sprint 25.17 A27).
157
+ */
158
+ valueFormat?: ValueFormat;
135
159
  animated?: boolean;
136
160
  "aria-label"?: string;
137
161
  className?: string;
@@ -198,6 +222,14 @@ interface CompositeChartProps {
198
222
  xAxisLabel?: string;
199
223
  /** The value axis's title, drawn horizontally above the axis. */
200
224
  yAxisLabel?: string;
225
+ /**
226
+ * How the bars' values read (and the lines', on one axis): "number" (the default) is compact on the axis, in the
227
+ * page's language (1M, 750K), and in full in the tooltip; "percent", "milliseconds" or "bytes" add their unit; a function
228
+ * formats both itself (Sprint 25.17 A27).
229
+ */
230
+ valueFormat?: ValueFormat;
231
+ /** How the lines' values read on their own axis (dualAxis), when their unit differs from the bars'. Default: valueFormat. */
232
+ lineValueFormat?: ValueFormat;
201
233
  animated?: boolean;
202
234
  "aria-label"?: string;
203
235
  className?: string;
@@ -222,6 +254,13 @@ interface ScatterChartProps {
222
254
  showGrid?: boolean;
223
255
  showTooltip?: boolean;
224
256
  showLegend?: boolean;
257
+ /**
258
+ * How the y values read: "number" (the default) is compact on the axis from five digits up, in the page's language (1M, 750K), and in full in
259
+ * the tooltip; "percent", "milliseconds" or "bytes" add their unit; a function formats both itself (Sprint 25.17 A27).
260
+ */
261
+ valueFormat?: ValueFormat;
262
+ /** How the x values read, as valueFormat. Default "number". */
263
+ xValueFormat?: ValueFormat;
225
264
  animated?: boolean;
226
265
  "aria-label"?: string;
227
266
  className?: string;
@@ -243,6 +282,8 @@ interface RadarChartProps {
243
282
  showTooltip?: boolean;
244
283
  showLegend?: boolean;
245
284
  animated?: boolean;
285
+ /** How the values read on the rings and in the tooltip; see ValueFormat (compact numbers by default). */
286
+ valueFormat?: ValueFormat;
246
287
  "aria-label"?: string;
247
288
  className?: string;
248
289
  }
@@ -358,4 +399,4 @@ declare function ChartContainer({ height, title, loading, emptyState, variant, c
358
399
 
359
400
  declare function useChartColors(count: number, soft?: boolean): string[];
360
401
 
361
- export { AreaChart, type AreaChartProps, type AreaDef, BarChart, type BarChartProps, type BarDef, ChartContainer, CompositeChart, type CompositeChartProps, FunnelChart, type FunnelChartProps, LineChart, type LineChartProps, type LineDef, PieChart, type PieChartProps, RadarChart, type RadarChartProps, type RadarDataKey, RadialBarChart, type RadialBarChartProps, SankeyChart, type SankeyChartProps, ScatterChart, type ScatterChartProps, type ScatterSeries, Sparkline, type SparklineProps, TreemapChart, type TreemapChartProps, type TreemapNode, categoryKind, useChartColors };
402
+ export { AreaChart, type AreaChartProps, type AreaDef, BarChart, type BarChartProps, type BarDef, ChartContainer, CompositeChart, type CompositeChartProps, FunnelChart, type FunnelChartProps, LineChart, type LineChartProps, type LineDef, PieChart, type PieChartProps, RadarChart, type RadarChartProps, type RadarDataKey, RadialBarChart, type RadialBarChartProps, SankeyChart, type SankeyChartProps, ScatterChart, type ScatterChartProps, type ScatterSeries, Sparkline, type SparklineProps, TreemapChart, type TreemapChartProps, type TreemapNode, type ValueFormat, categoryKind, useChartColors };