160 Commits

Author SHA1 Message Date
Suren Atoyan
cdd070c9f0 update snapshots 2025-02-13 20:08:41 +04:00
suren-atoyan
82a047f829 use 'use client' at the top of Editor/DiffEditor 2023-10-06 12:16:05 -07:00
suren-atoyan
654a25f918 update snapshots 2023-10-06 12:14:46 -07:00
Winter Sun
bc4b241c51
fix: make line prop works as expected (#530)
Co-authored-by: winter <winter@192.168.1.3>
2023-10-06 11:37:54 -07:00
Stefan Hayden
53dbf7b55f
Original and Modified models set earlier (#522) 2023-08-23 01:05:22 +04:00
Stefan Hayden
6970e4528b
DiffEditor fix: set correct model before value update (#479)
* DiffEditor fix: set correct model before value update

* Revert "DiffEditor fix: set correct model before value update"

This reverts commit ca00f9bc46846d8997159197c20b6c7888b1fe6e.

* Updated code provided by suren-atoyan  https://github.com/suren-atoyan/monaco-react/pull/479#issuecomment-1518988140
2023-04-28 09:41:31 +04:00
tequ
89ef656d8a
Fix typo (#483) 2023-04-26 10:20:42 +04:00
suren-atoyan
f16e02d8dd implement preventTriggerChangeEvent flag 2023-04-07 20:32:40 +04:00
suren-atoyan
085a36d1c5 update @monaco-editor/loader to the latest version (v1.3.3) 2023-04-02 21:43:11 +04:00
suren-atoyan
f5d7e377e3 add prettier as a dev dep 2023-04-02 21:04:26 +04:00
suren-atoyan
0cf9c04998 correct cs 2023-04-02 21:03:20 +04:00
suren-atoyan
43335d6f60 extract styles 2023-04-02 21:02:17 +04:00
suren-atoyan
abcdc77621 use editor.IStandaloneCodeEditor directly 2023-04-02 21:01:58 +04:00
suren-atoyan
e0dcb850f9 apply prettier rules 2023-04-02 20:56:52 +04:00
Julius Marminge
4f4959e00b
feat!: use typescript (#457)
* use typescript

* update snapshots

* update playground

* revert gitignore

* unskip test

* update snapshots properly

* split up types

* use consistent type imports

* dont use react namespace specifier

* use type over interface

* revert to rollup

* cleanup

* fix pg

* go back to tsup

* add includes to tsconfig
2023-04-02 17:49:35 +04:00
Siebe Vanden Eynden
a02709a2dc
Also add prevent creation for the diff editor (#448)
* Also add prevent creation for the diff editor

* Added changelog
2023-02-09 13:20:28 +04:00
suren-atoyan
6f0ce3466f implement preventCreation flag 2022-09-24 09:31:13 +04:00
suren-atoyan
1ef4d96607 remove redundant check from onChange invoke 2022-09-23 07:38:56 +04:00
suren-atoyan
03db9384be add missing type monaco 2022-03-28 12:48:27 +04:00
suren-atoyan
5ee98b30df update snapshots 2022-03-27 00:22:53 +04:00
Suren Atoyan
d520426f3a update snapshots 2021-10-03 18:25:03 +04:00
Suren Atoyan
f45a5de778 implement wrapperProps on MonacoContainer 2021-10-03 17:56:01 +04:00
Suren Atoyan
d134fc6b05 add wrapperProps property on Editor/DiffEditor 2021-10-03 17:55:34 +04:00
Suren Atoyan
2dc9bbba9c Merge branch 'master' of https://github.com/suren-atoyan/monaco-react 2021-10-03 16:43:34 +04:00
William Reynolds
27e2e419f7
allows a Diff Editor to use existing models rather than always create them (#288) 2021-10-03 16:43:17 +04:00
Jerebtw
ee3f059812
crateModelUri to createModelUri (#289) 2021-09-28 16:15:18 +04:00
Suren Atoyan
6dbb7aff46 remove an unnecessary check 2021-08-09 12:16:36 +04:00
Sam Randall
5a308001a4
replace setModelMarkers with onDidChangeMarkers in onValidate useeffect (#244) 2021-08-07 12:26:25 +04:00
Suren Atoyan
421d0afb43 update snapshots 2021-06-21 09:25:16 +04:00
Suren Atoyan
d73ec47f88 update test snapshots 2021-06-13 00:23:01 +04:00
Desmond Howard
dc91eee894
add keepCurrentOriginalModel and keepCurrentModifiedModel to type definition (#235) 2021-04-21 23:13:45 +04:00
Suren Atoyan
15518fc57c
add keepCurrentOriginalModel and keepCurrentModifiedModel properties; indicator whether to dispose the current original/modified model when the DiffEditor is unmounted or not (#230)
* update monaco-editor peerDependency to the lates one (0.23.0)

* add  and  properties; indicator whether to dispose the current original/modified model when the DiffEditor is unmounted or not

* add keepCurrentOriginalModel and keepCurrentModifiedModel props in props/DiffEditor

* update package version to 4.1.2
2021-04-19 20:21:28 +04:00
RoXoM
674556bd5d
feat: selection of modified model isn't first position after value change (#215) 2021-04-01 15:39:25 +04:00
Suren Atoyan
0ed9451690 Merge branch 'master' of https://github.com/suren-atoyan/monaco-react 2021-03-18 11:51:44 +04:00
Suren Atoyan
d72fbf51c7 update snapshots 2021-03-18 11:50:46 +04:00
makeupsomething
9060282bdf
Fix type definition (#209)
Update the Theme type in the definition file
2021-03-18 00:14:41 +04:00
Ardeshir81
1eb2d5b0b3
validate property line before passing it to revealLine (#188)
Co-authored-by: AIzadi <aizadi@amnafzar.ir>
2021-02-27 17:28:55 +04:00
Ardeshir81
09cf20f66f
use revealLine for line update (#186)
Co-authored-by: AIzadi <aizadi@amnafzar.ir>
2021-02-16 18:05:24 +04:00
Suren Atoyan
ebf12b4541 save and restore current model view state, if keepCurrentModel is true 2021-01-29 15:56:00 +04:00
Suren Atoyan
e599c2b03f add 'keepCurrentModel' property to the Editor component 2021-01-29 14:35:01 +04:00
Suren Atoyan
66eaee13af fire onValidate unconditionally, always, with the current model markers 2021-01-21 04:08:08 +04:00
Suren Atoyan
5cbe9a4f9b remove and from 2021-01-19 20:14:50 +04:00
Suren Atoyan
2f0cb3699e remove from 2021-01-19 01:08:57 +04:00
Suren Atoyan
dc7425ab5f check if exists in utility function 2021-01-19 01:07:03 +04:00
Suren Atoyan
e6dbaa57a2 add saveViewState and defaultLanguage for multi-model support 2021-01-18 18:27:47 +04:00
Suren Atoyan
7ed4b7eeaf add multi-model support 2021-01-18 18:27:13 +04:00
Suren Atoyan
7dd1ac6d0f declare and export 'useMonaco' type 2021-01-18 13:47:14 +04:00
Suren Atoyan
a952d8c6ae update package version to 4.0.1 2021-01-18 03:01:47 +04:00
Suren Atoyan
e7d98cb181
v4 (#163)
* update dependency (@monaco-editor/loader) version to - v1.0.0

* create useMonaco hook

* export useMonaco from the entry file

* rename the main utility: monaco -> loader

* rename editorDidMount to onMount, add beforeMount

* add defaultModelPath/originalModelPath/modifiedModelPath props

* add defaultValue prop and use it during default model creation

* rename the utility name: monaco -> loader

* handle no-unused-expressions rule

* move 'prop-types' to dependencies

* remove  prop

* remove ControlledEditor

* visually combine properties with the same type

* prerelease v4

* prerelease v4: release candidate 0

* fix types according to changed

* add onValidate prop: an event emitted when the length of the model markers of the current model isn't 0

* update package version to 4.0.0-rc.1

* rename monacoEditor to monaco in types

* add state-local as a dependency

* define state-local as a external library and set in UMD globals

* use state-local to store the backup of the model markers setter

* fix types in comments

* create draft version of v4 README file

* fix tabs in Documentation

* make title upper case

* add codesandbox likns
2021-01-17 18:56:18 +04:00
Suren Atoyan
fcda83b18e rename index.d.ts to types.d.ts 2021-01-08 13:18:45 +04:00