@deephaven/console 0.42.1-beta.2 → 0.43.0

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 (141) hide show
  1. package/package.json +12 -12
  2. package/dist/Console.css +0 -44
  3. package/dist/Console.css.map +0 -1
  4. package/dist/Console.js +0 -875
  5. package/dist/Console.js.map +0 -1
  6. package/dist/ConsoleInput.css +0 -42
  7. package/dist/ConsoleInput.css.map +0 -1
  8. package/dist/ConsoleInput.js +0 -442
  9. package/dist/ConsoleInput.js.map +0 -1
  10. package/dist/ConsoleMenu.css +0 -25
  11. package/dist/ConsoleMenu.css.map +0 -1
  12. package/dist/ConsoleMenu.js +0 -192
  13. package/dist/ConsoleMenu.js.map +0 -1
  14. package/dist/ConsolePropTypes.js +0 -10
  15. package/dist/ConsolePropTypes.js.map +0 -1
  16. package/dist/ConsoleShortcuts.js +0 -85
  17. package/dist/ConsoleShortcuts.js.map +0 -1
  18. package/dist/ConsoleStatusBar.css +0 -52
  19. package/dist/ConsoleStatusBar.css.map +0 -1
  20. package/dist/ConsoleStatusBar.js +0 -105
  21. package/dist/ConsoleStatusBar.js.map +0 -1
  22. package/dist/HeapUsage.css +0 -61
  23. package/dist/HeapUsage.css.map +0 -1
  24. package/dist/HeapUsage.js +0 -168
  25. package/dist/HeapUsage.js.map +0 -1
  26. package/dist/StoragePropTypes.js +0 -16
  27. package/dist/StoragePropTypes.js.map +0 -1
  28. package/dist/command-history/CommandHistory.css +0 -41
  29. package/dist/command-history/CommandHistory.css.map +0 -1
  30. package/dist/command-history/CommandHistory.js +0 -381
  31. package/dist/command-history/CommandHistory.js.map +0 -1
  32. package/dist/command-history/CommandHistoryActions.css +0 -10
  33. package/dist/command-history/CommandHistoryActions.css.map +0 -1
  34. package/dist/command-history/CommandHistoryActions.js +0 -47
  35. package/dist/command-history/CommandHistoryActions.js.map +0 -1
  36. package/dist/command-history/CommandHistoryItem.css +0 -61
  37. package/dist/command-history/CommandHistoryItem.css.map +0 -1
  38. package/dist/command-history/CommandHistoryItem.js +0 -50
  39. package/dist/command-history/CommandHistoryItem.js.map +0 -1
  40. package/dist/command-history/CommandHistoryItemTooltip.css +0 -37
  41. package/dist/command-history/CommandHistoryItemTooltip.css.map +0 -1
  42. package/dist/command-history/CommandHistoryItemTooltip.js +0 -159
  43. package/dist/command-history/CommandHistoryItemTooltip.js.map +0 -1
  44. package/dist/command-history/CommandHistoryStorage.js +0 -2
  45. package/dist/command-history/CommandHistoryStorage.js.map +0 -1
  46. package/dist/command-history/CommandHistoryTypes.js +0 -2
  47. package/dist/command-history/CommandHistoryTypes.js.map +0 -1
  48. package/dist/command-history/CommandHistoryViewportUpdater.js +0 -57
  49. package/dist/command-history/CommandHistoryViewportUpdater.js.map +0 -1
  50. package/dist/command-history/index.js +0 -7
  51. package/dist/command-history/index.js.map +0 -1
  52. package/dist/common/Code.js +0 -45
  53. package/dist/common/Code.js.map +0 -1
  54. package/dist/common/ConsoleConstants.js +0 -10
  55. package/dist/common/ConsoleConstants.js.map +0 -1
  56. package/dist/common/ConsoleUtils.js +0 -62
  57. package/dist/common/ConsoleUtils.js.map +0 -1
  58. package/dist/common/ObjectIcon.js +0 -33
  59. package/dist/common/ObjectIcon.js.map +0 -1
  60. package/dist/common/index.js +0 -5
  61. package/dist/common/index.js.map +0 -1
  62. package/dist/console-history/ConsoleHistory.css +0 -42
  63. package/dist/console-history/ConsoleHistory.css.map +0 -1
  64. package/dist/console-history/ConsoleHistory.js +0 -42
  65. package/dist/console-history/ConsoleHistory.js.map +0 -1
  66. package/dist/console-history/ConsoleHistoryItem.css +0 -87
  67. package/dist/console-history/ConsoleHistoryItem.css.map +0 -1
  68. package/dist/console-history/ConsoleHistoryItem.js +0 -139
  69. package/dist/console-history/ConsoleHistoryItem.js.map +0 -1
  70. package/dist/console-history/ConsoleHistoryItemResult.js +0 -22
  71. package/dist/console-history/ConsoleHistoryItemResult.js.map +0 -1
  72. package/dist/console-history/ConsoleHistoryResultErrorMessage.js +0 -142
  73. package/dist/console-history/ConsoleHistoryResultErrorMessage.js.map +0 -1
  74. package/dist/console-history/ConsoleHistoryResultInProgress.css +0 -27
  75. package/dist/console-history/ConsoleHistoryResultInProgress.css.map +0 -1
  76. package/dist/console-history/ConsoleHistoryResultInProgress.js +0 -66
  77. package/dist/console-history/ConsoleHistoryResultInProgress.js.map +0 -1
  78. package/dist/console-history/ConsoleHistoryTypes.js +0 -2
  79. package/dist/console-history/ConsoleHistoryTypes.js.map +0 -1
  80. package/dist/console-history/index.js +0 -6
  81. package/dist/console-history/index.js.map +0 -1
  82. package/dist/csv/CsvFormats.js +0 -134
  83. package/dist/csv/CsvFormats.js.map +0 -1
  84. package/dist/csv/CsvInputBar.css +0 -36
  85. package/dist/csv/CsvInputBar.css.map +0 -1
  86. package/dist/csv/CsvInputBar.js +0 -342
  87. package/dist/csv/CsvInputBar.js.map +0 -1
  88. package/dist/csv/CsvOverlay.css +0 -57
  89. package/dist/csv/CsvOverlay.css.map +0 -1
  90. package/dist/csv/CsvOverlay.js +0 -244
  91. package/dist/csv/CsvOverlay.js.map +0 -1
  92. package/dist/csv/CsvParser.js +0 -268
  93. package/dist/csv/CsvParser.js.map +0 -1
  94. package/dist/csv/CsvTypeParser.js +0 -235
  95. package/dist/csv/CsvTypeParser.js.map +0 -1
  96. package/dist/csv/NewTableColumnTypes.js +0 -16
  97. package/dist/csv/NewTableColumnTypes.js.map +0 -1
  98. package/dist/declaration.d.js +0 -2
  99. package/dist/declaration.d.js.map +0 -1
  100. package/dist/index.js +0 -18
  101. package/dist/index.js.map +0 -1
  102. package/dist/log/LogLevel.js +0 -11
  103. package/dist/log/LogLevel.js.map +0 -1
  104. package/dist/log/LogLevelMenuItem.css +0 -38
  105. package/dist/log/LogLevelMenuItem.css.map +0 -1
  106. package/dist/log/LogLevelMenuItem.js +0 -32
  107. package/dist/log/LogLevelMenuItem.js.map +0 -1
  108. package/dist/log/LogView.css +0 -65
  109. package/dist/log/LogView.css.map +0 -1
  110. package/dist/log/LogView.js +0 -487
  111. package/dist/log/LogView.js.map +0 -1
  112. package/dist/monaco/MonacoProviders.js +0 -314
  113. package/dist/monaco/MonacoProviders.js.map +0 -1
  114. package/dist/monaco/MonacoTheme.module.css +0 -54
  115. package/dist/monaco/MonacoTheme.module.css.map +0 -1
  116. package/dist/monaco/MonacoUtils.js +0 -423
  117. package/dist/monaco/MonacoUtils.js.map +0 -1
  118. package/dist/monaco/index.js +0 -4
  119. package/dist/monaco/index.js.map +0 -1
  120. package/dist/monaco/lang/Language.js +0 -2
  121. package/dist/monaco/lang/Language.js.map +0 -1
  122. package/dist/monaco/lang/db.js +0 -152
  123. package/dist/monaco/lang/db.js.map +0 -1
  124. package/dist/monaco/lang/groovy.js +0 -229
  125. package/dist/monaco/lang/groovy.js.map +0 -1
  126. package/dist/monaco/lang/log.js +0 -64
  127. package/dist/monaco/lang/log.js.map +0 -1
  128. package/dist/monaco/lang/python.js +0 -234
  129. package/dist/monaco/lang/python.js.map +0 -1
  130. package/dist/monaco/lang/scala.js +0 -264
  131. package/dist/monaco/lang/scala.js.map +0 -1
  132. package/dist/notebook/Editor.css +0 -6
  133. package/dist/notebook/Editor.css.map +0 -1
  134. package/dist/notebook/Editor.js +0 -130
  135. package/dist/notebook/Editor.js.map +0 -1
  136. package/dist/notebook/ScriptEditor.css +0 -8
  137. package/dist/notebook/ScriptEditor.css.map +0 -1
  138. package/dist/notebook/ScriptEditor.js +0 -310
  139. package/dist/notebook/ScriptEditor.js.map +0 -1
  140. package/dist/notebook/ScriptEditorUtils.js +0 -34
  141. package/dist/notebook/ScriptEditorUtils.js.map +0 -1
@@ -1,264 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) Microsoft Corporation
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a
7
- * copy of this software and associated documentation files (the "Software"),
8
- * to deal in the Software without restriction, including without limitation
9
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
- * and/or sell copies of the Software, and to permit persons to whom the
11
- * Software is furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included
14
- * in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
- * DEALINGS IN THE SOFTWARE.
23
- *
24
- * The base version of this file is licensed under the MIT License (as above)
25
- * and was sourced from microsoft's monaco languages repository:
26
- * - https://github.com/microsoft/monaco-languages/blob/main/src/scala/scala.ts
27
- *--------------------------------------------------------------------------------------------*/
28
-
29
- var id = 'scala';
30
- var conf = {
31
- /*
32
- * `...` is allowed as an identifier.
33
- * $ is allowed in identifiers.
34
- * unary_<op> is allowed as an identifier.
35
- * <name>_= is allowed as an identifier.
36
- */
37
- wordPattern: /(unary_[@~!#%^&*()\-=+\\|:<>/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,
38
- comments: {
39
- lineComment: '//',
40
- blockComment: ['/*', '*/']
41
- },
42
- brackets: [['{', '}'], ['[', ']'], ['(', ')']],
43
- autoClosingPairs: [{
44
- open: '{',
45
- close: '}'
46
- }, {
47
- open: '[',
48
- close: ']'
49
- }, {
50
- open: '(',
51
- close: ')'
52
- }, {
53
- open: '"',
54
- close: '"'
55
- }, {
56
- open: "'",
57
- close: "'"
58
- }],
59
- surroundingPairs: [{
60
- open: '{',
61
- close: '}'
62
- }, {
63
- open: '[',
64
- close: ']'
65
- }, {
66
- open: '(',
67
- close: ')'
68
- }, {
69
- open: '"',
70
- close: '"'
71
- }, {
72
- open: "'",
73
- close: "'"
74
- }],
75
- folding: {
76
- markers: {
77
- start: /^\s*\/\/\s*(?:(?:#?region\b)|(?:<editor-fold\b))/,
78
- end: /^\s*\/\/\s*(?:(?:#?endregion\b)|(?:<\/editor-fold>))/
79
- }
80
- }
81
- };
82
- var language = {
83
- // tokenPostfix: '.scala',
84
-
85
- // We can't easily add everything from Dotty, but we can at least add some of its keywords
86
- keywords: ['asInstanceOf', 'catch', 'class', 'classOf', 'def', 'do', 'else', 'extends', 'finally', 'for', 'foreach', 'forSome', 'if', 'import', 'isInstanceOf', 'macro', 'match', 'new', 'object', 'package', 'return', 'throw', 'trait', 'try', 'type', 'until', 'val', 'var', 'while', 'with', 'yield',
87
- // Dotty-specific:
88
- 'given', 'enum', 'then'],
89
- // Dotty-specific:
90
- softKeywords: ['as', 'export', 'extension', 'end', 'derives', 'on'],
91
- constants: ['true', 'false', 'null', 'this', 'super'],
92
- modifiers: ['abstract', 'final', 'implicit', 'lazy', 'override', 'private', 'protected', 'sealed'],
93
- // Dotty-specific:
94
- softModifiers: ['inline', 'opaque', 'open', 'transparent', 'using'],
95
- name: /(?:[a-z_$][\w$]*|`[^`]+`)/,
96
- type: /(?:[A-Z][\w$]*)/,
97
- // we include these common regular expressions
98
- symbols: /[=><!~?:&|+\-*/^\\%@#]+/,
99
- digits: /\d+(_+\d+)*/,
100
- hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
101
- // C# style strings
102
- escapes: /\\(?:[btnfr\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
103
- fstring_conv: /[bBhHsScCdoxXeEfgGaAt]|[Tn](?:[HIklMSLNpzZsQ]|[BbhAaCYyjmde]|[RTrDFC])/,
104
- // The main tokenizer for our languages
105
- tokenizer: {
106
- root: [
107
- // strings
108
- [/\braw"""/, {
109
- token: 'string.quote',
110
- bracket: '@open',
111
- next: '@rawstringt'
112
- }], [/\braw"/, {
113
- token: 'string.quote',
114
- bracket: '@open',
115
- next: '@rawstring'
116
- }], [/\bs"""/, {
117
- token: 'string.quote',
118
- bracket: '@open',
119
- next: '@sstringt'
120
- }], [/\bs"/, {
121
- token: 'string.quote',
122
- bracket: '@open',
123
- next: '@sstring'
124
- }], [/\bf""""/, {
125
- token: 'string.quote',
126
- bracket: '@open',
127
- next: '@fstringt'
128
- }], [/\bf"/, {
129
- token: 'string.quote',
130
- bracket: '@open',
131
- next: '@fstring'
132
- }], [/"""/, {
133
- token: 'string.quote',
134
- bracket: '@open',
135
- next: '@stringt'
136
- }], [/"/, {
137
- token: 'string.quote',
138
- bracket: '@open',
139
- next: '@string'
140
- }],
141
- // numbers
142
- [/(@digits)[eE]([-+]?(@digits))?[fFdD]?/, 'number.float', '@allowMethod'], [/(@digits)\.(@digits)([eE][-+]?(@digits))?[fFdD]?/, 'number.float', '@allowMethod'], [/0[xX](@hexdigits)[Ll]?/, 'number.hex', '@allowMethod'], [/(@digits)[fFdD]/, 'number.float', '@allowMethod'], [/(@digits)[lL]?/, 'number', '@allowMethod'], [/\b_\*/, 'key'], [/\b(_)\b/, 'keyword', '@allowMethod'],
143
- // identifiers and keywords
144
- [/\bimport\b/, 'keyword', '@import'], [/\b(case)([ \t]+)(class)\b/, ['keyword.modifier', 'white', 'keyword']], [/\bcase\b/, 'keyword', '@case'], [/\bva[lr]\b/, 'keyword', '@vardef'], [/\b(def)([ \t]+)((?:unary_)?@symbols|@name(?:_=)|@name)/, ['keyword', 'white', 'identifier']], [/@name(?=[ \t]*:(?!:))/, 'variable'], [/(\.)(@name|@symbols)/, [{
145
- token: 'operator'
146
- }, {
147
- token: '@rematch',
148
- next: '@allowMethod'
149
- }]], [/([{(])(\s*)(@name(?=\s*=>))/, ['@brackets', 'white', 'variable']], [/@name/, {
150
- cases: {
151
- '@keywords': 'keyword',
152
- '@softKeywords': 'keyword',
153
- '@modifiers': 'keyword.modifier',
154
- '@softModifiers': 'keyword.modifier',
155
- '@constants': {
156
- token: 'constant',
157
- next: '@allowMethod'
158
- },
159
- '@default': {
160
- token: 'identifier',
161
- next: '@allowMethod'
162
- }
163
- }
164
- }], [/@type/, 'type', '@allowMethod'],
165
- // whitespace
166
- {
167
- include: '@whitespace'
168
- },
169
- // @ annotations.
170
- [/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/, 'annotation'],
171
- // delimiters and operators
172
- [/[{(]/, '@brackets'], [/[})]/, '@brackets', '@allowMethod'], [/\[/, 'operator.square'], [/](?!\s*(?:va[rl]|def|type)\b)/, 'operator.square', '@allowMethod'], [/]/, 'operator.square'], [/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},."'`])/, 'keyword'], [/@symbols/, 'operator'],
173
- // delimiter: after number because of .\d floats
174
- [/[;,.]/, 'delimiter'],
175
- // symbols
176
- [/'[a-zA-Z$][\w$]*(?!')/, 'attribute.name'],
177
- // characters
178
- [/'[^\\']'/, 'string', '@allowMethod'], [/(')(@escapes)(')/, [{
179
- token: 'string'
180
- }, {
181
- token: 'string.escape'
182
- }, {
183
- token: 'string',
184
- next: '@allowMethod'
185
- }]], [/'/, 'string.invalid']],
186
- import: [[/;/, 'delimiter', '@pop'], [/^|$/, '', '@pop'], [/[ \t]+/, 'white'], [/[\n\r]+/, 'white', '@pop'], [/\/\*/, 'comment', '@comment'], [/@name|@type/, 'type'], [/[(){}]/, '@brackets'], [/[[\]]/, 'operator.square'], [/[.,]/, 'delimiter']],
187
- allowMethod: [[/^|$/, '', '@pop'], [/[ \t]+/, 'white'], [/[\n\r]+/, 'white', '@pop'], [/\/\*/, 'comment', '@comment'], [/(?==>[\s\w([{])/, 'keyword', '@pop'], [/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/, {
188
- cases: {
189
- '@keywords': {
190
- token: 'keyword',
191
- next: '@pop'
192
- },
193
- '->|<-|>:|<:|<%': {
194
- token: 'keyword',
195
- next: '@pop'
196
- },
197
- '@default': {
198
- token: '@rematch',
199
- next: '@pop'
200
- }
201
- }
202
- }], ['', '', '@pop']],
203
- comment: [[/[^/*]+/, 'comment'], [/\/\*/, 'comment', '@push'],
204
- // nested comment
205
- [/\*\//, 'comment', '@pop'], [/[/*]/, 'comment']],
206
- case: [[/\b_\*/, 'key'], [/\b(_|true|false|null|this|super)\b/, 'keyword', '@allowMethod'], [/\bif\b|=>/, 'keyword', '@pop'], [/`[^`]+`/, 'identifier', '@allowMethod'], [/@name/, 'variable', '@allowMethod'], [/:::?|\||@(?![a-z_$])/, 'keyword'], {
207
- include: '@root'
208
- }],
209
- vardef: [[/\b_\*/, 'key'], [/\b(_|true|false|null|this|super)\b/, 'keyword'], [/@name/, 'variable'], [/:::?|\||@(?![a-z_$])/, 'keyword'], [/=|:(?!:)/, 'operator', '@pop'], [/$/, 'white', '@pop'], {
210
- include: '@root'
211
- }],
212
- string: [[/[^\\"\n\r]+/, 'string'], [/@escapes/, 'string.escape'], [/\\./, 'string.escape.invalid'], [/"/, {
213
- token: 'string.quote',
214
- bracket: '@close',
215
- switchTo: '@allowMethod'
216
- }]],
217
- stringt: [[/[^\\"\n\r]+/, 'string'], [/@escapes/, 'string.escape'], [/\\./, 'string.escape.invalid'], [/"(?=""")/, 'string'], [/"""/, {
218
- token: 'string.quote',
219
- bracket: '@close',
220
- switchTo: '@allowMethod'
221
- }], [/"/, 'string']],
222
- fstring: [[/@escapes/, 'string.escape'], [/"/, {
223
- token: 'string.quote',
224
- bracket: '@close',
225
- switchTo: '@allowMethod'
226
- }], [/\$\$/, 'string'], [/(\$)([a-z_]\w*)/, ['operator', 'identifier']], [/\$\{/, 'operator', '@interp'], [/%%/, 'string'], [/(%)([-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/, ['metatag', 'keyword.modifier', 'number', 'metatag']], [/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/, ['metatag', 'number', 'metatag']], [/(%)([-#+ 0,(])(@fstring_conv)/, ['metatag', 'keyword.modifier', 'metatag']], [/(%)(@fstring_conv)/, ['metatag', 'metatag']], [/./, 'string']],
227
- fstringt: [[/@escapes/, 'string.escape'], [/"(?=""")/, 'string'], [/"""/, {
228
- token: 'string.quote',
229
- bracket: '@close',
230
- switchTo: '@allowMethod'
231
- }], [/\$\$/, 'string'], [/(\$)([a-z_]\w*)/, ['operator', 'identifier']], [/\$\{/, 'operator', '@interp'], [/%%/, 'string'], [/(%)([-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/, ['metatag', 'keyword.modifier', 'number', 'metatag']], [/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/, ['metatag', 'number', 'metatag']], [/(%)([-#+ 0,(])(@fstring_conv)/, ['metatag', 'keyword.modifier', 'metatag']], [/(%)(@fstring_conv)/, ['metatag', 'metatag']], [/./, 'string']],
232
- sstring: [[/@escapes/, 'string.escape'], [/"/, {
233
- token: 'string.quote',
234
- bracket: '@close',
235
- switchTo: '@allowMethod'
236
- }], [/\$\$/, 'string'], [/(\$)([a-z_]\w*)/, ['operator', 'identifier']], [/\$\{/, 'operator', '@interp'], [/./, 'string']],
237
- sstringt: [[/@escapes/, 'string.escape'], [/"(?=""")/, 'string'], [/"""/, {
238
- token: 'string.quote',
239
- bracket: '@close',
240
- switchTo: '@allowMethod'
241
- }], [/\$\$/, 'string'], [/(\$)([a-z_]\w*)/, ['operator', 'identifier']], [/\$\{/, 'operator', '@interp'], [/./, 'string']],
242
- interp: [[/{/, 'operator', '@push'], [/}/, 'operator', '@pop'], {
243
- include: '@root'
244
- }],
245
- rawstring: [[/[^"]/, 'string'], [/"/, {
246
- token: 'string.quote',
247
- bracket: '@close',
248
- switchTo: '@allowMethod'
249
- }]],
250
- rawstringt: [[/[^"]/, 'string'], [/"(?=""")/, 'string'], [/"""/, {
251
- token: 'string.quote',
252
- bracket: '@close',
253
- switchTo: '@allowMethod'
254
- }], [/"/, 'string']],
255
- whitespace: [[/[ \t\r\n]+/, 'white'], [/\/\*/, 'comment', '@comment'], [/\/\/.*$/, 'comment']]
256
- }
257
- };
258
- var lang = {
259
- id,
260
- conf,
261
- language
262
- };
263
- export default lang;
264
- //# sourceMappingURL=scala.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scala.js","names":["id","conf","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","folding","markers","start","end","language","keywords","softKeywords","constants","modifiers","softModifiers","name","type","symbols","digits","hexdigits","escapes","fstring_conv","tokenizer","root","token","bracket","next","cases","include","import","allowMethod","comment","case","vardef","string","switchTo","stringt","fstring","fstringt","sstring","sstringt","interp","rawstring","rawstringt","whitespace","lang"],"sources":["../../../src/monaco/lang/scala.ts"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * The MIT License (MIT)\n *\n * Copyright (c) Microsoft Corporation\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n *\n * The base version of this file is licensed under the MIT License (as above)\n * and was sourced from microsoft's monaco languages repository:\n * - https://github.com/microsoft/monaco-languages/blob/main/src/scala/scala.ts\n *--------------------------------------------------------------------------------------------*/\n\nimport * as monaco from 'monaco-editor';\nimport { Language } from './Language';\n\nconst id = 'scala';\n\nconst conf: monaco.languages.LanguageConfiguration = {\n /*\n * `...` is allowed as an identifier.\n * $ is allowed in identifiers.\n * unary_<op> is allowed as an identifier.\n * <name>_= is allowed as an identifier.\n */\n wordPattern: /(unary_[@~!#%^&*()\\-=+\\\\|:<>/?]+)|([a-zA-Z_$][\\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\\w$]*)/g,\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/'],\n },\n brackets: [\n ['{', '}'],\n ['[', ']'],\n ['(', ')'],\n ],\n autoClosingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n surroundingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n folding: {\n markers: {\n start: /^\\s*\\/\\/\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))/,\n end: /^\\s*\\/\\/\\s*(?:(?:#?endregion\\b)|(?:<\\/editor-fold>))/,\n },\n },\n};\n\nconst language: monaco.languages.IMonarchLanguage = {\n // tokenPostfix: '.scala',\n\n // We can't easily add everything from Dotty, but we can at least add some of its keywords\n keywords: [\n 'asInstanceOf',\n 'catch',\n 'class',\n 'classOf',\n 'def',\n 'do',\n 'else',\n 'extends',\n 'finally',\n 'for',\n 'foreach',\n 'forSome',\n 'if',\n 'import',\n 'isInstanceOf',\n 'macro',\n 'match',\n 'new',\n 'object',\n 'package',\n 'return',\n 'throw',\n 'trait',\n 'try',\n 'type',\n 'until',\n 'val',\n 'var',\n 'while',\n 'with',\n 'yield',\n\n // Dotty-specific:\n 'given',\n 'enum',\n 'then',\n ],\n\n // Dotty-specific:\n softKeywords: ['as', 'export', 'extension', 'end', 'derives', 'on'],\n\n constants: ['true', 'false', 'null', 'this', 'super'],\n\n modifiers: [\n 'abstract',\n 'final',\n 'implicit',\n 'lazy',\n 'override',\n 'private',\n 'protected',\n 'sealed',\n ],\n\n // Dotty-specific:\n softModifiers: ['inline', 'opaque', 'open', 'transparent', 'using'],\n\n name: /(?:[a-z_$][\\w$]*|`[^`]+`)/,\n type: /(?:[A-Z][\\w$]*)/,\n\n // we include these common regular expressions\n symbols: /[=><!~?:&|+\\-*/^\\\\%@#]+/,\n digits: /\\d+(_+\\d+)*/,\n hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,\n\n // C# style strings\n escapes: /\\\\(?:[btnfr\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n\n fstring_conv: /[bBhHsScCdoxXeEfgGaAt]|[Tn](?:[HIklMSLNpzZsQ]|[BbhAaCYyjmde]|[RTrDFC])/,\n\n // The main tokenizer for our languages\n tokenizer: {\n root: [\n // strings\n [\n /\\braw\"\"\"/,\n { token: 'string.quote', bracket: '@open', next: '@rawstringt' },\n ],\n [\n /\\braw\"/,\n { token: 'string.quote', bracket: '@open', next: '@rawstring' },\n ],\n\n [\n /\\bs\"\"\"/,\n { token: 'string.quote', bracket: '@open', next: '@sstringt' },\n ],\n [/\\bs\"/, { token: 'string.quote', bracket: '@open', next: '@sstring' }],\n [\n /\\bf\"\"\"\"/,\n { token: 'string.quote', bracket: '@open', next: '@fstringt' },\n ],\n [/\\bf\"/, { token: 'string.quote', bracket: '@open', next: '@fstring' }],\n [/\"\"\"/, { token: 'string.quote', bracket: '@open', next: '@stringt' }],\n [/\"/, { token: 'string.quote', bracket: '@open', next: '@string' }],\n\n // numbers\n [/(@digits)[eE]([-+]?(@digits))?[fFdD]?/, 'number.float', '@allowMethod'],\n [\n /(@digits)\\.(@digits)([eE][-+]?(@digits))?[fFdD]?/,\n 'number.float',\n '@allowMethod',\n ],\n [/0[xX](@hexdigits)[Ll]?/, 'number.hex', '@allowMethod'],\n [/(@digits)[fFdD]/, 'number.float', '@allowMethod'],\n [/(@digits)[lL]?/, 'number', '@allowMethod'],\n [/\\b_\\*/, 'key'],\n [/\\b(_)\\b/, 'keyword', '@allowMethod'],\n\n // identifiers and keywords\n [/\\bimport\\b/, 'keyword', '@import'],\n [/\\b(case)([ \\t]+)(class)\\b/, ['keyword.modifier', 'white', 'keyword']],\n [/\\bcase\\b/, 'keyword', '@case'],\n [/\\bva[lr]\\b/, 'keyword', '@vardef'],\n [\n /\\b(def)([ \\t]+)((?:unary_)?@symbols|@name(?:_=)|@name)/,\n ['keyword', 'white', 'identifier'],\n ],\n [/@name(?=[ \\t]*:(?!:))/, 'variable'],\n [\n /(\\.)(@name|@symbols)/,\n [\n { token: 'operator' },\n {\n token: '@rematch',\n next: '@allowMethod',\n },\n ],\n ],\n [/([{(])(\\s*)(@name(?=\\s*=>))/, ['@brackets', 'white', 'variable']],\n [\n /@name/,\n {\n cases: {\n '@keywords': 'keyword',\n '@softKeywords': 'keyword',\n '@modifiers': 'keyword.modifier',\n '@softModifiers': 'keyword.modifier',\n '@constants': {\n token: 'constant',\n next: '@allowMethod',\n },\n '@default': {\n token: 'identifier',\n next: '@allowMethod',\n },\n },\n },\n ],\n [/@type/, 'type', '@allowMethod'],\n\n // whitespace\n { include: '@whitespace' },\n\n // @ annotations.\n [/@[a-zA-Z_$][\\w$]*(?:\\.[a-zA-Z_$][\\w$]*)*/, 'annotation'],\n\n // delimiters and operators\n [/[{(]/, '@brackets'],\n [/[})]/, '@brackets', '@allowMethod'],\n [/\\[/, 'operator.square'],\n [/](?!\\s*(?:va[rl]|def|type)\\b)/, 'operator.square', '@allowMethod'],\n [/]/, 'operator.square'],\n [/([=-]>|<-|>:|<:|:>|<%)(?=[\\s\\w()[\\]{},.\"'`])/, 'keyword'],\n [/@symbols/, 'operator'],\n\n // delimiter: after number because of .\\d floats\n [/[;,.]/, 'delimiter'],\n\n // symbols\n [/'[a-zA-Z$][\\w$]*(?!')/, 'attribute.name'],\n\n // characters\n [/'[^\\\\']'/, 'string', '@allowMethod'],\n [\n /(')(@escapes)(')/,\n [\n { token: 'string' },\n { token: 'string.escape' },\n {\n token: 'string',\n next: '@allowMethod',\n },\n ],\n ],\n [/'/, 'string.invalid'],\n ],\n\n import: [\n [/;/, 'delimiter', '@pop'],\n [/^|$/, '', '@pop'],\n [/[ \\t]+/, 'white'],\n [/[\\n\\r]+/, 'white', '@pop'],\n [/\\/\\*/, 'comment', '@comment'],\n [/@name|@type/, 'type'],\n [/[(){}]/, '@brackets'],\n [/[[\\]]/, 'operator.square'],\n [/[.,]/, 'delimiter'],\n ],\n\n allowMethod: [\n [/^|$/, '', '@pop'],\n [/[ \\t]+/, 'white'],\n [/[\\n\\r]+/, 'white', '@pop'],\n [/\\/\\*/, 'comment', '@comment'],\n [/(?==>[\\s\\w([{])/, 'keyword', '@pop'],\n [\n /(@name|@symbols)(?=[ \\t]*[[({\"'`]|[ \\t]+(?:[+-]?\\.?\\d|\\w))/,\n {\n cases: {\n '@keywords': { token: 'keyword', next: '@pop' },\n '->|<-|>:|<:|<%': { token: 'keyword', next: '@pop' },\n '@default': { token: '@rematch', next: '@pop' },\n },\n },\n ],\n ['', '', '@pop'],\n ],\n\n comment: [\n [/[^/*]+/, 'comment'],\n [/\\/\\*/, 'comment', '@push'], // nested comment\n [/\\*\\//, 'comment', '@pop'],\n [/[/*]/, 'comment'],\n ],\n\n case: [\n [/\\b_\\*/, 'key'],\n [/\\b(_|true|false|null|this|super)\\b/, 'keyword', '@allowMethod'],\n [/\\bif\\b|=>/, 'keyword', '@pop'],\n [/`[^`]+`/, 'identifier', '@allowMethod'],\n [/@name/, 'variable', '@allowMethod'],\n [/:::?|\\||@(?![a-z_$])/, 'keyword'],\n { include: '@root' },\n ],\n\n vardef: [\n [/\\b_\\*/, 'key'],\n [/\\b(_|true|false|null|this|super)\\b/, 'keyword'],\n [/@name/, 'variable'],\n [/:::?|\\||@(?![a-z_$])/, 'keyword'],\n [/=|:(?!:)/, 'operator', '@pop'],\n [/$/, 'white', '@pop'],\n { include: '@root' },\n ],\n\n string: [\n [/[^\\\\\"\\n\\r]+/, 'string'],\n [/@escapes/, 'string.escape'],\n [/\\\\./, 'string.escape.invalid'],\n [\n /\"/,\n {\n token: 'string.quote',\n bracket: '@close',\n switchTo: '@allowMethod',\n },\n ],\n ],\n\n stringt: [\n [/[^\\\\\"\\n\\r]+/, 'string'],\n [/@escapes/, 'string.escape'],\n [/\\\\./, 'string.escape.invalid'],\n [/\"(?=\"\"\")/, 'string'],\n [\n /\"\"\"/,\n {\n token: 'string.quote',\n bracket: '@close',\n switchTo: '@allowMethod',\n },\n ],\n [/\"/, 'string'],\n ],\n\n fstring: [\n [/@escapes/, 'string.escape'],\n [\n /\"/,\n {\n token: 'string.quote',\n bracket: '@close',\n switchTo: '@allowMethod',\n },\n ],\n [/\\$\\$/, 'string'],\n [/(\\$)([a-z_]\\w*)/, ['operator', 'identifier']],\n [/\\$\\{/, 'operator', '@interp'],\n [/%%/, 'string'],\n [\n /(%)([-#+ 0,(])(\\d+|\\.\\d+|\\d+\\.\\d+)(@fstring_conv)/,\n ['metatag', 'keyword.modifier', 'number', 'metatag'],\n ],\n [\n /(%)(\\d+|\\.\\d+|\\d+\\.\\d+)(@fstring_conv)/,\n ['metatag', 'number', 'metatag'],\n ],\n [\n /(%)([-#+ 0,(])(@fstring_conv)/,\n ['metatag', 'keyword.modifier', 'metatag'],\n ],\n [/(%)(@fstring_conv)/, ['metatag', 'metatag']],\n [/./, 'string'],\n ],\n\n fstringt: [\n [/@escapes/, 'string.escape'],\n [/\"(?=\"\"\")/, 'string'],\n [\n /\"\"\"/,\n {\n token: 'string.quote',\n bracket: '@close',\n switchTo: '@allowMethod',\n },\n ],\n [/\\$\\$/, 'string'],\n [/(\\$)([a-z_]\\w*)/, ['operator', 'identifier']],\n [/\\$\\{/, 'operator', '@interp'],\n [/%%/, 'string'],\n [\n /(%)([-#+ 0,(])(\\d+|\\.\\d+|\\d+\\.\\d+)(@fstring_conv)/,\n ['metatag', 'keyword.modifier', 'number', 'metatag'],\n ],\n [\n /(%)(\\d+|\\.\\d+|\\d+\\.\\d+)(@fstring_conv)/,\n ['metatag', 'number', 'metatag'],\n ],\n [\n /(%)([-#+ 0,(])(@fstring_conv)/,\n ['metatag', 'keyword.modifier', 'metatag'],\n ],\n [/(%)(@fstring_conv)/, ['metatag', 'metatag']],\n [/./, 'string'],\n ],\n\n sstring: [\n [/@escapes/, 'string.escape'],\n [\n /\"/,\n {\n token: 'string.quote',\n bracket: '@close',\n switchTo: '@allowMethod',\n },\n ],\n [/\\$\\$/, 'string'],\n [/(\\$)([a-z_]\\w*)/, ['operator', 'identifier']],\n [/\\$\\{/, 'operator', '@interp'],\n [/./, 'string'],\n ],\n\n sstringt: [\n [/@escapes/, 'string.escape'],\n [/\"(?=\"\"\")/, 'string'],\n [\n /\"\"\"/,\n {\n token: 'string.quote',\n bracket: '@close',\n switchTo: '@allowMethod',\n },\n ],\n [/\\$\\$/, 'string'],\n [/(\\$)([a-z_]\\w*)/, ['operator', 'identifier']],\n [/\\$\\{/, 'operator', '@interp'],\n [/./, 'string'],\n ],\n\n interp: [\n [/{/, 'operator', '@push'],\n [/}/, 'operator', '@pop'],\n { include: '@root' },\n ],\n\n rawstring: [\n [/[^\"]/, 'string'],\n [\n /\"/,\n {\n token: 'string.quote',\n bracket: '@close',\n switchTo: '@allowMethod',\n },\n ],\n ],\n\n rawstringt: [\n [/[^\"]/, 'string'],\n [/\"(?=\"\"\")/, 'string'],\n [\n /\"\"\"/,\n {\n token: 'string.quote',\n bracket: '@close',\n switchTo: '@allowMethod',\n },\n ],\n [/\"/, 'string'],\n ],\n\n whitespace: [\n [/[ \\t\\r\\n]+/, 'white'],\n [/\\/\\*/, 'comment', '@comment'],\n [/\\/\\/.*$/, 'comment'],\n ],\n },\n};\n\nconst lang: Language = { id, conf, language };\nexport default lang;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,IAAMA,EAAE,GAAG,OAAO;AAElB,IAAMC,IAA4C,GAAG;EACnD;AACF;AACA;AACA;AACA;AACA;EACEC,WAAW,EAAE,uFAAuF;EACpGC,QAAQ,EAAE;IACRC,WAAW,EAAE,IAAI;IACjBC,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI;EAC3B,CAAC;EACDC,QAAQ,EAAE,CACR,CAAC,GAAG,EAAE,GAAG,CAAC,EACV,CAAC,GAAG,EAAE,GAAG,CAAC,EACV,CAAC,GAAG,EAAE,GAAG,CAAC,CACX;EACDC,gBAAgB,EAAE,CAChB;IAAEC,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC,EACzB;IAAED,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC,EACzB;IAAED,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC,EACzB;IAAED,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC,EACzB;IAAED,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC,CAC1B;EACDC,gBAAgB,EAAE,CAChB;IAAEF,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC,EACzB;IAAED,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC,EACzB;IAAED,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC,EACzB;IAAED,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC,EACzB;IAAED,IAAI,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC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AAG,EAAE,QAAQ,CAAC,CAChB;IAEDM,MAAM,EAAE,CACN,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,EAC1B,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,CAAC,EACzB;MAAEb,OAAO,EAAE;IAAQ,CAAC,CACrB;IAEDc,SAAS,EAAE,CACT,CAAC,MAAM,EAAE,QAAQ,CAAC,EAClB,CACE,GAAG,EACH;MACElB,KAAK,EAAE,cAAc;MACrBC,OAAO,EAAE,QAAQ;MACjBU,QAAQ,EAAE;IACZ,CAAC,CACF,CACF;IAEDQ,UAAU,EAAE,CACV,CAAC,MAAM,EAAE,QAAQ,CAAC,EAClB,CAAC,UAAU,EAAE,QAAQ,CAAC,EACtB,CACE,KAAK,EACL;MACEnB,KAAK,EAAE,cAAc;MACrBC,OAAO,EAAE,QAAQ;MACjBU,QAAQ,EAAE;IACZ,CAAC,CACF,EACD,CAAC,GAAG,EAAE,QAAQ,CAAC,CAChB;IAEDS,UAAU,EAAE,CACV,CAAC,YAAY,EAAE,OAAO,CAAC,EACvB,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,EAC/B,CAAC,SAAS,EAAE,SAAS,CAAC;EAE1B;AACF,CAAC;AAED,IAAMC,IAAc,GAAG;EAAEnD,EAAE;EAAEC,IAAI;EAAEc;AAAS,CAAC;AAC7C,eAAeoC,IAAI"}
@@ -1,6 +0,0 @@
1
- /* stylelint-disable scss/at-import-no-partial-leading-underscore */
2
- .monaco-editor .detected-link {
3
- color: #929192;
4
- }
5
-
6
- /*# sourceMappingURL=Editor.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../node_modules/@deephaven/components/scss/custom.scss","../../src/notebook/Editor.scss","../../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss"],"names":[],"mappings":"AAAA;ACEA;EACE,OCkBS","file":"Editor.css","sourcesContent":["/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n","@import '@deephaven/components/scss/custom.scss';\n\n.monaco-editor .detected-link {\n color: $link-color;\n}\n","// Styling overrides for bootstrap\n\n// Override / set color variables\n$red: #f95d84;\n$orange: #f37e3f;\n$yellow: #fcd65b;\n$green: #9edc6f;\n$blue: #76d9e4;\n$purple: #aa9af4;\n\n//Define some UI colors\n$interfacegray: #2d2a2e;\n$interfaceblue: #4878ea;\n$interfacewhite: #f0f0ee; //same as gray-200\n$interfaceblack: #1a171a;\n\n//Define our Gray scale\n$white: $interfacewhite;\n$gray-100: #fcfcfa;\n$gray-200: $interfacewhite;\n$gray-300: #c0bfbf;\n$gray-400: #929192;\n$gray-500: #5b5a5c;\n$gray-600: #555356;\n$gray-700: #403e41;\n$gray-800: #373438;\n$gray-850: #322f33;\n$gray-900: #211f22;\n$black: $interfaceblack;\n$content-bg: $interfacegray;\n$background: $interfaceblack;\n$foreground: $interfacewhite;\n\n//Load colors into map\n$colors: ();\n$colors: map-merge(\n (\n 'red': $red,\n 'orange': $orange,\n 'yellow': $yellow,\n 'green': $green,\n 'blue': $blue,\n 'purple': $purple,\n 'white': $white,\n 'black': $black,\n ),\n $colors\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: $interfaceblue;\n$primary-hover: darken($primary, 8%);\n$primary-dark: mix($primary, $content-bg, 25%);\n$primary-light: scale-color($primary, $lightness: -25%);\n$secondary: $gray-500;\n$secondary-hover: darken($secondary, 8%);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: $red;\n$danger-hover: darken($danger, 8%);\n$light: $gray-100;\n$mid: $gray-400; //Added a mid color, useful for input styling\n$dark: $gray-800;\n$green-dark: scale-color($green, $lightness: -45%, $saturation: -10%);\n\n$theme-colors: () !default;\n$theme-colors: map-merge(\n (\n 'primary': $primary,\n 'primary-hover': $primary-hover,\n 'primary-light': $primary-light,\n 'primary-dark': $primary-dark,\n 'secondary': $secondary,\n 'success': $success,\n 'info': $info,\n 'warning': $warning,\n 'danger': $danger,\n 'light': $light,\n 'dark': $dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n ),\n $theme-colors\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif: 'Fira Sans', -apple-system, blinkmacsystemfont,\n 'Segoe UI', 'Roboto', 'Helvetica Neue', arial, sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n//so browsers add alpha to your color by default, ignoring opacity 1\n//by setting rgba with 0.99 it tricks browser into thinking there is alpha applied\n$text-select-color: $primary-hover;\n$text-select-color-editor: lighten(\n $gray-700,\n 15%\n); //we lighten it abit to account for that 0.01 loss, and because it needs some anyways.\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem rgba($black, 45%); //because our UI is so dark, we need darker default shadows\n$box-shadow-900: 0 0.1rem 1rem rgba(0, 0, 0, 45%); //darkest shadow for $black popups over $black UI\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition: color 0.12s ease-in-out, background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out, box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n\n//Override Inputs\n$input-bg: $gray-600;\n$input-disabled-bg: $gray-800;\n$input-color: $foreground;\n$input-border-color: $gray-400;\n$input-placeholder-color: $gray-400;\n$input-focus-border-color: rgba($primary, 85%);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: rgba($component-active-bg, 35%);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n\n//checkbox\n$custom-control-indicator-bg: $gray-600;\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: $gray-800;\n$custom-control-indicator-checked-disabled-bg: $gray-800;\n$custom-control-label-disabled-color: $gray-400;\n\n//Custom Select\n$custom-select-indicator-color: $gray-400;\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: darken($gray-400, 5%);\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $gray-200;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n\n// Toast notification\n$toast-bg: $primary-dark;\n$toast-color: $foreground;\n$toast-error-bg: mix($danger, $content-bg, 15%);\n$toast-error-color: $foreground;\n\n//tooltips\n$tooltip-bg: $gray-700;\n$tooltip-color: $foreground;\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem rgba($black, 80%);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: $primary;\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: $gray-600;\n$contextmenu-color: $foreground;\n$contextmenu-disabled-color: $text-muted;\n$contextmenu-keyboard-selected-bg: rgba($primary, 50%);\n$contextmenu-selected-bg: $primary;\n$contextmenu-selected-color: $foreground;\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: theme-color('danger');\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n"]}
@@ -1,130 +0,0 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
- /**
7
- * Editor editor for large blocks of code
8
- */
9
- import React, { Component } from 'react';
10
- import classNames from 'classnames';
11
- import * as monaco from 'monaco-editor';
12
- import { assertNotNull } from '@deephaven/utils';
13
- import MonacoUtils from "../monaco/MonacoUtils.js";
14
- import "./Editor.css";
15
- class Editor extends Component {
16
- constructor(props) {
17
- super(props);
18
- _defineProperty(this, "container", void 0);
19
- _defineProperty(this, "editor", void 0);
20
- this.handleResize = this.handleResize.bind(this);
21
- this.container = null;
22
- this.state = {};
23
- }
24
- componentDidMount() {
25
- this.initEditor();
26
- window.addEventListener('resize', this.handleResize);
27
- }
28
- componentWillUnmount() {
29
- window.removeEventListener('resize', this.handleResize);
30
- this.destroyEditor();
31
- }
32
- setLanguage(language) {
33
- if (this.editor) {
34
- var model = this.editor.getModel();
35
- assertNotNull(model);
36
- monaco.editor.setModelLanguage(model, language);
37
- }
38
- }
39
- handleResize() {
40
- this.updateDimensions();
41
- }
42
- toggleFind() {
43
- if (this.editor) {
44
- // The actions.find action can no longer be triggered when the editor is not in focus, with monaco 0.22.x.
45
- // As a workaround, just focus the editor before triggering the action
46
- // https://github.com/microsoft/monaco-editor/issues/2355
47
- this.editor.focus();
48
- this.editor.trigger('toggleFind', 'actions.find', undefined);
49
- }
50
- }
51
- updateDimensions() {
52
- var _this$editor;
53
- (_this$editor = this.editor) === null || _this$editor === void 0 ? void 0 : _this$editor.layout();
54
- }
55
- initEditor() {
56
- var {
57
- onEditorInitialized
58
- } = this.props;
59
- var {
60
- settings
61
- } = this.props;
62
- settings = _objectSpread({
63
- copyWithSyntaxHighlighting: false,
64
- fixedOverflowWidgets: true,
65
- folding: false,
66
- fontFamily: 'Fira Mono',
67
- glyphMargin: false,
68
- language: "python",
69
- lineNumbersMinChars: 3,
70
- minimap: {
71
- enabled: false
72
- },
73
- scrollBeyondLastLine: false,
74
- tabCompletion: 'on',
75
- value: '',
76
- wordWrap: 'off',
77
- links: true
78
- }, settings);
79
- assertNotNull(this.container);
80
- this.editor = monaco.editor.create(this.container, settings);
81
- this.editor.addAction({
82
- id: 'find',
83
- label: 'Find',
84
- keybindings: [
85
- // eslint-disable-next-line no-bitwise
86
- monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyF],
87
- precondition: undefined,
88
- keybindingContext: undefined,
89
- contextMenuGroupId: 'navigation',
90
- contextMenuOrder: 1.0,
91
- run: () => {
92
- this.toggleFind();
93
- }
94
- });
95
- this.editor.layout();
96
- MonacoUtils.removeConflictingKeybindings(this.editor);
97
- monaco.languages.registerLinkProvider('plaintext', {
98
- provideLinks: MonacoUtils.provideLinks
99
- });
100
- onEditorInitialized(this.editor);
101
- }
102
- destroyEditor() {
103
- var {
104
- onEditorWillDestroy
105
- } = this.props;
106
- assertNotNull(this.editor);
107
- onEditorWillDestroy(this.editor);
108
- this.editor.dispose();
109
- this.editor = undefined;
110
- }
111
- render() {
112
- var {
113
- className
114
- } = this.props;
115
- return /*#__PURE__*/React.createElement("div", {
116
- className: classNames('editor-container', className),
117
- ref: container => {
118
- this.container = container;
119
- }
120
- });
121
- }
122
- }
123
- _defineProperty(Editor, "defaultProps", {
124
- className: 'fill-parent-absolute',
125
- onEditorInitialized: () => undefined,
126
- onEditorWillDestroy: () => undefined,
127
- settings: {}
128
- });
129
- export default Editor;
130
- //# sourceMappingURL=Editor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Editor.js","names":["React","Component","classNames","monaco","assertNotNull","MonacoUtils","Editor","constructor","props","handleResize","bind","container","state","componentDidMount","initEditor","window","addEventListener","componentWillUnmount","removeEventListener","destroyEditor","setLanguage","language","editor","model","getModel","setModelLanguage","updateDimensions","toggleFind","focus","trigger","undefined","layout","onEditorInitialized","settings","copyWithSyntaxHighlighting","fixedOverflowWidgets","folding","fontFamily","glyphMargin","lineNumbersMinChars","minimap","enabled","scrollBeyondLastLine","tabCompletion","value","wordWrap","links","create","addAction","id","label","keybindings","KeyMod","CtrlCmd","KeyCode","KeyF","precondition","keybindingContext","contextMenuGroupId","contextMenuOrder","run","removeConflictingKeybindings","languages","registerLinkProvider","provideLinks","onEditorWillDestroy","dispose","render","className"],"sources":["../../src/notebook/Editor.tsx"],"sourcesContent":["/**\n * Editor editor for large blocks of code\n */\nimport React, { Component, ReactElement } from 'react';\nimport classNames from 'classnames';\nimport * as monaco from 'monaco-editor';\nimport { assertNotNull } from '@deephaven/utils';\nimport MonacoUtils from '../monaco/MonacoUtils';\nimport './Editor.scss';\n\ninterface EditorProps {\n className: string;\n onEditorInitialized: (editor: monaco.editor.IStandaloneCodeEditor) => void;\n onEditorWillDestroy: (editor: monaco.editor.IStandaloneCodeEditor) => void;\n settings: monaco.editor.IStandaloneEditorConstructionOptions;\n}\n\nclass Editor extends Component<EditorProps, Record<string, never>> {\n static defaultProps = {\n className: 'fill-parent-absolute',\n onEditorInitialized: (): void => undefined,\n onEditorWillDestroy: (): void => undefined,\n settings: {},\n };\n\n constructor(props: EditorProps) {\n super(props);\n\n this.handleResize = this.handleResize.bind(this);\n\n this.container = null;\n this.state = {};\n }\n\n componentDidMount(): void {\n this.initEditor();\n\n window.addEventListener('resize', this.handleResize);\n }\n\n componentWillUnmount(): void {\n window.removeEventListener('resize', this.handleResize);\n\n this.destroyEditor();\n }\n\n container: HTMLDivElement | null;\n\n editor?: monaco.editor.IStandaloneCodeEditor;\n\n setLanguage(language: string): void {\n if (this.editor) {\n const model = this.editor.getModel();\n assertNotNull(model);\n monaco.editor.setModelLanguage(model, language);\n }\n }\n\n handleResize(): void {\n this.updateDimensions();\n }\n\n toggleFind(): void {\n if (this.editor) {\n // The actions.find action can no longer be triggered when the editor is not in focus, with monaco 0.22.x.\n // As a workaround, just focus the editor before triggering the action\n // https://github.com/microsoft/monaco-editor/issues/2355\n this.editor.focus();\n this.editor.trigger('toggleFind', 'actions.find', undefined);\n }\n }\n\n updateDimensions(): void {\n this.editor?.layout();\n }\n\n initEditor(): void {\n const { onEditorInitialized } = this.props;\n let { settings } = this.props;\n settings = {\n copyWithSyntaxHighlighting: false,\n fixedOverflowWidgets: true,\n folding: false,\n fontFamily: 'Fira Mono',\n glyphMargin: false,\n language: `python`,\n lineNumbersMinChars: 3,\n minimap: { enabled: false },\n scrollBeyondLastLine: false,\n tabCompletion: 'on',\n value: '',\n wordWrap: 'off',\n links: true,\n ...settings,\n };\n assertNotNull(this.container);\n this.editor = monaco.editor.create(this.container, settings);\n this.editor.addAction({\n id: 'find',\n label: 'Find',\n keybindings: [\n // eslint-disable-next-line no-bitwise\n monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyF,\n ],\n precondition: undefined,\n keybindingContext: undefined,\n contextMenuGroupId: 'navigation',\n contextMenuOrder: 1.0,\n\n run: () => {\n this.toggleFind();\n },\n });\n this.editor.layout();\n MonacoUtils.removeConflictingKeybindings(this.editor);\n\n monaco.languages.registerLinkProvider('plaintext', {\n provideLinks: MonacoUtils.provideLinks,\n });\n\n onEditorInitialized(this.editor);\n }\n\n destroyEditor(): void {\n const { onEditorWillDestroy } = this.props;\n assertNotNull(this.editor);\n onEditorWillDestroy(this.editor);\n this.editor.dispose();\n this.editor = undefined;\n }\n\n render(): ReactElement {\n const { className } = this.props;\n return (\n <div\n className={classNames('editor-container', className)}\n ref={container => {\n this.container = container;\n }}\n />\n );\n }\n}\n\nexport default Editor;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC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CAACvC,MAAM,CAAC;IAErDnB,MAAM,CAAC2D,SAAS,CAACC,oBAAoB,CAAC,WAAW,EAAE;MACjDC,YAAY,EAAE3D,WAAW,CAAC2D;IAC5B,CAAC,CAAC;IAEFhC,mBAAmB,CAAC,IAAI,CAACV,MAAM,CAAC;EAClC;EAEAH,aAAa,GAAS;IACpB,IAAM;MAAE8C;IAAoB,CAAC,GAAG,IAAI,CAACzD,KAAK;IAC1CJ,aAAa,CAAC,IAAI,CAACkB,MAAM,CAAC;IAC1B2C,mBAAmB,CAAC,IAAI,CAAC3C,MAAM,CAAC;IAChC,IAAI,CAACA,MAAM,CAAC4C,OAAO,EAAE;IACrB,IAAI,CAAC5C,MAAM,GAAGQ,SAAS;EACzB;EAEAqC,MAAM,GAAiB;IACrB,IAAM;MAAEC;IAAU,CAAC,GAAG,IAAI,CAAC5D,KAAK;IAChC,oBACE;MACE,SAAS,EAAEN,UAAU,CAAC,kBAAkB,EAAEkE,SAAS,CAAE;MACrD,GAAG,EAAEzD,SAAS,IAAI;QAChB,IAAI,CAACA,SAAS,GAAGA,SAAS;MAC5B;IAAE,EACF;EAEN;AACF;AAAC,gBA7HKL,MAAM,kBACY;EACpB8D,SAAS,EAAE,sBAAsB;EACjCpC,mBAAmB,EAAE,MAAYF,SAAS;EAC1CmC,mBAAmB,EAAE,MAAYnC,SAAS;EAC1CG,QAAQ,EAAE,CAAC;AACb,CAAC;AAyHH,eAAe3B,MAAM"}
@@ -1,8 +0,0 @@
1
- .script-editor {
2
- display: flex;
3
- flex-direction: column;
4
- flex-grow: 1;
5
- position: relative;
6
- }
7
-
8
- /*# sourceMappingURL=ScriptEditor.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../src/notebook/ScriptEditor.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA","file":"ScriptEditor.css","sourcesContent":[".script-editor {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n position: relative;\n}\n"]}