@griffel/react 1.6.2 → 1.7.1
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/lib/RendererContext.cjs +9 -12
- package/lib/TextDirectionContext.cjs +8 -11
- package/lib/utils/canUseDOM.cjs +2 -0
- package/package.json +3 -3
- package/src/RendererContext.d.ts +3 -3
- package/src/RendererContext.js +6 -5
- package/src/RendererContext.js.map +1 -1
- package/src/TextDirectionContext.d.ts +3 -3
- package/src/TextDirectionContext.js +5 -4
- package/src/TextDirectionContext.js.map +1 -1
- package/src/__css.d.ts +1 -1
- package/src/__css.js +1 -1
- package/src/__resetCSS.d.ts +1 -1
- package/src/__resetCSS.js +1 -1
- package/src/__resetStyles.d.ts +1 -1
- package/src/__resetStyles.js +1 -1
- package/src/__staticCSS.d.ts +1 -1
- package/src/__staticCSS.js +1 -1
- package/src/__staticStyles.d.ts +1 -1
- package/src/__staticStyles.js +1 -1
- package/src/__styles.d.ts +1 -1
- package/src/__styles.js +1 -1
- package/src/useInsertionEffect.d.ts +1 -2
- package/src/useInsertionEffect.js +3 -0
- package/src/useInsertionEffect.js.map +1 -1
- package/src/utils/canUseDOM.d.ts +1 -4
- package/src/utils/canUseDOM.js +2 -0
- package/src/utils/canUseDOM.js.map +1 -1
- package/src/utils/isInsideComponent.d.ts +1 -1
- package/src/utils/isInsideComponent.js +3 -0
- package/src/utils/isInsideComponent.js.map +1 -1
package/lib/RendererContext.cjs
CHANGED
|
@@ -17,19 +17,15 @@ _export(exports, {
|
|
|
17
17
|
return useRenderer;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
20
21
|
const _core = require("@griffel/core");
|
|
21
|
-
const _react =
|
|
22
|
+
const _react = require("react");
|
|
22
23
|
const _canUseDOM = require("./utils/canUseDOM.cjs");
|
|
23
|
-
function _interop_require_default(obj) {
|
|
24
|
-
return obj && obj.__esModule ? obj : {
|
|
25
|
-
default: obj
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
24
|
/**
|
|
29
25
|
* @private
|
|
30
|
-
*/ const RendererContext = /*#__PURE__*/ _react.
|
|
26
|
+
*/ const RendererContext = /*#__PURE__*/ (0, _react.createContext)(/*#__PURE__*/ (0, _core.createDOMRenderer)());
|
|
31
27
|
const RendererProvider = ({ children, renderer, targetDocument })=>{
|
|
32
|
-
_react.
|
|
28
|
+
(0, _react.useMemo)(()=>{
|
|
33
29
|
if ((0, _canUseDOM.canUseDOM)()) {
|
|
34
30
|
// "rehydrateCache()" can't be called in effects as it needs to be called before any component will be rendered to
|
|
35
31
|
// avoid double insertion of classes
|
|
@@ -39,10 +35,11 @@ const RendererProvider = ({ children, renderer, targetDocument })=>{
|
|
|
39
35
|
renderer,
|
|
40
36
|
targetDocument
|
|
41
37
|
]);
|
|
42
|
-
return
|
|
43
|
-
value: renderer
|
|
44
|
-
|
|
38
|
+
return (0, _jsxruntime.jsx)(RendererContext.Provider, {
|
|
39
|
+
value: renderer,
|
|
40
|
+
children: children
|
|
41
|
+
});
|
|
45
42
|
};
|
|
46
43
|
function useRenderer() {
|
|
47
|
-
return _react.
|
|
44
|
+
return (0, _react.useContext)(RendererContext);
|
|
48
45
|
} //# sourceMappingURL=RendererContext.js.map
|
|
@@ -17,20 +17,17 @@ _export(exports, {
|
|
|
17
17
|
return useTextDirection;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
return obj && obj.__esModule ? obj : {
|
|
23
|
-
default: obj
|
|
24
|
-
};
|
|
25
|
-
}
|
|
20
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
21
|
+
const _react = require("react");
|
|
26
22
|
/**
|
|
27
23
|
* @private
|
|
28
|
-
*/ const TextDirectionContext = /*#__PURE__*/ _react.
|
|
24
|
+
*/ const TextDirectionContext = /*#__PURE__*/ (0, _react.createContext)('ltr');
|
|
29
25
|
const TextDirectionProvider = ({ children, dir })=>{
|
|
30
|
-
return
|
|
31
|
-
value: dir
|
|
32
|
-
|
|
26
|
+
return (0, _jsxruntime.jsx)(TextDirectionContext.Provider, {
|
|
27
|
+
value: dir,
|
|
28
|
+
children: children
|
|
29
|
+
});
|
|
33
30
|
};
|
|
34
31
|
function useTextDirection() {
|
|
35
|
-
return _react.
|
|
32
|
+
return (0, _react.useContext)(TextDirectionContext);
|
|
36
33
|
} //# sourceMappingURL=TextDirectionContext.js.map
|
package/lib/utils/canUseDOM.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griffel/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "React implementation of Atomic CSS-in-JS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@griffel/core": "^1.20.
|
|
30
|
+
"@griffel/core": "^1.20.3",
|
|
31
31
|
"tslib": "^2.1.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"react": ">=16.
|
|
34
|
+
"react": ">=16.14.0 <20.0.0"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/src/RendererContext.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GriffelRenderer } from '@griffel/core';
|
|
2
|
-
import
|
|
2
|
+
import { type FC, type ReactNode } from 'react';
|
|
3
3
|
export interface RendererProviderProps {
|
|
4
4
|
/** An instance of Griffel renderer. */
|
|
5
5
|
renderer: GriffelRenderer;
|
|
@@ -10,12 +10,12 @@ export interface RendererProviderProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* Content wrapped by the RendererProvider
|
|
12
12
|
*/
|
|
13
|
-
children:
|
|
13
|
+
children: ReactNode;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
|
-
export declare const RendererProvider:
|
|
18
|
+
export declare const RendererProvider: FC<RendererProviderProps>;
|
|
19
19
|
/**
|
|
20
20
|
* Returns an instance of current makeStyles() renderer.
|
|
21
21
|
*
|
package/src/RendererContext.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { createDOMRenderer, rehydrateRendererCache } from '@griffel/core';
|
|
3
|
-
import
|
|
4
|
+
import { createContext, useContext, useMemo } from 'react';
|
|
4
5
|
import { canUseDOM } from './utils/canUseDOM.js';
|
|
5
6
|
/**
|
|
6
7
|
* @private
|
|
7
8
|
*/
|
|
8
|
-
const RendererContext = /*#__PURE__*/
|
|
9
|
+
const RendererContext = /*#__PURE__*/ createContext(/*#__PURE__*/ createDOMRenderer());
|
|
9
10
|
/**
|
|
10
11
|
* @public
|
|
11
12
|
*/
|
|
12
13
|
export const RendererProvider = ({ children, renderer, targetDocument }) => {
|
|
13
|
-
|
|
14
|
+
useMemo(() => {
|
|
14
15
|
if (canUseDOM()) {
|
|
15
16
|
// "rehydrateCache()" can't be called in effects as it needs to be called before any component will be rendered to
|
|
16
17
|
// avoid double insertion of classes
|
|
17
18
|
rehydrateRendererCache(renderer, targetDocument);
|
|
18
19
|
}
|
|
19
20
|
}, [renderer, targetDocument]);
|
|
20
|
-
return
|
|
21
|
+
return _jsx(RendererContext.Provider, { value: renderer, children: children });
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
24
|
* Returns an instance of current makeStyles() renderer.
|
|
@@ -25,6 +26,6 @@ export const RendererProvider = ({ children, renderer, targetDocument }) => {
|
|
|
25
26
|
* @private Exported as "useRenderer_unstable" use it on own risk. Can be changed or removed without a notice.
|
|
26
27
|
*/
|
|
27
28
|
export function useRenderer() {
|
|
28
|
-
return
|
|
29
|
+
return useContext(RendererContext);
|
|
29
30
|
}
|
|
30
31
|
//# sourceMappingURL=RendererContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RendererContext.js","sourceRoot":"","sources":["../../../../packages/react/src/RendererContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"RendererContext.js","sourceRoot":"","sources":["../../../../packages/react/src/RendererContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAA2B,MAAM,OAAO,CAAC;AAEpF,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAiBjD;;GAEG;AACH,MAAM,eAAe,GAAG,aAAa,CAAC,aAAa,CAAkB,aAAa,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAExG;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,EAAE;IACpG,OAAO,CAAC,GAAG,EAAE;QACX,IAAI,SAAS,EAAE,EAAE,CAAC;YAChB,kHAAkH;YAClH,oCAAoC;YACpC,sBAAsB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC;IAE/B,OAAO,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAA4B,CAAC;AAC1F,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type FC, type ReactNode } from 'react';
|
|
2
2
|
export interface TextDirectionProviderProps {
|
|
3
3
|
/** Indicates the directionality of the element's text. */
|
|
4
4
|
dir: 'ltr' | 'rtl';
|
|
5
5
|
/**
|
|
6
6
|
* Content wrapped by the TextDirectionProvider.
|
|
7
7
|
*/
|
|
8
|
-
children:
|
|
8
|
+
children: ReactNode;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
|
-
export declare const TextDirectionProvider:
|
|
13
|
+
export declare const TextDirectionProvider: FC<TextDirectionProviderProps>;
|
|
14
14
|
/**
|
|
15
15
|
* Returns current directionality of the element's text.
|
|
16
16
|
*
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
3
4
|
/**
|
|
4
5
|
* @private
|
|
5
6
|
*/
|
|
6
|
-
const TextDirectionContext = /*#__PURE__*/
|
|
7
|
+
const TextDirectionContext = /*#__PURE__*/ createContext('ltr');
|
|
7
8
|
/**
|
|
8
9
|
* @public
|
|
9
10
|
*/
|
|
10
11
|
export const TextDirectionProvider = ({ children, dir }) => {
|
|
11
|
-
return
|
|
12
|
+
return _jsx(TextDirectionContext.Provider, { value: dir, children: children });
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
15
|
* Returns current directionality of the element's text.
|
|
@@ -16,6 +17,6 @@ export const TextDirectionProvider = ({ children, dir }) => {
|
|
|
16
17
|
* @private
|
|
17
18
|
*/
|
|
18
19
|
export function useTextDirection() {
|
|
19
|
-
return
|
|
20
|
+
return useContext(TextDirectionContext);
|
|
20
21
|
}
|
|
21
22
|
//# sourceMappingURL=TextDirectionContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextDirectionContext.js","sourceRoot":"","sources":["../../../../packages/react/src/TextDirectionContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"TextDirectionContext.js","sourceRoot":"","sources":["../../../../packages/react/src/TextDirectionContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,aAAa,EAAE,UAAU,EAA2B,MAAM,OAAO,CAAC;AAY3E;;GAEG;AACH,MAAM,oBAAoB,GAAG,aAAa,CAAC,aAAa,CAAgB,KAAK,CAAC,CAAC;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAmC,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE;IACzF,OAAO,KAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,YAAG,QAAQ,GAAiC,CAAC;AAC/F,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC1C,CAAC"}
|
package/src/__css.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import type { CSSClassesMapBySlot } from '@griffel/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* A version of makeStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
5
|
+
* @private
|
|
6
6
|
*/
|
|
7
7
|
export declare function __css<Slots extends string>(classesMapBySlot: CSSClassesMapBySlot<Slots>): () => Record<Slots, string>;
|
package/src/__css.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useTextDirection } from './TextDirectionContext.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* A version of makeStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @private
|
|
8
8
|
*/
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10
10
|
export function __css(classesMapBySlot) {
|
package/src/__resetCSS.d.ts
CHANGED
package/src/__resetCSS.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useTextDirection } from './TextDirectionContext.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* A version of makeResetStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @private
|
|
8
8
|
*/
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10
10
|
export function __resetCSS(ltrClassName, rtlClassName) {
|
package/src/__resetStyles.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import type { CSSRulesByBucket } from '@griffel/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* A version of makeResetStyles() that accepts build output as an input and skips all runtime transforms.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
5
|
+
* @private
|
|
6
6
|
*/
|
|
7
7
|
export declare function __resetStyles(ltrClassName: string, rtlClassName: string | null, cssRules: CSSRulesByBucket | string[]): () => string;
|
package/src/__resetStyles.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useTextDirection } from './TextDirectionContext.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* A version of makeResetStyles() that accepts build output as an input and skips all runtime transforms.
|
|
8
8
|
*
|
|
9
|
-
* @
|
|
9
|
+
* @private
|
|
10
10
|
*/
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
12
|
export function __resetStyles(ltrClassName, rtlClassName, cssRules) {
|
package/src/__staticCSS.d.ts
CHANGED
package/src/__staticCSS.js
CHANGED
|
@@ -3,7 +3,7 @@ import { __staticCSS as vanillaStaticCSS } from '@griffel/core';
|
|
|
3
3
|
/**
|
|
4
4
|
* A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @private
|
|
7
7
|
*/
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
9
|
export function __staticCSS() {
|
package/src/__staticStyles.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import type { CSSRulesByBucket } from '@griffel/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
5
|
+
* @private
|
|
6
6
|
*/
|
|
7
7
|
export declare function __staticStyles(cssRules: CSSRulesByBucket): () => void;
|
package/src/__staticStyles.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useRenderer } from './RendererContext.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
8
|
+
* @private
|
|
9
9
|
*/
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11
11
|
export function __staticStyles(cssRules) {
|
package/src/__styles.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import type { CSSClassesMapBySlot, CSSRulesByBucket } from '@griffel/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* A version of makeStyles() that accepts build output as an input and skips all runtime transforms.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
5
|
+
* @private
|
|
6
6
|
*/
|
|
7
7
|
export declare function __styles<Slots extends string>(classesMapBySlot: CSSClassesMapBySlot<Slots>, cssRules: CSSRulesByBucket): () => Record<Slots, string>;
|
package/src/__styles.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useTextDirection } from './TextDirectionContext.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* A version of makeStyles() that accepts build output as an input and skips all runtime transforms.
|
|
8
8
|
*
|
|
9
|
-
* @
|
|
9
|
+
* @private
|
|
10
10
|
*/
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
12
|
export function __styles(classesMapBySlot, cssRules) {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const useInsertionEffect: typeof React.useInsertionEffect | undefined;
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
3
6
|
export const useInsertionEffect =
|
|
4
7
|
// @ts-expect-error Hack to make sure that `useInsertionEffect` will not cause bundling issues in older React versions
|
|
5
8
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInsertionEffect.js","sourceRoot":"","sources":["../../../../packages/react/src/useInsertionEffect.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,kBAAkB;AAC7B,sHAAsH;AACtH,6CAA6C;AAC7C,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"useInsertionEffect.js","sourceRoot":"","sources":["../../../../packages/react/src/useInsertionEffect.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB;AAC7B,sHAAsH;AACtH,6CAA6C;AAC7C,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC"}
|
package/src/utils/canUseDOM.d.ts
CHANGED
package/src/utils/canUseDOM.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canUseDOM.js","sourceRoot":"","sources":["../../../../../packages/react/src/utils/canUseDOM.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"canUseDOM.js","sourceRoot":"","sources":["../../../../../packages/react/src/utils/canUseDOM.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC/F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -15,6 +15,9 @@ function getDispatcher() {
|
|
|
15
15
|
// React 18 and below
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
18
21
|
export function isInsideComponent() {
|
|
19
22
|
// React 18 always logs errors if a dispatcher is not present:
|
|
20
23
|
// https://github.com/facebook/react/blob/42f15b324f50d0fd98322c21646ac3013e30344a/packages/react/src/ReactHooks.js#L26-L36
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInsideComponent.js","sourceRoot":"","sources":["../../../../../packages/react/src/utils/isInsideComponent.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,SAAS,aAAa;IACpB,IAAI,CAAC;QACH,OAAQ,KAAa,CAAC,EAAE,CAAC,MAAM,CAAC,iEAAiE,CAAC,CAAC,CAAC,CAAC,CAAC;IACxG,CAAC;IAAC,MAAM,CAAC;QACP,YAAY;IACd,CAAC;IAED,IAAI,CAAC;QACH,OAAQ,KAAa,CAAC,EAAE,CAAC,MAAM,CAAC,oDAAoD,CAAC,CAAC,CAAC,sBAAsB;aAC1G,OAAO,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACP,qBAAqB;IACvB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,8DAA8D;IAC9D,2HAA2H;IAC3H,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;QAEnC,sEAAsE;QACtE,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,+GAA+G;QAC/G,gCAAgC;QAChC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"isInsideComponent.js","sourceRoot":"","sources":["../../../../../packages/react/src/utils/isInsideComponent.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,SAAS,aAAa;IACpB,IAAI,CAAC;QACH,OAAQ,KAAa,CAAC,EAAE,CAAC,MAAM,CAAC,iEAAiE,CAAC,CAAC,CAAC,CAAC,CAAC;IACxG,CAAC;IAAC,MAAM,CAAC;QACP,YAAY;IACd,CAAC;IAED,IAAI,CAAC;QACH,OAAQ,KAAa,CAAC,EAAE,CAAC,MAAM,CAAC,oDAAoD,CAAC,CAAC,CAAC,sBAAsB;aAC1G,OAAO,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACP,qBAAqB;IACvB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,8DAA8D;IAC9D,2HAA2H;IAC3H,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;QAEnC,sEAAsE;QACtE,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,+GAA+G;QAC/G,gCAAgC;QAChC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|