Files
test/src/types/state.d.ts
T
Kyle Geib 61b60b9819 ISSUE-017 - Improvements to a number of things.
* Moved FullScreenContainer in WorkspacesRoute to make scrolling much better. Seriously, 100% works better.
* Simplified dimensions state actions to a shared one.
* Abandoned the noisy and useless "AnimatedBG" type.
* Added workspace dimensions state (I'll need this later to prevent off-screen dragging).
* Placed OverlayDisplay component in PreviewWindow, where it makes more sense. I'll still allow it to roam around outside of it, though.
* Renamed "menu" dimensions to "mainMenu".
* Improved initNewOverlayItem action to support setting visible.
* Correct handling of showing the OverlayItemContainer.
* Simplified the initial position of a new OverlayItem to a simple initial value instead of setting it in the middle of provided dimensions.
* Made PreviewWindow `position: relative` to allow absolute positioning of OverlayItem from it.
* Added importHelpers to tsconfig because VSCode was complaining about it.
2022-01-11 19:12:21 -05:00

39 lines
838 B
TypeScript

export type RootState = {
pageDimensions: PageDimensions,
workspace: Workspace,
overlayTool: OverlayTool,
};
// Page Dimensions
export type PageDimensions = {
mainMenu: Dimensions,
app: Dimensions,
workspace: Dimensions,
};
export type Dimensions = { width: number, height: number };
// Workspace
export type Workspace = {
workspaceId: WorkspaceId,
animatedBG: boolean,
};
export type WorkspaceId = string;
// Overlay Tool
export type OverlayTool = {
// workspaceId: WorkspaceId,
overlayIds: Array<OverlayId>,
currentOverlayId: OverlayId | null,
currentOverlayItem: OverlayItem | null,
visible: boolean,
};
export type OverlayId = string;
export type OverlayPosition = { x: number, y: number };
export type OverlayItem = {
id: OverlayId,
position: OverlayPosition,
opacity: number,
scale: number,
};