foxact 0.2.19 → 0.2.20

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.
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react");exports.ComposeContextProvider=r=>{let{contexts:t,children:o}=r;return t.reduceRight((r,t)=>e.cloneElement(t,{children:r}),o)};
@@ -0,0 +1,8 @@
1
+ import * as react from 'react';
2
+
3
+ interface ContextComposeProviderProps extends React.PropsWithChildren {
4
+ contexts: React.ReactElement[];
5
+ }
6
+ declare const ComposeContextProvider: ({ contexts, children }: ContextComposeProviderProps) => react.ReactNode;
7
+
8
+ export { ComposeContextProvider, ContextComposeProviderProps };
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react");exports.ComposeContextProvider=r=>{let{contexts:t,children:o}=r;return t.reduceRight((r,t)=>e.cloneElement(t,{children:r}),o)};
@@ -0,0 +1 @@
1
+ import{cloneElement as e}from"react";let r=r=>{let{contexts:t,children:o}=r;return t.reduceRight((r,t)=>e(t,{children:r}),o)};export{r as ComposeContextProvider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxact",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "description": "React Hooks/Utils done right. For browser, SSR, and React Server Components.",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -32,6 +32,41 @@
32
32
  "optional": true
33
33
  }
34
34
  },
35
+ "overrides": {
36
+ "array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@latest",
37
+ "array-includes": "npm:@nolyfill/array-includes@latest",
38
+ "array.prototype.find": "npm:@nolyfill/array.prototype.find@latest",
39
+ "array.prototype.findlastindex": "npm:@nolyfill/array.prototype.findlastindex@latest",
40
+ "array.prototype.flat": "npm:@nolyfill/array.prototype.flat@latest",
41
+ "array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@latest",
42
+ "array.prototype.tosorted": "npm:@nolyfill/array.prototype.tosorted@latest",
43
+ "arraybuffer.prototype.slice": "npm:@nolyfill/arraybuffer.prototype.slice@latest",
44
+ "function-bind": "npm:@nolyfill/function-bind@latest",
45
+ "function.prototype.name": "npm:@nolyfill/function.prototype.name@latest",
46
+ "get-symbol-description": "npm:@nolyfill/get-symbol-description@latest",
47
+ "globalthis": "npm:@nolyfill/globalthis@latest",
48
+ "gopd": "npm:@nolyfill/gopd@latest",
49
+ "has": "npm:@nolyfill/has@latest",
50
+ "has-property-descriptors": "npm:@nolyfill/has-property-descriptors@latest",
51
+ "is-array-buffer": "npm:@nolyfill/is-array-buffer@latest",
52
+ "is-shared-array-buffer": "npm:@nolyfill/is-shared-array-buffer@latest",
53
+ "object-keys": "npm:@nolyfill/object-keys@latest",
54
+ "object.assign": "npm:@nolyfill/object.assign@latest",
55
+ "object.entries": "npm:@nolyfill/object.entries@latest",
56
+ "object.fromentries": "npm:@nolyfill/object.fromentries@latest",
57
+ "object.groupby": "npm:@nolyfill/object.groupby@latest",
58
+ "object.hasown": "npm:@nolyfill/object.hasown@latest",
59
+ "object.values": "npm:@nolyfill/object.values@latest",
60
+ "regexp.prototype.flags": "npm:@nolyfill/regexp.prototype.flags@latest",
61
+ "string.prototype.matchall": "npm:@nolyfill/string.prototype.matchall@latest",
62
+ "string.prototype.trim": "npm:@nolyfill/string.prototype.trim@latest",
63
+ "string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@latest",
64
+ "string.prototype.trimstart": "npm:@nolyfill/string.prototype.trimstart@latest",
65
+ "typed-array-buffer": "npm:@nolyfill/typed-array-buffer@latest",
66
+ "typed-array-byte-length": "npm:@nolyfill/typed-array-byte-length@latest",
67
+ "typed-array-byte-offset": "npm:@nolyfill/typed-array-byte-offset@latest",
68
+ "typed-array-length": "npm:@nolyfill/typed-array-length@latest"
69
+ },
35
70
  "typeVersions": {
36
71
  ">=4.8": {
37
72
  "*": [
@@ -47,6 +82,15 @@
47
82
  "exports": {
48
83
  "./package.json": "./package.json",
49
84
  "./sizes.json": "./sizes.json",
85
+ "./compose-context-provider": {
86
+ "types": "./compose-context-provider/index.d.ts",
87
+ "import": {
88
+ "types": "./compose-context-provider/index.d.ts",
89
+ "default": "./compose-context-provider/index.mjs"
90
+ },
91
+ "require": "./compose-context-provider/index.cjs",
92
+ "default": "./compose-context-provider/index.js"
93
+ },
50
94
  "./context-state": {
51
95
  "types": "./context-state/index.d.ts",
52
96
  "import": {
package/sizes.json CHANGED
@@ -1 +1 @@
1
- {"total":{"raw":9461,"gzip":6227,"br":0},"exports":{"create-fixed-array":{"raw":99,"gzip":103,"br":93},"context-state":{"raw":371,"gzip":240,"br":204},"noop":{"raw":32,"gzip":52,"br":36},"create-context-state":{"raw":146,"gzip":116,"br":102},"use":{"raw":279,"gzip":175,"br":151},"use-array":{"raw":329,"gzip":242,"br":201},"typescript-happy-forward-ref":{"raw":118,"gzip":102,"br":87},"use-debounced-state":{"raw":405,"gzip":287,"br":241},"use-clipboard":{"raw":1071,"gzip":614,"br":527},"use-debounced-value":{"raw":370,"gzip":263,"br":214},"use-composition-input":{"raw":449,"gzip":280,"br":240},"use-is-client":{"raw":148,"gzip":143,"br":115},"use-isomorphic-layout-effect":{"raw":177,"gzip":143,"br":120},"request-idle-callback":{"raw":407,"gzip":231,"br":180},"use-map":{"raw":348,"gzip":243,"br":210},"use-next-pathname":{"raw":313,"gzip":236,"br":196},"use-react-router-enable-concurrent-navigation":{"raw":950,"gzip":453,"br":373},"use-react-router-is-match":{"raw":562,"gzip":369,"br":309},"use-set":{"raw":349,"gzip":242,"br":203},"use-retimer":{"raw":197,"gzip":165,"br":125},"use-singleton":{"raw":135,"gzip":129,"br":111},"use-error-boundary":{"raw":238,"gzip":194,"br":158},"use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired":{"raw":461,"gzip":325,"br":256},"use-intersection":{"raw":1214,"gzip":652,"br":592},"use-uncontrolled":{"raw":293,"gzip":228,"br":189}}}
1
+ {"total":{"raw":9624,"gzip":6377,"br":0},"exports":{"compose-context-provider":{"raw":163,"gzip":150,"br":116},"create-context-state":{"raw":146,"gzip":116,"br":102},"create-fixed-array":{"raw":99,"gzip":103,"br":93},"noop":{"raw":32,"gzip":52,"br":36},"request-idle-callback":{"raw":407,"gzip":231,"br":180},"typescript-happy-forward-ref":{"raw":118,"gzip":102,"br":87},"context-state":{"raw":371,"gzip":240,"br":204},"use":{"raw":279,"gzip":175,"br":151},"use-array":{"raw":329,"gzip":242,"br":201},"use-debounced-value":{"raw":370,"gzip":263,"br":214},"use-clipboard":{"raw":1071,"gzip":614,"br":527},"use-intersection":{"raw":1214,"gzip":652,"br":592},"use-is-client":{"raw":148,"gzip":143,"br":115},"use-isomorphic-layout-effect":{"raw":177,"gzip":143,"br":120},"use-map":{"raw":348,"gzip":243,"br":210},"use-debounced-state":{"raw":405,"gzip":287,"br":241},"use-composition-input":{"raw":449,"gzip":280,"br":240},"use-react-router-is-match":{"raw":562,"gzip":369,"br":309},"use-react-router-enable-concurrent-navigation":{"raw":950,"gzip":453,"br":373},"use-retimer":{"raw":197,"gzip":165,"br":125},"use-error-boundary":{"raw":238,"gzip":194,"br":158},"use-next-pathname":{"raw":313,"gzip":236,"br":196},"use-set":{"raw":349,"gzip":242,"br":203},"use-uncontrolled":{"raw":293,"gzip":228,"br":189},"use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired":{"raw":461,"gzip":325,"br":256},"use-singleton":{"raw":135,"gzip":129,"br":111}}}
@@ -1,5 +1,5 @@
1
1
  interface TypeScriptHappyForwardRef {
2
- <T, P = {}>(render: (props: P, ref: React.ForwardedRef<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
2
+ <T, P = {}>(render: (props: P, ref: React.ForwardedRef<T>) => React.ReactNode | null): (props: P & React.RefAttributes<T>) => React.ReactNode | null;
3
3
  }
4
4
  /** @see https://foxact.skk.moe/typescript-happy-forward-ref */
5
5
  declare const typeScriptHappyForwardRef: TypeScriptHappyForwardRef;