react-cosmos-core 6.0.0-alpha.17 → 6.0.0-alpha.18
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.
|
@@ -4,5 +4,8 @@ type Props = {
|
|
|
4
4
|
width: number;
|
|
5
5
|
height: number;
|
|
6
6
|
};
|
|
7
|
-
export declare
|
|
7
|
+
export declare function Viewport({ children, width, height }: Props): JSX.Element;
|
|
8
|
+
export declare namespace Viewport {
|
|
9
|
+
var cosmosCapture: boolean;
|
|
10
|
+
}
|
|
8
11
|
export {};
|
package/dist/fixture/Viewport.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FixtureContext } from './FixtureContext.js';
|
|
3
|
-
|
|
4
|
-
// property, which makes TS generate a declaration for Viewport that doesn't
|
|
5
|
-
// conform to React's component interface. Without this explicit type TS would
|
|
6
|
-
// allow clients to pass any props to Viewport.
|
|
7
|
-
export const Viewport = function Viewport({ children, width, height, }) {
|
|
3
|
+
export function Viewport({ children, width, height }) {
|
|
8
4
|
const { setFixtureState } = React.useContext(FixtureContext);
|
|
9
5
|
React.useEffect(() => {
|
|
10
6
|
setFixtureState(fixtureState => ({
|
|
@@ -14,6 +10,5 @@ export const Viewport = function Viewport({ children, width, height, }) {
|
|
|
14
10
|
}, [setFixtureState, width, height]);
|
|
15
11
|
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18051
|
|
16
12
|
return React.createElement(React.Fragment, null, children);
|
|
17
|
-
}
|
|
18
|
-
// @ts-ignore
|
|
13
|
+
}
|
|
19
14
|
Viewport.cosmosCapture = false;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './fixtureTree/createFixtureTree/index.js';
|
|
|
10
10
|
export * from './fixtureTree/flattenFixtureTree.js';
|
|
11
11
|
export * from './fixtureTree/types.js';
|
|
12
12
|
export * from './playground/playgroundUrl.js';
|
|
13
|
+
export * from './renderer/FixtureCapture/index.js';
|
|
13
14
|
export * from './renderer/FixtureConnect.js';
|
|
14
15
|
export * from './renderer/createPostMessageConnect.js';
|
|
15
16
|
export * from './renderer/createWebSocketsConnect.js';
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from './fixtureTree/createFixtureTree/index.js';
|
|
|
10
10
|
export * from './fixtureTree/flattenFixtureTree.js';
|
|
11
11
|
export * from './fixtureTree/types.js';
|
|
12
12
|
export * from './playground/playgroundUrl.js';
|
|
13
|
+
export * from './renderer/FixtureCapture/index.js';
|
|
13
14
|
export * from './renderer/FixtureConnect.js';
|
|
14
15
|
export * from './renderer/createPostMessageConnect.js';
|
|
15
16
|
export * from './renderer/createWebSocketsConnect.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FixtureDecoratorId } from '../../fixtureState/types.js';
|
|
3
|
-
|
|
3
|
+
type Props = {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
decoratorId: FixtureDecoratorId;
|
|
6
6
|
};
|
|
7
7
|
export declare function FixtureCapture({ children, decoratorId }: Props): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type Props = {
|
|
3
3
|
children: React.ClassicElement<unknown>;
|
|
4
4
|
state?: {};
|
|
5
5
|
};
|
|
@@ -10,3 +10,4 @@ export declare class ClassStateMock extends React.Component<Props> {
|
|
|
10
10
|
componentDidUpdate(prevProps: Props): void;
|
|
11
11
|
handleRef: (childRef: React.Component | null) => void;
|
|
12
12
|
}
|
|
13
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-cosmos-core",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.18",
|
|
4
4
|
"description": "React Cosmos Core",
|
|
5
5
|
"repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos-core",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
"lodash-es": "^4.17.21",
|
|
12
12
|
"react-is": "^18.2.0"
|
|
13
13
|
},
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "470aceb8ef9ac1a82f050edcfdaf4d62c7e97a61"
|
|
15
15
|
}
|