Convert app into @modernsk/ui component library package

- Add library entry (src/index.ts) re-exporting all components, theme,
  and TooltipProvider
- Add shippable stylesheet (src/styles/index.css): tokens + components
  only, font inlined as base64 at build time
- Build with tsup (ESM + CJS + .d.ts) and esbuild for CSS
- package.json: exports map, files, sideEffects, peerDependencies
  (react/react-dom), correct deps (radix-ui), prepare-on-install
- Fix phantom dependency: declare radix-ui, drop unused @radix-ui/themes
- Remove Storybook boilerplate, Tailwind/PostCSS (unused)
- Keep App.tsx + Rsbuild as dev-only playground (not published)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 23:14:34 +03:00
commit 01d41c2346
24 changed files with 7390 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
{
"name": "@modernsk/ui",
"version": "0.1.0",
"description": "ModernSK — tactile, dark-first React component library built on Radix primitives.",
"license": "MIT",
"type": "module",
"sideEffects": [
"**/*.css"
],
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./styles.css": "./dist/styles.css"
},
"files": [
"dist"
],
"scripts": {
"build": "tsup && npm run build:css",
"build:css": "esbuild src/styles/index.css --bundle --loader:.ttf=dataurl --outfile=dist/styles.css",
"dev": "rsbuild dev --open",
"preview": "rsbuild preview",
"lint": "rslint",
"format": "prettier --write .",
"prepare": "npm run build"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
},
"dependencies": {
"@phosphor-icons/react": "^2.1.10",
"radix-ui": "^1.4.3"
},
"devDependencies": {
"@rsbuild/core": "^2.0.7",
"@rsbuild/plugin-babel": "^1.2.0",
"@rsbuild/plugin-react": "^2.0.0",
"@rslint/core": "^0.5.1",
"@types/react": "^19.2.15",
"@types/react-dom": "^19.2.3",
"babel-plugin-react-compiler": "^1.0.0",
"esbuild": "^0.25.0",
"prettier": "^3.8.3",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"tsup": "^8.5.0",
"typescript": "^6.0.3"
}
}