-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from WTFAcademy/dev
Dev
- Loading branch information
Showing
11 changed files
with
99 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"solive-docusaurus-theme-code": patch | ||
--- | ||
|
||
fix boolean prop not coerce transform |
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 @@ | ||
--- | ||
"solive-core": patch | ||
--- | ||
|
||
add disableValidation and monacoEditorOptions |
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 @@ | ||
--- | ||
"solive-docusaurus-theme-code": patch | ||
--- | ||
|
||
add simple mode |
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 |
---|---|---|
|
@@ -21,9 +21,11 @@ loader.config({ paths: { vs: 'https://cdn.jsdelivr.net/npm/[email protected]/ | |
|
||
interface IProps { | ||
modelInfos: ModelInfoType[]; | ||
disableValidation?: boolean; | ||
monacoEditorOptions?: BaseMonaco.editor.IStandaloneEditorConstructionOptions; | ||
} | ||
|
||
function App({ modelInfos }: IProps) { | ||
function App({ modelInfos, disableValidation = false, monacoEditorOptions = {} }: IProps) { | ||
const { | ||
stateRef, dispatch, actions, id, | ||
} = useEditor(); | ||
|
@@ -46,7 +48,9 @@ function App({ modelInfos }: IProps) { | |
actions.updateCodeParserLoading(false); | ||
|
||
registerCommandsAndActions(monaco, editor, dispatch, stateRef.current); | ||
registerListeners(editor, editorApiRef.current, stateRef.current); | ||
// TODO 目前监听仅有处理语法校验问题,后续状态控制需要特殊处理 | ||
// eslint-disable-next-line no-unused-expressions | ||
!disableValidation && registerListeners(editor, editorApiRef.current, stateRef.current); | ||
} | ||
|
||
function handleEditorBeforeMount(monaco: Monaco) { | ||
|
@@ -113,6 +117,8 @@ function App({ modelInfos }: IProps) { | |
minimap: { | ||
enabled: false, | ||
}, | ||
fontSize: 14, | ||
...monacoEditorOptions, | ||
}} | ||
/> | ||
); | ||
|
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
e67d2d8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
solive-demo – ./
solive-demo-git-main-wtfacademy.vercel.app
solive-demo-wtfacademy.vercel.app
solive-demo.vercel.app
www.solive.wtf
solive.wtf
e67d2d8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
solive-doc – ./
solive-doc.vercel.app
solive-doc-git-main-wtfacademy.vercel.app
solive-doc-wtfacademy.vercel.app