2023-03-10 19:30:46 +08:00
|
|
|
import styled, { createGlobalStyle } from 'styled-components';
|
|
|
|
import { borderSize, borderSizeLarge } from '/imports/ui/stylesheets/styled-components/general';
|
|
|
|
import { toolbarButtonColor, colorWhite, colorBlack } from '/imports/ui/stylesheets/styled-components/palette';
|
2023-02-24 07:47:34 +08:00
|
|
|
import {
|
2023-02-25 07:05:14 +08:00
|
|
|
fontSizeLarger,
|
2023-02-24 07:47:34 +08:00
|
|
|
} from '/imports/ui/stylesheets/styled-components/typography';
|
|
|
|
import Button from '/imports/ui/components/common/button/component';
|
|
|
|
|
2023-12-06 02:15:25 +08:00
|
|
|
const TldrawV2GlobalStyle = createGlobalStyle`
|
|
|
|
${({ isPresenter, hasWBAccess }) => (!isPresenter && hasWBAccess) && `
|
|
|
|
[data-testid="tools.hand"] {
|
2023-03-10 19:30:46 +08:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
`}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
|
|
|
${({ isMultiUserActive }) => !isMultiUserActive && `
|
|
|
|
.tl-nametag {
|
|
|
|
display: none;
|
2023-03-10 19:30:46 +08:00
|
|
|
}
|
|
|
|
`}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
|
|
|
${({ isRTL }) => (!isRTL) && `
|
|
|
|
.tlui-menu-zone {
|
|
|
|
right: auto;
|
|
|
|
left: 3.5rem;
|
|
|
|
}
|
|
|
|
`}
|
|
|
|
|
|
|
|
${({ isRTL }) => (isRTL) && `
|
|
|
|
.tlui-menu-zone {
|
|
|
|
right: 3.5rem;
|
|
|
|
left: auto;
|
|
|
|
}
|
|
|
|
`}
|
|
|
|
|
2024-02-02 20:16:09 +08:00
|
|
|
${({ isToolbarVisible }) => (!isToolbarVisible) && `
|
2024-02-02 20:58:58 +08:00
|
|
|
.tlui-toolbar,
|
|
|
|
.tlui-style-panel__wrapper,
|
|
|
|
.tlui-menu-zone {
|
2024-02-02 20:16:09 +08:00
|
|
|
visibility: hidden;
|
|
|
|
}
|
2024-02-05 21:05:19 +08:00
|
|
|
#WhiteboardOptionButton {
|
|
|
|
opacity: 0.2;
|
|
|
|
}
|
2024-02-02 20:16:09 +08:00
|
|
|
`}
|
|
|
|
|
2023-12-06 02:15:25 +08:00
|
|
|
#presentationInnerWrapper > div:last-child {
|
|
|
|
position: relative;
|
|
|
|
height: 100%;
|
2023-03-10 19:30:46 +08:00
|
|
|
}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
|
|
|
#presentationInnerWrapper > div:last-child > * {
|
|
|
|
position: relative;
|
|
|
|
height: 100%;
|
2023-03-10 19:30:46 +08:00
|
|
|
}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
|
|
|
#presentationInnerWrapper > div:last-child .tl-overlays {
|
|
|
|
left: 0px;
|
|
|
|
bottom: 0px;
|
2023-03-10 19:30:46 +08:00
|
|
|
}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
|
|
|
.tlui-navigation-zone,
|
|
|
|
.tlui-help-menu,
|
|
|
|
.tlui-debug-panel {
|
2023-03-10 19:30:46 +08:00
|
|
|
display: none;
|
|
|
|
}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
|
|
|
.tlui-style-panel__wrapper {
|
|
|
|
right: 0px;
|
|
|
|
top: -0.35rem;
|
|
|
|
position: relative;
|
2023-03-10 19:30:46 +08:00
|
|
|
}
|
2023-04-19 02:03:22 +08:00
|
|
|
|
2023-12-06 02:15:25 +08:00
|
|
|
// Add the following lines to override height and width attributes for .tl-overlays__item
|
|
|
|
.tl-overlays__item {
|
|
|
|
height: auto !important;
|
|
|
|
width: auto !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
${({ isPresenter, isMultiUserActive }) => !isPresenter && !isMultiUserActive && `
|
|
|
|
.tl-cursor use {
|
|
|
|
transform: scale(0.05)!important;
|
2023-04-19 02:03:22 +08:00
|
|
|
}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
|
|
|
.tl-collaborator__cursor {
|
|
|
|
position: absolute !important;
|
|
|
|
left: -7px !important;
|
|
|
|
top: -6px !important;
|
2023-04-19 02:03:22 +08:00
|
|
|
}
|
|
|
|
`}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
|
|
|
[data-testid="main.page-menu"],
|
|
|
|
[data-testid="main.menu"],
|
|
|
|
[data-testid="tools.laser"],
|
|
|
|
[data-testid="tools.asset"],
|
|
|
|
.tlui-menu-zone__controls > :nth-child(1),
|
|
|
|
.tlui-menu-zone__controls > :nth-child(2) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tl-collaborator__cursor {
|
|
|
|
height: auto !important;
|
|
|
|
width: auto !important;
|
|
|
|
}
|
2023-03-10 19:30:46 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
const EditableWBWrapper = styled.div`
|
|
|
|
&, & > :first-child {
|
|
|
|
cursor: inherit !important;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-02-24 07:47:34 +08:00
|
|
|
export default {
|
2023-12-06 02:15:25 +08:00
|
|
|
TldrawV2GlobalStyle,
|
2023-03-10 19:30:46 +08:00
|
|
|
EditableWBWrapper,
|
2023-12-06 02:15:25 +08:00
|
|
|
};
|