@nuraly/runtime 0.1.7 → 0.1.9

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 (349) hide show
  1. package/README.md +83 -765
  2. package/components/ui/components/Event/EventValue/EventValue.ts +13 -8
  3. package/components/ui/components/ToastContainer/ToastContainer.ts +1 -1
  4. package/components/ui/components/advanced/AIChat/AIChat.ts +1 -2
  5. package/components/ui/components/advanced/Collapse/Collapse.ts +5 -2
  6. package/components/ui/components/advanced/Collections/Collections.ts +2 -2
  7. package/components/ui/components/advanced/MicroApp/MicroApp.ts +3 -11
  8. package/components/ui/components/advanced/RefComponent/RefComponent.ts +2 -2
  9. package/components/ui/components/advanced/RichText/RichText.ts +5 -4
  10. package/components/ui/components/advanced/RichText/RichTextEditor.ts +0 -167
  11. package/components/ui/components/base/BaseElement/base-change-detection.ts +1 -5
  12. package/components/ui/components/base/BaseElement.ts +229 -610
  13. package/components/ui/components/base/FormRegisterable.ts +83 -0
  14. package/components/ui/components/base/controllers/DragDropController.ts +175 -0
  15. package/components/ui/components/base/controllers/ErrorController.ts +180 -0
  16. package/components/ui/components/base/controllers/EventController.ts +112 -0
  17. package/components/ui/components/base/controllers/InputHandlerController.ts +298 -0
  18. package/components/ui/components/base/controllers/SelectionController.ts +323 -0
  19. package/components/ui/components/base/controllers/StyleHandlerController.ts +286 -0
  20. package/components/ui/components/base/controllers/index.ts +11 -0
  21. package/components/ui/components/base/mixins/EditorModeMixin.ts +185 -0
  22. package/components/ui/components/base/mixins/index.ts +6 -0
  23. package/components/ui/components/base/types/base-element.types.ts +138 -0
  24. package/components/ui/components/base/types/index.ts +21 -0
  25. package/components/ui/components/base/utils/event-debouncer.ts +209 -0
  26. package/components/ui/components/base/utils/index.ts +11 -0
  27. package/components/ui/components/base/utils/style-cache.ts +94 -0
  28. package/components/ui/components/display/BoxModel/BoxModel.ts +177 -116
  29. package/components/ui/components/display/Code/Code.ts +40 -26
  30. package/components/ui/components/display/Divider/Divider.ts +2 -2
  31. package/components/ui/components/display/Icon/Icon.ts +2 -3
  32. package/components/ui/components/display/Image/Image.ts +72 -46
  33. package/components/ui/components/display/Tag/Tag.ts +2 -3
  34. package/components/ui/components/display/Video/Video.ts +91 -31
  35. package/components/ui/components/inputs/Button/Button.ts +2 -2
  36. package/components/ui/components/inputs/Checkbox/Checkbox.ts +14 -40
  37. package/components/ui/components/inputs/ColorPicker/colorpicker.ts +9 -4
  38. package/components/ui/components/inputs/DatePicker/DatePicker.ts +47 -25
  39. package/components/ui/components/inputs/Dropdown/Dropdown.ts +2 -2
  40. package/components/ui/components/inputs/Form/Form.style.ts +26 -0
  41. package/components/ui/components/inputs/Form/Form.ts +360 -0
  42. package/components/ui/components/inputs/IconPicker/IconPicker.ts +22 -18
  43. package/components/ui/components/inputs/InsertDropdown/InsertDropdown.ts +0 -20
  44. package/components/ui/components/inputs/NumberInput/NumberInput.ts +0 -4
  45. package/components/ui/components/inputs/RadioButton/Radio-button.ts +17 -13
  46. package/components/ui/components/inputs/Select/Select.ts +44 -24
  47. package/components/ui/components/inputs/TextInput/TextInput.ts +15 -9
  48. package/components/ui/components/inputs/Textarea/Textarea.ts +30 -30
  49. package/components/ui/components/inputs/UsersDropdown/UsersDropdown.ts +1 -1
  50. package/components/ui/components/layout/Card/Card.ts +112 -10
  51. package/components/ui/components/layout/Containers/Container.style.ts +18 -0
  52. package/components/ui/components/layout/Containers/Container.ts +11 -5
  53. package/components/ui/components/layout/Grid/Col.style.ts +27 -0
  54. package/components/ui/components/layout/Grid/Col.ts +213 -0
  55. package/components/ui/components/layout/Grid/Row.style.ts +73 -0
  56. package/components/ui/components/layout/Grid/Row.ts +170 -0
  57. package/components/ui/components/layout/Grid/index.ts +7 -0
  58. package/components/ui/components/layout/Panel/Panel.ts +2 -2
  59. package/components/ui/components/layout/Tabs/Tabs.ts +0 -1
  60. package/components/ui/components/navigation/EmbedURL/EmbedURL.ts +62 -26
  61. package/components/ui/components/navigation/Link/Link.ts +27 -16
  62. package/components/ui/components/navigation/Menu/Menu.ts +26 -48
  63. package/components/ui/components/runtime/MicroApp/MicroApp.ts +7 -147
  64. package/components/ui/components/runtime/MicroApp/MicroAppDataLoader.ts +6 -2
  65. package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +484 -0
  66. package/components/ui/components/studio/FunctionsPanel/index.ts +1 -0
  67. package/components/ui/components/utility/AccessRoles/AccessRoles.style.ts +242 -0
  68. package/components/ui/components/utility/AccessRoles/AccessRoles.ts +476 -0
  69. package/components/ui/components/utility/Border/Border.ts +0 -14
  70. package/components/ui/components/utility/BorderManager/BorderManager.style.ts +237 -0
  71. package/components/ui/components/utility/BorderManager/BorderManager.ts +503 -0
  72. package/components/ui/components/utility/BoxShadow/BoxShadow.ts +0 -16
  73. package/components/ui/components/utility/Document/Document.ts +54 -25
  74. package/components/ui/components/utility/Export-Import/Export-Import.ts +8 -7
  75. package/components/ui/components/utility/Handlers/Handlers.ts +14 -17
  76. package/components/ui/components/utility/ValidationRules/ValidationRules.ts +440 -0
  77. package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.ts +1 -0
  78. package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.ts +1 -24
  79. package/components/ui/nuraly-ui/src/components/badge/badge.style.ts +4 -3
  80. package/components/ui/nuraly-ui/src/components/datepicker/datepicker.component.ts +2 -0
  81. package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +12 -6
  82. package/components/ui/nuraly-ui/src/components/radio-group/radio-group.style.ts +23 -0
  83. package/dist/{index-B4yIOSMd.js → BaseElement-BNBn_IJk.js} +2920 -267
  84. package/dist/{CodeEditor-YsOapSut.js → CodeEditor-B1gNuvPb.js} +84127 -76319
  85. package/dist/{CodeEditor-BiNku87K.js → CodeEditor-Cpph-xRc.js} +7 -7
  86. package/dist/{abap-B2diVmjb.js → abap-D0Neqhq6.js} +91 -1
  87. package/dist/{apex-3NuJ-nsI.js → apex-B5LhxkeG.js} +18 -1
  88. package/dist/assets/editor.worker-DcwbJ0PV.js +12 -0
  89. package/dist/assets/html.worker-BTMxskjR.js +461 -0
  90. package/dist/assets/json.worker-D3vTGdf_.js +49 -0
  91. package/dist/assets/ts.worker-BsM1BXac.js +51334 -0
  92. package/dist/{azcli-XGXuUsMB.js → azcli-BrBH0QTU.js} +1 -1
  93. package/dist/{bat-B8Vhm634.js → bat-BfzAov64.js} +12 -1
  94. package/dist/{bicep-Cc8X5S_k.js → bicep-C3bCSWel.js} +1 -1
  95. package/dist/{cameligo-Bo3wBh9T.js → cameligo-sFL5plcd.js} +13 -1
  96. package/dist/{clojure-CPoQlpIK.js → clojure-CfeExRz0.js} +14 -1
  97. package/dist/{coffee-BxvTGz39.js → coffee-Xws5K0WL.js} +11 -1
  98. package/dist/{cpp-5RpEV7vC.js → cpp-CqOUEpxN.js} +28 -23
  99. package/dist/{csharp-slXXP3fo.js → csharp-DVLiBOZb.js} +13 -1
  100. package/dist/{csp-B98p6-gH.js → csp-DVFp9bw5.js} +3 -1
  101. package/dist/{css-BDsDSAin.js → css-DwARn2R6.js} +8 -1
  102. package/dist/cssMode-D82-gS78.js +1577 -0
  103. package/dist/{cypher-Dc4IMouD.js → cypher-uY0Mffat.js} +8 -1
  104. package/dist/{dart-LhvE3yD2.js → dart-D27H-mX_.js} +18 -1
  105. package/dist/{dockerfile-CwzplJeZ.js → dockerfile-CmV85WZK.js} +5 -1
  106. package/dist/{ecl-DxW3FiJi.js → ecl--fKn7yzB.js} +9 -1
  107. package/dist/{elixir-BI40g7TU.js → elixir-DUhH17ON.js} +87 -1
  108. package/dist/{flow9-tR2v0bGz.js → flow9-B3Dx2LLe.js} +8 -1
  109. package/dist/{freemarker2-Bfqhwyij.js → freemarker2-CYRLpyjt.js} +359 -7
  110. package/dist/{fsharp-BLAma0OT.js → fsharp-SyqBfUAR.js} +14 -1
  111. package/dist/{go-nYcD3y4Z.js → go-BbMR2tdT.js} +17 -1
  112. package/dist/{graphql-Dp1cHWmP.js → graphql-DDJE6tIl.js} +17 -1
  113. package/dist/{handlebars-DCgKNBmn.js → handlebars-R8Efxi60.js} +38 -4
  114. package/dist/{hcl-6NT8Kbna.js → hcl-YBvpaUqf.js} +13 -1
  115. package/dist/{html-C6wR7sMB.js → html-czhjovcp.js} +37 -4
  116. package/dist/htmlMode-DpyKDYYs.js +1587 -0
  117. package/dist/{ini-BZCOLrEc.js → ini-Ct73dBtM.js} +10 -1
  118. package/dist/{java-DAMcfJbX.js → java-C_jlkwoG.js} +18 -1
  119. package/dist/{javascript-D1L5MTmg.js → javascript-DwqkMEdb.js} +3 -2
  120. package/dist/jsonMode-Cmxxe0W9.js +2002 -0
  121. package/dist/{julia-CQ46G71H.js → julia-D8WE5U1e.js} +22 -1
  122. package/dist/{kotlin-CEjVo_6E.js → kotlin-Zy9aq5yB.js} +15 -1
  123. package/dist/{less-DreV99nP.js → less-sZ0iHtE8.js} +1 -1
  124. package/dist/{lexon-DBVJhqLb.js → lexon-CsdNL29A.js} +13 -1
  125. package/dist/{liquid-D_pDYIs1.js → liquid-2spuEcBh.js} +12 -4
  126. package/dist/{lua-Dcc_j6L-.js → lua-C2YJo0zw.js} +12 -1
  127. package/dist/{m3-B9SlZL4n.js → m3-CPLP40SG.js} +7 -1
  128. package/dist/{markdown-CuGw9_MP.js → markdown-B1mf5e0R.js} +34 -1
  129. package/dist/{mdx-CKsJ3cF4.js → mdx-BjBXyEeR.js} +2 -2
  130. package/dist/{micro-app-entry-xdTX5-ut.js → micro-app-entry-DYAnCRDo.js} +8132 -9649
  131. package/dist/micro-app.bundle.js +3 -3
  132. package/dist/micro-app.js +3565 -6710
  133. package/dist/{mips-BUWqP-OH.js → mips-DA33BZX1.js} +11 -1
  134. package/dist/{msdax-DtkouYCg.js → msdax-CCYFIQsP.js} +5 -1
  135. package/dist/{mysql-IkAsWSmF.js → mysql-hjmIjL-D.js} +11 -3
  136. package/dist/{objective-c-B2-ronfg.js → objective-c-RRCpEmqC.js} +2 -1
  137. package/dist/{pascal-Bsnz2eJA.js → pascal-CeV8XfxB.js} +13 -1
  138. package/dist/{pascaligo-D_sMUn0Q.js → pascaligo-IEEGVJAJ.js} +13 -1
  139. package/dist/{perl-BPzHt9SS.js → perl-B5-QbHq_.js} +34 -1
  140. package/dist/{pgsql-DlTJB0PD.js → pgsql-s6kqEJmi.js} +14 -4
  141. package/dist/{php-Dmq5OjwK.js → php-CWWqzOo8.js} +36 -1
  142. package/dist/{pla-HJcccrBy.js → pla-FSvb_YP_.js} +13 -1
  143. package/dist/{postiats-OQn6DKv-.js → postiats-DQdscQXO.js} +370 -1
  144. package/dist/{powerquery-DKaMYC8w.js → powerquery-CtA5JA1I.js} +7 -1
  145. package/dist/{powershell-DWeJHik1.js → powershell-DglEq96N.js} +13 -1
  146. package/dist/{protobuf-CBn_IseU.js → protobuf-BSepub3e.js} +5 -1
  147. package/dist/{pug-BoRpCINl.js → pug-B1847F4G.js} +16 -1
  148. package/dist/{python-zPpZYwLF.js → python-DLI1ji08.js} +59 -11
  149. package/dist/{qsharp-4rGyVZOw.js → qsharp-D4i0Nqg9.js} +28 -3
  150. package/dist/{r-DsgLhBOb.js → r-cdRigKxa.js} +5 -1
  151. package/dist/{razor-B_fCUeGX.js → razor-oAnIJsrL.js} +48 -4
  152. package/dist/{redis-B2fdL4Bg.js → redis-D9MFxvE8.js} +16 -6
  153. package/dist/{redshift-DoaeyCkH.js → redshift-CmCnsvL-.js} +13 -4
  154. package/dist/{restructuredtext-D-6OFBY9.js → restructuredtext-CWy8J51t.js} +19 -1
  155. package/dist/{ruby-D1DD6baV.js → ruby-WP-c36m5.js} +76 -3
  156. package/dist/runtime.js +34 -45
  157. package/dist/{rust-DssUV39M.js → rust-Q9FLdYpu.js} +13 -1
  158. package/dist/{sb-Dmb6tAdv.js → sb-C54-JBGT.js} +12 -1
  159. package/dist/{scala-Co3ETaym.js → scala-CzbFImc5.js} +24 -1
  160. package/dist/{scheme-CMrqXTty.js → scheme-BhfDmYN3.js} +1 -1
  161. package/dist/{scss-DkGudv8Q.js → scss-CEmiBXpS.js} +25 -1
  162. package/dist/{shell-BHN2BI4L.js → shell-Bmc1VhG0.js} +4 -1
  163. package/dist/{solidity-b-R-raGB.js → solidity-C9Q2I8Hh.js} +23 -1
  164. package/dist/{sophia-Y4GjyxNB.js → sophia-jWa1UyKz.js} +16 -1
  165. package/dist/{sparql-CDAPZb88.js → sparql-CM7jctbc.js} +15 -1
  166. package/dist/{sql-DkkpPiUq.js → sql-WzihTkbg.js} +42 -1
  167. package/dist/{st-CSPV91Ej.js → st-6y7_3aup.js} +8 -1
  168. package/dist/style.css +1 -1
  169. package/dist/{swift-DdSC5O48.js → swift-k-0zxG_D.js} +4 -1
  170. package/dist/{systemverilog-CI03XpAv.js → systemverilog-Pnr5_rIP.js} +29 -3
  171. package/dist/{tcl-B8DayMSI.js → tcl-fNPXval8.js} +7 -1
  172. package/dist/tsMode-D_PMsbjK.js +976 -0
  173. package/dist/{twig-B1AUPVB_.js → twig-L2MkztkV.js} +76 -1
  174. package/dist/{typescript-DrlYcCUn.js → typescript-Bu3ZbtQI.js} +23 -2
  175. package/dist/typespec-Cqqo-3Pt.js +123 -0
  176. package/dist/{vb-BIC7ccdG.js → vb-B5YC2xN9.js} +15 -1
  177. package/dist/{wgsl-C9yjop46.js → wgsl-D9BRtftY.js} +26 -1
  178. package/dist/{xml-BzP9D0eZ.js → xml-CNSSkPqy.js} +8 -2
  179. package/dist/{yaml-CT7GOvXu.js → yaml-5RF_PGNe.js} +30 -2
  180. package/handlers/compiler.ts +196 -16
  181. package/handlers/context-setup.ts +10 -5
  182. package/handlers/handler-api-factory.ts +358 -0
  183. package/handlers/handler-api.ts +379 -0
  184. package/handlers/handler-executor.ts +25 -5
  185. package/handlers/handler-scope.ts +398 -0
  186. package/handlers/index.ts +34 -2
  187. package/handlers/runtime-api/component-properties.ts +0 -8
  188. package/handlers/runtime-api/index.ts +1 -1
  189. package/handlers/runtime-api/toast.ts +1 -1
  190. package/index.ts +14 -115
  191. package/micro-app/README.md +10 -10
  192. package/micro-app/state/MicroAppRuntimeContext.ts +1 -28
  193. package/micro-app-entry.ts +0 -5
  194. package/package.json +22 -1
  195. package/redux/actions/application/index.ts +0 -1
  196. package/redux/actions/component/addComponentAction.ts +15 -4
  197. package/redux/actions/component/moveDraggedComponent.ts +1 -2
  198. package/redux/actions/component/update-component-name.ts +1 -1
  199. package/redux/actions/component/updateComponentAttributes.ts +7 -2
  200. package/redux/handlers/functions/build-function-handler.ts +11 -3
  201. package/redux/handlers/functions/deploy-function-handler.ts +11 -3
  202. package/redux/handlers/functions/invoke-function-handler.ts +11 -3
  203. package/redux/handlers/functions/load-functions-handler.ts +2 -1
  204. package/redux/handlers/functions/update-function-handler.ts +2 -1
  205. package/redux/store/component/component.interface.ts +8 -2
  206. package/redux/store/component/store.ts +1 -4
  207. package/state/runtime-context.ts +1 -23
  208. package/utils/RuntimeContextHelpers.ts +221 -90
  209. package/utils/change-detection.ts +125 -1
  210. package/utils/clipboard-utils.ts +18 -8
  211. package/utils/component-registry.ts +118 -0
  212. package/utils/index.ts +14 -1
  213. package/utils/naming-generator.ts +3 -1
  214. package/utils/randomness.ts +3 -1
  215. package/utils/register-components.ts +21 -29
  216. package/utils/render-util.ts +27 -48
  217. package/utils/toast.ts +97 -0
  218. package/vite.config.ts +29 -12
  219. package/components/ui/components/Event/EventAttribute/EventAttribute.style.ts +0 -11
  220. package/components/ui/components/Event/EventAttribute/EventAttribute.ts +0 -28
  221. package/components/ui/components/base/BaseElement/calculateStyles.ts +0 -31
  222. package/components/ui/components/base/BaseElement/drag-events.helpers.ts +0 -71
  223. package/components/ui/components/base/BaseElement/execute-event.helpers.ts +0 -45
  224. package/components/ui/components/base/BaseElement/interactions.helpers.ts +0 -14
  225. package/components/ui/components/wrappers/ComponentTitle/ComponentTitle.ts +0 -95
  226. package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.style.ts +0 -102
  227. package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.ts +0 -258
  228. package/components/ui/components/wrappers/PreviewWrapper.ts +0 -28
  229. package/components/ui/components/wrappers/RectangleSelection/RectangleSelection.ts +0 -154
  230. package/components/ui/nuraly-ui/packages/common/dist/constants/index.d.ts +0 -2
  231. package/components/ui/nuraly-ui/packages/common/dist/constants/index.js +0 -2
  232. package/components/ui/nuraly-ui/packages/common/dist/constants.d.ts +0 -17
  233. package/components/ui/nuraly-ui/packages/common/dist/constants.js +0 -7
  234. package/components/ui/nuraly-ui/packages/common/dist/controllers/index.d.ts +0 -2
  235. package/components/ui/nuraly-ui/packages/common/dist/controllers/index.js +0 -2
  236. package/components/ui/nuraly-ui/packages/common/dist/controllers.d.ts +0 -21
  237. package/components/ui/nuraly-ui/packages/common/dist/controllers.js +0 -22
  238. package/components/ui/nuraly-ui/packages/common/dist/index.d.ts +0 -25
  239. package/components/ui/nuraly-ui/packages/common/dist/index.js +0 -27
  240. package/components/ui/nuraly-ui/packages/common/dist/mixins/index.d.ts +0 -2
  241. package/components/ui/nuraly-ui/packages/common/dist/mixins/index.js +0 -3
  242. package/components/ui/nuraly-ui/packages/common/dist/mixins.d.ts +0 -26
  243. package/components/ui/nuraly-ui/packages/common/dist/mixins.js +0 -29
  244. package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.d.ts +0 -42
  245. package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.js +0 -38
  246. package/components/ui/nuraly-ui/packages/common/dist/shared/constants.d.ts +0 -1
  247. package/components/ui/nuraly-ui/packages/common/dist/shared/constants.js +0 -2
  248. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.d.ts +0 -77
  249. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.js +0 -341
  250. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.d.ts +0 -37
  251. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.js +0 -2
  252. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.d.ts +0 -4
  253. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.js +0 -4
  254. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.d.ts +0 -48
  255. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.js +0 -133
  256. package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.d.ts +0 -37
  257. package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.js +0 -141
  258. package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.d.ts +0 -64
  259. package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.js +0 -95
  260. package/components/ui/nuraly-ui/packages/common/dist/shared/index.d.ts +0 -13
  261. package/components/ui/nuraly-ui/packages/common/dist/shared/index.js +0 -17
  262. package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.d.ts +0 -78
  263. package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.js +0 -194
  264. package/components/ui/nuraly-ui/packages/common/dist/shared/themes.d.ts +0 -44
  265. package/components/ui/nuraly-ui/packages/common/dist/shared/themes.js +0 -85
  266. package/components/ui/nuraly-ui/packages/common/dist/shared/utils.d.ts +0 -60
  267. package/components/ui/nuraly-ui/packages/common/dist/shared/utils.js +0 -85
  268. package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.d.ts +0 -108
  269. package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.js +0 -17
  270. package/components/ui/nuraly-ui/packages/common/dist/themes/index.d.ts +0 -2
  271. package/components/ui/nuraly-ui/packages/common/dist/themes/index.js +0 -2
  272. package/components/ui/nuraly-ui/packages/common/dist/themes.d.ts +0 -22
  273. package/components/ui/nuraly-ui/packages/common/dist/themes.js +0 -23
  274. package/components/ui/nuraly-ui/packages/common/dist/utils/index.d.ts +0 -2
  275. package/components/ui/nuraly-ui/packages/common/dist/utils/index.js +0 -2
  276. package/components/ui/nuraly-ui/packages/common/dist/utils.d.ts +0 -21
  277. package/components/ui/nuraly-ui/packages/common/dist/utils.js +0 -22
  278. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/LICENSE +0 -15
  279. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/README.md +0 -294
  280. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
  281. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy.js +0 -175
  282. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/index.js +0 -7
  283. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/empty/index.js +0 -39
  284. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/file.js +0 -66
  285. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/index.js +0 -23
  286. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/link.js +0 -64
  287. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
  288. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
  289. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
  290. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/fs/index.js +0 -146
  291. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/index.js +0 -16
  292. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/index.js +0 -16
  293. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
  294. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
  295. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json.js +0 -12
  296. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
  297. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
  298. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
  299. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/index.js +0 -7
  300. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move-sync.js +0 -55
  301. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move.js +0 -59
  302. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/output-file/index.js +0 -31
  303. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/path-exists/index.js +0 -12
  304. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/remove/index.js +0 -17
  305. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/async.js +0 -29
  306. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/stat.js +0 -159
  307. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/utimes.js +0 -36
  308. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/LICENSE +0 -15
  309. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/README.md +0 -294
  310. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
  311. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy.js +0 -175
  312. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/index.js +0 -7
  313. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/empty/index.js +0 -39
  314. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/file.js +0 -66
  315. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/index.js +0 -23
  316. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/link.js +0 -64
  317. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
  318. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
  319. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
  320. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/fs/index.js +0 -146
  321. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/index.js +0 -16
  322. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/index.js +0 -16
  323. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
  324. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
  325. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json.js +0 -12
  326. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
  327. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
  328. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
  329. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/index.js +0 -7
  330. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move-sync.js +0 -55
  331. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move.js +0 -59
  332. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/output-file/index.js +0 -31
  333. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/path-exists/index.js +0 -12
  334. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/remove/index.js +0 -17
  335. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/async.js +0 -29
  336. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/stat.js +0 -159
  337. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/utimes.js +0 -36
  338. package/dist/SmartAttributeHandler-C4EliaG0.js +0 -153
  339. package/dist/SmartAttributeHandler-u-ZHGueR.js +0 -193
  340. package/dist/assets/editor.worker-C_S4Avdt.js +0 -11
  341. package/dist/assets/html.worker-DfuQASUV.js +0 -458
  342. package/dist/assets/json.worker-Cucz4wxY.js +0 -42
  343. package/dist/assets/ts.worker-Dme6S0YK.js +0 -37021
  344. package/dist/cssMode-CqMQ6Xsa.js +0 -1443
  345. package/dist/htmlMode-KglxyZXm.js +0 -1453
  346. package/dist/jsonMode-B3rqxD-b.js +0 -1863
  347. package/dist/tsMode-DEiq8fQ0.js +0 -800
  348. package/redux/actions/application/loadApplicationPermissionAction.ts +0 -10
  349. package/utils/styleUtil.ts +0 -7
@@ -1,1453 +0,0 @@
1
- import { m as Xe } from "./CodeEditor-YsOapSut.js";
2
- /*!-----------------------------------------------------------------------------
3
- * Copyright (c) Microsoft Corporation. All rights reserved.
4
- * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
5
- * Released under the MIT license
6
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
7
- *-----------------------------------------------------------------------------*/
8
- var Be = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, qe = Object.getOwnPropertyNames, Qe = Object.prototype.hasOwnProperty, Ge = (e, n, i, r) => {
9
- if (n && typeof n == "object" || typeof n == "function")
10
- for (let t of qe(n))
11
- !Qe.call(e, t) && t !== i && Be(e, t, { get: () => n[t], enumerable: !(r = $e(n, t)) || r.enumerable });
12
- return e;
13
- }, Je = (e, n, i) => (Ge(e, n, "default"), i), c = {};
14
- Je(c, Xe);
15
- var Ye = 2 * 60 * 1e3, Re = class {
16
- _defaults;
17
- _idleCheckInterval;
18
- _lastUsedTime;
19
- _configChangeListener;
20
- _worker;
21
- _client;
22
- constructor(e) {
23
- this._defaults = e, this._worker = null, this._client = null, this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1e3), this._lastUsedTime = 0, this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
24
- }
25
- _stopWorker() {
26
- this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
27
- }
28
- dispose() {
29
- clearInterval(this._idleCheckInterval), this._configChangeListener.dispose(), this._stopWorker();
30
- }
31
- _checkIfIdle() {
32
- if (!this._worker)
33
- return;
34
- Date.now() - this._lastUsedTime > Ye && this._stopWorker();
35
- }
36
- _getClient() {
37
- return this._lastUsedTime = Date.now(), this._client || (this._worker = c.editor.createWebWorker({
38
- moduleId: "vs/language/html/htmlWorker",
39
- createData: {
40
- languageSettings: this._defaults.options,
41
- languageId: this._defaults.languageId
42
- },
43
- label: this._defaults.languageId
44
- }), this._client = this._worker.getProxy()), this._client;
45
- }
46
- getLanguageServiceWorker(...e) {
47
- let n;
48
- return this._getClient().then((i) => {
49
- n = i;
50
- }).then((i) => {
51
- if (this._worker)
52
- return this._worker.withSyncedResources(e);
53
- }).then((i) => n);
54
- }
55
- }, J;
56
- (function(e) {
57
- e.MIN_VALUE = -2147483648, e.MAX_VALUE = 2147483647;
58
- })(J || (J = {}));
59
- var W;
60
- (function(e) {
61
- e.MIN_VALUE = 0, e.MAX_VALUE = 2147483647;
62
- })(W || (W = {}));
63
- var k;
64
- (function(e) {
65
- function n(r, t) {
66
- return r === Number.MAX_VALUE && (r = W.MAX_VALUE), t === Number.MAX_VALUE && (t = W.MAX_VALUE), { line: r, character: t };
67
- }
68
- e.create = n;
69
- function i(r) {
70
- var t = r;
71
- return s.objectLiteral(t) && s.uinteger(t.line) && s.uinteger(t.character);
72
- }
73
- e.is = i;
74
- })(k || (k = {}));
75
- var p;
76
- (function(e) {
77
- function n(r, t, a, o) {
78
- if (s.uinteger(r) && s.uinteger(t) && s.uinteger(a) && s.uinteger(o))
79
- return { start: k.create(r, t), end: k.create(a, o) };
80
- if (k.is(r) && k.is(t))
81
- return { start: r, end: t };
82
- throw new Error("Range#create called with invalid arguments[" + r + ", " + t + ", " + a + ", " + o + "]");
83
- }
84
- e.create = n;
85
- function i(r) {
86
- var t = r;
87
- return s.objectLiteral(t) && k.is(t.start) && k.is(t.end);
88
- }
89
- e.is = i;
90
- })(p || (p = {}));
91
- var z;
92
- (function(e) {
93
- function n(r, t) {
94
- return { uri: r, range: t };
95
- }
96
- e.create = n;
97
- function i(r) {
98
- var t = r;
99
- return s.defined(t) && p.is(t.range) && (s.string(t.uri) || s.undefined(t.uri));
100
- }
101
- e.is = i;
102
- })(z || (z = {}));
103
- var Y;
104
- (function(e) {
105
- function n(r, t, a, o) {
106
- return { targetUri: r, targetRange: t, targetSelectionRange: a, originSelectionRange: o };
107
- }
108
- e.create = n;
109
- function i(r) {
110
- var t = r;
111
- return s.defined(t) && p.is(t.targetRange) && s.string(t.targetUri) && (p.is(t.targetSelectionRange) || s.undefined(t.targetSelectionRange)) && (p.is(t.originSelectionRange) || s.undefined(t.originSelectionRange));
112
- }
113
- e.is = i;
114
- })(Y || (Y = {}));
115
- var X;
116
- (function(e) {
117
- function n(r, t, a, o) {
118
- return {
119
- red: r,
120
- green: t,
121
- blue: a,
122
- alpha: o
123
- };
124
- }
125
- e.create = n;
126
- function i(r) {
127
- var t = r;
128
- return s.numberRange(t.red, 0, 1) && s.numberRange(t.green, 0, 1) && s.numberRange(t.blue, 0, 1) && s.numberRange(t.alpha, 0, 1);
129
- }
130
- e.is = i;
131
- })(X || (X = {}));
132
- var Z;
133
- (function(e) {
134
- function n(r, t) {
135
- return {
136
- range: r,
137
- color: t
138
- };
139
- }
140
- e.create = n;
141
- function i(r) {
142
- var t = r;
143
- return p.is(t.range) && X.is(t.color);
144
- }
145
- e.is = i;
146
- })(Z || (Z = {}));
147
- var K;
148
- (function(e) {
149
- function n(r, t, a) {
150
- return {
151
- label: r,
152
- textEdit: t,
153
- additionalTextEdits: a
154
- };
155
- }
156
- e.create = n;
157
- function i(r) {
158
- var t = r;
159
- return s.string(t.label) && (s.undefined(t.textEdit) || x.is(t)) && (s.undefined(t.additionalTextEdits) || s.typedArray(t.additionalTextEdits, x.is));
160
- }
161
- e.is = i;
162
- })(K || (K = {}));
163
- var P;
164
- (function(e) {
165
- e.Comment = "comment", e.Imports = "imports", e.Region = "region";
166
- })(P || (P = {}));
167
- var ee;
168
- (function(e) {
169
- function n(r, t, a, o, u) {
170
- var f = {
171
- startLine: r,
172
- endLine: t
173
- };
174
- return s.defined(a) && (f.startCharacter = a), s.defined(o) && (f.endCharacter = o), s.defined(u) && (f.kind = u), f;
175
- }
176
- e.create = n;
177
- function i(r) {
178
- var t = r;
179
- return s.uinteger(t.startLine) && s.uinteger(t.startLine) && (s.undefined(t.startCharacter) || s.uinteger(t.startCharacter)) && (s.undefined(t.endCharacter) || s.uinteger(t.endCharacter)) && (s.undefined(t.kind) || s.string(t.kind));
180
- }
181
- e.is = i;
182
- })(ee || (ee = {}));
183
- var B;
184
- (function(e) {
185
- function n(r, t) {
186
- return {
187
- location: r,
188
- message: t
189
- };
190
- }
191
- e.create = n;
192
- function i(r) {
193
- var t = r;
194
- return s.defined(t) && z.is(t.location) && s.string(t.message);
195
- }
196
- e.is = i;
197
- })(B || (B = {}));
198
- var y;
199
- (function(e) {
200
- e.Error = 1, e.Warning = 2, e.Information = 3, e.Hint = 4;
201
- })(y || (y = {}));
202
- var te;
203
- (function(e) {
204
- e.Unnecessary = 1, e.Deprecated = 2;
205
- })(te || (te = {}));
206
- var re;
207
- (function(e) {
208
- function n(i) {
209
- var r = i;
210
- return r != null && s.string(r.href);
211
- }
212
- e.is = n;
213
- })(re || (re = {}));
214
- var H;
215
- (function(e) {
216
- function n(r, t, a, o, u, f) {
217
- var d = { range: r, message: t };
218
- return s.defined(a) && (d.severity = a), s.defined(o) && (d.code = o), s.defined(u) && (d.source = u), s.defined(f) && (d.relatedInformation = f), d;
219
- }
220
- e.create = n;
221
- function i(r) {
222
- var t, a = r;
223
- return s.defined(a) && p.is(a.range) && s.string(a.message) && (s.number(a.severity) || s.undefined(a.severity)) && (s.integer(a.code) || s.string(a.code) || s.undefined(a.code)) && (s.undefined(a.codeDescription) || s.string((t = a.codeDescription) === null || t === void 0 ? void 0 : t.href)) && (s.string(a.source) || s.undefined(a.source)) && (s.undefined(a.relatedInformation) || s.typedArray(a.relatedInformation, B.is));
224
- }
225
- e.is = i;
226
- })(H || (H = {}));
227
- var D;
228
- (function(e) {
229
- function n(r, t) {
230
- for (var a = [], o = 2; o < arguments.length; o++)
231
- a[o - 2] = arguments[o];
232
- var u = { title: r, command: t };
233
- return s.defined(a) && a.length > 0 && (u.arguments = a), u;
234
- }
235
- e.create = n;
236
- function i(r) {
237
- var t = r;
238
- return s.defined(t) && s.string(t.title) && s.string(t.command);
239
- }
240
- e.is = i;
241
- })(D || (D = {}));
242
- var x;
243
- (function(e) {
244
- function n(a, o) {
245
- return { range: a, newText: o };
246
- }
247
- e.replace = n;
248
- function i(a, o) {
249
- return { range: { start: a, end: a }, newText: o };
250
- }
251
- e.insert = i;
252
- function r(a) {
253
- return { range: a, newText: "" };
254
- }
255
- e.del = r;
256
- function t(a) {
257
- var o = a;
258
- return s.objectLiteral(o) && s.string(o.newText) && p.is(o.range);
259
- }
260
- e.is = t;
261
- })(x || (x = {}));
262
- var I;
263
- (function(e) {
264
- function n(r, t, a) {
265
- var o = { label: r };
266
- return t !== void 0 && (o.needsConfirmation = t), a !== void 0 && (o.description = a), o;
267
- }
268
- e.create = n;
269
- function i(r) {
270
- var t = r;
271
- return t !== void 0 && s.objectLiteral(t) && s.string(t.label) && (s.boolean(t.needsConfirmation) || t.needsConfirmation === void 0) && (s.string(t.description) || t.description === void 0);
272
- }
273
- e.is = i;
274
- })(I || (I = {}));
275
- var m;
276
- (function(e) {
277
- function n(i) {
278
- var r = i;
279
- return typeof r == "string";
280
- }
281
- e.is = n;
282
- })(m || (m = {}));
283
- var E;
284
- (function(e) {
285
- function n(a, o, u) {
286
- return { range: a, newText: o, annotationId: u };
287
- }
288
- e.replace = n;
289
- function i(a, o, u) {
290
- return { range: { start: a, end: a }, newText: o, annotationId: u };
291
- }
292
- e.insert = i;
293
- function r(a, o) {
294
- return { range: a, newText: "", annotationId: o };
295
- }
296
- e.del = r;
297
- function t(a) {
298
- var o = a;
299
- return x.is(o) && (I.is(o.annotationId) || m.is(o.annotationId));
300
- }
301
- e.is = t;
302
- })(E || (E = {}));
303
- var U;
304
- (function(e) {
305
- function n(r, t) {
306
- return { textDocument: r, edits: t };
307
- }
308
- e.create = n;
309
- function i(r) {
310
- var t = r;
311
- return s.defined(t) && O.is(t.textDocument) && Array.isArray(t.edits);
312
- }
313
- e.is = i;
314
- })(U || (U = {}));
315
- var M;
316
- (function(e) {
317
- function n(r, t, a) {
318
- var o = {
319
- kind: "create",
320
- uri: r
321
- };
322
- return t !== void 0 && (t.overwrite !== void 0 || t.ignoreIfExists !== void 0) && (o.options = t), a !== void 0 && (o.annotationId = a), o;
323
- }
324
- e.create = n;
325
- function i(r) {
326
- var t = r;
327
- return t && t.kind === "create" && s.string(t.uri) && (t.options === void 0 || (t.options.overwrite === void 0 || s.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || s.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || m.is(t.annotationId));
328
- }
329
- e.is = i;
330
- })(M || (M = {}));
331
- var S;
332
- (function(e) {
333
- function n(r, t, a, o) {
334
- var u = {
335
- kind: "rename",
336
- oldUri: r,
337
- newUri: t
338
- };
339
- return a !== void 0 && (a.overwrite !== void 0 || a.ignoreIfExists !== void 0) && (u.options = a), o !== void 0 && (u.annotationId = o), u;
340
- }
341
- e.create = n;
342
- function i(r) {
343
- var t = r;
344
- return t && t.kind === "rename" && s.string(t.oldUri) && s.string(t.newUri) && (t.options === void 0 || (t.options.overwrite === void 0 || s.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || s.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || m.is(t.annotationId));
345
- }
346
- e.is = i;
347
- })(S || (S = {}));
348
- var T;
349
- (function(e) {
350
- function n(r, t, a) {
351
- var o = {
352
- kind: "delete",
353
- uri: r
354
- };
355
- return t !== void 0 && (t.recursive !== void 0 || t.ignoreIfNotExists !== void 0) && (o.options = t), a !== void 0 && (o.annotationId = a), o;
356
- }
357
- e.create = n;
358
- function i(r) {
359
- var t = r;
360
- return t && t.kind === "delete" && s.string(t.uri) && (t.options === void 0 || (t.options.recursive === void 0 || s.boolean(t.options.recursive)) && (t.options.ignoreIfNotExists === void 0 || s.boolean(t.options.ignoreIfNotExists))) && (t.annotationId === void 0 || m.is(t.annotationId));
361
- }
362
- e.is = i;
363
- })(T || (T = {}));
364
- var $;
365
- (function(e) {
366
- function n(i) {
367
- var r = i;
368
- return r && (r.changes !== void 0 || r.documentChanges !== void 0) && (r.documentChanges === void 0 || r.documentChanges.every(function(t) {
369
- return s.string(t.kind) ? M.is(t) || S.is(t) || T.is(t) : U.is(t);
370
- }));
371
- }
372
- e.is = n;
373
- })($ || ($ = {}));
374
- var N = function() {
375
- function e(n, i) {
376
- this.edits = n, this.changeAnnotations = i;
377
- }
378
- return e.prototype.insert = function(n, i, r) {
379
- var t, a;
380
- if (r === void 0 ? t = x.insert(n, i) : m.is(r) ? (a = r, t = E.insert(n, i, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), t = E.insert(n, i, a)), this.edits.push(t), a !== void 0)
381
- return a;
382
- }, e.prototype.replace = function(n, i, r) {
383
- var t, a;
384
- if (r === void 0 ? t = x.replace(n, i) : m.is(r) ? (a = r, t = E.replace(n, i, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), t = E.replace(n, i, a)), this.edits.push(t), a !== void 0)
385
- return a;
386
- }, e.prototype.delete = function(n, i) {
387
- var r, t;
388
- if (i === void 0 ? r = x.del(n) : m.is(i) ? (t = i, r = E.del(n, i)) : (this.assertChangeAnnotations(this.changeAnnotations), t = this.changeAnnotations.manage(i), r = E.del(n, t)), this.edits.push(r), t !== void 0)
389
- return t;
390
- }, e.prototype.add = function(n) {
391
- this.edits.push(n);
392
- }, e.prototype.all = function() {
393
- return this.edits;
394
- }, e.prototype.clear = function() {
395
- this.edits.splice(0, this.edits.length);
396
- }, e.prototype.assertChangeAnnotations = function(n) {
397
- if (n === void 0)
398
- throw new Error("Text edit change is not configured to manage change annotations.");
399
- }, e;
400
- }(), ne = function() {
401
- function e(n) {
402
- this._annotations = n === void 0 ? /* @__PURE__ */ Object.create(null) : n, this._counter = 0, this._size = 0;
403
- }
404
- return e.prototype.all = function() {
405
- return this._annotations;
406
- }, Object.defineProperty(e.prototype, "size", {
407
- get: function() {
408
- return this._size;
409
- },
410
- enumerable: !1,
411
- configurable: !0
412
- }), e.prototype.manage = function(n, i) {
413
- var r;
414
- if (m.is(n) ? r = n : (r = this.nextId(), i = n), this._annotations[r] !== void 0)
415
- throw new Error("Id " + r + " is already in use.");
416
- if (i === void 0)
417
- throw new Error("No annotation provided for id " + r);
418
- return this._annotations[r] = i, this._size++, r;
419
- }, e.prototype.nextId = function() {
420
- return this._counter++, this._counter.toString();
421
- }, e;
422
- }();
423
- (function() {
424
- function e(n) {
425
- var i = this;
426
- this._textEditChanges = /* @__PURE__ */ Object.create(null), n !== void 0 ? (this._workspaceEdit = n, n.documentChanges ? (this._changeAnnotations = new ne(n.changeAnnotations), n.changeAnnotations = this._changeAnnotations.all(), n.documentChanges.forEach(function(r) {
427
- if (U.is(r)) {
428
- var t = new N(r.edits, i._changeAnnotations);
429
- i._textEditChanges[r.textDocument.uri] = t;
430
- }
431
- })) : n.changes && Object.keys(n.changes).forEach(function(r) {
432
- var t = new N(n.changes[r]);
433
- i._textEditChanges[r] = t;
434
- })) : this._workspaceEdit = {};
435
- }
436
- return Object.defineProperty(e.prototype, "edit", {
437
- get: function() {
438
- return this.initDocumentChanges(), this._changeAnnotations !== void 0 && (this._changeAnnotations.size === 0 ? this._workspaceEdit.changeAnnotations = void 0 : this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()), this._workspaceEdit;
439
- },
440
- enumerable: !1,
441
- configurable: !0
442
- }), e.prototype.getTextEditChange = function(n) {
443
- if (O.is(n)) {
444
- if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
445
- throw new Error("Workspace edit is not configured for document changes.");
446
- var i = { uri: n.uri, version: n.version }, r = this._textEditChanges[i.uri];
447
- if (!r) {
448
- var t = [], a = {
449
- textDocument: i,
450
- edits: t
451
- };
452
- this._workspaceEdit.documentChanges.push(a), r = new N(t, this._changeAnnotations), this._textEditChanges[i.uri] = r;
453
- }
454
- return r;
455
- } else {
456
- if (this.initChanges(), this._workspaceEdit.changes === void 0)
457
- throw new Error("Workspace edit is not configured for normal text edit changes.");
458
- var r = this._textEditChanges[n];
459
- if (!r) {
460
- var t = [];
461
- this._workspaceEdit.changes[n] = t, r = new N(t), this._textEditChanges[n] = r;
462
- }
463
- return r;
464
- }
465
- }, e.prototype.initDocumentChanges = function() {
466
- this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._changeAnnotations = new ne(), this._workspaceEdit.documentChanges = [], this._workspaceEdit.changeAnnotations = this._changeAnnotations.all());
467
- }, e.prototype.initChanges = function() {
468
- this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null));
469
- }, e.prototype.createFile = function(n, i, r) {
470
- if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
471
- throw new Error("Workspace edit is not configured for document changes.");
472
- var t;
473
- I.is(i) || m.is(i) ? t = i : r = i;
474
- var a, o;
475
- if (t === void 0 ? a = M.create(n, r) : (o = m.is(t) ? t : this._changeAnnotations.manage(t), a = M.create(n, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0)
476
- return o;
477
- }, e.prototype.renameFile = function(n, i, r, t) {
478
- if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
479
- throw new Error("Workspace edit is not configured for document changes.");
480
- var a;
481
- I.is(r) || m.is(r) ? a = r : t = r;
482
- var o, u;
483
- if (a === void 0 ? o = S.create(n, i, t) : (u = m.is(a) ? a : this._changeAnnotations.manage(a), o = S.create(n, i, t, u)), this._workspaceEdit.documentChanges.push(o), u !== void 0)
484
- return u;
485
- }, e.prototype.deleteFile = function(n, i, r) {
486
- if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
487
- throw new Error("Workspace edit is not configured for document changes.");
488
- var t;
489
- I.is(i) || m.is(i) ? t = i : r = i;
490
- var a, o;
491
- if (t === void 0 ? a = T.create(n, r) : (o = m.is(t) ? t : this._changeAnnotations.manage(t), a = T.create(n, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0)
492
- return o;
493
- }, e;
494
- })();
495
- var ie;
496
- (function(e) {
497
- function n(r) {
498
- return { uri: r };
499
- }
500
- e.create = n;
501
- function i(r) {
502
- var t = r;
503
- return s.defined(t) && s.string(t.uri);
504
- }
505
- e.is = i;
506
- })(ie || (ie = {}));
507
- var ae;
508
- (function(e) {
509
- function n(r, t) {
510
- return { uri: r, version: t };
511
- }
512
- e.create = n;
513
- function i(r) {
514
- var t = r;
515
- return s.defined(t) && s.string(t.uri) && s.integer(t.version);
516
- }
517
- e.is = i;
518
- })(ae || (ae = {}));
519
- var O;
520
- (function(e) {
521
- function n(r, t) {
522
- return { uri: r, version: t };
523
- }
524
- e.create = n;
525
- function i(r) {
526
- var t = r;
527
- return s.defined(t) && s.string(t.uri) && (t.version === null || s.integer(t.version));
528
- }
529
- e.is = i;
530
- })(O || (O = {}));
531
- var oe;
532
- (function(e) {
533
- function n(r, t, a, o) {
534
- return { uri: r, languageId: t, version: a, text: o };
535
- }
536
- e.create = n;
537
- function i(r) {
538
- var t = r;
539
- return s.defined(t) && s.string(t.uri) && s.string(t.languageId) && s.integer(t.version) && s.string(t.text);
540
- }
541
- e.is = i;
542
- })(oe || (oe = {}));
543
- var F;
544
- (function(e) {
545
- e.PlainText = "plaintext", e.Markdown = "markdown";
546
- })(F || (F = {}));
547
- (function(e) {
548
- function n(i) {
549
- var r = i;
550
- return r === e.PlainText || r === e.Markdown;
551
- }
552
- e.is = n;
553
- })(F || (F = {}));
554
- var q;
555
- (function(e) {
556
- function n(i) {
557
- var r = i;
558
- return s.objectLiteral(i) && F.is(r.kind) && s.string(r.value);
559
- }
560
- e.is = n;
561
- })(q || (q = {}));
562
- var l;
563
- (function(e) {
564
- e.Text = 1, e.Method = 2, e.Function = 3, e.Constructor = 4, e.Field = 5, e.Variable = 6, e.Class = 7, e.Interface = 8, e.Module = 9, e.Property = 10, e.Unit = 11, e.Value = 12, e.Enum = 13, e.Keyword = 14, e.Snippet = 15, e.Color = 16, e.File = 17, e.Reference = 18, e.Folder = 19, e.EnumMember = 20, e.Constant = 21, e.Struct = 22, e.Event = 23, e.Operator = 24, e.TypeParameter = 25;
565
- })(l || (l = {}));
566
- var Q;
567
- (function(e) {
568
- e.PlainText = 1, e.Snippet = 2;
569
- })(Q || (Q = {}));
570
- var se;
571
- (function(e) {
572
- e.Deprecated = 1;
573
- })(se || (se = {}));
574
- var ue;
575
- (function(e) {
576
- function n(r, t, a) {
577
- return { newText: r, insert: t, replace: a };
578
- }
579
- e.create = n;
580
- function i(r) {
581
- var t = r;
582
- return t && s.string(t.newText) && p.is(t.insert) && p.is(t.replace);
583
- }
584
- e.is = i;
585
- })(ue || (ue = {}));
586
- var ce;
587
- (function(e) {
588
- e.asIs = 1, e.adjustIndentation = 2;
589
- })(ce || (ce = {}));
590
- var de;
591
- (function(e) {
592
- function n(i) {
593
- return { label: i };
594
- }
595
- e.create = n;
596
- })(de || (de = {}));
597
- var ge;
598
- (function(e) {
599
- function n(i, r) {
600
- return { items: i || [], isIncomplete: !!r };
601
- }
602
- e.create = n;
603
- })(ge || (ge = {}));
604
- var V;
605
- (function(e) {
606
- function n(r) {
607
- return r.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
608
- }
609
- e.fromPlainText = n;
610
- function i(r) {
611
- var t = r;
612
- return s.string(t) || s.objectLiteral(t) && s.string(t.language) && s.string(t.value);
613
- }
614
- e.is = i;
615
- })(V || (V = {}));
616
- var fe;
617
- (function(e) {
618
- function n(i) {
619
- var r = i;
620
- return !!r && s.objectLiteral(r) && (q.is(r.contents) || V.is(r.contents) || s.typedArray(r.contents, V.is)) && (i.range === void 0 || p.is(i.range));
621
- }
622
- e.is = n;
623
- })(fe || (fe = {}));
624
- var le;
625
- (function(e) {
626
- function n(i, r) {
627
- return r ? { label: i, documentation: r } : { label: i };
628
- }
629
- e.create = n;
630
- })(le || (le = {}));
631
- var he;
632
- (function(e) {
633
- function n(i, r) {
634
- for (var t = [], a = 2; a < arguments.length; a++)
635
- t[a - 2] = arguments[a];
636
- var o = { label: i };
637
- return s.defined(r) && (o.documentation = r), s.defined(t) ? o.parameters = t : o.parameters = [], o;
638
- }
639
- e.create = n;
640
- })(he || (he = {}));
641
- var R;
642
- (function(e) {
643
- e.Text = 1, e.Read = 2, e.Write = 3;
644
- })(R || (R = {}));
645
- var ve;
646
- (function(e) {
647
- function n(i, r) {
648
- var t = { range: i };
649
- return s.number(r) && (t.kind = r), t;
650
- }
651
- e.create = n;
652
- })(ve || (ve = {}));
653
- var h;
654
- (function(e) {
655
- e.File = 1, e.Module = 2, e.Namespace = 3, e.Package = 4, e.Class = 5, e.Method = 6, e.Property = 7, e.Field = 8, e.Constructor = 9, e.Enum = 10, e.Interface = 11, e.Function = 12, e.Variable = 13, e.Constant = 14, e.String = 15, e.Number = 16, e.Boolean = 17, e.Array = 18, e.Object = 19, e.Key = 20, e.Null = 21, e.EnumMember = 22, e.Struct = 23, e.Event = 24, e.Operator = 25, e.TypeParameter = 26;
656
- })(h || (h = {}));
657
- var pe;
658
- (function(e) {
659
- e.Deprecated = 1;
660
- })(pe || (pe = {}));
661
- var me;
662
- (function(e) {
663
- function n(i, r, t, a, o) {
664
- var u = {
665
- name: i,
666
- kind: r,
667
- location: { uri: a, range: t }
668
- };
669
- return o && (u.containerName = o), u;
670
- }
671
- e.create = n;
672
- })(me || (me = {}));
673
- var _e;
674
- (function(e) {
675
- function n(r, t, a, o, u, f) {
676
- var d = {
677
- name: r,
678
- detail: t,
679
- kind: a,
680
- range: o,
681
- selectionRange: u
682
- };
683
- return f !== void 0 && (d.children = f), d;
684
- }
685
- e.create = n;
686
- function i(r) {
687
- var t = r;
688
- return t && s.string(t.name) && s.number(t.kind) && p.is(t.range) && p.is(t.selectionRange) && (t.detail === void 0 || s.string(t.detail)) && (t.deprecated === void 0 || s.boolean(t.deprecated)) && (t.children === void 0 || Array.isArray(t.children)) && (t.tags === void 0 || Array.isArray(t.tags));
689
- }
690
- e.is = i;
691
- })(_e || (_e = {}));
692
- var we;
693
- (function(e) {
694
- e.Empty = "", e.QuickFix = "quickfix", e.Refactor = "refactor", e.RefactorExtract = "refactor.extract", e.RefactorInline = "refactor.inline", e.RefactorRewrite = "refactor.rewrite", e.Source = "source", e.SourceOrganizeImports = "source.organizeImports", e.SourceFixAll = "source.fixAll";
695
- })(we || (we = {}));
696
- var ke;
697
- (function(e) {
698
- function n(r, t) {
699
- var a = { diagnostics: r };
700
- return t != null && (a.only = t), a;
701
- }
702
- e.create = n;
703
- function i(r) {
704
- var t = r;
705
- return s.defined(t) && s.typedArray(t.diagnostics, H.is) && (t.only === void 0 || s.typedArray(t.only, s.string));
706
- }
707
- e.is = i;
708
- })(ke || (ke = {}));
709
- var be;
710
- (function(e) {
711
- function n(r, t, a) {
712
- var o = { title: r }, u = !0;
713
- return typeof t == "string" ? (u = !1, o.kind = t) : D.is(t) ? o.command = t : o.edit = t, u && a !== void 0 && (o.kind = a), o;
714
- }
715
- e.create = n;
716
- function i(r) {
717
- var t = r;
718
- return t && s.string(t.title) && (t.diagnostics === void 0 || s.typedArray(t.diagnostics, H.is)) && (t.kind === void 0 || s.string(t.kind)) && (t.edit !== void 0 || t.command !== void 0) && (t.command === void 0 || D.is(t.command)) && (t.isPreferred === void 0 || s.boolean(t.isPreferred)) && (t.edit === void 0 || $.is(t.edit));
719
- }
720
- e.is = i;
721
- })(be || (be = {}));
722
- var Ee;
723
- (function(e) {
724
- function n(r, t) {
725
- var a = { range: r };
726
- return s.defined(t) && (a.data = t), a;
727
- }
728
- e.create = n;
729
- function i(r) {
730
- var t = r;
731
- return s.defined(t) && p.is(t.range) && (s.undefined(t.command) || D.is(t.command));
732
- }
733
- e.is = i;
734
- })(Ee || (Ee = {}));
735
- var xe;
736
- (function(e) {
737
- function n(r, t) {
738
- return { tabSize: r, insertSpaces: t };
739
- }
740
- e.create = n;
741
- function i(r) {
742
- var t = r;
743
- return s.defined(t) && s.uinteger(t.tabSize) && s.boolean(t.insertSpaces);
744
- }
745
- e.is = i;
746
- })(xe || (xe = {}));
747
- var Ce;
748
- (function(e) {
749
- function n(r, t, a) {
750
- return { range: r, target: t, data: a };
751
- }
752
- e.create = n;
753
- function i(r) {
754
- var t = r;
755
- return s.defined(t) && p.is(t.range) && (s.undefined(t.target) || s.string(t.target));
756
- }
757
- e.is = i;
758
- })(Ce || (Ce = {}));
759
- var Ae;
760
- (function(e) {
761
- function n(r, t) {
762
- return { range: r, parent: t };
763
- }
764
- e.create = n;
765
- function i(r) {
766
- var t = r;
767
- return t !== void 0 && p.is(t.range) && (t.parent === void 0 || e.is(t.parent));
768
- }
769
- e.is = i;
770
- })(Ae || (Ae = {}));
771
- var ye;
772
- (function(e) {
773
- function n(a, o, u, f) {
774
- return new Ze(a, o, u, f);
775
- }
776
- e.create = n;
777
- function i(a) {
778
- var o = a;
779
- return !!(s.defined(o) && s.string(o.uri) && (s.undefined(o.languageId) || s.string(o.languageId)) && s.uinteger(o.lineCount) && s.func(o.getText) && s.func(o.positionAt) && s.func(o.offsetAt));
780
- }
781
- e.is = i;
782
- function r(a, o) {
783
- for (var u = a.getText(), f = t(o, function(A, j) {
784
- var G = A.range.start.line - j.range.start.line;
785
- return G === 0 ? A.range.start.character - j.range.start.character : G;
786
- }), d = u.length, v = f.length - 1; v >= 0; v--) {
787
- var w = f[v], b = a.offsetAt(w.range.start), g = a.offsetAt(w.range.end);
788
- if (g <= d)
789
- u = u.substring(0, b) + w.newText + u.substring(g, u.length);
790
- else
791
- throw new Error("Overlapping edit");
792
- d = b;
793
- }
794
- return u;
795
- }
796
- e.applyEdits = r;
797
- function t(a, o) {
798
- if (a.length <= 1)
799
- return a;
800
- var u = a.length / 2 | 0, f = a.slice(0, u), d = a.slice(u);
801
- t(f, o), t(d, o);
802
- for (var v = 0, w = 0, b = 0; v < f.length && w < d.length; ) {
803
- var g = o(f[v], d[w]);
804
- g <= 0 ? a[b++] = f[v++] : a[b++] = d[w++];
805
- }
806
- for (; v < f.length; )
807
- a[b++] = f[v++];
808
- for (; w < d.length; )
809
- a[b++] = d[w++];
810
- return a;
811
- }
812
- })(ye || (ye = {}));
813
- var Ze = function() {
814
- function e(n, i, r, t) {
815
- this._uri = n, this._languageId = i, this._version = r, this._content = t, this._lineOffsets = void 0;
816
- }
817
- return Object.defineProperty(e.prototype, "uri", {
818
- get: function() {
819
- return this._uri;
820
- },
821
- enumerable: !1,
822
- configurable: !0
823
- }), Object.defineProperty(e.prototype, "languageId", {
824
- get: function() {
825
- return this._languageId;
826
- },
827
- enumerable: !1,
828
- configurable: !0
829
- }), Object.defineProperty(e.prototype, "version", {
830
- get: function() {
831
- return this._version;
832
- },
833
- enumerable: !1,
834
- configurable: !0
835
- }), e.prototype.getText = function(n) {
836
- if (n) {
837
- var i = this.offsetAt(n.start), r = this.offsetAt(n.end);
838
- return this._content.substring(i, r);
839
- }
840
- return this._content;
841
- }, e.prototype.update = function(n, i) {
842
- this._content = n.text, this._version = i, this._lineOffsets = void 0;
843
- }, e.prototype.getLineOffsets = function() {
844
- if (this._lineOffsets === void 0) {
845
- for (var n = [], i = this._content, r = !0, t = 0; t < i.length; t++) {
846
- r && (n.push(t), r = !1);
847
- var a = i.charAt(t);
848
- r = a === "\r" || a === `
849
- `, a === "\r" && t + 1 < i.length && i.charAt(t + 1) === `
850
- ` && t++;
851
- }
852
- r && i.length > 0 && n.push(i.length), this._lineOffsets = n;
853
- }
854
- return this._lineOffsets;
855
- }, e.prototype.positionAt = function(n) {
856
- n = Math.max(Math.min(n, this._content.length), 0);
857
- var i = this.getLineOffsets(), r = 0, t = i.length;
858
- if (t === 0)
859
- return k.create(0, n);
860
- for (; r < t; ) {
861
- var a = Math.floor((r + t) / 2);
862
- i[a] > n ? t = a : r = a + 1;
863
- }
864
- var o = r - 1;
865
- return k.create(o, n - i[o]);
866
- }, e.prototype.offsetAt = function(n) {
867
- var i = this.getLineOffsets();
868
- if (n.line >= i.length)
869
- return this._content.length;
870
- if (n.line < 0)
871
- return 0;
872
- var r = i[n.line], t = n.line + 1 < i.length ? i[n.line + 1] : this._content.length;
873
- return Math.max(Math.min(r + n.character, t), r);
874
- }, Object.defineProperty(e.prototype, "lineCount", {
875
- get: function() {
876
- return this.getLineOffsets().length;
877
- },
878
- enumerable: !1,
879
- configurable: !0
880
- }), e;
881
- }(), s;
882
- (function(e) {
883
- var n = Object.prototype.toString;
884
- function i(g) {
885
- return typeof g < "u";
886
- }
887
- e.defined = i;
888
- function r(g) {
889
- return typeof g > "u";
890
- }
891
- e.undefined = r;
892
- function t(g) {
893
- return g === !0 || g === !1;
894
- }
895
- e.boolean = t;
896
- function a(g) {
897
- return n.call(g) === "[object String]";
898
- }
899
- e.string = a;
900
- function o(g) {
901
- return n.call(g) === "[object Number]";
902
- }
903
- e.number = o;
904
- function u(g, A, j) {
905
- return n.call(g) === "[object Number]" && A <= g && g <= j;
906
- }
907
- e.numberRange = u;
908
- function f(g) {
909
- return n.call(g) === "[object Number]" && -2147483648 <= g && g <= 2147483647;
910
- }
911
- e.integer = f;
912
- function d(g) {
913
- return n.call(g) === "[object Number]" && 0 <= g && g <= 2147483647;
914
- }
915
- e.uinteger = d;
916
- function v(g) {
917
- return n.call(g) === "[object Function]";
918
- }
919
- e.func = v;
920
- function w(g) {
921
- return g !== null && typeof g == "object";
922
- }
923
- e.objectLiteral = w;
924
- function b(g, A) {
925
- return Array.isArray(g) && g.every(A);
926
- }
927
- e.typedArray = b;
928
- })(s || (s = {}));
929
- var ft = class {
930
- constructor(e, n, i) {
931
- this._languageId = e, this._worker = n;
932
- const r = (a) => {
933
- let o = a.getLanguageId();
934
- if (o !== this._languageId)
935
- return;
936
- let u;
937
- this._listener[a.uri.toString()] = a.onDidChangeContent(() => {
938
- window.clearTimeout(u), u = window.setTimeout(() => this._doValidate(a.uri, o), 500);
939
- }), this._doValidate(a.uri, o);
940
- }, t = (a) => {
941
- c.editor.setModelMarkers(a, this._languageId, []);
942
- let o = a.uri.toString(), u = this._listener[o];
943
- u && (u.dispose(), delete this._listener[o]);
944
- };
945
- this._disposables.push(c.editor.onDidCreateModel(r)), this._disposables.push(c.editor.onWillDisposeModel(t)), this._disposables.push(c.editor.onDidChangeModelLanguage((a) => {
946
- t(a.model), r(a.model);
947
- })), this._disposables.push(i((a) => {
948
- c.editor.getModels().forEach((o) => {
949
- o.getLanguageId() === this._languageId && (t(o), r(o));
950
- });
951
- })), this._disposables.push({
952
- dispose: () => {
953
- c.editor.getModels().forEach(t);
954
- for (let a in this._listener)
955
- this._listener[a].dispose();
956
- }
957
- }), c.editor.getModels().forEach(r);
958
- }
959
- _disposables = [];
960
- _listener = /* @__PURE__ */ Object.create(null);
961
- dispose() {
962
- this._disposables.forEach((e) => e && e.dispose()), this._disposables.length = 0;
963
- }
964
- _doValidate(e, n) {
965
- this._worker(e).then((i) => i.doValidation(e.toString())).then((i) => {
966
- const r = i.map((a) => et(e, a));
967
- let t = c.editor.getModel(e);
968
- t && t.getLanguageId() === n && c.editor.setModelMarkers(t, n, r);
969
- }).then(void 0, (i) => {
970
- console.error(i);
971
- });
972
- }
973
- };
974
- function Ke(e) {
975
- switch (e) {
976
- case y.Error:
977
- return c.MarkerSeverity.Error;
978
- case y.Warning:
979
- return c.MarkerSeverity.Warning;
980
- case y.Information:
981
- return c.MarkerSeverity.Info;
982
- case y.Hint:
983
- return c.MarkerSeverity.Hint;
984
- default:
985
- return c.MarkerSeverity.Info;
986
- }
987
- }
988
- function et(e, n) {
989
- let i = typeof n.code == "number" ? String(n.code) : n.code;
990
- return {
991
- severity: Ke(n.severity),
992
- startLineNumber: n.range.start.line + 1,
993
- startColumn: n.range.start.character + 1,
994
- endLineNumber: n.range.end.line + 1,
995
- endColumn: n.range.end.character + 1,
996
- message: n.message,
997
- code: i,
998
- source: n.source
999
- };
1000
- }
1001
- var tt = class {
1002
- constructor(e, n) {
1003
- this._worker = e, this._triggerCharacters = n;
1004
- }
1005
- get triggerCharacters() {
1006
- return this._triggerCharacters;
1007
- }
1008
- provideCompletionItems(e, n, i, r) {
1009
- const t = e.uri;
1010
- return this._worker(t).then((a) => a.doComplete(t.toString(), C(n))).then((a) => {
1011
- if (!a)
1012
- return;
1013
- const o = e.getWordUntilPosition(n), u = new c.Range(n.lineNumber, o.startColumn, n.lineNumber, o.endColumn), f = a.items.map((d) => {
1014
- const v = {
1015
- label: d.label,
1016
- insertText: d.insertText || d.label,
1017
- sortText: d.sortText,
1018
- filterText: d.filterText,
1019
- documentation: d.documentation,
1020
- detail: d.detail,
1021
- command: it(d.command),
1022
- range: u,
1023
- kind: nt(d.kind)
1024
- };
1025
- return d.textEdit && (rt(d.textEdit) ? v.range = {
1026
- insert: _(d.textEdit.insert),
1027
- replace: _(d.textEdit.replace)
1028
- } : v.range = _(d.textEdit.range), v.insertText = d.textEdit.newText), d.additionalTextEdits && (v.additionalTextEdits = d.additionalTextEdits.map(L)), d.insertTextFormat === Q.Snippet && (v.insertTextRules = c.languages.CompletionItemInsertTextRule.InsertAsSnippet), v;
1029
- });
1030
- return {
1031
- isIncomplete: a.isIncomplete,
1032
- suggestions: f
1033
- };
1034
- });
1035
- }
1036
- };
1037
- function C(e) {
1038
- if (e)
1039
- return { character: e.column - 1, line: e.lineNumber - 1 };
1040
- }
1041
- function De(e) {
1042
- if (e)
1043
- return {
1044
- start: {
1045
- line: e.startLineNumber - 1,
1046
- character: e.startColumn - 1
1047
- },
1048
- end: { line: e.endLineNumber - 1, character: e.endColumn - 1 }
1049
- };
1050
- }
1051
- function _(e) {
1052
- if (e)
1053
- return new c.Range(e.start.line + 1, e.start.character + 1, e.end.line + 1, e.end.character + 1);
1054
- }
1055
- function rt(e) {
1056
- return typeof e.insert < "u" && typeof e.replace < "u";
1057
- }
1058
- function nt(e) {
1059
- const n = c.languages.CompletionItemKind;
1060
- switch (e) {
1061
- case l.Text:
1062
- return n.Text;
1063
- case l.Method:
1064
- return n.Method;
1065
- case l.Function:
1066
- return n.Function;
1067
- case l.Constructor:
1068
- return n.Constructor;
1069
- case l.Field:
1070
- return n.Field;
1071
- case l.Variable:
1072
- return n.Variable;
1073
- case l.Class:
1074
- return n.Class;
1075
- case l.Interface:
1076
- return n.Interface;
1077
- case l.Module:
1078
- return n.Module;
1079
- case l.Property:
1080
- return n.Property;
1081
- case l.Unit:
1082
- return n.Unit;
1083
- case l.Value:
1084
- return n.Value;
1085
- case l.Enum:
1086
- return n.Enum;
1087
- case l.Keyword:
1088
- return n.Keyword;
1089
- case l.Snippet:
1090
- return n.Snippet;
1091
- case l.Color:
1092
- return n.Color;
1093
- case l.File:
1094
- return n.File;
1095
- case l.Reference:
1096
- return n.Reference;
1097
- }
1098
- return n.Property;
1099
- }
1100
- function L(e) {
1101
- if (e)
1102
- return {
1103
- range: _(e.range),
1104
- text: e.newText
1105
- };
1106
- }
1107
- function it(e) {
1108
- return e && e.command === "editor.action.triggerSuggest" ? { id: e.command, title: e.title, arguments: e.arguments } : void 0;
1109
- }
1110
- var Me = class {
1111
- constructor(e) {
1112
- this._worker = e;
1113
- }
1114
- provideHover(e, n, i) {
1115
- let r = e.uri;
1116
- return this._worker(r).then((t) => t.doHover(r.toString(), C(n))).then((t) => {
1117
- if (t)
1118
- return {
1119
- range: _(t.range),
1120
- contents: ot(t.contents)
1121
- };
1122
- });
1123
- }
1124
- };
1125
- function at(e) {
1126
- return e && typeof e == "object" && typeof e.kind == "string";
1127
- }
1128
- function Ie(e) {
1129
- return typeof e == "string" ? {
1130
- value: e
1131
- } : at(e) ? e.kind === "plaintext" ? {
1132
- value: e.value.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&")
1133
- } : {
1134
- value: e.value
1135
- } : { value: "```" + e.language + `
1136
- ` + e.value + "\n```\n" };
1137
- }
1138
- function ot(e) {
1139
- if (e)
1140
- return Array.isArray(e) ? e.map(Ie) : [Ie(e)];
1141
- }
1142
- var Se = class {
1143
- constructor(e) {
1144
- this._worker = e;
1145
- }
1146
- provideDocumentHighlights(e, n, i) {
1147
- const r = e.uri;
1148
- return this._worker(r).then((t) => t.findDocumentHighlights(r.toString(), C(n))).then((t) => {
1149
- if (t)
1150
- return t.map((a) => ({
1151
- range: _(a.range),
1152
- kind: st(a.kind)
1153
- }));
1154
- });
1155
- }
1156
- };
1157
- function st(e) {
1158
- switch (e) {
1159
- case R.Read:
1160
- return c.languages.DocumentHighlightKind.Read;
1161
- case R.Write:
1162
- return c.languages.DocumentHighlightKind.Write;
1163
- case R.Text:
1164
- return c.languages.DocumentHighlightKind.Text;
1165
- }
1166
- return c.languages.DocumentHighlightKind.Text;
1167
- }
1168
- var lt = class {
1169
- constructor(e) {
1170
- this._worker = e;
1171
- }
1172
- provideDefinition(e, n, i) {
1173
- const r = e.uri;
1174
- return this._worker(r).then((t) => t.findDefinition(r.toString(), C(n))).then((t) => {
1175
- if (t)
1176
- return [Te(t)];
1177
- });
1178
- }
1179
- };
1180
- function Te(e) {
1181
- return {
1182
- uri: c.Uri.parse(e.uri),
1183
- range: _(e.range)
1184
- };
1185
- }
1186
- var ht = class {
1187
- constructor(e) {
1188
- this._worker = e;
1189
- }
1190
- provideReferences(e, n, i, r) {
1191
- const t = e.uri;
1192
- return this._worker(t).then((a) => a.findReferences(t.toString(), C(n))).then((a) => {
1193
- if (a)
1194
- return a.map(Te);
1195
- });
1196
- }
1197
- }, Fe = class {
1198
- constructor(e) {
1199
- this._worker = e;
1200
- }
1201
- provideRenameEdits(e, n, i, r) {
1202
- const t = e.uri;
1203
- return this._worker(t).then((a) => a.doRename(t.toString(), C(n), i)).then((a) => ut(a));
1204
- }
1205
- };
1206
- function ut(e) {
1207
- if (!e || !e.changes)
1208
- return;
1209
- let n = [];
1210
- for (let i in e.changes) {
1211
- const r = c.Uri.parse(i);
1212
- for (let t of e.changes[i])
1213
- n.push({
1214
- resource: r,
1215
- versionId: void 0,
1216
- textEdit: {
1217
- range: _(t.range),
1218
- text: t.newText
1219
- }
1220
- });
1221
- }
1222
- return {
1223
- edits: n
1224
- };
1225
- }
1226
- var Le = class {
1227
- constructor(e) {
1228
- this._worker = e;
1229
- }
1230
- provideDocumentSymbols(e, n) {
1231
- const i = e.uri;
1232
- return this._worker(i).then((r) => r.findDocumentSymbols(i.toString())).then((r) => {
1233
- if (r)
1234
- return r.map((t) => ({
1235
- name: t.name,
1236
- detail: "",
1237
- containerName: t.containerName,
1238
- kind: ct(t.kind),
1239
- range: _(t.location.range),
1240
- selectionRange: _(t.location.range),
1241
- tags: []
1242
- }));
1243
- });
1244
- }
1245
- };
1246
- function ct(e) {
1247
- let n = c.languages.SymbolKind;
1248
- switch (e) {
1249
- case h.File:
1250
- return n.Array;
1251
- case h.Module:
1252
- return n.Module;
1253
- case h.Namespace:
1254
- return n.Namespace;
1255
- case h.Package:
1256
- return n.Package;
1257
- case h.Class:
1258
- return n.Class;
1259
- case h.Method:
1260
- return n.Method;
1261
- case h.Property:
1262
- return n.Property;
1263
- case h.Field:
1264
- return n.Field;
1265
- case h.Constructor:
1266
- return n.Constructor;
1267
- case h.Enum:
1268
- return n.Enum;
1269
- case h.Interface:
1270
- return n.Interface;
1271
- case h.Function:
1272
- return n.Function;
1273
- case h.Variable:
1274
- return n.Variable;
1275
- case h.Constant:
1276
- return n.Constant;
1277
- case h.String:
1278
- return n.String;
1279
- case h.Number:
1280
- return n.Number;
1281
- case h.Boolean:
1282
- return n.Boolean;
1283
- case h.Array:
1284
- return n.Array;
1285
- }
1286
- return n.Function;
1287
- }
1288
- var je = class {
1289
- constructor(e) {
1290
- this._worker = e;
1291
- }
1292
- provideLinks(e, n) {
1293
- const i = e.uri;
1294
- return this._worker(i).then((r) => r.findDocumentLinks(i.toString())).then((r) => {
1295
- if (r)
1296
- return {
1297
- links: r.map((t) => ({
1298
- range: _(t.range),
1299
- url: t.target
1300
- }))
1301
- };
1302
- });
1303
- }
1304
- }, Ne = class {
1305
- constructor(e) {
1306
- this._worker = e;
1307
- }
1308
- provideDocumentFormattingEdits(e, n, i) {
1309
- const r = e.uri;
1310
- return this._worker(r).then((t) => t.format(r.toString(), null, He(n)).then((a) => {
1311
- if (!(!a || a.length === 0))
1312
- return a.map(L);
1313
- }));
1314
- }
1315
- }, We = class {
1316
- constructor(e) {
1317
- this._worker = e;
1318
- }
1319
- canFormatMultipleRanges = !1;
1320
- provideDocumentRangeFormattingEdits(e, n, i, r) {
1321
- const t = e.uri;
1322
- return this._worker(t).then((a) => a.format(t.toString(), De(n), He(i)).then((o) => {
1323
- if (!(!o || o.length === 0))
1324
- return o.map(L);
1325
- }));
1326
- }
1327
- };
1328
- function He(e) {
1329
- return {
1330
- tabSize: e.tabSize,
1331
- insertSpaces: e.insertSpaces
1332
- };
1333
- }
1334
- var vt = class {
1335
- constructor(e) {
1336
- this._worker = e;
1337
- }
1338
- provideDocumentColors(e, n) {
1339
- const i = e.uri;
1340
- return this._worker(i).then((r) => r.findDocumentColors(i.toString())).then((r) => {
1341
- if (r)
1342
- return r.map((t) => ({
1343
- color: t.color,
1344
- range: _(t.range)
1345
- }));
1346
- });
1347
- }
1348
- provideColorPresentations(e, n, i) {
1349
- const r = e.uri;
1350
- return this._worker(r).then((t) => t.getColorPresentations(r.toString(), n.color, De(n.range))).then((t) => {
1351
- if (t)
1352
- return t.map((a) => {
1353
- let o = {
1354
- label: a.label
1355
- };
1356
- return a.textEdit && (o.textEdit = L(a.textEdit)), a.additionalTextEdits && (o.additionalTextEdits = a.additionalTextEdits.map(L)), o;
1357
- });
1358
- });
1359
- }
1360
- }, Ue = class {
1361
- constructor(e) {
1362
- this._worker = e;
1363
- }
1364
- provideFoldingRanges(e, n, i) {
1365
- const r = e.uri;
1366
- return this._worker(r).then((t) => t.getFoldingRanges(r.toString(), n)).then((t) => {
1367
- if (t)
1368
- return t.map((a) => {
1369
- const o = {
1370
- start: a.startLine + 1,
1371
- end: a.endLine + 1
1372
- };
1373
- return typeof a.kind < "u" && (o.kind = dt(a.kind)), o;
1374
- });
1375
- });
1376
- }
1377
- };
1378
- function dt(e) {
1379
- switch (e) {
1380
- case P.Comment:
1381
- return c.languages.FoldingRangeKind.Comment;
1382
- case P.Imports:
1383
- return c.languages.FoldingRangeKind.Imports;
1384
- case P.Region:
1385
- return c.languages.FoldingRangeKind.Region;
1386
- }
1387
- }
1388
- var Oe = class {
1389
- constructor(e) {
1390
- this._worker = e;
1391
- }
1392
- provideSelectionRanges(e, n, i) {
1393
- const r = e.uri;
1394
- return this._worker(r).then((t) => t.getSelectionRanges(r.toString(), n.map(C))).then((t) => {
1395
- if (t)
1396
- return t.map((a) => {
1397
- const o = [];
1398
- for (; a; )
1399
- o.push({ range: _(a.range) }), a = a.parent;
1400
- return o;
1401
- });
1402
- });
1403
- }
1404
- }, Ve = class extends tt {
1405
- constructor(e) {
1406
- super(e, [".", ":", "<", '"', "=", "/"]);
1407
- }
1408
- };
1409
- function pt(e) {
1410
- const n = new Re(e), i = (...t) => n.getLanguageServiceWorker(...t);
1411
- let r = e.languageId;
1412
- c.languages.registerCompletionItemProvider(r, new Ve(i)), c.languages.registerHoverProvider(r, new Me(i)), c.languages.registerDocumentHighlightProvider(r, new Se(i)), c.languages.registerLinkProvider(r, new je(i)), c.languages.registerFoldingRangeProvider(r, new Ue(i)), c.languages.registerDocumentSymbolProvider(r, new Le(i)), c.languages.registerSelectionRangeProvider(r, new Oe(i)), c.languages.registerRenameProvider(r, new Fe(i)), r === "html" && (c.languages.registerDocumentFormattingEditProvider(r, new Ne(i)), c.languages.registerDocumentRangeFormattingEditProvider(r, new We(i)));
1413
- }
1414
- function mt(e) {
1415
- const n = [], i = [], r = new Re(e);
1416
- n.push(r);
1417
- const t = (...o) => r.getLanguageServiceWorker(...o);
1418
- function a() {
1419
- const { languageId: o, modeConfiguration: u } = e;
1420
- ze(i), u.completionItems && i.push(c.languages.registerCompletionItemProvider(o, new Ve(t))), u.hovers && i.push(c.languages.registerHoverProvider(o, new Me(t))), u.documentHighlights && i.push(c.languages.registerDocumentHighlightProvider(o, new Se(t))), u.links && i.push(c.languages.registerLinkProvider(o, new je(t))), u.documentSymbols && i.push(c.languages.registerDocumentSymbolProvider(o, new Le(t))), u.rename && i.push(c.languages.registerRenameProvider(o, new Fe(t))), u.foldingRanges && i.push(c.languages.registerFoldingRangeProvider(o, new Ue(t))), u.selectionRanges && i.push(c.languages.registerSelectionRangeProvider(o, new Oe(t))), u.documentFormattingEdits && i.push(c.languages.registerDocumentFormattingEditProvider(o, new Ne(t))), u.documentRangeFormattingEdits && i.push(c.languages.registerDocumentRangeFormattingEditProvider(o, new We(t)));
1421
- }
1422
- return a(), n.push(Pe(i)), Pe(n);
1423
- }
1424
- function Pe(e) {
1425
- return { dispose: () => ze(e) };
1426
- }
1427
- function ze(e) {
1428
- for (; e.length; )
1429
- e.pop().dispose();
1430
- }
1431
- export {
1432
- tt as CompletionAdapter,
1433
- lt as DefinitionAdapter,
1434
- ft as DiagnosticsAdapter,
1435
- vt as DocumentColorAdapter,
1436
- Ne as DocumentFormattingEditProvider,
1437
- Se as DocumentHighlightAdapter,
1438
- je as DocumentLinkAdapter,
1439
- We as DocumentRangeFormattingEditProvider,
1440
- Le as DocumentSymbolAdapter,
1441
- Ue as FoldingRangeAdapter,
1442
- Me as HoverAdapter,
1443
- ht as ReferenceAdapter,
1444
- Fe as RenameAdapter,
1445
- Oe as SelectionRangeAdapter,
1446
- Re as WorkerManager,
1447
- C as fromPosition,
1448
- De as fromRange,
1449
- mt as setupMode,
1450
- pt as setupMode1,
1451
- _ as toRange,
1452
- L as toTextEdit
1453
- };