Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lucko committed Aug 24, 2024
1 parent 776a1c5 commit 2246e7a
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 96 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"copy-to-clipboard": "^3.3.3",
"history": "^5.3.0",
"local-storage": "^2.0.0",
"monaco-editor": "^0.51.0",
"monaco-themes": "^0.4.4",
"pako": "^2.1.0",
"react": "^18.2.0",
Expand All @@ -27,7 +28,6 @@
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/whatwg-mimetype": "^3.0.2",
"monaco-editor": "^0.44.0",
"prettier": "^3.1.0",
"prettier-plugin-organize-imports": "^3.2.4"
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditorControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default function EditorControls({
const Header = styled.header`
position: fixed;
top: 0;
z-index: 2;
z-index: 10;
width: 100%;
height: 2em;
color: ${props => props.theme.primary};
Expand Down
15 changes: 10 additions & 5 deletions src/components/EditorTextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ import type { editor } from 'monaco-editor';
import { ResetFunction } from './Editor';
import { logLanguage } from '../util/log-language';

import * as monaco from 'monaco-editor';
import { loader } from '@monaco-editor/react';

loader.config({ monaco });

export interface EditorTextAreaProps {
forcedContent: string;
actualContent: string;
Expand Down Expand Up @@ -261,13 +266,13 @@ function useLineNumberMagic(
}

const handler = (click: MouseEvent) => {
const target = click?.target as HTMLElement;
const element = document.elementFromPoint(click.x, click.y);
if (
target &&
target.classList.contains('line-numbers') &&
target.textContent
element &&
element.classList.contains('line-numbers') &&
element.textContent
) {
toggleSelected(parseInt(target.textContent), click);
toggleSelected(parseInt(element.textContent), click);
}
};

Expand Down
Loading

0 comments on commit 2246e7a

Please sign in to comment.