@opensumi/ide-core-browser 2.12.1-next-079c1930

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 (851) hide show
  1. package/README.md +16 -0
  2. package/lib/application/application-state-service.d.ts +16 -0
  3. package/lib/application/application-state-service.d.ts.map +1 -0
  4. package/lib/application/application-state-service.js +47 -0
  5. package/lib/application/application-state-service.js.map +1 -0
  6. package/lib/application/application.service.d.ts +11 -0
  7. package/lib/application/application.service.d.ts.map +1 -0
  8. package/lib/application/application.service.js +41 -0
  9. package/lib/application/application.service.js.map +1 -0
  10. package/lib/application/index.d.ts +3 -0
  11. package/lib/application/index.d.ts.map +1 -0
  12. package/lib/application/index.js +6 -0
  13. package/lib/application/index.js.map +1 -0
  14. package/lib/authentication/authentication.contribution.d.ts +8 -0
  15. package/lib/authentication/authentication.contribution.d.ts.map +1 -0
  16. package/lib/authentication/authentication.contribution.js +32 -0
  17. package/lib/authentication/authentication.contribution.js.map +1 -0
  18. package/lib/authentication/authentication.service.d.ts +54 -0
  19. package/lib/authentication/authentication.service.d.ts.map +1 -0
  20. package/lib/authentication/authentication.service.js +413 -0
  21. package/lib/authentication/authentication.service.js.map +1 -0
  22. package/lib/bootstrap/app.d.ts +142 -0
  23. package/lib/bootstrap/app.d.ts.map +1 -0
  24. package/lib/bootstrap/app.js +516 -0
  25. package/lib/bootstrap/app.js.map +1 -0
  26. package/lib/bootstrap/app.view.d.ts +11 -0
  27. package/lib/bootstrap/app.view.d.ts.map +1 -0
  28. package/lib/bootstrap/app.view.js +72 -0
  29. package/lib/bootstrap/app.view.js.map +1 -0
  30. package/lib/bootstrap/connection.d.ts +7 -0
  31. package/lib/bootstrap/connection.d.ts.map +1 -0
  32. package/lib/bootstrap/connection.js +78 -0
  33. package/lib/bootstrap/connection.js.map +1 -0
  34. package/lib/bootstrap/index.d.ts +4 -0
  35. package/lib/bootstrap/index.d.ts.map +1 -0
  36. package/lib/bootstrap/index.js +7 -0
  37. package/lib/bootstrap/index.js.map +1 -0
  38. package/lib/bootstrap/inner-providers.d.ts +3 -0
  39. package/lib/bootstrap/inner-providers.d.ts.map +1 -0
  40. package/lib/bootstrap/inner-providers.js +231 -0
  41. package/lib/bootstrap/inner-providers.js.map +1 -0
  42. package/lib/browser-module.d.ts +20 -0
  43. package/lib/browser-module.d.ts.map +1 -0
  44. package/lib/browser-module.js +15 -0
  45. package/lib/browser-module.js.map +1 -0
  46. package/lib/common/common.command.d.ts +156 -0
  47. package/lib/common/common.command.d.ts.map +1 -0
  48. package/lib/common/common.command.js +611 -0
  49. package/lib/common/common.command.js.map +1 -0
  50. package/lib/common/common.contribution.d.ts +22 -0
  51. package/lib/common/common.contribution.d.ts.map +1 -0
  52. package/lib/common/common.contribution.js +241 -0
  53. package/lib/common/common.contribution.js.map +1 -0
  54. package/lib/common/common.define.d.ts +47 -0
  55. package/lib/common/common.define.d.ts.map +1 -0
  56. package/lib/common/common.define.js +5 -0
  57. package/lib/common/common.define.js.map +1 -0
  58. package/lib/common/common.module.d.ts +13 -0
  59. package/lib/common/common.module.d.ts.map +1 -0
  60. package/lib/common/common.module.js +41 -0
  61. package/lib/common/common.module.js.map +1 -0
  62. package/lib/common/common.storage.d.ts +9 -0
  63. package/lib/common/common.storage.d.ts.map +1 -0
  64. package/lib/common/common.storage.js +25 -0
  65. package/lib/common/common.storage.js.map +1 -0
  66. package/lib/common/index.d.ts +5 -0
  67. package/lib/common/index.d.ts.map +1 -0
  68. package/lib/common/index.js +8 -0
  69. package/lib/common/index.js.map +1 -0
  70. package/lib/components/actions/index.d.ts +77 -0
  71. package/lib/components/actions/index.d.ts.map +1 -0
  72. package/lib/components/actions/index.js +201 -0
  73. package/lib/components/actions/index.js.map +1 -0
  74. package/lib/components/actions/placements.d.ts +58 -0
  75. package/lib/components/actions/placements.d.ts.map +1 -0
  76. package/lib/components/actions/placements.js +48 -0
  77. package/lib/components/actions/placements.js.map +1 -0
  78. package/lib/components/actions/styles.module.less +128 -0
  79. package/lib/components/badge/index.d.ts +2 -0
  80. package/lib/components/badge/index.d.ts.map +1 -0
  81. package/lib/components/badge/index.js +6 -0
  82. package/lib/components/badge/index.js.map +1 -0
  83. package/lib/components/click-outside/index.d.ts +6 -0
  84. package/lib/components/click-outside/index.d.ts.map +1 -0
  85. package/lib/components/click-outside/index.js +27 -0
  86. package/lib/components/click-outside/index.js.map +1 -0
  87. package/lib/components/index.d.ts +25 -0
  88. package/lib/components/index.d.ts.map +1 -0
  89. package/lib/components/index.js +30 -0
  90. package/lib/components/index.js.map +1 -0
  91. package/lib/components/layout/box-panel.d.ts +18 -0
  92. package/lib/components/layout/box-panel.d.ts.map +1 -0
  93. package/lib/components/layout/box-panel.js +20 -0
  94. package/lib/components/layout/box-panel.js.map +1 -0
  95. package/lib/components/layout/default-layout.d.ts +15 -0
  96. package/lib/components/layout/default-layout.d.ts.map +1 -0
  97. package/lib/components/layout/default-layout.js +39 -0
  98. package/lib/components/layout/default-layout.js.map +1 -0
  99. package/lib/components/layout/index.d.ts +5 -0
  100. package/lib/components/layout/index.d.ts.map +1 -0
  101. package/lib/components/layout/index.js +8 -0
  102. package/lib/components/layout/index.js.map +1 -0
  103. package/lib/components/layout/layout.d.ts +13 -0
  104. package/lib/components/layout/layout.d.ts.map +1 -0
  105. package/lib/components/layout/layout.js +72 -0
  106. package/lib/components/layout/layout.js.map +1 -0
  107. package/lib/components/layout/split-panel.d.ts +38 -0
  108. package/lib/components/layout/split-panel.d.ts.map +1 -0
  109. package/lib/components/layout/split-panel.js +182 -0
  110. package/lib/components/layout/split-panel.js.map +1 -0
  111. package/lib/components/layout/split-panel.service.d.ts +16 -0
  112. package/lib/components/layout/split-panel.service.d.ts.map +1 -0
  113. package/lib/components/layout/split-panel.service.js +69 -0
  114. package/lib/components/layout/split-panel.service.js.map +1 -0
  115. package/lib/components/layout/styles.module.less +119 -0
  116. package/lib/components/loading/index.d.ts +2 -0
  117. package/lib/components/loading/index.d.ts.map +1 -0
  118. package/lib/components/loading/index.js +5 -0
  119. package/lib/components/loading/index.js.map +1 -0
  120. package/lib/components/loading/loading.less +14 -0
  121. package/lib/components/loading/loading.view.d.ts +4 -0
  122. package/lib/components/loading/loading.view.d.ts.map +1 -0
  123. package/lib/components/loading/loading.view.js +12 -0
  124. package/lib/components/loading/loading.view.js.map +1 -0
  125. package/lib/components/loading/media/loading-dark.svg +52 -0
  126. package/lib/components/loading/media/loading-hc.svg +52 -0
  127. package/lib/components/loading/media/loading.svg +52 -0
  128. package/lib/components/popover/styles.module.less +81 -0
  129. package/lib/components/portal/index.d.ts +6 -0
  130. package/lib/components/portal/index.d.ts.map +1 -0
  131. package/lib/components/portal/index.js +11 -0
  132. package/lib/components/portal/index.js.map +1 -0
  133. package/lib/components/progressbar/index.d.ts +5 -0
  134. package/lib/components/progressbar/index.d.ts.map +1 -0
  135. package/lib/components/progressbar/index.js +15 -0
  136. package/lib/components/progressbar/index.js.map +1 -0
  137. package/lib/components/progressbar/styles.module.less +31 -0
  138. package/lib/components/recycle-tree/index.d.ts +2 -0
  139. package/lib/components/recycle-tree/index.d.ts.map +1 -0
  140. package/lib/components/recycle-tree/index.js +5 -0
  141. package/lib/components/recycle-tree/index.js.map +1 -0
  142. package/lib/components/recycle-tree/recycle-tree.view.d.ts +82 -0
  143. package/lib/components/recycle-tree/recycle-tree.view.d.ts.map +1 -0
  144. package/lib/components/recycle-tree/recycle-tree.view.js +192 -0
  145. package/lib/components/recycle-tree/recycle-tree.view.js.map +1 -0
  146. package/lib/components/resize/resize.d.ts +39 -0
  147. package/lib/components/resize/resize.d.ts.map +1 -0
  148. package/lib/components/resize/resize.js +609 -0
  149. package/lib/components/resize/resize.js.map +1 -0
  150. package/lib/components/resize/resize.module.less +78 -0
  151. package/lib/components/scrollbar/index.d.ts +2 -0
  152. package/lib/components/scrollbar/index.d.ts.map +1 -0
  153. package/lib/components/scrollbar/index.js +5 -0
  154. package/lib/components/scrollbar/index.js.map +1 -0
  155. package/lib/components/scrollbar/scrollbar.less +36 -0
  156. package/lib/components/scrollbar/scrollbar.view.d.ts +7 -0
  157. package/lib/components/scrollbar/scrollbar.view.d.ts.map +1 -0
  158. package/lib/components/scrollbar/scrollbar.view.js +11 -0
  159. package/lib/components/scrollbar/scrollbar.view.js.map +1 -0
  160. package/lib/components/select/index.d.ts +4 -0
  161. package/lib/components/select/index.d.ts.map +1 -0
  162. package/lib/components/select/index.js +14 -0
  163. package/lib/components/select/index.js.map +1 -0
  164. package/lib/components/select/styles.less +8 -0
  165. package/lib/components/tree/index.d.ts +4 -0
  166. package/lib/components/tree/index.d.ts.map +1 -0
  167. package/lib/components/tree/index.js +7 -0
  168. package/lib/components/tree/index.js.map +1 -0
  169. package/lib/components/tree/tree-node.view.d.ts +26 -0
  170. package/lib/components/tree/tree-node.view.d.ts.map +1 -0
  171. package/lib/components/tree/tree-node.view.js +346 -0
  172. package/lib/components/tree/tree-node.view.js.map +1 -0
  173. package/lib/components/tree/tree.module.less +295 -0
  174. package/lib/components/tree/tree.view.d.ts +132 -0
  175. package/lib/components/tree/tree.view.d.ts.map +1 -0
  176. package/lib/components/tree/tree.view.js +246 -0
  177. package/lib/components/tree/tree.view.js.map +1 -0
  178. package/lib/context-key.d.ts +32 -0
  179. package/lib/context-key.d.ts.map +1 -0
  180. package/lib/context-key.js +9 -0
  181. package/lib/context-key.js.map +1 -0
  182. package/lib/contextkey/explorer.d.ts +16 -0
  183. package/lib/contextkey/explorer.d.ts.map +1 -0
  184. package/lib/contextkey/explorer.js +20 -0
  185. package/lib/contextkey/explorer.js.map +1 -0
  186. package/lib/contextkey/index.d.ts +6 -0
  187. package/lib/contextkey/index.d.ts.map +1 -0
  188. package/lib/contextkey/index.js +9 -0
  189. package/lib/contextkey/index.js.map +1 -0
  190. package/lib/contextkey/outline.d.ts +4 -0
  191. package/lib/contextkey/outline.d.ts.map +1 -0
  192. package/lib/contextkey/outline.js +7 -0
  193. package/lib/contextkey/outline.js.map +1 -0
  194. package/lib/contextkey/resource.d.ts +17 -0
  195. package/lib/contextkey/resource.d.ts.map +1 -0
  196. package/lib/contextkey/resource.js +45 -0
  197. package/lib/contextkey/resource.js.map +1 -0
  198. package/lib/contextkey/terminal.d.ts +7 -0
  199. package/lib/contextkey/terminal.d.ts.map +1 -0
  200. package/lib/contextkey/terminal.js +10 -0
  201. package/lib/contextkey/terminal.js.map +1 -0
  202. package/lib/contextkey/workspace.d.ts +7 -0
  203. package/lib/contextkey/workspace.d.ts.map +1 -0
  204. package/lib/contextkey/workspace.js +10 -0
  205. package/lib/contextkey/workspace.js.map +1 -0
  206. package/lib/core-preferences.d.ts +57 -0
  207. package/lib/core-preferences.d.ts.map +1 -0
  208. package/lib/core-preferences.js +328 -0
  209. package/lib/core-preferences.js.map +1 -0
  210. package/lib/dom/index.d.ts +68 -0
  211. package/lib/dom/index.d.ts.map +1 -0
  212. package/lib/dom/index.js +126 -0
  213. package/lib/dom/index.js.map +1 -0
  214. package/lib/encoding-registry.d.ts +31 -0
  215. package/lib/encoding-registry.d.ts.map +1 -0
  216. package/lib/encoding-registry.js +85 -0
  217. package/lib/encoding-registry.js.map +1 -0
  218. package/lib/fs/index.d.ts +12 -0
  219. package/lib/fs/index.d.ts.map +1 -0
  220. package/lib/fs/index.js +9 -0
  221. package/lib/fs/index.js.map +1 -0
  222. package/lib/hash-calculate/hash-calculate.contribution.d.ts +6 -0
  223. package/lib/hash-calculate/hash-calculate.contribution.d.ts.map +1 -0
  224. package/lib/hash-calculate/hash-calculate.contribution.js +27 -0
  225. package/lib/hash-calculate/hash-calculate.contribution.js.map +1 -0
  226. package/lib/index.d.ts +28 -0
  227. package/lib/index.d.ts.map +1 -0
  228. package/lib/index.js +34 -0
  229. package/lib/index.js.map +1 -0
  230. package/lib/keybinding/index.d.ts +2 -0
  231. package/lib/keybinding/index.d.ts.map +1 -0
  232. package/lib/keybinding/index.js +5 -0
  233. package/lib/keybinding/index.js.map +1 -0
  234. package/lib/keybinding/keybinding.d.ts +340 -0
  235. package/lib/keybinding/keybinding.d.ts.map +1 -0
  236. package/lib/keybinding/keybinding.js +720 -0
  237. package/lib/keybinding/keybinding.js.map +1 -0
  238. package/lib/keyboard/index.d.ts +4 -0
  239. package/lib/keyboard/index.d.ts.map +1 -0
  240. package/lib/keyboard/index.js +7 -0
  241. package/lib/keyboard/index.js.map +1 -0
  242. package/lib/keyboard/keyboard-layout-provider.d.ts +92 -0
  243. package/lib/keyboard/keyboard-layout-provider.d.ts.map +1 -0
  244. package/lib/keyboard/keyboard-layout-provider.js +344 -0
  245. package/lib/keyboard/keyboard-layout-provider.js.map +1 -0
  246. package/lib/keyboard/keyboard-layout-service.d.ts +65 -0
  247. package/lib/keyboard/keyboard-layout-service.d.ts.map +1 -0
  248. package/lib/keyboard/keyboard-layout-service.js +415 -0
  249. package/lib/keyboard/keyboard-layout-service.js.map +1 -0
  250. package/lib/keyboard/keys.d.ts +294 -0
  251. package/lib/keyboard/keys.d.ts.map +1 -0
  252. package/lib/keyboard/keys.js +699 -0
  253. package/lib/keyboard/keys.js.map +1 -0
  254. package/lib/keyboard/layouts/_.contribution.d.ts +9 -0
  255. package/lib/keyboard/layouts/_.contribution.d.ts.map +1 -0
  256. package/lib/keyboard/layouts/_.contribution.js +21 -0
  257. package/lib/keyboard/layouts/_.contribution.js.map +1 -0
  258. package/lib/keyboard/layouts/cz.win.d.ts +2 -0
  259. package/lib/keyboard/layouts/cz.win.d.ts.map +1 -0
  260. package/lib/keyboard/layouts/cz.win.js +169 -0
  261. package/lib/keyboard/layouts/cz.win.js.map +1 -0
  262. package/lib/keyboard/layouts/de-swiss.win.d.ts +2 -0
  263. package/lib/keyboard/layouts/de-swiss.win.d.ts.map +1 -0
  264. package/lib/keyboard/layouts/de-swiss.win.js +169 -0
  265. package/lib/keyboard/layouts/de-swiss.win.js.map +1 -0
  266. package/lib/keyboard/layouts/de.darwin.d.ts +2 -0
  267. package/lib/keyboard/layouts/de.darwin.d.ts.map +1 -0
  268. package/lib/keyboard/layouts/de.darwin.js +132 -0
  269. package/lib/keyboard/layouts/de.darwin.js.map +1 -0
  270. package/lib/keyboard/layouts/de.linux.d.ts +2 -0
  271. package/lib/keyboard/layouts/de.linux.d.ts.map +1 -0
  272. package/lib/keyboard/layouts/de.linux.js +187 -0
  273. package/lib/keyboard/layouts/de.linux.js.map +1 -0
  274. package/lib/keyboard/layouts/de.win.d.ts +2 -0
  275. package/lib/keyboard/layouts/de.win.d.ts.map +1 -0
  276. package/lib/keyboard/layouts/de.win.js +169 -0
  277. package/lib/keyboard/layouts/de.win.js.map +1 -0
  278. package/lib/keyboard/layouts/dk.win.d.ts +2 -0
  279. package/lib/keyboard/layouts/dk.win.d.ts.map +1 -0
  280. package/lib/keyboard/layouts/dk.win.js +169 -0
  281. package/lib/keyboard/layouts/dk.win.js.map +1 -0
  282. package/lib/keyboard/layouts/dvorak.darwin.d.ts +2 -0
  283. package/lib/keyboard/layouts/dvorak.darwin.d.ts.map +1 -0
  284. package/lib/keyboard/layouts/dvorak.darwin.js +132 -0
  285. package/lib/keyboard/layouts/dvorak.darwin.js.map +1 -0
  286. package/lib/keyboard/layouts/en-belgian.win.d.ts +2 -0
  287. package/lib/keyboard/layouts/en-belgian.win.d.ts.map +1 -0
  288. package/lib/keyboard/layouts/en-belgian.win.js +169 -0
  289. package/lib/keyboard/layouts/en-belgian.win.js.map +1 -0
  290. package/lib/keyboard/layouts/en-ext.darwin.d.ts +2 -0
  291. package/lib/keyboard/layouts/en-ext.darwin.d.ts.map +1 -0
  292. package/lib/keyboard/layouts/en-ext.darwin.js +132 -0
  293. package/lib/keyboard/layouts/en-ext.darwin.js.map +1 -0
  294. package/lib/keyboard/layouts/en-in.win.d.ts +2 -0
  295. package/lib/keyboard/layouts/en-in.win.d.ts.map +1 -0
  296. package/lib/keyboard/layouts/en-in.win.js +169 -0
  297. package/lib/keyboard/layouts/en-in.win.js.map +1 -0
  298. package/lib/keyboard/layouts/en-intl.darwin.d.ts +2 -0
  299. package/lib/keyboard/layouts/en-intl.darwin.d.ts.map +1 -0
  300. package/lib/keyboard/layouts/en-intl.darwin.js +132 -0
  301. package/lib/keyboard/layouts/en-intl.darwin.js.map +1 -0
  302. package/lib/keyboard/layouts/en-intl.win.d.ts +2 -0
  303. package/lib/keyboard/layouts/en-intl.win.d.ts.map +1 -0
  304. package/lib/keyboard/layouts/en-intl.win.js +169 -0
  305. package/lib/keyboard/layouts/en-intl.win.js.map +1 -0
  306. package/lib/keyboard/layouts/en-uk.darwin.d.ts +2 -0
  307. package/lib/keyboard/layouts/en-uk.darwin.d.ts.map +1 -0
  308. package/lib/keyboard/layouts/en-uk.darwin.js +132 -0
  309. package/lib/keyboard/layouts/en-uk.darwin.js.map +1 -0
  310. package/lib/keyboard/layouts/en-uk.win.d.ts +2 -0
  311. package/lib/keyboard/layouts/en-uk.win.d.ts.map +1 -0
  312. package/lib/keyboard/layouts/en-uk.win.js +169 -0
  313. package/lib/keyboard/layouts/en-uk.win.js.map +1 -0
  314. package/lib/keyboard/layouts/en.darwin.d.ts +2 -0
  315. package/lib/keyboard/layouts/en.darwin.d.ts.map +1 -0
  316. package/lib/keyboard/layouts/en.darwin.js +140 -0
  317. package/lib/keyboard/layouts/en.darwin.js.map +1 -0
  318. package/lib/keyboard/layouts/en.linux.d.ts +2 -0
  319. package/lib/keyboard/layouts/en.linux.d.ts.map +1 -0
  320. package/lib/keyboard/layouts/en.linux.js +189 -0
  321. package/lib/keyboard/layouts/en.linux.js.map +1 -0
  322. package/lib/keyboard/layouts/en.win.d.ts +2 -0
  323. package/lib/keyboard/layouts/en.win.d.ts.map +1 -0
  324. package/lib/keyboard/layouts/en.win.js +174 -0
  325. package/lib/keyboard/layouts/en.win.js.map +1 -0
  326. package/lib/keyboard/layouts/es-latin.win.d.ts +2 -0
  327. package/lib/keyboard/layouts/es-latin.win.d.ts.map +1 -0
  328. package/lib/keyboard/layouts/es-latin.win.js +169 -0
  329. package/lib/keyboard/layouts/es-latin.win.js.map +1 -0
  330. package/lib/keyboard/layouts/es.darwin.d.ts +2 -0
  331. package/lib/keyboard/layouts/es.darwin.d.ts.map +1 -0
  332. package/lib/keyboard/layouts/es.darwin.js +132 -0
  333. package/lib/keyboard/layouts/es.darwin.js.map +1 -0
  334. package/lib/keyboard/layouts/es.linux.d.ts +2 -0
  335. package/lib/keyboard/layouts/es.linux.d.ts.map +1 -0
  336. package/lib/keyboard/layouts/es.linux.js +187 -0
  337. package/lib/keyboard/layouts/es.linux.js.map +1 -0
  338. package/lib/keyboard/layouts/es.win.d.ts +2 -0
  339. package/lib/keyboard/layouts/es.win.d.ts.map +1 -0
  340. package/lib/keyboard/layouts/es.win.js +169 -0
  341. package/lib/keyboard/layouts/es.win.js.map +1 -0
  342. package/lib/keyboard/layouts/fr.darwin.d.ts +2 -0
  343. package/lib/keyboard/layouts/fr.darwin.d.ts.map +1 -0
  344. package/lib/keyboard/layouts/fr.darwin.js +132 -0
  345. package/lib/keyboard/layouts/fr.darwin.js.map +1 -0
  346. package/lib/keyboard/layouts/fr.linux.d.ts +2 -0
  347. package/lib/keyboard/layouts/fr.linux.d.ts.map +1 -0
  348. package/lib/keyboard/layouts/fr.linux.js +187 -0
  349. package/lib/keyboard/layouts/fr.linux.js.map +1 -0
  350. package/lib/keyboard/layouts/fr.win.d.ts +2 -0
  351. package/lib/keyboard/layouts/fr.win.d.ts.map +1 -0
  352. package/lib/keyboard/layouts/fr.win.js +169 -0
  353. package/lib/keyboard/layouts/fr.win.js.map +1 -0
  354. package/lib/keyboard/layouts/hu.win.d.ts +2 -0
  355. package/lib/keyboard/layouts/hu.win.d.ts.map +1 -0
  356. package/lib/keyboard/layouts/hu.win.js +169 -0
  357. package/lib/keyboard/layouts/hu.win.js.map +1 -0
  358. package/lib/keyboard/layouts/it.darwin.d.ts +2 -0
  359. package/lib/keyboard/layouts/it.darwin.d.ts.map +1 -0
  360. package/lib/keyboard/layouts/it.darwin.js +132 -0
  361. package/lib/keyboard/layouts/it.darwin.js.map +1 -0
  362. package/lib/keyboard/layouts/it.win.d.ts +2 -0
  363. package/lib/keyboard/layouts/it.win.d.ts.map +1 -0
  364. package/lib/keyboard/layouts/it.win.js +169 -0
  365. package/lib/keyboard/layouts/it.win.js.map +1 -0
  366. package/lib/keyboard/layouts/jp-roman.darwin.d.ts +2 -0
  367. package/lib/keyboard/layouts/jp-roman.darwin.d.ts.map +1 -0
  368. package/lib/keyboard/layouts/jp-roman.darwin.js +132 -0
  369. package/lib/keyboard/layouts/jp-roman.darwin.js.map +1 -0
  370. package/lib/keyboard/layouts/jp.darwin.d.ts +2 -0
  371. package/lib/keyboard/layouts/jp.darwin.d.ts.map +1 -0
  372. package/lib/keyboard/layouts/jp.darwin.js +132 -0
  373. package/lib/keyboard/layouts/jp.darwin.js.map +1 -0
  374. package/lib/keyboard/layouts/ko.darwin.d.ts +2 -0
  375. package/lib/keyboard/layouts/ko.darwin.d.ts.map +1 -0
  376. package/lib/keyboard/layouts/ko.darwin.js +132 -0
  377. package/lib/keyboard/layouts/ko.darwin.js.map +1 -0
  378. package/lib/keyboard/layouts/layout.contribution.d.ts +3 -0
  379. package/lib/keyboard/layouts/layout.contribution.d.ts.map +1 -0
  380. package/lib/keyboard/layouts/layout.contribution.darwin.d.ts +2 -0
  381. package/lib/keyboard/layouts/layout.contribution.darwin.d.ts.map +1 -0
  382. package/lib/keyboard/layouts/layout.contribution.darwin.js +27 -0
  383. package/lib/keyboard/layouts/layout.contribution.darwin.js.map +1 -0
  384. package/lib/keyboard/layouts/layout.contribution.js +11 -0
  385. package/lib/keyboard/layouts/layout.contribution.js.map +1 -0
  386. package/lib/keyboard/layouts/layout.contribution.linux.d.ts +2 -0
  387. package/lib/keyboard/layouts/layout.contribution.linux.d.ts.map +1 -0
  388. package/lib/keyboard/layouts/layout.contribution.linux.js +16 -0
  389. package/lib/keyboard/layouts/layout.contribution.linux.js.map +1 -0
  390. package/lib/keyboard/layouts/layout.contribution.win.d.ts +2 -0
  391. package/lib/keyboard/layouts/layout.contribution.win.d.ts.map +1 -0
  392. package/lib/keyboard/layouts/layout.contribution.win.js +33 -0
  393. package/lib/keyboard/layouts/layout.contribution.win.js.map +1 -0
  394. package/lib/keyboard/layouts/no.win.d.ts +2 -0
  395. package/lib/keyboard/layouts/no.win.d.ts.map +1 -0
  396. package/lib/keyboard/layouts/no.win.js +169 -0
  397. package/lib/keyboard/layouts/no.win.js.map +1 -0
  398. package/lib/keyboard/layouts/pl.darwin.d.ts +2 -0
  399. package/lib/keyboard/layouts/pl.darwin.d.ts.map +1 -0
  400. package/lib/keyboard/layouts/pl.darwin.js +132 -0
  401. package/lib/keyboard/layouts/pl.darwin.js.map +1 -0
  402. package/lib/keyboard/layouts/pl.win.d.ts +2 -0
  403. package/lib/keyboard/layouts/pl.win.d.ts.map +1 -0
  404. package/lib/keyboard/layouts/pl.win.js +169 -0
  405. package/lib/keyboard/layouts/pl.win.js.map +1 -0
  406. package/lib/keyboard/layouts/pt-br.win.d.ts +2 -0
  407. package/lib/keyboard/layouts/pt-br.win.d.ts.map +1 -0
  408. package/lib/keyboard/layouts/pt-br.win.js +169 -0
  409. package/lib/keyboard/layouts/pt-br.win.js.map +1 -0
  410. package/lib/keyboard/layouts/pt.darwin.d.ts +2 -0
  411. package/lib/keyboard/layouts/pt.darwin.d.ts.map +1 -0
  412. package/lib/keyboard/layouts/pt.darwin.js +132 -0
  413. package/lib/keyboard/layouts/pt.darwin.js.map +1 -0
  414. package/lib/keyboard/layouts/pt.win.d.ts +2 -0
  415. package/lib/keyboard/layouts/pt.win.d.ts.map +1 -0
  416. package/lib/keyboard/layouts/pt.win.js +169 -0
  417. package/lib/keyboard/layouts/pt.win.js.map +1 -0
  418. package/lib/keyboard/layouts/ru.darwin.d.ts +2 -0
  419. package/lib/keyboard/layouts/ru.darwin.d.ts.map +1 -0
  420. package/lib/keyboard/layouts/ru.darwin.js +132 -0
  421. package/lib/keyboard/layouts/ru.darwin.js.map +1 -0
  422. package/lib/keyboard/layouts/ru.linux.d.ts +2 -0
  423. package/lib/keyboard/layouts/ru.linux.d.ts.map +1 -0
  424. package/lib/keyboard/layouts/ru.linux.js +187 -0
  425. package/lib/keyboard/layouts/ru.linux.js.map +1 -0
  426. package/lib/keyboard/layouts/ru.win.d.ts +2 -0
  427. package/lib/keyboard/layouts/ru.win.d.ts.map +1 -0
  428. package/lib/keyboard/layouts/ru.win.js +169 -0
  429. package/lib/keyboard/layouts/ru.win.js.map +1 -0
  430. package/lib/keyboard/layouts/sv.darwin.d.ts +2 -0
  431. package/lib/keyboard/layouts/sv.darwin.d.ts.map +1 -0
  432. package/lib/keyboard/layouts/sv.darwin.js +132 -0
  433. package/lib/keyboard/layouts/sv.darwin.js.map +1 -0
  434. package/lib/keyboard/layouts/sv.win.d.ts +2 -0
  435. package/lib/keyboard/layouts/sv.win.d.ts.map +1 -0
  436. package/lib/keyboard/layouts/sv.win.js +171 -0
  437. package/lib/keyboard/layouts/sv.win.js.map +1 -0
  438. package/lib/keyboard/layouts/thai.win.d.ts +2 -0
  439. package/lib/keyboard/layouts/thai.win.d.ts.map +1 -0
  440. package/lib/keyboard/layouts/thai.win.js +169 -0
  441. package/lib/keyboard/layouts/thai.win.js.map +1 -0
  442. package/lib/keyboard/layouts/tr.win.d.ts +2 -0
  443. package/lib/keyboard/layouts/tr.win.d.ts.map +1 -0
  444. package/lib/keyboard/layouts/tr.win.js +169 -0
  445. package/lib/keyboard/layouts/tr.win.js.map +1 -0
  446. package/lib/keyboard/layouts/zh-hans.darwin.d.ts +2 -0
  447. package/lib/keyboard/layouts/zh-hans.darwin.d.ts.map +1 -0
  448. package/lib/keyboard/layouts/zh-hans.darwin.js +132 -0
  449. package/lib/keyboard/layouts/zh-hans.darwin.js.map +1 -0
  450. package/lib/layout/accordion/tab-bar-toolbar.d.ts +25 -0
  451. package/lib/layout/accordion/tab-bar-toolbar.d.ts.map +1 -0
  452. package/lib/layout/accordion/tab-bar-toolbar.js +37 -0
  453. package/lib/layout/accordion/tab-bar-toolbar.js.map +1 -0
  454. package/lib/layout/accordion/view-context-key.registry.d.ts +9 -0
  455. package/lib/layout/accordion/view-context-key.registry.d.ts.map +1 -0
  456. package/lib/layout/accordion/view-context-key.registry.js +38 -0
  457. package/lib/layout/accordion/view-context-key.registry.js.map +1 -0
  458. package/lib/layout/index.d.ts +103 -0
  459. package/lib/layout/index.d.ts.map +1 -0
  460. package/lib/layout/index.js +143 -0
  461. package/lib/layout/index.js.map +1 -0
  462. package/lib/layout/layout-state.d.ts +24 -0
  463. package/lib/layout/layout-state.d.ts.map +1 -0
  464. package/lib/layout/layout-state.js +99 -0
  465. package/lib/layout/layout-state.js.map +1 -0
  466. package/lib/logger/browser-logger.d.ts +17 -0
  467. package/lib/logger/browser-logger.d.ts.map +1 -0
  468. package/lib/logger/browser-logger.js +50 -0
  469. package/lib/logger/browser-logger.js.map +1 -0
  470. package/lib/logger/index.d.ts +2 -0
  471. package/lib/logger/index.d.ts.map +1 -0
  472. package/lib/logger/index.js +5 -0
  473. package/lib/logger/index.js.map +1 -0
  474. package/lib/menu/next/base.d.ts +242 -0
  475. package/lib/menu/next/base.d.ts.map +1 -0
  476. package/lib/menu/next/base.js +267 -0
  477. package/lib/menu/next/base.js.map +1 -0
  478. package/lib/menu/next/ctxmenu-service.d.ts +42 -0
  479. package/lib/menu/next/ctxmenu-service.d.ts.map +1 -0
  480. package/lib/menu/next/ctxmenu-service.js +151 -0
  481. package/lib/menu/next/ctxmenu-service.js.map +1 -0
  482. package/lib/menu/next/index.d.ts +11 -0
  483. package/lib/menu/next/index.d.ts.map +1 -0
  484. package/lib/menu/next/index.js +14 -0
  485. package/lib/menu/next/index.js.map +1 -0
  486. package/lib/menu/next/menu-id.d.ts +59 -0
  487. package/lib/menu/next/menu-id.d.ts.map +1 -0
  488. package/lib/menu/next/menu-id.js +73 -0
  489. package/lib/menu/next/menu-id.js.map +1 -0
  490. package/lib/menu/next/menu-service.d.ts +9 -0
  491. package/lib/menu/next/menu-service.d.ts.map +1 -0
  492. package/lib/menu/next/menu-service.js +205 -0
  493. package/lib/menu/next/menu-service.js.map +1 -0
  494. package/lib/menu/next/menu-util.d.ts +18 -0
  495. package/lib/menu/next/menu-util.d.ts.map +1 -0
  496. package/lib/menu/next/menu-util.js +64 -0
  497. package/lib/menu/next/menu-util.js.map +1 -0
  498. package/lib/menu/next/menu.contrib.interface.d.ts +22 -0
  499. package/lib/menu/next/menu.contrib.interface.d.ts.map +1 -0
  500. package/lib/menu/next/menu.contrib.interface.js +9 -0
  501. package/lib/menu/next/menu.contrib.interface.js.map +1 -0
  502. package/lib/menu/next/menu.interface.d.ts +100 -0
  503. package/lib/menu/next/menu.interface.d.ts.map +1 -0
  504. package/lib/menu/next/menu.interface.js +192 -0
  505. package/lib/menu/next/menu.interface.js.map +1 -0
  506. package/lib/menu/next/menubar-service.d.ts +53 -0
  507. package/lib/menu/next/menubar-service.d.ts.map +1 -0
  508. package/lib/menu/next/menubar-service.js +178 -0
  509. package/lib/menu/next/menubar-service.js.map +1 -0
  510. package/lib/menu/next/renderer/ctxmenu/base.d.ts +19 -0
  511. package/lib/menu/next/renderer/ctxmenu/base.d.ts.map +1 -0
  512. package/lib/menu/next/renderer/ctxmenu/base.js +7 -0
  513. package/lib/menu/next/renderer/ctxmenu/base.js.map +1 -0
  514. package/lib/menu/next/renderer/ctxmenu/browser.d.ts +19 -0
  515. package/lib/menu/next/renderer/ctxmenu/browser.d.ts.map +1 -0
  516. package/lib/menu/next/renderer/ctxmenu/browser.js +40 -0
  517. package/lib/menu/next/renderer/ctxmenu/browser.js.map +1 -0
  518. package/lib/menu/next/renderer/ctxmenu/electron.d.ts +34 -0
  519. package/lib/menu/next/renderer/ctxmenu/electron.d.ts.map +1 -0
  520. package/lib/menu/next/renderer/ctxmenu/electron.js +198 -0
  521. package/lib/menu/next/renderer/ctxmenu/electron.js.map +1 -0
  522. package/lib/menu/next/toolbar-action.service.d.ts +50 -0
  523. package/lib/menu/next/toolbar-action.service.d.ts.map +1 -0
  524. package/lib/menu/next/toolbar-action.service.js +93 -0
  525. package/lib/menu/next/toolbar-action.service.js.map +1 -0
  526. package/lib/monaco/index.d.ts +99 -0
  527. package/lib/monaco/index.d.ts.map +1 -0
  528. package/lib/monaco/index.js +32 -0
  529. package/lib/monaco/index.js.map +1 -0
  530. package/lib/opener/command-opener.d.ts +12 -0
  531. package/lib/opener/command-opener.d.ts.map +1 -0
  532. package/lib/opener/command-opener.js +49 -0
  533. package/lib/opener/command-opener.js.map +1 -0
  534. package/lib/opener/default-opener.d.ts +8 -0
  535. package/lib/opener/default-opener.d.ts.map +1 -0
  536. package/lib/opener/default-opener.js +32 -0
  537. package/lib/opener/default-opener.js.map +1 -0
  538. package/lib/opener/http-opener.d.ts +9 -0
  539. package/lib/opener/http-opener.d.ts.map +1 -0
  540. package/lib/opener/http-opener.js +33 -0
  541. package/lib/opener/http-opener.js.map +1 -0
  542. package/lib/opener/index.d.ts +16 -0
  543. package/lib/opener/index.d.ts.map +1 -0
  544. package/lib/opener/index.js +6 -0
  545. package/lib/opener/index.js.map +1 -0
  546. package/lib/opener/opener.contribution.d.ts +14 -0
  547. package/lib/opener/opener.contribution.d.ts.map +1 -0
  548. package/lib/opener/opener.contribution.js +63 -0
  549. package/lib/opener/opener.contribution.js.map +1 -0
  550. package/lib/opener/opener.service.d.ts +14 -0
  551. package/lib/opener/opener.service.d.ts.map +1 -0
  552. package/lib/opener/opener.service.js +67 -0
  553. package/lib/opener/opener.service.js.map +1 -0
  554. package/lib/preferences/early-preferences.d.ts +24 -0
  555. package/lib/preferences/early-preferences.d.ts.map +1 -0
  556. package/lib/preferences/early-preferences.js +96 -0
  557. package/lib/preferences/early-preferences.js.map +1 -0
  558. package/lib/preferences/index.d.ts +9 -0
  559. package/lib/preferences/index.d.ts.map +1 -0
  560. package/lib/preferences/index.js +12 -0
  561. package/lib/preferences/index.js.map +1 -0
  562. package/lib/preferences/preference-configurations.d.ts +22 -0
  563. package/lib/preferences/preference-configurations.d.ts.map +1 -0
  564. package/lib/preferences/preference-configurations.js +68 -0
  565. package/lib/preferences/preference-configurations.js.map +1 -0
  566. package/lib/preferences/preference-contribution.d.ts +82 -0
  567. package/lib/preferences/preference-contribution.d.ts.map +1 -0
  568. package/lib/preferences/preference-contribution.js +325 -0
  569. package/lib/preferences/preference-contribution.js.map +1 -0
  570. package/lib/preferences/preference-provider.d.ts +117 -0
  571. package/lib/preferences/preference-provider.d.ts.map +1 -0
  572. package/lib/preferences/preference-provider.js +275 -0
  573. package/lib/preferences/preference-provider.js.map +1 -0
  574. package/lib/preferences/preference-proxy.d.ts +45 -0
  575. package/lib/preferences/preference-proxy.d.ts.map +1 -0
  576. package/lib/preferences/preference-proxy.js +195 -0
  577. package/lib/preferences/preference-proxy.js.map +1 -0
  578. package/lib/preferences/preference-scope.d.ts +3 -0
  579. package/lib/preferences/preference-scope.d.ts.map +1 -0
  580. package/lib/preferences/preference-scope.js +6 -0
  581. package/lib/preferences/preference-scope.js.map +1 -0
  582. package/lib/preferences/preference-service.d.ts +194 -0
  583. package/lib/preferences/preference-service.d.ts.map +1 -0
  584. package/lib/preferences/preference-service.js +425 -0
  585. package/lib/preferences/preference-service.js.map +1 -0
  586. package/lib/preferences/settings.d.ts +41 -0
  587. package/lib/preferences/settings.d.ts.map +1 -0
  588. package/lib/preferences/settings.js +5 -0
  589. package/lib/preferences/settings.js.map +1 -0
  590. package/lib/progress/index.d.ts +36 -0
  591. package/lib/progress/index.d.ts.map +1 -0
  592. package/lib/progress/index.js +10 -0
  593. package/lib/progress/index.js.map +1 -0
  594. package/lib/progress/progress-bar.d.ts +7 -0
  595. package/lib/progress/progress-bar.d.ts.map +1 -0
  596. package/lib/progress/progress-bar.js +14 -0
  597. package/lib/progress/progress-bar.js.map +1 -0
  598. package/lib/progress/progress-indicator.d.ts +12 -0
  599. package/lib/progress/progress-indicator.d.ts.map +1 -0
  600. package/lib/progress/progress-indicator.js +106 -0
  601. package/lib/progress/progress-indicator.js.map +1 -0
  602. package/lib/progress/progress.module.less +40 -0
  603. package/lib/progress/progress.service.d.ts +19 -0
  604. package/lib/progress/progress.service.d.ts.map +1 -0
  605. package/lib/progress/progress.service.js +343 -0
  606. package/lib/progress/progress.service.js.map +1 -0
  607. package/lib/quick-open/index.d.ts +467 -0
  608. package/lib/quick-open/index.d.ts.map +1 -0
  609. package/lib/quick-open/index.js +145 -0
  610. package/lib/quick-open/index.js.map +1 -0
  611. package/lib/quick-open/recent-files.d.ts +11 -0
  612. package/lib/quick-open/recent-files.d.ts.map +1 -0
  613. package/lib/quick-open/recent-files.js +73 -0
  614. package/lib/quick-open/recent-files.js.map +1 -0
  615. package/lib/raw-context-key.d.ts +57 -0
  616. package/lib/raw-context-key.d.ts.map +1 -0
  617. package/lib/raw-context-key.js +96 -0
  618. package/lib/raw-context-key.js.map +1 -0
  619. package/lib/react-hooks/event.d.ts +11 -0
  620. package/lib/react-hooks/event.d.ts.map +1 -0
  621. package/lib/react-hooks/event.js +64 -0
  622. package/lib/react-hooks/event.js.map +1 -0
  623. package/lib/react-hooks/hot-key.d.ts +5 -0
  624. package/lib/react-hooks/hot-key.d.ts.map +1 -0
  625. package/lib/react-hooks/hot-key.js +48 -0
  626. package/lib/react-hooks/hot-key.js.map +1 -0
  627. package/lib/react-hooks/index.d.ts +4 -0
  628. package/lib/react-hooks/index.d.ts.map +1 -0
  629. package/lib/react-hooks/index.js +7 -0
  630. package/lib/react-hooks/index.js.map +1 -0
  631. package/lib/react-hooks/injectable-hooks.d.ts +3 -0
  632. package/lib/react-hooks/injectable-hooks.d.ts.map +1 -0
  633. package/lib/react-hooks/injectable-hooks.js +33 -0
  634. package/lib/react-hooks/injectable-hooks.js.map +1 -0
  635. package/lib/react-hooks/portal-hooks.d.ts +2 -0
  636. package/lib/react-hooks/portal-hooks.d.ts.map +1 -0
  637. package/lib/react-hooks/portal-hooks.js +36 -0
  638. package/lib/react-hooks/portal-hooks.js.map +1 -0
  639. package/lib/react-providers/config-provider.d.ts +182 -0
  640. package/lib/react-providers/config-provider.d.ts.map +1 -0
  641. package/lib/react-providers/config-provider.js +24 -0
  642. package/lib/react-providers/config-provider.js.map +1 -0
  643. package/lib/react-providers/index.d.ts +3 -0
  644. package/lib/react-providers/index.d.ts.map +1 -0
  645. package/lib/react-providers/index.js +6 -0
  646. package/lib/react-providers/index.js.map +1 -0
  647. package/lib/react-providers/slot.d.ts +73 -0
  648. package/lib/react-providers/slot.d.ts.map +1 -0
  649. package/lib/react-providers/slot.js +184 -0
  650. package/lib/react-providers/slot.js.map +1 -0
  651. package/lib/services/clipboard.service.d.ts +17 -0
  652. package/lib/services/clipboard.service.d.ts.map +1 -0
  653. package/lib/services/clipboard.service.js +57 -0
  654. package/lib/services/clipboard.service.js.map +1 -0
  655. package/lib/services/credentials-service.d.ts +36 -0
  656. package/lib/services/credentials-service.d.ts.map +1 -0
  657. package/lib/services/credentials-service.js +62 -0
  658. package/lib/services/credentials-service.js.map +1 -0
  659. package/lib/services/cryptr-service.d.ts +11 -0
  660. package/lib/services/cryptr-service.d.ts.map +1 -0
  661. package/lib/services/cryptr-service.js +24 -0
  662. package/lib/services/cryptr-service.js.map +1 -0
  663. package/lib/services/external-uri.service.d.ts +28 -0
  664. package/lib/services/external-uri.service.d.ts.map +1 -0
  665. package/lib/services/external-uri.service.js +58 -0
  666. package/lib/services/external-uri.service.js.map +1 -0
  667. package/lib/services/index.d.ts +8 -0
  668. package/lib/services/index.d.ts.map +1 -0
  669. package/lib/services/index.js +11 -0
  670. package/lib/services/index.js.map +1 -0
  671. package/lib/services/label-service.d.ts +74 -0
  672. package/lib/services/label-service.d.ts.map +1 -0
  673. package/lib/services/label-service.js +306 -0
  674. package/lib/services/label-service.js.map +1 -0
  675. package/lib/services/status-bar-service.d.ts +86 -0
  676. package/lib/services/status-bar-service.d.ts.map +1 -0
  677. package/lib/services/status-bar-service.js +25 -0
  678. package/lib/services/status-bar-service.js.map +1 -0
  679. package/lib/services/storage-service.d.ts +72 -0
  680. package/lib/services/storage-service.d.ts.map +1 -0
  681. package/lib/services/storage-service.js +128 -0
  682. package/lib/services/storage-service.js.map +1 -0
  683. package/lib/style/codicons/README.md +32 -0
  684. package/lib/style/codicons/codicon-animations.css +15 -0
  685. package/lib/style/entry.less +25 -0
  686. package/lib/style/icon/fileicons/file-default.svg +1 -0
  687. package/lib/style/icon/fileicons/folder-default.svg +1 -0
  688. package/lib/style/icon/fileicons.less +9 -0
  689. package/lib/style/icon/icon.d.ts +19 -0
  690. package/lib/style/icon/icon.d.ts.map +1 -0
  691. package/lib/style/icon/icon.js +64 -0
  692. package/lib/style/icon/icon.js.map +1 -0
  693. package/lib/style/icon/ide-iconfont.d.ts +5 -0
  694. package/lib/style/icon/ide-iconfont.d.ts.map +1 -0
  695. package/lib/style/icon/ide-iconfont.js +10 -0
  696. package/lib/style/icon/ide-iconfont.js.map +1 -0
  697. package/lib/style/icon/index.less +54 -0
  698. package/lib/style/icon/seti.woff +0 -0
  699. package/lib/style/icon/symbol-icons/boolean-dark.svg +3 -0
  700. package/lib/style/icon/symbol-icons/boolean-light.svg +3 -0
  701. package/lib/style/icon/symbol-icons/class-dark.svg +3 -0
  702. package/lib/style/icon/symbol-icons/class-light.svg +3 -0
  703. package/lib/style/icon/symbol-icons/constant-dark.svg +4 -0
  704. package/lib/style/icon/symbol-icons/constant-light.svg +4 -0
  705. package/lib/style/icon/symbol-icons/enumerator-dark.svg +3 -0
  706. package/lib/style/icon/symbol-icons/enumerator-item-dark.svg +3 -0
  707. package/lib/style/icon/symbol-icons/enumerator-item-light.svg +3 -0
  708. package/lib/style/icon/symbol-icons/enumerator-light.svg +3 -0
  709. package/lib/style/icon/symbol-icons/event-dark.svg +3 -0
  710. package/lib/style/icon/symbol-icons/event-light.svg +3 -0
  711. package/lib/style/icon/symbol-icons/field-dark.svg +3 -0
  712. package/lib/style/icon/symbol-icons/field-light.svg +3 -0
  713. package/lib/style/icon/symbol-icons/file-dark.svg +3 -0
  714. package/lib/style/icon/symbol-icons/file-light.svg +3 -0
  715. package/lib/style/icon/symbol-icons/indexer-dark.svg +3 -0
  716. package/lib/style/icon/symbol-icons/indexer-light.svg +3 -0
  717. package/lib/style/icon/symbol-icons/interface-dark.svg +3 -0
  718. package/lib/style/icon/symbol-icons/interface-light.svg +3 -0
  719. package/lib/style/icon/symbol-icons/keyword-dark.svg +3 -0
  720. package/lib/style/icon/symbol-icons/keyword-light.svg +3 -0
  721. package/lib/style/icon/symbol-icons/method-dark.svg +3 -0
  722. package/lib/style/icon/symbol-icons/method-light.svg +3 -0
  723. package/lib/style/icon/symbol-icons/namespace-dark.svg +3 -0
  724. package/lib/style/icon/symbol-icons/namespace-light.svg +3 -0
  725. package/lib/style/icon/symbol-icons/numeric-dark.svg +3 -0
  726. package/lib/style/icon/symbol-icons/numeric-light.svg +3 -0
  727. package/lib/style/icon/symbol-icons/operator-dark.svg +3 -0
  728. package/lib/style/icon/symbol-icons/operator-light.svg +3 -0
  729. package/lib/style/icon/symbol-icons/property-dark.svg +3 -0
  730. package/lib/style/icon/symbol-icons/property-light.svg +3 -0
  731. package/lib/style/icon/symbol-icons/snippet-dark.svg +3 -0
  732. package/lib/style/icon/symbol-icons/snippet-light.svg +3 -0
  733. package/lib/style/icon/symbol-icons/string-dark.svg +3 -0
  734. package/lib/style/icon/symbol-icons/string-light.svg +3 -0
  735. package/lib/style/icon/symbol-icons/structure-dark.svg +3 -0
  736. package/lib/style/icon/symbol-icons/structure-light.svg +3 -0
  737. package/lib/style/icon/symbol-icons/symbol-icons.css +284 -0
  738. package/lib/style/icon/symbol-icons/template-dark.svg +3 -0
  739. package/lib/style/icon/symbol-icons/template-light.svg +3 -0
  740. package/lib/style/icon/symbol-icons/variable-dark.svg +3 -0
  741. package/lib/style/icon/symbol-icons/variable-light.svg +3 -0
  742. package/lib/style/icon.less +8 -0
  743. package/lib/style/index.less +14 -0
  744. package/lib/style/monaco-override.less +86 -0
  745. package/lib/style/normalize.less +89 -0
  746. package/lib/style/octicons/octicons-cdn.css +269 -0
  747. package/lib/style/octicons/octicons.css +263 -0
  748. package/lib/style/octicons/octicons.html +1882 -0
  749. package/lib/style/octicons/octicons.svg +582 -0
  750. package/lib/style/octicons/octicons.ttf +0 -0
  751. package/lib/style/override.less +80 -0
  752. package/lib/style/toolbar.less +193 -0
  753. package/lib/style/utilities.less +18 -0
  754. package/lib/style/variable.less +16 -0
  755. package/lib/toolbar/components/auto-complete.d.ts +1 -0
  756. package/lib/toolbar/components/auto-complete.d.ts.map +1 -0
  757. package/lib/toolbar/components/auto-complete.js +2 -0
  758. package/lib/toolbar/components/auto-complete.js.map +1 -0
  759. package/lib/toolbar/components/button.d.ts +11 -0
  760. package/lib/toolbar/components/button.d.ts.map +1 -0
  761. package/lib/toolbar/components/button.js +324 -0
  762. package/lib/toolbar/components/button.js.map +1 -0
  763. package/lib/toolbar/components/index.d.ts +3 -0
  764. package/lib/toolbar/components/index.d.ts.map +1 -0
  765. package/lib/toolbar/components/index.js +6 -0
  766. package/lib/toolbar/components/index.js.map +1 -0
  767. package/lib/toolbar/components/select.d.ts +5 -0
  768. package/lib/toolbar/components/select.d.ts.map +1 -0
  769. package/lib/toolbar/components/select.js +161 -0
  770. package/lib/toolbar/components/select.js.map +1 -0
  771. package/lib/toolbar/index.d.ts +4 -0
  772. package/lib/toolbar/index.d.ts.map +1 -0
  773. package/lib/toolbar/index.js +9 -0
  774. package/lib/toolbar/index.js.map +1 -0
  775. package/lib/toolbar/toolbar.d.ts +17 -0
  776. package/lib/toolbar/toolbar.d.ts.map +1 -0
  777. package/lib/toolbar/toolbar.js +508 -0
  778. package/lib/toolbar/toolbar.js.map +1 -0
  779. package/lib/toolbar/toolbar.popover.registry.d.ts +11 -0
  780. package/lib/toolbar/toolbar.popover.registry.d.ts.map +1 -0
  781. package/lib/toolbar/toolbar.popover.registry.js +36 -0
  782. package/lib/toolbar/toolbar.popover.registry.js.map +1 -0
  783. package/lib/toolbar/toolbar.registry.d.ts +46 -0
  784. package/lib/toolbar/toolbar.registry.d.ts.map +1 -0
  785. package/lib/toolbar/toolbar.registry.js +283 -0
  786. package/lib/toolbar/toolbar.registry.js.map +1 -0
  787. package/lib/toolbar/types.d.ts +286 -0
  788. package/lib/toolbar/types.d.ts.map +1 -0
  789. package/lib/toolbar/types.js +18 -0
  790. package/lib/toolbar/types.js.map +1 -0
  791. package/lib/tree/index.d.ts +4 -0
  792. package/lib/tree/index.d.ts.map +1 -0
  793. package/lib/tree/index.js +7 -0
  794. package/lib/tree/index.js.map +1 -0
  795. package/lib/tree/tree-expansion.d.ts +16 -0
  796. package/lib/tree/tree-expansion.d.ts.map +1 -0
  797. package/lib/tree/tree-expansion.js +20 -0
  798. package/lib/tree/tree-expansion.js.map +1 -0
  799. package/lib/tree/tree-selection.d.ts +48 -0
  800. package/lib/tree/tree-selection.d.ts.map +1 -0
  801. package/lib/tree/tree-selection.js +64 -0
  802. package/lib/tree/tree-selection.js.map +1 -0
  803. package/lib/tree/tree.d.ts +195 -0
  804. package/lib/tree/tree.d.ts.map +1 -0
  805. package/lib/tree/tree.js +108 -0
  806. package/lib/tree/tree.js.map +1 -0
  807. package/lib/utils/create-overlay.d.ts +8 -0
  808. package/lib/utils/create-overlay.d.ts.map +1 -0
  809. package/lib/utils/create-overlay.js +50 -0
  810. package/lib/utils/create-overlay.js.map +1 -0
  811. package/lib/utils/electron.d.ts +23 -0
  812. package/lib/utils/electron.d.ts.map +1 -0
  813. package/lib/utils/electron.js +56 -0
  814. package/lib/utils/electron.js.map +1 -0
  815. package/lib/utils/env.d.ts +4 -0
  816. package/lib/utils/env.d.ts.map +1 -0
  817. package/lib/utils/env.js +31 -0
  818. package/lib/utils/env.js.map +1 -0
  819. package/lib/utils/icon.d.ts +7 -0
  820. package/lib/utils/icon.d.ts.map +1 -0
  821. package/lib/utils/icon.js +18 -0
  822. package/lib/utils/icon.js.map +1 -0
  823. package/lib/utils/index.d.ts +6 -0
  824. package/lib/utils/index.d.ts.map +1 -0
  825. package/lib/utils/index.js +9 -0
  826. package/lib/utils/index.js.map +1 -0
  827. package/lib/utils/parse.d.ts +25 -0
  828. package/lib/utils/parse.d.ts.map +1 -0
  829. package/lib/utils/parse.js +72 -0
  830. package/lib/utils/parse.js.map +1 -0
  831. package/lib/utils/react-hooks.d.ts +12 -0
  832. package/lib/utils/react-hooks.d.ts.map +1 -0
  833. package/lib/utils/react-hooks.js +84 -0
  834. package/lib/utils/react-hooks.js.map +1 -0
  835. package/lib/variable/index.d.ts +2 -0
  836. package/lib/variable/index.d.ts.map +1 -0
  837. package/lib/variable/index.js +5 -0
  838. package/lib/variable/index.js.map +1 -0
  839. package/lib/variable/variable.d.ts +49 -0
  840. package/lib/variable/variable.d.ts.map +1 -0
  841. package/lib/variable/variable.js +56 -0
  842. package/lib/variable/variable.js.map +1 -0
  843. package/lib/window/index.d.ts +25 -0
  844. package/lib/window/index.d.ts.map +1 -0
  845. package/lib/window/index.js +5 -0
  846. package/lib/window/index.js.map +1 -0
  847. package/lib/window/window.service.d.ts +14 -0
  848. package/lib/window/window.service.d.ts.map +1 -0
  849. package/lib/window/window.service.js +103 -0
  850. package/lib/window/window.service.js.map +1 -0
  851. package/package.json +55 -0
@@ -0,0 +1,275 @@
1
+ "use strict";
2
+ var PreferenceProvider_1;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.PreferenceProvider = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const di_1 = require("@opensumi/di");
7
+ const ide_core_common_1 = require("@opensumi/ide-core-common");
8
+ const early_preferences_1 = require("./early-preferences");
9
+ function transformReverse(delegates) {
10
+ const res = {};
11
+ for (const key of Object.keys(delegates)) {
12
+ res[delegates[key].delegateTo] = Object.assign({ delegated: key }, delegates[key]);
13
+ }
14
+ return res;
15
+ }
16
+ let PreferenceProvider = PreferenceProvider_1 = class PreferenceProvider {
17
+ constructor() {
18
+ this.onDidPreferencesChangedEmitter = new ide_core_common_1.Emitter();
19
+ this.onDidPreferencesChanged = this.onDidPreferencesChangedEmitter.event;
20
+ this.toDispose = new ide_core_common_1.DisposableCollection();
21
+ this._ready = new ide_core_common_1.Deferred();
22
+ this.toDispose.push(this.onDidPreferencesChangedEmitter);
23
+ }
24
+ asScope(scope) {
25
+ if (typeof this._scope !== 'undefined') {
26
+ return;
27
+ }
28
+ this._scope = scope;
29
+ // 如果 external provider 有监听器,监听
30
+ (0, early_preferences_1.getAllExternalProviders)().forEach(([preferenceName, provider]) => {
31
+ if (provider.onDidChange) {
32
+ provider.onDidChange((e) => {
33
+ if (e.scope === this._scope) {
34
+ this.emitPreferencesChangedEvent([{
35
+ preferenceName,
36
+ scope: e.scope,
37
+ newValue: e.newValue,
38
+ oldValue: e.oldValue,
39
+ }], true);
40
+ }
41
+ });
42
+ }
43
+ });
44
+ }
45
+ dispose() {
46
+ this.toDispose.dispose();
47
+ }
48
+ /**
49
+ * 处理事件监听中接收到的Event数据对象
50
+ * 以便后续接收到数据后能确认来自那个配置项的值
51
+ */
52
+ emitPreferencesChangedEvent(changes, noFilterExternal) {
53
+ let prefChanges;
54
+ if (Array.isArray(changes)) {
55
+ prefChanges = { default: {}, languageSpecific: {} };
56
+ for (const change of changes) {
57
+ prefChanges.default[change.preferenceName] = change;
58
+ }
59
+ }
60
+ else {
61
+ prefChanges = changes;
62
+ }
63
+ if (typeof this._scope !== 'undefined') {
64
+ const preferenceNames = Object.keys(prefChanges.default);
65
+ // 只对scope preference provider做处理
66
+ for (const preferenceName of preferenceNames) {
67
+ const change = prefChanges.default[preferenceName];
68
+ if (PreferenceProvider_1.PreferenceDelegates[change.preferenceName]) {
69
+ const delegate = PreferenceProvider_1.PreferenceDelegates[change.preferenceName];
70
+ if (this.get(delegate.delegateTo) !== undefined && this.get(change.preferenceName) === undefined) {
71
+ // 这种情况不发出 delegateTo 的改变
72
+ }
73
+ else {
74
+ prefChanges.default[delegate.delegateTo] = Object.assign(Object.assign({}, change), { oldValue: undefined, newValue: change.newValue !== undefined ? (delegate.transform ? delegate.transform(change.newValue) : change.newValue) : undefined, preferenceName: delegate.delegateTo });
75
+ }
76
+ }
77
+ if (!noFilterExternal && !!(0, early_preferences_1.getExternalPreferenceProvider)(preferenceName)) {
78
+ // 过滤externalProvider管理的preference
79
+ delete prefChanges.default[preferenceName];
80
+ }
81
+ if (change.oldValue === change.newValue) {
82
+ delete prefChanges.default[preferenceName];
83
+ }
84
+ }
85
+ }
86
+ if (prefChanges && !(0, ide_core_common_1.isEmptyObject)(prefChanges)) {
87
+ this.onDidPreferencesChangedEmitter.fire(prefChanges);
88
+ return true;
89
+ }
90
+ return false;
91
+ }
92
+ // @final 不要 override 这个
93
+ get(preferenceName, resourceUri, language) {
94
+ if (PreferenceProvider_1.PreferenceDelegatesReverse[preferenceName]) {
95
+ const res = this.getDelegateToValueFromDelegated(preferenceName);
96
+ if (res !== undefined) {
97
+ return res;
98
+ }
99
+ }
100
+ const value = this.getWithoutDelegate(preferenceName, resourceUri, language);
101
+ if (value === undefined && PreferenceProvider_1.PreferenceDelegates[preferenceName]) {
102
+ return this.getDelegatedValueFromDelegateTo(preferenceName);
103
+ }
104
+ else {
105
+ return value;
106
+ }
107
+ }
108
+ getWithoutDelegate(preferenceName, resourceUri, language) {
109
+ if (typeof this._scope !== 'undefined') {
110
+ const externalProvider = (0, early_preferences_1.getExternalPreferenceProvider)(preferenceName);
111
+ if (externalProvider) {
112
+ return externalProvider.get(this._scope);
113
+ }
114
+ }
115
+ return this.doGet(preferenceName, resourceUri, language);
116
+ }
117
+ // 从delegateTo 获取 delegated
118
+ getDelegatedValueFromDelegateTo(delegatedPreferenceName) {
119
+ const delegate = PreferenceProvider_1.PreferenceDelegates[delegatedPreferenceName];
120
+ const value = this.getWithoutDelegate(delegate.delegateTo);
121
+ if (delegate.transformFrom) {
122
+ return delegate.transformFrom(value);
123
+ }
124
+ else {
125
+ return value;
126
+ }
127
+ }
128
+ // 从delegate 获取 delegateTo
129
+ getDelegateToValueFromDelegated(delegateToPreferenceName) {
130
+ const delegate = PreferenceProvider_1.PreferenceDelegatesReverse[delegateToPreferenceName];
131
+ const value = this.getWithoutDelegate(delegate.delegated);
132
+ if (delegate.transform) {
133
+ return delegate.transform(value);
134
+ }
135
+ else {
136
+ return value;
137
+ }
138
+ }
139
+ doGet(preferenceName, resourceUri, language) {
140
+ return this.doResolve(preferenceName, resourceUri, language).value;
141
+ }
142
+ // @final 不要 override 这个
143
+ resolve(preferenceName, resourceUri, language) {
144
+ if (PreferenceProvider_1.PreferenceDelegatesReverse[preferenceName]) {
145
+ const res = this.getDelegateToValueFromDelegated(preferenceName);
146
+ if (res !== undefined) {
147
+ return { value: res, scope: this._scope }; // FIXME: 这里好像scope有点问题,暂时不影响
148
+ }
149
+ }
150
+ if (typeof this._scope !== 'undefined') {
151
+ const externalProvider = (0, early_preferences_1.getExternalPreferenceProvider)(preferenceName);
152
+ if (externalProvider) {
153
+ return {
154
+ value: externalProvider.get(this._scope),
155
+ scope: this._scope,
156
+ };
157
+ }
158
+ }
159
+ const res = this.doResolve(preferenceName, resourceUri, language);
160
+ if (res.value === undefined && PreferenceProvider_1.PreferenceDelegates[preferenceName]) {
161
+ return { value: this.getDelegatedValueFromDelegateTo(preferenceName), scope: this._scope }; // FIXME: 这里好像scope有点问题,暂时不影响
162
+ }
163
+ else {
164
+ return res;
165
+ }
166
+ }
167
+ doResolve(preferenceName, resourceUri, language) {
168
+ const preferences = this.getPreferences(resourceUri, language);
169
+ if (!preferences) {
170
+ return {};
171
+ }
172
+ const value = preferences[preferenceName];
173
+ if (value !== undefined) {
174
+ return {
175
+ value,
176
+ configUri: this.getConfigUri(resourceUri),
177
+ };
178
+ }
179
+ return {};
180
+ }
181
+ async setPreference(preferenceName, value, resourceUri, language) {
182
+ // 对于我们 workbench.colorTheme -> general.theme 这种托管,
183
+ // 修改 workbench.colorTheme 为 'themeA' 的时候,get('general.theme'),会首先查看 workbench.colorTheme,
184
+ // 如果有值,则采用 workbench.colorTheme, 而不管配置文件中是否 general.theme 有值,
185
+ // 换言之,在 workbench.colorTheme 有值的情况下,general.theme 无论怎么修改都是无效的,
186
+ // 因此如果 setPreference('general.theme', 'themeA' ) 的话,必须先把 workbench.colorTheme 置空才能生效。
187
+ //
188
+ // 这种情况下,插件进程的 vscode.workspace.onDidConfigurationChange 会触发两次事件变化
189
+ // 一个为 general.theme, 一个为workbench.colorTheme
190
+ if (PreferenceProvider_1.PreferenceDelegatesReverse[preferenceName]) {
191
+ // 将delegate置空
192
+ const delegate = PreferenceProvider_1.PreferenceDelegatesReverse[preferenceName];
193
+ await this.setPreference(delegate.delegated, undefined);
194
+ }
195
+ if (typeof this._scope !== 'undefined') {
196
+ const externalProvider = (0, early_preferences_1.getExternalPreferenceProvider)(preferenceName);
197
+ if (externalProvider) {
198
+ try {
199
+ const oldValue = externalProvider.get(this._scope);
200
+ await externalProvider.set(value, this._scope);
201
+ // 如果外部provider没有监听器,帮助他发送改变事件
202
+ if (!externalProvider.onDidChange) {
203
+ this.emitPreferencesChangedEvent([{
204
+ preferenceName,
205
+ scope: this._scope,
206
+ oldValue,
207
+ newValue: externalProvider.get(this._scope),
208
+ }], true);
209
+ }
210
+ return true;
211
+ }
212
+ catch (e) {
213
+ return false;
214
+ }
215
+ }
216
+ }
217
+ return await this.doSetPreference(preferenceName, value, resourceUri, language);
218
+ }
219
+ /**
220
+ * 返回promise,当 preference provider 已经可以提供配置时返回resolved
221
+ */
222
+ get ready() {
223
+ return this._ready.promise;
224
+ }
225
+ /**
226
+ * 默认返回undefined
227
+ */
228
+ getDomain() {
229
+ return undefined;
230
+ }
231
+ /**
232
+ * 默认返回undefined
233
+ */
234
+ getConfigUri(resourceUri) {
235
+ return undefined;
236
+ }
237
+ static merge(source, target) {
238
+ if (source === undefined || !ide_core_common_1.JSONUtils.isObject(source)) {
239
+ return ide_core_common_1.JSONUtils.deepCopy(target);
240
+ }
241
+ if (ide_core_common_1.JSONUtils.isPrimitive(target)) {
242
+ return {};
243
+ }
244
+ for (const key of Object.keys(target)) {
245
+ const value = target[key];
246
+ if (key in source) {
247
+ if (ide_core_common_1.JSONUtils.isObject(source[key]) && ide_core_common_1.JSONUtils.isObject(value)) {
248
+ this.merge(source[key], value);
249
+ continue;
250
+ }
251
+ }
252
+ source[key] = ide_core_common_1.JSONUtils.deepCopy(value);
253
+ }
254
+ return source;
255
+ }
256
+ };
257
+ // preferenceDelegate 原则, delegate值优先,不改变原有 delegateTo 的行为
258
+ // 1. 当修改 delegate 设置值发生改变时,同时发出 delegate 和 delegateTo 的 change 事件。
259
+ // 2. 当尝试获取 delegateTo 的值时,会尝试先获取 delegate 的值,如果没有值,继续原来的逻辑。
260
+ // 3. 当尝试修改 delegateTo 的值时,删除 delegate 的值
261
+ // 4. 当尝试获取 delegate 的值时,如果 delegate 没有值, 尝试获取 delegateTo 的值
262
+ // 5. schema 只会检测改变后 delegatedTo 的值
263
+ // 6. 不对语言特定的设置生效
264
+ PreferenceProvider.PreferenceDelegates = {
265
+ 'workbench.colorTheme': {
266
+ delegateTo: 'general.theme',
267
+ },
268
+ };
269
+ PreferenceProvider.PreferenceDelegatesReverse = transformReverse(PreferenceProvider_1.PreferenceDelegates);
270
+ PreferenceProvider = PreferenceProvider_1 = (0, tslib_1.__decorate)([
271
+ (0, di_1.Injectable)(),
272
+ (0, tslib_1.__metadata)("design:paramtypes", [])
273
+ ], PreferenceProvider);
274
+ exports.PreferenceProvider = PreferenceProvider;
275
+ //# sourceMappingURL=preference-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-provider.js","sourceRoot":"","sources":["../../src/preferences/preference-provider.ts"],"names":[],"mappings":";;;;;AAAA,qCAA0C;AAC1C,+DAA4J;AAE5J,2DAA6F;AAoC7F,SAAS,gBAAgB,CAAC,SAGxB;IAKA,MAAM,GAAG,GAAG,EAAE,CAAC;IACf,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;QACxC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,mBAC5B,SAAS,EAAE,GAAG,IACX,SAAS,CAAC,GAAG,CAAC,CAClB,CAAC;KACH;IACD,OAAO,G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AAC,mBAAmB,CAAE,CAAA;AArC1C,kBAAkB;IADvC,IAAA,eAAU,GAAE;;GACS,kBAAkB,CAwTvC;AAxTqB,gDAAkB"}
@@ -0,0 +1,45 @@
1
+ import { Disposable, Event } from '@opensumi/ide-core-common';
2
+ import { PreferenceService } from './preference-service';
3
+ import { PreferenceSchema } from './preference-contribution';
4
+ export interface PreferenceChangeEvent<T> {
5
+ readonly preferenceName: keyof T;
6
+ readonly newValue?: T[keyof T];
7
+ readonly oldValue?: T[keyof T];
8
+ affects(resourceUri?: string, overrideIdentifier?: string): boolean;
9
+ }
10
+ export interface PreferenceProxyOptions {
11
+ /**
12
+ * 所有配置的默认前缀
13
+ */
14
+ prefix?: string;
15
+ /**
16
+ * 获取或设置配置的默认资源路径
17
+ */
18
+ resourceUri?: string;
19
+ /**
20
+ * 对齐VSCode实现,overrideIdentifier主要用于实现针对不同编辑器设置不同配置的能力
21
+ * 与原有的language设定一致
22
+ *
23
+ * 如 [markdown].editor.autoIndent、[json].editor.autoIndent 及 editor.autoIndent 等
24
+ */
25
+ overrideIdentifier?: string;
26
+ /**
27
+ * 用来指代获取一个配置时是否为“平面含义”上的获取
28
+ *
29
+ * 如:
30
+ * a.b.c 在flat模式下为单个配置的值
31
+ * deep模式下则可以为 a 配置下的 b 配置下的 c 的值
32
+ * both指代同时在两种配置模式下检索值
33
+ */
34
+ style?: 'flat' | 'deep' | 'both';
35
+ }
36
+ export interface PreferenceEventEmitter<T> {
37
+ readonly onPreferenceChanged: Event<PreferenceChangeEvent<T>>;
38
+ readonly ready: Promise<void>;
39
+ }
40
+ export interface PreferenceRetrieval<T> {
41
+ get<K extends keyof T>(preferenceName: K, defaultValue?: T[K], resourceUri?: string): T[K];
42
+ }
43
+ export declare type PreferenceProxy<T> = Readonly<T> & Disposable & PreferenceEventEmitter<T> & PreferenceRetrieval<T>;
44
+ export declare function createPreferenceProxy<T>(preferences: PreferenceService, schema: PreferenceSchema, options?: PreferenceProxyOptions): PreferenceProxy<T>;
45
+ //# sourceMappingURL=preference-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-proxy.d.ts","sourceRoot":"","sources":["../../src/preferences/preference-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAA0C,MAAM,2BAA2B,CAAC;AACtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/B,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACrE;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,QAAQ,CAAC,mBAAmB,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC;IAEpC,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5F;AAED,oBAAY,eAAe,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAE/G,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,eAAe,CAAC,CAAC,CAAC,CAmMvJ"}
@@ -0,0 +1,195 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPreferenceProxy = void 0;
4
+ const ide_core_common_1 = require("@opensumi/ide-core-common");
5
+ function createPreferenceProxy(preferences, schema, options) {
6
+ const opts = options || {};
7
+ const prefix = opts.prefix || '';
8
+ const style = opts.style || 'flat';
9
+ const isDeep = style === 'deep' || style === 'both';
10
+ const isFlat = style === 'both' || style === 'flat';
11
+ const onPreferenceChanged = (listener, thisArgs, disposables) => {
12
+ const disposer = new ide_core_common_1.Disposable();
13
+ disposer.addDispose(preferences.onPreferencesChanged((changes) => {
14
+ for (const key of Object.keys(changes)) {
15
+ const e = changes[key];
16
+ const preferenceName = e.preferenceName;
17
+ if (preferenceName.startsWith(prefix)) {
18
+ if (schema.properties[preferenceName]) {
19
+ if (opts.resourceUri) {
20
+ if (e.affects(opts.resourceUri)) {
21
+ if (opts.overrideIdentifier && !preferences.hasLanguageSpecific(preferenceName, opts.overrideIdentifier, opts.resourceUri)) {
22
+ continue;
23
+ }
24
+ listener(e);
25
+ }
26
+ }
27
+ else {
28
+ listener(e);
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }, thisArgs, disposables));
34
+ // 添加语言相关 changes 变更
35
+ if (opts.overrideIdentifier) {
36
+ disposer.addDispose(preferences.onLanguagePreferencesChanged((event) => {
37
+ if (event.overrideIdentifier === opts.overrideIdentifier) {
38
+ for (const key of Object.keys(event.changes)) {
39
+ const e = event.changes[key];
40
+ const preferenceName = e.preferenceName;
41
+ if (preferenceName.startsWith(prefix)) {
42
+ if (schema.properties[preferenceName]) {
43
+ if (opts.resourceUri) {
44
+ if (e.affects(opts.resourceUri)) {
45
+ listener(e);
46
+ }
47
+ }
48
+ else {
49
+ listener(e);
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }, thisArgs, disposables));
56
+ }
57
+ return disposer;
58
+ };
59
+ const unsupportedOperation = (_, __) => {
60
+ throw new Error('Unsupported operation');
61
+ };
62
+ const getValue = (preferenceName, defaultValue, resourceUri, overrideIdentifier) => {
63
+ return preferences.get(preferenceName, defaultValue, resourceUri || opts.resourceUri, overrideIdentifier || opts.overrideIdentifier);
64
+ };
65
+ const ownKeys = () => {
66
+ const properties = [];
67
+ for (const p of Object.keys(schema.properties)) {
68
+ if (p.startsWith(prefix)) {
69
+ const idx = p.indexOf('.', prefix.length);
70
+ if (idx !== -1 && isDeep) {
71
+ const pre = p.substr(prefix.length, idx - prefix.length);
72
+ if (properties.indexOf(pre) === -1) {
73
+ properties.push(pre);
74
+ }
75
+ }
76
+ const prop = p.substr(prefix.length);
77
+ if (isFlat || prop.indexOf('.') === -1) {
78
+ properties.push(prop);
79
+ }
80
+ }
81
+ }
82
+ return properties;
83
+ };
84
+ const set = (_, property, value) => {
85
+ if (typeof property !== 'string') {
86
+ throw new Error(`unexpected property: ${String(property)}`);
87
+ }
88
+ if (style === 'deep' && property.indexOf('.') !== -1) {
89
+ return false;
90
+ }
91
+ const fullProperty = prefix ? prefix + property : property;
92
+ if (schema.properties[fullProperty]) {
93
+ preferences.set(fullProperty, value, ide_core_common_1.PreferenceScope.Default);
94
+ return true;
95
+ }
96
+ const newPrefix = fullProperty + '.';
97
+ for (const p of Object.keys(schema.properties)) {
98
+ if (p.startsWith(newPrefix)) {
99
+ const subProxy = createPreferenceProxy(preferences, schema, {
100
+ prefix: newPrefix,
101
+ resourceUri: opts.resourceUri,
102
+ overrideIdentifier: opts.overrideIdentifier,
103
+ style,
104
+ });
105
+ for (const k of Object.keys(value)) {
106
+ subProxy[k] = value[k];
107
+ }
108
+ }
109
+ }
110
+ return false;
111
+ };
112
+ const get = (_, property) => {
113
+ if (typeof property !== 'string') {
114
+ throw new Error(`unexpected property: ${String(property)}`);
115
+ }
116
+ const fullProperty = prefix ? prefix + property : property;
117
+ if (isFlat || property.indexOf('.') === -1) {
118
+ if (schema.properties[fullProperty]) {
119
+ return preferences.get(fullProperty, undefined, opts.resourceUri, opts.overrideIdentifier);
120
+ }
121
+ }
122
+ if (property === 'onPreferenceChanged') {
123
+ return onPreferenceChanged;
124
+ }
125
+ if (property === 'dispose') {
126
+ return () => { };
127
+ }
128
+ if (property === 'ready') {
129
+ return preferences.ready;
130
+ }
131
+ if (property === 'get') {
132
+ return getValue;
133
+ }
134
+ if (property === 'toJSON') {
135
+ return toJSON();
136
+ }
137
+ if (isDeep) {
138
+ const newPrefix = fullProperty + '.';
139
+ for (const p of Object.keys(schema.properties)) {
140
+ // 这里实际上要求 Configuration 在注册的时候声明全量配置名
141
+ // 如,获取 a.b, 则要求 Configuration 声明时必须为 a.b.c
142
+ if (p.startsWith(newPrefix)) {
143
+ return createPreferenceProxy(preferences, schema, { prefix: newPrefix, resourceUri: opts.resourceUri, overrideIdentifier: opts.overrideIdentifier, style });
144
+ }
145
+ }
146
+ // 升级 Monaco 0.20.0 版本后,Monaco 中的ConfigurationService会尝试通过配置全称获取配置值
147
+ // 如,直接获取 a.b.c.d 配置值
148
+ // 下面的逻辑兼容了通过 a.b 获取 a.b.c, a.b.c.d 的方式
149
+ let value;
150
+ let parentSegment = fullProperty;
151
+ const segments = [];
152
+ for (let index; parentSegment && (0, ide_core_common_1.isUndefined)(value);) {
153
+ index = parentSegment.lastIndexOf('.');
154
+ // 查找到对应值后退出查询
155
+ segments.push(parentSegment.substring(index + 1));
156
+ parentSegment = parentSegment.substring(0, index);
157
+ if (parentSegment in schema.properties) {
158
+ value = get(_, parentSegment);
159
+ }
160
+ }
161
+ let segment;
162
+ while ((0, ide_core_common_1.isObject)(value) && (segment = segments.pop())) {
163
+ // 进一步遍历获取配置值
164
+ value = value[segment];
165
+ }
166
+ return segments.length ? undefined : value;
167
+ }
168
+ return undefined;
169
+ };
170
+ const toJSON = () => {
171
+ const result = {};
172
+ for (const k of ownKeys()) {
173
+ result[k] = get(undefined, k);
174
+ }
175
+ return result;
176
+ };
177
+ return new Proxy({}, {
178
+ get,
179
+ ownKeys,
180
+ getOwnPropertyDescriptor: (_, property) => {
181
+ if (ownKeys().indexOf(property) !== -1) {
182
+ return {
183
+ enumerable: true,
184
+ configurable: true,
185
+ };
186
+ }
187
+ return {};
188
+ },
189
+ set,
190
+ deleteProperty: unsupportedOperation,
191
+ defineProperty: unsupportedOperation,
192
+ });
193
+ }
194
+ exports.createPreferenceProxy = createPreferenceProxy;
195
+ //# sourceMappingURL=preference-proxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-proxy.js","sourceRoot":"","sources":["../../src/preferences/preference-proxy.ts"],"names":[],"mappings":";;;AAAA,+DAAsG;AAkDtG,SAAgB,qBAAqB,CAAI,WAA8B,EAAE,MAAwB,EAAE,OAAgC;IACjI,MAAM,IAAI,GAAG,OAAO,IAAI,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;IACnC,MAAM,MAAM,GAAG,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,CAAC;IACpD,MAAM,MAAM,GAAG,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,CAAC;IACpD,MAAM,mBAAmB,GAAG,CAAC,QAA8C,EAAE,QAAc,EAAE,WAA0B,EAAE,EAAE;QACzH,MAAM,QAAQ,GAAG,IAAI,4B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BAAQ,EAAC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,EAAE;gBACpD,aAAa;gBACb,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;aACxB;YACD,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;SAC5C;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,MAAM,MAAM,GAAQ,EAAE,CAAC;QACvB,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,EAAE;YACzB,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;SAC/B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO,IAAI,KAAK,CAAC,EAAE,EAAE;QACnB,GAAG;QACH,OAAO;QACP,wBAAwB,EAAE,CAAC,CAAC,EAAE,QAAgB,EAAE,EAAE;YAChD,IAAI,OAAO,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;gBACtC,OAAO;oBACL,UAAU,EAAE,IAAI;oBAChB,YAAY,EAAE,IAAI;iBACnB,CAAC;aACH;YACD,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,GAAG;QACH,cAAc,EAAE,oBAAoB;QACpC,cAAc,EAAE,oBAAoB;KACrC,CAAC,CAAC;AACL,CAAC;AAnMD,sDAmMC"}
@@ -0,0 +1,3 @@
1
+ import { PreferenceScope } from '@opensumi/ide-core-common/lib/preferences/preference-scope';
2
+ export { PreferenceScope };
3
+ //# sourceMappingURL=preference-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-scope.d.ts","sourceRoot":"","sources":["../../src/preferences/preference-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4DAA4D,CAAC;AAE7F,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferenceScope = void 0;
4
+ const preference_scope_1 = require("@opensumi/ide-core-common/lib/preferences/preference-scope");
5
+ Object.defineProperty(exports, "PreferenceScope", { enumerable: true, get: function () { return preference_scope_1.PreferenceScope; } });
6
+ //# sourceMappingURL=preference-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-scope.js","sourceRoot":"","sources":["../../src/preferences/preference-scope.ts"],"names":[],"mappings":";;;AAAA,iGAA6F;AAEpF,gGAFA,kCAAe,OAEA"}