Skip to content

Commit 7f2ab7e

Browse files
committed
fix: resolve TypeScript error for @opencorestack/opengridx/styles import
- Add opengridx.css.d.ts type declaration stub for the ./styles subpath - Expand package.json exports[./styles] from a raw string to an object with a 'types' pointer, fixing 'Cannot find module' TS error - Update build:lib script to copy the .d.ts stub into dist/ on every build
1 parent 38a3e9f commit 7f2ab7e

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55

66
---
77

8+
## [0.1.4] — March 10, 2026 🐛
9+
10+
### Fixed
11+
- `import '@opencorestack/opengridx/styles'` now resolves correctly in TypeScript projects. The `./styles` subpath export in `package.json` now includes a `types` pointer to `dist/opengridx.css.d.ts`, eliminating the "Cannot find module" TS error.
12+
- `build:lib` script now copies `opengridx.css.d.ts` into `dist/` automatically so it's always included in published packages.
13+
14+
---
15+
816
## [0.1.3] — March 10, 2026 🐛✨
917

1018
### Added

lib/styles/opengridx.css.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Type declaration for @opencorestack/opengridx/styles
2+
// This is a CSS file — importing it applies the OpenGridX styles globally.
3+
declare const styles: never;
4+
export default styles;

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencorestack/opengridx",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"description": "OpenGridX: High-performance React data infrastructure. Unlock advanced Row Grouping, Excel Export, and Column Pinning without the usual \"Pro\" gatekeeping. Built for speed, scale, and complete architectural freedom. Fully open, virtualization-ready, and feature-complete.",
55
"type": "module",
66
"main": "./dist/opengridx.umd.js",
@@ -12,7 +12,10 @@
1212
"import": "./dist/opengridx.es.js",
1313
"require": "./dist/opengridx.umd.js"
1414
},
15-
"./styles": "./dist/opengridx.css"
15+
"./styles": {
16+
"types": "./dist/opengridx.css.d.ts",
17+
"default": "./dist/opengridx.css"
18+
}
1619
},
1720
"files": [
1821
"dist",
@@ -28,7 +31,7 @@
2831
"scripts": {
2932
"dev": "vite",
3033
"build": "tsc --project tsconfig.build.json && vite build",
31-
"build:lib": "tsc --project tsconfig.build.json && vite build --config vite.config.lib.js",
34+
"build:lib": "tsc --project tsconfig.build.json && vite build --config vite.config.lib.js && cp lib/styles/opengridx.css.d.ts dist/opengridx.css.d.ts",
3235
"lint": "eslint .",
3336
"preview": "vite preview",
3437
"prepublishOnly": "npm run build:lib"

0 commit comments

Comments
 (0)