diff --git a/src/packages/utils/shared/.gitignore b/src/packages/utils/shared/.gitignore index 0b62d33..73ac1e6 100644 --- a/src/packages/utils/shared/.gitignore +++ b/src/packages/utils/shared/.gitignore @@ -1,43 +1,42 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz +node_modules -# testing -/coverage +# build +dist +dist-ssr +build +out +*.tsbuildinfo -# next.js -/.next/ -/out/ +# testing & coverage +coverage +coverage-ts -# production -/build -/dist +# env +.env -# misc -.DS_Store +# Editor directories and files +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +*.local *.pem +.idea +.todo +.DS_Store -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env -.env*.local - -# turbo +# vendors .turbo - -# vercel .vercel -# typescript -*.tsbuildinfo - -# coverage-ts -coverage-ts +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* diff --git a/src/packages/utils/shared/CHANGELOG.md b/src/packages/utils/shared/CHANGELOG.md index eee356b..3fd0dba 100644 --- a/src/packages/utils/shared/CHANGELOG.md +++ b/src/packages/utils/shared/CHANGELOG.md @@ -10,4 +10,17 @@ ### Patch changes -- Add and export getOptionalObject and mergeProps utility functions +- Add getOptionalObject and mergeProps utility functions + +## 0.2.6 + +### Patch changes + +- Add color & simplify types + +## 0.2.7 + +### Patch changes + +- Add render prop utility, used to return a node or call a function with it's arguments which returns a node +- Add exclusive union type diff --git a/src/packages/utils/shared/package.json b/src/packages/utils/shared/package.json index 7ac8c10..3b95e3c 100644 --- a/src/packages/utils/shared/package.json +++ b/src/packages/utils/shared/package.json @@ -1,52 +1,50 @@ { - "author": { - "email": "lovro.zagar5@gmail.com", - "name": "Lovro Žagar" - }, - "dependencies": { - "@radix-ui/react-polymorphic": "0.0.14", - "class-variance-authority": "^0.7.0", - "tailwind-merge": ">=2.5.4" - }, - "devDependencies": { - "bunchee": "^5.5.1", - "react": "19.0.0-rc-a960b92c-20240819", - "react-dom": "19.0.0-rc-a960b92c-20240819", - "types-react": "^19.0.0-rc.1", - "types-react-dom": "^19.0.0-rc.1", - "typescript": "^5.5.4" - }, - "exports": { - ".": { - "import": { - "default": "./dist/index.js", - "types": "./dist/index.d.ts" - } - } - }, - "files": [ - "dist" - ], - "license": "MIT", - "main": "./dist/index.js", - "module": "./dist/index.js", - "name": "@renderui/utils", - "peerDependencies": { - "react": ">=18", - "react-dom": ">=18" - }, - "private": false, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/lovrozagar/renderui.git" - }, - "scripts": { - "build": "bunchee -m" - }, - "type": "module", - "types": "./dist/index.d.ts", - "version": "0.2.6" -} \ No newline at end of file + "author": { + "email": "lovro.zagar5@gmail.com", + "name": "Lovro Žagar" + }, + "dependencies": { + "@radix-ui/react-polymorphic": "0.0.14", + "class-variance-authority": "^0.7.0", + "tailwind-merge": ">=2.5.4" + }, + "devDependencies": { + "bunchee": "^5.5.1", + "react": "19.0.0-rc-a960b92c-20240819", + "react-dom": "19.0.0-rc-a960b92c-20240819", + "types-react": "^19.0.0-rc.1", + "types-react-dom": "^19.0.0-rc.1", + "typescript": "^5.5.4" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": ["dist"], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist/index.js", + "name": "@renderui/utils", + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "private": false, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/lovrozagar/renderui.git" + }, + "scripts": { + "build": "bunchee -m" + }, + "type": "module", + "types": "./dist/index.d.ts", + "version": "0.2.7" +} diff --git a/src/packages/utils/shared/src/index.ts b/src/packages/utils/shared/src/index.ts index db25719..5f9d983 100644 --- a/src/packages/utils/shared/src/index.ts +++ b/src/packages/utils/shared/src/index.ts @@ -1,5 +1,6 @@ export { chain } from "./chain/chain" export { cn, type CnOptions } from "./cn/cn" +export type { Color } from "./color/color" export { composeEventHandlers } from "./compose-event-handlers/compose-event-handlers" export { cva, type VariantProps } from "./cva/cva" export { cx, type CxOptions } from "./cx/cx" @@ -11,5 +12,5 @@ export { export { mergeProps } from "./merge-props/merge-props" export { noop } from "./noop/noop" export { polymorphic, type PolymorphicProps } from "./polymorphic/polymorphic" -export type { Color } from "./color/color" +export { renderProp } from "./render-prop/render-prop" export type { Simplify } from "./simplify/simplify" diff --git a/src/packages/utils/shared/tsconfig.json b/src/packages/utils/shared/tsconfig.json index 9bcd127..d2db219 100644 --- a/src/packages/utils/shared/tsconfig.json +++ b/src/packages/utils/shared/tsconfig.json @@ -1,4 +1,4 @@ { - "extends": "../../../../tsconfig.json", - "include": ["src", "index.ts"] + "extends": "../../../../tsconfig.json", + "include": ["src"] }