@sheinx/hooks 3.10.2-beta.5 → 3.10.2-beta.6

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.
@@ -8,7 +8,7 @@ declare const useButton: (props?: BaseButtonProps) => {
8
8
  text?: boolean | undefined;
9
9
  outline?: boolean | undefined;
10
10
  type?: import("./use-button.type").ButtonType | undefined;
11
- size?: "small" | "default" | "large" | undefined;
11
+ size?: "small" | "large" | "default" | undefined;
12
12
  space?: boolean | undefined;
13
13
  shape?: import("./use-button.type").ButtonShape | undefined;
14
14
  buttonRef?: React.Ref<HTMLButtonElement> | undefined;
@@ -22,7 +22,7 @@ declare const useButton: (props?: BaseButtonProps) => {
22
22
  text?: boolean | undefined;
23
23
  outline?: boolean | undefined;
24
24
  type?: import("./use-button.type").ButtonType | undefined;
25
- size?: "small" | "default" | "large" | undefined;
25
+ size?: "small" | "large" | "default" | undefined;
26
26
  space?: boolean | undefined;
27
27
  shape?: import("./use-button.type").ButtonShape | undefined;
28
28
  buttonRef?: React.Ref<HTMLButtonElement> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"react-render.d.ts","sourceRoot":"","sources":["react-render.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AA6DF,QAAA,MAAM,IAAI,sBAAsB,CAAC;AAGjC,KAAK,aAAa,GAAG,CAAC,OAAO,GAAG,gBAAgB,CAAC,GAAG;IAClD,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAgBF,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,EAAE,aAAa,QAa7E;AAgBD,wBAAsB,YAAY,CAAC,SAAS,EAAE,aAAa,iBAY1D"}
1
+ {"version":3,"file":"react-render.d.ts","sourceRoot":"","sources":["react-render.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AA+DF,QAAA,MAAM,IAAI,sBAAsB,CAAC;AAGjC,KAAK,aAAa,GAAG,CAAC,OAAO,GAAG,gBAAgB,CAAC,GAAG;IAClD,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAgBF,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,EAAE,aAAa,QAa7E;AAgBD,wBAAsB,YAAY,CAAC,SAAS,EAAE,aAAa,iBAY1D"}
@@ -37,9 +37,15 @@ if (mainVersion >= 18 && typeof fullClone.createRoot === 'function') {
37
37
  var pendingQueue = null;
38
38
  if (!createRoot && mainVersion >= 18) {
39
39
  pendingQueue = [];
40
- Promise.resolve().then(function () {
41
- return _interopRequireWildcard(require('react-dom/client'));
42
- }).then(function (client) {
40
+ // 用字符串拼接绕过 webpack 静态分析,避免 React 17 下因 react-dom/client 不存在而构建报错
41
+ var clientModule = 'react-dom' + '/client';
42
+ (function (specifier) {
43
+ return new Promise(function (r) {
44
+ return r("".concat(specifier));
45
+ }).then(function (s) {
46
+ return _interopRequireWildcard(require(s));
47
+ });
48
+ })( /* webpackIgnore: true */clientModule).then(function (client) {
43
49
  createRoot = client.createRoot;
44
50
  }).catch(function () {
45
51
  // 不应走到这里,但安全降级
@@ -8,7 +8,7 @@ declare const useButton: (props?: BaseButtonProps) => {
8
8
  text?: boolean | undefined;
9
9
  outline?: boolean | undefined;
10
10
  type?: import("./use-button.type").ButtonType | undefined;
11
- size?: "small" | "default" | "large" | undefined;
11
+ size?: "small" | "large" | "default" | undefined;
12
12
  space?: boolean | undefined;
13
13
  shape?: import("./use-button.type").ButtonShape | undefined;
14
14
  buttonRef?: React.Ref<HTMLButtonElement> | undefined;
@@ -22,7 +22,7 @@ declare const useButton: (props?: BaseButtonProps) => {
22
22
  text?: boolean | undefined;
23
23
  outline?: boolean | undefined;
24
24
  type?: import("./use-button.type").ButtonType | undefined;
25
- size?: "small" | "default" | "large" | undefined;
25
+ size?: "small" | "large" | "default" | undefined;
26
26
  space?: boolean | undefined;
27
27
  shape?: import("./use-button.type").ButtonShape | undefined;
28
28
  buttonRef?: React.Ref<HTMLButtonElement> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"react-render.d.ts","sourceRoot":"","sources":["react-render.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AA6DF,QAAA,MAAM,IAAI,sBAAsB,CAAC;AAGjC,KAAK,aAAa,GAAG,CAAC,OAAO,GAAG,gBAAgB,CAAC,GAAG;IAClD,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAgBF,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,EAAE,aAAa,QAa7E;AAgBD,wBAAsB,YAAY,CAAC,SAAS,EAAE,aAAa,iBAY1D"}
1
+ {"version":3,"file":"react-render.d.ts","sourceRoot":"","sources":["react-render.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AA+DF,QAAA,MAAM,IAAI,sBAAsB,CAAC;AAGjC,KAAK,aAAa,GAAG,CAAC,OAAO,GAAG,gBAAgB,CAAC,GAAG;IAClD,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAgBF,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,EAAE,aAAa,QAa7E;AAgBD,wBAAsB,YAAY,CAAC,SAAS,EAAE,aAAa,iBAY1D"}
@@ -30,7 +30,9 @@ if (mainVersion >= 18 && typeof fullClone.createRoot === 'function') {
30
30
  var pendingQueue = null;
31
31
  if (!createRoot && mainVersion >= 18) {
32
32
  pendingQueue = [];
33
- import('react-dom/client').then(function (client) {
33
+ // 用字符串拼接绕过 webpack 静态分析,避免 React 17 下因 react-dom/client 不存在而构建报错
34
+ var clientModule = 'react-dom' + '/client';
35
+ import( /* webpackIgnore: true */clientModule).then(function (client) {
34
36
  createRoot = client.createRoot;
35
37
  }).catch(function () {
36
38
  // 不应走到这里,但安全降级
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/hooks",
3
- "version": "3.10.2-beta.5",
3
+ "version": "3.10.2-beta.6",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",