@wwog/react 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import React$1, { FC as FC$1, ReactNode } from 'react';
1
+ import React$1, { FC, ReactNode } from 'react';
2
2
 
3
3
  interface SwitchProps<T> {
4
4
  value: T;
@@ -66,9 +66,9 @@ interface ElseIfProps {
66
66
  declare const If: {
67
67
  ({ condition, children, }: IfProps): React$1.ReactElement | null;
68
68
  displayName: string;
69
- Then: FC<ThenProps>;
70
- ElseIf: FC<ElseIfProps>;
71
- Else: FC<ElseProps>;
69
+ Then: React$1.FC<ThenProps>;
70
+ ElseIf: React$1.FC<ElseIfProps>;
71
+ Else: React$1.FC<ElseProps>;
72
72
  createTyped(): {
73
73
  If: (props: IfProps) => React$1.ReactElement | null;
74
74
  Then: (props: ThenProps) => React$1.ReactElement;
@@ -88,7 +88,7 @@ interface SizeBoxProps {
88
88
  /**
89
89
  * @description SizeBox 组件用于设置一个固定大小的盒子
90
90
  */
91
- declare const SizeBox: FC$1<SizeBoxProps>;
91
+ declare const SizeBox: FC<SizeBoxProps>;
92
92
 
93
93
  interface ArrayRenderProps<T> {
94
94
  items: T[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwog/react",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "wwog",
@@ -24,11 +24,17 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@biomejs/biome": "^1.9.4",
27
+ "@types/react": "^19.1.2",
28
+ "@types/react-dom": "^19.1.2",
27
29
  "@vitest/coverage-v8": "^3.1.1",
28
30
  "typescript": "^5.8.3",
29
31
  "unbuild": "^3.5.0",
30
32
  "vitest": "^3.1.1"
31
33
  },
34
+ "peerDependencies": {
35
+ "react": ">=16.8.0",
36
+ "react-dom": ">=16.8.0"
37
+ },
32
38
  "engines": {
33
39
  "node": ">= 20.0.0",
34
40
  "pnpm": ">=8.15.0"
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
-
3
2
  /**
4
3
  * @description 性能优化,替代 React.Children.forEach, 回调可以返回 false 来中断循环
5
4
  * @description_en Replace React.Children.forEach, the callback can return false to interrupt the loop