diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md deleted file mode 100644 index 314f872..0000000 --- a/packages/components/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -# @ai-tui/components - -## 0.0.2 - -### Patch Changes - -- a324afb: Fixed build output - -## 0.0.1 - -### Patch Changes - -- 65e76cd: First automated bump diff --git a/packages/components/package.json b/packages/components/package.json deleted file mode 100644 index 276b03f..0000000 --- a/packages/components/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@ai-tui/components", - "version": "0.0.2", - "type": "module", - "imports": { - "#/*": "./src/*" - }, - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.mts", - "exports": { - ".": { - "import": { - "types": "./dist/index.d.mts", - "default": "./dist/index.mjs" - }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } - } - }, - "sideEffects": false, - "license": "MIT", - "files": [ - "dist/**" - ], - "scripts": { - "build": "tsdown", - "dev": "tsdown --watch", - "lint:package": "publint", - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist" - }, - "devDependencies": { - "@ai-tui/tsconfig": "workspace:*", - "@types/react": "^19", - "@types/react-dom": "^19", - "tsdown": "^0.20.1", - "typescript": "5.5.4" - }, - "dependencies": { - "react": "^19.0.0" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/components/src/index.tsx b/packages/components/src/index.tsx deleted file mode 100644 index 92a23b8..0000000 --- a/packages/components/src/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -/** biome-ignore-all lint/performance/noBarrelFile: It's the central export of a library so it is okay. */ - -export { toSlug } from "./to-slug.js"; -export { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js"; -export { usePrevious } from "./use-previous.js"; diff --git a/packages/components/src/to-slug.ts b/packages/components/src/to-slug.ts deleted file mode 100644 index 6aec61c..0000000 --- a/packages/components/src/to-slug.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Return a slugified copy of a string. - * - * @param {string} str The string to be slugified - * @return {string} The slugified string. - */ -export function toSlug(str: string): string { - let s = str; - if (!s) { - return ""; - } - s = s.toLowerCase().trim(); - s = s.replace(/ & /g, " and "); - s = s.replace(/[ ]+/g, "-"); - s = s.replace(/[-]+/g, "-"); - s = s.replace(/[^a-z0-9-]+/g, ""); - return s; -} diff --git a/packages/components/src/use-isomorphic-layout-effect.tsx b/packages/components/src/use-isomorphic-layout-effect.tsx deleted file mode 100644 index 1fdce12..0000000 --- a/packages/components/src/use-isomorphic-layout-effect.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { useLayoutEffect } from "react"; - -/** - * On the server, React emits a warning when calling `useLayoutEffect`. - * This is because neither `useLayoutEffect` nor `useEffect` run on the server. - * We use this safe version which suppresses the warning by replacing it with a noop on the server. - * - * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect - */ -const useIsomorphicLayoutEffect = - typeof window !== "undefined" ? useLayoutEffect : () => undefined; - -export { useIsomorphicLayoutEffect }; diff --git a/packages/components/src/use-previous.tsx b/packages/components/src/use-previous.tsx deleted file mode 100644 index 3a0590e..0000000 --- a/packages/components/src/use-previous.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { useEffect, useRef } from "react"; - -function usePrevious(value: T) { - // The ref object is a generic container whose current property is mutable ... - // ... and can hold any value, similar to an instance property on a class - const ref = useRef(value); - - // Store current value in ref - useEffect(() => { - ref.current = value; - }, [value]); // Only re-run if value changes - - // Return previous value (happens before update in useEffect above) - return ref.current; -} - -export { usePrevious }; diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json deleted file mode 100644 index d58fa83..0000000 --- a/packages/components/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "@ai-tui/tsconfig/react-library.json", - "include": ["."], - "exclude": ["dist", "build", "node_modules"], - "compilerOptions": { - "strictNullChecks": true - } -} diff --git a/packages/components/tsdown.config.ts b/packages/components/tsdown.config.ts deleted file mode 100644 index 54cea6e..0000000 --- a/packages/components/tsdown.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineConfig } from "tsdown"; - -export default defineConfig({ - entry: { - index: "src/index.tsx", - }, - format: ["cjs", "esm"], - external: ["react"], - dts: true, - clean: false, - target: false, -}); diff --git a/packages/components/turbo.json b/packages/components/turbo.json deleted file mode 100644 index 3e50dc8..0000000 --- a/packages/components/turbo.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "outputs": ["**/dist/**"] - } - } -}