@codingame/monaco-editor-wrapper 2.0.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/LICENSE.txt +21 -0
  2. package/README.md +6 -5
  3. package/dist/COBOL.tmLanguage.js +2 -2
  4. package/dist/META.js +100 -0
  5. package/dist/atd.js +114 -0
  6. package/dist/atd2.js +110 -0
  7. package/dist/cobol-snippets.js +2 -2117
  8. package/dist/cobol2.js +46 -0
  9. package/dist/cram.js +257 -0
  10. package/dist/dune-project.js +65 -0
  11. package/dist/dune-project2.js +481 -0
  12. package/dist/dune-workspace.js +65 -0
  13. package/dist/dune-workspace2.js +298 -0
  14. package/dist/dune.js +65 -0
  15. package/dist/dune2.js +2962 -0
  16. package/dist/index.js +31 -1
  17. package/dist/main.js +359 -61
  18. package/dist/menhir-action.js +51 -0
  19. package/dist/menhir.js +597 -0
  20. package/dist/merlin.js +23 -23
  21. package/dist/oasis.js +99 -0
  22. package/dist/ocaml-dune-project.js +38 -0
  23. package/dist/ocaml-dune.js +53 -0
  24. package/dist/ocaml-markdown-codeblock.js +1 -1
  25. package/dist/ocaml-ocaml.js +88 -0
  26. package/dist/ocaml-ocamllex.js +12 -0
  27. package/dist/ocaml.META.js +29 -0
  28. package/dist/ocaml.interface.js +114 -0
  29. package/dist/ocaml.interface2.js +292 -0
  30. package/dist/ocaml.js +40 -8
  31. package/dist/ocaml.menhir.js +81 -0
  32. package/dist/ocaml.oasis.js +18 -0
  33. package/dist/ocaml.ocamlbuild.js +45 -0
  34. package/dist/ocaml.ocamlformat.js +8 -0
  35. package/dist/ocaml.ocamllex.js +60 -0
  36. package/dist/ocaml.opam-install.js +49 -0
  37. package/dist/ocaml.opam.js +69 -0
  38. package/dist/ocaml2.js +600 -2676
  39. package/dist/ocaml3.js +89 -105
  40. package/dist/ocamlbuild.js +142 -192
  41. package/dist/ocamldoc.js +54 -0
  42. package/dist/ocamlformat.js +206 -0
  43. package/dist/ocamllex.js +133 -0
  44. package/dist/opam-install.js +40 -0
  45. package/dist/opam.js +100 -109
  46. package/dist/reason-markdown-codeblock.js +1 -1
  47. package/dist/reason.js +0 -4
  48. package/dist/scalameta.js +1 -1
  49. package/package.json +7 -8
  50. package/stats.html +1 -1
  51. package/dist/ocaml-hover-info.js +0 -34
  52. package/dist/ocaml-hover-type.js +0 -24
  53. package/dist/ocaml-reason.js +0 -100
  54. package/dist/reason-hover-info.js +0 -34
  55. package/dist/reason-hover-signature.js +0 -21
  56. package/dist/reason-hover-type.js +0 -21
package/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 - CodinGame
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -56,10 +56,10 @@ Instead of using `monaco.editor.create`, you should use the `createEditor` expos
56
56
  By default, monaco-editor contains worker to achieve IntelliSense in CSS, SCSS, JavaScript, TypeScript, JSON and HTML.
57
57
 
58
58
  To enable them, import the following files:
59
- - JSON: `import '@codingame/monaco-editor-wrapper/dist/jsonContribution'`
60
- - JavaScript/TypeScript: `import '@codingame/monaco-editor-wrapper/dist/typescriptContribution'`
61
- - CSS/SCSS: `import '@codingame/monaco-editor-wrapper/dist/cssContribution'`
62
- - HTML: `import '@codingame/monaco-editor-wrapper/dist/htmlContribution'`
59
+ - JSON: `import '@codingame/monaco-editor-wrapper/features/jsonContribution'`
60
+ - JavaScript/TypeScript: `import '@codingame/monaco-editor-wrapper/features/typescriptContribution'`
61
+ - CSS/SCSS: `import '@codingame/monaco-editor-wrapper/features/cssContribution'`
62
+ - HTML: `import '@codingame/monaco-editor-wrapper/features/htmlContribution'`
63
63
 
64
64
  #### Additional apis
65
65
 
@@ -79,4 +79,5 @@ This library exposed some functions to manage the user global configuration:
79
79
  - `updateUserConfiguration` Update the user configuration, overrides the default configuration, uses the same syntax as VS Code configuration
80
80
  - `getConfiguration` allows to get a given configuration key in a given language
81
81
  - `onConfigurationChanged` listen to configuration change
82
- - `updateEditorKeybindings` allows to update the editor keybindings with the same syntax as in VS Code, or enabled Emacs/Vim keybindings
82
+ - `updateKeybindings` allows to update the editor keybindings with the same syntax as in VS Code
83
+ - `updateEditorKeybindingsMode` switch between `vim`, `emacs` or `classic` keybindings
@@ -28,10 +28,10 @@ var patterns = [
28
28
  include: "#cobol-keywords"
29
29
  },
30
30
  {
31
- include: "#idms-keywords"
31
+ include: "#cobol-preprocessor-keywords"
32
32
  },
33
33
  {
34
- include: "#cobol-preprocessor-keywords"
34
+ include: "#idms-keywords"
35
35
  }
36
36
  ];
37
37
  var repository = {
package/dist/META.js ADDED
@@ -0,0 +1,100 @@
1
+ var scopeName = "source.ocaml.META";
2
+ var fileTypes = [
3
+ "META"
4
+ ];
5
+ var patterns = [
6
+ {
7
+ include: "#comments"
8
+ },
9
+ {
10
+ include: "#entries"
11
+ }
12
+ ];
13
+ var repository = {
14
+ comments: {
15
+ comment: "line comment",
16
+ name: "comment.line.META",
17
+ begin: "#",
18
+ end: "$"
19
+ },
20
+ entries: {
21
+ patterns: [
22
+ {
23
+ comment: "assignment or addition",
24
+ match: "\\b([[:word:].]+)[[:space:]]*(\\+?=)[[:space:]]*(\".*\")",
25
+ captures: {
26
+ "1": {
27
+ name: "entity.name.tag.META"
28
+ },
29
+ "2": {
30
+ name: "keyword.operator.META"
31
+ },
32
+ "3": {
33
+ name: "string.quoted.double.META"
34
+ }
35
+ }
36
+ },
37
+ {
38
+ comment: "assignment or addition with formal predicates",
39
+ begin: "\\b([[:word:].]+)[[:space:]]*\\(",
40
+ beginCaptures: {
41
+ "1": {
42
+ name: "entity.name.tag.META"
43
+ }
44
+ },
45
+ end: "\\)[[:space:]]*(\\+?=)[[:space:]]*(\".*\")",
46
+ endCaptures: {
47
+ "1": {
48
+ name: "keyword.operator.META"
49
+ },
50
+ "2": {
51
+ name: "string.quoted.double.META"
52
+ }
53
+ },
54
+ patterns: [
55
+ {
56
+ match: "-",
57
+ name: "keyword.operator.META"
58
+ },
59
+ {
60
+ comment: "standard predicates",
61
+ match: "\\b(byte|native|toploop|mt|mt_posix|mt_vm|gprof|autolink)\\b",
62
+ name: "constant.language.META"
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ comment: "subpackage",
68
+ begin: "\\b(package)[[:space:]]*(\"[^.]*\")[[:space:]]*\\(",
69
+ beginCaptures: {
70
+ "1": {
71
+ name: "keyword.other.META"
72
+ },
73
+ "2": {
74
+ name: "string.quoted.double.META"
75
+ }
76
+ },
77
+ end: "\\)",
78
+ patterns: [
79
+ {
80
+ include: "$self"
81
+ }
82
+ ]
83
+ }
84
+ ]
85
+ }
86
+ };
87
+ var information_for_contributors = [
88
+ "This file has been converted from https://github.com/ocamllabs/vscode-ocaml-platform/blob/master/",
89
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
90
+ "Once accepted there, we are happy to receive an update request."
91
+ ];
92
+ var META = {
93
+ scopeName: scopeName,
94
+ fileTypes: fileTypes,
95
+ patterns: patterns,
96
+ repository: repository,
97
+ information_for_contributors: information_for_contributors
98
+ };
99
+
100
+ export { META as default, fileTypes, information_for_contributors, patterns, repository, scopeName };
package/dist/atd.js ADDED
@@ -0,0 +1,114 @@
1
+ var autoClosingPairs = [
2
+ {
3
+ open: "{",
4
+ close: "}"
5
+ },
6
+ {
7
+ open: "[",
8
+ close: "]"
9
+ },
10
+ {
11
+ open: "(",
12
+ close: ")"
13
+ },
14
+ {
15
+ open: "\"",
16
+ close: "\"",
17
+ notIn: [
18
+ "string"
19
+ ]
20
+ },
21
+ {
22
+ open: "(*",
23
+ close: "*",
24
+ notIn: [
25
+ "string"
26
+ ]
27
+ },
28
+ {
29
+ open: "[|",
30
+ close: "|",
31
+ notIn: [
32
+ "string"
33
+ ]
34
+ }
35
+ ];
36
+ var brackets = [
37
+ [
38
+ "{",
39
+ "}"
40
+ ],
41
+ [
42
+ "[",
43
+ "]"
44
+ ],
45
+ [
46
+ "(",
47
+ ")"
48
+ ],
49
+ [
50
+ "[|",
51
+ "|]"
52
+ ]
53
+ ];
54
+ var comments = {
55
+ blockComment: [
56
+ "(*",
57
+ "*)"
58
+ ]
59
+ };
60
+ var surroundingPairs = [
61
+ [
62
+ "{",
63
+ "}"
64
+ ],
65
+ [
66
+ "[",
67
+ "]"
68
+ ],
69
+ [
70
+ "(",
71
+ ")"
72
+ ],
73
+ [
74
+ "'",
75
+ "'"
76
+ ],
77
+ [
78
+ "\"",
79
+ "\""
80
+ ]
81
+ ];
82
+ var indentationRules = {
83
+ decreaseIndentPattern: "^\\s*(end|done|with|in|else)\\b|^\\s*;;",
84
+ increaseIndentPattern: "\\b(begin|object)\\s*$|\\blet [a-zA-Z0-9_-]+( [^ ]+)* =\\s*$|method!?[ \\t]+.*=[ \\t]*$|->[ \\t]*$|\\b(for|while)(_lwt)?[ \\t]+.*[ \\t]+do[ \\t]*$|(\\btry(_lwt)?$|\\bif\\s+.*\\sthen$|\\belse|[:=]\\s*sig|=\\s*struct)\\s*$",
85
+ indentNextLinePattern: "(?!\\bif.*then.*(else.*|(;|[ \\t]in)[ \\t]*$))\\bif|\\bthen[ \\t]*$|\\belse[ \\t]*$$"
86
+ };
87
+ var onEnterRules = [
88
+ {
89
+ beforeText: "\\(\\*\\*",
90
+ afterText: "\\*\\)",
91
+ action: {
92
+ indent: "none",
93
+ appendText: " "
94
+ }
95
+ },
96
+ {
97
+ beforeText: "\\(\\*",
98
+ afterText: "\\*\\)",
99
+ action: {
100
+ indent: "none",
101
+ appendText: " "
102
+ }
103
+ }
104
+ ];
105
+ var atd = {
106
+ autoClosingPairs: autoClosingPairs,
107
+ brackets: brackets,
108
+ comments: comments,
109
+ surroundingPairs: surroundingPairs,
110
+ indentationRules: indentationRules,
111
+ onEnterRules: onEnterRules
112
+ };
113
+
114
+ export { autoClosingPairs, brackets, comments, atd as default, indentationRules, onEnterRules, surroundingPairs };
package/dist/atd2.js ADDED
@@ -0,0 +1,110 @@
1
+ var name = "ATD";
2
+ var scopeName = "source.atd";
3
+ var fileTypes = [
4
+ "atd"
5
+ ];
6
+ var patterns = [
7
+ {
8
+ include: "source.ocaml#comments"
9
+ },
10
+ {
11
+ include: "source.ocaml#strings"
12
+ },
13
+ {
14
+ include: "#annotations"
15
+ },
16
+ {
17
+ include: "#definitions"
18
+ },
19
+ {
20
+ include: "#keywords"
21
+ },
22
+ {
23
+ include: "#types"
24
+ },
25
+ {
26
+ include: "source.ocaml#operators"
27
+ },
28
+ {
29
+ include: "source.ocaml#identifiers"
30
+ }
31
+ ];
32
+ var repository = {
33
+ annotations: {
34
+ patterns: [
35
+ {
36
+ begin: "(<)[[:space:]]*([[:lower:]_][[:word:]']*)",
37
+ end: ">",
38
+ beginCaptures: {
39
+ "1": {
40
+ name: "keyword.other.atd"
41
+ },
42
+ "2": {
43
+ name: "keyword.other.atd"
44
+ }
45
+ },
46
+ endCaptures: [
47
+ {
48
+ name: "keyword.other.atd"
49
+ }
50
+ ],
51
+ patterns: [
52
+ {
53
+ include: "$self"
54
+ }
55
+ ]
56
+ }
57
+ ]
58
+ },
59
+ definitions: {
60
+ match: "\\b(type)[[:space:]]+('[[:alpha:]][[:word:]']*[[:space:]]+|\\(.*\\)[[:space:]]*)?([[:lower:]_][[:word:]']*)",
61
+ captures: {
62
+ "1": {
63
+ name: "keyword.other.atd"
64
+ },
65
+ "2": {
66
+ patterns: [
67
+ {
68
+ include: "$self"
69
+ }
70
+ ]
71
+ },
72
+ "3": {
73
+ name: "entity.name.function.binding.atd"
74
+ }
75
+ }
76
+ },
77
+ keywords: {
78
+ name: "keyword.other.atd",
79
+ match: "\\b(type|of|inherit)\\b(?!')"
80
+ },
81
+ types: {
82
+ patterns: [
83
+ {
84
+ comment: "type parameter",
85
+ name: "storage.type.ocaml.atd",
86
+ match: "'[[:alpha:]][[:word:]']*\\b"
87
+ },
88
+ {
89
+ comment: "builtin type",
90
+ name: "support.type.ocaml.atd",
91
+ match: "\\b(unit|bool|int|float|string|abstract)\\b"
92
+ }
93
+ ]
94
+ }
95
+ };
96
+ var information_for_contributors = [
97
+ "This file has been converted from https://github.com/ocamllabs/vscode-ocaml-platform/blob/master/",
98
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
99
+ "Once accepted there, we are happy to receive an update request."
100
+ ];
101
+ var atd = {
102
+ name: name,
103
+ scopeName: scopeName,
104
+ fileTypes: fileTypes,
105
+ patterns: patterns,
106
+ repository: repository,
107
+ information_for_contributors: information_for_contributors
108
+ };
109
+
110
+ export { atd as default, fileTypes, information_for_contributors, name, patterns, repository, scopeName };