react-cosmos-ui
Advanced tools
Comparing version 6.0.0-canary.86644b2.0 to 6.0.0-canary.8bec88a.0
@@ -8,3 +8,3 @@ import React from 'react'; | ||
}; | ||
export declare function BaseSvg({ children, ...attrs }: Props): JSX.Element; | ||
export declare function BaseSvg({ children, ...attrs }: Props): React.JSX.Element; | ||
export {}; |
@@ -10,3 +10,3 @@ import React from 'react'; | ||
}; | ||
export declare function Button32({ icon, label, title, disabled, selected, onClick, }: Props): JSX.Element; | ||
export declare function Button32({ icon, label, title, disabled, selected, onClick, }: Props): React.JSX.Element; | ||
export {}; |
@@ -10,3 +10,3 @@ import React from 'react'; | ||
}; | ||
export declare function Button8({ icon, label, title, disabled, selected, onClick, }: Props): JSX.Element; | ||
export declare function Button8({ icon, label, title, disabled, selected, onClick, }: Props): React.JSX.Element; | ||
export {}; |
@@ -9,3 +9,3 @@ import React from 'react'; | ||
}; | ||
export declare function IconButton32({ icon, title, disabled, selected, onClick, }: Props): JSX.Element; | ||
export declare function IconButton32({ icon, title, disabled, selected, onClick, }: Props): React.JSX.Element; | ||
export {}; |
@@ -9,3 +9,3 @@ import React from 'react'; | ||
}; | ||
export declare function IconButton8({ icon, title, disabled, selected, onClick, }: Props): JSX.Element; | ||
export declare function IconButton8({ icon, title, disabled, selected, onClick, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { SvgChildren } from './BaseSvg.js'; | ||
@@ -10,3 +10,3 @@ export type IconProps = { | ||
}; | ||
export declare function Icon({ children, size, strokeWidth }: Props): JSX.Element; | ||
export declare function Icon({ children, size, strokeWidth }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,31 +0,31 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { IconProps } from '../Icon.js'; | ||
export declare const ChevronLeftIcon: () => JSX.Element; | ||
export declare const ChevronRightIcon: () => JSX.Element; | ||
export declare const ChevronDownIcon: () => JSX.Element; | ||
export declare const FolderIcon: () => JSX.Element; | ||
export declare const XIcon: () => JSX.Element; | ||
export declare const XCircleIcon: () => JSX.Element; | ||
export declare const MaximizeIcon: () => JSX.Element; | ||
export declare const SmartphoneIcon: () => JSX.Element; | ||
export declare const Minimize2Icon: () => JSX.Element; | ||
export declare const RefreshCwIcon: () => JSX.Element; | ||
export declare const RefreshCcwIcon: (props: IconProps) => JSX.Element; | ||
export declare const HomeIcon: () => JSX.Element; | ||
export declare const CastIcon: () => JSX.Element; | ||
export declare const EditIcon: () => JSX.Element; | ||
export declare const CheckCircleIcon: (props: IconProps) => JSX.Element; | ||
export declare const AlertCircleIcon: () => JSX.Element; | ||
export declare const InfoIcon: () => JSX.Element; | ||
export declare const LoaderIcon: () => JSX.Element; | ||
export declare const SlidersIcon: () => JSX.Element; | ||
export declare const CopyIcon: () => JSX.Element; | ||
export declare const RotateCcwIcon: () => JSX.Element; | ||
export declare const FileIcon: () => JSX.Element; | ||
export declare const SearchIcon: () => JSX.Element; | ||
export declare const MenuIcon: () => JSX.Element; | ||
export declare const ExternalIcon: () => JSX.Element; | ||
export declare const HelpCircleIcon: () => JSX.Element; | ||
export declare const MinusSquareIcon: () => JSX.Element; | ||
export declare const PlusSquareIcon: () => JSX.Element; | ||
export declare const StarIcon: () => JSX.Element; | ||
export declare const ChevronLeftIcon: () => React.JSX.Element; | ||
export declare const ChevronRightIcon: () => React.JSX.Element; | ||
export declare const ChevronDownIcon: () => React.JSX.Element; | ||
export declare const FolderIcon: () => React.JSX.Element; | ||
export declare const XIcon: () => React.JSX.Element; | ||
export declare const XCircleIcon: () => React.JSX.Element; | ||
export declare const MaximizeIcon: () => React.JSX.Element; | ||
export declare const SmartphoneIcon: () => React.JSX.Element; | ||
export declare const Minimize2Icon: () => React.JSX.Element; | ||
export declare const RefreshCwIcon: () => React.JSX.Element; | ||
export declare const RefreshCcwIcon: (props: IconProps) => React.JSX.Element; | ||
export declare const HomeIcon: () => React.JSX.Element; | ||
export declare const CastIcon: () => React.JSX.Element; | ||
export declare const EditIcon: () => React.JSX.Element; | ||
export declare const CheckCircleIcon: (props: IconProps) => React.JSX.Element; | ||
export declare const AlertCircleIcon: () => React.JSX.Element; | ||
export declare const InfoIcon: () => React.JSX.Element; | ||
export declare const LoaderIcon: () => React.JSX.Element; | ||
export declare const SlidersIcon: () => React.JSX.Element; | ||
export declare const CopyIcon: () => React.JSX.Element; | ||
export declare const RotateCcwIcon: () => React.JSX.Element; | ||
export declare const FileIcon: () => React.JSX.Element; | ||
export declare const SearchIcon: () => React.JSX.Element; | ||
export declare const MenuIcon: () => React.JSX.Element; | ||
export declare const ExternalIcon: () => React.JSX.Element; | ||
export declare const HelpCircleIcon: () => React.JSX.Element; | ||
export declare const MinusSquareIcon: () => React.JSX.Element; | ||
export declare const PlusSquareIcon: () => React.JSX.Element; | ||
export declare const StarIcon: () => React.JSX.Element; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { SvgChildren } from './BaseSvg.js'; | ||
@@ -8,3 +8,3 @@ type Props = { | ||
}; | ||
export declare function Illustration({ children, viewBox, size }: Props): JSX.Element; | ||
export declare function Illustration({ children, viewBox, size }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,4 +0,4 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
export declare const ArtificialIntelligenceIllustration: ({ title, }: { | ||
title: string; | ||
}) => JSX.Element; | ||
}) => React.JSX.Element; |
@@ -1,4 +0,4 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
export declare const AstronautIllustration: ({ title }: { | ||
title: string; | ||
}) => JSX.Element; | ||
}) => React.JSX.Element; |
@@ -1,4 +0,4 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
export declare const BlankCanvasIllustration: ({ title }: { | ||
title: string; | ||
}) => JSX.Element; | ||
}) => React.JSX.Element; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
export type NumberInputStyles = { | ||
@@ -15,3 +15,3 @@ focusedColor: string; | ||
}; | ||
export declare function NumberInput({ id, value, minValue, maxValue, styles, onChange, }: Props): JSX.Element; | ||
export declare function NumberInput({ id, value, minValue, maxValue, styles, onChange, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type BaseOption = { | ||
@@ -16,3 +16,3 @@ value: string; | ||
}; | ||
export declare function Select<Option extends BaseOption>({ id, testId, options, value, color, height, padding, onChange, }: Props<Option>): JSX.Element; | ||
export declare function Select<Option extends BaseOption>({ id, testId, options, value, color, height, padding, onChange, }: Props<Option>): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -9,3 +9,3 @@ value: string; | ||
}; | ||
export declare function KeyBox({ value, bgColor, textColor, size, fontSize, }: Props): JSX.Element; | ||
export declare function KeyBox({ value, bgColor, textColor, size, fontSize, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
export declare const SidePanelContainer: import("styled-components").StyledComponent<"div", any, {}, never>; | ||
@@ -8,5 +8,5 @@ export declare const SidePanelHeader: import("styled-components").StyledComponent<"div", any, {}, never>; | ||
}; | ||
export declare function SidePanelTitle({ label, componentName }: TitleProps): JSX.Element; | ||
export declare function SidePanelTitle({ label, componentName }: TitleProps): React.JSX.Element; | ||
export declare const SidePanelActions: import("styled-components").StyledComponent<"div", any, {}, never>; | ||
export declare const SidePanelBody: import("styled-components").StyledComponent<"div", any, {}, never>; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -7,3 +7,3 @@ width: number; | ||
}; | ||
export declare function Space(props: Props): JSX.Element; | ||
export declare function Space(props: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { ReactNode } from 'react'; | ||
import React, { ReactNode } from 'react'; | ||
import { TreeNode } from 'react-cosmos-core'; | ||
@@ -18,3 +18,3 @@ import { TreeExpansion } from '../shared/treeExpansion.js'; | ||
}; | ||
export declare function TreeView<Item>({ node, name, parents, expansion, setExpansion, renderNode, }: Props<Item>): JSX.Element; | ||
export declare function TreeView<Item>({ node, name, parents, expansion, setExpansion, renderNode, }: Props<Item>): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureStateValues } from 'react-cosmos-core'; | ||
@@ -9,3 +9,3 @@ import { TreeExpansion } from '../../shared/treeExpansion.js'; | ||
}; | ||
export declare function ExpandCollapseValues({ values, expansion, setExpansion, }: Props): JSX.Element | null; | ||
export declare function ExpandCollapseValues({ values, expansion, setExpansion, }: Props): React.JSX.Element | null; | ||
export {}; |
@@ -5,2 +5,3 @@ import { FixtureElementId, FixtureStatePrimitiveValue, FixtureStateUnserializableValue, TreeNode } from 'react-cosmos-core'; | ||
type: 'collection'; | ||
isArray: boolean; | ||
} | { | ||
@@ -7,0 +8,0 @@ type: 'item'; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -8,3 +8,3 @@ id: string; | ||
}; | ||
export declare function BooleanValueInput({ id, name, data, onChange }: Props): JSX.Element; | ||
export declare function BooleanValueInput({ id, name, data, onChange }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,6 +0,6 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
name: string; | ||
}; | ||
export declare function NullValueInput({ name }: Props): JSX.Element; | ||
export declare function NullValueInput({ name }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -8,3 +8,3 @@ id: string; | ||
}; | ||
export declare function NumberValueInput({ id, name, data, onChange }: Props): JSX.Element; | ||
export declare function NumberValueInput({ id, name, data, onChange }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -8,3 +8,3 @@ id: string; | ||
}; | ||
export declare function StringValueInput({ id, name, data, onChange }: Props): JSX.Element; | ||
export declare function StringValueInput({ id, name, data, onChange }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,6 +0,6 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
name: string; | ||
}; | ||
export declare function UndefinedValueInput({ name }: Props): JSX.Element; | ||
export declare function UndefinedValueInput({ name }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -6,3 +6,3 @@ name: string; | ||
}; | ||
export declare function UnserializableValueInput({ name, data }: Props): JSX.Element; | ||
export declare function UnserializableValueInput({ name, data }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { PrimitiveData } from 'react-cosmos-core'; | ||
@@ -11,3 +11,3 @@ import { LeafValue } from '../shared.js'; | ||
}; | ||
export declare function ValueInput({ value, name, id, indentLevel, onChange }: Props): JSX.Element; | ||
export declare function ValueInput({ value, name, id, indentLevel, onChange }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,5 +0,6 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
name: string; | ||
childNames: string[]; | ||
childrenText: string; | ||
disabled: boolean; | ||
expanded: boolean; | ||
@@ -9,3 +10,3 @@ indentLevel: number; | ||
}; | ||
export declare function ValueInputDir({ name, childNames, expanded, indentLevel, onToggle, }: Props): JSX.Element; | ||
export declare function ValueInputDir({ name, childrenText, disabled, expanded, indentLevel, onToggle, }: Props): React.JSX.Element; | ||
export {}; |
@@ -6,4 +6,3 @@ import React from 'react'; | ||
import { ValueTreeItem } from './shared.js'; | ||
export function ValueInputDir({ name, childNames, expanded, indentLevel, onToggle, }) { | ||
const disabled = childNames.length === 0; | ||
export function ValueInputDir({ name, childrenText, disabled, expanded, indentLevel, onToggle, }) { | ||
return (React.createElement(ValueTreeItem, { indentLevel: indentLevel }, | ||
@@ -16,7 +15,4 @@ React.createElement(ButtonContainer, null, | ||
React.createElement(DirName, { disabled: disabled }, name), | ||
React.createElement(ChildrenInfo, null, getChildInfo(childNames)))))))); | ||
React.createElement(ChildrenInfo, null, childrenText))))))); | ||
} | ||
function getChildInfo(childNames) { | ||
return childNames.length > 0 ? `{ ${childNames.join(', ')} }` : `{}`; | ||
} | ||
const ButtonContainer = styled.div ` | ||
@@ -23,0 +19,0 @@ padding: 2px 0; |
@@ -14,5 +14,12 @@ import { clone, setWith } from 'lodash-es'; | ||
const { data, children } = node; | ||
if (data.type === 'item') | ||
if (data.type === 'item') { | ||
return (React.createElement(ValueInput, { value: data.value, name: name, id: getInputId(id, parents, name), indentLevel: parents.length, onChange: newData => onValueChange(setValueAtPath(values, { type: 'primitive', data: newData }, getValuePath(name, parents))) })); | ||
return (children && (React.createElement(ValueInputDir, { name: name, childNames: Object.keys(children), expanded: expanded, indentLevel: parents.length, onToggle: onToggle }))); | ||
} | ||
if (children) { | ||
const childKeys = Object.keys(children); | ||
return (React.createElement(ValueInputDir, { name: name, childrenText: getChildrenText(childKeys, data.isArray), disabled: childKeys.length === 0, expanded: expanded, indentLevel: parents.length, onToggle: onToggle })); | ||
} | ||
else { | ||
return null; | ||
} | ||
} }))); | ||
@@ -30,2 +37,10 @@ }); | ||
} | ||
function getChildrenText(childKeys, isArray) { | ||
if (childKeys.length > 0) { | ||
return isArray ? `[ ${childKeys.length} ]` : `{ ${childKeys.join(', ')} }`; | ||
} | ||
else { | ||
return isArray ? `[]` : `{}`; | ||
} | ||
} | ||
const Container = styled.div ` | ||
@@ -32,0 +47,0 @@ background: ${grey32}; |
import { FixtureStateValues } from 'react-cosmos-core'; | ||
import { ValueNode } from './shared.js'; | ||
export declare function createValueTree(values: FixtureStateValues): ValueNode; | ||
export declare function createValueTree(values: FixtureStateValues, isArray?: boolean): ValueNode; |
@@ -1,2 +0,2 @@ | ||
export function createValueTree(values) { | ||
export function createValueTree(values, isArray = false) { | ||
const children = {}; | ||
@@ -6,3 +6,3 @@ Object.keys(values).forEach(key => { | ||
if (value.type === 'object') { | ||
children[key] = createValueTree(value.values); | ||
children[key] = createValueTree(value.values, false); | ||
} | ||
@@ -14,9 +14,14 @@ else if (value.type === 'array') { | ||
}); | ||
children[key] = createValueTree(objValues); | ||
children[key] = createValueTree(objValues, true); | ||
} | ||
else { | ||
children[key] = { data: { type: 'item', value } }; | ||
children[key] = { | ||
data: { type: 'item', value }, | ||
}; | ||
} | ||
}); | ||
return { data: { type: 'collection' }, children }; | ||
return { | ||
data: { type: 'collection', isArray }, | ||
children, | ||
}; | ||
} |
import React from 'react'; | ||
declare const _default: ({ children }: { | ||
children: React.ReactNode; | ||
}) => JSX.Element; | ||
}) => React.JSX.Element; | ||
export default _default; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureState, FixtureStateClassState, StateUpdater } from 'react-cosmos-core'; | ||
@@ -10,3 +10,3 @@ import { FixtureExpansion, OnElementExpansionChange } from '../../../components/ValueInputTree/index.js'; | ||
}; | ||
export declare function ComponentClassState({ fsClassState, fixtureExpansion, onFixtureStateChange, onElementExpansionChange, }: Props): JSX.Element; | ||
export declare function ComponentClassState({ fsClassState, fixtureExpansion, onFixtureStateChange, onElementExpansionChange, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureState, StateUpdater } from 'react-cosmos-core'; | ||
@@ -8,3 +8,3 @@ type Props = { | ||
}; | ||
export declare function ControlPanel({ fixtureState, controlActionOrder, onFixtureStateChange, }: Props): JSX.Element | null; | ||
export declare function ControlPanel({ fixtureState, controlActionOrder, onFixtureStateChange, }: Props): React.JSX.Element | null; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureStateSelectControl } from 'react-cosmos-core'; | ||
@@ -8,3 +8,3 @@ type Props = { | ||
}; | ||
export declare function SelectValueInput({ name, control, onChange }: Props): JSX.Element; | ||
export declare function SelectValueInput({ name, control, onChange }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -6,3 +6,3 @@ selected: boolean; | ||
}; | ||
export declare function BookmarkFixtureButton({ selected, onClick }: Props): JSX.Element; | ||
export declare function BookmarkFixtureButton({ selected, onClick }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureId, FlatFixtureTree, FlatFixtureTreeItem } from 'react-cosmos-core'; | ||
@@ -9,3 +9,3 @@ type Props = { | ||
}; | ||
export declare function FixtureBookmarks({ bookmarks, selectedFixtureId, onFixtureSelect, onBookmarkDelete, }: Props): JSX.Element | null; | ||
export declare function FixtureBookmarks({ bookmarks, selectedFixtureId, onFixtureSelect, onBookmarkDelete, }: Props): React.JSX.Element | null; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -7,3 +7,3 @@ fixtureSelected: boolean; | ||
}; | ||
export declare function FixtureSearchHeader({ fixtureSelected, onOpen, onCloseNav, }: Props): JSX.Element; | ||
export declare function FixtureSearchHeader({ fixtureSelected, onOpen, onCloseNav, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureId, FixtureList } from 'react-cosmos-core'; | ||
@@ -13,3 +13,3 @@ type Props = { | ||
}; | ||
export declare function FixtureSearchOverlay({ searchText, fixturesDir, fixtureFileSuffix, fixtures, selectedFixtureId, onSetSearchText, onClose, onSelect, }: Props): JSX.Element; | ||
export declare function FixtureSearchOverlay({ searchText, fixturesDir, fixtureFileSuffix, fixtures, selectedFixtureId, onSetSearchText, onClose, onSelect, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureId, FlatFixtureTreeItem } from 'react-cosmos-core'; | ||
@@ -9,3 +9,3 @@ type Props = { | ||
}; | ||
export declare function FixtureSearchResult({ active, cleanFixturePath, fixtureItem, onSelect, }: Props): JSX.Element; | ||
export declare function FixtureSearchResult({ active, cleanFixturePath, fixtureItem, onSelect, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
export declare function FixtureSearchShortcuts(): JSX.Element; | ||
import React from 'react'; | ||
export declare function FixtureSearchShortcuts(): React.JSX.Element; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -6,5 +6,5 @@ fixturesDir: string; | ||
}; | ||
export declare function BlankState({ fixturesDir, fixtureFileSuffix }: Props): JSX.Element; | ||
export declare function BlankState({ fixturesDir, fixtureFileSuffix }: Props): React.JSX.Element; | ||
export declare const IconContainer: import("styled-components").StyledComponent<"div", any, {}, never>; | ||
export declare const NoWrap: import("styled-components").StyledComponent<"span", any, {}, never>; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { RefObject } from 'react'; | ||
import React, { RefObject } from 'react'; | ||
import { FixtureId } from 'react-cosmos-core'; | ||
@@ -11,3 +11,3 @@ type Props = { | ||
}; | ||
export declare function FixtureButton({ name, fixturePath, indentLevel, selected, selectedRef, onSelect, }: Props): JSX.Element; | ||
export declare function FixtureButton({ name, fixturePath, indentLevel, selected, selectedRef, onSelect, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -9,3 +9,3 @@ name: string; | ||
}; | ||
export declare function FixtureDir({ name, expanded, indentLevel, selected, onToggle, }: Props): JSX.Element; | ||
export declare function FixtureDir({ name, expanded, indentLevel, selected, onToggle, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { ReactNode } from 'react'; | ||
import React, { ReactNode } from 'react'; | ||
import { FixtureId } from 'react-cosmos-core'; | ||
@@ -8,3 +8,3 @@ type Props = { | ||
}; | ||
export declare function FixtureLink({ children, fixtureId, onSelect }: Props): JSX.Element; | ||
export declare function FixtureLink({ children, fixtureId, onSelect }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { RefObject } from 'react'; | ||
import React, { RefObject } from 'react'; | ||
import { FixtureId } from 'react-cosmos-core'; | ||
@@ -13,3 +13,3 @@ type Props = { | ||
}; | ||
export declare function MultiFixtureButton({ name, fixturePath, fixtureNames, indentLevel, selected, selectedFixtureId, selectedRef, onSelect, }: Props): JSX.Element; | ||
export declare function MultiFixtureButton({ name, fixturePath, fixtureNames, indentLevel, selected, selectedFixtureId, selectedRef, onSelect, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { RefObject } from 'react'; | ||
import React, { RefObject } from 'react'; | ||
import { FixtureId } from 'react-cosmos-core'; | ||
@@ -11,3 +11,3 @@ type Props = { | ||
}; | ||
export declare function MultiFixtureChildButton({ name, fixtureId, indentLevel, selected, selectedRef, onSelect, }: Props): JSX.Element; | ||
export declare function MultiFixtureChildButton({ name, fixtureId, indentLevel, selected, selectedRef, onSelect, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureId, FixtureList } from 'react-cosmos-core'; | ||
@@ -13,3 +13,3 @@ import { TreeExpansion } from '../../shared/treeExpansion.js'; | ||
}; | ||
export declare function FixtureTreeContainer({ fixturesDir, fixtureFileSuffix, selectedFixtureId, fixtures, expansion, selectFixture, setExpansion, }: Props): JSX.Element; | ||
export declare function FixtureTreeContainer({ fixturesDir, fixtureFileSuffix, selectedFixtureId, fixtures, expansion, selectFixture, setExpansion, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureList } from 'react-cosmos-core'; | ||
@@ -11,3 +11,3 @@ import { TreeExpansion } from '../../shared/treeExpansion.js'; | ||
}; | ||
export declare function FixtureTreeHeader({ fixturesDir, fixtureFileSuffix, fixtures, expansion, setExpansion, }: Props): JSX.Element; | ||
export declare function FixtureTreeHeader({ fixturesDir, fixtureFileSuffix, fixtures, expansion, setExpansion, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,6 +0,6 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
onClick: () => void; | ||
}; | ||
export declare function FullScreenButton({ onClick }: Props): JSX.Element; | ||
export declare function FullScreenButton({ onClick }: Props): React.JSX.Element; | ||
export {}; |
import React from 'react'; | ||
import { buildRendererQueryString } from 'react-cosmos-core'; | ||
import { createRendererUrl } from 'react-cosmos-core'; | ||
import { createPlugin } from 'react-plugin'; | ||
@@ -15,9 +15,10 @@ import { FullScreenButton } from './FullScreenButton.js'; | ||
const onSelect = React.useCallback(() => { | ||
const query = buildRendererQueryString({ fixtureId, locked: true }); | ||
const fixtureUrl = `${rendererUrl}${query}`; | ||
// noopener is required to prevent reuse of sessionStorage from the | ||
// Playground window, thus making sure the remote renderer will generate | ||
// a different rendererId from the iframe renderer. | ||
// https://stackoverflow.com/a/73821739 | ||
window.open(fixtureUrl, '_blank', 'noopener=true'); | ||
if (rendererUrl) { | ||
const fixtureUrl = createRendererUrl(rendererUrl, fixtureId, true); | ||
// noopener is required to prevent reuse of sessionStorage from the | ||
// Playground window, thus making sure the remote renderer will generate | ||
// a different rendererId from the iframe renderer. | ||
// https://stackoverflow.com/a/73821739 | ||
window.open(fixtureUrl, '_blank', 'noopener=true'); | ||
} | ||
}, [fixtureId, rendererUrl]); | ||
@@ -24,0 +25,0 @@ React.useEffect(() => { |
@@ -9,3 +9,3 @@ import { rendererSocketMessage, } from 'react-cosmos-core'; | ||
} | ||
socket = new WebSocket(location.origin.replace(/^https?:/, 'ws:')); | ||
socket = new WebSocket(location.origin.replace(/^https:/, 'wss:').replace(/^http:/, 'ws:')); | ||
socket.addEventListener('open', () => { | ||
@@ -12,0 +12,0 @@ if (socket && pendingMessages.length > 0) { |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { NotificationItem } from './spec.js'; | ||
@@ -6,3 +6,3 @@ type Props = { | ||
}; | ||
export declare function Notifications({ notifications }: Props): JSX.Element; | ||
export declare function Notifications({ notifications }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
export type SimplePlugin = { | ||
@@ -10,3 +10,3 @@ name: string; | ||
}; | ||
export declare function PluginList({ plugins, enable }: Props): JSX.Element; | ||
export declare function PluginList({ plugins, enable }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,4 +0,4 @@ | ||
/// <reference types="react" /> | ||
export declare function BlankState(): JSX.Element; | ||
import React from 'react'; | ||
export declare function BlankState(): React.JSX.Element; | ||
export declare const IconContainer: import("styled-components").StyledComponent<"div", any, {}, never>; | ||
export declare const NoWrap: import("styled-components").StyledComponent<"span", any, {}, never>; |
@@ -42,6 +42,3 @@ import React from 'react'; | ||
function shouldShowBlankState(fixtureState) { | ||
// Don't show blank state until props (empty or not) have been read | ||
if (!fixtureState.props) | ||
return false; | ||
const hasProps = fixtureState.props.some(hasFsValues); | ||
const hasProps = fixtureState.props && fixtureState.props.some(hasFsValues); | ||
if (hasProps) | ||
@@ -48,0 +45,0 @@ return false; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureState, FixtureStateProps, StateUpdater } from 'react-cosmos-core'; | ||
@@ -10,3 +10,3 @@ import { FixtureExpansion, OnElementExpansionChange } from '../../../components/ValueInputTree/index.js'; | ||
}; | ||
export declare function ComponentProps({ fsProps, fixtureExpansion, onFixtureStateChange, onElementExpansionChange, }: Props): JSX.Element; | ||
export declare function ComponentProps({ fsProps, fixtureExpansion, onFixtureStateChange, onElementExpansionChange, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { NotificationItem } from '../../Notifications/spec.js'; | ||
@@ -8,3 +8,3 @@ type Props = { | ||
}; | ||
export declare function RemoteButton({ devServerOn, rendererUrl, pushNotification, }: Props): JSX.Element | null; | ||
export declare function RemoteButton({ devServerOn, rendererUrl, pushNotification, }: Props): React.JSX.Element | null; | ||
export {}; |
import React from 'react'; | ||
import { createRendererUrl } from 'react-cosmos-core'; | ||
import { IconButton32 } from '../../../components/buttons/index.js'; | ||
@@ -9,3 +10,3 @@ import { CastIcon } from '../../../components/icons/index.js'; | ||
} | ||
return (React.createElement(IconButton32, { icon: React.createElement(CastIcon, null), title: "Copy remote renderer URL", onClick: () => copyRendererUrlToClipboard(rendererUrl) })); | ||
return (React.createElement(IconButton32, { icon: React.createElement(CastIcon, null), title: "Copy remote renderer URL", onClick: () => copyRendererUrlToClipboard(createRendererUrl(rendererUrl)) })); | ||
async function copyRendererUrlToClipboard(url) { | ||
@@ -12,0 +13,0 @@ const fullUrl = getFullUrl(url); |
import { createPlugin } from 'react-plugin'; | ||
import { onRouterFixtureChange } from './onRouterFixtureChange.js'; | ||
import { onRouterFixtureReselect } from './onRouterFixtureReselect.js'; | ||
import { onRouterFixtureSelect } from './onRouterFixtureSelect.js'; | ||
import { onRouterFixtureUnselect } from './onRouterFixtureUnselect.js'; | ||
import { receiveResponse } from './receiveResponse/index.js'; | ||
@@ -35,3 +37,7 @@ import { reloadRenderer } from './reloadRenderer.js'; | ||
}); | ||
on('router', { fixtureChange: onRouterFixtureChange }); | ||
on('router', { | ||
fixtureSelect: onRouterFixtureSelect, | ||
fixtureReselect: onRouterFixtureReselect, | ||
fixtureUnselect: onRouterFixtureUnselect, | ||
}); | ||
export { register }; | ||
@@ -38,0 +44,0 @@ if (process.env.NODE_ENV !== 'test') |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
export declare function RemoteRendererConnected(): JSX.Element; | ||
import React from 'react'; | ||
export declare function RemoteRendererConnected(): React.JSX.Element; |
@@ -1,6 +0,6 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
rendererConnected: boolean; | ||
}; | ||
export declare function RemoteRendererOverlay({ rendererConnected }: Props): JSX.Element; | ||
export declare function RemoteRendererOverlay({ rendererConnected }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { RuntimeStatus } from '../spec.js'; | ||
@@ -6,3 +6,3 @@ type Props = { | ||
}; | ||
export declare function RendererOverlay({ runtimeStatus }: Props): JSX.Element | null; | ||
export declare function RendererOverlay({ runtimeStatus }: Props): React.JSX.Element | null; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
export declare function WaitingForRenderer(): JSX.Element; | ||
import React from 'react'; | ||
export declare function WaitingForRenderer(): React.JSX.Element; |
import React from 'react'; | ||
import { createRendererUrl } from 'react-cosmos-core'; | ||
import { Slot } from 'react-plugin'; | ||
@@ -14,3 +15,3 @@ import styled from 'styled-components'; | ||
React.createElement(Container, null, | ||
React.createElement(Iframe, { "data-testid": "previewIframe", ref: onIframeRef, src: rendererUrl, frameBorder: 0, allow: "clipboard-write *" }), | ||
React.createElement(Iframe, { "data-testid": "previewIframe", ref: onIframeRef, src: createRendererUrl(rendererUrl), frameBorder: 0, allow: "clipboard-write *; fullscreen *;" }), | ||
React.createElement(RendererOverlay, { runtimeStatus: runtimeStatus })))); | ||
@@ -17,0 +18,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import { Dispatch, ReactNode, SetStateAction } from 'react'; | ||
import React, { Dispatch, ReactNode, SetStateAction } from 'react'; | ||
import { ResponsiveDevice, ResponsiveViewport } from '../spec.js'; | ||
@@ -12,3 +12,3 @@ type Props = { | ||
}; | ||
export declare function ResponsivePreview({ children, devices, enabled, viewport, scaled, setViewport, setScaled, }: Props): JSX.Element; | ||
export declare function ResponsivePreview({ children, devices, enabled, viewport, scaled, setViewport, setScaled, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -6,3 +6,3 @@ selected: boolean; | ||
}; | ||
export declare function ToggleButton({ selected, onToggle }: Props): JSX.Element; | ||
export declare function ToggleButton({ selected, onToggle }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -6,3 +6,3 @@ rendererConnected: boolean; | ||
}; | ||
export declare function GlobalHeader({ rendererConnected, globalActionOrder }: Props): JSX.Element; | ||
export declare function GlobalHeader({ rendererConnected, globalActionOrder }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -7,3 +7,3 @@ welcomeDismissed: boolean; | ||
}; | ||
export declare function HomeOverlay({ welcomeDismissed, onDismissWelcome, onShowWelcome, }: Props): JSX.Element; | ||
export declare function HomeOverlay({ welcomeDismissed, onDismissWelcome, onShowWelcome, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -6,3 +6,3 @@ keys: string[]; | ||
}; | ||
export declare function KeyShortcut({ keys, label }: Props): JSX.Element; | ||
export declare function KeyShortcut({ keys, label }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,6 +0,6 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
onShowWelcome: () => unknown; | ||
}; | ||
export declare function NoFixtureSelected({ onShowWelcome }: Props): JSX.Element; | ||
export declare function NoFixtureSelected({ onShowWelcome }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,6 +0,6 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
onDismissWelcome: () => unknown; | ||
}; | ||
export declare function WelcomeCosmos({ onDismissWelcome }: Props): JSX.Element; | ||
export declare function WelcomeCosmos({ onDismissWelcome }: Props): React.JSX.Element; | ||
export {}; |
export const NAV_OPEN_STORAGE_KEY = 'navOpen'; | ||
const NAV_OPEN_DEFAULT = true; | ||
const NAV_OPEN_DEFAULT = window.innerWidth >= 640; | ||
export function isNavOpen(context) { | ||
@@ -4,0 +4,0 @@ const storage = context.getMethodsOf('storage'); |
export const PANEL_OPEN_STORAGE_KEY = 'sidePanelOpen'; | ||
const PANEL_OPEN_DEFAULT = true; | ||
const PANEL_OPEN_DEFAULT = window.innerWidth >= 960; | ||
export function isPanelOpen(context) { | ||
@@ -4,0 +4,0 @@ const storage = context.getMethodsOf('storage'); |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureId, FixtureState, FlatFixtureTreeItem, StateUpdater } from 'react-cosmos-core'; | ||
@@ -29,3 +29,3 @@ type Props = { | ||
}; | ||
export declare function Root({ fixtureItems, selectedFixtureId, rendererConnected, fixtureState, navOpen, panelOpen, navWidth, panelWidth, sidePanelRowOrder, globalActionOrder, globalOrder, navRowOrder, fixtureActionOrder, rendererActionOrder, onToggleNav, onTogglePanel, onReloadRenderer, onCloseFixture, onFixtureStateChange, setNavWidth, setPanelWidth, welcomeDismissed, onDismissWelcome, onShowWelcome, }: Props): JSX.Element; | ||
export declare function Root({ fixtureItems, selectedFixtureId, rendererConnected, fixtureState, navOpen, panelOpen, navWidth, panelWidth, sidePanelRowOrder, globalActionOrder, globalOrder, navRowOrder, fixtureActionOrder, rendererActionOrder, onToggleNav, onTogglePanel, onReloadRenderer, onCloseFixture, onFixtureStateChange, setNavWidth, setPanelWidth, welcomeDismissed, onDismissWelcome, onShowWelcome, }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
type Props = { | ||
@@ -7,3 +7,3 @@ disabled?: boolean; | ||
}; | ||
export declare function ToggleNavButton({ disabled, selected, onToggle }: Props): JSX.Element; | ||
export declare function ToggleNavButton({ disabled, selected, onToggle }: Props): React.JSX.Element; | ||
export {}; |
@@ -6,2 +6,5 @@ import { isEqual } from 'lodash-es'; | ||
name: 'router', | ||
defaultConfig: { | ||
initialFixtureId: null, | ||
}, | ||
initialState: { | ||
@@ -17,4 +20,8 @@ urlParams: {}, | ||
onLoad(context => { | ||
const { setState } = context; | ||
const { getConfig, setState } = context; | ||
setState({ urlParams: getUrlParams() }); | ||
const { initialFixtureId } = getConfig(); | ||
if (initialFixtureId) { | ||
selectFixture(context, initialFixtureId); | ||
} | ||
return subscribeToLocationChanges((urlParams) => { | ||
@@ -25,3 +32,3 @@ const { fixtureId } = context.getState().urlParams; | ||
if (fixtureChanged) { | ||
emitFixtureChangeEvent(context); | ||
emitFixtureChangeEvent(context, true); | ||
} | ||
@@ -47,14 +54,26 @@ }); | ||
const urlParamsEqual = isEqual(nextUrlParams, urlParams); | ||
context.setState({ urlParams: nextUrlParams }, () => { | ||
// Setting identical url params is considered a "reset" request | ||
if (fixtureChanged || urlParamsEqual) { | ||
emitFixtureChangeEvent(context); | ||
} | ||
if (!urlParamsEqual) { | ||
if (urlParamsEqual) { | ||
// Setting identical URL params can be considered a "reset" request, but | ||
// this will only re-render the fixture if the renderer implements an | ||
// auto-incrementing render key in its state | ||
emitFixtureChangeEvent(context, false); | ||
} | ||
else { | ||
context.setState({ urlParams: nextUrlParams }, () => { | ||
pushUrlParams(context.getState().urlParams); | ||
} | ||
}); | ||
emitFixtureChangeEvent(context, fixtureChanged); | ||
}); | ||
} | ||
} | ||
function emitFixtureChangeEvent(context) { | ||
context.emit('fixtureChange', getSelectedFixtureId(context)); | ||
function emitFixtureChangeEvent(context, fixtureChanged) { | ||
const fixtureId = getSelectedFixtureId(context); | ||
if (!fixtureId) { | ||
context.emit('fixtureUnselect'); | ||
} | ||
else if (fixtureChanged) { | ||
context.emit('fixtureSelect', fixtureId); | ||
} | ||
else { | ||
context.emit('fixtureReselect', fixtureId); | ||
} | ||
} |
import { FixtureId, PlaygroundParams } from 'react-cosmos-core'; | ||
export type RouterSpec = { | ||
name: 'router'; | ||
config: { | ||
initialFixtureId: null | FixtureId; | ||
}; | ||
state: { | ||
@@ -13,4 +16,6 @@ urlParams: PlaygroundParams; | ||
events: { | ||
fixtureChange(fixtureId: null | FixtureId): void; | ||
fixtureSelect(fixtureId: FixtureId): void; | ||
fixtureReselect(fixtureId: FixtureId): void; | ||
fixtureUnselect(): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureStateControls } from 'react-cosmos-core'; | ||
@@ -10,3 +10,3 @@ export type ControlActionSlotProps = { | ||
}; | ||
export declare function ControlActionSlot({ slotProps, plugOrder }: Props): JSX.Element; | ||
export declare function ControlActionSlot({ slotProps, plugOrder }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureState, FixtureStateControl, StateUpdater } from 'react-cosmos-core'; | ||
@@ -11,3 +11,3 @@ export type ControlSlotProps<TControl extends FixtureStateControl> = { | ||
}; | ||
export declare function ControlSlot({ slotProps }: Props): JSX.Element; | ||
export declare function ControlSlot({ slotProps }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FlatFixtureTreeItem } from 'react-cosmos-core'; | ||
@@ -10,3 +10,3 @@ export type FixtureActionSlotProps = { | ||
}; | ||
export declare function FixtureActionSlot({ slotProps, plugOrder }: Props): JSX.Element; | ||
export declare function FixtureActionSlot({ slotProps, plugOrder }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
export type NavRowSlotProps = { | ||
@@ -9,3 +9,3 @@ onCloseNav: () => unknown; | ||
}; | ||
export declare function NavRowSlot({ slotProps, plugOrder }: Props): JSX.Element; | ||
export declare function NavRowSlot({ slotProps, plugOrder }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureId } from 'react-cosmos-core'; | ||
@@ -10,3 +10,3 @@ export type RendererActionSlotProps = { | ||
}; | ||
export declare function RendererActionSlot({ slotProps, plugOrder }: Props): JSX.Element; | ||
export declare function RendererActionSlot({ slotProps, plugOrder }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { FixtureId, FixtureState, StateUpdater } from 'react-cosmos-core'; | ||
@@ -12,3 +12,3 @@ export type SidePanelRowSlotProps = { | ||
}; | ||
export declare function SidePanelRowSlot({ slotProps, plugOrder }: Props): JSX.Element; | ||
export declare function SidePanelRowSlot({ slotProps, plugOrder }: Props): React.JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { ReactNode } from 'react'; | ||
import React, { ReactNode } from 'react'; | ||
import { FixtureStatePrimitiveValue, FixtureStateUnserializableValue, PrimitiveData } from 'react-cosmos-core'; | ||
@@ -15,3 +15,3 @@ type LeafValue = FixtureStatePrimitiveValue | FixtureStateUnserializableValue; | ||
}; | ||
export declare function ValueInputSlot({ children, slotProps }: Props): JSX.Element; | ||
export declare function ValueInputSlot({ children, slotProps }: Props): React.JSX.Element; | ||
export {}; |
@@ -105,3 +105,5 @@ /// <reference types="jest" /> | ||
export declare function onRouter(events?: EventsOf<RouterSpec>): { | ||
fixtureChange: jest.Mock<any, any, any> | import("ui-plugin/dist/types/PluginContextHandlers.js").PluginEventHandler<any, [fixtureId: import("react-cosmos-core").FixtureId | null]>; | ||
fixtureSelect: jest.Mock<any, any, any> | import("ui-plugin/dist/types/PluginContextHandlers.js").PluginEventHandler<any, [fixtureId: import("react-cosmos-core").FixtureId]>; | ||
fixtureReselect: jest.Mock<any, any, any> | import("ui-plugin/dist/types/PluginContextHandlers.js").PluginEventHandler<any, [fixtureId: import("react-cosmos-core").FixtureId]>; | ||
fixtureUnselect: jest.Mock<any, any, any> | import("ui-plugin/dist/types/PluginContextHandlers.js").PluginEventHandler<any, []>; | ||
}; | ||
@@ -108,0 +110,0 @@ export declare function onMessageHandler(events?: EventsOf<MessageHandlerSpec>): { |
@@ -116,3 +116,5 @@ import { getPluginContext, } from 'react-plugin'; | ||
const allEvents = { | ||
fixtureChange: jest.fn(), | ||
fixtureSelect: jest.fn(), | ||
fixtureReselect: jest.fn(), | ||
fixtureUnselect: jest.fn(), | ||
...events, | ||
@@ -119,0 +121,0 @@ }; |
{ | ||
"name": "react-cosmos-ui", | ||
"version": "6.0.0-canary.86644b2.0+86644b2", | ||
"version": "6.0.0-canary.8bec88a.0+8bec88a", | ||
"description": "React Cosmos UI", | ||
@@ -18,3 +18,3 @@ "repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos-ui", | ||
"lodash-es": "^4.17.21", | ||
"react-cosmos-core": "6.0.0-canary.86644b2.0+86644b2" | ||
"react-cosmos-core": "6.0.0-canary.8bec88a.0+8bec88a" | ||
}, | ||
@@ -27,3 +27,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "86644b27e838006a0b58c8e917fa1b10e92c956b" | ||
"gitHead": "8bec88a5fb22c1fbc39ca241d1e4b22b7bf9cdaa" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
2892389
381
10355