@tomorrowevening/theatre-studio 1.0.5 → 1.0.6
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/dist/index.js +105 -56
- package/package.json +1 -1
- package/dist/IDBStorage.js +0 -19
- package/dist/PaneManager.js +0 -112
- package/dist/Scrub.js +0 -134
- package/dist/Studio.js +0 -405
- package/dist/StudioBundle.js +0 -21
- package/dist/StudioStore/StudioStore.js +0 -163
- package/dist/StudioStore/createTransactionPrivateApi.js +0 -204
- package/dist/StudioStore/generateDiskStateRevision.js +0 -4
- package/dist/StudioStore/persistStateOfStudio.js +0 -61
- package/dist/TheatreStudio.js +0 -154
- package/dist/UI/UI.js +0 -65
- package/dist/UI/UINonSSRBits.js +0 -60
- package/dist/UIRoot/PanelsRoot.js +0 -19
- package/dist/UIRoot/PointerCapturing.js +0 -96
- package/dist/UIRoot/ProvideTheme.js +0 -9
- package/dist/UIRoot/UIRoot.js +0 -79
- package/dist/UIRoot/useKeyboardShortcuts.js +0 -158
- package/dist/checkForUpdates.js +0 -86
- package/dist/css.js +0 -116
- package/dist/getStudio.js +0 -10
- package/dist/notify.js +0 -328
- package/dist/panels/BasePanel/BasePanel.js +0 -74
- package/dist/panels/BasePanel/ExtensionPaneWrapper.js +0 -138
- package/dist/panels/BasePanel/PanelDragZone.js +0 -88
- package/dist/panels/BasePanel/PanelResizeHandle.js +0 -184
- package/dist/panels/BasePanel/PanelResizers.js +0 -14
- package/dist/panels/BasePanel/PanelWrapper.js +0 -34
- package/dist/panels/BasePanel/common.js +0 -52
- package/dist/panels/DetailPanel/DetailPanel.js +0 -146
- package/dist/panels/DetailPanel/DeterminePropEditorForDetail/DetailCompoundPropEditor.js +0 -169
- package/dist/panels/DetailPanel/DeterminePropEditorForDetail/DetailSimplePropEditor.js +0 -22
- package/dist/panels/DetailPanel/DeterminePropEditorForDetail/SingleRowPropEditor.js +0 -89
- package/dist/panels/DetailPanel/DeterminePropEditorForDetail/getDetailRowHighlightBackground.js +0 -7
- package/dist/panels/DetailPanel/DeterminePropEditorForDetail/rowIndentationFormulaCSS.js +0 -1
- package/dist/panels/DetailPanel/DeterminePropEditorForDetail.js +0 -28
- package/dist/panels/DetailPanel/EmptyState.js +0 -36
- package/dist/panels/DetailPanel/ObjectDetails.js +0 -52
- package/dist/panels/DetailPanel/ProjectDetails/StateConflictRow.js +0 -86
- package/dist/panels/DetailPanel/ProjectDetails.js +0 -98
- package/dist/panels/OutlinePanel/BaseItem.js +0 -136
- package/dist/panels/OutlinePanel/ObjectsList/ObjectItem.js +0 -14
- package/dist/panels/OutlinePanel/ObjectsList/ObjectsList.js +0 -85
- package/dist/panels/OutlinePanel/OutlinePanel.js +0 -73
- package/dist/panels/OutlinePanel/ProjectsList/ProjectListItem.js +0 -38
- package/dist/panels/OutlinePanel/ProjectsList/ProjectsList.js +0 -22
- package/dist/panels/OutlinePanel/SheetsList/SheetInstanceItem.js +0 -36
- package/dist/panels/OutlinePanel/SheetsList/SheetItem.js +0 -23
- package/dist/panels/OutlinePanel/SheetsList/SheetsList.js +0 -15
- package/dist/panels/OutlinePanel/outlinePanelUtils.js +0 -23
- package/dist/panels/SequenceEditorPanel/DopeSheet/DopeSheet.js +0 -21
- package/dist/panels/SequenceEditorPanel/DopeSheet/Left/AnyCompositeRow.js +0 -74
- package/dist/panels/SequenceEditorPanel/DopeSheet/Left/Left.js +0 -25
- package/dist/panels/SequenceEditorPanel/DopeSheet/Left/PrimitivePropRow.js +0 -97
- package/dist/panels/SequenceEditorPanel/DopeSheet/Left/PropWithChildrenRow.js +0 -15
- package/dist/panels/SequenceEditorPanel/DopeSheet/Left/SheetObjectRow.js +0 -19
- package/dist/panels/SequenceEditorPanel/DopeSheet/Left/SheetRow.js +0 -20
- package/dist/panels/SequenceEditorPanel/DopeSheet/Left/usePropHighlightMouseEnter.js +0 -33
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregateKeyframeEditor/AggregateKeyframeConnector.js +0 -187
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregateKeyframeEditor/AggregateKeyframeDot.js +0 -158
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregateKeyframeEditor/AggregateKeyframeEditor.js +0 -32
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregateKeyframeEditor/AggregateKeyframeVisualDot.js +0 -61
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregateKeyframeEditor/iif.js +0 -3
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregateKeyframeEditor/useAggregateKeyframeEditorUtils.js +0 -73
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregatedKeyframeTrack.js +0 -407
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/BasicKeyframedTrack.js +0 -108
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/BasicKeyframeConnector.js +0 -185
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/CurveEditorPopover.js +0 -397
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/CurveSegmentEditor.js +0 -136
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/EasingOption.js +0 -52
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/SVGCurveSegment.js +0 -43
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/colors.js +0 -3
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/shared.js +0 -84
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/useFreezableMemo.js +0 -16
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/CurveEditorPopover/useUIOptionGrid.js +0 -82
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/DeterminePropEditorForSingleKeyframe.js +0 -93
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/SingleKeyframeDot.js +0 -254
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/SingleKeyframeEditor.js +0 -22
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/useSingleKeyframeInlineEditorPopover.js +0 -11
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/useTempTransactionEditingTools.js +0 -43
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/DopeSheetBackground.js +0 -24
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/DopeSheetSelectionView.js +0 -272
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/FocusRangeCurtains.js +0 -88
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/HorizontallyScrollableArea.js +0 -215
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/KeyframeSnapTarget.js +0 -55
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/LengthIndicator/LengthEditorPopover.js +0 -69
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/LengthIndicator/LengthIndicator.js +0 -217
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/PrimitivePropRow.js +0 -25
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/PropWithChildrenRow.js +0 -18
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/Right.js +0 -30
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/Row.js +0 -50
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/SheetObjectRow.js +0 -14
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/SheetRow.js +0 -14
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/collectAggregateKeyframes.js +0 -92
- package/dist/panels/SequenceEditorPanel/DopeSheet/Right/keyframeRowUI/ConnectorLine.js +0 -62
- package/dist/panels/SequenceEditorPanel/DopeSheet/selections.js +0 -149
- package/dist/panels/SequenceEditorPanel/DopeSheet/setCollapsedSheetObjectOrCompoundProp.js +0 -10
- package/dist/panels/SequenceEditorPanel/FrameGrid/FrameGrid.js +0 -92
- package/dist/panels/SequenceEditorPanel/FrameGrid/StampsGrid.js +0 -99
- package/dist/panels/SequenceEditorPanel/FrameGrid/createGrid.js +0 -49
- package/dist/panels/SequenceEditorPanel/FrameStampPositionProvider.js +0 -189
- package/dist/panels/SequenceEditorPanel/GraphEditor/BasicKeyframedTrack/BasicKeyframedTrack.js +0 -91
- package/dist/panels/SequenceEditorPanel/GraphEditor/BasicKeyframedTrack/KeyframeEditor/Curve.js +0 -87
- package/dist/panels/SequenceEditorPanel/GraphEditor/BasicKeyframedTrack/KeyframeEditor/CurveHandle.js +0 -186
- package/dist/panels/SequenceEditorPanel/GraphEditor/BasicKeyframedTrack/KeyframeEditor/GraphEditorDotNonScalar.js +0 -162
- package/dist/panels/SequenceEditorPanel/GraphEditor/BasicKeyframedTrack/KeyframeEditor/GraphEditorDotScalar.js +0 -209
- package/dist/panels/SequenceEditorPanel/GraphEditor/BasicKeyframedTrack/KeyframeEditor/GraphEditorNonScalarDash.js +0 -23
- package/dist/panels/SequenceEditorPanel/GraphEditor/BasicKeyframedTrack/KeyframeEditor/KeyframeEditor.js +0 -30
- package/dist/panels/SequenceEditorPanel/GraphEditor/GraphEditor.js +0 -73
- package/dist/panels/SequenceEditorPanel/GraphEditor/PrimitivePropGraph.js +0 -20
- package/dist/panels/SequenceEditorPanel/GraphEditorToggle.js +0 -59
- package/dist/panels/SequenceEditorPanel/RightOverlay/DopeSnap.js +0 -36
- package/dist/panels/SequenceEditorPanel/RightOverlay/DopeSnapHitZoneUI.js +0 -57
- package/dist/panels/SequenceEditorPanel/RightOverlay/FocusRangeZone/FocusRangeStrip.js +0 -233
- package/dist/panels/SequenceEditorPanel/RightOverlay/FocusRangeZone/FocusRangeThumb.js +0 -217
- package/dist/panels/SequenceEditorPanel/RightOverlay/FocusRangeZone/FocusRangeZone.js +0 -181
- package/dist/panels/SequenceEditorPanel/RightOverlay/FrameStamp.js +0 -65
- package/dist/panels/SequenceEditorPanel/RightOverlay/HorizontalScrollbar.js +0 -235
- package/dist/panels/SequenceEditorPanel/RightOverlay/Markers/MarkerDot.js +0 -184
- package/dist/panels/SequenceEditorPanel/RightOverlay/Markers/MarkerEditorPopover.js +0 -65
- package/dist/panels/SequenceEditorPanel/RightOverlay/Markers/Markers.js +0 -13
- package/dist/panels/SequenceEditorPanel/RightOverlay/Playhead.js +0 -265
- package/dist/panels/SequenceEditorPanel/RightOverlay/PlayheadPositionPopover.js +0 -64
- package/dist/panels/SequenceEditorPanel/RightOverlay/RightOverlay.js +0 -35
- package/dist/panels/SequenceEditorPanel/RightOverlay/TopStrip.js +0 -31
- package/dist/panels/SequenceEditorPanel/SequenceEditorPanel.js +0 -179
- package/dist/panels/SequenceEditorPanel/VerticalScrollContainer.js +0 -42
- package/dist/panels/SequenceEditorPanel/layout/layout.js +0 -166
- package/dist/panels/SequenceEditorPanel/layout/tree.js +0 -139
- package/dist/panels/SequenceEditorPanel/whatPropIsHighlighted.js +0 -58
- package/dist/propEditors/DefaultValueIndicator.js +0 -64
- package/dist/propEditors/NextPrevKeyframeCursors.js +0 -135
- package/dist/propEditors/getNearbyKeyframesOfTrack.js +0 -46
- package/dist/propEditors/simpleEditors/BooleanPropEditor.js +0 -17
- package/dist/propEditors/simpleEditors/FilePropEditor.js +0 -118
- package/dist/propEditors/simpleEditors/ISimplePropEditorReactProps.js +0 -1
- package/dist/propEditors/simpleEditors/ImagePropEditor.js +0 -126
- package/dist/propEditors/simpleEditors/NumberPropEditor.js +0 -9
- package/dist/propEditors/simpleEditors/RgbaPropEditor.js +0 -73
- package/dist/propEditors/simpleEditors/StringLiteralPropEditor.js +0 -10
- package/dist/propEditors/simpleEditors/StringPropEditor.js +0 -6
- package/dist/propEditors/simpleEditors/simplePropEditorByPropType.js +0 -16
- package/dist/propEditors/useEditingToolsForCompoundProp.js +0 -228
- package/dist/propEditors/useEditingToolsForSimpleProp.js +0 -229
- package/dist/propEditors/utils/IEditingTools.js +0 -1
- package/dist/propEditors/utils/PropConfigForType.js +0 -1
- package/dist/propEditors/utils/getPropTypeByPointer.js +0 -48
- package/dist/propEditors/utils/propNameTextCSS.js +0 -7
- package/dist/selectors.js +0 -63
- package/dist/store/index.js +0 -184
- package/dist/store/stateEditors.js +0 -774
- package/dist/store/types/ahistoric.js +0 -1
- package/dist/store/types/ephemeral.js +0 -1
- package/dist/store/types/historic.js +0 -1
- package/dist/store/types/index.js +0 -3
- package/dist/toolbars/ExtensionToolbar/ExtensionToolbar.js +0 -51
- package/dist/toolbars/ExtensionToolbar/Toolset.js +0 -27
- package/dist/toolbars/ExtensionToolbar/tools/ExtensionFlyoutMenu.js +0 -51
- package/dist/toolbars/ExtensionToolbar/tools/IconButton.js +0 -16
- package/dist/toolbars/ExtensionToolbar/tools/Switch.js +0 -20
- package/dist/toolbars/GlobalToolbar.js +0 -142
- package/dist/toolbars/MoreMenu/MoreMenu.js +0 -133
- package/dist/toolbars/PinButton.js +0 -26
- package/dist/uiComponents/DetailPanelButton.js +0 -21
- package/dist/uiComponents/PointerEventsHandler.js +0 -80
- package/dist/uiComponents/Popover/ArrowContext.js +0 -3
- package/dist/uiComponents/Popover/BasicPopover.js +0 -35
- package/dist/uiComponents/Popover/BasicTooltip.js +0 -10
- package/dist/uiComponents/Popover/ErrorTooltip.js +0 -9
- package/dist/uiComponents/Popover/MinimalTooltip.js +0 -6
- package/dist/uiComponents/Popover/PopoverArrow.js +0 -38
- package/dist/uiComponents/Popover/TooltipContext.js +0 -46
- package/dist/uiComponents/Popover/TooltipWrapper.js +0 -103
- package/dist/uiComponents/Popover/usePopover.js +0 -132
- package/dist/uiComponents/Popover/useTooltip.js +0 -33
- package/dist/uiComponents/RoomToClick.js +0 -10
- package/dist/uiComponents/SVGIcon.js +0 -19
- package/dist/uiComponents/ShowMousePosition.js +0 -30
- package/dist/uiComponents/colorPicker/components/EditingProvider.js +0 -15
- package/dist/uiComponents/colorPicker/components/RgbaColorPicker.js +0 -31
- package/dist/uiComponents/colorPicker/components/common/Alpha.js +0 -54
- package/dist/uiComponents/colorPicker/components/common/AlphaColorPicker.js +0 -28
- package/dist/uiComponents/colorPicker/components/common/Hue.js +0 -41
- package/dist/uiComponents/colorPicker/components/common/Interactive.js +0 -142
- package/dist/uiComponents/colorPicker/components/common/Pointer.js +0 -39
- package/dist/uiComponents/colorPicker/components/common/Saturation.js +0 -44
- package/dist/uiComponents/colorPicker/hooks/useColorManipulation.js +0 -77
- package/dist/uiComponents/colorPicker/hooks/useEventCallback.js +0 -10
- package/dist/uiComponents/colorPicker/hooks/useIsomorphicLayoutEffect.js +0 -5
- package/dist/uiComponents/colorPicker/index.js +0 -1
- package/dist/uiComponents/colorPicker/types.js +0 -1
- package/dist/uiComponents/colorPicker/utils/clamp.js +0 -6
- package/dist/uiComponents/colorPicker/utils/compare.js +0 -25
- package/dist/uiComponents/colorPicker/utils/convert.js +0 -165
- package/dist/uiComponents/colorPicker/utils/round.js +0 -3
- package/dist/uiComponents/colorPicker/utils/validate.js +0 -10
- package/dist/uiComponents/createCursorLock.js +0 -2
- package/dist/uiComponents/form/BasicCheckbox.js +0 -5
- package/dist/uiComponents/form/BasicNumberInput.js +0 -261
- package/dist/uiComponents/form/BasicSelect.js +0 -58
- package/dist/uiComponents/form/BasicStringInput.js +0 -151
- package/dist/uiComponents/form/BasicSwitch.js +0 -60
- package/dist/uiComponents/icons/AddImage.js +0 -6
- package/dist/uiComponents/icons/ArrowClockwise.js +0 -6
- package/dist/uiComponents/icons/ArrowsOutCardinal.js +0 -6
- package/dist/uiComponents/icons/Bell.js +0 -6
- package/dist/uiComponents/icons/Camera.js +0 -7
- package/dist/uiComponents/icons/ChevronDown.js +0 -6
- package/dist/uiComponents/icons/ChevronLeft.js +0 -6
- package/dist/uiComponents/icons/ChevronRight.js +0 -6
- package/dist/uiComponents/icons/Cube.js +0 -6
- package/dist/uiComponents/icons/CubeFull.js +0 -6
- package/dist/uiComponents/icons/CubeHalf.js +0 -6
- package/dist/uiComponents/icons/CubeRendered.js +0 -7
- package/dist/uiComponents/icons/Details.js +0 -6
- package/dist/uiComponents/icons/DoubleChevronLeft.js +0 -6
- package/dist/uiComponents/icons/DoubleChevronRight.js +0 -6
- package/dist/uiComponents/icons/Ellipsis.js +0 -6
- package/dist/uiComponents/icons/EllipsisFill.js +0 -6
- package/dist/uiComponents/icons/GlobeSimple.js +0 -6
- package/dist/uiComponents/icons/Outline.js +0 -6
- package/dist/uiComponents/icons/Package.js +0 -6
- package/dist/uiComponents/icons/Resize.js +0 -7
- package/dist/uiComponents/icons/Trash.js +0 -6
- package/dist/uiComponents/icons/index.js +0 -20
- package/dist/uiComponents/isSafari.js +0 -2
- package/dist/uiComponents/onPointerOutside.js +0 -19
- package/dist/uiComponents/selects/BasicSelect.js +0 -24
- package/dist/uiComponents/simpleContextMenu/ContextMenu/BaseMenu.js +0 -40
- package/dist/uiComponents/simpleContextMenu/ContextMenu/ContextMenu.js +0 -87
- package/dist/uiComponents/simpleContextMenu/ContextMenu/Item.js +0 -37
- package/dist/uiComponents/simpleContextMenu/useContextMenu.js +0 -20
- package/dist/uiComponents/simpleContextMenu/useRequestContextMenu.js +0 -22
- package/dist/uiComponents/toolbar/ToolbarDropdownSelect.js +0 -7
- package/dist/uiComponents/toolbar/ToolbarIconButton.js +0 -74
- package/dist/uiComponents/toolbar/ToolbarSwitchSelect.js +0 -12
- package/dist/uiComponents/toolbar/ToolbarSwitchSelectContainer.js +0 -9
- package/dist/uiComponents/useBoundingClientRect.js +0 -13
- package/dist/uiComponents/useDebugRefreshEvery.js +0 -19
- package/dist/uiComponents/useDrag.js +0 -199
- package/dist/uiComponents/useHotspot.js +0 -30
- package/dist/uiComponents/useHover.js +0 -23
- package/dist/uiComponents/useHoverWithoutDescendants.js +0 -33
- package/dist/uiComponents/useKeyDown.js +0 -9
- package/dist/uiComponents/useKeyDownCallback.js +0 -28
- package/dist/uiComponents/useLockSet.js +0 -17
- package/dist/uiComponents/useLogger.js +0 -16
- package/dist/uiComponents/useOnClickOutside.js +0 -25
- package/dist/uiComponents/useOnKeyDown.js +0 -12
- package/dist/uiComponents/usePresence.js +0 -156
- package/dist/uiComponents/useValToAtom.js +0 -11
- package/dist/utils/absoluteDims.js +0 -7
- package/dist/utils/contextualWebComponents.js +0 -44
- package/dist/utils/copyToClipboard.js +0 -28
- package/dist/utils/derive-utils.js +0 -61
- package/dist/utils/devStringify.js +0 -20
- package/dist/utils/invariant.js +0 -79
- package/dist/utils/isMac.js +0 -2
- package/dist/utils/keyboardUtils.js +0 -23
- package/dist/utils/mousePositionD.js +0 -18
- package/dist/utils/redux/actionCreator.js +0 -15
- package/dist/utils/redux/actionCreator.test.js +0 -35
- package/dist/utils/redux/actionReducersBundle.js +0 -18
- package/dist/utils/redux/atomFromReduxStore.js +0 -11
- package/dist/utils/redux/configureStore.js +0 -18
- package/dist/utils/redux/pointerFriendlySelector.js +0 -8
- package/dist/utils/redux/withHistory/withBatchActions.js +0 -13
- package/dist/utils/redux/withHistory/withHistory.js +0 -157
- package/dist/utils/renderInPortalInContext.js +0 -38
- package/dist/utils/selectClosestHTMLAncestor.js +0 -13
- package/dist/utils/tightJsonStringify.js +0 -27
- package/dist/utils/tightJsonStringify.test.js +0 -25
- package/dist/utils/useRefAndState.js +0 -32
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Atom } from '@tomorrowevening/theatre-dataverse';
|
|
2
|
-
import { useVal } from '@tomorrowevening/theatre-react';
|
|
3
|
-
import getStudio from '@tomorrowevening/theatre-studio/getStudio';
|
|
4
|
-
import React, { useLayoutEffect, useMemo } from 'react';
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
import Toolset from './Toolset';
|
|
7
|
-
const Container = styled.div `
|
|
8
|
-
height: 36px;
|
|
9
|
-
/* pointer-events: none; */
|
|
10
|
-
|
|
11
|
-
display: flex;
|
|
12
|
-
gap: 0.5rem;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
`;
|
|
15
|
-
const GroupDivider = styled.div `
|
|
16
|
-
position: abolute;
|
|
17
|
-
height: 32px;
|
|
18
|
-
width: 1px;
|
|
19
|
-
background: #373b40;
|
|
20
|
-
opacity: 0.4;
|
|
21
|
-
`;
|
|
22
|
-
const ExtensionToolsetRender = ({ extension, toolbarId }) => {
|
|
23
|
-
const toolsetConfigBox = useMemo(() => new Atom([]), []);
|
|
24
|
-
const attachFn = extension.toolbars?.[toolbarId];
|
|
25
|
-
useLayoutEffect(() => {
|
|
26
|
-
const detach = attachFn?.(toolsetConfigBox.set.bind(toolsetConfigBox), getStudio().publicApi);
|
|
27
|
-
if (typeof detach === 'function')
|
|
28
|
-
return detach;
|
|
29
|
-
}, [extension, toolbarId, attachFn]);
|
|
30
|
-
const config = useVal(toolsetConfigBox.prism);
|
|
31
|
-
return React.createElement(Toolset, { config: config });
|
|
32
|
-
};
|
|
33
|
-
export const ExtensionToolbar = ({ toolbarId, showLeftDivider }) => {
|
|
34
|
-
const groups = [];
|
|
35
|
-
const extensionsById = useVal(getStudio().atomP.ephemeral.extensions.byId);
|
|
36
|
-
let isAfterFirstGroup = false;
|
|
37
|
-
for (const [, extension] of Object.entries(extensionsById)) {
|
|
38
|
-
if (!extension || !extension.toolbars?.[toolbarId])
|
|
39
|
-
continue;
|
|
40
|
-
groups.push(React.createElement(React.Fragment, { key: 'extensionToolbar-' + extension.id },
|
|
41
|
-
isAfterFirstGroup ? React.createElement(GroupDivider, null) : undefined,
|
|
42
|
-
React.createElement(ExtensionToolsetRender, { extension: extension, toolbarId: toolbarId })));
|
|
43
|
-
isAfterFirstGroup = true;
|
|
44
|
-
}
|
|
45
|
-
if (groups.length === 0)
|
|
46
|
-
return null;
|
|
47
|
-
return (React.createElement(Container, { "data-testid": `theatre-extensionToolbar-${toolbarId}` },
|
|
48
|
-
showLeftDivider ? React.createElement(GroupDivider, null) : undefined,
|
|
49
|
-
groups));
|
|
50
|
-
};
|
|
51
|
-
export default ExtensionToolbar;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import didYouMean from '@tomorrowevening/theatre-shared/utils/didYouMean';
|
|
2
|
-
import userReadableTypeOfValue from '@tomorrowevening/theatre-shared/utils/userReadableTypeOfValue';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import IconButton from './tools/IconButton';
|
|
5
|
-
import Switch from './tools/Switch';
|
|
6
|
-
import ExtensionFlyoutMenu from './tools/ExtensionFlyoutMenu';
|
|
7
|
-
const Toolset = (props) => {
|
|
8
|
-
return (React.createElement(React.Fragment, null, props.config.map((toolConfig, i) => {
|
|
9
|
-
return React.createElement(Tool, { config: toolConfig, key: i });
|
|
10
|
-
})));
|
|
11
|
-
};
|
|
12
|
-
const toolByType = {
|
|
13
|
-
Icon: IconButton,
|
|
14
|
-
Switch: Switch,
|
|
15
|
-
Flyout: ExtensionFlyoutMenu,
|
|
16
|
-
};
|
|
17
|
-
function getToolByType(type) {
|
|
18
|
-
return toolByType[type];
|
|
19
|
-
}
|
|
20
|
-
const Tool = ({ config }) => {
|
|
21
|
-
const Comp = getToolByType(config.type);
|
|
22
|
-
if (!Comp) {
|
|
23
|
-
throw new Error(`No tool with tool.type ${userReadableTypeOfValue(config.type)} exists. Did you mean ${didYouMean(config.type, Object.keys(toolByType))}`);
|
|
24
|
-
}
|
|
25
|
-
return React.createElement(Comp, { config: config });
|
|
26
|
-
};
|
|
27
|
-
export default Toolset;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { pointerEventsAutoInNormalMode } from '@tomorrowevening/theatre-studio/css';
|
|
4
|
-
import ToolbarIconButton from '@tomorrowevening/theatre-studio/uiComponents/toolbar/ToolbarIconButton';
|
|
5
|
-
import BaseMenu from '@tomorrowevening/theatre-studio/uiComponents/simpleContextMenu/ContextMenu/BaseMenu';
|
|
6
|
-
import usePopover from '@tomorrowevening/theatre-studio/uiComponents/Popover/usePopover';
|
|
7
|
-
const Container = styled.div `
|
|
8
|
-
${pointerEventsAutoInNormalMode};
|
|
9
|
-
& > svg {
|
|
10
|
-
width: 1em;
|
|
11
|
-
height: 1em;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
const ExtensionFlyoutMenu = ({ config }) => {
|
|
16
|
-
const triggerRef = useRef(null);
|
|
17
|
-
const popover = usePopover(() => {
|
|
18
|
-
const triggerBounds = triggerRef.current.getBoundingClientRect();
|
|
19
|
-
return {
|
|
20
|
-
debugName: 'ExtensionFlyoutMenu:' + config.label,
|
|
21
|
-
constraints: {
|
|
22
|
-
maxX: triggerBounds.right,
|
|
23
|
-
maxY: 8,
|
|
24
|
-
minX: triggerBounds.left,
|
|
25
|
-
minY: 8,
|
|
26
|
-
},
|
|
27
|
-
verticalGap: 2,
|
|
28
|
-
};
|
|
29
|
-
}, () => {
|
|
30
|
-
return (React.createElement(BaseMenu, { items: config.items.map((option, index) => ({
|
|
31
|
-
label: option.label,
|
|
32
|
-
callback: () => {
|
|
33
|
-
// this is a user-defined function, so we need to wrap it in a try/catch
|
|
34
|
-
try {
|
|
35
|
-
option.onClick?.();
|
|
36
|
-
}
|
|
37
|
-
catch (e) {
|
|
38
|
-
console.error(e);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
})), onRequestClose: () => {
|
|
42
|
-
popover.close('clicked');
|
|
43
|
-
} }));
|
|
44
|
-
});
|
|
45
|
-
return (React.createElement(Container, null,
|
|
46
|
-
popover.node,
|
|
47
|
-
React.createElement(ToolbarIconButton, { ref: triggerRef, onClick: (e) => {
|
|
48
|
-
popover.open(e, triggerRef.current);
|
|
49
|
-
} }, config.label)));
|
|
50
|
-
};
|
|
51
|
-
export default ExtensionFlyoutMenu;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ToolbarIconButton from '@tomorrowevening/theatre-studio/uiComponents/toolbar/ToolbarIconButton';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { pointerEventsAutoInNormalMode } from '@tomorrowevening/theatre-studio/css';
|
|
5
|
-
const Container = styled(ToolbarIconButton) `
|
|
6
|
-
${pointerEventsAutoInNormalMode};
|
|
7
|
-
& > svg {
|
|
8
|
-
width: 1em;
|
|
9
|
-
height: 1em;
|
|
10
|
-
pointer-events: none;
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
const IconButton = ({ config, testId }) => {
|
|
14
|
-
return (React.createElement(Container, { onClick: config.onClick, "data-testid": testId, title: config.title, dangerouslySetInnerHTML: { __html: config['svgSource'] ?? '' } }));
|
|
15
|
-
};
|
|
16
|
-
export default IconButton;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { pointerEventsAutoInNormalMode } from '@tomorrowevening/theatre-studio/css';
|
|
4
|
-
import ToolbarSwitchSelect from '@tomorrowevening/theatre-studio/uiComponents/toolbar/ToolbarSwitchSelect';
|
|
5
|
-
const IconContainer = styled.div `
|
|
6
|
-
${pointerEventsAutoInNormalMode};
|
|
7
|
-
& > svg {
|
|
8
|
-
width: 1em;
|
|
9
|
-
height: 1em;
|
|
10
|
-
pointer-events: none;
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
const Switch = ({ config }) => {
|
|
14
|
-
return (React.createElement(ToolbarSwitchSelect, { onChange: config.onChange, options: config.options.map(({ label, value, svgSource }) => ({
|
|
15
|
-
label,
|
|
16
|
-
value,
|
|
17
|
-
icon: React.createElement(IconContainer, { dangerouslySetInnerHTML: { __html: svgSource } }),
|
|
18
|
-
})), value: config.value }));
|
|
19
|
-
};
|
|
20
|
-
export default Switch;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { usePrism, useVal } from '@tomorrowevening/theatre-react';
|
|
2
|
-
import getStudio from '@tomorrowevening/theatre-studio/getStudio';
|
|
3
|
-
import React, { useMemo, useRef } from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import useTooltip from '@tomorrowevening/theatre-studio/uiComponents/Popover/useTooltip';
|
|
6
|
-
import ErrorTooltip from '@tomorrowevening/theatre-studio/uiComponents/Popover/ErrorTooltip';
|
|
7
|
-
import BasicTooltip from '@tomorrowevening/theatre-studio/uiComponents/Popover/BasicTooltip';
|
|
8
|
-
import { val } from '@tomorrowevening/theatre-dataverse';
|
|
9
|
-
import ExtensionToolbar from './ExtensionToolbar/ExtensionToolbar';
|
|
10
|
-
import PinButton from './PinButton';
|
|
11
|
-
import { Details, Ellipsis, Outline, Bell, } from '@tomorrowevening/theatre-studio/uiComponents/icons';
|
|
12
|
-
import DoubleChevronLeft from '@tomorrowevening/theatre-studio/uiComponents/icons/DoubleChevronLeft';
|
|
13
|
-
import DoubleChevronRight from '@tomorrowevening/theatre-studio/uiComponents/icons/DoubleChevronRight';
|
|
14
|
-
import ToolbarIconButton from '@tomorrowevening/theatre-studio/uiComponents/toolbar/ToolbarIconButton';
|
|
15
|
-
import usePopover from '@tomorrowevening/theatre-studio/uiComponents/Popover/usePopover';
|
|
16
|
-
import MoreMenu from './MoreMenu/MoreMenu';
|
|
17
|
-
import { useNotifications, useEmptyNotificationsTooltip, } from '@tomorrowevening/theatre-studio/notify';
|
|
18
|
-
const Container = styled.div `
|
|
19
|
-
height: 36px;
|
|
20
|
-
pointer-events: none;
|
|
21
|
-
|
|
22
|
-
display: flex;
|
|
23
|
-
justify-content: space-between;
|
|
24
|
-
padding: 12px;
|
|
25
|
-
`;
|
|
26
|
-
const NumberOfConflictsIndicator = styled.div `
|
|
27
|
-
color: white;
|
|
28
|
-
width: 14px;
|
|
29
|
-
height: 14px;
|
|
30
|
-
background: #d00;
|
|
31
|
-
border-radius: 4px;
|
|
32
|
-
text-align: center;
|
|
33
|
-
line-height: 14px;
|
|
34
|
-
font-weight: 600;
|
|
35
|
-
font-size: 8px;
|
|
36
|
-
position: relative;
|
|
37
|
-
left: -6px;
|
|
38
|
-
top: -11px;
|
|
39
|
-
margin-right: -14px;
|
|
40
|
-
box-shadow: 0 4px 6px -4px #00000059;
|
|
41
|
-
`;
|
|
42
|
-
const SubContainer = styled.div `
|
|
43
|
-
display: flex;
|
|
44
|
-
gap: 8px;
|
|
45
|
-
`;
|
|
46
|
-
const HasUpdatesBadge = styled.div `
|
|
47
|
-
position: absolute;
|
|
48
|
-
background: ${({ type }) => (type === 'info' ? '#40aaa4' : '#f59e0b')};
|
|
49
|
-
width: 6px;
|
|
50
|
-
height: 6px;
|
|
51
|
-
border-radius: 50%;
|
|
52
|
-
right: -2px;
|
|
53
|
-
top: -2px;
|
|
54
|
-
`;
|
|
55
|
-
const GroupDivider = styled.div `
|
|
56
|
-
position: absolute;
|
|
57
|
-
height: 32px;
|
|
58
|
-
width: 1px;
|
|
59
|
-
background: #373b40;
|
|
60
|
-
opacity: 0.4;
|
|
61
|
-
`;
|
|
62
|
-
let showedVisualTestingWarning = false;
|
|
63
|
-
const GlobalToolbar = () => {
|
|
64
|
-
const conflicts = usePrism(() => {
|
|
65
|
-
const ephemeralStateOfAllProjects = val(getStudio().atomP.ephemeral.coreByProject);
|
|
66
|
-
return Object.entries(ephemeralStateOfAllProjects)
|
|
67
|
-
.map(([projectId, state]) => ({ projectId, state }))
|
|
68
|
-
.filter(({ state }) => state.loadingState.type === 'browserStateIsNotBasedOnDiskState');
|
|
69
|
-
}, []);
|
|
70
|
-
const [triggerTooltip, triggerButtonRef] = useTooltip({ enabled: conflicts.length > 0, enterDelay: conflicts.length > 0 ? 0 : 200 }, () => conflicts.length > 0 ? (React.createElement(ErrorTooltip, null, conflicts.length === 1
|
|
71
|
-
? `There is a state conflict in project "${conflicts[0].projectId}". Select the project in the outline below in order to fix it.`
|
|
72
|
-
: `There are ${conflicts.length} projects that have state conflicts. They are highlighted in the outline below. `)) : (React.createElement(BasicTooltip, null,
|
|
73
|
-
React.createElement(React.Fragment, null, "Outline"))));
|
|
74
|
-
const outlinePinned = useVal(getStudio().atomP.ahistoric.pinOutline) ?? true;
|
|
75
|
-
const detailsPinned = useVal(getStudio().atomP.ahistoric.pinDetails) ?? true;
|
|
76
|
-
const hasUpdates = useVal(getStudio().atomP.ahistoric.updateChecker.result.hasUpdates) === true;
|
|
77
|
-
const moreMenu = usePopover(() => {
|
|
78
|
-
const triggerBounds = moreMenuTriggerRef.current.getBoundingClientRect();
|
|
79
|
-
return {
|
|
80
|
-
debugName: 'More Menu',
|
|
81
|
-
constraints: {
|
|
82
|
-
maxX: triggerBounds.right,
|
|
83
|
-
maxY: 8,
|
|
84
|
-
// MVP: Don't render the more menu all the way to the left
|
|
85
|
-
// when it doesn't fit on the screen height
|
|
86
|
-
// See https://linear.app/theatre/issue/P-178/bug-broken-updater-ui-in-simple-html-page
|
|
87
|
-
// 1/10 There's a better way to solve this.
|
|
88
|
-
// 1/10 Perhaps consider separate constraint like "rightSideMinX" & for future: "bottomSideMinY"
|
|
89
|
-
// 2/10 Or, consider constraints being a function of the dimensions of the box => constraints.
|
|
90
|
-
minX: triggerBounds.left - 140,
|
|
91
|
-
minY: 8,
|
|
92
|
-
},
|
|
93
|
-
verticalGap: 2,
|
|
94
|
-
};
|
|
95
|
-
}, () => {
|
|
96
|
-
return React.createElement(MoreMenu, null);
|
|
97
|
-
});
|
|
98
|
-
const moreMenuTriggerRef = useRef(null);
|
|
99
|
-
const showUpdatesBadge = useMemo(() => {
|
|
100
|
-
if (window.__IS_VISUAL_REGRESSION_TESTING) {
|
|
101
|
-
if (!showedVisualTestingWarning) {
|
|
102
|
-
showedVisualTestingWarning = true;
|
|
103
|
-
console.warn("Visual regression testing enabled, so we're showing the updates badge unconditionally");
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (hasUpdates || window.__IS_VISUAL_REGRESSION_TESTING) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
return hasUpdates;
|
|
110
|
-
}, [hasUpdates]);
|
|
111
|
-
const { hasNotifications } = useNotifications();
|
|
112
|
-
const [notificationsTooltip, notificationsTriggerRef] = useEmptyNotificationsTooltip();
|
|
113
|
-
return (React.createElement(Container, null,
|
|
114
|
-
React.createElement(SubContainer, null,
|
|
115
|
-
triggerTooltip,
|
|
116
|
-
React.createElement(PinButton, { ref: triggerButtonRef, "data-testid": "OutlinePanel-TriggerButton", onClick: () => {
|
|
117
|
-
getStudio().transaction(({ stateEditors, drafts }) => {
|
|
118
|
-
stateEditors.studio.ahistoric.setPinOutline(!(drafts.ahistoric.pinOutline ?? true));
|
|
119
|
-
});
|
|
120
|
-
}, icon: React.createElement(Outline, null), pinHintIcon: React.createElement(DoubleChevronRight, null), unpinHintIcon: React.createElement(DoubleChevronLeft, null), pinned: outlinePinned }),
|
|
121
|
-
conflicts.length > 0 ? (React.createElement(NumberOfConflictsIndicator, null, conflicts.length)) : null,
|
|
122
|
-
React.createElement(ExtensionToolbar, { showLeftDivider: true, toolbarId: "global" })),
|
|
123
|
-
React.createElement(SubContainer, null,
|
|
124
|
-
notificationsTooltip,
|
|
125
|
-
React.createElement(PinButton, { ref: notificationsTriggerRef, onClick: () => {
|
|
126
|
-
getStudio().transaction(({ stateEditors, drafts }) => {
|
|
127
|
-
stateEditors.studio.ahistoric.setPinNotifications(!(drafts.ahistoric.pinNotifications ?? false));
|
|
128
|
-
});
|
|
129
|
-
}, icon: React.createElement(Bell, null), pinHintIcon: React.createElement(Bell, null), unpinHintIcon: React.createElement(Bell, null), pinned: useVal(getStudio().atomP.ahistoric.pinNotifications) ?? false }, hasNotifications && React.createElement(HasUpdatesBadge, { type: "warning" })),
|
|
130
|
-
moreMenu.node,
|
|
131
|
-
React.createElement(ToolbarIconButton, { ref: moreMenuTriggerRef, onClick: (e) => {
|
|
132
|
-
moreMenu.toggle(e, moreMenuTriggerRef.current);
|
|
133
|
-
} },
|
|
134
|
-
React.createElement(Ellipsis, null),
|
|
135
|
-
showUpdatesBadge && React.createElement(HasUpdatesBadge, { type: "info" })),
|
|
136
|
-
React.createElement(PinButton, { ref: triggerButtonRef, onClick: () => {
|
|
137
|
-
getStudio().transaction(({ stateEditors, drafts }) => {
|
|
138
|
-
stateEditors.studio.ahistoric.setPinDetails(!(drafts.ahistoric.pinDetails ?? true));
|
|
139
|
-
});
|
|
140
|
-
}, icon: React.createElement(Details, null), pinHintIcon: React.createElement(DoubleChevronLeft, null), unpinHintIcon: React.createElement(DoubleChevronRight, null), pinned: detailsPinned }))));
|
|
141
|
-
};
|
|
142
|
-
export default GlobalToolbar;
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { useVal } from '@tomorrowevening/theatre-react';
|
|
2
|
-
import getStudio from '@tomorrowevening/theatre-studio/getStudio';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
const Container = styled.div `
|
|
6
|
-
width: 138px;
|
|
7
|
-
border-radius: 2px;
|
|
8
|
-
background-color: rgba(42, 45, 50, 0.9);
|
|
9
|
-
position: absolute;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
align-items: stretch;
|
|
13
|
-
justify-content: flex-start;
|
|
14
|
-
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.25), 0px 2px 6px rgba(0, 0, 0, 0.15);
|
|
15
|
-
backdrop-filter: blur(14px);
|
|
16
|
-
pointer-events: auto;
|
|
17
|
-
// makes the edges of the item highlights match the rounded corners
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
|
|
20
|
-
@supports not (backdrop-filter: blur()) {
|
|
21
|
-
background-color: rgba(42, 45, 50, 0.98);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
color: rgba(255, 255, 255, 0.9);
|
|
25
|
-
|
|
26
|
-
& a {
|
|
27
|
-
// Fix colors of links to not be default
|
|
28
|
-
color: inherit;
|
|
29
|
-
}
|
|
30
|
-
`;
|
|
31
|
-
const Item = styled.div `
|
|
32
|
-
position: relative;
|
|
33
|
-
padding: 0px 12px;
|
|
34
|
-
font-weight: 400;
|
|
35
|
-
font-size: 11px;
|
|
36
|
-
height: 32px;
|
|
37
|
-
text-decoration: none;
|
|
38
|
-
user-select: none;
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: row;
|
|
41
|
-
align-items: center;
|
|
42
|
-
cursor: default;
|
|
43
|
-
`;
|
|
44
|
-
const Link = styled(Item) `
|
|
45
|
-
&:before {
|
|
46
|
-
position: absolute;
|
|
47
|
-
display: block;
|
|
48
|
-
content: ' ';
|
|
49
|
-
inset: 3px;
|
|
50
|
-
border-radius: 3px;
|
|
51
|
-
background: rgba(255, 255, 255, 0.1);
|
|
52
|
-
opacity: 0;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&.secondary {
|
|
56
|
-
color: rgba(255, 255, 255, 0.5);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&:hover {
|
|
60
|
-
/* background-color: #398995; */
|
|
61
|
-
color: white !important;
|
|
62
|
-
&:before {
|
|
63
|
-
opacity: 1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
const VersionContainer = styled(Item) `
|
|
68
|
-
height: auto;
|
|
69
|
-
min-height: 32px;
|
|
70
|
-
padding-top: 12px;
|
|
71
|
-
padding-bottom: 10px;
|
|
72
|
-
flex-direction: column;
|
|
73
|
-
justify-content: flex-start;
|
|
74
|
-
align-items: stretch;
|
|
75
|
-
gap: 8px;
|
|
76
|
-
color: rgba(255, 255, 255, 0.5);
|
|
77
|
-
`;
|
|
78
|
-
const VersionLabel = styled.div `
|
|
79
|
-
font-weight: 600;
|
|
80
|
-
`;
|
|
81
|
-
const VersionValueRow = styled.div `
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-direction: row;
|
|
84
|
-
justify-content: space-between;
|
|
85
|
-
`;
|
|
86
|
-
const VersionValue = styled.div `
|
|
87
|
-
margin-left: 2px;
|
|
88
|
-
`;
|
|
89
|
-
const Divider = styled.div `
|
|
90
|
-
height: 1px;
|
|
91
|
-
margin: 0 2px;
|
|
92
|
-
background: rgba(255, 255, 255, 0.02);
|
|
93
|
-
`;
|
|
94
|
-
const UpdateDot = styled.div `
|
|
95
|
-
position: absolute;
|
|
96
|
-
width: 8px;
|
|
97
|
-
height: 8px;
|
|
98
|
-
background: #40aaa4;
|
|
99
|
-
right: 14px;
|
|
100
|
-
top: 12px;
|
|
101
|
-
border-radius: 50%;
|
|
102
|
-
`;
|
|
103
|
-
const version = process.env.THEATRE_VERSION ?? '0.4.0';
|
|
104
|
-
const untaggedVersion = version.match(/^[^\-]+/)[0];
|
|
105
|
-
const MoreMenu = React.forwardRef((props, ref) => {
|
|
106
|
-
const hasUpdates = useVal(getStudio().atomP.ahistoric.updateChecker.result.hasUpdates);
|
|
107
|
-
return (React.createElement(Container, { ref: ref },
|
|
108
|
-
React.createElement(Link, { as: "a", href: "https://www.theatrejs.com/docs/latest", className: "", target: "_blank" }, "Docs"),
|
|
109
|
-
React.createElement(Link, { as: "a", href: `https://www.theatrejs.com/docs/latest/releases`, className: "", target: "_blank" }, "Changelog"),
|
|
110
|
-
React.createElement(Divider, null),
|
|
111
|
-
React.createElement(Link, { as: "a", href: "https://github.com/theatre-js/theatre", className: "", target: "_blank" }, "Github"),
|
|
112
|
-
React.createElement(Link, { as: "a", href: "https://twitter.com/theatre_js", className: "", target: "_blank" }, "Twitter"),
|
|
113
|
-
React.createElement(Link, { className: "", as: "a", href: "https://discord.gg/bm9f8F9Y9N", target: "_blank" }, "Discord"),
|
|
114
|
-
React.createElement(Divider, null),
|
|
115
|
-
React.createElement(VersionContainer, null,
|
|
116
|
-
React.createElement(VersionLabel, null, "Version"),
|
|
117
|
-
React.createElement(VersionValueRow, null,
|
|
118
|
-
React.createElement(VersionValue, null,
|
|
119
|
-
version,
|
|
120
|
-
' ',
|
|
121
|
-
hasUpdates === true
|
|
122
|
-
? '(outdated)'
|
|
123
|
-
: hasUpdates === false
|
|
124
|
-
? '(latest)'
|
|
125
|
-
: ''))),
|
|
126
|
-
hasUpdates === true && (React.createElement(React.Fragment, null,
|
|
127
|
-
React.createElement(Divider, null),
|
|
128
|
-
React.createElement(Link, { as: "a", href: `https://www.theatrejs.com/docs/latest/releases${encodeURIComponent(untaggedVersion)}`, className: "", target: "_blank" },
|
|
129
|
-
"Update",
|
|
130
|
-
React.createElement(UpdateDot, null)),
|
|
131
|
-
React.createElement(Link, { as: "a", href: `https://www.theatrejs.com/docs/latest/releases#${encodeURIComponent(untaggedVersion)}`, className: "", target: "_blank" }, "What's new?")))));
|
|
132
|
-
});
|
|
133
|
-
export default MoreMenu;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import React, { forwardRef, useState } from 'react';
|
|
3
|
-
import ToolbarIconButton from '@tomorrowevening/theatre-studio/uiComponents/toolbar/ToolbarIconButton';
|
|
4
|
-
const Container = styled(ToolbarIconButton) `
|
|
5
|
-
color: ${({ pinned }) => (pinned ? 'rgba(255, 255, 255, 0.8)' : '#A8A8A9')};
|
|
6
|
-
|
|
7
|
-
border-bottom: 1px solid
|
|
8
|
-
${({ pinned }) => pinned ? 'rgba(255, 255, 255, 0.7)' : 'rgba(255, 255, 255, 0.08)'};
|
|
9
|
-
`;
|
|
10
|
-
const PinButton = forwardRef(({ children, hint, pinned, icon, pinHintIcon, unpinHintIcon, ...props }, ref) => {
|
|
11
|
-
const [hovered, setHovered] = useState(false);
|
|
12
|
-
const showHint = hovered || hint;
|
|
13
|
-
return (React.createElement(Container, { ...props, pinned: pinned, ref: ref, onMouseOver: () => setHovered(true), onMouseOut: () => setHovered(false) },
|
|
14
|
-
React.createElement("div", { style: {
|
|
15
|
-
pointerEvents: 'none',
|
|
16
|
-
width: 'fit-content',
|
|
17
|
-
height: 'fit-content',
|
|
18
|
-
inset: 0,
|
|
19
|
-
} }, showHint && !pinned
|
|
20
|
-
? pinHintIcon
|
|
21
|
-
: showHint && pinned
|
|
22
|
-
? unpinHintIcon
|
|
23
|
-
: icon),
|
|
24
|
-
children));
|
|
25
|
-
});
|
|
26
|
-
export default PinButton;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
const DetailPanelButton = styled.button `
|
|
3
|
-
text-align: center;
|
|
4
|
-
padding: 8px;
|
|
5
|
-
border-radius: 2px;
|
|
6
|
-
border: 1px solid #627b7b87;
|
|
7
|
-
background-color: #4b787d3d;
|
|
8
|
-
color: #eaeaea;
|
|
9
|
-
font-weight: 400;
|
|
10
|
-
display: block;
|
|
11
|
-
appearance: none;
|
|
12
|
-
flex-grow: 1;
|
|
13
|
-
cursor: ${(props) => (props.disabled ? 'none' : 'pointer')};
|
|
14
|
-
opacity: ${(props) => (props.disabled ? 0.4 : 1)};
|
|
15
|
-
|
|
16
|
-
&:hover {
|
|
17
|
-
background-color: #7dc1c878;
|
|
18
|
-
border-color: #9ebcbf;
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
21
|
-
export default DetailPanelButton;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import React, { createContext, useContext, useLayoutEffect, useMemo, useState, } from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
// using an ID to make CSS selectors faster
|
|
4
|
-
const elementId = 'pointer-root';
|
|
5
|
-
/**
|
|
6
|
-
* When the cursor is locked, this css var is added to #pointer-root
|
|
7
|
-
* whose value will be the locked cursor (e.g. ew-resize).
|
|
8
|
-
*
|
|
9
|
-
* Look up references of this constant for examples of how it is used.
|
|
10
|
-
*
|
|
11
|
-
* See {@link useCssCursorLock} - code that locks the cursor
|
|
12
|
-
*/
|
|
13
|
-
export const lockedCursorCssVarName = '--lockedCursor';
|
|
14
|
-
const Container = styled.div `
|
|
15
|
-
pointer-events: auto;
|
|
16
|
-
&.normal {
|
|
17
|
-
pointer-events: none;
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
20
|
-
const CursorOverride = styled.div `
|
|
21
|
-
position: absolute;
|
|
22
|
-
inset: 0;
|
|
23
|
-
pointer-events: none;
|
|
24
|
-
|
|
25
|
-
#pointer-root:not(.normal) > & {
|
|
26
|
-
pointer-events: auto;
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
const context = createContext({});
|
|
30
|
-
const PointerEventsHandler = (props) => {
|
|
31
|
-
const [locks, setLocks] = useState([]);
|
|
32
|
-
const contextValue = useMemo(() => {
|
|
33
|
-
const getLock = (className, cursor) => {
|
|
34
|
-
const lock = { className, cursor };
|
|
35
|
-
setLocks((s) => [...s, lock]);
|
|
36
|
-
const unlock = () => {
|
|
37
|
-
setLocks((s) => s.filter((l) => l !== lock));
|
|
38
|
-
};
|
|
39
|
-
return unlock;
|
|
40
|
-
};
|
|
41
|
-
return {
|
|
42
|
-
getLock,
|
|
43
|
-
};
|
|
44
|
-
}, []);
|
|
45
|
-
const lockedCursor = locks[0]?.cursor ?? '';
|
|
46
|
-
return (React.createElement(context.Provider, { value: contextValue },
|
|
47
|
-
React.createElement(Container, { id: elementId, className: (locks[0]?.className ?? 'normal') + ' ' + props.className },
|
|
48
|
-
React.createElement(CursorOverride, { style: {
|
|
49
|
-
cursor: lockedCursor,
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
[lockedCursorCssVarName]: lockedCursor,
|
|
52
|
-
} }, props.children))));
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* A "locking" mechanism for managing style.cursor values.
|
|
56
|
-
*
|
|
57
|
-
* Putting this behind a lock is important so we can properly manage
|
|
58
|
-
* multiple features all coordinating to style the cursor.
|
|
59
|
-
*
|
|
60
|
-
* This will also track a stack of different cursor styles so that
|
|
61
|
-
* adding a style to be the "foremost" cursor can override a previous style,
|
|
62
|
-
* but then "unlocking" that style will again reveal the existing styles.
|
|
63
|
-
*
|
|
64
|
-
* It behaves a bit like a stack.
|
|
65
|
-
*
|
|
66
|
-
* See {@link lockedCursorCssVarName}
|
|
67
|
-
*/
|
|
68
|
-
export const useCssCursorLock = (
|
|
69
|
-
/** Whether to enable the provided cursor style */
|
|
70
|
-
enabled, className,
|
|
71
|
-
/** e.g. `"ew"`, `"help"`, `"pointer"`, `"text"`, etc */
|
|
72
|
-
cursor) => {
|
|
73
|
-
const ctx = useContext(context);
|
|
74
|
-
useLayoutEffect(() => {
|
|
75
|
-
if (!enabled)
|
|
76
|
-
return;
|
|
77
|
-
return ctx.getLock(className, cursor);
|
|
78
|
-
}, [enabled, className, cursor]);
|
|
79
|
-
};
|
|
80
|
-
export default PointerEventsHandler;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { pointerEventsAutoInNormalMode } from '@tomorrowevening/theatre-studio/css';
|
|
2
|
-
import { transparentize } from 'polished';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import PopoverArrow from './PopoverArrow';
|
|
6
|
-
export const popoverBackgroundColor = transparentize(0.05, `#2a2a31`);
|
|
7
|
-
const Container = styled.div `
|
|
8
|
-
position: absolute;
|
|
9
|
-
--popover-bg: ${popoverBackgroundColor};
|
|
10
|
-
--popover-inner-stroke: #505159;
|
|
11
|
-
--popover-outer-stroke: #111;
|
|
12
|
-
|
|
13
|
-
background: var(--popover-bg);
|
|
14
|
-
|
|
15
|
-
color: white;
|
|
16
|
-
padding: 0;
|
|
17
|
-
margin: 0;
|
|
18
|
-
cursor: default;
|
|
19
|
-
${pointerEventsAutoInNormalMode};
|
|
20
|
-
border-radius: 3px;
|
|
21
|
-
z-index: 10000;
|
|
22
|
-
border: 1px solid var(--popover-inner-stroke);
|
|
23
|
-
box-shadow: 0 0 0 1px var(--popover-outer-stroke), 0 6px 8px -4px black;
|
|
24
|
-
backdrop-filter: blur(8px);
|
|
25
|
-
|
|
26
|
-
& a {
|
|
27
|
-
color: inherit;
|
|
28
|
-
}
|
|
29
|
-
`;
|
|
30
|
-
const BasicPopover = React.forwardRef(({ children, className, showPopoverEdgeTriangle: showPopoverEdgeTriangle = true, }, ref) => {
|
|
31
|
-
return (React.createElement(Container, { className: className, ref: ref },
|
|
32
|
-
showPopoverEdgeTriangle ? React.createElement(PopoverArrow, null) : undefined,
|
|
33
|
-
children));
|
|
34
|
-
});
|
|
35
|
-
export default BasicPopover;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import BasicPopover from './BasicPopover';
|
|
3
|
-
const BasicTooltip = styled(BasicPopover) `
|
|
4
|
-
padding: 1em;
|
|
5
|
-
max-width: 240px;
|
|
6
|
-
pointer-events: none !important;
|
|
7
|
-
--popover-outer-stroke: transparent;
|
|
8
|
-
--popover-inner-stroke: #45464d;
|
|
9
|
-
`;
|
|
10
|
-
export default BasicTooltip;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import BasicTooltip from './BasicTooltip';
|
|
3
|
-
const ErrorTooltip = styled(BasicTooltip) `
|
|
4
|
-
--popover-outer-stroke: #e11c1c;
|
|
5
|
-
--popover-inner-stroke: #2c1c1c;
|
|
6
|
-
--popover-bg: #2c1c1c;
|
|
7
|
-
pointer-events: none !important;
|
|
8
|
-
`;
|
|
9
|
-
export default ErrorTooltip;
|