Upgrade dependencies
This commit is contained in:
@@ -5,5 +5,6 @@
|
|||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "es5",
|
"trailingComma": "es5",
|
||||||
"arrowParens": "avoid",
|
"arrowParens": "avoid",
|
||||||
"quoteProps": "consistent"
|
"quoteProps": "consistent",
|
||||||
|
"plugins": ["prettier-plugin-organize-imports"]
|
||||||
}
|
}
|
||||||
21
package.json
21
package.json
@@ -7,29 +7,30 @@
|
|||||||
"copy-to-clipboard": "^3.3.3",
|
"copy-to-clipboard": "^3.3.3",
|
||||||
"history": "^5.3.0",
|
"history": "^5.3.0",
|
||||||
"local-storage": "^2.0.0",
|
"local-storage": "^2.0.0",
|
||||||
"monaco-editor": "^0.51.0",
|
"monaco-editor": "^0.52.0",
|
||||||
"monaco-themes": "^0.4.4",
|
"monaco-themes": "^0.4.4",
|
||||||
"pako": "^2.1.0",
|
"pako": "^2.1.0",
|
||||||
"react": "^18.2.0",
|
"react": "^19.0.0",
|
||||||
"react-device-detect": "^2.2.3",
|
"react-device-detect": "^2.2.3",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^19.0.0",
|
||||||
"react-scripts": "^5.0.1",
|
"react-scripts": "^5.0.1",
|
||||||
"styled-components": "^6.1.1",
|
"styled-components": "^6.1.13",
|
||||||
"typescript": "^4.4.2",
|
"typescript": "^5.7.2",
|
||||||
"whatwg-mimetype": "^3.0.0"
|
"whatwg-mimetype": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@testing-library/dom": "^10.4.0",
|
||||||
"@testing-library/jest-dom": "^5.14.1",
|
"@testing-library/jest-dom": "^5.14.1",
|
||||||
"@testing-library/react": "^13.0.0",
|
"@testing-library/react": "^16.1.0",
|
||||||
"@testing-library/user-event": "^13.2.1",
|
"@testing-library/user-event": "^13.2.1",
|
||||||
"@types/jest": "^27.0.1",
|
"@types/jest": "^27.0.1",
|
||||||
"@types/node": "^18.11.9",
|
"@types/node": "^18.11.9",
|
||||||
"@types/pako": "^2.0.3",
|
"@types/pako": "^2.0.3",
|
||||||
"@types/react": "^18.2.0",
|
"@types/react": "^19.0.0",
|
||||||
"@types/react-dom": "^18.2.0",
|
"@types/react-dom": "^19.0.0",
|
||||||
"@types/whatwg-mimetype": "^3.0.2",
|
"@types/whatwg-mimetype": "^3.0.2",
|
||||||
"prettier": "^3.1.0",
|
"prettier": "^3.4.2",
|
||||||
"prettier-plugin-organize-imports": "^3.2.4"
|
"prettier-plugin-organize-imports": "^4.1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default function Editor({
|
|||||||
}: EditorProps) {
|
}: EditorProps) {
|
||||||
const [language, setLanguage] = useState<string>('plain');
|
const [language, setLanguage] = useState<string>('plain');
|
||||||
const [readOnly, setReadOnly] = useState<boolean>(isMobile && !!pasteId);
|
const [readOnly, setReadOnly] = useState<boolean>(isMobile && !!pasteId);
|
||||||
const resetFunction = useRef<ResetFunction>();
|
const resetFunction = useRef<ResetFunction>(null);
|
||||||
|
|
||||||
const [theme, setTheme] = usePreference<keyof Themes>(
|
const [theme, setTheme] = usePreference<keyof Themes>(
|
||||||
'theme',
|
'theme',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import copy from 'copy-to-clipboard';
|
import copy from 'copy-to-clipboard';
|
||||||
import history from 'history/browser';
|
import history from 'history/browser';
|
||||||
import { MutableRefObject, useCallback, useEffect, useState } from 'react';
|
import { RefObject, useCallback, useEffect, useState } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import themes, { Themes } from '../style/themes';
|
import themes, { Themes } from '../style/themes';
|
||||||
@@ -12,7 +12,7 @@ import MenuButton from './MenuButton';
|
|||||||
|
|
||||||
export interface EditorControlsProps {
|
export interface EditorControlsProps {
|
||||||
actualContent: string;
|
actualContent: string;
|
||||||
resetFunction: MutableRefObject<ResetFunction | undefined>;
|
resetFunction: RefObject<ResetFunction | null>;
|
||||||
language: string;
|
language: string;
|
||||||
setLanguage: (value: string) => void;
|
setLanguage: (value: string) => void;
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
|
|||||||
@@ -5,23 +5,17 @@ import Editor, {
|
|||||||
OnMount,
|
OnMount,
|
||||||
} from '@monaco-editor/react';
|
} from '@monaco-editor/react';
|
||||||
import history from 'history/browser';
|
import history from 'history/browser';
|
||||||
import React, {
|
import { RefObject, useCallback, useEffect, useRef, useState } from 'react';
|
||||||
MutableRefObject,
|
|
||||||
useCallback,
|
|
||||||
useEffect,
|
|
||||||
useRef,
|
|
||||||
useState,
|
|
||||||
} from 'react';
|
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import themes, { Theme } from '../style/themes';
|
import themes, { Theme } from '../style/themes';
|
||||||
|
|
||||||
import type { editor } from 'monaco-editor';
|
import type { editor } from 'monaco-editor';
|
||||||
import { ResetFunction } from './Editor';
|
|
||||||
import { logLanguage } from '../util/languages/log';
|
|
||||||
import { diffLanguage } from '../util/languages/diff';
|
import { diffLanguage } from '../util/languages/diff';
|
||||||
|
import { logLanguage } from '../util/languages/log';
|
||||||
|
import { ResetFunction } from './Editor';
|
||||||
|
|
||||||
import * as monaco from 'monaco-editor';
|
|
||||||
import { loader } from '@monaco-editor/react';
|
import { loader } from '@monaco-editor/react';
|
||||||
|
import * as monaco from 'monaco-editor';
|
||||||
|
|
||||||
loader.config({ monaco });
|
loader.config({ monaco });
|
||||||
|
|
||||||
@@ -33,7 +27,7 @@ export interface EditorTextAreaProps {
|
|||||||
language: string;
|
language: string;
|
||||||
fontSize: number;
|
fontSize: number;
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
resetFunction: MutableRefObject<ResetFunction | undefined>;
|
resetFunction: RefObject<ResetFunction | null>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function EditorTextArea({
|
export default function EditorTextArea({
|
||||||
@@ -254,7 +248,7 @@ function useSelectedLine(): [SelectedLine, ToggleSelectedFunction] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function useLineNumberMagic(
|
function useLineNumberMagic(
|
||||||
editorAreaRef: React.RefObject<HTMLDivElement>,
|
editorAreaRef: RefObject<HTMLDivElement | null>,
|
||||||
selected: SelectedLine,
|
selected: SelectedLine,
|
||||||
toggleSelected: ToggleSelectedFunction,
|
toggleSelected: ToggleSelectedFunction,
|
||||||
forcedContent: string,
|
forcedContent: string,
|
||||||
|
|||||||
Reference in New Issue
Block a user