@quantumwake/terminal-ux-dashboard-components 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/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/index.cjs +1807 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +477 -0
- package/dist/index.d.ts +477 -0
- package/dist/index.js +1772 -0
- package/dist/index.js.map +1 -0
- package/package.json +77 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 QuantumWake OU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @quantumwake/terminal-ux-dashboard-components
|
|
2
|
+
|
|
3
|
+
Dashboard, chart-builder and SQL-runner React components for the Alethic ISM apps.
|
|
4
|
+
|
|
5
|
+
These components are **capability-injected**: they never import a store or an API
|
|
6
|
+
client. The host wires concrete functions (query / save / load / search / …) via
|
|
7
|
+
`<DashboardProvider>`, and the components call them through `useDashboard()`.
|
|
8
|
+
|
|
9
|
+
`alethic-ism-ui-enterprise` (the studio) is the **source of truth** for all
|
|
10
|
+
dashboard capability. The published viewer (`alethic-ism-publish-ui`) provides
|
|
11
|
+
only `theme` + `runQuery` (DuckDB-WASM), so the studio-only verbs — **save,
|
|
12
|
+
edit, load, search, AI analyze/refine** — are simply not wired and their
|
|
13
|
+
affordances disappear. One component tree, two hosts, differences injected.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { DashboardProvider } from '@quantumwake/terminal-ux-dashboard-components';
|
|
19
|
+
|
|
20
|
+
// Studio (ui-enterprise): wire everything.
|
|
21
|
+
<DashboardProvider
|
|
22
|
+
theme={theme}
|
|
23
|
+
runQuery={(sql, stateId) => store.runStateFsQuery(sql, undefined, stateId)}
|
|
24
|
+
saveDashboard={store.saveDashboard}
|
|
25
|
+
listDashboards={store.listSavedDashboards}
|
|
26
|
+
loadDashboard={store.loadDashboard}
|
|
27
|
+
deleteDashboard={store.deleteSavedDashboard}
|
|
28
|
+
analyzeDataset={store.analyzeStateFsDataset}
|
|
29
|
+
refineDashboard={store.refineDashboard}
|
|
30
|
+
removePanel={store.removeDashboardPanel}
|
|
31
|
+
>
|
|
32
|
+
{/* ChartBuilder, DashboardRenderer, SqlConsole, DataExplorer */}
|
|
33
|
+
</DashboardProvider>
|
|
34
|
+
|
|
35
|
+
// Published viewer (publish-ui): read-only — theme + runQuery only.
|
|
36
|
+
<DashboardProvider theme={theme} runQuery={(sql, stateId) => runQuery(shareId, stateId!, sql)}>
|
|
37
|
+
{/* same components, no save/edit/load affordances */}
|
|
38
|
+
</DashboardProvider>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`runQuery(sql, stateId)` must return `{ columns, rows }`, executing `sql` against
|
|
42
|
+
a view named `data` over the state's dataset (studio → statefs-node `/query`;
|
|
43
|
+
viewer → DuckDB-WASM `read_parquet`).
|
|
44
|
+
|
|
45
|
+
## Status
|
|
46
|
+
|
|
47
|
+
- ✅ Capability contract (`DashboardProvider` / `useDashboard` / `useCapabilities`)
|
|
48
|
+
- ✅ Pure utilities: `sqlgen`, `chartStyle`
|
|
49
|
+
- ⏳ Components (migrating from ui-enterprise, in tranches): views/, `SqlConsole`,
|
|
50
|
+
`ChartBuilder`, `DashboardRenderer`, `DataExplorer`
|
|
51
|
+
|
|
52
|
+
## Build
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
npm install
|
|
56
|
+
npm run build # tsup → dist (esm + cjs + d.ts)
|
|
57
|
+
npm run lint # tsc --noEmit
|
|
58
|
+
```
|
|
59
|
+
# terminal-ux-dashboard-components
|