Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@
},
"files": [
"dist",
"recce-source",
"src",
"README.md"
],
"scripts": {
"dev": "tsdown --watch",
"build": "tsdown",
"build": "tsdown && node scripts/create-styles.js",
"type:check": "tsc --noEmit 2>&1 | grep -E '^src/' || echo 'Type check passed (OSS errors filtered)'",
"type:check:strict": "tsc --noEmit",
"type:check:all": "tsc --noEmit",
Expand Down
22 changes: 22 additions & 0 deletions scripts/create-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');

// Find all bundled CSS files (tsdown generates hashed names like components-D2DRqJsz.css)
const distDir = path.join(__dirname, '../dist');
const cssFiles = fs.readdirSync(distDir)
.filter(f => f.endsWith('.css') && !f.startsWith('styles'))
.map(f => `./${f}`);

// Create styles.css that imports all component CSS
const importsContent = cssFiles
.map(f => `@import '${f}';`)
.join('\n');

fs.writeFileSync(
path.join(distDir, 'styles.css'),
importsContent,
'utf-8'
);

console.log('✓ Created dist/styles.css with', cssFiles.length, 'CSS imports');
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export * from "./components";
export * from "./api";
export * from "./hooks";
export * from "./types";
export * from "./theme";

// Export a version constant
export const VERSION = "0.1.0";
13 changes: 13 additions & 0 deletions src/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @datarecce/ui - Theme Exports
*
* Exports MUI themes for light and dark modes.
* These themes can be used in applications to ensure consistent
* styling across Recce components.
*/

// Export the light and dark themes from the mui-theme file
export { lightTheme, darkTheme, muiTheme } from "../recce-source/js/src/components/ui/mui-theme";

Check failure on line 10 in src/theme/index.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Cannot find module '../recce-source/js/src/components/ui/mui-theme' or its corresponding type declarations.

Check failure on line 10 in src/theme/index.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Cannot find module '../recce-source/js/src/components/ui/mui-theme' or its corresponding type declarations.

Check failure on line 10 in src/theme/index.ts

View workflow job for this annotation

GitHub Actions / build (24.x)

Cannot find module '../recce-source/js/src/components/ui/mui-theme' or its corresponding type declarations.

// Export theme-related types and utilities
export type { Theme } from "@mui/material/styles";
Loading