Skip to content

Commit

Permalink
feat: new extension vike-react-chakra
Browse files Browse the repository at this point in the history
  • Loading branch information
phonzammi committed Nov 4, 2024
1 parent 2883eb8 commit f7b00ae
Show file tree
Hide file tree
Showing 8 changed files with 1,979 additions and 10 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"overrides": {
"vike-react": "link:./packages/vike-react/",
"vike-react-query": "link:./packages/vike-react-query/",
"vike-react-apollo": "link:./packages/vike-react-apollo/"
"vike-react-apollo": "link:./packages/vike-react-apollo/",
"vike-react-chakra": "link:./packages/vike-react-chakra/"
}
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/vike-react-chakra/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules/
/dist/
1 change: 1 addition & 0 deletions packages/vike-react-chakra/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO
10 changes: 10 additions & 0 deletions packages/vike-react-chakra/integration/+config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export { config as default }
import type { Config } from 'vike/types'

const config = {
name: 'vike-react-chakra',
require: {
'vike-react': '>=0.4.13',
},
Wrapper: 'import:vike-react-chakra/__internal/integration/Wrapper:Wrapper',
} satisfies Config
8 changes: 8 additions & 0 deletions packages/vike-react-chakra/integration/Wrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export { Wrapper }

import React, { ReactNode } from "react";
import { ChakraProvider, defaultSystem } from "@chakra-ui/react";

function Wrapper({ children }: { children: ReactNode }) {
return <ChakraProvider value={defaultSystem}>{children}</ChakraProvider>
}
47 changes: 47 additions & 0 deletions packages/vike-react-chakra/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "vike-react-chakra",
"version": "0.0.1",
"type": "module",
"exports": {
"./config": "./dist/integration/+config.js",
"./__internal/integration/Wrapper": "./dist/integration/Wrapper.js"
},
"scripts": {
"dev": "tsc --watch",
"build": "rimraf dist/ && tsc"
},
"peerDependencies": {
"@chakra-ui/react": ">=3",
"@emotion/react": ">=11",
"react": ">=18.0.0",
"vike-react": ">=0.4.13"
},
"devDependencies": {
"@chakra-ui/react": "^3.0.2",
"@emotion/react": "^11.13.3",
"@types/node": "^20.11.17",
"@types/react": "^18.2.55",
"jsdom": "^24.0.0",
"react": "^18.3.1",
"rimraf": "^5.0.5",
"typescript": "^5.5.3",
"vike": "^0.4.197",
"vike-react": "^0.5.7",
"vite": "^5.4.0"
},
"typesVersions": {
"*": {
"config": [
"dist/integration/+config.d.ts"
],
"__internal/integration/Wrapper": [
"dist/integration/Wrapper.d.ts"
]
}
},
"files": [
"dist"
],
"repository": "github:vikejs/vike-react",
"license": "MIT"
}
24 changes: 24 additions & 0 deletions packages/vike-react-chakra/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"outDir": "./dist/",
// Resolution
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
// Libs
"lib": ["ES2021", "DOM", "DOM.Iterable"],
"types": ["vite/client", "vike-react"],
// Strictness
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitAny": true,
// Output
"declaration": true,
"noEmitOnError": false,
"rootDir": "./",
// Misc
"esModuleInterop": true,
"skipLibCheck": true,
"jsx": "react"
}
}
Loading

0 comments on commit f7b00ae

Please sign in to comment.