@sentio/ui-dashboard 0.1.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.
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @sentio/ui-dashboard
2
+
3
+ Dashboard UI components for the Sentio platform. Sits one layer above
4
+ [`@sentio/ui-core`](../ui-core): it may depend on ui-core and on **dashboard
5
+ data-type contracts**, but it never makes network requests.
6
+
7
+ ## Design rules
8
+
9
+ - **No network requests / no data hooks.** All data comes in through props;
10
+ side effects are surfaced as callbacks (`onSave`, `onSearch`, `onNavigate`…).
11
+ - **No consumer data types.** Components type their props against the minimal
12
+ structural interfaces in `src/types` (e.g. `PanelLike`, `ChartLike`,
13
+ `DashboardLike`). A consumer passes its own (richer) data objects directly —
14
+ they are structurally assignable, so this package never needs to depend on
15
+ the consumer's data-type definitions.
16
+ - **Shared theme.** Reuses ui-core's Tailwind theme verbatim
17
+ (`tailwind.config.js` re-exports ui-core's). Theme CSS variables are provided
18
+ at runtime by ui-core's `style.css`.
19
+
20
+ ## Usage
21
+
22
+ ```tsx
23
+ import '@sentio/ui-core/dist/style.css'
24
+ import '@sentio/ui-dashboard/dist/style.css'
25
+
26
+ import type { PanelLike } from '@sentio/ui-dashboard'
27
+ ```
28
+
29
+ ## Type contracts
30
+
31
+ `src/types/*` are **minimal subsets** of the dashboard data model — only the
32
+ fields the components actually read. This keeps most upstream data-model
33
+ changes (new fields, new shapes) zero-sync for this package: components only
34
+ break when a field they actually depend on changes, which a consumer's own
35
+ type checker surfaces at its call sites.