monaco-editor-full 0.55.1-full → 0.55.1-full.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +196 -83
  2. package/dev/vs/basic-languages/monaco.contribution.js +18 -18
  3. package/dev/vs/{cssMode-DhKMHRj3.js → cssMode-BI10dqqE.js} +1 -1
  4. package/dev/vs/editor/editor.main.js +1 -1
  5. package/dev/vs/{editor-DIBnF2vM.js → editor-BdQf5OuC.js} +4 -1
  6. package/dev/vs/editor.js +1 -1
  7. package/dev/vs/{freemarker2-CejOmmM0.js → freemarker2-R252rcz7.js} +1 -1
  8. package/dev/vs/{handlebars-CTI8AbNW.js → handlebars-aOU_LDK3.js} +1 -1
  9. package/dev/vs/{html-ELdojt9e.js → html-DopmH9UY.js} +1 -1
  10. package/dev/vs/{htmlMode-TZWHx-9W.js → htmlMode-U43KZg3t.js} +1 -1
  11. package/dev/vs/{index-B6BbYPbd.js → index-edAhY9q3.js} +1 -1
  12. package/dev/vs/index.js +1 -1
  13. package/dev/vs/{javascript-BFEMQrLZ.js → javascript-DjefjLWu.js} +1 -1
  14. package/dev/vs/{jsonMode-D6xKS7Zn.js → jsonMode-CD9PmrZn.js} +1 -1
  15. package/dev/vs/language/css/monaco.contribution.js +1 -1
  16. package/dev/vs/language/html/monaco.contribution.js +1 -1
  17. package/dev/vs/language/json/monaco.contribution.js +1 -1
  18. package/dev/vs/language/typescript/monaco.contribution.js +1 -1
  19. package/dev/vs/{liquid-DiuJNaMD.js → liquid-uhKlujcM.js} +1 -1
  20. package/dev/vs/{lspLanguageFeatures-DJfiDpKo.js → lspLanguageFeatures-CElBQQjP.js} +1 -1
  21. package/dev/vs/{mdx-CSe6VyZs.js → mdx-Dt-NHlcJ.js} +1 -1
  22. package/dev/vs/{monaco.contribution-DnLriG_F.js → monaco.contribution-Bb_bwPfc.js} +2 -2
  23. package/dev/vs/{monaco.contribution-BDawsTgN.js → monaco.contribution-BkTWBQnD.js} +2 -2
  24. package/dev/vs/{monaco.contribution-BeG0esy9.js → monaco.contribution-DMd-tGrU.js} +2 -2
  25. package/dev/vs/{monaco.contribution--xL3D3ub.js → monaco.contribution-rPRCxtXO.js} +2 -2
  26. package/dev/vs/nls/lang/cs.js +1 -1
  27. package/dev/vs/nls/lang/de.js +1 -1
  28. package/dev/vs/nls/lang/es.js +1 -1
  29. package/dev/vs/nls/lang/fr.js +1 -1
  30. package/dev/vs/nls/lang/it.js +1 -1
  31. package/dev/vs/nls/lang/ja.js +1 -1
  32. package/dev/vs/nls/lang/ko.js +1 -1
  33. package/dev/vs/nls/lang/pl.js +1 -1
  34. package/dev/vs/nls/lang/pt-br.js +1 -1
  35. package/dev/vs/nls/lang/ru.js +1 -1
  36. package/dev/vs/nls/lang/tr.js +1 -1
  37. package/dev/vs/nls/lang/zh-cn.js +1 -1
  38. package/dev/vs/nls/lang/zh-tw.js +1 -1
  39. package/dev/vs/{python-H0wz4Ipr.js → python-Bp2kM35Z.js} +1 -1
  40. package/dev/vs/{razor-Bi8T5Hwt.js → razor-DRYn7Vxw.js} +1 -1
  41. package/dev/vs/{toggleHighContrast-BNT2cIi9.js → toggleHighContrast-D1jPdrd_.js} +14 -9
  42. package/dev/vs/{tsMode-DNFmPGaS.js → tsMode-DKQQ-f45.js} +1 -1
  43. package/dev/vs/{typescript-Ds08Xzl9.js → typescript-DKMHKK3f.js} +1 -1
  44. package/dev/vs/{workers-CmngtJ4R.js → workers-Ca_jc1jc.js} +1 -1
  45. package/dev/vs/{xml-Cq8WowMt.js → xml-DmQpwQah.js} +1 -1
  46. package/dev/vs/{yaml-OibqovQX.js → yaml-BGSc0xvf.js} +1 -1
  47. package/esm/metadata.d.ts +2 -2
  48. package/esm/metadata.js +8 -0
  49. package/esm/vs/base/common/htmlContent.js +4 -0
  50. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +1 -1
  51. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +14 -8
  52. package/esm/vs/features/languageDetection/browser/languageDetectionProtocol.js +13 -0
  53. package/esm/vs/features/languageDetection/browser/languageDetectionService.d.ts +76 -0
  54. package/esm/vs/features/languageDetection/browser/languageDetectionService.js +192 -0
  55. package/esm/vs/features/languageDetection/register.d.ts +45 -0
  56. package/esm/vs/features/languageDetection/register.js +110 -0
  57. package/esm/vs/features/llmLanguageDetection/llmDetectionService.d.ts +107 -0
  58. package/esm/vs/features/llmLanguageDetection/llmDetectionService.js +141 -0
  59. package/esm/vs/features/llmLanguageDetection/register.d.ts +19 -0
  60. package/esm/vs/features/llmLanguageDetection/register.js +7 -0
  61. package/esm/vs/nls/lang/cs.js +1 -1
  62. package/esm/vs/nls/lang/de.js +1 -1
  63. package/esm/vs/nls/lang/es.js +1 -1
  64. package/esm/vs/nls/lang/fr.js +1 -1
  65. package/esm/vs/nls/lang/it.js +1 -1
  66. package/esm/vs/nls/lang/ja.js +1 -1
  67. package/esm/vs/nls/lang/ko.js +1 -1
  68. package/esm/vs/nls/lang/pl.js +1 -1
  69. package/esm/vs/nls/lang/pt-br.js +1 -1
  70. package/esm/vs/nls/lang/ru.js +1 -1
  71. package/esm/vs/nls/lang/tr.js +1 -1
  72. package/esm/vs/nls/lang/zh-cn.js +1 -1
  73. package/esm/vs/nls/lang/zh-tw.js +1 -1
  74. package/min/vs/basic-languages/monaco.contribution.js +1 -1
  75. package/min/vs/{cssMode-f8znBFom.js → cssMode-DB4J7uyW.js} +1 -1
  76. package/min/vs/editor/editor.main.js +1 -1
  77. package/min/vs/{editor-CPRM77Zp.js → editor-DrJfpTOg.js} +134 -134
  78. package/min/vs/editor.js +1 -1
  79. package/min/vs/{freemarker2-27dvuCW2.js → freemarker2-EqpbMC5O.js} +1 -1
  80. package/min/vs/{handlebars-DGxPi2hu.js → handlebars-NQCeHbNj.js} +1 -1
  81. package/min/vs/{html-C0paxESg.js → html-CM5KansK.js} +1 -1
  82. package/min/vs/{htmlMode-CdUwf-2g.js → htmlMode-ChN8Bn74.js} +1 -1
  83. package/min/vs/{index-z9vfWupz.js → index-BEbVAdQy.js} +1 -1
  84. package/min/vs/index.js +1 -1
  85. package/min/vs/{javascript-BDClrWWt.js → javascript-CDBIocI9.js} +1 -1
  86. package/min/vs/{jsonMode-DRUBWnDT.js → jsonMode-B1yne0q-.js} +1 -1
  87. package/min/vs/language/css/monaco.contribution.js +1 -1
  88. package/min/vs/language/html/monaco.contribution.js +1 -1
  89. package/min/vs/language/json/monaco.contribution.js +1 -1
  90. package/min/vs/language/typescript/monaco.contribution.js +1 -1
  91. package/min/vs/{liquid-DVfJVlm7.js → liquid-DDSOFWBT.js} +1 -1
  92. package/min/vs/{lspLanguageFeatures-DqmXW2Es.js → lspLanguageFeatures-CerJWe1f.js} +1 -1
  93. package/min/vs/{mdx-DjXY2lzq.js → mdx-DekjfhGP.js} +1 -1
  94. package/min/vs/{monaco.contribution-hlQjqV-O.js → monaco.contribution-B-VSLukc.js} +1 -1
  95. package/min/vs/{monaco.contribution-Bsi8WQkN.js → monaco.contribution-BDe_ch2C.js} +1 -1
  96. package/min/vs/{monaco.contribution-DT5SCHe3.js → monaco.contribution-BK7MDI5n.js} +1 -1
  97. package/min/vs/{monaco.contribution-awUovrdB.js → monaco.contribution-D4bSHfYM.js} +1 -1
  98. package/min/vs/nls/lang/cs.js +1 -1
  99. package/min/vs/nls/lang/de.js +1 -1
  100. package/min/vs/nls/lang/es.js +1 -1
  101. package/min/vs/nls/lang/fr.js +1 -1
  102. package/min/vs/nls/lang/it.js +1 -1
  103. package/min/vs/nls/lang/ja.js +1 -1
  104. package/min/vs/nls/lang/ko.js +1 -1
  105. package/min/vs/nls/lang/pl.js +1 -1
  106. package/min/vs/nls/lang/pt-br.js +1 -1
  107. package/min/vs/nls/lang/ru.js +1 -1
  108. package/min/vs/nls/lang/tr.js +1 -1
  109. package/min/vs/nls/lang/zh-cn.js +1 -1
  110. package/min/vs/nls/lang/zh-tw.js +1 -1
  111. package/min/vs/{python-DnTmnvq9.js → python-NWXmJIRO.js} +1 -1
  112. package/min/vs/{razor-JO5_wFTl.js → razor-BLaQnCfv.js} +1 -1
  113. package/min/vs/{toggleHighContrast-DnJPOHFg.js → toggleHighContrast-DN85-6Gg.js} +2 -2
  114. package/min/vs/{tsMode-B0Erly20.js → tsMode-BP6jKK2F.js} +1 -1
  115. package/min/vs/{typescript-D1KvV8Gr.js → typescript-Dln_1cEH.js} +1 -1
  116. package/min/vs/{workers-DQakkBFd.js → workers-CWaH4-Oj.js} +1 -1
  117. package/min/vs/{xml-pmRt0tG1.js → xml-BhfjBAlN.js} +1 -1
  118. package/min/vs/{yaml-UAJC28mP.js → yaml-DBgk-f55.js} +1 -1
  119. package/package.json +8 -7
package/README.md CHANGED
@@ -1,122 +1,235 @@
1
- # Monaco Editor
1
+ # Monaco Editor(xiezhongfu fork)
2
2
 
3
- [![Versions](https://img.shields.io/npm/v/monaco-editor)](https://www.npmjs.com/package/monaco-editor)
4
- [![Versions](https://img.shields.io/npm/v/monaco-editor/next)](https://www.npmjs.com/package/monaco-editor)
5
- [![Feature Requests](https://img.shields.io/github/issues/microsoft/monaco-editor/feature-request.svg)](https://github.com/microsoft/monaco-editor/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc)
6
- [![Bugs](https://img.shields.io/github/issues/microsoft/monaco-editor/bug.svg)](https://github.com/microsoft/monaco-editor/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3Abug)
3
+ > **本仓库**是 [microsoft/monaco-editor](https://github.com/microsoft/monaco-editor) 的个人 fork,在官方版本基础上新增了若干扩展功能。官方文档请参阅 [上游 README](https://github.com/microsoft/monaco-editor#readme)
7
4
 
8
- The Monaco Editor is the fully featured code editor from [VS Code](https://github.com/microsoft/vscode). Check out the [VS Code docs](https://code.visualstudio.com/docs/editor/editingevolved) to see some of the supported features.
5
+ ---
9
6
 
10
- ![image](https://user-images.githubusercontent.com/5047891/94183711-290c0780-fea3-11ea-90e3-c88ff9d21bd6.png)
7
+ ## 与官方版本的差异
11
8
 
12
- ## Try it out
9
+ | # | 差异项 | 官方版本 | 本 fork |
10
+ |---|--------|----------|---------|
11
+ | 1 | **核心依赖** | `monaco-editor-core` | `monaco-editor-core-full`(更多未裁剪模块),当前 `0.55.1-full.2` |
12
+ | 1 | **构建产物 / 包名** | `out/monaco-editor` / `monaco-editor` | `out/monaco-editor-full` / `monaco-editor-full`,版本号追加 `-full` 后缀 |
13
+ | 2 | **Hover 自定义 DOM 渲染** | 不支持,`MarkdownString.domElement` 会被过滤或经 DOMPurify 清洗 | 支持,`domElement` 字段存在时直接挂载,完全绕过 DOMPurify |
14
+ | 2 | **exports 通配符映射** | `./*` → `./esm/vs/*`(强制重定向) | `./*` → `./*`(顶层直通,任意路径可导入) |
15
+ | 3 | **ML 语言自动检测** | 不支持(workbench 层能力,浏览器侧无) | 内置,支持神经网络 + 正则双模型,自动 / 手动两种模式 |
16
+ | 4 | **LLM 语言检测** | 不支持 | 内置,适配器模式,手动触发,LRU 缓存 |
13
17
 
14
- Try out the editor and see various examples [in our interactive playground](https://microsoft.github.io/monaco-editor/playground.html).
18
+ ---
15
19
 
16
- The playground is the best way to learn about how to use the editor, which features is supports, to try out different versions and to create minimal reproducible examples for bug reports.
20
+ ### 1. 依赖 `monaco-editor-core-full` & 输出包名变更
17
21
 
18
- ## Installing
22
+ 官方 `monaco-editor` 依赖 `monaco-editor-core`;本 fork 切换为自定义的 `monaco-editor-core-full`(同样由 VS Code 源码生成,但包含了更多未裁剪的模块),当前版本为 `0.55.1-full.2`。
19
23
 
20
- ```
21
- > npm install monaco-editor
22
- ```
23
-
24
- You will get:
25
-
26
- - inside `/esm`: ESM version of the editor (compatible with e.g. webpack)
27
- - `monaco.d.ts`: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release).
28
-
29
- :warning: The monaco editor also ships an `AMD` build for backwards-compatibility reasons, but the `AMD` support is deprecated and will be removed in future versions.
30
-
31
- ## Localization
32
-
33
- To load the editor in a specific language, make sure that the corresponding nls script file is loaded before the main monaco editor script. For example, to load the editor in German, include the following script tag:
34
- ```html
35
- <script src="path/to/monaco-editor/esm/nls.messages.de.js"></script>
36
- ```
37
-
38
- Check the sources for available languages.
39
-
40
- ## Concepts
24
+ 构建产物也相应重命名:输出目录由 `out/monaco-editor` 改为 `out/monaco-editor-full`,发布包名为 `monaco-editor-full`,版本号在原版本号后追加 `-full` 后缀(如 `0.55.1-full`)。
41
25
 
42
- Monaco editor is best known for being the text editor that powers VS Code. However, it's a bit more nuanced. Some basic understanding about the underlying concepts is needed to use Monaco editor effectively.
26
+ ---
43
27
 
44
- ### Models
28
+ ### 2. `monaco-editor-core-full` 补丁整合
45
29
 
46
- Models are at the heart of Monaco editor. It's what you interact with when managing content. A model represents a file that has been opened. This could represent a file that exists on a file system, but it doesn't have to. For example, the model holds the text content, determines the language of the content, and tracks the edit history of the content.
30
+ `monaco-editor-core-full` 依赖包打了三处补丁,弥补上游缺失的能力。补丁通过 `patch-package` 管理,`npm install` 后自动应用到 `node_modules`,消费方无需任何额外操作。
47
31
 
48
- ### URIs
32
+ ---
49
33
 
50
- Each model is identified by a URI. This is why it's not possible for two models to have the same URI. Ideally when you represent content in Monaco editor, you should think of a virtual file system that matches the files your users are editing. For example, you could use `file:///` as a base path. If a model is created without a URI, its URI will be `inmemory://model/1`. The number increases as more models are created.
34
+ **① 支持在 Hover 中直接渲染 DOM 节点**
51
35
 
52
- ### Editors
36
+ - **改动文件**:`esm/vs/base/common/htmlContent.js` — `isEmptyMarkdownString`
37
+ - **问题**:上游 `isEmptyMarkdownString` 只检查 `value` 字段是否为空,当 `MarkdownString` 携带自定义 `domElement` 字段时会被误判为空串,导致 Hover 内容被过滤掉、永远不渲染。
38
+ - **改动**:在 `isMarkdownString` 分支中优先判断 `domElement instanceof HTMLElement`,若存在则直接返回 `false`(非空)。
39
+ - **效果**:`domElement` 字段的 `MarkdownString` 能正常进入渲染流程,不再被提前丢弃。
53
40
 
54
- An editor is a user facing view of the model. This is what gets attached to the DOM and what your users see visually. Typical editor operations are displaying a model, managing the view state, or executing actions or commands.
41
+ ---
55
42
 
56
- ### Providers
43
+ **② Hover 渲染时绕过 DOMPurify sanitize**
57
44
 
58
- Providers provide smart editor features. For example, this includes completion and hover information. It is not the same as, but often maps to [language server protocol](https://microsoft.github.io/language-server-protocol) features.
45
+ - **改动文件**:`esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js` `renderMarkdown`
46
+ - **问题**:上游 `renderMarkdown` 统一走 `markdownRendererService.render()` 渲染路径,该路径内部会经过 DOMPurify 清洗。当 Hover 内容是业务方自行构造的 DOM 节点时(如带有自定义交互逻辑的富文本),DOMPurify 会剥离事件监听器、自定义属性等,导致渲染结果不符合预期。
47
+ - **改动**:在 `renderMarkdown` 中检测 `markdownString.domElement instanceof HTMLElement`,若存在则直接 `appendChild` 挂载到容器并调用 `onFinishedRendering()`,完全跳过 `markdownRendererService.render()` 流程;否则仍走原有路径。
48
+ - **效果**:业务方可通过在 `MarkdownString` 上挂载 `domElement` 属性,将任意 DOM 节点原样渲染进 Hover 弹层,保留完整的事件绑定和自定义属性,不受 DOMPurify 干扰。
59
49
 
60
- Providers work on models. Some smart features depends on the file URI. For example, for TypeScript to resolve imports, or for JSON IntelliSense to determine which JSON schema to apply to which model. So it's important to choose proper model URIs.
50
+ ---
61
51
 
62
- ### Disposables
52
+ **③ 修复 `package.json` exports 通配符映射**
63
53
 
64
- Many Monaco related objects often implement the `.dispose()` method. This method is intended to perform cleanups when a resource is no longer needed. For example, calling `model.dispose()` will unregister it, freeing up the URI for a new model. Editors should be disposed to free up resources and remove their model listeners.
54
+ - **改动文件**:`package.json` `exports` 字段(源头修改,构建时自动带入产物)
55
+ - **问题**:上游 exports 将 `./*.js` 和 `./*` 强制重定向到 `./esm/vs/*.js`,导致消费方无法按完整路径(如 `esm/vs/editor/editor.main.js`、`min/vs/…`)直接导入,只能访问 `esm/vs/` 子目录下的文件。
56
+ - **改动**:将通配符映射改为顶层直通:
57
+ ```diff
58
+ - "./*.js": "./esm/vs/*.js",
59
+ - "./*": "./esm/vs/*.js"
60
+ + "./*.js": "./*.js",
61
+ + "./*": "./*"
62
+ ```
63
+ - **效果**:消费方可按包内任意路径导入文件,`esm/`、`min/`、根目录文件均可正常解析,不再受路径重映射限制。
65
64
 
66
- ## Documentation
65
+ ---
67
66
 
68
- - Learn how to integrate the editor with these [complete samples](./samples/).
69
- - [Integrate the ESM version](./docs/integrate-esm.md)
70
- - Learn how to use the editor API and try out your own customizations in the [playground](https://microsoft.github.io/monaco-editor/playground.html).
71
- - Explore the [API docs](https://microsoft.github.io/monaco-editor/docs.html) or read them straight from [`monaco.d.ts`](https://github.com/microsoft/monaco-editor/blob/gh-pages/node_modules/monaco-editor/monaco.d.ts).
72
- - Read [this guide](https://github.com/microsoft/monaco-editor/wiki/Accessibility-Guide-for-Integrators) to ensure the editor is accessible to all your users!
73
- - Create a Monarch tokenizer for a new programming language [in the Monarch playground](https://microsoft.github.io/monaco-editor/monarch.html).
74
- - Ask questions on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor)! Search open and closed issues, there are a lot of tips in there!
67
+ #### 实现方式
75
68
 
76
- ## Issues
69
+ | 文件 | 作用 |
70
+ |------|------|
71
+ | `patches/monaco-editor-core+0.55.1-full.2.patch` | patch-package 格式的 patch 文件,包含改动 ① ② |
72
+ | `build/postinstall.ts` | `npm install` 后自动调用 `patch-package`,将 patch 应用到 `node_modules` |
73
+ | `package.json` → `exports` | 直接在源头修改,`npm run build` 时由 `build-monaco-editor.ts` 自动写入产物的 `package.json`,覆盖改动 ③ |
77
74
 
78
- Create [issues](https://github.com/microsoft/monaco-editor/issues) in this repository for anything related to the Monaco Editor. Please search for existing issues to avoid duplicates.
75
+ ---
79
76
 
80
- ## FAQ
77
+ ### 3. ML 语言自动检测功能(Language Detection)
81
78
 
82
- **What is the relationship between VS Code and the Monaco Editor?**
79
+ `src/features/languageDetection/` 下新增了一套完整的语言自动检测模块,将 VS Code 工作区层(workbench)的语言检测能力移植到了浏览器侧独立运行。官方 `monaco-editor` 不包含此功能。
83
80
 
84
- The Monaco Editor is generated straight from VS Code's sources with some shims around services the code needs to make it run in a web browser outside of its home.
81
+ #### 核心文件
85
82
 
86
- **What is the relationship between VS Code's version and the Monaco Editor's version?**
83
+ | 文件 | 说明 |
84
+ |------|------|
85
+ | `register.ts` | 公开入口,调用 `registerLanguageDetection()` 即可启用自动检测 |
86
+ | `browser/languageDetectionService.ts` | 主线程服务,负责历史偏置计算和 Worker 通信 |
87
+ | `browser/languageDetectionWorker.ts` | Web Worker 内部逻辑,运行神经网络模型和正则模型 |
88
+ | `browser/languageDetectionWorkerMain.ts` | Worker 入口,调用 `bootstrapWebWorker` 启动 |
89
+ | `browser/languageDetectionProtocol.ts` | 主线程↔Worker 的 RPC 协议定义 |
87
90
 
88
- None. The Monaco Editor is a library and it reflects directly the source code.
91
+ #### 功能亮点
89
92
 
90
- **I've written an extension for VS Code, will it work on the Monaco Editor in a browser?**
93
+ - **神经网络检测**:通过 `@vscode/vscode-languagedetection`(TF.js 驱动)识别代码语言,支持 `url` 模式(动态加载远程模型)和 `bundle` 模式(跳过神经网络,仅用正则)。
94
+ - **正则兜底检测**:可选接入 `vscode-regexp-languagedetection`(通过 `regexpModelUrl` 配置),在神经网络无结果时作为降级方案。两种模型的优先级可通过 `preferHistoryModel` 反转。
95
+ - **历史偏置加权**:复刻 VS Code 的偏置算法(session +7、workspace +5、历史 workspace +3、全局历史 +1),让检测结果向用户近期使用的语言倾斜。
96
+ - **持久化支持**:通过 `storage.read/write` 回调将历史记录持久化到 `localStorage` 等任意存储。
97
+ - **自动 & 手动两种模式**:默认自动监听所有 model 的创建和内容变更(节流 600 ms,与 VS Code 一致);设置 `autoDetect: false` 后可手动调用 `detectLanguage()`。
98
+ - **无侵入**:只在 model 无文件扩展名且语言为 `plaintext` 时才介入,已有语言设置或用户手动切换后不再覆盖。
91
99
 
92
- No.
100
+ #### 快速接入示例
93
101
 
94
- > Note: If the extension is fully based on the [LSP](https://microsoft.github.io/language-server-protocol/) and if the language server is authored in JavaScript, then it would be possible.
102
+ ```ts
103
+ import { registerLanguageDetection } from 'monaco-editor-full/src/features/languageDetection/register';
95
104
 
96
- **Why all these web workers and why should I care?**
105
+ // 神经网络 + 正则双保险(推荐)
106
+ const service = registerLanguageDetection({
107
+ modelLoadMode: 'url',
108
+ indexJsUrl: 'https://cdn.jsdelivr.net/npm/@vscode/vscode-languagedetection/dist/lib/index.js',
109
+ modelJsonUrl: 'https://cdn.jsdelivr.net/npm/@vscode/vscode-languagedetection/model/model.json',
110
+ weightsUrl: 'https://cdn.jsdelivr.net/npm/@vscode/vscode-languagedetection/model/group1-shard1of1.bin',
111
+ // 正则兜底:神经网络无结果时自动回落
112
+ regexpModelUrl: 'https://cdn.jsdelivr.net/npm/vscode-regexp-languagedetection/dist/index.js',
113
+ storage: {
114
+ read: (key) => localStorage.getItem(key),
115
+ write: (key, val) => localStorage.setItem(key, val),
116
+ },
117
+ onLanguageDetected: (model, languageId) => {
118
+ console.log(`检测到语言:${languageId}`);
119
+ },
120
+ });
97
121
 
98
- Language services create web workers to compute heavy stuff outside of the UI thread. They cost hardly anything in terms of resource overhead and you shouldn't worry too much about them, as long as you get them to work (see above the cross-domain case).
99
-
100
- **I see the warning "Could not create web worker". What should I do?**
101
-
102
- HTML5 does not allow pages loaded on `file://` to create web workers. Please load the editor with a web server on `http://` or `https://` schemes.
103
-
104
- **Is the editor supported in mobile browsers or mobile web app frameworks?**
105
-
106
- No.
107
-
108
- **Why doesn't the editor support TextMate grammars?**
109
-
110
- - Please see https://github.com/bolinfest/monaco-tm which puts together `monaco-editor`, `vscode-oniguruma` and `vscode-textmate` to get TM grammar support in the editor.
111
-
112
- ## Contributing / Local Development
113
-
114
- We are welcoming contributions from the community!
115
- Please see [CONTRIBUTING](./CONTRIBUTING.md) for details how you can contribute effectively, how you can run the editor from sources and how you can debug and fix issues.
122
+ // 仅正则模型(轻量,无需加载 TF.js)
123
+ const service = registerLanguageDetection({
124
+ modelLoadMode: 'bundle', // 禁用神经网络
125
+ regexpModelUrl: 'https://cdn.jsdelivr.net/npm/vscode-regexp-languagedetection/dist/index.js',
126
+ });
127
+
128
+ // 正则优先,神经网络兜底
129
+ const service = registerLanguageDetection({
130
+ modelLoadMode: 'url',
131
+ /* ...其他 url 配置... */
132
+ regexpModelUrl: 'https://cdn.jsdelivr.net/npm/vscode-regexp-languagedetection/dist/index.js',
133
+ preferHistoryModel: true, // 正则先跑,有结果就用,无结果再走神经网络
134
+ });
135
+
136
+ // 手动检测模式
137
+ const service = registerLanguageDetection({ modelLoadMode: 'url', /* ... */, autoDetect: false });
138
+ const lang = await service.detectLanguage(myModel);
139
+ if (lang) myModel.setLanguage(lang);
140
+
141
+ // 不再使用时释放资源
142
+ service.dispose();
143
+ ```
116
144
 
117
- ## Code of Conduct
145
+ ---
146
+
147
+ ### 4. LLM 语言检测功能(LLM Language Detection)
148
+
149
+ 在 `src/features/llmLanguageDetection/` 下新增了一套由大语言模型(LLM)驱动的语言检测模块。与 ML 检测不同,本模块:
150
+
151
+ - **纯手动触发**:不自动监听内容变更,由调用方决定何时检测(如按钮点击)。
152
+ - **候选语言可控**:调用方声明 LLM 可以返回哪些语言,超出范围的结果一律视为 `undefined`。
153
+ - **适配器模式**:通过 `ILLMAdapter` 接口解耦 LLM 调用细节(prompt 构造、鉴权、重试等)。
154
+ - **LRU 缓存**:相同内容哈希在 TTL 内复用上次结果,避免重复调用 LLM。
155
+ - **用户锁定保护**:用户手动切换语言后,`detectLanguage()` 直接返回 `undefined`,不再覆盖。
156
+
157
+ #### 核心文件
158
+
159
+ | 文件 | 说明 |
160
+ |------|------|
161
+ | `src/features/llmLanguageDetection/register.ts` | 公开入口,调用 `registerLLMLanguageDetection()` 创建服务 |
162
+ | `src/features/llmLanguageDetection/llmDetectionService.ts` | 服务实现:LRU 缓存、用户锁定、适配器调用 |
163
+
164
+ #### 配套 Sample
165
+
166
+ `samples/browser-esm-vite-react-llm-detection/` 提供了完整的 React + Vite 演示:
167
+
168
+ - 默认使用内置 mock 适配器(关键词启发式,无需 API Key,离线可用)。
169
+ - 配置 `VITE_OPENAI_API_KEY` 环境变量后自动切换为真实 OpenAI 调用(`gpt-4o-mini`)。
170
+ - 演示了手动触发检测、状态栏展示检测结果、用户锁定交互等完整流程。
171
+
172
+ #### 快速接入示例
173
+
174
+ ```ts
175
+ import {
176
+ registerLLMLanguageDetection,
177
+ type ILLMAdapter,
178
+ type LLMLanguageCandidate,
179
+ } from 'monaco-editor-full/src/features/llmLanguageDetection/register';
180
+
181
+ // ① 实现适配器(你来决定 prompt 和 LLM 调用方式)
182
+ const myAdapter: ILLMAdapter = {
183
+ async detect({ candidates, codeSnippet }) {
184
+ const response = await fetch('/api/detect-language', {
185
+ method: 'POST',
186
+ body: JSON.stringify({ candidates, code: codeSnippet }),
187
+ });
188
+ const { languageId } = await response.json();
189
+ return languageId; // 须为 candidates 中的某个 id,否则视为 undefined
190
+ },
191
+ };
192
+
193
+ // ② 声明候选语言
194
+ const candidates: LLMLanguageCandidate[] = [
195
+ {
196
+ id: 'pgsql',
197
+ description: 'PostgreSQL — 使用 :: 类型转换、ILIKE、$1 参数、RETURNING 子句。',
198
+ examples: [`SELECT id, name::text FROM users WHERE email ILIKE '%@example.com' RETURNING id;`],
199
+ },
200
+ {
201
+ id: 'mysql',
202
+ description: 'MySQL — 使用反引号标识符、SHOW TABLES、GROUP_CONCAT、LIMIT n。',
203
+ examples: [`SELECT user_id, GROUP_CONCAT(tag) FROM \`user_tags\` GROUP BY user_id LIMIT 100;`],
204
+ },
205
+ { id: 'python', description: 'Python — def/class、缩进、print()、列表推导式。' },
206
+ { id: 'typescript', description: 'TypeScript — 带类型注解的 JavaScript,含 interface 和泛型。' },
207
+ ];
208
+
209
+ // ③ 注册服务(应用启动时调用一次)
210
+ const llmService = registerLLMLanguageDetection({
211
+ adapter: myAdapter,
212
+ candidates,
213
+ maxContentLength: 1500, // 发给 LLM 的最大字符数
214
+ minContentLength: 30, // 内容过短时跳过检测
215
+ cacheTtl: 5 * 60_000, // 5 分钟缓存
216
+ onLanguageDetected: (model, languageId) => {
217
+ console.log(`LLM 检测到语言:${languageId}`);
218
+ },
219
+ onDetectionError: (model, error) => {
220
+ console.error('LLM 检测失败:', error);
221
+ },
222
+ });
223
+
224
+ // ④ 手动触发检测(如绑定到按钮)
225
+ const languageId = await llmService.detectLanguage(editor.getModel());
226
+ // languageId 已被自动应用到 model,这里可用于更新 UI
227
+
228
+ // ⑤ 不再使用时释放资源
229
+ llmService.dispose();
230
+ ```
118
231
 
119
- This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
232
+ ---
120
233
 
121
234
  ## License
122
235
 
@@ -1,4 +1,4 @@
1
- define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM"], (function(require, editor) {
1
+ define("vs/basic-languages/monaco.contribution", ["require", "../editor-BdQf5OuC"], (function(require, editor) {
2
2
  "use strict";
3
3
  const languageDefinitions = {};
4
4
  const lazyLanguageLoaders = {};
@@ -174,49 +174,49 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
174
174
  extensions: [".ftl", ".ftlh", ".ftlx"],
175
175
  aliases: ["FreeMarker2", "Apache FreeMarker2"],
176
176
  loader: () => {
177
- return new Promise((resolve, reject) => require(["../freemarker2-CejOmmM0"], resolve, reject)).then((m) => m.TagAutoInterpolationDollar);
177
+ return new Promise((resolve, reject) => require(["../freemarker2-R252rcz7"], resolve, reject)).then((m) => m.TagAutoInterpolationDollar);
178
178
  }
179
179
  });
180
180
  registerLanguage({
181
181
  id: "freemarker2.tag-angle.interpolation-dollar",
182
182
  aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
183
183
  loader: () => {
184
- return new Promise((resolve, reject) => require(["../freemarker2-CejOmmM0"], resolve, reject)).then((m) => m.TagAngleInterpolationDollar);
184
+ return new Promise((resolve, reject) => require(["../freemarker2-R252rcz7"], resolve, reject)).then((m) => m.TagAngleInterpolationDollar);
185
185
  }
186
186
  });
187
187
  registerLanguage({
188
188
  id: "freemarker2.tag-bracket.interpolation-dollar",
189
189
  aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
190
190
  loader: () => {
191
- return new Promise((resolve, reject) => require(["../freemarker2-CejOmmM0"], resolve, reject)).then((m) => m.TagBracketInterpolationDollar);
191
+ return new Promise((resolve, reject) => require(["../freemarker2-R252rcz7"], resolve, reject)).then((m) => m.TagBracketInterpolationDollar);
192
192
  }
193
193
  });
194
194
  registerLanguage({
195
195
  id: "freemarker2.tag-angle.interpolation-bracket",
196
196
  aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
197
197
  loader: () => {
198
- return new Promise((resolve, reject) => require(["../freemarker2-CejOmmM0"], resolve, reject)).then((m) => m.TagAngleInterpolationBracket);
198
+ return new Promise((resolve, reject) => require(["../freemarker2-R252rcz7"], resolve, reject)).then((m) => m.TagAngleInterpolationBracket);
199
199
  }
200
200
  });
201
201
  registerLanguage({
202
202
  id: "freemarker2.tag-bracket.interpolation-bracket",
203
203
  aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
204
204
  loader: () => {
205
- return new Promise((resolve, reject) => require(["../freemarker2-CejOmmM0"], resolve, reject)).then((m) => m.TagBracketInterpolationBracket);
205
+ return new Promise((resolve, reject) => require(["../freemarker2-R252rcz7"], resolve, reject)).then((m) => m.TagBracketInterpolationBracket);
206
206
  }
207
207
  });
208
208
  registerLanguage({
209
209
  id: "freemarker2.tag-auto.interpolation-dollar",
210
210
  aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
211
211
  loader: () => {
212
- return new Promise((resolve, reject) => require(["../freemarker2-CejOmmM0"], resolve, reject)).then((m) => m.TagAutoInterpolationDollar);
212
+ return new Promise((resolve, reject) => require(["../freemarker2-R252rcz7"], resolve, reject)).then((m) => m.TagAutoInterpolationDollar);
213
213
  }
214
214
  });
215
215
  registerLanguage({
216
216
  id: "freemarker2.tag-auto.interpolation-bracket",
217
217
  aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
218
218
  loader: () => {
219
- return new Promise((resolve, reject) => require(["../freemarker2-CejOmmM0"], resolve, reject)).then((m) => m.TagAutoInterpolationBracket);
219
+ return new Promise((resolve, reject) => require(["../freemarker2-R252rcz7"], resolve, reject)).then((m) => m.TagAutoInterpolationBracket);
220
220
  }
221
221
  });
222
222
  registerLanguage({
@@ -237,7 +237,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
237
237
  extensions: [".handlebars", ".hbs"],
238
238
  aliases: ["Handlebars", "handlebars", "hbs"],
239
239
  mimetypes: ["text/x-handlebars-template"],
240
- loader: () => new Promise((resolve, reject) => require(["../handlebars-CTI8AbNW"], resolve, reject))
240
+ loader: () => new Promise((resolve, reject) => require(["../handlebars-aOU_LDK3"], resolve, reject))
241
241
  });
242
242
  registerLanguage({
243
243
  id: "hcl",
@@ -250,7 +250,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
250
250
  extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
251
251
  aliases: ["HTML", "htm", "html", "xhtml"],
252
252
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
253
- loader: () => new Promise((resolve, reject) => require(["../html-ELdojt9e"], resolve, reject))
253
+ loader: () => new Promise((resolve, reject) => require(["../html-DopmH9UY"], resolve, reject))
254
254
  });
255
255
  registerLanguage({
256
256
  id: "ini",
@@ -273,7 +273,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
273
273
  filenames: ["jakefile"],
274
274
  aliases: ["JavaScript", "javascript", "js"],
275
275
  mimetypes: ["text/javascript"],
276
- loader: () => new Promise((resolve, reject) => require(["../javascript-BFEMQrLZ"], resolve, reject))
276
+ loader: () => new Promise((resolve, reject) => require(["../javascript-DjefjLWu"], resolve, reject))
277
277
  });
278
278
  registerLanguage({
279
279
  id: "julia",
@@ -312,7 +312,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
312
312
  extensions: [".liquid", ".html.liquid"],
313
313
  aliases: ["Liquid", "liquid"],
314
314
  mimetypes: ["application/liquid"],
315
- loader: () => new Promise((resolve, reject) => require(["../liquid-DiuJNaMD"], resolve, reject))
315
+ loader: () => new Promise((resolve, reject) => require(["../liquid-uhKlujcM"], resolve, reject))
316
316
  });
317
317
  registerLanguage({
318
318
  id: "m3",
@@ -330,7 +330,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
330
330
  id: "mdx",
331
331
  extensions: [".mdx"],
332
332
  aliases: ["MDX", "mdx"],
333
- loader: () => new Promise((resolve, reject) => require(["../mdx-CSe6VyZs"], resolve, reject))
333
+ loader: () => new Promise((resolve, reject) => require(["../mdx-Dt-NHlcJ"], resolve, reject))
334
334
  });
335
335
  registerLanguage({
336
336
  id: "mips",
@@ -429,7 +429,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
429
429
  extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
430
430
  aliases: ["Python", "py"],
431
431
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
432
- loader: () => new Promise((resolve, reject) => require(["../python-H0wz4Ipr"], resolve, reject))
432
+ loader: () => new Promise((resolve, reject) => require(["../python-Bp2kM35Z"], resolve, reject))
433
433
  });
434
434
  registerLanguage({
435
435
  id: "qsharp",
@@ -448,7 +448,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
448
448
  extensions: [".cshtml"],
449
449
  aliases: ["Razor", "razor"],
450
450
  mimetypes: ["text/x-cshtml"],
451
- loader: () => new Promise((resolve, reject) => require(["../razor-Bi8T5Hwt"], resolve, reject))
451
+ loader: () => new Promise((resolve, reject) => require(["../razor-DRYn7Vxw"], resolve, reject))
452
452
  });
453
453
  registerLanguage({
454
454
  id: "redis",
@@ -581,7 +581,7 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
581
581
  aliases: ["TypeScript", "ts", "typescript"],
582
582
  mimetypes: ["text/typescript"],
583
583
  loader: () => {
584
- return new Promise((resolve, reject) => require(["../typescript-Ds08Xzl9"], resolve, reject));
584
+ return new Promise((resolve, reject) => require(["../typescript-DKMHKK3f"], resolve, reject));
585
585
  }
586
586
  });
587
587
  registerLanguage({
@@ -626,13 +626,13 @@ define("vs/basic-languages/monaco.contribution", ["require", "../editor-DIBnF2vM
626
626
  firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
627
627
  aliases: ["XML", "xml"],
628
628
  mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
629
- loader: () => new Promise((resolve, reject) => require(["../xml-Cq8WowMt"], resolve, reject))
629
+ loader: () => new Promise((resolve, reject) => require(["../xml-DmQpwQah"], resolve, reject))
630
630
  });
631
631
  registerLanguage({
632
632
  id: "yaml",
633
633
  extensions: [".yaml", ".yml"],
634
634
  aliases: ["YAML", "yaml", "YML", "yml"],
635
635
  mimetypes: ["application/x-yaml", "text/x-yaml"],
636
- loader: () => new Promise((resolve, reject) => require(["../yaml-OibqovQX"], resolve, reject))
636
+ loader: () => new Promise((resolve, reject) => require(["../yaml-BGSc0xvf"], resolve, reject))
637
637
  });
638
638
  }));
@@ -1,4 +1,4 @@
1
- define("vs/cssMode-DhKMHRj3", ["exports", "./css.worker-BZq1qP5H", "./workers-CmngtJ4R", "./lspLanguageFeatures-DJfiDpKo", "./editor-DIBnF2vM"], (function(exports, css_worker, workers, lspLanguageFeatures, editor) {
1
+ define("vs/cssMode-BI10dqqE", ["exports", "./css.worker-BZq1qP5H", "./workers-Ca_jc1jc", "./lspLanguageFeatures-CElBQQjP", "./editor-BdQf5OuC"], (function(exports, css_worker, workers, lspLanguageFeatures, editor) {
2
2
  "use strict";
3
3
  const STOP_WHEN_IDLE_FOR = 2 * 60 * 1e3;
4
4
  class WorkerManager {
@@ -1,4 +1,4 @@
1
- define("vs/editor/editor.main", ["exports", "../json.worker-C7Z_4Gfh", "../css.worker-BZq1qP5H", "../html.worker-Dr7sQKZR", "../ts.worker-Ct-l_Hre", "require", "vs/nls.messages-loader!", "../index-B6BbYPbd", "../monaco.contribution-BDawsTgN", "../editor-DIBnF2vM", "../monaco.contribution-BeG0esy9", "../monaco.contribution-DnLriG_F", "../monaco.contribution--xL3D3ub"], (function(exports, json_worker, css_worker, html_worker, ts_worker, require, nls_messagesLoader_, index, src_deprecated_language_css_monaco_contribution_ts, editor, src_deprecated_language_html_monaco_contribution_ts, src_deprecated_language_typescript_monaco_contribution_ts, src_deprecated_language_json_monaco_contribution_ts) {
1
+ define("vs/editor/editor.main", ["exports", "../json.worker-C7Z_4Gfh", "../css.worker-BZq1qP5H", "../html.worker-Dr7sQKZR", "../ts.worker-Ct-l_Hre", "require", "vs/nls.messages-loader!", "../index-edAhY9q3", "../monaco.contribution-BkTWBQnD", "../editor-BdQf5OuC", "../monaco.contribution-DMd-tGrU", "../monaco.contribution-Bb_bwPfc", "../monaco.contribution-rPRCxtXO"], (function(exports, json_worker, css_worker, html_worker, ts_worker, require, nls_messagesLoader_, index, src_deprecated_language_css_monaco_contribution_ts, editor, src_deprecated_language_html_monaco_contribution_ts, src_deprecated_language_typescript_monaco_contribution_ts, src_deprecated_language_json_monaco_contribution_ts) {
2
2
  "use strict";
3
3
  function _interopNamespaceDefault(e) {
4
4
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -1,4 +1,4 @@
1
- define("vs/editor-DIBnF2vM", ["exports", "./editorWorkerHost-CtqWydRN"], (function(exports, editorWorkerHost) {
1
+ define("vs/editor-BdQf5OuC", ["exports", "./editorWorkerHost-CtqWydRN"], (function(exports, editorWorkerHost) {
2
2
  "use strict";
3
3
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
4
4
  const EditorZoom = new class {
@@ -72274,6 +72274,9 @@ ${appendEscapedMarkdownCodeBlockFence(code, langId)}
72274
72274
  }
72275
72275
  function isEmptyMarkdownString(oneOrMany) {
72276
72276
  if (isMarkdownString(oneOrMany)) {
72277
+ if (oneOrMany.domElement instanceof HTMLElement) {
72278
+ return false;
72279
+ }
72277
72280
  return !oneOrMany.value;
72278
72281
  } else if (Array.isArray(oneOrMany)) {
72279
72282
  return oneOrMany.every(isEmptyMarkdownString);
package/dev/vs/editor.js CHANGED
@@ -1,4 +1,4 @@
1
- define("vs/editor", ["exports", "./editor-DIBnF2vM"], (function(exports, editor) {
1
+ define("vs/editor", ["exports", "./editor-BdQf5OuC"], (function(exports, editor) {
2
2
  "use strict";
3
3
  exports.CancellationTokenSource = editor.CancellationTokenSource;
4
4
  exports.Emitter = editor.Emitter;
@@ -1,4 +1,4 @@
1
- define("vs/freemarker2-CejOmmM0", ["exports", "./editor-DIBnF2vM"], (function(exports, editor) {
1
+ define("vs/freemarker2-R252rcz7", ["exports", "./editor-BdQf5OuC"], (function(exports, editor) {
2
2
  "use strict";
3
3
  const EMPTY_ELEMENTS = [
4
4
  "assign",
@@ -1,4 +1,4 @@
1
- define("vs/handlebars-CTI8AbNW", ["exports", "./editor-DIBnF2vM"], (function(exports, editor) {
1
+ define("vs/handlebars-aOU_LDK3", ["exports", "./editor-BdQf5OuC"], (function(exports, editor) {
2
2
  "use strict";
3
3
  const EMPTY_ELEMENTS = [
4
4
  "area",
@@ -1,4 +1,4 @@
1
- define("vs/html-ELdojt9e", ["exports", "./editor-DIBnF2vM"], (function(exports, editor) {
1
+ define("vs/html-DopmH9UY", ["exports", "./editor-BdQf5OuC"], (function(exports, editor) {
2
2
  "use strict";
3
3
  const EMPTY_ELEMENTS = [
4
4
  "area",
@@ -1,4 +1,4 @@
1
- define("vs/htmlMode-TZWHx-9W", ["exports", "./html.worker-Dr7sQKZR", "./workers-CmngtJ4R", "./lspLanguageFeatures-DJfiDpKo", "./editor-DIBnF2vM"], (function(exports, html_worker, workers, lspLanguageFeatures, editor) {
1
+ define("vs/htmlMode-U43KZg3t", ["exports", "./html.worker-Dr7sQKZR", "./workers-Ca_jc1jc", "./lspLanguageFeatures-CElBQQjP", "./editor-BdQf5OuC"], (function(exports, html_worker, workers, lspLanguageFeatures, editor) {
2
2
  "use strict";
3
3
  const STOP_WHEN_IDLE_FOR = 2 * 60 * 1e3;
4
4
  class WorkerManager {
@@ -1,4 +1,4 @@
1
- define("vs/index-B6BbYPbd", ["exports", "./editor-DIBnF2vM", "./toggleHighContrast-BNT2cIi9", "./basic-languages/monaco.contribution", "./monaco.contribution-BDawsTgN", "./monaco.contribution-BeG0esy9", "./monaco.contribution--xL3D3ub", "./monaco.contribution-DnLriG_F"], (function(exports, editor, toggleHighContrast, src_deprecated_basicLanguages_monaco_contribution_ts, src_deprecated_language_css_monaco_contribution_ts, src_deprecated_language_html_monaco_contribution_ts, src_deprecated_language_json_monaco_contribution_ts, src_deprecated_language_typescript_monaco_contribution_ts) {
1
+ define("vs/index-edAhY9q3", ["exports", "./editor-BdQf5OuC", "./toggleHighContrast-D1jPdrd_", "./basic-languages/monaco.contribution", "./monaco.contribution-BkTWBQnD", "./monaco.contribution-DMd-tGrU", "./monaco.contribution-rPRCxtXO", "./monaco.contribution-Bb_bwPfc"], (function(exports, editor, toggleHighContrast, src_deprecated_basicLanguages_monaco_contribution_ts, src_deprecated_language_css_monaco_contribution_ts, src_deprecated_language_html_monaco_contribution_ts, src_deprecated_language_json_monaco_contribution_ts, src_deprecated_language_typescript_monaco_contribution_ts) {
2
2
  "use strict";
3
3
  function isRequestOrNotification(msg) {
4
4
  return msg.method !== void 0;
package/dev/vs/index.js CHANGED
@@ -1,4 +1,4 @@
1
- define("vs/index", ["exports", "./index-B6BbYPbd", "./basic-languages/monaco.contribution", "./monaco.contribution-BDawsTgN", "./monaco.contribution-BeG0esy9", "./monaco.contribution--xL3D3ub", "./monaco.contribution-DnLriG_F", "./toggleHighContrast-BNT2cIi9", "./editor-DIBnF2vM"], (function(exports, index, src_deprecated_basicLanguages_monaco_contribution_ts, src_deprecated_language_css_monaco_contribution_ts, src_deprecated_language_html_monaco_contribution_ts, src_deprecated_language_json_monaco_contribution_ts, src_deprecated_language_typescript_monaco_contribution_ts, toggleHighContrast, editor) {
1
+ define("vs/index", ["exports", "./index-edAhY9q3", "./basic-languages/monaco.contribution", "./monaco.contribution-BkTWBQnD", "./monaco.contribution-DMd-tGrU", "./monaco.contribution-rPRCxtXO", "./monaco.contribution-Bb_bwPfc", "./toggleHighContrast-D1jPdrd_", "./editor-BdQf5OuC"], (function(exports, index, src_deprecated_basicLanguages_monaco_contribution_ts, src_deprecated_language_css_monaco_contribution_ts, src_deprecated_language_html_monaco_contribution_ts, src_deprecated_language_json_monaco_contribution_ts, src_deprecated_language_typescript_monaco_contribution_ts, toggleHighContrast, editor) {
2
2
  "use strict";
3
3
  exports.lsp = index.index;
4
4
  exports.css = src_deprecated_language_css_monaco_contribution_ts.register;
@@ -1,4 +1,4 @@
1
- define("vs/javascript-BFEMQrLZ", ["exports", "./typescript-Ds08Xzl9"], (function(exports, typescript) {
1
+ define("vs/javascript-DjefjLWu", ["exports", "./typescript-DKMHKK3f"], (function(exports, typescript) {
2
2
  "use strict";
3
3
  const conf = typescript.conf;
4
4
  const language = {
@@ -1,4 +1,4 @@
1
- define("vs/jsonMode-D6xKS7Zn", ["exports", "./json.worker-C7Z_4Gfh", "./workers-CmngtJ4R", "./lspLanguageFeatures-DJfiDpKo", "./main-Du7ctCk0", "./editor-DIBnF2vM"], (function(exports, json_worker, workers, lspLanguageFeatures, main, editor) {
1
+ define("vs/jsonMode-CD9PmrZn", ["exports", "./json.worker-C7Z_4Gfh", "./workers-Ca_jc1jc", "./lspLanguageFeatures-CElBQQjP", "./main-Du7ctCk0", "./editor-BdQf5OuC"], (function(exports, json_worker, workers, lspLanguageFeatures, main, editor) {
2
2
  "use strict";
3
3
  const STOP_WHEN_IDLE_FOR = 2 * 60 * 1e3;
4
4
  class WorkerManager {
@@ -1,4 +1,4 @@
1
- define("vs/language/css/monaco.contribution", ["exports", "../../monaco.contribution-BDawsTgN"], (function(exports, src_deprecated_language_css_monaco_contribution_ts) {
1
+ define("vs/language/css/monaco.contribution", ["exports", "../../monaco.contribution-BkTWBQnD"], (function(exports, src_deprecated_language_css_monaco_contribution_ts) {
2
2
  "use strict";
3
3
  exports.cssDefaults = src_deprecated_language_css_monaco_contribution_ts.cssDefaults;
4
4
  exports.lessDefaults = src_deprecated_language_css_monaco_contribution_ts.lessDefaults;
@@ -1,4 +1,4 @@
1
- define("vs/language/html/monaco.contribution", ["exports", "../../monaco.contribution-BeG0esy9"], (function(exports, src_deprecated_language_html_monaco_contribution_ts) {
1
+ define("vs/language/html/monaco.contribution", ["exports", "../../monaco.contribution-DMd-tGrU"], (function(exports, src_deprecated_language_html_monaco_contribution_ts) {
2
2
  "use strict";
3
3
  exports.handlebarDefaults = src_deprecated_language_html_monaco_contribution_ts.handlebarDefaults;
4
4
  exports.handlebarLanguageService = src_deprecated_language_html_monaco_contribution_ts.handlebarLanguageService;
@@ -1,4 +1,4 @@
1
- define("vs/language/json/monaco.contribution", ["exports", "../../monaco.contribution--xL3D3ub"], (function(exports, src_deprecated_language_json_monaco_contribution_ts) {
1
+ define("vs/language/json/monaco.contribution", ["exports", "../../monaco.contribution-rPRCxtXO"], (function(exports, src_deprecated_language_json_monaco_contribution_ts) {
2
2
  "use strict";
3
3
  exports.getWorker = src_deprecated_language_json_monaco_contribution_ts.getWorker;
4
4
  exports.jsonDefaults = src_deprecated_language_json_monaco_contribution_ts.jsonDefaults;
@@ -1,4 +1,4 @@
1
- define("vs/language/typescript/monaco.contribution", ["exports", "../../monaco.contribution-DnLriG_F"], (function(exports, src_deprecated_language_typescript_monaco_contribution_ts) {
1
+ define("vs/language/typescript/monaco.contribution", ["exports", "../../monaco.contribution-Bb_bwPfc"], (function(exports, src_deprecated_language_typescript_monaco_contribution_ts) {
2
2
  "use strict";
3
3
  exports.JsxEmit = src_deprecated_language_typescript_monaco_contribution_ts.JsxEmit;
4
4
  exports.ModuleKind = src_deprecated_language_typescript_monaco_contribution_ts.ModuleKind;
@@ -1,4 +1,4 @@
1
- define("vs/liquid-DiuJNaMD", ["exports", "./editor-DIBnF2vM"], (function(exports, editor) {
1
+ define("vs/liquid-uhKlujcM", ["exports", "./editor-BdQf5OuC"], (function(exports, editor) {
2
2
  "use strict";
3
3
  const EMPTY_ELEMENTS = [
4
4
  "area",