131 Commits

Author SHA1 Message Date
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
sunderls
5771fcbd07
Update index.d.ts (#152)
* Update index.d.ts

* Update README.md
2021-01-08 13:10:29 +04:00
Suren Atoyan
4e8b2cf151 use Rollup as a build system 2021-01-07 23:14:57 +04:00
Suren Atoyan
1bda26a177 remove config as it's already replaced by the 2021-01-07 18:41:32 +04:00
Suren Atoyan
95072eaeb6 coding style fixes 2021-01-07 18:35:25 +04:00
Suren Atoyan
0b47d9450c create hook 2021-01-07 18:33:31 +04:00
Suren Atoyan
9f971b85fb collect remaining utilities all in the entry file / add some new ones for the next version 2021-01-07 18:32:41 +04:00
Suren Atoyan
6ba53cd721 remove utilities that were being replaced by the 2021-01-07 18:30:49 +04:00
Suren Atoyan
f6b70f122b --amend 2021-01-07 18:29:03 +04:00
Suren Atoyan
a44bfd82e8 use @monaco-editor/loader instead of 'monaco' utility 2021-01-07 18:26:45 +04:00
Suren Atoyan
56ab883c50 fix state-local import 2021-01-03 22:10:33 +04:00
Suren Atoyan
f598646f44 fix editorDidMount call order / correct coding style 2020-12-16 18:31:49 +04:00
Suren Atoyan
5ee02afc00 set in 2020-12-15 20:37:15 +04:00
Suren Atoyan
f142f59834 remove unnecessary before language update 2020-11-29 19:14:20 +04:00
Suren Atoyan
f80e4b95c2 Merge branch 'master' of https://github.com/SurenAt93/monaco-react 2020-11-11 18:19:39 +04:00
Suren Atoyan
a18988b861 update monaco version to 0.21.2 2020-11-11 18:19:11 +04:00
Suren Atoyan
c169dbcf00 update snapshots 2020-11-11 18:17:32 +04:00
Jonathan Tang
1b700c5b00
Pass HTMLAttributes to props (#113)
* Pass HTMLAttributes to props

Adds `React.HTMLAttributes<HTMLDivElements>>` to the the Functional Component type.

* Add className and wrapperClassName to Props
2020-09-22 12:57:57 +04:00
Suren Atoyan
7a8ea5d926 refactor according to new eslint rules 2020-08-19 14:12:57 +04:00
Suren Atoyan
7bf4b7861c store current value in ref instead of making it a dependency of 2020-08-18 12:55:59 +04:00
Suren Atoyan
b61ad59e6f
Card 43719439 (#108)
* fix ControlledEditor onChange handler issue; dispose prev listener and attach a new one for every new onChange

* remove unnecessary dependency

* do not trigger onChange in programmatic changes
2020-08-18 12:09:52 +04:00
Suren Atoyan
b9aac0e9d4 remove intermediate function for injecting scripts 2020-08-09 21:08:20 +04:00
Suren Atoyan
abeed660cf add as a dependency (replace with util 2020-08-06 22:04:54 +04:00
Suren Atoyan
eecace35f4 remove utils/store to utils/local-state 2020-08-03 02:29:15 +04:00
Suren Atoyan
7c7dd01293 move out hooks from utils to root 2020-08-03 02:28:31 +04:00
Suren Atoyan
d5fd64b2fb redesign "store" utility 2020-08-02 19:46:04 +04:00
Suren Atoyan
3694326262 fix config obj name 2020-07-30 18:12:17 +04:00
Suren Atoyan
12a50e79d4 redesign utility , get rid of class, make it more fp 2020-07-30 17:42:38 +04:00
Suren Atoyan
23bf03d070 export compose and store from index point 2020-07-30 17:41:54 +04:00
Suren Atoyan
e475ca3470 create store utility 2020-07-30 17:40:47 +04:00