react-cosmos-ui 6.0.0-alpha.0
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/LICENSE +21 -0
- package/dist/components/BaseSvg.d.ts +9 -0
- package/dist/components/BaseSvg.js +8 -0
- package/dist/components/Icon.d.ts +7 -0
- package/dist/components/Icon.js +5 -0
- package/dist/components/Illustration.d.ts +8 -0
- package/dist/components/Illustration.js +5 -0
- package/dist/components/KeyBox.d.ts +9 -0
- package/dist/components/KeyBox.js +28 -0
- package/dist/components/SidePanel.d.ts +10 -0
- package/dist/components/SidePanel.js +52 -0
- package/dist/components/Space.d.ts +7 -0
- package/dist/components/Space.js +8 -0
- package/dist/components/TreeView.d.ts +19 -0
- package/dist/components/TreeView.js +26 -0
- package/dist/components/ValueInputTree/ExpandCollapseValues.d.ts +9 -0
- package/dist/components/ValueInputTree/ExpandCollapseValues.js +11 -0
- package/dist/components/ValueInputTree/ValueInput/BooleanValueInput.d.ts +8 -0
- package/dist/components/ValueInputTree/ValueInput/BooleanValueInput.js +32 -0
- package/dist/components/ValueInputTree/ValueInput/NullValueInput.d.ts +5 -0
- package/dist/components/ValueInputTree/ValueInput/NullValueInput.js +9 -0
- package/dist/components/ValueInputTree/ValueInput/NumberValueInput.d.ts +8 -0
- package/dist/components/ValueInputTree/ValueInput/NumberValueInput.js +14 -0
- package/dist/components/ValueInputTree/ValueInput/StringValueInput.d.ts +8 -0
- package/dist/components/ValueInputTree/ValueInput/StringValueInput.js +18 -0
- package/dist/components/ValueInputTree/ValueInput/UndefinedValueInput.d.ts +5 -0
- package/dist/components/ValueInputTree/ValueInput/UndefinedValueInput.js +9 -0
- package/dist/components/ValueInputTree/ValueInput/UnserializableValueInput.d.ts +6 -0
- package/dist/components/ValueInputTree/ValueInput/UnserializableValueInput.js +11 -0
- package/dist/components/ValueInputTree/ValueInput/ValueInput.d.ts +11 -0
- package/dist/components/ValueInputTree/ValueInput/ValueInput.js +30 -0
- package/dist/components/ValueInputTree/ValueInput/shared.d.ts +6 -0
- package/dist/components/ValueInputTree/ValueInput/shared.js +41 -0
- package/dist/components/ValueInputTree/ValueInputDir.d.ts +9 -0
- package/dist/components/ValueInputTree/ValueInputDir.js +68 -0
- package/dist/components/ValueInputTree/ValueInputTree.d.ts +12 -0
- package/dist/components/ValueInputTree/ValueInputTree.js +32 -0
- package/dist/components/ValueInputTree/index.d.ts +4 -0
- package/dist/components/ValueInputTree/index.js +4 -0
- package/dist/components/ValueInputTree/shared.d.ts +16 -0
- package/dist/components/ValueInputTree/shared.js +15 -0
- package/dist/components/ValueInputTree/valueGroups.d.ts +8 -0
- package/dist/components/ValueInputTree/valueGroups.js +10 -0
- package/dist/components/ValueInputTree/valueTree.d.ts +3 -0
- package/dist/components/ValueInputTree/valueTree.js +20 -0
- package/dist/components/ValueInputTree/valueTreeExpansion.d.ts +7 -0
- package/dist/components/ValueInputTree/valueTreeExpansion.js +16 -0
- package/dist/components/buttons/Button32.d.ts +11 -0
- package/dist/components/buttons/Button32.js +8 -0
- package/dist/components/buttons/Button8.d.ts +11 -0
- package/dist/components/buttons/Button8.js +8 -0
- package/dist/components/buttons/IconButton32.d.ts +10 -0
- package/dist/components/buttons/IconButton32.js +7 -0
- package/dist/components/buttons/IconButton8.d.ts +10 -0
- package/dist/components/buttons/IconButton8.js +7 -0
- package/dist/components/buttons/index.d.ts +4 -0
- package/dist/components/buttons/index.js +4 -0
- package/dist/components/buttons/shared.d.ts +15 -0
- package/dist/components/buttons/shared.js +52 -0
- package/dist/components/icons/index.d.ts +33 -0
- package/dist/components/icons/index.js +107 -0
- package/dist/components/illustrations/ArtificialIntelligence.d.ts +3 -0
- package/dist/components/illustrations/ArtificialIntelligence.js +123 -0
- package/dist/components/illustrations/Astronaut.d.ts +3 -0
- package/dist/components/illustrations/Astronaut.js +72 -0
- package/dist/components/illustrations/BlankCanvas.d.ts +3 -0
- package/dist/components/illustrations/BlankCanvas.js +75 -0
- package/dist/components/inputs/NumberInput.d.ts +15 -0
- package/dist/components/inputs/NumberInput.js +79 -0
- package/dist/components/inputs/Select.d.ts +16 -0
- package/dist/components/inputs/Select.js +69 -0
- package/dist/components/inputs/shared.d.ts +14 -0
- package/dist/components/inputs/shared.js +43 -0
- package/dist/cosmos.decorator.d.ts +5 -0
- package/dist/cosmos.decorator.js +6 -0
- package/dist/cosmos.loadPlugins.d.ts +1 -0
- package/dist/cosmos.loadPlugins.js +17 -0
- package/dist/hooks/useDrag.d.ts +14 -0
- package/dist/hooks/useDrag.js +58 -0
- package/dist/hooks/useFocus.d.ts +5 -0
- package/dist/hooks/useFocus.js +7 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +36 -0
- package/dist/playground.bundle.js +1358 -0
- package/dist/playground.bundle.js.LICENSE.txt +64 -0
- package/dist/playground.bundle.js.map +1 -0
- package/dist/playground.d.ts +11 -0
- package/dist/playground.js +36 -0
- package/dist/playgroundConfig.d.ts +10 -0
- package/dist/playgroundConfig.js +1 -0
- package/dist/plugins/BuildNotifications/index.d.ts +2 -0
- package/dist/plugins/BuildNotifications/index.js +35 -0
- package/dist/plugins/BuildNotifications/spec.d.ts +3 -0
- package/dist/plugins/BuildNotifications/spec.js +1 -0
- package/dist/plugins/ClassStatePanel/ClassStatePanel/ComponentClassState.d.ts +10 -0
- package/dist/plugins/ClassStatePanel/ClassStatePanel/ComponentClassState.js +36 -0
- package/dist/plugins/ClassStatePanel/ClassStatePanel/index.d.ts +11 -0
- package/dist/plugins/ClassStatePanel/ClassStatePanel/index.js +13 -0
- package/dist/plugins/ClassStatePanel/ClassStatePanel/shared.d.ts +2 -0
- package/dist/plugins/ClassStatePanel/ClassStatePanel/shared.js +16 -0
- package/dist/plugins/ClassStatePanel/index.d.ts +2 -0
- package/dist/plugins/ClassStatePanel/index.js +30 -0
- package/dist/plugins/ClassStatePanel/shared.d.ts +1 -0
- package/dist/plugins/ClassStatePanel/shared.js +1 -0
- package/dist/plugins/ClassStatePanel/spec.d.ts +3 -0
- package/dist/plugins/ClassStatePanel/spec.js +1 -0
- package/dist/plugins/ContentOverlay/ContentOverlay.d.ts +13 -0
- package/dist/plugins/ContentOverlay/ContentOverlay.js +34 -0
- package/dist/plugins/ContentOverlay/KeyShortcut.d.ts +6 -0
- package/dist/plugins/ContentOverlay/KeyShortcut.js +30 -0
- package/dist/plugins/ContentOverlay/NoFixtureSelected.d.ts +5 -0
- package/dist/plugins/ContentOverlay/NoFixtureSelected.js +34 -0
- package/dist/plugins/ContentOverlay/RendererNotResponding.d.ts +1 -0
- package/dist/plugins/ContentOverlay/RendererNotResponding.js +109 -0
- package/dist/plugins/ContentOverlay/WelcomeCosmos.d.ts +5 -0
- package/dist/plugins/ContentOverlay/WelcomeCosmos.js +158 -0
- package/dist/plugins/ContentOverlay/cosmos.decorator.d.ts +5 -0
- package/dist/plugins/ContentOverlay/cosmos.decorator.js +13 -0
- package/dist/plugins/ContentOverlay/index.d.ts +2 -0
- package/dist/plugins/ContentOverlay/index.js +19 -0
- package/dist/plugins/ContentOverlay/shared.d.ts +9 -0
- package/dist/plugins/ContentOverlay/shared.js +75 -0
- package/dist/plugins/ContentOverlay/spec.d.ts +3 -0
- package/dist/plugins/ContentOverlay/spec.js +1 -0
- package/dist/plugins/ContentOverlay/welcomeDismiss.d.ts +7 -0
- package/dist/plugins/ContentOverlay/welcomeDismiss.js +17 -0
- package/dist/plugins/ControlPanel/ControlPanel.d.ts +8 -0
- package/dist/plugins/ControlPanel/ControlPanel.js +37 -0
- package/dist/plugins/ControlPanel/index.d.ts +2 -0
- package/dist/plugins/ControlPanel/index.js +17 -0
- package/dist/plugins/ControlPanel/spec.d.ts +6 -0
- package/dist/plugins/ControlPanel/spec.js +1 -0
- package/dist/plugins/ControlSelect/SelectValueInput.d.ts +8 -0
- package/dist/plugins/ControlSelect/SelectValueInput.js +15 -0
- package/dist/plugins/ControlSelect/index.d.ts +2 -0
- package/dist/plugins/ControlSelect/index.js +22 -0
- package/dist/plugins/ControlSelect/spec.d.ts +3 -0
- package/dist/plugins/ControlSelect/spec.js +1 -0
- package/dist/plugins/Core/index.d.ts +2 -0
- package/dist/plugins/Core/index.js +68 -0
- package/dist/plugins/Core/spec.d.ts +25 -0
- package/dist/plugins/Core/spec.js +1 -0
- package/dist/plugins/FixtureBookmark/BookmarkFixtureButton.d.ts +6 -0
- package/dist/plugins/FixtureBookmark/BookmarkFixtureButton.js +6 -0
- package/dist/plugins/FixtureBookmark/FixtureBookmarks.d.ts +10 -0
- package/dist/plugins/FixtureBookmark/FixtureBookmarks.js +123 -0
- package/dist/plugins/FixtureBookmark/index.d.ts +2 -0
- package/dist/plugins/FixtureBookmark/index.js +46 -0
- package/dist/plugins/FixtureBookmark/spec.d.ts +3 -0
- package/dist/plugins/FixtureBookmark/spec.js +1 -0
- package/dist/plugins/FixtureSearch/FixtureSearchHeader.d.ts +7 -0
- package/dist/plugins/FixtureSearch/FixtureSearchHeader.js +66 -0
- package/dist/plugins/FixtureSearch/FixtureSearchOverlay.d.ts +13 -0
- package/dist/plugins/FixtureSearch/FixtureSearchOverlay.js +312 -0
- package/dist/plugins/FixtureSearch/FixtureSearchResult.d.ts +9 -0
- package/dist/plugins/FixtureSearch/FixtureSearchResult.js +48 -0
- package/dist/plugins/FixtureSearch/FixtureSearchShortcuts.d.ts +1 -0
- package/dist/plugins/FixtureSearch/FixtureSearchShortcuts.js +60 -0
- package/dist/plugins/FixtureSearch/index.d.ts +2 -0
- package/dist/plugins/FixtureSearch/index.js +72 -0
- package/dist/plugins/FixtureSearch/spec.d.ts +7 -0
- package/dist/plugins/FixtureSearch/spec.js +1 -0
- package/dist/plugins/FixtureTree/BlankState.d.ts +8 -0
- package/dist/plugins/FixtureTree/BlankState.js +75 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureButton.d.ts +12 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureButton.js +16 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureDir.d.ts +9 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureDir.js +46 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureLink.d.ts +9 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureLink.js +34 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureTree.d.ts +13 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureTree.js +37 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureTreeItem.d.ts +6 -0
- package/dist/plugins/FixtureTree/FixtureTree/FixtureTreeItem.js +24 -0
- package/dist/plugins/FixtureTree/FixtureTree/MultiFixtureButton.d.ts +13 -0
- package/dist/plugins/FixtureTree/FixtureTree/MultiFixtureButton.js +46 -0
- package/dist/plugins/FixtureTree/FixtureTree/MultiFixtureChildButton.d.ts +12 -0
- package/dist/plugins/FixtureTree/FixtureTree/MultiFixtureChildButton.js +26 -0
- package/dist/plugins/FixtureTree/FixtureTreeContainer.d.ts +14 -0
- package/dist/plugins/FixtureTree/FixtureTreeContainer.js +28 -0
- package/dist/plugins/FixtureTree/FixtureTreeHeader.d.ts +11 -0
- package/dist/plugins/FixtureTree/FixtureTreeHeader.js +33 -0
- package/dist/plugins/FixtureTree/index.d.ts +2 -0
- package/dist/plugins/FixtureTree/index.js +25 -0
- package/dist/plugins/FixtureTree/revealFixture.d.ts +3 -0
- package/dist/plugins/FixtureTree/revealFixture.js +48 -0
- package/dist/plugins/FixtureTree/shared.d.ts +7 -0
- package/dist/plugins/FixtureTree/shared.js +8 -0
- package/dist/plugins/FixtureTree/spec.d.ts +7 -0
- package/dist/plugins/FixtureTree/spec.js +1 -0
- package/dist/plugins/FixtureTree/useScrollToSelected.d.ts +6 -0
- package/dist/plugins/FixtureTree/useScrollToSelected.js +18 -0
- package/dist/plugins/FullScreenButton/FullScreenButton.d.ts +5 -0
- package/dist/plugins/FullScreenButton/FullScreenButton.js +6 -0
- package/dist/plugins/FullScreenButton/index.d.ts +2 -0
- package/dist/plugins/FullScreenButton/index.js +25 -0
- package/dist/plugins/FullScreenButton/spec.d.ts +3 -0
- package/dist/plugins/FullScreenButton/spec.js +1 -0
- package/dist/plugins/MessageHandler/index.d.ts +2 -0
- package/dist/plugins/MessageHandler/index.js +12 -0
- package/dist/plugins/MessageHandler/shared.d.ts +3 -0
- package/dist/plugins/MessageHandler/shared.js +1 -0
- package/dist/plugins/MessageHandler/socket.d.ts +4 -0
- package/dist/plugins/MessageHandler/socket.js +45 -0
- package/dist/plugins/MessageHandler/spec.d.ts +11 -0
- package/dist/plugins/MessageHandler/spec.js +1 -0
- package/dist/plugins/Notifications/Notifications.d.ts +6 -0
- package/dist/plugins/Notifications/Notifications.js +75 -0
- package/dist/plugins/Notifications/index.d.ts +2 -0
- package/dist/plugins/Notifications/index.js +36 -0
- package/dist/plugins/Notifications/pushNotification.d.ts +6 -0
- package/dist/plugins/Notifications/pushNotification.js +40 -0
- package/dist/plugins/Notifications/shared.d.ts +3 -0
- package/dist/plugins/Notifications/shared.js +1 -0
- package/dist/plugins/Notifications/spec.d.ts +22 -0
- package/dist/plugins/Notifications/spec.js +1 -0
- package/dist/plugins/PluginList/PluginList.d.ts +10 -0
- package/dist/plugins/PluginList/PluginList.js +38 -0
- package/dist/plugins/PluginList/index.d.ts +2 -0
- package/dist/plugins/PluginList/index.js +12 -0
- package/dist/plugins/PluginList/spec.d.ts +3 -0
- package/dist/plugins/PluginList/spec.js +1 -0
- package/dist/plugins/PropsPanel/BlankState.d.ts +3 -0
- package/dist/plugins/PropsPanel/BlankState.js +47 -0
- package/dist/plugins/PropsPanel/PropsPanel/ComponentProps.d.ts +10 -0
- package/dist/plugins/PropsPanel/PropsPanel/ComponentProps.js +40 -0
- package/dist/plugins/PropsPanel/PropsPanel/index.d.ts +11 -0
- package/dist/plugins/PropsPanel/PropsPanel/index.js +13 -0
- package/dist/plugins/PropsPanel/PropsPanel/shared.d.ts +2 -0
- package/dist/plugins/PropsPanel/PropsPanel/shared.js +16 -0
- package/dist/plugins/PropsPanel/index.d.ts +2 -0
- package/dist/plugins/PropsPanel/index.js +55 -0
- package/dist/plugins/PropsPanel/shared.d.ts +1 -0
- package/dist/plugins/PropsPanel/shared.js +1 -0
- package/dist/plugins/PropsPanel/spec.d.ts +3 -0
- package/dist/plugins/PropsPanel/spec.js +1 -0
- package/dist/plugins/RemoteRenderer/RemoteButton/copyToClipboard.d.ts +1 -0
- package/dist/plugins/RemoteRenderer/RemoteButton/copyToClipboard.js +24 -0
- package/dist/plugins/RemoteRenderer/RemoteButton/index.d.ts +8 -0
- package/dist/plugins/RemoteRenderer/RemoteButton/index.js +37 -0
- package/dist/plugins/RemoteRenderer/index.d.ts +2 -0
- package/dist/plugins/RemoteRenderer/index.js +36 -0
- package/dist/plugins/RemoteRenderer/shared.d.ts +3 -0
- package/dist/plugins/RemoteRenderer/shared.js +1 -0
- package/dist/plugins/RemoteRenderer/spec.d.ts +3 -0
- package/dist/plugins/RemoteRenderer/spec.js +1 -0
- package/dist/plugins/RendererCore/index.d.ts +2 -0
- package/dist/plugins/RendererCore/index.js +47 -0
- package/dist/plugins/RendererCore/isValidFixtureSelected.d.ts +2 -0
- package/dist/plugins/RendererCore/isValidFixtureSelected.js +16 -0
- package/dist/plugins/RendererCore/onRouterFixtureChange.d.ts +3 -0
- package/dist/plugins/RendererCore/onRouterFixtureChange.js +18 -0
- package/dist/plugins/RendererCore/receiveResponse/fixtureListUpdate.d.ts +3 -0
- package/dist/plugins/RendererCore/receiveResponse/fixtureListUpdate.js +11 -0
- package/dist/plugins/RendererCore/receiveResponse/fixtureStateChange.d.ts +3 -0
- package/dist/plugins/RendererCore/receiveResponse/fixtureStateChange.js +30 -0
- package/dist/plugins/RendererCore/receiveResponse/index.d.ts +3 -0
- package/dist/plugins/RendererCore/receiveResponse/index.js +20 -0
- package/dist/plugins/RendererCore/receiveResponse/playgroundCommand.d.ts +3 -0
- package/dist/plugins/RendererCore/receiveResponse/playgroundCommand.js +5 -0
- package/dist/plugins/RendererCore/receiveResponse/rendererReady.d.ts +3 -0
- package/dist/plugins/RendererCore/receiveResponse/rendererReady.js +49 -0
- package/dist/plugins/RendererCore/setFixtureState.d.ts +3 -0
- package/dist/plugins/RendererCore/setFixtureState.js +22 -0
- package/dist/plugins/RendererCore/shared/index.d.ts +4 -0
- package/dist/plugins/RendererCore/shared/index.js +1 -0
- package/dist/plugins/RendererCore/shared/postRequest.d.ts +5 -0
- package/dist/plugins/RendererCore/shared/postRequest.js +31 -0
- package/dist/plugins/RendererCore/shared/router.d.ts +2 -0
- package/dist/plugins/RendererCore/shared/router.js +3 -0
- package/dist/plugins/RendererCore/spec.d.ts +25 -0
- package/dist/plugins/RendererCore/spec.js +1 -0
- package/dist/plugins/RendererPreview/RendererPreview.d.ts +8 -0
- package/dist/plugins/RendererPreview/RendererPreview.js +25 -0
- package/dist/plugins/RendererPreview/checkRendererStatus.d.ts +2 -0
- package/dist/plugins/RendererPreview/checkRendererStatus.js +31 -0
- package/dist/plugins/RendererPreview/handleRendererRequests.d.ts +6 -0
- package/dist/plugins/RendererPreview/handleRendererRequests.js +76 -0
- package/dist/plugins/RendererPreview/handleWindowMessages.d.ts +2 -0
- package/dist/plugins/RendererPreview/handleWindowMessages.js +56 -0
- package/dist/plugins/RendererPreview/index.d.ts +2 -0
- package/dist/plugins/RendererPreview/index.js +49 -0
- package/dist/plugins/RendererPreview/shared.d.ts +9 -0
- package/dist/plugins/RendererPreview/shared.js +1 -0
- package/dist/plugins/RendererPreview/spec.d.ts +13 -0
- package/dist/plugins/RendererPreview/spec.js +1 -0
- package/dist/plugins/RendererSelect/index.d.ts +2 -0
- package/dist/plugins/RendererSelect/index.js +27 -0
- package/dist/plugins/RendererSelect/spec.d.ts +3 -0
- package/dist/plugins/RendererSelect/spec.js +1 -0
- package/dist/plugins/ResponsivePreview/ResponsivePreview/Header.d.ts +13 -0
- package/dist/plugins/ResponsivePreview/ResponsivePreview/Header.js +97 -0
- package/dist/plugins/ResponsivePreview/ResponsivePreview/ResponsivePreview.d.ts +14 -0
- package/dist/plugins/ResponsivePreview/ResponsivePreview/ResponsivePreview.js +152 -0
- package/dist/plugins/ResponsivePreview/ResponsivePreview/style.d.ts +45 -0
- package/dist/plugins/ResponsivePreview/ResponsivePreview/style.js +79 -0
- package/dist/plugins/ResponsivePreview/ToggleButton/index.d.ts +6 -0
- package/dist/plugins/ResponsivePreview/ToggleButton/index.js +6 -0
- package/dist/plugins/ResponsivePreview/index.d.ts +2 -0
- package/dist/plugins/ResponsivePreview/index.js +79 -0
- package/dist/plugins/ResponsivePreview/shared.d.ts +21 -0
- package/dist/plugins/ResponsivePreview/shared.js +19 -0
- package/dist/plugins/ResponsivePreview/spec.d.ts +13 -0
- package/dist/plugins/ResponsivePreview/spec.js +1 -0
- package/dist/plugins/Root/GlobalHeader.d.ts +9 -0
- package/dist/plugins/Root/GlobalHeader.js +59 -0
- package/dist/plugins/Root/RendererHeader.d.ts +16 -0
- package/dist/plugins/Root/RendererHeader.js +79 -0
- package/dist/plugins/Root/Root.d.ts +28 -0
- package/dist/plugins/Root/Root.js +120 -0
- package/dist/plugins/Root/SidePanel.d.ts +10 -0
- package/dist/plugins/Root/SidePanel.js +26 -0
- package/dist/plugins/Root/ToggleNavButton.d.ts +7 -0
- package/dist/plugins/Root/ToggleNavButton.js +6 -0
- package/dist/plugins/Root/index.d.ts +2 -0
- package/dist/plugins/Root/index.js +73 -0
- package/dist/plugins/Root/navOpen.d.ts +4 -0
- package/dist/plugins/Root/navOpen.js +11 -0
- package/dist/plugins/Root/navWidth.d.ts +5 -0
- package/dist/plugins/Root/navWidth.js +14 -0
- package/dist/plugins/Root/panelOpen.d.ts +4 -0
- package/dist/plugins/Root/panelOpen.js +16 -0
- package/dist/plugins/Root/panelWidth.d.ts +5 -0
- package/dist/plugins/Root/panelWidth.js +14 -0
- package/dist/plugins/Root/shared.d.ts +3 -0
- package/dist/plugins/Root/shared.js +1 -0
- package/dist/plugins/Root/spec.d.ts +14 -0
- package/dist/plugins/Root/spec.js +1 -0
- package/dist/plugins/Router/index.d.ts +2 -0
- package/dist/plugins/Router/index.js +56 -0
- package/dist/plugins/Router/spec.d.ts +15 -0
- package/dist/plugins/Router/spec.js +1 -0
- package/dist/plugins/StandardControl/index.d.ts +2 -0
- package/dist/plugins/StandardControl/index.js +43 -0
- package/dist/plugins/StandardControl/spec.d.ts +3 -0
- package/dist/plugins/StandardControl/spec.js +1 -0
- package/dist/plugins/StandardControl/storage.d.ts +7 -0
- package/dist/plugins/StandardControl/storage.js +10 -0
- package/dist/plugins/Storage/index.d.ts +2 -0
- package/dist/plugins/Storage/index.js +40 -0
- package/dist/plugins/Storage/spec.d.ts +18 -0
- package/dist/plugins/Storage/spec.js +1 -0
- package/dist/plugins/pluginEntry.d.ts +23 -0
- package/dist/plugins/pluginEntry.js +29 -0
- package/dist/shared/defaultPluginConfig.d.ts +13 -0
- package/dist/shared/defaultPluginConfig.js +13 -0
- package/dist/shared/fixtureTree.d.ts +3 -0
- package/dist/shared/fixtureTree.js +12 -0
- package/dist/shared/treeExpansion.d.ts +7 -0
- package/dist/shared/treeExpansion.js +24 -0
- package/dist/shared/url.d.ts +5 -0
- package/dist/shared/url.js +33 -0
- package/dist/slots/ControlActionSlot.d.ts +10 -0
- package/dist/slots/ControlActionSlot.js +5 -0
- package/dist/slots/ControlSlot.d.ts +11 -0
- package/dist/slots/ControlSlot.js +5 -0
- package/dist/slots/FixtureActionSlot.d.ts +10 -0
- package/dist/slots/FixtureActionSlot.js +5 -0
- package/dist/slots/NavRowSlot.d.ts +9 -0
- package/dist/slots/NavRowSlot.js +5 -0
- package/dist/slots/RendererActionSlot.d.ts +10 -0
- package/dist/slots/RendererActionSlot.js +5 -0
- package/dist/slots/SidePanelRowSlot.d.ts +12 -0
- package/dist/slots/SidePanelRowSlot.js +5 -0
- package/dist/slots/ValueInputSlot.d.ts +16 -0
- package/dist/slots/ValueInputSlot.js +5 -0
- package/dist/style/colors.d.ts +37 -0
- package/dist/style/colors.js +43 -0
- package/dist/style/globalStyle.d.ts +2 -0
- package/dist/style/globalStyle.js +49 -0
- package/dist/style/vars.d.ts +2 -0
- package/dist/style/vars.js +2 -0
- package/dist/testHelpers/pluginHelpers.d.ts +5 -0
- package/dist/testHelpers/pluginHelpers.js +25 -0
- package/dist/testHelpers/pluginMocks.d.ts +116 -0
- package/dist/testHelpers/pluginMocks.js +139 -0
- package/package.json +24 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PlaygroundMountArgs } from './playgroundConfig.js';
|
|
2
|
+
import './plugins/pluginEntry.js';
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
ReactPlugin: any;
|
|
6
|
+
React: any;
|
|
7
|
+
ReactDom: any;
|
|
8
|
+
StyledComponents: any;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export default function mount({ playgroundConfig, pluginConfigs, }: PlaygroundMountArgs): Promise<void>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDom from 'react-dom/client';
|
|
3
|
+
import * as ReactPlugin from 'react-plugin';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import './plugins/pluginEntry.js';
|
|
6
|
+
import { DEFAULT_PLUGIN_CONFIG } from './shared/defaultPluginConfig.js';
|
|
7
|
+
import { GlobalStyle } from './style/globalStyle.js';
|
|
8
|
+
// Enable external plugins to use a shared copy of react-plugin. Also enable
|
|
9
|
+
// fiddling with plugins from browser console :D.
|
|
10
|
+
window.ReactPlugin = ReactPlugin;
|
|
11
|
+
window.React = React;
|
|
12
|
+
window.ReactDom = ReactDom;
|
|
13
|
+
window.StyledComponents = styled;
|
|
14
|
+
export default async function mount({ playgroundConfig, pluginConfigs, }) {
|
|
15
|
+
const { loadPlugins, Slot } = ReactPlugin;
|
|
16
|
+
const config = { ...DEFAULT_PLUGIN_CONFIG, ...playgroundConfig };
|
|
17
|
+
loadPlugins({ config });
|
|
18
|
+
// We can make plugin loading unblocking if react-plugin exports the
|
|
19
|
+
// reloadPlugins method.
|
|
20
|
+
await Promise.all(pluginConfigs.map(async (pluginConfig) => {
|
|
21
|
+
if (pluginConfig.ui)
|
|
22
|
+
await loadPluginScript(pluginConfig.ui);
|
|
23
|
+
}));
|
|
24
|
+
const root = ReactDom.createRoot(document.getElementById('root'));
|
|
25
|
+
root.render(React.createElement(React.Fragment, null,
|
|
26
|
+
React.createElement(GlobalStyle, null),
|
|
27
|
+
React.createElement(Slot, { name: "root" })));
|
|
28
|
+
}
|
|
29
|
+
async function loadPluginScript(scriptPath) {
|
|
30
|
+
console.log(`[Cosmos] Loading plugin script at ${scriptPath}`);
|
|
31
|
+
// Handle both absolute (dev server) and relative paths (static export)
|
|
32
|
+
const normalizedPath = scriptPath.startsWith('/')
|
|
33
|
+
? scriptPath
|
|
34
|
+
: `/${scriptPath}`;
|
|
35
|
+
await import(/* webpackIgnore: true */ `./_plugin${normalizedPath}`);
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CosmosPluginConfig } from 'react-cosmos-core';
|
|
2
|
+
import { CoreSpec } from './plugins/Core/spec.js';
|
|
3
|
+
export type PlaygroundConfig = {
|
|
4
|
+
core: CoreSpec['config'];
|
|
5
|
+
[pluginName: string]: {};
|
|
6
|
+
};
|
|
7
|
+
export type PlaygroundMountArgs = {
|
|
8
|
+
playgroundConfig: PlaygroundConfig;
|
|
9
|
+
pluginConfigs: CosmosPluginConfig[];
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createPlugin } from 'react-plugin';
|
|
2
|
+
const { on, register } = createPlugin({
|
|
3
|
+
name: 'buildNotifications',
|
|
4
|
+
});
|
|
5
|
+
on('messageHandler', {
|
|
6
|
+
serverMessage: onServerMessage,
|
|
7
|
+
});
|
|
8
|
+
export { register };
|
|
9
|
+
if (process.env.NODE_ENV !== 'test')
|
|
10
|
+
register();
|
|
11
|
+
function onServerMessage(context, msg) {
|
|
12
|
+
const { getMethodsOf } = context;
|
|
13
|
+
const notifications = getMethodsOf('notifications');
|
|
14
|
+
const serverMessage = msg;
|
|
15
|
+
switch (serverMessage.type) {
|
|
16
|
+
case 'buildStart':
|
|
17
|
+
return notifications.pushStickyNotification({
|
|
18
|
+
id: 'build',
|
|
19
|
+
type: 'loading',
|
|
20
|
+
title: 'Rebuilding...',
|
|
21
|
+
info: 'Your code is updating.',
|
|
22
|
+
});
|
|
23
|
+
case 'buildError':
|
|
24
|
+
return notifications.pushStickyNotification({
|
|
25
|
+
id: 'build',
|
|
26
|
+
type: 'error',
|
|
27
|
+
title: 'Build failed',
|
|
28
|
+
info: 'Check your terminal for more information.',
|
|
29
|
+
});
|
|
30
|
+
case 'buildDone':
|
|
31
|
+
return notifications.removeStickyNotification('build');
|
|
32
|
+
default:
|
|
33
|
+
// Nada
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FixtureState, FixtureStateClassState, StateUpdater } from 'react-cosmos-core';
|
|
2
|
+
import { FixtureExpansion, OnElementExpansionChange } from '../../../components/ValueInputTree/index.js';
|
|
3
|
+
type Props = {
|
|
4
|
+
fsClassState: FixtureStateClassState;
|
|
5
|
+
fixtureExpansion: FixtureExpansion;
|
|
6
|
+
onFixtureStateChange: (stateUpdater: StateUpdater<FixtureState>) => void;
|
|
7
|
+
onElementExpansionChange: OnElementExpansionChange;
|
|
8
|
+
};
|
|
9
|
+
export declare function ComponentClassState({ fsClassState, fixtureExpansion, onFixtureStateChange, onElementExpansionChange, }: Props): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { isEqual } from 'lodash-es';
|
|
2
|
+
import React, { useCallback } from 'react';
|
|
3
|
+
import { updateFixtureStateClassState, } from 'react-cosmos-core';
|
|
4
|
+
import { IconButton32 } from '../../../components/buttons/index.js';
|
|
5
|
+
import { RotateCcwIcon } from '../../../components/icons/index.js';
|
|
6
|
+
import { SidePanelActions, SidePanelBody, SidePanelContainer, SidePanelHeader, SidePanelTitle, } from '../../../components/SidePanel.js';
|
|
7
|
+
import { ExpandCollapseValues } from '../../../components/ValueInputTree/ExpandCollapseValues.js';
|
|
8
|
+
import { stringifyElementId, ValueInputTree, } from '../../../components/ValueInputTree/index.js';
|
|
9
|
+
import { createClassStateFsUpdater } from './shared.js';
|
|
10
|
+
export function ComponentClassState({ fsClassState, fixtureExpansion, onFixtureStateChange, onElementExpansionChange, }) {
|
|
11
|
+
const { componentName, elementId, values } = fsClassState;
|
|
12
|
+
const [initialValues] = React.useState(() => values);
|
|
13
|
+
const handleValuesReset = React.useCallback(() => onFixtureStateChange(createClassStateFsUpdater(elementId, prevFs => updateFixtureStateClassState({
|
|
14
|
+
fixtureState: prevFs,
|
|
15
|
+
elementId,
|
|
16
|
+
values: initialValues,
|
|
17
|
+
}))), [elementId, initialValues, onFixtureStateChange]);
|
|
18
|
+
const handleValueChange = React.useCallback((newValues) => {
|
|
19
|
+
onFixtureStateChange(createClassStateFsUpdater(elementId, prevFs => updateFixtureStateClassState({
|
|
20
|
+
fixtureState: prevFs,
|
|
21
|
+
elementId,
|
|
22
|
+
values: newValues,
|
|
23
|
+
})));
|
|
24
|
+
}, [elementId, onFixtureStateChange]);
|
|
25
|
+
const strElementId = stringifyElementId(elementId);
|
|
26
|
+
const expansion = fixtureExpansion[strElementId] || {};
|
|
27
|
+
const setExpansion = useCallback((newExpansion) => onElementExpansionChange(elementId, newExpansion), [elementId, onElementExpansionChange]);
|
|
28
|
+
return (React.createElement(SidePanelContainer, null,
|
|
29
|
+
React.createElement(SidePanelHeader, null,
|
|
30
|
+
React.createElement(SidePanelTitle, { label: "Class State", componentName: componentName }),
|
|
31
|
+
React.createElement(SidePanelActions, null,
|
|
32
|
+
React.createElement(IconButton32, { title: "Reset to initial values", icon: React.createElement(RotateCcwIcon, null), disabled: isEqual(values, initialValues), onClick: handleValuesReset }),
|
|
33
|
+
React.createElement(ExpandCollapseValues, { values: values, expansion: expansion, setExpansion: setExpansion }))),
|
|
34
|
+
React.createElement(SidePanelBody, null,
|
|
35
|
+
React.createElement(ValueInputTree, { id: strElementId, values: values, expansion: expansion, onValueChange: handleValueChange, setExpansion: setExpansion }))));
|
|
36
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FixtureState, StateUpdater } from 'react-cosmos-core';
|
|
3
|
+
import { FixtureExpansion, OnElementExpansionChange } from '../../../components/ValueInputTree/index.js';
|
|
4
|
+
type Props = {
|
|
5
|
+
fixtureState: FixtureState;
|
|
6
|
+
fixtureExpansion: FixtureExpansion;
|
|
7
|
+
onFixtureStateChange: (stateUpdater: StateUpdater<FixtureState>) => void;
|
|
8
|
+
onElementExpansionChange: OnElementExpansionChange;
|
|
9
|
+
};
|
|
10
|
+
export declare const ClassStatePanel: React.NamedExoticComponent<Props>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { hasFsValues, sortFsValueGroups, stringifyElementId, } from '../../../components/ValueInputTree/index.js';
|
|
3
|
+
import { ComponentClassState } from './ComponentClassState.js';
|
|
4
|
+
export const ClassStatePanel = React.memo(function ClassStatePanel({ fixtureState, fixtureExpansion, onFixtureStateChange, onElementExpansionChange, }) {
|
|
5
|
+
if (!fixtureState.classState) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
const classStateWithValues = fixtureState.classState.filter(hasFsValues);
|
|
9
|
+
return (React.createElement(React.Fragment, null, sortFsValueGroups(classStateWithValues).map(fsClassState => {
|
|
10
|
+
const strElementId = stringifyElementId(fsClassState.elementId);
|
|
11
|
+
return (React.createElement(ComponentClassState, { key: strElementId, fsClassState: fsClassState, fixtureExpansion: fixtureExpansion, onFixtureStateChange: onFixtureStateChange, onElementExpansionChange: onElementExpansionChange }));
|
|
12
|
+
})));
|
|
13
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { findFixtureStateClassState, } from 'react-cosmos-core';
|
|
2
|
+
import { stringifyElementId } from '../../../components/ValueInputTree/index.js';
|
|
3
|
+
export function createClassStateFsUpdater(elementId, cb) {
|
|
4
|
+
return prevFs => {
|
|
5
|
+
const fsClassState = findFixtureStateClassState(prevFs, elementId);
|
|
6
|
+
if (!fsClassState) {
|
|
7
|
+
const elId = stringifyElementId(elementId);
|
|
8
|
+
console.warn(`Trying to update missing element with ID: ${elId}`);
|
|
9
|
+
return prevFs;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
...prevFs,
|
|
13
|
+
classState: cb(prevFs),
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createPlugin } from 'react-plugin';
|
|
3
|
+
import { getFixtureExpansion, updateElementExpansion, } from '../../components/ValueInputTree/index.js';
|
|
4
|
+
import { ClassStatePanel } from './ClassStatePanel/index.js';
|
|
5
|
+
import { CLASS_STATE_TREE_EXPANSION_STORAGE_KEY } from './shared.js';
|
|
6
|
+
const { namedPlug, register } = createPlugin({
|
|
7
|
+
name: 'classStatePanel',
|
|
8
|
+
});
|
|
9
|
+
namedPlug('sidePanelRow', 'classState', ({ pluginContext, slotProps }) => {
|
|
10
|
+
const { fixtureId, fixtureState, onFixtureStateChange } = slotProps;
|
|
11
|
+
const { fixtureExpansion, onElementExpansionChange } = useFixtureExpansion(pluginContext, fixtureId);
|
|
12
|
+
return (React.createElement(ClassStatePanel, { fixtureState: fixtureState, fixtureExpansion: fixtureExpansion, onFixtureStateChange: onFixtureStateChange, onElementExpansionChange: onElementExpansionChange }));
|
|
13
|
+
});
|
|
14
|
+
export { register };
|
|
15
|
+
if (process.env.NODE_ENV !== 'test')
|
|
16
|
+
register();
|
|
17
|
+
const DEFAULT_TREE_EXPANSION = {};
|
|
18
|
+
function useFixtureExpansion(context, fixtureId) {
|
|
19
|
+
const { getMethodsOf } = context;
|
|
20
|
+
const storage = getMethodsOf('storage');
|
|
21
|
+
const classStateExpansion = storage.getItem(CLASS_STATE_TREE_EXPANSION_STORAGE_KEY) || DEFAULT_TREE_EXPANSION;
|
|
22
|
+
const fixtureExpansion = getFixtureExpansion(classStateExpansion, fixtureId);
|
|
23
|
+
const onElementExpansionChange = React.useCallback((elementId, treeExpansion) => {
|
|
24
|
+
storage.setItem(CLASS_STATE_TREE_EXPANSION_STORAGE_KEY, updateElementExpansion(classStateExpansion, fixtureId, elementId, treeExpansion));
|
|
25
|
+
}, [storage, classStateExpansion, fixtureId]);
|
|
26
|
+
return {
|
|
27
|
+
fixtureExpansion,
|
|
28
|
+
onElementExpansionChange,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLASS_STATE_TREE_EXPANSION_STORAGE_KEY = "classStateTreeExpansion";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CLASS_STATE_TREE_EXPANSION_STORAGE_KEY = 'classStateTreeExpansion';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RuntimeStatus, UrlStatus } from '../RendererPreview/shared.js';
|
|
2
|
+
type Props = {
|
|
3
|
+
fixtureSelected: boolean;
|
|
4
|
+
validFixtureSelected: boolean;
|
|
5
|
+
rendererConnected: boolean;
|
|
6
|
+
rendererPreviewUrlStatus: UrlStatus;
|
|
7
|
+
rendererPreviewRuntimeStatus: RuntimeStatus;
|
|
8
|
+
welcomeDismissed: boolean;
|
|
9
|
+
onDismissWelcome: () => unknown;
|
|
10
|
+
onShowWelcome: () => unknown;
|
|
11
|
+
};
|
|
12
|
+
export declare function ContentOverlay({ fixtureSelected, validFixtureSelected, rendererConnected, rendererPreviewUrlStatus, rendererPreviewRuntimeStatus, welcomeDismissed, onDismissWelcome, onShowWelcome, }: Props): JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NoFixtureSelected } from './NoFixtureSelected.js';
|
|
3
|
+
import { RendererNotResponding } from './RendererNotResponding.js';
|
|
4
|
+
import { ContentContainer, OverlayContainer } from './shared.js';
|
|
5
|
+
import { WelcomeCosmos } from './WelcomeCosmos.js';
|
|
6
|
+
export function ContentOverlay({ fixtureSelected, validFixtureSelected, rendererConnected, rendererPreviewUrlStatus, rendererPreviewRuntimeStatus, welcomeDismissed, onDismissWelcome, onShowWelcome, }) {
|
|
7
|
+
if (rendererPreviewUrlStatus === 'error') {
|
|
8
|
+
return (React.createElement(OverlayContainer, { "data-testid": "rendererNotResponding" },
|
|
9
|
+
React.createElement(RendererNotResponding, null)));
|
|
10
|
+
}
|
|
11
|
+
if (validFixtureSelected || rendererPreviewRuntimeStatus === 'error') {
|
|
12
|
+
// Usually the content overlay is only hidden when a valid fixture is
|
|
13
|
+
// selected. However, when the renderer is in error state, we also hide the
|
|
14
|
+
// content overlay to avoid showing a blank screen and to uncover the error
|
|
15
|
+
// message.
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
if (!rendererConnected) {
|
|
19
|
+
// Delay "waiting for renderer" state to avoid rapidly changing visual
|
|
20
|
+
// states when renderer is already compiled and will respond immediately
|
|
21
|
+
return (React.createElement(OverlayContainer, { "data-testid": "waiting" },
|
|
22
|
+
React.createElement(ContentContainer, null)));
|
|
23
|
+
}
|
|
24
|
+
if (fixtureSelected) {
|
|
25
|
+
return (React.createElement(OverlayContainer, { "data-testid": "notFound" },
|
|
26
|
+
React.createElement(ContentContainer, null)));
|
|
27
|
+
}
|
|
28
|
+
if (welcomeDismissed) {
|
|
29
|
+
return (React.createElement(OverlayContainer, { "data-testid": "blank" },
|
|
30
|
+
React.createElement(NoFixtureSelected, { onShowWelcome: onShowWelcome })));
|
|
31
|
+
}
|
|
32
|
+
return (React.createElement(OverlayContainer, { "data-testid": "welcome" },
|
|
33
|
+
React.createElement(WelcomeCosmos, { onDismissWelcome: onDismissWelcome })));
|
|
34
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { KeyBox } from '../../components/KeyBox.js';
|
|
4
|
+
import { screenGrey1, screenGrey5 } from '../../style/colors.js';
|
|
5
|
+
export function KeyShortcut({ keys, label }) {
|
|
6
|
+
return (React.createElement(Container, null,
|
|
7
|
+
React.createElement(Keys, null, keys.map(key => (React.createElement(KeyBox, { key: key, value: key, bgColor: screenGrey5, textColor: screenGrey1, size: 26, fontSize: 16 })))),
|
|
8
|
+
React.createElement(Label, null, label)));
|
|
9
|
+
}
|
|
10
|
+
const Container = styled.div `
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
height: 26px;
|
|
14
|
+
margin: 0 0 16px 0;
|
|
15
|
+
line-height: 26px;
|
|
16
|
+
|
|
17
|
+
:last-child {
|
|
18
|
+
margin-bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
const Keys = styled.div `
|
|
22
|
+
flex: 1;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: row;
|
|
25
|
+
justify-content: flex-end;
|
|
26
|
+
`;
|
|
27
|
+
const Label = styled.div `
|
|
28
|
+
flex: 1.4;
|
|
29
|
+
text-indent: 10px;
|
|
30
|
+
`;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { BlankCanvasIllustration } from '../../components/illustrations/BlankCanvas.js';
|
|
4
|
+
import { screenGrey3 } from '../../style/colors.js';
|
|
5
|
+
import { KeyShortcut } from './KeyShortcut.js';
|
|
6
|
+
import { ContentContainer, IllustrationContainer, SecondaryButton, TextContainer, } from './shared.js';
|
|
7
|
+
export function NoFixtureSelected({ onShowWelcome }) {
|
|
8
|
+
return (React.createElement(React.Fragment, null,
|
|
9
|
+
React.createElement(ContentContainer, null,
|
|
10
|
+
React.createElement(TextContainer, null,
|
|
11
|
+
React.createElement(KeyShortcut, { keys: ['⌘', 'P'], label: "Search fixtures" }),
|
|
12
|
+
React.createElement(Subtitle, null, "FIXTURE SELECTED"),
|
|
13
|
+
React.createElement(KeyShortcut, { keys: ['⌘', '⇧', 'L'], label: "Toggle fixture list" }),
|
|
14
|
+
React.createElement(KeyShortcut, { keys: ['⌘', '⇧', 'K'], label: "Toggle control panel" }),
|
|
15
|
+
React.createElement(KeyShortcut, { keys: ['⌘', '⇧', 'E'], label: "Edit fixture" }),
|
|
16
|
+
React.createElement(KeyShortcut, { keys: ['⌘', '⇧', 'F'], label: "Go full screen" })),
|
|
17
|
+
React.createElement(IllustrationContainer, null,
|
|
18
|
+
React.createElement(BlankCanvasIllustration, { title: "blank state" }))),
|
|
19
|
+
React.createElement(ShowWelcomeButton, { onClick: onShowWelcome }, "show welcome screen")));
|
|
20
|
+
}
|
|
21
|
+
const Subtitle = styled.div `
|
|
22
|
+
margin: 40px 0 24px 0;
|
|
23
|
+
color: ${screenGrey3};
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
line-height: 14px;
|
|
27
|
+
text-align: center;
|
|
28
|
+
letter-spacing: 0.5px;
|
|
29
|
+
`;
|
|
30
|
+
const ShowWelcomeButton = styled(SecondaryButton) `
|
|
31
|
+
position: absolute;
|
|
32
|
+
bottom: 8px;
|
|
33
|
+
right: 8px;
|
|
34
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RendererNotResponding(): JSX.Element;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Slot } from 'react-plugin';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { ArtificialIntelligenceIllustration } from '../../components/illustrations/ArtificialIntelligence.js';
|
|
5
|
+
import { screenGrey3, screenGrey5, screenPrimary2, screenPrimary3, } from '../../style/colors.js';
|
|
6
|
+
import { ContentContainer, IllustrationContainer, NoWrap, TextContainer, } from './shared.js';
|
|
7
|
+
export function RendererNotResponding() {
|
|
8
|
+
return (React.createElement(ContentContainer, null,
|
|
9
|
+
React.createElement(TextContainer, null,
|
|
10
|
+
React.createElement(Header, null,
|
|
11
|
+
"Renderer ",
|
|
12
|
+
React.createElement(NoWrap, null, "not responding")),
|
|
13
|
+
React.createElement(Paragraph, null, `It's usually one of the following...`),
|
|
14
|
+
React.createElement(List, null,
|
|
15
|
+
React.createElement("li", null,
|
|
16
|
+
React.createElement(No, null, "1"),
|
|
17
|
+
React.createElement("span", null,
|
|
18
|
+
React.createElement("strong", null, "Please check your terminal for errors."),
|
|
19
|
+
React.createElement("br", null),
|
|
20
|
+
"Your build might be broken.")),
|
|
21
|
+
React.createElement("li", null,
|
|
22
|
+
React.createElement(No, null, "2"),
|
|
23
|
+
React.createElement("span", null,
|
|
24
|
+
React.createElement(Slot, { name: "rendererError" },
|
|
25
|
+
"If you use a bundler plugin,",
|
|
26
|
+
' ',
|
|
27
|
+
React.createElement("strong", null,
|
|
28
|
+
"make sure",
|
|
29
|
+
React.createElement("br", null),
|
|
30
|
+
"your build is generating an index.html page."))))),
|
|
31
|
+
React.createElement(Paragraph, null,
|
|
32
|
+
React.createElement(ActionLink, { href: "https://react-cosmos.slack.com/join/shared_invite/zt-g9rsalqq-clCoV7DWttVvzO5FAAmVAw", rel: "noopener noreferrer", target: "_blank" }, "ask for help"))),
|
|
33
|
+
React.createElement(IllustrationContainer, null,
|
|
34
|
+
React.createElement(ArtificialIntelligenceIllustration, { title: "robot" }))));
|
|
35
|
+
}
|
|
36
|
+
const Header = styled.h1 `
|
|
37
|
+
position: relative;
|
|
38
|
+
margin: 0 0 64px 0;
|
|
39
|
+
color: ${screenPrimary2};
|
|
40
|
+
font-size: 30px;
|
|
41
|
+
font-weight: 700;
|
|
42
|
+
line-height: 1.2em;
|
|
43
|
+
text-transform: uppercase;
|
|
44
|
+
letter-spacing: 0.015em;
|
|
45
|
+
|
|
46
|
+
::after {
|
|
47
|
+
content: '';
|
|
48
|
+
position: absolute;
|
|
49
|
+
bottom: -12px;
|
|
50
|
+
left: 0;
|
|
51
|
+
width: 64px;
|
|
52
|
+
height: 3px;
|
|
53
|
+
background: ${screenPrimary2};
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
const Paragraph = styled.p `
|
|
57
|
+
margin: 16px 0;
|
|
58
|
+
|
|
59
|
+
:last-child {
|
|
60
|
+
margin-bottom: 0;
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
const List = styled.ul `
|
|
64
|
+
margin: 0 0 48px 0;
|
|
65
|
+
padding: 0;
|
|
66
|
+
list-style: none;
|
|
67
|
+
|
|
68
|
+
li {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: row;
|
|
71
|
+
align-items: flex-start;
|
|
72
|
+
margin-bottom: 12px;
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
const No = styled.span `
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: flex-end;
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
width: 32px;
|
|
82
|
+
height: 32px;
|
|
83
|
+
margin: 6px 16px 0 0;
|
|
84
|
+
padding: 0 6px 0 0;
|
|
85
|
+
border-radius: 100%;
|
|
86
|
+
font-size: 18px;
|
|
87
|
+
font-weight: 600;
|
|
88
|
+
background: ${screenGrey5};
|
|
89
|
+
color: ${screenGrey3};
|
|
90
|
+
|
|
91
|
+
::after {
|
|
92
|
+
content: '.';
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
const actionLinkHeight = 36;
|
|
96
|
+
const ActionLink = styled.a `
|
|
97
|
+
display: inline-block;
|
|
98
|
+
height: ${actionLinkHeight}px;
|
|
99
|
+
padding: 0 16px;
|
|
100
|
+
background: ${screenPrimary3};
|
|
101
|
+
color: #fff;
|
|
102
|
+
border-radius: 5px;
|
|
103
|
+
font-size: 12px;
|
|
104
|
+
font-weight: 700;
|
|
105
|
+
line-height: ${actionLinkHeight}px;
|
|
106
|
+
text-transform: uppercase;
|
|
107
|
+
letter-spacing: 0.1em;
|
|
108
|
+
text-decoration: none;
|
|
109
|
+
`;
|