From 0092d9b01c802d33c2e4d8442fb2491a572597ff Mon Sep 17 00:00:00 2001 From: Cali Castle Date: Wed, 26 Oct 2022 12:05:53 +0800 Subject: [PATCH 1/2] feat: add LayoutProps and LayoutComponent types --- packages/react/CHANGELOG.md | 6 ++++++ packages/react/package.json | 10 +++++----- packages/react/src/types.d.ts | 17 +++++++++-------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index a9bd35e..f891730 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @zolplay/react +## 0.5.0 + +### Minor Changes + +- Add LayoutProps and LayoutComponent types + ## 0.4.1 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 59cc484..8e7b89b 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@zolplay/react", - "version": "0.4.1", + "version": "0.5.0", "main": "dist/index.js", "types": "dist/index.d.ts", "module": "dist/index.mjs", @@ -23,8 +23,8 @@ "@zolplay/config": "workspace:*", "@zolplay/utils": "workspace:*", "nanoid": "^3.0.0", - "react": "^18.0.0", - "react-dom": "^18.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", "string-hash": "^1.1.3", "tinycolor2": "^1.4.2" }, @@ -41,7 +41,7 @@ "vite": "^3.1.8" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.2.0", + "react-dom": "^18.2.0" } } diff --git a/packages/react/src/types.d.ts b/packages/react/src/types.d.ts index 1fc4b84..b36404a 100644 --- a/packages/react/src/types.d.ts +++ b/packages/react/src/types.d.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/ban-types */ import type { FC, PropsWithChildren } from 'react' // CSS custom variables @@ -7,16 +8,16 @@ declare module 'react' { } } -// eslint-disable-next-line @typescript-eslint/ban-types -export type Component

= FC< - PropsWithChildren< - { - className?: string - } & P - > +export type ComponentProps

= PropsWithChildren< + { + className?: string + } & P > +export type Component

= FC> -// eslint-disable-next-line @typescript-eslint/ban-types export type PrimitiveComponent

= Component< P & { as?: keyof JSX.IntrinsicElements } > + +export type LayoutProps

= PropsWithChildren

+export type LayoutComponent

= FC> From 479115b4feed017a4540958c4d703494b05c1879 Mon Sep 17 00:00:00 2001 From: Cali Castle Date: Wed, 26 Oct 2022 12:07:19 +0800 Subject: [PATCH 2/2] fix: pnpm lock --- pnpm-lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c9ba4ad..d3fe057 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -94,8 +94,8 @@ importers: '@zolplay/utils': workspace:* jsdom: ^20.0.1 nanoid: ^3.0.0 - react: ^18.0.0 - react-dom: ^18.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 string-hash: ^1.1.3 tinycolor2: ^1.4.2 typescript: ^4.8.4