@kronor/dtv 0.3.1 → 0.4.1
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 +27 -0
- package/package.json +12 -2
package/README.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
This project is a React + TypeScript monorepo for building schema-driven, declarative table views with advanced filtering, data fetching, and AI-assisted filter generation.
|
|
4
4
|
|
|
5
|
+
## Library Consumption
|
|
6
|
+
|
|
7
|
+
You can consume the `App` component as a library bundle with embedded styles (Tailwind + PrimeReact + PrimeIcons + PrimeFlex) without importing separate CSS files.
|
|
8
|
+
|
|
9
|
+
### Build the library
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm run build:lib
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Outputs:
|
|
16
|
+
- `dist/index.es.js` (ES module bundle with runtime-injected CSS)
|
|
17
|
+
- `dist/types` (Type declarations, root `index.d.ts`)
|
|
18
|
+
|
|
19
|
+
### Import in your application
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { App } from '@kronor/dtv';
|
|
23
|
+
import type { AppProps } from '@kronor/dtv';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
All required styles are injected automatically via the JS bundle (using `vite-plugin-css-injected-by-js`).
|
|
27
|
+
|
|
28
|
+
### Peer Dependencies
|
|
29
|
+
|
|
30
|
+
React and ReactDOM 19 are peer dependencies; ensure they are installed in the host project.
|
|
31
|
+
|
|
5
32
|
## Project Overview
|
|
6
33
|
- **Framework:** React, TypeScript, Vite
|
|
7
34
|
- **Testing:** Jest (unit), Playwright (E2E)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kronor/dtv",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -9,12 +9,21 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"dev": "vite",
|
|
11
11
|
"build": "tsc -b && vite build",
|
|
12
|
+
"build:lib": "tsc -p tsconfig.lib.json && vite build --config vite.lib.config.ts",
|
|
12
13
|
"lint": "eslint .",
|
|
13
14
|
"preview": "vite preview",
|
|
14
15
|
"test": "playwright test",
|
|
15
16
|
"test-unit": "jest",
|
|
16
17
|
"prepare": "husky"
|
|
17
18
|
},
|
|
19
|
+
"exports": {
|
|
20
|
+
"import": "./dist/index.es.js",
|
|
21
|
+
"types": "./dist/types/App.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": "^19.0.0",
|
|
25
|
+
"react-dom": "^19.0.0"
|
|
26
|
+
},
|
|
18
27
|
"dependencies": {
|
|
19
28
|
"graphql-request": "^7.1.2",
|
|
20
29
|
"primeflex": "^4.0.0",
|
|
@@ -44,6 +53,7 @@
|
|
|
44
53
|
"ts-jest": "^29.4.0",
|
|
45
54
|
"typescript": "~5.7.2",
|
|
46
55
|
"typescript-eslint": "^8.24.1",
|
|
47
|
-
"vite": "^6.2.0"
|
|
56
|
+
"vite": "^6.2.0",
|
|
57
|
+
"vite-plugin-css-injected-by-js": "^3.5.2"
|
|
48
58
|
}
|
|
49
59
|
}
|