diff --git a/packages/emotion/package.json b/packages/emotion/package.json deleted file mode 100644 index 287b96c..0000000 --- a/packages/emotion/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@r2wc/emotion", - "version": "0.1.0", - "description": "Easily integrate Emotion with R2WC.", - "homepage": "https://www.bitovi.com/open-source/react-to-web-component", - "author": "Bitovi", - "license": "MIT", - "keywords": [ - "React", - "Web Component", - "Emotion" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/bitovi/react-to-web-component.git" - }, - "type": "module", - "main": "./dist/emotion.cjs", - "module": "./dist/emotion.js", - "types": "./dist/emotion.d.ts", - "exports": { - ".": { - "require": "./dist/emotion.cjs", - "import": "./dist/emotion.js", - "types": "./dist/emotion.d.ts" - }, - "./package.json": "./package.json" - }, - "files": [ - "dist", - "src" - ], - "scripts": { - "typecheck": "tsc --noEmit", - "eslint": "eslint .", - "prettier": "prettier --check .", - "depcheck": "depcheck .", - "dev": "vite", - "test": "vitest", - "test:ci": "vitest run", - "test:coverage": "vitest run --coverage", - "clean": "rm -rf tsconfig.tsbuildinfo dist", - "build": "vite build" - }, - "dependencies": { - "@r2wc/core": "^1.0.1" - }, - "devDependencies": { - "@emotion/cache": "^11.11.0", - "@emotion/react": "^11.11.1", - "@types/react": "^18.0.0", - "@types/react-dom": "^18.0.0" - }, - "peerDependencies": { - "@emotion/cache": "^11.0.0", - "@emotion/react": "^11.0.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" - } -} diff --git a/packages/emotion/src/emotion.test.tsx b/packages/emotion/src/emotion.test.tsx deleted file mode 100644 index 9f07e5d..0000000 --- a/packages/emotion/src/emotion.test.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import matchers from "@testing-library/jest-dom/matchers" -import { describe, it, expect } from "vitest" - -// import { withCacheProvider } from "./emotion" - -expect.extend(matchers) - -describe("@r2wc/emotion", () => { - it.todo("works") -}) diff --git a/packages/emotion/src/emotion.tsx b/packages/emotion/src/emotion.tsx deleted file mode 100644 index 77ccd7f..0000000 --- a/packages/emotion/src/emotion.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import createCache from "@emotion/cache" -import { CacheProvider } from "@emotion/react" -import { useMemo } from "react" - -import { R2WCBaseProps } from "@r2wc/core" - -export function withCacheProvider( - Component: React.ComponentType, - key: string = "rtwc", -): React.FC { - const ComponentWithStyleProvider: React.FC = ({ - container, - ...props - }) => { - const cache = useMemo(() => createCache({ key, container }), [container]) - - return ( - - - - ) - } - - return ComponentWithStyleProvider -} diff --git a/packages/emotion/tsconfig.json b/packages/emotion/tsconfig.json deleted file mode 100644 index 19ac5f0..0000000 --- a/packages/emotion/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.react.json", - "include": ["src"] -} diff --git a/packages/emotion/vite.config.ts b/packages/emotion/vite.config.ts deleted file mode 100644 index 30d8299..0000000 --- a/packages/emotion/vite.config.ts +++ /dev/null @@ -1,35 +0,0 @@ -/// -import react from "@vitejs/plugin-react" -import { defineConfig } from "vite" -import dts from "vite-plugin-dts" - -// https://vitejs.dev/config/ -export default defineConfig({ - build: { - lib: { - entry: "src/emotion.tsx", - formats: ["es", "cjs"], - }, - rollupOptions: { - external: [ - "react", - "@emotion/cache", - "@emotion/react", - "react/jsx-runtime", - "@r2wc/core", - ], - }, - }, - plugins: [ - dts({ - exclude: ["src/**/*.test.*"], - rollupTypes: true, - }), - react(), - ], - test: { - environment: "jsdom", - restoreMocks: true, - mockReset: true, - }, -})