@harmoniclabs/monaco-editor 0.52.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 (766) hide show
  1. package/.azure-pipelines/publish-nightly.yml +90 -0
  2. package/.azure-pipelines/publish-stable.yml +89 -0
  3. package/.devcontainer/devcontainer.json +8 -0
  4. package/.gitattributes +1 -0
  5. package/.github/ISSUE_TEMPLATE/1_bug_report.yaml +57 -0
  6. package/.github/ISSUE_TEMPLATE/2_feature_request.yaml +38 -0
  7. package/.github/ISSUE_TEMPLATE/3_other.md +4 -0
  8. package/.github/ISSUE_TEMPLATE/config.yml +5 -0
  9. package/.github/publish-failure-issue-template.md +7 -0
  10. package/.github/workflows/ci.yml +76 -0
  11. package/.github/workflows/website.yml +66 -0
  12. package/.husky/pre-commit +4 -0
  13. package/.mocharc.json +4 -0
  14. package/.nvmrc +1 -0
  15. package/.prettierignore +17 -0
  16. package/.prettierrc +8 -0
  17. package/.vscode/launch.json +68 -0
  18. package/.vscode/settings.json +16 -0
  19. package/.vscode/tasks.json +30 -0
  20. package/CHANGELOG.md +1655 -0
  21. package/CONTRIBUTING.md +125 -0
  22. package/LICENSE.txt +21 -0
  23. package/MAINTAINING.md +55 -0
  24. package/README.md +122 -0
  25. package/SECURITY.md +41 -0
  26. package/ThirdPartyNotices.txt +392 -0
  27. package/build/build-languages.ts +212 -0
  28. package/build/build-monaco-editor.ts +463 -0
  29. package/build/check-samples.ts +53 -0
  30. package/build/fillers/vscode-nls.ts +46 -0
  31. package/build/fs.ts +80 -0
  32. package/build/importTypescript.ts +192 -0
  33. package/build/npm/installAll.ts +44 -0
  34. package/build/npm/removeAll.ts +20 -0
  35. package/build/postinstall.ts +23 -0
  36. package/build/releaseMetadata.ts +280 -0
  37. package/build/simpleserver.ts +69 -0
  38. package/build/tsconfig.json +8 -0
  39. package/build/utils.ts +291 -0
  40. package/docs/code-structure.dio.svg +275 -0
  41. package/docs/debugging-core.gif +0 -0
  42. package/docs/debugging-languages.gif +0 -0
  43. package/docs/integrate-amd.md +28 -0
  44. package/docs/integrate-esm.md +229 -0
  45. package/docs/launch config.png +0 -0
  46. package/docs/out-folders.dio.svg +347 -0
  47. package/editor.code-workspace +13 -0
  48. package/gulpfile.js +9 -0
  49. package/package.json +80 -0
  50. package/samples/README.md +36 -0
  51. package/samples/browser-amd-diff-editor/index.html +62 -0
  52. package/samples/browser-amd-diff-editor/modified.txt +74 -0
  53. package/samples/browser-amd-diff-editor/original.txt +61 -0
  54. package/samples/browser-amd-editor/index.html +24 -0
  55. package/samples/browser-amd-iframe/index.html +70 -0
  56. package/samples/browser-amd-iframe/inner.html +34 -0
  57. package/samples/browser-amd-localized/index.html +30 -0
  58. package/samples/browser-amd-monarch/index.html +105 -0
  59. package/samples/browser-amd-requirejs/index.html +26 -0
  60. package/samples/browser-amd-shadow-dom/index.html +50 -0
  61. package/samples/browser-amd-shared-model/index.html +29 -0
  62. package/samples/browser-amd-trusted-types/index.html +42 -0
  63. package/samples/browser-esm-esbuild/build.js +96 -0
  64. package/samples/browser-esm-esbuild/index.html +18 -0
  65. package/samples/browser-esm-esbuild/index.js +24 -0
  66. package/samples/browser-esm-esbuild/package.json +6 -0
  67. package/samples/browser-esm-parcel/index.html +19 -0
  68. package/samples/browser-esm-parcel/package-lock.json +3953 -0
  69. package/samples/browser-esm-parcel/package.json +10 -0
  70. package/samples/browser-esm-parcel/src/index.html +11 -0
  71. package/samples/browser-esm-parcel/src/index.js +29 -0
  72. package/samples/browser-esm-vite-react/index.html +12 -0
  73. package/samples/browser-esm-vite-react/package-lock.json +2341 -0
  74. package/samples/browser-esm-vite-react/package.json +20 -0
  75. package/samples/browser-esm-vite-react/src/components/Editor.module.css +4 -0
  76. package/samples/browser-esm-vite-react/src/components/Editor.tsx +25 -0
  77. package/samples/browser-esm-vite-react/src/main.tsx +11 -0
  78. package/samples/browser-esm-vite-react/src/userWorker.ts +27 -0
  79. package/samples/browser-esm-vite-react/src/vite-env.d.ts +1 -0
  80. package/samples/browser-esm-vite-react/tsconfig.json +11 -0
  81. package/samples/browser-esm-vite-react/vite.config.ts +7 -0
  82. package/samples/browser-esm-webpack/index.html +20 -0
  83. package/samples/browser-esm-webpack/index.js +24 -0
  84. package/samples/browser-esm-webpack/package.json +6 -0
  85. package/samples/browser-esm-webpack/webpack.config.js +30 -0
  86. package/samples/browser-esm-webpack-monaco-plugin/index.html +20 -0
  87. package/samples/browser-esm-webpack-monaco-plugin/index.js +16 -0
  88. package/samples/browser-esm-webpack-monaco-plugin/package.json +6 -0
  89. package/samples/browser-esm-webpack-monaco-plugin/webpack.config.js +28 -0
  90. package/samples/browser-esm-webpack-small/generate-imports.js +140 -0
  91. package/samples/browser-esm-webpack-small/index.html +26 -0
  92. package/samples/browser-esm-webpack-small/index.js +168 -0
  93. package/samples/browser-esm-webpack-small/package.json +7 -0
  94. package/samples/browser-esm-webpack-small/webpack.config.js +35 -0
  95. package/samples/browser-esm-webpack-typescript/package.json +7 -0
  96. package/samples/browser-esm-webpack-typescript/src/index.css +5 -0
  97. package/samples/browser-esm-webpack-typescript/src/index.ts +26 -0
  98. package/samples/browser-esm-webpack-typescript/tsconfig.json +16 -0
  99. package/samples/browser-esm-webpack-typescript/webpack.config.js +44 -0
  100. package/samples/browser-esm-webpack-typescript-react/package-lock.json +6183 -0
  101. package/samples/browser-esm-webpack-typescript-react/package.json +21 -0
  102. package/samples/browser-esm-webpack-typescript-react/src/components/Editor.tsx +38 -0
  103. package/samples/browser-esm-webpack-typescript-react/src/index.css +5 -0
  104. package/samples/browser-esm-webpack-typescript-react/src/index.html +10 -0
  105. package/samples/browser-esm-webpack-typescript-react/src/index.tsx +12 -0
  106. package/samples/browser-esm-webpack-typescript-react/tsconfig.json +18 -0
  107. package/samples/browser-esm-webpack-typescript-react/webpack.config.js +59 -0
  108. package/samples/browser-script-editor/index.html +28 -0
  109. package/samples/electron-amd/electron-index.html +37 -0
  110. package/samples/electron-amd/index.html +18 -0
  111. package/samples/electron-amd/main.js +32 -0
  112. package/samples/electron-amd/package.json +7 -0
  113. package/samples/electron-amd-nodeIntegration/electron-index.html +46 -0
  114. package/samples/electron-amd-nodeIntegration/index.html +18 -0
  115. package/samples/electron-amd-nodeIntegration/main.js +37 -0
  116. package/samples/electron-amd-nodeIntegration/package.json +7 -0
  117. package/samples/electron-esm-webpack/index.js +24 -0
  118. package/samples/electron-esm-webpack/main.js +32 -0
  119. package/samples/electron-esm-webpack/package.json +8 -0
  120. package/samples/electron-esm-webpack/webpack.config.js +29 -0
  121. package/samples/nwjs-amd/index.html +48 -0
  122. package/samples/nwjs-amd-v2/index.html +57 -0
  123. package/samples/package-lock.json +7808 -0
  124. package/samples/package.json +32 -0
  125. package/scripts/ci/env.ts +15 -0
  126. package/scripts/ci/monaco-editor-core-prepare.ts +81 -0
  127. package/scripts/ci/monaco-editor-core.sh +34 -0
  128. package/scripts/ci/monaco-editor-prepare.ts +75 -0
  129. package/scripts/ci/monaco-editor.sh +29 -0
  130. package/scripts/lib/index.ts +95 -0
  131. package/src/basic-languages/_.contribution.ts +80 -0
  132. package/src/basic-languages/abap/abap.contribution.ts +24 -0
  133. package/src/basic-languages/abap/abap.test.ts +360 -0
  134. package/src/basic-languages/abap/abap.ts +1390 -0
  135. package/src/basic-languages/apex/apex.contribution.ts +25 -0
  136. package/src/basic-languages/apex/apex.test.ts +700 -0
  137. package/src/basic-languages/apex/apex.ts +355 -0
  138. package/src/basic-languages/azcli/azcli.contribution.ts +24 -0
  139. package/src/basic-languages/azcli/azcli.test.ts +172 -0
  140. package/src/basic-languages/azcli/azcli.ts +77 -0
  141. package/src/basic-languages/bat/bat.contribution.ts +24 -0
  142. package/src/basic-languages/bat/bat.test.ts +397 -0
  143. package/src/basic-languages/bat/bat.ts +121 -0
  144. package/src/basic-languages/bicep/bicep.contribution.ts +24 -0
  145. package/src/basic-languages/bicep/bicep.test.ts +1063 -0
  146. package/src/basic-languages/bicep/bicep.ts +129 -0
  147. package/src/basic-languages/cameligo/cameligo.contribution.ts +24 -0
  148. package/src/basic-languages/cameligo/cameligo.test.ts +144 -0
  149. package/src/basic-languages/cameligo/cameligo.ts +193 -0
  150. package/src/basic-languages/clojure/clojure.contribution.ts +24 -0
  151. package/src/basic-languages/clojure/clojure.test.ts +943 -0
  152. package/src/basic-languages/clojure/clojure.ts +792 -0
  153. package/src/basic-languages/coffee/coffee.contribution.ts +25 -0
  154. package/src/basic-languages/coffee/coffee.test.ts +2363 -0
  155. package/src/basic-languages/coffee/coffee.ts +258 -0
  156. package/src/basic-languages/cpp/cpp.contribution.ts +38 -0
  157. package/src/basic-languages/cpp/cpp.test.ts +979 -0
  158. package/src/basic-languages/cpp/cpp.ts +416 -0
  159. package/src/basic-languages/csharp/csharp.contribution.ts +24 -0
  160. package/src/basic-languages/csharp/csharp.test.ts +976 -0
  161. package/src/basic-languages/csharp/csharp.ts +352 -0
  162. package/src/basic-languages/csp/csp.contribution.ts +24 -0
  163. package/src/basic-languages/csp/csp.test.ts +8 -0
  164. package/src/basic-languages/csp/csp.ts +58 -0
  165. package/src/basic-languages/css/css.contribution.ts +25 -0
  166. package/src/basic-languages/css/css.test.ts +591 -0
  167. package/src/basic-languages/css/css.ts +215 -0
  168. package/src/basic-languages/cypher/cypher.contribution.ts +24 -0
  169. package/src/basic-languages/cypher/cypher.test.ts +327 -0
  170. package/src/basic-languages/cypher/cypher.ts +274 -0
  171. package/src/basic-languages/dart/dart.contribution.ts +25 -0
  172. package/src/basic-languages/dart/dart.test.ts +558 -0
  173. package/src/basic-languages/dart/dart.ts +305 -0
  174. package/src/basic-languages/dockerfile/dockerfile.contribution.ts +25 -0
  175. package/src/basic-languages/dockerfile/dockerfile.test.ts +238 -0
  176. package/src/basic-languages/dockerfile/dockerfile.ts +145 -0
  177. package/src/basic-languages/ecl/ecl.contribution.ts +24 -0
  178. package/src/basic-languages/ecl/ecl.test.ts +8 -0
  179. package/src/basic-languages/ecl/ecl.ts +481 -0
  180. package/src/basic-languages/elixir/elixir.contribution.ts +24 -0
  181. package/src/basic-languages/elixir/elixir.test.ts +447 -0
  182. package/src/basic-languages/elixir/elixir.ts +656 -0
  183. package/src/basic-languages/flow9/flow9.contribution.ts +24 -0
  184. package/src/basic-languages/flow9/flow9.test.ts +148 -0
  185. package/src/basic-languages/flow9/flow9.ts +160 -0
  186. package/src/basic-languages/freemarker2/freemarker2-angle-bracket.test.ts +3099 -0
  187. package/src/basic-languages/freemarker2/freemarker2-angle-dollar.test.ts +3099 -0
  188. package/src/basic-languages/freemarker2/freemarker2-auto-bracket.test.ts +5358 -0
  189. package/src/basic-languages/freemarker2/freemarker2-auto-dollar.test.ts +5361 -0
  190. package/src/basic-languages/freemarker2/freemarker2-bracket-bracket.test.ts +3086 -0
  191. package/src/basic-languages/freemarker2/freemarker2-bracket-dollar.test.ts +3086 -0
  192. package/src/basic-languages/freemarker2/freemarker2.contribution.ts +111 -0
  193. package/src/basic-languages/freemarker2/freemarker2.ts +1230 -0
  194. package/src/basic-languages/fsharp/fsharp.contribution.ts +24 -0
  195. package/src/basic-languages/fsharp/fsharp.test.ts +491 -0
  196. package/src/basic-languages/fsharp/fsharp.ts +237 -0
  197. package/src/basic-languages/go/go.contribution.ts +24 -0
  198. package/src/basic-languages/go/go.test.ts +1492 -0
  199. package/src/basic-languages/go/go.ts +238 -0
  200. package/src/basic-languages/graphql/graphql.contribution.ts +25 -0
  201. package/src/basic-languages/graphql/graphql.test.ts +138 -0
  202. package/src/basic-languages/graphql/graphql.ts +174 -0
  203. package/src/basic-languages/handlebars/handlebars.contribution.ts +25 -0
  204. package/src/basic-languages/handlebars/handlebars.test.ts +354 -0
  205. package/src/basic-languages/handlebars/handlebars.ts +432 -0
  206. package/src/basic-languages/hcl/hcl.contribution.ts +24 -0
  207. package/src/basic-languages/hcl/hcl.test.ts +1228 -0
  208. package/src/basic-languages/hcl/hcl.ts +189 -0
  209. package/src/basic-languages/html/html.contribution.ts +25 -0
  210. package/src/basic-languages/html/html.test.ts +743 -0
  211. package/src/basic-languages/html/html.ts +355 -0
  212. package/src/basic-languages/ini/ini.contribution.ts +25 -0
  213. package/src/basic-languages/ini/ini.ts +82 -0
  214. package/src/basic-languages/java/java.contribution.ts +25 -0
  215. package/src/basic-languages/java/java.test.ts +878 -0
  216. package/src/basic-languages/java/java.ts +252 -0
  217. package/src/basic-languages/javascript/javascript.contribution.ts +27 -0
  218. package/src/basic-languages/javascript/javascript.test.ts +924 -0
  219. package/src/basic-languages/javascript/javascript.ts +77 -0
  220. package/src/basic-languages/julia/julia.contribution.ts +24 -0
  221. package/src/basic-languages/julia/julia.test.ts +38 -0
  222. package/src/basic-languages/julia/julia.ts +550 -0
  223. package/src/basic-languages/kotlin/kotlin.contribution.ts +25 -0
  224. package/src/basic-languages/kotlin/kotlin.test.ts +753 -0
  225. package/src/basic-languages/kotlin/kotlin.ts +273 -0
  226. package/src/basic-languages/less/less.contribution.ts +25 -0
  227. package/src/basic-languages/less/less.test.ts +1560 -0
  228. package/src/basic-languages/less/less.ts +198 -0
  229. package/src/basic-languages/lexon/lexon.contribution.ts +24 -0
  230. package/src/basic-languages/lexon/lexon.test.ts +145 -0
  231. package/src/basic-languages/lexon/lexon.ts +179 -0
  232. package/src/basic-languages/liquid/liquid.contribution.ts +25 -0
  233. package/src/basic-languages/liquid/liquid.test.ts +209 -0
  234. package/src/basic-languages/liquid/liquid.ts +251 -0
  235. package/src/basic-languages/lua/lua.contribution.ts +24 -0
  236. package/src/basic-languages/lua/lua.test.ts +86 -0
  237. package/src/basic-languages/lua/lua.ts +178 -0
  238. package/src/basic-languages/m3/m3.contribution.ts +24 -0
  239. package/src/basic-languages/m3/m3.test.ts +119 -0
  240. package/src/basic-languages/m3/m3.ts +226 -0
  241. package/src/basic-languages/markdown/markdown.contribution.ts +24 -0
  242. package/src/basic-languages/markdown/markdown.test.ts +95 -0
  243. package/src/basic-languages/markdown/markdown.ts +256 -0
  244. package/src/basic-languages/mdx/mdx.contribution.ts +24 -0
  245. package/src/basic-languages/mdx/mdx.test.ts +171 -0
  246. package/src/basic-languages/mdx/mdx.ts +163 -0
  247. package/src/basic-languages/mips/mips.contribution.ts +25 -0
  248. package/src/basic-languages/mips/mips.test.ts +239 -0
  249. package/src/basic-languages/mips/mips.ts +223 -0
  250. package/src/basic-languages/monaco.contribution.ts +87 -0
  251. package/src/basic-languages/msdax/msdax.contribution.ts +24 -0
  252. package/src/basic-languages/msdax/msdax.test.ts +444 -0
  253. package/src/basic-languages/msdax/msdax.ts +382 -0
  254. package/src/basic-languages/mysql/keywords.js +32 -0
  255. package/src/basic-languages/mysql/keywords.mysql.txt +750 -0
  256. package/src/basic-languages/mysql/mysql.contribution.ts +24 -0
  257. package/src/basic-languages/mysql/mysql.test.ts +561 -0
  258. package/src/basic-languages/mysql/mysql.ts +885 -0
  259. package/src/basic-languages/objective-c/objective-c.contribution.ts +24 -0
  260. package/src/basic-languages/objective-c/objective-c.test.ts +368 -0
  261. package/src/basic-languages/objective-c/objective-c.ts +219 -0
  262. package/src/basic-languages/pascal/pascal.contribution.ts +25 -0
  263. package/src/basic-languages/pascal/pascal.test.ts +151 -0
  264. package/src/basic-languages/pascal/pascal.ts +270 -0
  265. package/src/basic-languages/pascaligo/pascaligo.contribution.ts +24 -0
  266. package/src/basic-languages/pascaligo/pascaligo.test.ts +143 -0
  267. package/src/basic-languages/pascaligo/pascaligo.ts +183 -0
  268. package/src/basic-languages/pebble/pebble.contribution.ts +24 -0
  269. package/src/basic-languages/pebble/pebble.test.ts +178 -0
  270. package/src/basic-languages/pebble/pebble.ts +457 -0
  271. package/src/basic-languages/perl/perl.contribution.ts +24 -0
  272. package/src/basic-languages/perl/perl.test.ts +475 -0
  273. package/src/basic-languages/perl/perl.ts +664 -0
  274. package/src/basic-languages/pgsql/keywords.js +30 -0
  275. package/src/basic-languages/pgsql/keywords.postgresql.txt +827 -0
  276. package/src/basic-languages/pgsql/pgsql.contribution.ts +24 -0
  277. package/src/basic-languages/pgsql/pgsql.test.ts +595 -0
  278. package/src/basic-languages/pgsql/pgsql.ts +858 -0
  279. package/src/basic-languages/php/php.contribution.ts +25 -0
  280. package/src/basic-languages/php/php.test.ts +2409 -0
  281. package/src/basic-languages/php/php.ts +636 -0
  282. package/src/basic-languages/pla/pla.contribution.ts +23 -0
  283. package/src/basic-languages/pla/pla.test.ts +598 -0
  284. package/src/basic-languages/pla/pla.ts +157 -0
  285. package/src/basic-languages/postiats/postiats.contribution.ts +24 -0
  286. package/src/basic-languages/postiats/postiats.test.ts +1050 -0
  287. package/src/basic-languages/postiats/postiats.ts +748 -0
  288. package/src/basic-languages/powerquery/powerquery.contribution.ts +24 -0
  289. package/src/basic-languages/powerquery/powerquery.test.ts +416 -0
  290. package/src/basic-languages/powerquery/powerquery.ts +917 -0
  291. package/src/basic-languages/powershell/powershell.contribution.ts +24 -0
  292. package/src/basic-languages/powershell/powershell.test.ts +884 -0
  293. package/src/basic-languages/powershell/powershell.ts +263 -0
  294. package/src/basic-languages/protobuf/protobuf.contribution.ts +24 -0
  295. package/src/basic-languages/protobuf/protobuf.test.ts +2073 -0
  296. package/src/basic-languages/protobuf/protobuf.ts +463 -0
  297. package/src/basic-languages/pug/pug.contribution.ts +24 -0
  298. package/src/basic-languages/pug/pug.test.ts +473 -0
  299. package/src/basic-languages/pug/pug.ts +434 -0
  300. package/src/basic-languages/python/python.contribution.ts +25 -0
  301. package/src/basic-languages/python/python.test.ts +257 -0
  302. package/src/basic-languages/python/python.ts +296 -0
  303. package/src/basic-languages/qsharp/qsharp.contribution.ts +24 -0
  304. package/src/basic-languages/qsharp/qsharp.test.ts +186 -0
  305. package/src/basic-languages/qsharp/qsharp.ts +325 -0
  306. package/src/basic-languages/r/r.contribution.ts +24 -0
  307. package/src/basic-languages/r/r.test.ts +600 -0
  308. package/src/basic-languages/r/r.ts +263 -0
  309. package/src/basic-languages/razor/razor.contribution.ts +25 -0
  310. package/src/basic-languages/razor/razor.test.ts +175 -0
  311. package/src/basic-languages/razor/razor.ts +571 -0
  312. package/src/basic-languages/redis/redis.contribution.ts +24 -0
  313. package/src/basic-languages/redis/redis.test.ts +306 -0
  314. package/src/basic-languages/redis/redis.ts +309 -0
  315. package/src/basic-languages/redshift/redshift.contribution.ts +24 -0
  316. package/src/basic-languages/redshift/redshift.test.ts +595 -0
  317. package/src/basic-languages/redshift/redshift.ts +815 -0
  318. package/src/basic-languages/restructuredtext/restructuredtext.contribution.ts +24 -0
  319. package/src/basic-languages/restructuredtext/restructuredtext.test.ts +454 -0
  320. package/src/basic-languages/restructuredtext/restructuredtext.ts +198 -0
  321. package/src/basic-languages/ruby/ruby.contribution.ts +25 -0
  322. package/src/basic-languages/ruby/ruby.test.ts +158 -0
  323. package/src/basic-languages/ruby/ruby.ts +590 -0
  324. package/src/basic-languages/rust/rust.contribution.ts +24 -0
  325. package/src/basic-languages/rust/rust.test.ts +208 -0
  326. package/src/basic-languages/rust/rust.ts +361 -0
  327. package/src/basic-languages/sb/sb.contribution.ts +24 -0
  328. package/src/basic-languages/sb/sb.test.ts +320 -0
  329. package/src/basic-languages/sb/sb.ts +134 -0
  330. package/src/basic-languages/scala/scala.contribution.ts +25 -0
  331. package/src/basic-languages/scala/scala.test.ts +727 -0
  332. package/src/basic-languages/scala/scala.ts +413 -0
  333. package/src/basic-languages/scheme/scheme.contribution.ts +24 -0
  334. package/src/basic-languages/scheme/scheme.test.ts +89 -0
  335. package/src/basic-languages/scheme/scheme.ts +128 -0
  336. package/src/basic-languages/scss/scss.contribution.ts +25 -0
  337. package/src/basic-languages/scss/scss.test.ts +2422 -0
  338. package/src/basic-languages/scss/scss.ts +284 -0
  339. package/src/basic-languages/shell/shell.contribution.ts +24 -0
  340. package/src/basic-languages/shell/shell.test.ts +345 -0
  341. package/src/basic-languages/shell/shell.ts +246 -0
  342. package/src/basic-languages/solidity/solidity.contribution.ts +24 -0
  343. package/src/basic-languages/solidity/solidity.test.ts +272 -0
  344. package/src/basic-languages/solidity/solidity.ts +1388 -0
  345. package/src/basic-languages/sophia/sophia.contribution.ts +24 -0
  346. package/src/basic-languages/sophia/sophia.test.ts +302 -0
  347. package/src/basic-languages/sophia/sophia.ts +220 -0
  348. package/src/basic-languages/sparql/sparql.contribution.ts +24 -0
  349. package/src/basic-languages/sparql/sparql.test.ts +187 -0
  350. package/src/basic-languages/sparql/sparql.ts +219 -0
  351. package/src/basic-languages/sql/keywords.js +612 -0
  352. package/src/basic-languages/sql/sql.contribution.ts +24 -0
  353. package/src/basic-languages/sql/sql.test.ts +692 -0
  354. package/src/basic-languages/sql/sql.ts +860 -0
  355. package/src/basic-languages/st/st.contribution.ts +24 -0
  356. package/src/basic-languages/st/st.test.ts +139 -0
  357. package/src/basic-languages/st/st.ts +441 -0
  358. package/src/basic-languages/swift/swift.contribution.ts +25 -0
  359. package/src/basic-languages/swift/swift.test.ts +254 -0
  360. package/src/basic-languages/swift/swift.ts +335 -0
  361. package/src/basic-languages/systemverilog/systemverilog.contribution.ts +39 -0
  362. package/src/basic-languages/systemverilog/systemverilog.test.ts +1267 -0
  363. package/src/basic-languages/systemverilog/systemverilog.ts +606 -0
  364. package/src/basic-languages/tcl/tcl.contribution.ts +24 -0
  365. package/src/basic-languages/tcl/tcl.test.ts +107 -0
  366. package/src/basic-languages/tcl/tcl.ts +259 -0
  367. package/src/basic-languages/test/testRunner.ts +63 -0
  368. package/src/basic-languages/twig/twig.contribution.ts +25 -0
  369. package/src/basic-languages/twig/twig.test.ts +1047 -0
  370. package/src/basic-languages/twig/twig.ts +417 -0
  371. package/src/basic-languages/typescript/typescript.contribution.ts +25 -0
  372. package/src/basic-languages/typescript/typescript.test.ts +973 -0
  373. package/src/basic-languages/typescript/typescript.ts +364 -0
  374. package/src/basic-languages/typespec/typespec.contribution.ts +24 -0
  375. package/src/basic-languages/typespec/typespec.test.ts +500 -0
  376. package/src/basic-languages/typespec/typespec.ts +130 -0
  377. package/src/basic-languages/vb/vb.contribution.ts +24 -0
  378. package/src/basic-languages/vb/vb.test.ts +598 -0
  379. package/src/basic-languages/vb/vb.ts +394 -0
  380. package/src/basic-languages/wgsl/wgsl.contribution.ts +24 -0
  381. package/src/basic-languages/wgsl/wgsl.test.ts +3915 -0
  382. package/src/basic-languages/wgsl/wgsl.ts +485 -0
  383. package/src/basic-languages/xml/xml.contribution.ts +44 -0
  384. package/src/basic-languages/xml/xml.test.ts +706 -0
  385. package/src/basic-languages/xml/xml.ts +106 -0
  386. package/src/basic-languages/yaml/yaml.contribution.ts +25 -0
  387. package/src/basic-languages/yaml/yaml.test.ts +670 -0
  388. package/src/basic-languages/yaml/yaml.ts +236 -0
  389. package/src/fillers/editor.api.d.ts +4 -0
  390. package/src/fillers/monaco-editor-core-amd.ts +11 -0
  391. package/src/fillers/monaco-editor-core.ts +6 -0
  392. package/src/language/common/lspLanguageFeatures.ts +1027 -0
  393. package/src/language/css/css.worker.ts +14 -0
  394. package/src/language/css/cssMode.ts +145 -0
  395. package/src/language/css/cssWorker.ts +239 -0
  396. package/src/language/css/monaco.contribution.ts +362 -0
  397. package/src/language/css/workerManager.ts +90 -0
  398. package/src/language/html/html.worker.ts +14 -0
  399. package/src/language/html/htmlMode.ts +171 -0
  400. package/src/language/html/htmlWorker.ts +164 -0
  401. package/src/language/html/monaco.contribution.ts +329 -0
  402. package/src/language/html/workerManager.ts +90 -0
  403. package/src/language/json/json.worker.ts +14 -0
  404. package/src/language/json/jsonMode.ts +185 -0
  405. package/src/language/json/jsonWorker.ts +235 -0
  406. package/src/language/json/monaco.contribution.ts +372 -0
  407. package/src/language/json/tokenization.ts +273 -0
  408. package/src/language/json/workerManager.ts +91 -0
  409. package/src/language/typescript/languageFeatures.ts +1269 -0
  410. package/src/language/typescript/lib/editor.worker.d.ts +8 -0
  411. package/src/language/typescript/lib/lib.index.ts +97 -0
  412. package/src/language/typescript/lib/lib.ts +97 -0
  413. package/src/language/typescript/lib/typescriptServices.d.ts +11717 -0
  414. package/src/language/typescript/lib/typescriptServices.js +190876 -0
  415. package/src/language/typescript/lib/typescriptServicesMetadata.ts +5 -0
  416. package/src/language/typescript/monaco.contribution.ts +815 -0
  417. package/src/language/typescript/ts.worker.ts +19 -0
  418. package/src/language/typescript/tsMode.ts +176 -0
  419. package/src/language/typescript/tsWorker.ts +525 -0
  420. package/src/language/typescript/workerManager.ts +101 -0
  421. package/src/nls-fix.js +39 -0
  422. package/src/tsconfig.json +14 -0
  423. package/test/manual/cross-origin.html +26 -0
  424. package/test/manual/dev-setup.js +218 -0
  425. package/test/manual/diff.html +20 -0
  426. package/test/manual/diff.js +451 -0
  427. package/test/manual/iframe-inner.html +29 -0
  428. package/test/manual/iframe.html +23 -0
  429. package/test/manual/index.css +14 -0
  430. package/test/manual/index.html +44 -0
  431. package/test/manual/index.js +421 -0
  432. package/test/manual/mouse-fixed.html +31 -0
  433. package/test/manual/mouse-scrollable-body.html +286 -0
  434. package/test/manual/mouse-scrollable-element.html +204 -0
  435. package/test/manual/samples/run-editor-failing-js.txt +44 -0
  436. package/test/manual/samples/run-editor-intellisense-js.txt +33 -0
  437. package/test/manual/samples/run-editor-jquery-min-js.txt +30 -0
  438. package/test/manual/samples/run-editor-korean.txt +10 -0
  439. package/test/manual/samples/run-editor-sample-big-css.txt +1 -0
  440. package/test/manual/samples/run-editor-sample-bom-cs.txt +493 -0
  441. package/test/manual/samples/run-editor-sample-cr-ps1.txt +12 -0
  442. package/test/manual/samples/run-editor-sample-dynamic.txt +50 -0
  443. package/test/manual/samples/run-editor-sample-f12-css.txt +31764 -0
  444. package/test/manual/samples/run-editor-sample-html.txt +23 -0
  445. package/test/manual/samples/run-editor-sample-js.txt +222 -0
  446. package/test/manual/samples/run-editor-sample-msn-js.txt +1 -0
  447. package/test/manual/samples.js +287 -0
  448. package/test/manual/shadow-dom.html +56 -0
  449. package/test/manual/transform.html +29 -0
  450. package/test/manual/typescript/custom-worker.html +210 -0
  451. package/test/manual/typescript/custom-worker.js +59 -0
  452. package/test/manual/typescript/index.html +179 -0
  453. package/test/smoke/amd/index.html +21 -0
  454. package/test/smoke/common.js +11 -0
  455. package/test/smoke/esbuild/index.html +11 -0
  456. package/test/smoke/esbuild/index.js +26 -0
  457. package/test/smoke/package-esbuild.ts +60 -0
  458. package/test/smoke/package-vite.ts +19 -0
  459. package/test/smoke/package-webpack.ts +56 -0
  460. package/test/smoke/parcel/index.html +11 -0
  461. package/test/smoke/parcel/index.js +41 -0
  462. package/test/smoke/parcel/package.json +6 -0
  463. package/test/smoke/runner.js +94 -0
  464. package/test/smoke/smoke.test.js +215 -0
  465. package/test/smoke/vite/index.html +10 -0
  466. package/test/smoke/vite/index.js +31 -0
  467. package/test/smoke/webpack/index.html +10 -0
  468. package/test/smoke/webpack/index.js +4 -0
  469. package/test/unit/all.js +70 -0
  470. package/test/unit/setup.js +34 -0
  471. package/webpack-plugin/LICENSE +21 -0
  472. package/webpack-plugin/README.md +116 -0
  473. package/webpack-plugin/package-lock.json +3132 -0
  474. package/webpack-plugin/package.json +45 -0
  475. package/webpack-plugin/tsconfig.json +11 -0
  476. package/website/.prettierrc.json +6 -0
  477. package/website/index/samples/sample.mdx.txt +92 -0
  478. package/website/package.json +60 -0
  479. package/website/scripts/check-playground-samples-js.ts +58 -0
  480. package/website/src/monaco-loader.ts +111 -0
  481. package/website/src/runner/debug.ts +75 -0
  482. package/website/src/runner/index.ts +104 -0
  483. package/website/src/runner/style.scss +35 -0
  484. package/website/src/shared.ts +37 -0
  485. package/website/src/tsconfig.json +19 -0
  486. package/website/src/types.d.ts +13 -0
  487. package/website/src/website/bootstrap.scss +6 -0
  488. package/website/src/website/code-oss.svg +1 -0
  489. package/website/src/website/components/Loader.tsx +40 -0
  490. package/website/src/website/components/Nav.tsx +75 -0
  491. package/website/src/website/components/Page.tsx +11 -0
  492. package/website/src/website/components/Radio.tsx +23 -0
  493. package/website/src/website/components/Select.tsx +75 -0
  494. package/website/src/website/components/TextBox.tsx +21 -0
  495. package/website/src/website/components/bootstrap.tsx +32 -0
  496. package/website/src/website/components/monaco/MonacoEditor.tsx +275 -0
  497. package/website/src/website/components/monaco/MonacoLoader.tsx +39 -0
  498. package/website/src/website/data/diff-sample/modified.txt +212 -0
  499. package/website/src/website/data/diff-sample/original.txt +215 -0
  500. package/website/src/website/data/home-samples/sample.abap.txt +29 -0
  501. package/website/src/website/data/home-samples/sample.aes.txt +38 -0
  502. package/website/src/website/data/home-samples/sample.apex.txt +7 -0
  503. package/website/src/website/data/home-samples/sample.azcli.txt +5 -0
  504. package/website/src/website/data/home-samples/sample.bat.txt +13 -0
  505. package/website/src/website/data/home-samples/sample.bicep.txt +29 -0
  506. package/website/src/website/data/home-samples/sample.c.txt +3463 -0
  507. package/website/src/website/data/home-samples/sample.cameligo.txt +17 -0
  508. package/website/src/website/data/home-samples/sample.clojure.txt +54 -0
  509. package/website/src/website/data/home-samples/sample.coffeescript.txt +28 -0
  510. package/website/src/website/data/home-samples/sample.cpp.txt +246 -0
  511. package/website/src/website/data/home-samples/sample.csharp.txt +38 -0
  512. package/website/src/website/data/home-samples/sample.csp.txt +1 -0
  513. package/website/src/website/data/home-samples/sample.css.txt +828 -0
  514. package/website/src/website/data/home-samples/sample.cypher.txt +3 -0
  515. package/website/src/website/data/home-samples/sample.dart.txt +45 -0
  516. package/website/src/website/data/home-samples/sample.dockerfile.txt +32 -0
  517. package/website/src/website/data/home-samples/sample.ecl.txt +7 -0
  518. package/website/src/website/data/home-samples/sample.elixir.txt +80 -0
  519. package/website/src/website/data/home-samples/sample.flow9.txt +14 -0
  520. package/website/src/website/data/home-samples/sample.freemarker2.tag-angle.interpolation-bracket.txt +61 -0
  521. package/website/src/website/data/home-samples/sample.freemarker2.tag-angle.interpolation-dollar.txt +61 -0
  522. package/website/src/website/data/home-samples/sample.freemarker2.tag-auto.interpolation-bracket.txt +65 -0
  523. package/website/src/website/data/home-samples/sample.freemarker2.tag-auto.interpolation-dollar.txt +65 -0
  524. package/website/src/website/data/home-samples/sample.freemarker2.tag-bracket.interpolation-bracket.txt +61 -0
  525. package/website/src/website/data/home-samples/sample.freemarker2.tag-bracket.interpolation-dollar.txt +61 -0
  526. package/website/src/website/data/home-samples/sample.freemarker2.txt +61 -0
  527. package/website/src/website/data/home-samples/sample.fsharp.txt +8 -0
  528. package/website/src/website/data/home-samples/sample.go.txt +111 -0
  529. package/website/src/website/data/home-samples/sample.graphql.txt +263 -0
  530. package/website/src/website/data/home-samples/sample.handlebars.txt +31 -0
  531. package/website/src/website/data/home-samples/sample.hcl.txt +48 -0
  532. package/website/src/website/data/home-samples/sample.html.txt +100 -0
  533. package/website/src/website/data/home-samples/sample.ini.txt +15 -0
  534. package/website/src/website/data/home-samples/sample.java.txt +54 -0
  535. package/website/src/website/data/home-samples/sample.javascript.txt +214 -0
  536. package/website/src/website/data/home-samples/sample.json.txt +68 -0
  537. package/website/src/website/data/home-samples/sample.julia.txt +23 -0
  538. package/website/src/website/data/home-samples/sample.kotlin.txt +28 -0
  539. package/website/src/website/data/home-samples/sample.less.txt +46 -0
  540. package/website/src/website/data/home-samples/sample.lex.txt +21 -0
  541. package/website/src/website/data/home-samples/sample.lexon.txt +17 -0
  542. package/website/src/website/data/home-samples/sample.liquid.txt +16 -0
  543. package/website/src/website/data/home-samples/sample.lua.txt +12 -0
  544. package/website/src/website/data/home-samples/sample.m3.txt +5 -0
  545. package/website/src/website/data/home-samples/sample.markdown.txt +104 -0
  546. package/website/src/website/data/home-samples/sample.mdx.txt +91 -0
  547. package/website/src/website/data/home-samples/sample.mips.txt +13 -0
  548. package/website/src/website/data/home-samples/sample.msdax.txt +1 -0
  549. package/website/src/website/data/home-samples/sample.mysql.txt +8 -0
  550. package/website/src/website/data/home-samples/sample.objective-c.txt +52 -0
  551. package/website/src/website/data/home-samples/sample.pascal.txt +28 -0
  552. package/website/src/website/data/home-samples/sample.pascaligo.txt +20 -0
  553. package/website/src/website/data/home-samples/sample.pebble.txt +54 -0
  554. package/website/src/website/data/home-samples/sample.perl.txt +18 -0
  555. package/website/src/website/data/home-samples/sample.pgsql.txt +8 -0
  556. package/website/src/website/data/home-samples/sample.php.txt +82 -0
  557. package/website/src/website/data/home-samples/sample.pla.txt +4 -0
  558. package/website/src/website/data/home-samples/sample.plaintext.txt +9 -0
  559. package/website/src/website/data/home-samples/sample.postiats.txt +64 -0
  560. package/website/src/website/data/home-samples/sample.powerquery.txt +12 -0
  561. package/website/src/website/data/home-samples/sample.powershell.txt +30 -0
  562. package/website/src/website/data/home-samples/sample.proto.txt +11 -0
  563. package/website/src/website/data/home-samples/sample.pug.txt +18 -0
  564. package/website/src/website/data/home-samples/sample.python.txt +13 -0
  565. package/website/src/website/data/home-samples/sample.qsharp.txt +45 -0
  566. package/website/src/website/data/home-samples/sample.r.txt +41 -0
  567. package/website/src/website/data/home-samples/sample.razor.txt +46 -0
  568. package/website/src/website/data/home-samples/sample.redis.txt +4 -0
  569. package/website/src/website/data/home-samples/sample.redshift.txt +9 -0
  570. package/website/src/website/data/home-samples/sample.restructuredtext.txt +26 -0
  571. package/website/src/website/data/home-samples/sample.ruby.txt +21 -0
  572. package/website/src/website/data/home-samples/sample.rust.txt +29 -0
  573. package/website/src/website/data/home-samples/sample.sb.txt +10 -0
  574. package/website/src/website/data/home-samples/sample.scala.txt +53 -0
  575. package/website/src/website/data/home-samples/sample.scheme.txt +105 -0
  576. package/website/src/website/data/home-samples/sample.scss.txt +37 -0
  577. package/website/src/website/data/home-samples/sample.shell.txt +42 -0
  578. package/website/src/website/data/home-samples/sample.sol.txt +139 -0
  579. package/website/src/website/data/home-samples/sample.sparql.txt +7 -0
  580. package/website/src/website/data/home-samples/sample.sql.txt +52 -0
  581. package/website/src/website/data/home-samples/sample.st.txt +34 -0
  582. package/website/src/website/data/home-samples/sample.swift.txt +50 -0
  583. package/website/src/website/data/home-samples/sample.systemverilog.txt +28 -0
  584. package/website/src/website/data/home-samples/sample.tcl.txt +18 -0
  585. package/website/src/website/data/home-samples/sample.twig.txt +12 -0
  586. package/website/src/website/data/home-samples/sample.typescript.txt +124 -0
  587. package/website/src/website/data/home-samples/sample.typespec.txt +71 -0
  588. package/website/src/website/data/home-samples/sample.vb.txt +59 -0
  589. package/website/src/website/data/home-samples/sample.verilog.txt +35 -0
  590. package/website/src/website/data/home-samples/sample.wgsl.txt +48 -0
  591. package/website/src/website/data/home-samples/sample.xml.txt +14 -0
  592. package/website/src/website/data/home-samples/sample.yaml.txt +14 -0
  593. package/website/src/website/data/playground-samples/all.js +196 -0
  594. package/website/src/website/data/playground-samples/creating-the-diffeditor/chapter.json +3 -0
  595. package/website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.css +0 -0
  596. package/website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.html +1 -0
  597. package/website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.js +20 -0
  598. package/website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.json +3 -0
  599. package/website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.css +0 -0
  600. package/website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.html +1 -0
  601. package/website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.js +23 -0
  602. package/website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.json +3 -0
  603. package/website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.css +0 -0
  604. package/website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.html +1 -0
  605. package/website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.js +20 -0
  606. package/website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.json +3 -0
  607. package/website/src/website/data/playground-samples/creating-the-editor/chapter.json +4 -0
  608. package/website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.css +0 -0
  609. package/website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.html +1 -0
  610. package/website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.js +19 -0
  611. package/website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.json +3 -0
  612. package/website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.css +0 -0
  613. package/website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.html +1 -0
  614. package/website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.js +13 -0
  615. package/website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.json +3 -0
  616. package/website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.css +0 -0
  617. package/website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.html +1 -0
  618. package/website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.js +10 -0
  619. package/website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.json +4 -0
  620. package/website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.css +0 -0
  621. package/website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.html +35 -0
  622. package/website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.js +4 -0
  623. package/website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.json +3 -0
  624. package/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.css +0 -0
  625. package/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.html +8 -0
  626. package/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.js +35 -0
  627. package/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.json +4 -0
  628. package/website/src/website/data/playground-samples/customizing-the-appearence/chapter.json +3 -0
  629. package/website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.css +0 -0
  630. package/website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.html +1 -0
  631. package/website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.js +150 -0
  632. package/website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.json +3 -0
  633. package/website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.css +13 -0
  634. package/website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.html +1 -0
  635. package/website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.js +32 -0
  636. package/website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.json +3 -0
  637. package/website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.css +0 -0
  638. package/website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.html +1 -0
  639. package/website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.js +40 -0
  640. package/website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.json +3 -0
  641. package/website/src/website/data/playground-samples/extending-language-services/chapter.json +3 -0
  642. package/website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.css +0 -0
  643. package/website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.html +1 -0
  644. package/website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.js +39 -0
  645. package/website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.json +3 -0
  646. package/website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.css +0 -0
  647. package/website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.html +1 -0
  648. package/website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.js +71 -0
  649. package/website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.json +3 -0
  650. package/website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.css +0 -0
  651. package/website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.html +1 -0
  652. package/website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.js +69 -0
  653. package/website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.json +3 -0
  654. package/website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.css +0 -0
  655. package/website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.html +1 -0
  656. package/website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.js +46 -0
  657. package/website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.json +3 -0
  658. package/website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.css +0 -0
  659. package/website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.html +1 -0
  660. package/website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.js +42 -0
  661. package/website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.json +3 -0
  662. package/website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.css +0 -0
  663. package/website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.html +1 -0
  664. package/website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.js +137 -0
  665. package/website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.json +3 -0
  666. package/website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.css +0 -0
  667. package/website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.html +1 -0
  668. package/website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.js +74 -0
  669. package/website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.json +3 -0
  670. package/website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.css +0 -0
  671. package/website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.html +1 -0
  672. package/website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.js +62 -0
  673. package/website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.json +3 -0
  674. package/website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.css +0 -0
  675. package/website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.html +1 -0
  676. package/website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.js +47 -0
  677. package/website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.json +3 -0
  678. package/website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.css +0 -0
  679. package/website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.html +1 -0
  680. package/website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.js +50 -0
  681. package/website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.json +3 -0
  682. package/website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.css +0 -0
  683. package/website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.html +1 -0
  684. package/website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.js +168 -0
  685. package/website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.json +3 -0
  686. package/website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.css +0 -0
  687. package/website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.html +1 -0
  688. package/website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.js +480 -0
  689. package/website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.json +3 -0
  690. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.css +0 -0
  691. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.html +1 -0
  692. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.js +43 -0
  693. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.json +3 -0
  694. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.css +0 -0
  695. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.html +1 -0
  696. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.js +49 -0
  697. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.json +3 -0
  698. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.css +0 -0
  699. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.html +1 -0
  700. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.js +52 -0
  701. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.json +3 -0
  702. package/website/src/website/data/playground-samples/interacting-with-the-editor/chapter.json +3 -0
  703. package/website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.css +0 -0
  704. package/website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.html +1 -0
  705. package/website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.js +37 -0
  706. package/website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.json +3 -0
  707. package/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.css +13 -0
  708. package/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.html +1 -0
  709. package/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.js +30 -0
  710. package/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.json +3 -0
  711. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.css +0 -0
  712. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.html +1 -0
  713. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.js +11 -0
  714. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.json +3 -0
  715. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.css +6 -0
  716. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.html +5 -0
  717. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.js +114 -0
  718. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.json +3 -0
  719. package/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.css +7 -0
  720. package/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.html +1 -0
  721. package/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.js +30 -0
  722. package/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.json +3 -0
  723. package/website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.css +0 -0
  724. package/website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.html +1 -0
  725. package/website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.js +41 -0
  726. package/website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.json +3 -0
  727. package/website/src/website/index.tsx +10 -0
  728. package/website/src/website/monaco-loader-chunk.ts +15 -0
  729. package/website/src/website/monacoEditorVersion.ts +8 -0
  730. package/website/src/website/pages/App.tsx +21 -0
  731. package/website/src/website/pages/DocsPage.tsx +103 -0
  732. package/website/src/website/pages/MonarchPage.tsx +16 -0
  733. package/website/src/website/pages/home/Home.tsx +249 -0
  734. package/website/src/website/pages/playground/BisectModel.ts +161 -0
  735. package/website/src/website/pages/playground/LocationModel.ts +216 -0
  736. package/website/src/website/pages/playground/PlaygroundModel.ts +355 -0
  737. package/website/src/website/pages/playground/PlaygroundPage.tsx +31 -0
  738. package/website/src/website/pages/playground/PlaygroundPageContent.tsx +587 -0
  739. package/website/src/website/pages/playground/Preview.tsx +129 -0
  740. package/website/src/website/pages/playground/SettingsDialog.tsx +412 -0
  741. package/website/src/website/pages/playground/SettingsModel.ts +198 -0
  742. package/website/src/website/pages/playground/Source.ts +107 -0
  743. package/website/src/website/pages/playground/getNpmVersionsSync.ts +450 -0
  744. package/website/src/website/pages/playground/playgroundExamples.tsx +88 -0
  745. package/website/src/website/pages/playground/utils.ts +28 -0
  746. package/website/src/website/pages/routes.ts +28 -0
  747. package/website/src/website/style.scss +96 -0
  748. package/website/src/website/utils/Debouncer.ts +28 -0
  749. package/website/src/website/utils/ObservableHistory.ts +89 -0
  750. package/website/src/website/utils/ObservablePromise.ts +49 -0
  751. package/website/src/website/utils/hotComponent.tsx +49 -0
  752. package/website/src/website/utils/lzmaCompressor.ts +39 -0
  753. package/website/src/website/utils/ref.ts +39 -0
  754. package/website/src/website/utils/types.d.ts +28 -0
  755. package/website/src/website/utils/utils.ts +58 -0
  756. package/website/static/monarch/monarch-34px.png +0 -0
  757. package/website/static/monarch/monarch.css +297 -0
  758. package/website/static/monarch/monarch.js +178 -0
  759. package/website/static/monarch-static.html +5345 -0
  760. package/website/tsconfig.json +16 -0
  761. package/website/tslint.json +6 -0
  762. package/website/typedoc/tsconfig.json +8 -0
  763. package/website/typedoc/typedoc.json +11 -0
  764. package/website/vscode-web-editors.tgz +0 -0
  765. package/website/webpack.config.ts +151 -0
  766. package/website/yarn.lock +3612 -0
@@ -0,0 +1,19 @@
1
+ // Through the options literal, the behaviour of the editor can be easily customized.
2
+ // Here are a few examples of config options that can be passed to the editor.
3
+ // You can also call editor.updateOptions at any time to change the options.
4
+
5
+ var editor = monaco.editor.create(document.getElementById("container"), {
6
+ value: "// First line\nfunction hello() {\n\talert('Hello world!');\n}\n// Last line",
7
+ language: "javascript",
8
+
9
+ lineNumbers: "off",
10
+ roundedSelection: false,
11
+ scrollBeyondLastLine: false,
12
+ readOnly: false,
13
+ theme: "vs-dark",
14
+ });
15
+ setTimeout(function () {
16
+ editor.updateOptions({
17
+ lineNumbers: "on",
18
+ });
19
+ }, 2000);
@@ -0,0 +1 @@
1
+ <div id="container" style="height: 100%"></div>
@@ -0,0 +1,13 @@
1
+ var jsCode =
2
+ '// jqeuery excerpt:\n// 1 2 3 4\n//34567890123456789012345678901234567890\n/*!\r\n * Sizzle CSS Selector Engine v2.3.0\r\n * https://sizzlejs.com/\r\n *\r\n * Copyright jQuery Foundation and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n *\r\n * Date: 2016-01-04\r\n */\r\n(function( window ) {\r\n\r\nvar i,\r\n\tsupport,\r\n\tExpr,\r\n\tgetText,\r\n\tisXML,\r\n\ttokenize,\r\n\tcompile,\r\n\tselect,\r\n\toutermostContext,\r\n\tsortInput,\r\n\thasDuplicate,\r\n\r\n\t// Local document vars\r\n\tsetDocument,\r\n\tdocument,\r\n\tdocElem,\r\n\tdocumentIsHTML,\r\n\trbuggyQSA,\r\n\trbuggyMatches,\r\n\tmatches,\r\n\tcontains,\r\n\r\n\t// Instance-specific data\r\n\texpando = "sizzle" + 1 * new Date(),\r\n\tpreferredDoc = window.document,\r\n\tdirruns = 0,\r\n\tdone = 0,\r\n\tclassCache = createCache(),\r\n\ttokenCache = createCache(),\r\n\tcompilerCache = createCache(),\r\n\tsortOrder = function( a, b ) {\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t}\r\n\t\treturn 0;\r\n\t},\r\n\r\n\t// Instance methods\r\n\thasOwn = ({}).hasOwnProperty,\r\n\tarr = [],\r\n\tpop = arr.pop,\r\n\tpush_native = arr.push,\r\n\tpush = arr.push,\r\n\tslice = arr.slice,\r\n\t// Use a stripped-down indexOf as it\'s faster than native\r\n\t// https://jsperf.com/thor-indexof-vs-for/5\r\n\tindexOf = function( list, elem ) {\r\n\t\tvar i = 0,\r\n\t\t\tlen = list.length;\r\n\t\tfor ( ; i < len; i++ ) {\r\n\t\t\tif ( list[i] === elem ) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t},\r\n\r\n\tbooleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",\r\n\r\n\t// Regular expressions\r\n\r\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\r\n\twhitespace = "[\\\\x20\\\\t\\\\r\\\\n\\\\f]",\r\n\r\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\r\n\tidentifier = "(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+",\r\n\r\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\r\n\tattributes = "\\\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +\r\n\t\t// Operator (capture 2)\r\n\t\t"*([*^$|!~]?=)" + whitespace +\r\n\t\t// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"\r\n\t\t"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|(" + identifier + "))|)" + whitespace +\r\n\t\t"*\\\\]",\r\n\r\n\tpseudos = ":(" + identifier + ")(?:\\\\((" +\r\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\r\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\r\n\t\t"(\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|" +\r\n\t\t// 2. simple (capture 6)\r\n\t\t"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|" + attributes + ")*)|" +\r\n\t\t// 3. anything else (capture 2)\r\n\t\t".*" +\r\n\t\t")\\\\)|)",\r\n\r\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\r\n\trwhitespace = new RegExp( whitespace + "+", "g" ),\r\n\trtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)" + whitespace + "+$", "g" ),\r\n\r\n\trcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),\r\n\trcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),\r\n\r\n\trattributeQuotes = new RegExp( "=" + whitespace + "*([^\\\\]\'\\"]*?)" + whitespace + "*\\\\]", "g" ),\r\n\r\n\trpseudo = new RegExp( pseudos ),\r\n\tridentifier = new RegExp( "^" + identifier + "$" ),\r\n\r\n\tmatchExpr = {\r\n\t\t"ID": new RegExp( "^#(" + identifier + ")" ),\r\n\t\t"CLASS": new RegExp( "^\\\\.(" + identifier + ")" ),\r\n\t\t"TAG": new RegExp( "^(" + identifier + "|[*])" ),\r\n\t\t"ATTR": new RegExp( "^" + attributes ),\r\n\t\t"PSEUDO": new RegExp( "^" + pseudos ),\r\n\t\t"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(" + whitespace +\r\n\t\t\t"*(even|odd|(([+-]|)(\\\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +\r\n\t\t\t"*(\\\\d+)|))" + whitespace + "*\\\\)|)", "i" ),\r\n\t\t"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),\r\n\t\t// For use in libraries implementing .is()\r\n\t\t// We use this for POS matching in `select`\r\n\t\t"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(" +\r\n\t\t\twhitespace + "*((?:-\\\\d)?\\\\d*)" + whitespace + "*\\\\)|)(?=[^-]|$)", "i" )\r\n\t},\r\n\r\n\trinputs = /^(?:input|select|textarea|button)$/i,\r\n\trheader = /^h\\d$/i,\r\n\r\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\r\n\r\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\r\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\r\n\r\n\trsibling = /[+~]/,\r\n\r\n\t// CSS escapes\r\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\r\n\trunescape = new RegExp( "\\\\\\\\([\\\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),\r\n\tfunescape = function( _, escaped, escapedWhitespace ) {\r\n\t\tvar high = "0x" + escaped - 0x10000;\r\n\t\t// NaN means non-codepoint\r\n\t\t// Support: Firefox<24\r\n\t\t// Workaround erroneous numeric interpretation of +"0x"\r\n\t\treturn high !== high || escapedWhitespace ?\r\n\t\t\tescaped :\r\n\t\t\thigh < 0 ?\r\n\t\t\t\t// BMP codepoint\r\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\r\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\r\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\r\n\t},\r\n\r\n\t// CSS string/identifier serialization\r\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\r\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g,\r\n\tfcssescape = function( ch, asCodePoint ) {\r\n\t\tif ( asCodePoint ) {\r\n\r\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\r\n\t\t\tif ( ch === "\\0" ) {\r\n\t\t\t\treturn "\\uFFFD";\r\n\t\t\t}\r\n\r\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\r\n\t\t\treturn ch.slice( 0, -1 ) + "\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";\r\n\t\t}\r\n\r\n\t\t// Other potentially-special ASCII characters get backslash-escaped\r\n\t\treturn "\\\\" + ch;\r\n\t},\r\n\r\n\t// Used for iframes\r\n\t// See setDocument()\r\n\t// Removing the function wrapper causes a "Permission Denied"\r\n\t// error in IE\r\n\tunloadHandler = function() {\r\n\t\tsetDocument();\r\n\t},\r\n\r\n\tdisabledAncestor = addCombinator(\r\n\t\tfunction( elem ) {\r\n\t\t\treturn elem.disabled === true;\r\n\t\t},\r\n\t\t{ dir: "parentNode", next: "legend" }\r\n\t);})';
3
+
4
+ var editor = monaco.editor.create(document.getElementById("container"), {
5
+ value: jsCode,
6
+ language: "javascript",
7
+
8
+ wordWrap: "wordWrapColumn",
9
+ wordWrapColumn: 40,
10
+
11
+ // try "same", "indent" or "none"
12
+ wrappingIndent: "indent",
13
+ });
@@ -0,0 +1 @@
1
+ <div id="container" style="height: 100%"></div>
@@ -0,0 +1,10 @@
1
+ const value = /* set from `myEditor.getModel()`: */ `function hello() {
2
+ alert('Hello world!');
3
+ }`;
4
+
5
+ // Hover on each property to see its docs!
6
+ const myEditor = monaco.editor.create(document.getElementById("container"), {
7
+ value,
8
+ language: "javascript",
9
+ automaticLayout: true,
10
+ });
@@ -0,0 +1,4 @@
1
+ {
2
+ "title": "Hello World",
3
+ "sortingKey": 100
4
+ }
@@ -0,0 +1,35 @@
1
+ <pre id="code" data-lang="text/css" style="width: 500px">
2
+ /* Some example CSS */
3
+
4
+ @import url("something.css");
5
+
6
+ body {
7
+ margin: 0;
8
+ padding: 3em 6em;
9
+ font-family: tahoma, arial, sans-serif;
10
+ color: #000;
11
+ }
12
+
13
+ #navigation a {
14
+ font-weight: bold;
15
+ text-decoration: none !important;
16
+ }
17
+
18
+ h1 {
19
+ font-size: 2.5em;
20
+ }
21
+
22
+ h2 {
23
+ font-size: 1.7em;
24
+ }
25
+
26
+ h1:before, h2:before {
27
+ content: "some contents";
28
+ }
29
+
30
+ code {
31
+ font-family: courier, monospace;
32
+ font-size: 80%;
33
+ color: #418A8A;
34
+ }
35
+ </pre>
@@ -0,0 +1,4 @@
1
+ // The colorizeElement-function will read the data-lang-attribute
2
+ // from the element to select the correct language mode. In this
3
+ // sample it is text/css.
4
+ monaco.editor.colorizeElement(document.getElementById("code"), {});
@@ -0,0 +1,3 @@
1
+ {
2
+ "title": "Syntax Highlighting For Html Elements"
3
+ }
@@ -0,0 +1,8 @@
1
+ <template id="editor-template">
2
+ <div
3
+ id="container"
4
+ style="overflow: hidden; width: 100%; height: 100%; position: absolute"
5
+ ></div>
6
+ </template>
7
+
8
+ <code-view-monaco></code-view-monaco>
@@ -0,0 +1,35 @@
1
+ customElements.define(
2
+ "code-view-monaco",
3
+ class CodeViewMonaco extends HTMLElement {
4
+ _monacoEditor;
5
+ /** @type HTMLElement */
6
+ _editor;
7
+
8
+ constructor() {
9
+ super();
10
+
11
+ const shadowRoot = this.attachShadow({ mode: "open" });
12
+
13
+ // Copy over editor styles
14
+ const styles = document.querySelectorAll(
15
+ "link[rel='stylesheet'][data-name^='vs/']"
16
+ );
17
+ for (const style of styles) {
18
+ shadowRoot.appendChild(style.cloneNode(true));
19
+ }
20
+
21
+ const template = /** @type HTMLTemplateElement */ (
22
+ document.getElementById("editor-template")
23
+ );
24
+ shadowRoot.appendChild(template.content.cloneNode(true));
25
+
26
+ this._editor = shadowRoot.querySelector("#container");
27
+ this._monacoEditor = monaco.editor.create(this._editor, {
28
+ automaticLayout: true,
29
+ language: "html",
30
+
31
+ value: `<div>Hello World</div>`,
32
+ });
33
+ }
34
+ }
35
+ );
@@ -0,0 +1,4 @@
1
+ {
2
+ "title": "Web Component",
3
+ "sortingKey": 10000
4
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "title": "Customizing The Appearance"
3
+ }
@@ -0,0 +1 @@
1
+ <div id="container" style="height: 100%"></div>
@@ -0,0 +1,150 @@
1
+ // The editor colors can be customized through CSS or through JS
2
+
3
+ monaco.editor.defineTheme("myTheme", {
4
+ base: "vs",
5
+ inherit: true,
6
+ rules: [],
7
+ colors: {
8
+ "editor.foreground": "#000000",
9
+ "editor.background": "#EDF9FA",
10
+ "editorCursor.foreground": "#8B0000",
11
+ "editor.lineHighlightBackground": "#0000FF20",
12
+ "editorLineNumber.foreground": "#008800",
13
+ "editor.selectionBackground": "#88000030",
14
+ "editor.inactiveSelectionBackground": "#88000015",
15
+ },
16
+ });
17
+ monaco.editor.setTheme("myTheme");
18
+
19
+ monaco.editor.create(document.getElementById("container"), {
20
+ value: "My to-do list:\n* buy milk\n* buy coffee\n* write awesome code",
21
+ language: "text/plain",
22
+ fontFamily: "Arial",
23
+ fontSize: 20,
24
+ });
25
+
26
+ // A list of color names:
27
+ ("foreground"); // Overall foreground color. This color is only used if not overridden by a component.
28
+ ("errorForeground"); // Overall foreground color for error messages. This color is only used if not overridden by a component.
29
+ ("descriptionForeground"); // Foreground color for description text providing additional information, for example for a label.
30
+ ("focusBorder"); // Overall border color for focused elements. This color is only used if not overridden by a component.
31
+ ("contrastBorder"); // An extra border around elements to separate them from others for greater contrast.
32
+ ("contrastActiveBorder"); // An extra border around active elements to separate them from others for greater contrast.
33
+ ("selection.background"); // The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.
34
+ ("textSeparator.foreground"); // Color for text separators.
35
+ ("textLink.foreground"); // Foreground color for links in text.
36
+ ("textLink.activeForeground"); // Foreground color for active links in text.
37
+ ("textPreformat.foreground"); // Foreground color for preformatted text segments.
38
+ ("textBlockQuote.background"); // Background color for block quotes in text.
39
+ ("textBlockQuote.border"); // Border color for block quotes in text.
40
+ ("textCodeBlock.background"); // Background color for code blocks in text.
41
+ ("widget.shadow"); // Shadow color of widgets such as find/replace inside the editor.
42
+ ("input.background"); // Input box background.
43
+ ("input.foreground"); // Input box foreground.
44
+ ("input.border"); // Input box border.
45
+ ("inputOption.activeBorder"); // Border color of activated options in input fields.
46
+ ("input.placeholderForeground"); // Input box foreground color for placeholder text.
47
+ ("inputValidation.infoBackground"); // Input validation background color for information severity.
48
+ ("inputValidation.infoBorder"); // Input validation border color for information severity.
49
+ ("inputValidation.warningBackground"); // Input validation background color for information warning.
50
+ ("inputValidation.warningBorder"); // Input validation border color for warning severity.
51
+ ("inputValidation.errorBackground"); // Input validation background color for error severity.
52
+ ("inputValidation.errorBorder"); // Input validation border color for error severity.
53
+ ("dropdown.background"); // Dropdown background.
54
+ ("dropdown.foreground"); // Dropdown foreground.
55
+ ("dropdown.border"); // Dropdown border.
56
+ ("list.focusBackground"); // List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.
57
+ ("list.focusForeground"); // List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.
58
+ ("list.activeSelectionBackground"); // List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.
59
+ ("list.activeSelectionForeground"); // List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.
60
+ ("list.inactiveSelectionBackground"); // List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.
61
+ ("list.inactiveSelectionForeground"); // List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.
62
+ ("list.hoverBackground"); // List/Tree background when hovering over items using the mouse.
63
+ ("list.hoverForeground"); // List/Tree foreground when hovering over items using the mouse.
64
+ ("list.dropBackground"); // List/Tree drag and drop background when moving items around using the mouse.
65
+ ("list.highlightForeground"); // List/Tree foreground color of the match highlights when searching inside the list/tree.
66
+ ("pickerGroup.foreground"); // Quick picker color for grouping labels.
67
+ ("pickerGroup.border"); // Quick picker color for grouping borders.
68
+ ("button.foreground"); // Button foreground color.
69
+ ("button.background"); // Button background color.
70
+ ("button.hoverBackground"); // Button background color when hovering.
71
+ ("badge.background"); // Badge background color. Badges are small information labels, e.g. for search results count.
72
+ ("badge.foreground"); // Badge foreground color. Badges are small information labels, e.g. for search results count.
73
+ ("scrollbar.shadow"); // Scrollbar shadow to indicate that the view is scrolled.
74
+ ("scrollbarSlider.background"); // Slider background color.
75
+ ("scrollbarSlider.hoverBackground"); // Slider background color when hovering.
76
+ ("scrollbarSlider.activeBackground"); // Slider background color when active.
77
+ ("progressBar.background"); // Background color of the progress bar that can show for long running operations.
78
+ ("editor.background"); // Editor background color.
79
+ ("editor.foreground"); // Editor default foreground color.
80
+ ("editorWidget.background"); // Background color of editor widgets, such as find/replace.
81
+ ("editorWidget.border"); // Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.
82
+ ("editor.selectionBackground"); // Color of the editor selection.
83
+ ("editor.selectionForeground"); // Color of the selected text for high contrast.
84
+ ("editor.inactiveSelectionBackground"); // Color of the selection in an inactive editor.
85
+ ("editor.selectionHighlightBackground"); // Color for regions with the same content as the selection.
86
+ ("editor.findMatchBackground"); // Color of the current search match.
87
+ ("editor.findMatchHighlightBackground"); // Color of the other search matches.
88
+ ("editor.findRangeHighlightBackground"); // Color the range limiting the search.
89
+ ("editor.hoverHighlightBackground"); // Highlight below the word for which a hover is shown.
90
+ ("editorHoverWidget.background"); // Background color of the editor hover.
91
+ ("editorHoverWidget.border"); // Border color of the editor hover.
92
+ ("editorLink.activeForeground"); // Color of active links.
93
+ ("diffEditor.insertedTextBackground"); // Background color for text that got inserted.
94
+ ("diffEditor.removedTextBackground"); // Background color for text that got removed.
95
+ ("diffEditor.insertedTextBorder"); // Outline color for the text that got inserted.
96
+ ("diffEditor.removedTextBorder"); // Outline color for text that got removed.
97
+ ("editorOverviewRuler.currentContentForeground"); // Current overview ruler foreground for inline merge-conflicts.
98
+ ("editorOverviewRuler.incomingContentForeground"); // Incoming overview ruler foreground for inline merge-conflicts.
99
+ ("editorOverviewRuler.commonContentForeground"); // Common ancestor overview ruler foreground for inline merge-conflicts.
100
+ ("editor.lineHighlightBackground"); // Background color for the highlight of line at the cursor position.
101
+ ("editor.lineHighlightBorder"); // Background color for the border around the line at the cursor position.
102
+ ("editor.rangeHighlightBackground"); // Background color of highlighted ranges, like by quick open and find features.
103
+ ("editorCursor.foreground"); // Color of the editor cursor.
104
+ ("editorWhitespace.foreground"); // Color of whitespace characters in the editor.
105
+ ("editorIndentGuide.background"); // Color of the editor indentation guides.
106
+ ("editorLineNumber.foreground"); // Color of editor line numbers.
107
+ ("editorLineNumber.activeForeground"); // Color of editor active line number.
108
+ ("editorRuler.foreground"); // Color of the editor rulers.
109
+ ("editorCodeLens.foreground"); // Foreground color of editor code lenses
110
+ ("editorInlayHint.foreground"); // Foreground color of editor inlay hints
111
+ ("editorInlayHint.background"); // Background color of editor inlay hints
112
+ ("editorBracketMatch.background"); // Background color behind matching brackets
113
+ ("editorBracketMatch.border"); // Color for matching brackets boxes
114
+ ("editorOverviewRuler.border"); // Color of the overview ruler border.
115
+ ("editorGutter.background"); // Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.
116
+ ("editorError.foreground"); // Foreground color of error squigglies in the editor.
117
+ ("editorError.border"); // Border color of error squigglies in the editor.
118
+ ("editorWarning.foreground"); // Foreground color of warning squigglies in the editor.
119
+ ("editorWarning.border"); // Border color of warning squigglies in the editor.
120
+ ("editorMarkerNavigationError.background"); // Editor marker navigation widget error color.
121
+ ("editorMarkerNavigationWarning.background"); // Editor marker navigation widget warning color.
122
+ ("editorMarkerNavigation.background"); // Editor marker navigation widget background.
123
+ ("editorSuggestWidget.background"); // Background color of the suggest widget.
124
+ ("editorSuggestWidget.border"); // Border color of the suggest widget.
125
+ ("editorSuggestWidget.foreground"); // Foreground color of the suggest widget.
126
+ ("editorSuggestWidget.selectedBackground"); // Background color of the selected entry in the suggest widget.
127
+ ("editorSuggestWidget.highlightForeground"); // Color of the match highlights in the suggest widget.
128
+ ("editor.wordHighlightBackground"); // Background color of a symbol during read-access, like reading a variable.
129
+ ("editor.wordHighlightStrongBackground"); // Background color of a symbol during write-access, like writing to a variable.
130
+ ("peekViewTitle.background"); // Background color of the peek view title area.
131
+ ("peekViewTitleLabel.foreground"); // Color of the peek view title.
132
+ ("peekViewTitleDescription.foreground"); // Color of the peek view title info.
133
+ ("peekView.border"); // Color of the peek view borders and arrow.
134
+ ("peekViewResult.background"); // Background color of the peek view result list.
135
+ ("peekViewResult.lineForeground"); // Foreground color for line nodes in the peek view result list.
136
+ ("peekViewResult.fileForeground"); // Foreground color for file nodes in the peek view result list.
137
+ ("peekViewResult.selectionBackground"); // Background color of the selected entry in the peek view result list.
138
+ ("peekViewResult.selectionForeground"); // Foreground color of the selected entry in the peek view result list.
139
+ ("peekViewEditor.background"); // Background color of the peek view editor.
140
+ ("peekViewEditorGutter.background"); // Background color of the gutter in the peek view editor.
141
+ ("peekViewResult.matchHighlightBackground"); // Match highlight color in the peek view result list.
142
+ ("peekViewEditor.matchHighlightBackground"); // Match highlight color in the peek view editor.
143
+
144
+ /*
145
+ var colors = require('vs/platform/registry/common/platform').Registry.data.get('base.contributions.colors').colorSchema.properties
146
+ Object.keys(colors).forEach(function(key) {
147
+ var val = colors[key];
148
+ console.log( '//' + val.description + '\n' + key);
149
+ })
150
+ */
@@ -0,0 +1,13 @@
1
+ /* Make horizontal scrollbar, decorations overview ruler and vertical scrollbar arrows opaque */
2
+ .monaco-editor .monaco-scrollable-element .scrollbar.horizontal,
3
+ .monaco-editor .decorationsOverviewRuler,
4
+ .monaco-editor
5
+ .monaco-scrollable-element
6
+ .scrollbar.vertical
7
+ .arrow-background {
8
+ background: rgba(230, 230, 230, 255);
9
+ }
10
+ /* Make vertical scrollbar transparent to allow decorations overview ruler to be visible */
11
+ .monaco-editor .monaco-scrollable-element .scrollbar.vertical {
12
+ background: rgba(0, 0, 0, 0);
13
+ }
@@ -0,0 +1 @@
1
+ <div id="container" style="height: 100%"></div>
@@ -0,0 +1,32 @@
1
+ // Remember to check out the CSS too!
2
+ var htmlCode =
3
+ '<html><!--long linelong linelong linelong linelong linelong linelong linelong linelong linelong line-->\n<head>\n <!-- HTML comment -->\n <style type="text/css">\n /* CSS comment */\n </style>\n <script type="javascript">\n // JavaScript comment\n </' +
4
+ "script>\n</head>\n<body></body>\n</html>";
5
+
6
+ monaco.editor.create(document.getElementById("container"), {
7
+ value: htmlCode,
8
+ language: "text/html",
9
+ theme: "vs",
10
+ scrollbar: {
11
+ // Subtle shadows to the left & top. Defaults to true.
12
+ useShadows: false,
13
+
14
+ // Render vertical arrows. Defaults to false.
15
+ verticalHasArrows: true,
16
+ // Render horizontal arrows. Defaults to false.
17
+ horizontalHasArrows: true,
18
+
19
+ // Render vertical scrollbar.
20
+ // Accepted values: 'auto', 'visible', 'hidden'.
21
+ // Defaults to 'auto'
22
+ vertical: "visible",
23
+ // Render horizontal scrollbar.
24
+ // Accepted values: 'auto', 'visible', 'hidden'.
25
+ // Defaults to 'auto'
26
+ horizontal: "visible",
27
+
28
+ verticalScrollbarSize: 17,
29
+ horizontalScrollbarSize: 17,
30
+ arrowSize: 30,
31
+ },
32
+ });
@@ -0,0 +1 @@
1
+ <div id="container" style="height: 100%"></div>
@@ -0,0 +1,40 @@
1
+ // Theme matching (i.e. applying a style to a token) happens in JavaScript.
2
+ // We must therefore register the theme rules in JavaScript.
3
+
4
+ // A custom theme must name its base theme (i.e. 'vs', 'vs-dark' or 'hc-black')
5
+ // It can then choose to inherit the rules from the base theme or not
6
+ // A rule token matching is prefix based: e.g.
7
+ // - string will match a token with type: string, string.double.js or string.html
8
+ // - string.double will match a token with type string.double but will not match string or string.html
9
+
10
+ // !!! Tokens can be inspected using F1 > Developer: Inspect Tokens !!!
11
+
12
+ monaco.editor.defineTheme("myCustomTheme", {
13
+ base: "vs", // can also be vs-dark or hc-black
14
+ inherit: true, // can also be false to completely replace the builtin rules
15
+ rules: [
16
+ {
17
+ token: "comment",
18
+ foreground: "ffa500",
19
+ fontStyle: "italic underline",
20
+ },
21
+ { token: "comment.js", foreground: "008800", fontStyle: "bold" },
22
+ { token: "comment.css", foreground: "0000ff" }, // will inherit fontStyle from `comment` above
23
+ ],
24
+ colors: {
25
+ "editor.foreground": "#000000",
26
+ },
27
+ });
28
+
29
+ monaco.editor.create(document.getElementById("container"), {
30
+ value: getCode(),
31
+ language: "text/html",
32
+ theme: "myCustomTheme",
33
+ });
34
+
35
+ function getCode() {
36
+ return (
37
+ '<html><!-- // !!! Tokens can be inspected using F1 > Developer: Inspect Tokens !!! -->\n<head>\n <!-- HTML comment -->\n <style type="text/css">\n /* CSS comment */\n </style>\n <script type="javascript">\n // JavaScript comment\n </' +
38
+ "script>\n</head>\n<body></body>\n</html>"
39
+ );
40
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "title": "Extending Language Services"
3
+ }
@@ -0,0 +1,39 @@
1
+ var editor = monaco.editor.create(document.getElementById("container"), {
2
+ value: '{\n\t"dependencies": {\n\t\t\n\t}\n}\n',
3
+ language: "json",
4
+ });
5
+
6
+ var commandId = editor.addCommand(
7
+ 0,
8
+ function () {
9
+ // services available in `ctx`
10
+ alert("my command is executing!");
11
+ },
12
+ ""
13
+ );
14
+
15
+ monaco.languages.registerCodeLensProvider("json", {
16
+ provideCodeLenses: function (model, token) {
17
+ return {
18
+ lenses: [
19
+ {
20
+ range: {
21
+ startLineNumber: 1,
22
+ startColumn: 1,
23
+ endLineNumber: 2,
24
+ endColumn: 1,
25
+ },
26
+ id: "First Line",
27
+ command: {
28
+ id: commandId,
29
+ title: "First Line",
30
+ },
31
+ },
32
+ ],
33
+ dispose: () => {},
34
+ };
35
+ },
36
+ resolveCodeLens: function (model, codeLens, token) {
37
+ return codeLens;
38
+ },
39
+ });
@@ -0,0 +1 @@
1
+ <div id="container" style="height: 100%"></div>
@@ -0,0 +1,71 @@
1
+ monaco.languages.register({
2
+ id: "colorLanguage",
3
+ });
4
+
5
+ monaco.editor.create(document.getElementById("container"), {
6
+ value: "red\nblue\ngreen",
7
+ language: "colorLanguage",
8
+ colorDecorators: true,
9
+ });
10
+
11
+ monaco.languages.registerColorProvider("colorLanguage", {
12
+ provideColorPresentations: (model, colorInfo) => {
13
+ var color = colorInfo.color;
14
+ var red256 = Math.round(color.red * 255);
15
+ var green256 = Math.round(color.green * 255);
16
+ var blue256 = Math.round(color.blue * 255);
17
+ var label;
18
+ if (color.alpha === 1) {
19
+ label = "rgb(" + red256 + ", " + green256 + ", " + blue256 + ")";
20
+ } else {
21
+ label =
22
+ "rgba(" +
23
+ red256 +
24
+ ", " +
25
+ green256 +
26
+ ", " +
27
+ blue256 +
28
+ ", " +
29
+ color.alpha +
30
+ ")";
31
+ }
32
+
33
+ return [
34
+ {
35
+ label: label,
36
+ },
37
+ ];
38
+ },
39
+
40
+ provideDocumentColors: () => {
41
+ return [
42
+ {
43
+ color: { red: 1, blue: 0, green: 0, alpha: 1 },
44
+ range: {
45
+ startLineNumber: 1,
46
+ startColumn: 1,
47
+ endLineNumber: 1,
48
+ endColumn: 4,
49
+ },
50
+ },
51
+ {
52
+ color: { red: 0, blue: 1, green: 0, alpha: 1 },
53
+ range: {
54
+ startLineNumber: 2,
55
+ startColumn: 1,
56
+ endLineNumber: 2,
57
+ endColumn: 5,
58
+ },
59
+ },
60
+ {
61
+ color: { red: 0, blue: 0, green: 1, alpha: 1 },
62
+ range: {
63
+ startLineNumber: 3,
64
+ startColumn: 1,
65
+ endLineNumber: 3,
66
+ endColumn: 6,
67
+ },
68
+ },
69
+ ];
70
+ },
71
+ });