diff --git a/package.json b/package.json index d1ef0b5..c505470 100644 --- a/package.json +++ b/package.json @@ -12,12 +12,12 @@ }, "dependencies": { "@ant-design/icons": "^5.4.0", - "@ant-design/nextjs-registry": "^1.0.0", + "@ant-design/nextjs-registry": "^1.0.1", "@monaco-editor/react": "^4.6.0", "antd": "^5.19.3", "classnames": "^2.5.1", "lodash": "^4.17.21", - "next": "14.2.8", + "next": "14.2.11", "react": "^18", "react-dom": "^18" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6b8415..7c03a5a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2,7 +2,7 @@ lockfileVersion: 5.4 specifiers: '@ant-design/icons': ^5.4.0 - '@ant-design/nextjs-registry': ^1.0.0 + '@ant-design/nextjs-registry': ^1.0.1 '@eslint/eslintrc': ^3.1.0 '@eslint/js': ^9.10.0 '@monaco-editor/react': ^4.6.0 @@ -22,7 +22,7 @@ specifiers: husky: ^9.1.1 lint-staged: ^15.2.7 lodash: ^4.17.21 - next: 14.2.8 + next: 14.2.11 prettier: ^3.3.3 react: ^18 react-dom: ^18 @@ -31,12 +31,12 @@ specifiers: dependencies: '@ant-design/icons': 5.4.0_nnrd3gsncyragczmpvfhocinkq - '@ant-design/nextjs-registry': 1.0.0_zekptj3ip2elxmdx3xprox34ye + '@ant-design/nextjs-registry': 1.0.1_3he5keffbr6nmsaeiohmmystye '@monaco-editor/react': 4.6.0_nnrd3gsncyragczmpvfhocinkq antd: 5.19.3_nnrd3gsncyragczmpvfhocinkq classnames: 2.5.1 lodash: 4.17.21 - next: 14.2.8_kims5xigubg4jdik5udz4fmbxi + next: 14.2.11_kims5xigubg4jdik5udz4fmbxi react: 18.3.1 react-dom: 18.3.1_react@18.3.1 @@ -105,8 +105,8 @@ packages: react-dom: 18.3.1_react@18.3.1 dev: false - /@ant-design/nextjs-registry/1.0.0_zekptj3ip2elxmdx3xprox34ye: - resolution: {integrity: sha512-kU1K1UOhwrF6DPv73MhuL5a6U4e6/TiFapeLUt/c/kch9h5qFwEaJPb4RSJKNw0PRBfqCAPS011wVm4wYcrqbQ==} + /@ant-design/nextjs-registry/1.0.1_3he5keffbr6nmsaeiohmmystye: + resolution: {integrity: sha512-DaMJ1nClR1a4UfG7vXkDj89z1eARhSDgqvHoxfM0Yco1MZEbaqRj4o+bQToHb3gMb6gbFlrZ51nOBGh5xSJ7EQ==} peerDependencies: '@ant-design/cssinjs': ^1.18.2 antd: ^5.0.0 @@ -115,7 +115,7 @@ packages: react-dom: '>=16.0.0' dependencies: antd: 5.19.3_nnrd3gsncyragczmpvfhocinkq - next: 14.2.8_kims5xigubg4jdik5udz4fmbxi + next: 14.2.11_kims5xigubg4jdik5udz4fmbxi react: 18.3.1 react-dom: 18.3.1_react@18.3.1 dev: false @@ -255,8 +255,8 @@ packages: react-dom: 18.3.1_react@18.3.1 dev: false - /@next/env/14.2.8: - resolution: {integrity: sha512-L44a+ynqkolyNBnYfF8VoCiSrjSZWgEHYKkKLGcs/a80qh7AkfVUD/MduVPgdsWZ31tgROR+yJRA0PZjSVBXWQ==} + /@next/env/14.2.11: + resolution: {integrity: sha512-HYsQRSIXwiNqvzzYThrBwq6RhXo3E0n8j8nQnAs8i4fCEo2Zf/3eS0IiRA8XnRg9Ha0YnpkyJZIZg1qEwemrHw==} dev: false /@next/eslint-plugin-next/14.2.8: @@ -265,8 +265,8 @@ packages: glob: 10.3.10 dev: true - /@next/swc-darwin-arm64/14.2.8: - resolution: {integrity: sha512-1VrQlG8OzdyvvGZhGJFnaNE2P10Jjy/2FopnqbY0nSa/gr8If3iINxvOEW3cmVeoAYkmW0RsBazQecA2dBFOSw==} + /@next/swc-darwin-arm64/14.2.11: + resolution: {integrity: sha512-eiY9u7wEJZWp/Pga07Qy3ZmNEfALmmSS1HtsJF3y1QEyaExu7boENz11fWqDmZ3uvcyAxCMhTrA1jfVxITQW8g==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -274,8 +274,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64/14.2.8: - resolution: {integrity: sha512-87t3I86rNRSOJB1gXIUzaQWWSWrkWPDyZGsR0Z7JAPtLeX3uUOW2fHxl7dNWD2BZvbvftctTQjgtfpp7nMtmWg==} + /@next/swc-darwin-x64/14.2.11: + resolution: {integrity: sha512-lnB0zYCld4yE0IX3ANrVMmtAbziBb7MYekcmR6iE9bujmgERl6+FK+b0MBq0pl304lYe7zO4yxJus9H/Af8jbg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -283,8 +283,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu/14.2.8: - resolution: {integrity: sha512-ta2sfVzbOpTbgBrF9HM5m+U58dv6QPuwU4n5EX4LLyCJGKc433Z0D9h9gay/HSOjLEXJ2fJYrMP5JYYbHdxhtw==} + /@next/swc-linux-arm64-gnu/14.2.11: + resolution: {integrity: sha512-Ulo9TZVocYmUAtzvZ7FfldtwUoQY0+9z3BiXZCLSUwU2bp7GqHA7/bqrfsArDlUb2xeGwn3ZuBbKtNK8TR0A8w==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -292,8 +292,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl/14.2.8: - resolution: {integrity: sha512-+IoLTPK6Z5uIgDhgeWnQF5/o5GBN7+zyUNrs4Bes1W3g9++YELb8y0unFybS8s87ntAKMDl6jeQ+mD7oNwp/Ng==} + /@next/swc-linux-arm64-musl/14.2.11: + resolution: {integrity: sha512-fH377DnKGyUnkWlmUpFF1T90m0dADBfK11dF8sOQkiELF9M+YwDRCGe8ZyDzvQcUd20Rr5U7vpZRrAxKwd3Rzg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -301,8 +301,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu/14.2.8: - resolution: {integrity: sha512-pO+hVXC+mvzUOQJJRG4RX4wJsRJ5BkURSf6dD6EjUXAX4Ml9es1WsEfkaZ4lcpmFzFvY47IkDaffks/GdCn9ag==} + /@next/swc-linux-x64-gnu/14.2.11: + resolution: {integrity: sha512-a0TH4ZZp4NS0LgXP/488kgvWelNpwfgGTUCDXVhPGH6pInb7yIYNgM4kmNWOxBFt+TIuOH6Pi9NnGG4XWFUyXQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -310,8 +310,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl/14.2.8: - resolution: {integrity: sha512-bCat9izctychCtf3uL1nqHq31N5e1VxvdyNcBQflkudPMLbxVnlrw45Vi87K+lt1CwrtVayHqzo4ie0Szcpwzg==} + /@next/swc-linux-x64-musl/14.2.11: + resolution: {integrity: sha512-DYYZcO4Uir2gZxA4D2JcOAKVs8ZxbOFYPpXSVIgeoQbREbeEHxysVsg3nY4FrQy51e5opxt5mOHl/LzIyZBoKA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -319,8 +319,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc/14.2.8: - resolution: {integrity: sha512-gbxfUaSPV7EyUobpavida2Hwi62GhSJaSg7iBjmBWoxkxlmETOD7U4tWt763cGIsyE6jM7IoNavq0BXqwdW2QA==} + /@next/swc-win32-arm64-msvc/14.2.11: + resolution: {integrity: sha512-PwqHeKG3/kKfPpM6of1B9UJ+Er6ySUy59PeFu0Un0LBzJTRKKAg2V6J60Yqzp99m55mLa+YTbU6xj61ImTv9mg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -328,8 +328,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc/14.2.8: - resolution: {integrity: sha512-PUXzEzjTTlUh3b5VAn1nlpwvujTnuCMMwbiCnaTazoVlN1nA3kWjlmp42IfURA2N/nyrlVEw7pURa/o4Qxj1cw==} + /@next/swc-win32-ia32-msvc/14.2.11: + resolution: {integrity: sha512-0U7PWMnOYIvM74GY6rbH6w7v+vNPDVH1gUhlwHpfInJnNe5LkmUZqhp7FNWeNa5wbVgRcRi1F1cyxp4dmeLLvA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -337,8 +337,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc/14.2.8: - resolution: {integrity: sha512-EnPKv0ttq02E9/1KZ/8Dn7kuutv6hy1CKc0HlNcvzOQcm4/SQtvfws5gY0zrG9tuupd3HfC2L/zcTrnBhpjTuQ==} + /@next/swc-win32-x64-msvc/14.2.11: + resolution: {integrity: sha512-gQpS7mcgovWoaTG1FbS5/ojF7CGfql1Q0ZLsMrhcsi2Sr9HEqsUZ70MPJyaYBXbk6iEAP7UXMD9HC8KY1qNwvA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -2538,8 +2538,8 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /next/14.2.8_kims5xigubg4jdik5udz4fmbxi: - resolution: {integrity: sha512-EyEyJZ89r8C5FPlS/401AiF3O8jeMtHIE+bLom9MwcdWJJFBgRl+MR/2VgO0v5bI6tQORNY0a0DR5sjpFNrjbg==} + /next/14.2.11_kims5xigubg4jdik5udz4fmbxi: + resolution: {integrity: sha512-8MDFqHBhdmR2wdfaWc8+lW3A/hppFe1ggQ9vgIu/g2/2QEMYJrPoQP6b+VNk56gIug/bStysAmrpUKtj3XN8Bw==} engines: {node: '>=18.17.0'} hasBin: true peerDependencies: @@ -2556,7 +2556,7 @@ packages: sass: optional: true dependencies: - '@next/env': 14.2.8 + '@next/env': 14.2.11 '@swc/helpers': 0.5.5 busboy: 1.6.0 caniuse-lite: 1.0.30001643 @@ -2567,15 +2567,15 @@ packages: sass: 1.77.8 styled-jsx: 5.1.1_react@18.3.1 optionalDependencies: - '@next/swc-darwin-arm64': 14.2.8 - '@next/swc-darwin-x64': 14.2.8 - '@next/swc-linux-arm64-gnu': 14.2.8 - '@next/swc-linux-arm64-musl': 14.2.8 - '@next/swc-linux-x64-gnu': 14.2.8 - '@next/swc-linux-x64-musl': 14.2.8 - '@next/swc-win32-arm64-msvc': 14.2.8 - '@next/swc-win32-ia32-msvc': 14.2.8 - '@next/swc-win32-x64-msvc': 14.2.8 + '@next/swc-darwin-arm64': 14.2.11 + '@next/swc-darwin-x64': 14.2.11 + '@next/swc-linux-arm64-gnu': 14.2.11 + '@next/swc-linux-arm64-musl': 14.2.11 + '@next/swc-linux-x64-gnu': 14.2.11 + '@next/swc-linux-x64-musl': 14.2.11 + '@next/swc-win32-arm64-msvc': 14.2.11 + '@next/swc-win32-ia32-msvc': 14.2.11 + '@next/swc-win32-x64-msvc': 14.2.11 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros diff --git a/src/app/code/format/page.tsx b/src/app/code/format/page.tsx index 4cf29df..7fd8812 100644 --- a/src/app/code/format/page.tsx +++ b/src/app/code/format/page.tsx @@ -2,14 +2,20 @@ import React, { useRef, useState } from 'react'; +import prettier from 'prettier/standalone'; +import parserBabel from 'prettier/parser-babel'; +import prettierPluginEstree from 'prettier/plugins/estree'; +import prettierPluginHtml from 'prettier/plugins/html'; + import { Editor, EditorType } from '../../../components/editor'; import Toolbar from '../../../components/toolbar'; -import s from './index.module.scss'; import { Button, Space } from 'antd'; import { useMonacoEditor } from '../../../utils/config/editor'; import { useAppConfig } from '../../../utils/config/app'; +import s from './index.module.scss'; + export default function Page() { const { editor } = useMonacoEditor(); const appConfig = useAppConfig(); @@ -29,7 +35,18 @@ export default function Page() {