@cristianmpx/react-import-sheet-headless 1.0.1 → 1.0.2

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 (2) hide show
  1. package/README.md +67 -0
  2. package/package.json +20 -3
package/README.md CHANGED
@@ -12,6 +12,73 @@ npm install @cristianmpx/react-import-sheet-headless
12
12
 
13
13
  **Peer dependencies:** React 18+ (`react` and `react-dom`).
14
14
 
15
+ ### ⚙️ Framework Setup
16
+
17
+ **Important:** Web Workers require specific configuration depending on your framework. See [FRAMEWORK-SETUP.md](./FRAMEWORK-SETUP.md) for detailed instructions.
18
+
19
+ **Quick config:**
20
+
21
+ <details>
22
+ <summary><strong>Vite + React</strong></summary>
23
+
24
+ ```typescript
25
+ // vite.config.ts
26
+ export default defineConfig({
27
+ optimizeDeps: {
28
+ exclude: ['@cristianmpx/react-import-sheet-headless'],
29
+ },
30
+ worker: {
31
+ format: 'es',
32
+ },
33
+ });
34
+ ```
35
+
36
+ </details>
37
+
38
+ <details>
39
+ <summary><strong>Next.js</strong></summary>
40
+
41
+ ```javascript
42
+ // next.config.js
43
+ module.exports = {
44
+ webpack: (config, { isServer }) => {
45
+ if (!isServer) {
46
+ config.module.rules.push({
47
+ test: /\.worker\.js$/,
48
+ use: { loader: 'worker-loader' },
49
+ });
50
+ }
51
+ return config;
52
+ },
53
+ };
54
+ ```
55
+
56
+ **Important:** Use `dynamic` import with `ssr: false`:
57
+
58
+ ```typescript
59
+ const Importer = dynamic(() => import('./Importer'), { ssr: false });
60
+ ```
61
+
62
+ </details>
63
+
64
+ <details>
65
+ <summary><strong>Storybook</strong></summary>
66
+
67
+ ```typescript
68
+ // .storybook/main.ts
69
+ async viteFinal(config) {
70
+ config.optimizeDeps = {
71
+ exclude: ['@cristianmpx/react-import-sheet-headless'],
72
+ };
73
+ config.worker = { format: 'es' };
74
+ return config;
75
+ }
76
+ ```
77
+
78
+ </details>
79
+
80
+ See [FRAMEWORK-SETUP.md](./FRAMEWORK-SETUP.md) for CRA, Remix, and Webpack configurations.
81
+
15
82
  ## Why Headless
16
83
 
17
84
  Bring your own components; we provide the logic, Web Worker performance, and bulk validation. No prebuilt `<Table />`—you own the UI and the UX.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cristianmpx/react-import-sheet-headless",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Headless component for React Import Sheet",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,7 +23,11 @@
23
23
  "lint": "eslint .",
24
24
  "publish": "npm run test && npm run build && npm publish --access public",
25
25
  "prepare": "husky",
26
- "commit": "cz"
26
+ "commit": "cz",
27
+ "verify": "node scripts/verify-package.js",
28
+ "diagnose": "node scripts/diagnose-installation.js",
29
+ "prebuild": "node scripts/verify-package.js || true",
30
+ "postbuild": "node scripts/verify-package.js"
27
31
  },
28
32
  "config": {
29
33
  "commitizen": {
@@ -64,10 +68,23 @@
64
68
  "react",
65
69
  "import",
66
70
  "sheet",
67
- "headless"
71
+ "headless",
72
+ "csv",
73
+ "excel",
74
+ "xlsx",
75
+ "validation",
76
+ "web-workers"
68
77
  ],
69
78
  "author": "Cristian Marin",
70
79
  "license": "MIT",
80
+ "repository": {
81
+ "type": "git",
82
+ "url": "https://github.com/cristianm-developer/react-import-sheet-headless.git"
83
+ },
84
+ "bugs": {
85
+ "url": "https://github.com/cristianm-developer/react-import-sheet-headless/issues"
86
+ },
87
+ "homepage": "https://github.com/cristianm-developer/react-import-sheet-headless#readme",
71
88
  "lint-staged": {
72
89
  "src/**/*.{ts,tsx,js,jsx}": [
73
90
  "eslint --fix",