-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5c1ca4
commit ebbd61d
Showing
23 changed files
with
282 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 17 additions & 1 deletion
18
src/components/core/animated-switcher.jsx → src/components/core/animated-switcher.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { STKMode } from "@/constants"; | ||
import { useEvents, useInteractions } from "@/hooks"; | ||
import type { ISTKProps } from "@/types"; | ||
import { default as Controls } from "./controls"; | ||
import { default as Footer } from "./footer"; | ||
import { default as Operations } from "./operations"; | ||
import { default as Toolbar } from "./toolbar"; | ||
import { Cursor, default as Workspace } from "./workspace"; | ||
|
||
export * from "./core"; | ||
|
||
const Designer: React.FC<ISTKProps> = (props) => { | ||
useEvents(); | ||
useInteractions(); | ||
return ( | ||
<> | ||
<div className="h-full flex flex-col"> | ||
<Operations /> | ||
<div className="h-full flex relative"> | ||
<Toolbar /> | ||
<Workspace {...props} /> | ||
<Controls /> | ||
</div> | ||
</div> | ||
<Footer /> | ||
<Cursor /> | ||
</> | ||
); | ||
}; | ||
|
||
const User: React.FC<ISTKProps> = (props) => { | ||
return ( | ||
<div className="h-full flex flex-col relative"> | ||
<Workspace {...props} /> | ||
</div> | ||
); | ||
}; | ||
|
||
const Core = (props: ISTKProps) => { | ||
if (props.mode === STKMode.Designer) { | ||
return <Designer {...props} />; | ||
} | ||
return <User {...props} />; | ||
}; | ||
|
||
export default Core; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/components/workspace/grid.jsx → src/components/workspace/grid.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface IBooth { | ||
id: string; | ||
x: number; | ||
y: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export interface IImage { | ||
id: string; | ||
x: number; | ||
y: number; | ||
href: string; | ||
width?: number; | ||
height?: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export * from "./image"; | ||
export * from "./seat"; | ||
export * from "./text"; | ||
export * from "./shape"; | ||
export * from "./booth"; | ||
export * from "./polyline"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export interface ISection { | ||
id: string; | ||
name: string; | ||
color: string; | ||
freeSeating: boolean; | ||
capacity?: number; | ||
} | ||
|
||
export interface IPolylinepoint { | ||
x: number; | ||
y: number; | ||
} | ||
|
||
export interface IPolyline { | ||
id: string; | ||
points: IPolylinepoint[]; | ||
color?: string; | ||
stroke?: string; | ||
section?: string; | ||
} |
Oops, something went wrong.