react-cosmos-shared2
Advanced tools
Comparing version 5.6.8 to 5.7.1
@@ -9,3 +9,4 @@ import React, { Component } from 'react'; | ||
fixtures: ReactFixtureWrappers; | ||
selectedFixtureId: null | FixtureId; | ||
initialFixtureId?: FixtureId; | ||
selectedFixtureId?: null | FixtureId; | ||
systemDecorators: ReactDecorator[]; | ||
@@ -12,0 +13,0 @@ userDecorators: ReactDecorators; |
@@ -50,3 +50,3 @@ "use strict"; | ||
function getSelectedFixture(fixtureId) { | ||
function getSelectedFixtureState(fixtureId) { | ||
if (!fixtureId) return null; | ||
@@ -77,3 +77,3 @@ return { | ||
_defineProperty(_assertThisInitialized(_this), "state", { | ||
selectedFixture: getSelectedFixture(_this.props.selectedFixtureId), | ||
selectedFixture: getSelectedFixtureState(_this.props.selectedFixtureId || _this.props.initialFixtureId), | ||
renderKey: 0 | ||
@@ -289,8 +289,15 @@ }); | ||
value: function postReadyState() { | ||
var rendererId = this.props.rendererId; | ||
var _this$props2 = this.props, | ||
rendererId = _this$props2.rendererId, | ||
initialFixtureId = _this$props2.initialFixtureId; | ||
var fixtures = this.getFixtureList(); | ||
this.postMessage({ | ||
type: 'rendererReady', | ||
payload: { | ||
payload: initialFixtureId ? { | ||
rendererId: rendererId, | ||
fixtures: this.getFixtureList() | ||
fixtures: fixtures, | ||
initialFixtureId: initialFixtureId | ||
} : { | ||
rendererId: rendererId, | ||
fixtures: fixtures | ||
} | ||
@@ -297,0 +304,0 @@ }); |
@@ -47,2 +47,3 @@ import { FixtureState } from './fixtureState'; | ||
fixtures: FixtureList; | ||
initialFixtureId?: FixtureId; | ||
}; | ||
@@ -49,0 +50,0 @@ }; |
{ | ||
"name": "react-cosmos-shared2", | ||
"version": "5.6.8", | ||
"version": "5.7.1", | ||
"description": "Code shared between Cosmos packages", | ||
@@ -14,3 +14,3 @@ "repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos-shared2", | ||
}, | ||
"gitHead": "cf9e3bd7e977f9faf4a45c9d6003b65ddd11a23a" | ||
"gitHead": "6219d1d9370a7bd086510e2a073999309d28a926" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173426
3506