@nuraly/runtime 0.1.7 → 0.1.8
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.
- package/README.md +83 -765
- package/components/ui/components/Event/EventValue/EventValue.ts +13 -8
- package/components/ui/components/ToastContainer/ToastContainer.ts +1 -1
- package/components/ui/components/advanced/AIChat/AIChat.ts +1 -2
- package/components/ui/components/advanced/Collapse/Collapse.ts +5 -2
- package/components/ui/components/advanced/Collections/Collections.ts +2 -2
- package/components/ui/components/advanced/MicroApp/MicroApp.ts +3 -11
- package/components/ui/components/advanced/RefComponent/RefComponent.ts +2 -2
- package/components/ui/components/advanced/RichText/RichText.ts +5 -4
- package/components/ui/components/advanced/RichText/RichTextEditor.ts +0 -167
- package/components/ui/components/base/BaseElement/base-change-detection.ts +1 -5
- package/components/ui/components/base/BaseElement.ts +229 -610
- package/components/ui/components/base/FormRegisterable.ts +83 -0
- package/components/ui/components/base/controllers/DragDropController.ts +175 -0
- package/components/ui/components/base/controllers/ErrorController.ts +180 -0
- package/components/ui/components/base/controllers/EventController.ts +112 -0
- package/components/ui/components/base/controllers/InputHandlerController.ts +298 -0
- package/components/ui/components/base/controllers/SelectionController.ts +323 -0
- package/components/ui/components/base/controllers/StyleHandlerController.ts +286 -0
- package/components/ui/components/base/controllers/index.ts +11 -0
- package/components/ui/components/base/mixins/EditorModeMixin.ts +185 -0
- package/components/ui/components/base/mixins/index.ts +6 -0
- package/components/ui/components/base/types/base-element.types.ts +138 -0
- package/components/ui/components/base/types/index.ts +21 -0
- package/components/ui/components/base/utils/event-debouncer.ts +209 -0
- package/components/ui/components/base/utils/index.ts +11 -0
- package/components/ui/components/base/utils/style-cache.ts +94 -0
- package/components/ui/components/display/BoxModel/BoxModel.ts +177 -116
- package/components/ui/components/display/Code/Code.ts +40 -26
- package/components/ui/components/display/Divider/Divider.ts +2 -2
- package/components/ui/components/display/Icon/Icon.ts +2 -3
- package/components/ui/components/display/Image/Image.ts +72 -46
- package/components/ui/components/display/Tag/Tag.ts +2 -3
- package/components/ui/components/display/Video/Video.ts +91 -31
- package/components/ui/components/inputs/Button/Button.ts +2 -2
- package/components/ui/components/inputs/Checkbox/Checkbox.ts +14 -40
- package/components/ui/components/inputs/ColorPicker/colorpicker.ts +3 -4
- package/components/ui/components/inputs/DatePicker/DatePicker.ts +47 -25
- package/components/ui/components/inputs/Dropdown/Dropdown.ts +2 -2
- package/components/ui/components/inputs/Form/Form.style.ts +26 -0
- package/components/ui/components/inputs/Form/Form.ts +352 -0
- package/components/ui/components/inputs/IconPicker/IconPicker.ts +22 -18
- package/components/ui/components/inputs/InsertDropdown/InsertDropdown.ts +0 -20
- package/components/ui/components/inputs/NumberInput/NumberInput.ts +0 -4
- package/components/ui/components/inputs/RadioButton/Radio-button.ts +11 -13
- package/components/ui/components/inputs/Select/Select.ts +38 -24
- package/components/ui/components/inputs/TextInput/TextInput.ts +15 -9
- package/components/ui/components/inputs/Textarea/Textarea.ts +30 -30
- package/components/ui/components/inputs/UsersDropdown/UsersDropdown.ts +1 -1
- package/components/ui/components/layout/Card/Card.ts +112 -10
- package/components/ui/components/layout/Containers/Container.style.ts +18 -0
- package/components/ui/components/layout/Containers/Container.ts +11 -5
- package/components/ui/components/layout/Grid/Col.style.ts +27 -0
- package/components/ui/components/layout/Grid/Col.ts +209 -0
- package/components/ui/components/layout/Grid/Row.style.ts +73 -0
- package/components/ui/components/layout/Grid/Row.ts +166 -0
- package/components/ui/components/layout/Grid/index.ts +7 -0
- package/components/ui/components/layout/Panel/Panel.ts +2 -2
- package/components/ui/components/layout/Tabs/Tabs.ts +0 -1
- package/components/ui/components/navigation/EmbedURL/EmbedURL.ts +62 -26
- package/components/ui/components/navigation/Link/Link.ts +27 -16
- package/components/ui/components/navigation/Menu/Menu.ts +26 -48
- package/components/ui/components/runtime/MicroApp/MicroApp.ts +7 -147
- package/components/ui/components/runtime/MicroApp/MicroAppDataLoader.ts +6 -2
- package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +472 -0
- package/components/ui/components/studio/FunctionsPanel/index.ts +1 -0
- package/components/ui/components/utility/AccessRoles/AccessRoles.style.ts +242 -0
- package/components/ui/components/utility/AccessRoles/AccessRoles.ts +476 -0
- package/components/ui/components/utility/Border/Border.ts +0 -14
- package/components/ui/components/utility/BorderManager/BorderManager.style.ts +237 -0
- package/components/ui/components/utility/BorderManager/BorderManager.ts +503 -0
- package/components/ui/components/utility/BoxShadow/BoxShadow.ts +0 -16
- package/components/ui/components/utility/Document/Document.ts +54 -25
- package/components/ui/components/utility/Export-Import/Export-Import.ts +8 -7
- package/components/ui/components/utility/Handlers/Handlers.ts +14 -17
- package/components/ui/components/utility/ValidationRules/ValidationRules.ts +440 -0
- package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.ts +1 -0
- package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.ts +1 -24
- package/components/ui/nuraly-ui/src/components/badge/badge.style.ts +4 -3
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.component.ts +2 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +12 -6
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.style.ts +23 -0
- package/dist/{index-B4yIOSMd.js → BaseElement-BNBn_IJk.js} +2920 -267
- package/dist/{CodeEditor-YsOapSut.js → CodeEditor-Bf4L2rO_.js} +84127 -76319
- package/dist/{CodeEditor-BiNku87K.js → CodeEditor-Cpph-xRc.js} +7 -7
- package/dist/{abap-B2diVmjb.js → abap-D0Neqhq6.js} +91 -1
- package/dist/{apex-3NuJ-nsI.js → apex-B5LhxkeG.js} +18 -1
- package/dist/assets/editor.worker-DcwbJ0PV.js +12 -0
- package/dist/assets/html.worker-BTMxskjR.js +461 -0
- package/dist/assets/json.worker-D3vTGdf_.js +49 -0
- package/dist/assets/ts.worker-BsM1BXac.js +51334 -0
- package/dist/{azcli-XGXuUsMB.js → azcli-BrBH0QTU.js} +1 -1
- package/dist/{bat-B8Vhm634.js → bat-BfzAov64.js} +12 -1
- package/dist/{bicep-Cc8X5S_k.js → bicep-C3bCSWel.js} +1 -1
- package/dist/{cameligo-Bo3wBh9T.js → cameligo-sFL5plcd.js} +13 -1
- package/dist/{clojure-CPoQlpIK.js → clojure-CfeExRz0.js} +14 -1
- package/dist/{coffee-BxvTGz39.js → coffee-Xws5K0WL.js} +11 -1
- package/dist/{cpp-5RpEV7vC.js → cpp-CqOUEpxN.js} +28 -23
- package/dist/{csharp-slXXP3fo.js → csharp-DVLiBOZb.js} +13 -1
- package/dist/{csp-B98p6-gH.js → csp-DVFp9bw5.js} +3 -1
- package/dist/{css-BDsDSAin.js → css-DwARn2R6.js} +8 -1
- package/dist/cssMode-DMsdy1N0.js +1577 -0
- package/dist/{cypher-Dc4IMouD.js → cypher-uY0Mffat.js} +8 -1
- package/dist/{dart-LhvE3yD2.js → dart-D27H-mX_.js} +18 -1
- package/dist/{dockerfile-CwzplJeZ.js → dockerfile-CmV85WZK.js} +5 -1
- package/dist/{ecl-DxW3FiJi.js → ecl--fKn7yzB.js} +9 -1
- package/dist/{elixir-BI40g7TU.js → elixir-DUhH17ON.js} +87 -1
- package/dist/{flow9-tR2v0bGz.js → flow9-B3Dx2LLe.js} +8 -1
- package/dist/{freemarker2-Bfqhwyij.js → freemarker2-D51H9HYi.js} +359 -7
- package/dist/{fsharp-BLAma0OT.js → fsharp-SyqBfUAR.js} +14 -1
- package/dist/{go-nYcD3y4Z.js → go-BbMR2tdT.js} +17 -1
- package/dist/{graphql-Dp1cHWmP.js → graphql-DDJE6tIl.js} +17 -1
- package/dist/{handlebars-DCgKNBmn.js → handlebars-CF6gdAX4.js} +38 -4
- package/dist/{hcl-6NT8Kbna.js → hcl-YBvpaUqf.js} +13 -1
- package/dist/{html-C6wR7sMB.js → html-c2n_zkM3.js} +37 -4
- package/dist/htmlMode-9IJTuZUh.js +1587 -0
- package/dist/{ini-BZCOLrEc.js → ini-Ct73dBtM.js} +10 -1
- package/dist/{java-DAMcfJbX.js → java-C_jlkwoG.js} +18 -1
- package/dist/{javascript-D1L5MTmg.js → javascript-DhEEBMxD.js} +3 -2
- package/dist/jsonMode-CB6k-4rp.js +2002 -0
- package/dist/{julia-CQ46G71H.js → julia-D8WE5U1e.js} +22 -1
- package/dist/{kotlin-CEjVo_6E.js → kotlin-Zy9aq5yB.js} +15 -1
- package/dist/{less-DreV99nP.js → less-sZ0iHtE8.js} +1 -1
- package/dist/{lexon-DBVJhqLb.js → lexon-CsdNL29A.js} +13 -1
- package/dist/{liquid-D_pDYIs1.js → liquid-CwtPiwnW.js} +12 -4
- package/dist/{lua-Dcc_j6L-.js → lua-C2YJo0zw.js} +12 -1
- package/dist/{m3-B9SlZL4n.js → m3-CPLP40SG.js} +7 -1
- package/dist/{markdown-CuGw9_MP.js → markdown-B1mf5e0R.js} +34 -1
- package/dist/{mdx-CKsJ3cF4.js → mdx-LewPRYF8.js} +2 -2
- package/dist/{micro-app-entry-xdTX5-ut.js → micro-app-entry-C3RDIukG.js} +8082 -9628
- package/dist/micro-app.bundle.js +3 -3
- package/dist/micro-app.js +3585 -6759
- package/dist/{mips-BUWqP-OH.js → mips-DA33BZX1.js} +11 -1
- package/dist/{msdax-DtkouYCg.js → msdax-CCYFIQsP.js} +5 -1
- package/dist/{mysql-IkAsWSmF.js → mysql-hjmIjL-D.js} +11 -3
- package/dist/{objective-c-B2-ronfg.js → objective-c-RRCpEmqC.js} +2 -1
- package/dist/{pascal-Bsnz2eJA.js → pascal-CeV8XfxB.js} +13 -1
- package/dist/{pascaligo-D_sMUn0Q.js → pascaligo-IEEGVJAJ.js} +13 -1
- package/dist/{perl-BPzHt9SS.js → perl-B5-QbHq_.js} +34 -1
- package/dist/{pgsql-DlTJB0PD.js → pgsql-s6kqEJmi.js} +14 -4
- package/dist/{php-Dmq5OjwK.js → php-CWWqzOo8.js} +36 -1
- package/dist/{pla-HJcccrBy.js → pla-FSvb_YP_.js} +13 -1
- package/dist/{postiats-OQn6DKv-.js → postiats-DQdscQXO.js} +370 -1
- package/dist/{powerquery-DKaMYC8w.js → powerquery-CtA5JA1I.js} +7 -1
- package/dist/{powershell-DWeJHik1.js → powershell-DglEq96N.js} +13 -1
- package/dist/{protobuf-CBn_IseU.js → protobuf-BSepub3e.js} +5 -1
- package/dist/{pug-BoRpCINl.js → pug-B1847F4G.js} +16 -1
- package/dist/{python-zPpZYwLF.js → python-h5Z2g-yl.js} +59 -11
- package/dist/{qsharp-4rGyVZOw.js → qsharp-D4i0Nqg9.js} +28 -3
- package/dist/{r-DsgLhBOb.js → r-cdRigKxa.js} +5 -1
- package/dist/{razor-B_fCUeGX.js → razor-D5ep1Doy.js} +48 -4
- package/dist/{redis-B2fdL4Bg.js → redis-D9MFxvE8.js} +16 -6
- package/dist/{redshift-DoaeyCkH.js → redshift-CmCnsvL-.js} +13 -4
- package/dist/{restructuredtext-D-6OFBY9.js → restructuredtext-CWy8J51t.js} +19 -1
- package/dist/{ruby-D1DD6baV.js → ruby-WP-c36m5.js} +76 -3
- package/dist/runtime.js +34 -45
- package/dist/{rust-DssUV39M.js → rust-Q9FLdYpu.js} +13 -1
- package/dist/{sb-Dmb6tAdv.js → sb-C54-JBGT.js} +12 -1
- package/dist/{scala-Co3ETaym.js → scala-CzbFImc5.js} +24 -1
- package/dist/{scheme-CMrqXTty.js → scheme-BhfDmYN3.js} +1 -1
- package/dist/{scss-DkGudv8Q.js → scss-CEmiBXpS.js} +25 -1
- package/dist/{shell-BHN2BI4L.js → shell-Bmc1VhG0.js} +4 -1
- package/dist/{solidity-b-R-raGB.js → solidity-C9Q2I8Hh.js} +23 -1
- package/dist/{sophia-Y4GjyxNB.js → sophia-jWa1UyKz.js} +16 -1
- package/dist/{sparql-CDAPZb88.js → sparql-CM7jctbc.js} +15 -1
- package/dist/{sql-DkkpPiUq.js → sql-WzihTkbg.js} +42 -1
- package/dist/{st-CSPV91Ej.js → st-6y7_3aup.js} +8 -1
- package/dist/style.css +1 -1
- package/dist/{swift-DdSC5O48.js → swift-k-0zxG_D.js} +4 -1
- package/dist/{systemverilog-CI03XpAv.js → systemverilog-Pnr5_rIP.js} +29 -3
- package/dist/{tcl-B8DayMSI.js → tcl-fNPXval8.js} +7 -1
- package/dist/tsMode-B_6LiBE1.js +976 -0
- package/dist/{twig-B1AUPVB_.js → twig-L2MkztkV.js} +76 -1
- package/dist/{typescript-DrlYcCUn.js → typescript-BBG0jH4p.js} +23 -2
- package/dist/typespec-Cqqo-3Pt.js +123 -0
- package/dist/{vb-BIC7ccdG.js → vb-B5YC2xN9.js} +15 -1
- package/dist/{wgsl-C9yjop46.js → wgsl-D9BRtftY.js} +26 -1
- package/dist/{xml-BzP9D0eZ.js → xml-DgLB7rE6.js} +8 -2
- package/dist/{yaml-CT7GOvXu.js → yaml-DiI4HpSv.js} +30 -2
- package/handlers/compiler.ts +196 -16
- package/handlers/context-setup.ts +10 -5
- package/handlers/handler-api-factory.ts +358 -0
- package/handlers/handler-api.ts +379 -0
- package/handlers/handler-executor.ts +25 -5
- package/handlers/handler-scope.ts +398 -0
- package/handlers/index.ts +34 -2
- package/handlers/runtime-api/component-properties.ts +0 -8
- package/handlers/runtime-api/index.ts +1 -1
- package/handlers/runtime-api/toast.ts +1 -1
- package/index.ts +14 -115
- package/micro-app/README.md +10 -10
- package/micro-app/state/MicroAppRuntimeContext.ts +1 -28
- package/micro-app-entry.ts +0 -5
- package/package.json +19 -1
- package/redux/actions/application/index.ts +0 -1
- package/redux/actions/component/addComponentAction.ts +15 -4
- package/redux/actions/component/moveDraggedComponent.ts +1 -2
- package/redux/actions/component/update-component-name.ts +1 -1
- package/redux/actions/component/updateComponentAttributes.ts +7 -2
- package/redux/handlers/functions/build-function-handler.ts +11 -3
- package/redux/handlers/functions/deploy-function-handler.ts +11 -3
- package/redux/handlers/functions/invoke-function-handler.ts +11 -3
- package/redux/handlers/functions/load-functions-handler.ts +2 -1
- package/redux/handlers/functions/update-function-handler.ts +2 -1
- package/redux/store/component/component.interface.ts +8 -2
- package/redux/store/component/store.ts +1 -4
- package/state/runtime-context.ts +1 -23
- package/utils/RuntimeContextHelpers.ts +221 -90
- package/utils/change-detection.ts +125 -1
- package/utils/clipboard-utils.ts +18 -8
- package/utils/component-registry.ts +118 -0
- package/utils/index.ts +14 -1
- package/utils/naming-generator.ts +3 -1
- package/utils/randomness.ts +3 -1
- package/utils/register-components.ts +21 -29
- package/utils/render-util.ts +27 -48
- package/utils/toast.ts +97 -0
- package/vite.config.ts +29 -12
- package/components/ui/components/Event/EventAttribute/EventAttribute.style.ts +0 -11
- package/components/ui/components/Event/EventAttribute/EventAttribute.ts +0 -28
- package/components/ui/components/base/BaseElement/calculateStyles.ts +0 -31
- package/components/ui/components/base/BaseElement/drag-events.helpers.ts +0 -71
- package/components/ui/components/base/BaseElement/execute-event.helpers.ts +0 -45
- package/components/ui/components/base/BaseElement/interactions.helpers.ts +0 -14
- package/components/ui/components/wrappers/ComponentTitle/ComponentTitle.ts +0 -95
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.style.ts +0 -102
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.ts +0 -258
- package/components/ui/components/wrappers/PreviewWrapper.ts +0 -28
- package/components/ui/components/wrappers/RectangleSelection/RectangleSelection.ts +0 -154
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/constants.d.ts +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/constants.js +0 -7
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/controllers.d.ts +0 -21
- package/components/ui/nuraly-ui/packages/common/dist/controllers.js +0 -22
- package/components/ui/nuraly-ui/packages/common/dist/index.d.ts +0 -25
- package/components/ui/nuraly-ui/packages/common/dist/index.js +0 -27
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.js +0 -3
- package/components/ui/nuraly-ui/packages/common/dist/mixins.d.ts +0 -26
- package/components/ui/nuraly-ui/packages/common/dist/mixins.js +0 -29
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.d.ts +0 -42
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.js +0 -38
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.d.ts +0 -77
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.js +0 -341
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.d.ts +0 -37
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.d.ts +0 -4
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.js +0 -4
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.d.ts +0 -48
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.js +0 -133
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.d.ts +0 -37
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.js +0 -141
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.d.ts +0 -64
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.js +0 -95
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.d.ts +0 -13
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.js +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.d.ts +0 -78
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.js +0 -194
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.d.ts +0 -44
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.js +0 -85
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.d.ts +0 -60
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.js +0 -85
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.d.ts +0 -108
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.js +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/themes.d.ts +0 -22
- package/components/ui/nuraly-ui/packages/common/dist/themes.js +0 -23
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/utils.d.ts +0 -21
- package/components/ui/nuraly-ui/packages/common/dist/utils.js +0 -22
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/LICENSE +0 -15
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/README.md +0 -294
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy.js +0 -175
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/index.js +0 -16
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/index.js +0 -16
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/index.js +0 -7
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move.js +0 -59
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/async.js +0 -29
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/LICENSE +0 -15
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/README.md +0 -294
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy.js +0 -175
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/index.js +0 -16
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/index.js +0 -16
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/index.js +0 -7
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move.js +0 -59
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/async.js +0 -29
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/dist/SmartAttributeHandler-C4EliaG0.js +0 -153
- package/dist/SmartAttributeHandler-u-ZHGueR.js +0 -193
- package/dist/assets/editor.worker-C_S4Avdt.js +0 -11
- package/dist/assets/html.worker-DfuQASUV.js +0 -458
- package/dist/assets/json.worker-Cucz4wxY.js +0 -42
- package/dist/assets/ts.worker-Dme6S0YK.js +0 -37021
- package/dist/cssMode-CqMQ6Xsa.js +0 -1443
- package/dist/htmlMode-KglxyZXm.js +0 -1453
- package/dist/jsonMode-B3rqxD-b.js +0 -1863
- package/dist/tsMode-DEiq8fQ0.js +0 -800
- package/redux/actions/application/loadApplicationPermissionAction.ts +0 -10
- package/utils/styleUtil.ts +0 -7
package/dist/tsMode-DEiq8fQ0.js
DELETED
|
@@ -1,800 +0,0 @@
|
|
|
1
|
-
import { t as O, m as I } 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 A = Object.defineProperty, N = Object.getOwnPropertyDescriptor, M = Object.getOwnPropertyNames, R = Object.prototype.hasOwnProperty, K = (e, t, s) => t in e ? A(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, E = (e, t, s, o) => {
|
|
9
|
-
if (t && typeof t == "object" || typeof t == "function")
|
|
10
|
-
for (let i of M(t))
|
|
11
|
-
!R.call(e, i) && i !== s && A(e, i, { get: () => t[i], enumerable: !(o = N(t, i)) || o.enumerable });
|
|
12
|
-
return e;
|
|
13
|
-
}, H = (e, t, s) => (E(e, t, "default"), s), f = (e, t, s) => (K(e, typeof t != "symbol" ? t + "" : t, s), s), a = {};
|
|
14
|
-
H(a, I);
|
|
15
|
-
var V = class {
|
|
16
|
-
constructor(e, t) {
|
|
17
|
-
this._modeId = e, this._defaults = t, this._worker = null, this._client = null, this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker()), this._updateExtraLibsToken = 0, this._extraLibsChangeListener = this._defaults.onDidExtraLibsChange(() => this._updateExtraLibs());
|
|
18
|
-
}
|
|
19
|
-
_configChangeListener;
|
|
20
|
-
_updateExtraLibsToken;
|
|
21
|
-
_extraLibsChangeListener;
|
|
22
|
-
_worker;
|
|
23
|
-
_client;
|
|
24
|
-
dispose() {
|
|
25
|
-
this._configChangeListener.dispose(), this._extraLibsChangeListener.dispose(), this._stopWorker();
|
|
26
|
-
}
|
|
27
|
-
_stopWorker() {
|
|
28
|
-
this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
|
|
29
|
-
}
|
|
30
|
-
async _updateExtraLibs() {
|
|
31
|
-
if (!this._worker)
|
|
32
|
-
return;
|
|
33
|
-
const e = ++this._updateExtraLibsToken, t = await this._worker.getProxy();
|
|
34
|
-
this._updateExtraLibsToken === e && t.updateExtraLibs(this._defaults.getExtraLibs());
|
|
35
|
-
}
|
|
36
|
-
_getClient() {
|
|
37
|
-
return this._client || (this._client = (async () => (this._worker = a.editor.createWebWorker({
|
|
38
|
-
moduleId: "vs/language/typescript/tsWorker",
|
|
39
|
-
label: this._modeId,
|
|
40
|
-
keepIdleModels: !0,
|
|
41
|
-
createData: {
|
|
42
|
-
compilerOptions: this._defaults.getCompilerOptions(),
|
|
43
|
-
extraLibs: this._defaults.getExtraLibs(),
|
|
44
|
-
customWorkerPath: this._defaults.workerOptions.customWorkerPath,
|
|
45
|
-
inlayHintsOptions: this._defaults.inlayHintsOptions
|
|
46
|
-
}
|
|
47
|
-
}), this._defaults.getEagerModelSync() ? await this._worker.withSyncedResources(a.editor.getModels().filter((e) => e.getLanguageId() === this._modeId).map((e) => e.uri)) : await this._worker.getProxy()))()), this._client;
|
|
48
|
-
}
|
|
49
|
-
async getLanguageServiceWorker(...e) {
|
|
50
|
-
const t = await this._getClient();
|
|
51
|
-
return this._worker && await this._worker.withSyncedResources(e), t;
|
|
52
|
-
}
|
|
53
|
-
}, n = {};
|
|
54
|
-
n["lib.d.ts"] = !0;
|
|
55
|
-
n["lib.decorators.d.ts"] = !0;
|
|
56
|
-
n["lib.decorators.legacy.d.ts"] = !0;
|
|
57
|
-
n["lib.dom.d.ts"] = !0;
|
|
58
|
-
n["lib.dom.iterable.d.ts"] = !0;
|
|
59
|
-
n["lib.es2015.collection.d.ts"] = !0;
|
|
60
|
-
n["lib.es2015.core.d.ts"] = !0;
|
|
61
|
-
n["lib.es2015.d.ts"] = !0;
|
|
62
|
-
n["lib.es2015.generator.d.ts"] = !0;
|
|
63
|
-
n["lib.es2015.iterable.d.ts"] = !0;
|
|
64
|
-
n["lib.es2015.promise.d.ts"] = !0;
|
|
65
|
-
n["lib.es2015.proxy.d.ts"] = !0;
|
|
66
|
-
n["lib.es2015.reflect.d.ts"] = !0;
|
|
67
|
-
n["lib.es2015.symbol.d.ts"] = !0;
|
|
68
|
-
n["lib.es2015.symbol.wellknown.d.ts"] = !0;
|
|
69
|
-
n["lib.es2016.array.include.d.ts"] = !0;
|
|
70
|
-
n["lib.es2016.d.ts"] = !0;
|
|
71
|
-
n["lib.es2016.full.d.ts"] = !0;
|
|
72
|
-
n["lib.es2017.d.ts"] = !0;
|
|
73
|
-
n["lib.es2017.full.d.ts"] = !0;
|
|
74
|
-
n["lib.es2017.intl.d.ts"] = !0;
|
|
75
|
-
n["lib.es2017.object.d.ts"] = !0;
|
|
76
|
-
n["lib.es2017.sharedmemory.d.ts"] = !0;
|
|
77
|
-
n["lib.es2017.string.d.ts"] = !0;
|
|
78
|
-
n["lib.es2017.typedarrays.d.ts"] = !0;
|
|
79
|
-
n["lib.es2018.asyncgenerator.d.ts"] = !0;
|
|
80
|
-
n["lib.es2018.asynciterable.d.ts"] = !0;
|
|
81
|
-
n["lib.es2018.d.ts"] = !0;
|
|
82
|
-
n["lib.es2018.full.d.ts"] = !0;
|
|
83
|
-
n["lib.es2018.intl.d.ts"] = !0;
|
|
84
|
-
n["lib.es2018.promise.d.ts"] = !0;
|
|
85
|
-
n["lib.es2018.regexp.d.ts"] = !0;
|
|
86
|
-
n["lib.es2019.array.d.ts"] = !0;
|
|
87
|
-
n["lib.es2019.d.ts"] = !0;
|
|
88
|
-
n["lib.es2019.full.d.ts"] = !0;
|
|
89
|
-
n["lib.es2019.intl.d.ts"] = !0;
|
|
90
|
-
n["lib.es2019.object.d.ts"] = !0;
|
|
91
|
-
n["lib.es2019.string.d.ts"] = !0;
|
|
92
|
-
n["lib.es2019.symbol.d.ts"] = !0;
|
|
93
|
-
n["lib.es2020.bigint.d.ts"] = !0;
|
|
94
|
-
n["lib.es2020.d.ts"] = !0;
|
|
95
|
-
n["lib.es2020.date.d.ts"] = !0;
|
|
96
|
-
n["lib.es2020.full.d.ts"] = !0;
|
|
97
|
-
n["lib.es2020.intl.d.ts"] = !0;
|
|
98
|
-
n["lib.es2020.number.d.ts"] = !0;
|
|
99
|
-
n["lib.es2020.promise.d.ts"] = !0;
|
|
100
|
-
n["lib.es2020.sharedmemory.d.ts"] = !0;
|
|
101
|
-
n["lib.es2020.string.d.ts"] = !0;
|
|
102
|
-
n["lib.es2020.symbol.wellknown.d.ts"] = !0;
|
|
103
|
-
n["lib.es2021.d.ts"] = !0;
|
|
104
|
-
n["lib.es2021.full.d.ts"] = !0;
|
|
105
|
-
n["lib.es2021.intl.d.ts"] = !0;
|
|
106
|
-
n["lib.es2021.promise.d.ts"] = !0;
|
|
107
|
-
n["lib.es2021.string.d.ts"] = !0;
|
|
108
|
-
n["lib.es2021.weakref.d.ts"] = !0;
|
|
109
|
-
n["lib.es2022.array.d.ts"] = !0;
|
|
110
|
-
n["lib.es2022.d.ts"] = !0;
|
|
111
|
-
n["lib.es2022.error.d.ts"] = !0;
|
|
112
|
-
n["lib.es2022.full.d.ts"] = !0;
|
|
113
|
-
n["lib.es2022.intl.d.ts"] = !0;
|
|
114
|
-
n["lib.es2022.object.d.ts"] = !0;
|
|
115
|
-
n["lib.es2022.regexp.d.ts"] = !0;
|
|
116
|
-
n["lib.es2022.sharedmemory.d.ts"] = !0;
|
|
117
|
-
n["lib.es2022.string.d.ts"] = !0;
|
|
118
|
-
n["lib.es2023.array.d.ts"] = !0;
|
|
119
|
-
n["lib.es2023.d.ts"] = !0;
|
|
120
|
-
n["lib.es2023.full.d.ts"] = !0;
|
|
121
|
-
n["lib.es5.d.ts"] = !0;
|
|
122
|
-
n["lib.es6.d.ts"] = !0;
|
|
123
|
-
n["lib.esnext.d.ts"] = !0;
|
|
124
|
-
n["lib.esnext.full.d.ts"] = !0;
|
|
125
|
-
n["lib.esnext.intl.d.ts"] = !0;
|
|
126
|
-
n["lib.scripthost.d.ts"] = !0;
|
|
127
|
-
n["lib.webworker.d.ts"] = !0;
|
|
128
|
-
n["lib.webworker.importscripts.d.ts"] = !0;
|
|
129
|
-
n["lib.webworker.iterable.d.ts"] = !0;
|
|
130
|
-
function C(e, t, s = 0) {
|
|
131
|
-
if (typeof e == "string")
|
|
132
|
-
return e;
|
|
133
|
-
if (e === void 0)
|
|
134
|
-
return "";
|
|
135
|
-
let o = "";
|
|
136
|
-
if (s) {
|
|
137
|
-
o += t;
|
|
138
|
-
for (let i = 0; i < s; i++)
|
|
139
|
-
o += " ";
|
|
140
|
-
}
|
|
141
|
-
if (o += e.messageText, s++, e.next)
|
|
142
|
-
for (const i of e.next)
|
|
143
|
-
o += C(i, t, s);
|
|
144
|
-
return o;
|
|
145
|
-
}
|
|
146
|
-
function w(e) {
|
|
147
|
-
return e ? e.map((t) => t.text).join("") : "";
|
|
148
|
-
}
|
|
149
|
-
var _ = class {
|
|
150
|
-
constructor(e) {
|
|
151
|
-
this._worker = e;
|
|
152
|
-
}
|
|
153
|
-
_textSpanToRange(e, t) {
|
|
154
|
-
let s = e.getPositionAt(t.start), o = e.getPositionAt(t.start + t.length), { lineNumber: i, column: u } = s, { lineNumber: c, column: r } = o;
|
|
155
|
-
return { startLineNumber: i, startColumn: u, endLineNumber: c, endColumn: r };
|
|
156
|
-
}
|
|
157
|
-
}, W = class {
|
|
158
|
-
constructor(e) {
|
|
159
|
-
this._worker = e, this._libFiles = {}, this._hasFetchedLibFiles = !1, this._fetchLibFilesPromise = null;
|
|
160
|
-
}
|
|
161
|
-
_libFiles;
|
|
162
|
-
_hasFetchedLibFiles;
|
|
163
|
-
_fetchLibFilesPromise;
|
|
164
|
-
isLibFile(e) {
|
|
165
|
-
return e && e.path.indexOf("/lib.") === 0 ? !!n[e.path.slice(1)] : !1;
|
|
166
|
-
}
|
|
167
|
-
getOrCreateModel(e) {
|
|
168
|
-
const t = a.Uri.parse(e), s = a.editor.getModel(t);
|
|
169
|
-
if (s)
|
|
170
|
-
return s;
|
|
171
|
-
if (this.isLibFile(t) && this._hasFetchedLibFiles)
|
|
172
|
-
return a.editor.createModel(this._libFiles[t.path.slice(1)], "typescript", t);
|
|
173
|
-
const o = O.getExtraLibs()[e];
|
|
174
|
-
return o ? a.editor.createModel(o.content, "typescript", t) : null;
|
|
175
|
-
}
|
|
176
|
-
_containsLibFile(e) {
|
|
177
|
-
for (let t of e)
|
|
178
|
-
if (this.isLibFile(t))
|
|
179
|
-
return !0;
|
|
180
|
-
return !1;
|
|
181
|
-
}
|
|
182
|
-
async fetchLibFilesIfNecessary(e) {
|
|
183
|
-
this._containsLibFile(e) && await this._fetchLibFiles();
|
|
184
|
-
}
|
|
185
|
-
_fetchLibFiles() {
|
|
186
|
-
return this._fetchLibFilesPromise || (this._fetchLibFilesPromise = this._worker().then((e) => e.getLibFiles()).then((e) => {
|
|
187
|
-
this._hasFetchedLibFiles = !0, this._libFiles = e;
|
|
188
|
-
})), this._fetchLibFilesPromise;
|
|
189
|
-
}
|
|
190
|
-
}, j = class extends _ {
|
|
191
|
-
constructor(e, t, s, o) {
|
|
192
|
-
super(o), this._libFiles = e, this._defaults = t, this._selector = s;
|
|
193
|
-
const i = (r) => {
|
|
194
|
-
if (r.getLanguageId() !== s)
|
|
195
|
-
return;
|
|
196
|
-
const g = () => {
|
|
197
|
-
const { onlyVisible: h } = this._defaults.getDiagnosticsOptions();
|
|
198
|
-
h ? r.isAttachedToEditor() && this._doValidate(r) : this._doValidate(r);
|
|
199
|
-
};
|
|
200
|
-
let d;
|
|
201
|
-
const p = r.onDidChangeContent(() => {
|
|
202
|
-
clearTimeout(d), d = window.setTimeout(g, 500);
|
|
203
|
-
}), b = r.onDidChangeAttached(() => {
|
|
204
|
-
const { onlyVisible: h } = this._defaults.getDiagnosticsOptions();
|
|
205
|
-
h && (r.isAttachedToEditor() ? g() : a.editor.setModelMarkers(r, this._selector, []));
|
|
206
|
-
});
|
|
207
|
-
this._listener[r.uri.toString()] = {
|
|
208
|
-
dispose() {
|
|
209
|
-
p.dispose(), b.dispose(), clearTimeout(d);
|
|
210
|
-
}
|
|
211
|
-
}, g();
|
|
212
|
-
}, u = (r) => {
|
|
213
|
-
a.editor.setModelMarkers(r, this._selector, []);
|
|
214
|
-
const g = r.uri.toString();
|
|
215
|
-
this._listener[g] && (this._listener[g].dispose(), delete this._listener[g]);
|
|
216
|
-
};
|
|
217
|
-
this._disposables.push(a.editor.onDidCreateModel((r) => i(r))), this._disposables.push(a.editor.onWillDisposeModel(u)), this._disposables.push(a.editor.onDidChangeModelLanguage((r) => {
|
|
218
|
-
u(r.model), i(r.model);
|
|
219
|
-
})), this._disposables.push({
|
|
220
|
-
dispose() {
|
|
221
|
-
for (const r of a.editor.getModels())
|
|
222
|
-
u(r);
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
const c = () => {
|
|
226
|
-
for (const r of a.editor.getModels())
|
|
227
|
-
u(r), i(r);
|
|
228
|
-
};
|
|
229
|
-
this._disposables.push(this._defaults.onDidChange(c)), this._disposables.push(this._defaults.onDidExtraLibsChange(c)), a.editor.getModels().forEach((r) => i(r));
|
|
230
|
-
}
|
|
231
|
-
_disposables = [];
|
|
232
|
-
_listener = /* @__PURE__ */ Object.create(null);
|
|
233
|
-
dispose() {
|
|
234
|
-
this._disposables.forEach((e) => e && e.dispose()), this._disposables = [];
|
|
235
|
-
}
|
|
236
|
-
async _doValidate(e) {
|
|
237
|
-
const t = await this._worker(e.uri);
|
|
238
|
-
if (e.isDisposed())
|
|
239
|
-
return;
|
|
240
|
-
const s = [], { noSyntaxValidation: o, noSemanticValidation: i, noSuggestionDiagnostics: u } = this._defaults.getDiagnosticsOptions();
|
|
241
|
-
o || s.push(t.getSyntacticDiagnostics(e.uri.toString())), i || s.push(t.getSemanticDiagnostics(e.uri.toString())), u || s.push(t.getSuggestionDiagnostics(e.uri.toString()));
|
|
242
|
-
const c = await Promise.all(s);
|
|
243
|
-
if (!c || e.isDisposed())
|
|
244
|
-
return;
|
|
245
|
-
const r = c.reduce((d, p) => p.concat(d), []).filter((d) => (this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore || []).indexOf(d.code) === -1), g = r.map((d) => d.relatedInformation || []).reduce((d, p) => p.concat(d), []).map((d) => d.file ? a.Uri.parse(d.file.fileName) : null);
|
|
246
|
-
await this._libFiles.fetchLibFilesIfNecessary(g), !e.isDisposed() && a.editor.setModelMarkers(e, this._selector, r.map((d) => this._convertDiagnostics(e, d)));
|
|
247
|
-
}
|
|
248
|
-
_convertDiagnostics(e, t) {
|
|
249
|
-
const s = t.start || 0, o = t.length || 1, { lineNumber: i, column: u } = e.getPositionAt(s), { lineNumber: c, column: r } = e.getPositionAt(s + o), g = [];
|
|
250
|
-
return t.reportsUnnecessary && g.push(a.MarkerTag.Unnecessary), t.reportsDeprecated && g.push(a.MarkerTag.Deprecated), {
|
|
251
|
-
severity: this._tsDiagnosticCategoryToMarkerSeverity(t.category),
|
|
252
|
-
startLineNumber: i,
|
|
253
|
-
startColumn: u,
|
|
254
|
-
endLineNumber: c,
|
|
255
|
-
endColumn: r,
|
|
256
|
-
message: C(t.messageText, `
|
|
257
|
-
`),
|
|
258
|
-
code: t.code.toString(),
|
|
259
|
-
tags: g,
|
|
260
|
-
relatedInformation: this._convertRelatedInformation(e, t.relatedInformation)
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
_convertRelatedInformation(e, t) {
|
|
264
|
-
if (!t)
|
|
265
|
-
return [];
|
|
266
|
-
const s = [];
|
|
267
|
-
return t.forEach((o) => {
|
|
268
|
-
let i = e;
|
|
269
|
-
if (o.file && (i = this._libFiles.getOrCreateModel(o.file.fileName)), !i)
|
|
270
|
-
return;
|
|
271
|
-
const u = o.start || 0, c = o.length || 1, { lineNumber: r, column: g } = i.getPositionAt(u), { lineNumber: d, column: p } = i.getPositionAt(u + c);
|
|
272
|
-
s.push({
|
|
273
|
-
resource: i.uri,
|
|
274
|
-
startLineNumber: r,
|
|
275
|
-
startColumn: g,
|
|
276
|
-
endLineNumber: d,
|
|
277
|
-
endColumn: p,
|
|
278
|
-
message: C(o.messageText, `
|
|
279
|
-
`)
|
|
280
|
-
});
|
|
281
|
-
}), s;
|
|
282
|
-
}
|
|
283
|
-
_tsDiagnosticCategoryToMarkerSeverity(e) {
|
|
284
|
-
switch (e) {
|
|
285
|
-
case 1:
|
|
286
|
-
return a.MarkerSeverity.Error;
|
|
287
|
-
case 3:
|
|
288
|
-
return a.MarkerSeverity.Info;
|
|
289
|
-
case 0:
|
|
290
|
-
return a.MarkerSeverity.Warning;
|
|
291
|
-
case 2:
|
|
292
|
-
return a.MarkerSeverity.Hint;
|
|
293
|
-
}
|
|
294
|
-
return a.MarkerSeverity.Info;
|
|
295
|
-
}
|
|
296
|
-
}, x = class extends _ {
|
|
297
|
-
get triggerCharacters() {
|
|
298
|
-
return ["."];
|
|
299
|
-
}
|
|
300
|
-
async provideCompletionItems(e, t, s, o) {
|
|
301
|
-
const i = e.getWordUntilPosition(t), u = new a.Range(t.lineNumber, i.startColumn, t.lineNumber, i.endColumn), c = e.uri, r = e.getOffsetAt(t), g = await this._worker(c);
|
|
302
|
-
if (e.isDisposed())
|
|
303
|
-
return;
|
|
304
|
-
const d = await g.getCompletionsAtPosition(c.toString(), r);
|
|
305
|
-
return !d || e.isDisposed() ? void 0 : {
|
|
306
|
-
suggestions: d.entries.map((b) => {
|
|
307
|
-
let h = u;
|
|
308
|
-
if (b.replacementSpan) {
|
|
309
|
-
const S = e.getPositionAt(b.replacementSpan.start), v = e.getPositionAt(b.replacementSpan.start + b.replacementSpan.length);
|
|
310
|
-
h = new a.Range(S.lineNumber, S.column, v.lineNumber, v.column);
|
|
311
|
-
}
|
|
312
|
-
const y = [];
|
|
313
|
-
return b.kindModifiers !== void 0 && b.kindModifiers.indexOf("deprecated") !== -1 && y.push(a.languages.CompletionItemTag.Deprecated), {
|
|
314
|
-
uri: c,
|
|
315
|
-
position: t,
|
|
316
|
-
offset: r,
|
|
317
|
-
range: h,
|
|
318
|
-
label: b.name,
|
|
319
|
-
insertText: b.name,
|
|
320
|
-
sortText: b.sortText,
|
|
321
|
-
kind: x.convertKind(b.kind),
|
|
322
|
-
tags: y
|
|
323
|
-
};
|
|
324
|
-
})
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
async resolveCompletionItem(e, t) {
|
|
328
|
-
const s = e, o = s.uri, i = s.position, u = s.offset, r = await (await this._worker(o)).getCompletionEntryDetails(o.toString(), u, s.label);
|
|
329
|
-
return r ? {
|
|
330
|
-
uri: o,
|
|
331
|
-
position: i,
|
|
332
|
-
label: r.name,
|
|
333
|
-
kind: x.convertKind(r.kind),
|
|
334
|
-
detail: w(r.displayParts),
|
|
335
|
-
documentation: {
|
|
336
|
-
value: x.createDocumentationString(r)
|
|
337
|
-
}
|
|
338
|
-
} : s;
|
|
339
|
-
}
|
|
340
|
-
static convertKind(e) {
|
|
341
|
-
switch (e) {
|
|
342
|
-
case l.primitiveType:
|
|
343
|
-
case l.keyword:
|
|
344
|
-
return a.languages.CompletionItemKind.Keyword;
|
|
345
|
-
case l.variable:
|
|
346
|
-
case l.localVariable:
|
|
347
|
-
return a.languages.CompletionItemKind.Variable;
|
|
348
|
-
case l.memberVariable:
|
|
349
|
-
case l.memberGetAccessor:
|
|
350
|
-
case l.memberSetAccessor:
|
|
351
|
-
return a.languages.CompletionItemKind.Field;
|
|
352
|
-
case l.function:
|
|
353
|
-
case l.memberFunction:
|
|
354
|
-
case l.constructSignature:
|
|
355
|
-
case l.callSignature:
|
|
356
|
-
case l.indexSignature:
|
|
357
|
-
return a.languages.CompletionItemKind.Function;
|
|
358
|
-
case l.enum:
|
|
359
|
-
return a.languages.CompletionItemKind.Enum;
|
|
360
|
-
case l.module:
|
|
361
|
-
return a.languages.CompletionItemKind.Module;
|
|
362
|
-
case l.class:
|
|
363
|
-
return a.languages.CompletionItemKind.Class;
|
|
364
|
-
case l.interface:
|
|
365
|
-
return a.languages.CompletionItemKind.Interface;
|
|
366
|
-
case l.warning:
|
|
367
|
-
return a.languages.CompletionItemKind.File;
|
|
368
|
-
}
|
|
369
|
-
return a.languages.CompletionItemKind.Property;
|
|
370
|
-
}
|
|
371
|
-
static createDocumentationString(e) {
|
|
372
|
-
let t = w(e.documentation);
|
|
373
|
-
if (e.tags)
|
|
374
|
-
for (const s of e.tags)
|
|
375
|
-
t += `
|
|
376
|
-
|
|
377
|
-
${T(s)}`;
|
|
378
|
-
return t;
|
|
379
|
-
}
|
|
380
|
-
};
|
|
381
|
-
function T(e) {
|
|
382
|
-
let t = `*@${e.name}*`;
|
|
383
|
-
if (e.name === "param" && e.text) {
|
|
384
|
-
const [s, ...o] = e.text;
|
|
385
|
-
t += `\`${s.text}\``, o.length > 0 && (t += ` — ${o.map((i) => i.text).join(" ")}`);
|
|
386
|
-
} else Array.isArray(e.text) ? t += ` — ${e.text.map((s) => s.text).join(" ")}` : e.text && (t += ` — ${e.text}`);
|
|
387
|
-
return t;
|
|
388
|
-
}
|
|
389
|
-
var L = class extends _ {
|
|
390
|
-
signatureHelpTriggerCharacters = ["(", ","];
|
|
391
|
-
static _toSignatureHelpTriggerReason(e) {
|
|
392
|
-
switch (e.triggerKind) {
|
|
393
|
-
case a.languages.SignatureHelpTriggerKind.TriggerCharacter:
|
|
394
|
-
return e.triggerCharacter ? e.isRetrigger ? { kind: "retrigger", triggerCharacter: e.triggerCharacter } : { kind: "characterTyped", triggerCharacter: e.triggerCharacter } : { kind: "invoked" };
|
|
395
|
-
case a.languages.SignatureHelpTriggerKind.ContentChange:
|
|
396
|
-
return e.isRetrigger ? { kind: "retrigger" } : { kind: "invoked" };
|
|
397
|
-
case a.languages.SignatureHelpTriggerKind.Invoke:
|
|
398
|
-
default:
|
|
399
|
-
return { kind: "invoked" };
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
async provideSignatureHelp(e, t, s, o) {
|
|
403
|
-
const i = e.uri, u = e.getOffsetAt(t), c = await this._worker(i);
|
|
404
|
-
if (e.isDisposed())
|
|
405
|
-
return;
|
|
406
|
-
const r = await c.getSignatureHelpItems(i.toString(), u, {
|
|
407
|
-
triggerReason: L._toSignatureHelpTriggerReason(o)
|
|
408
|
-
});
|
|
409
|
-
if (!r || e.isDisposed())
|
|
410
|
-
return;
|
|
411
|
-
const g = {
|
|
412
|
-
activeSignature: r.selectedItemIndex,
|
|
413
|
-
activeParameter: r.argumentIndex,
|
|
414
|
-
signatures: []
|
|
415
|
-
};
|
|
416
|
-
return r.items.forEach((d) => {
|
|
417
|
-
const p = {
|
|
418
|
-
label: "",
|
|
419
|
-
parameters: []
|
|
420
|
-
};
|
|
421
|
-
p.documentation = {
|
|
422
|
-
value: w(d.documentation)
|
|
423
|
-
}, p.label += w(d.prefixDisplayParts), d.parameters.forEach((b, h, y) => {
|
|
424
|
-
const S = w(b.displayParts), v = {
|
|
425
|
-
label: S,
|
|
426
|
-
documentation: {
|
|
427
|
-
value: w(b.documentation)
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
p.label += S, p.parameters.push(v), h < y.length - 1 && (p.label += w(d.separatorDisplayParts));
|
|
431
|
-
}), p.label += w(d.suffixDisplayParts), g.signatures.push(p);
|
|
432
|
-
}), {
|
|
433
|
-
value: g,
|
|
434
|
-
dispose() {
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
|
-
}, B = class extends _ {
|
|
439
|
-
async provideHover(e, t, s) {
|
|
440
|
-
const o = e.uri, i = e.getOffsetAt(t), u = await this._worker(o);
|
|
441
|
-
if (e.isDisposed())
|
|
442
|
-
return;
|
|
443
|
-
const c = await u.getQuickInfoAtPosition(o.toString(), i);
|
|
444
|
-
if (!c || e.isDisposed())
|
|
445
|
-
return;
|
|
446
|
-
const r = w(c.documentation), g = c.tags ? c.tags.map((p) => T(p)).join(`
|
|
447
|
-
|
|
448
|
-
`) : "", d = w(c.displayParts);
|
|
449
|
-
return {
|
|
450
|
-
range: this._textSpanToRange(e, c.textSpan),
|
|
451
|
-
contents: [
|
|
452
|
-
{
|
|
453
|
-
value: "```typescript\n" + d + "\n```\n"
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
value: r + (g ? `
|
|
457
|
-
|
|
458
|
-
` + g : "")
|
|
459
|
-
}
|
|
460
|
-
]
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
}, U = class extends _ {
|
|
464
|
-
async provideDocumentHighlights(e, t, s) {
|
|
465
|
-
const o = e.uri, i = e.getOffsetAt(t), u = await this._worker(o);
|
|
466
|
-
if (e.isDisposed())
|
|
467
|
-
return;
|
|
468
|
-
const c = await u.getDocumentHighlights(o.toString(), i, [
|
|
469
|
-
o.toString()
|
|
470
|
-
]);
|
|
471
|
-
if (!(!c || e.isDisposed()))
|
|
472
|
-
return c.flatMap((r) => r.highlightSpans.map((g) => ({
|
|
473
|
-
range: this._textSpanToRange(e, g.textSpan),
|
|
474
|
-
kind: g.kind === "writtenReference" ? a.languages.DocumentHighlightKind.Write : a.languages.DocumentHighlightKind.Text
|
|
475
|
-
})));
|
|
476
|
-
}
|
|
477
|
-
}, $ = class extends _ {
|
|
478
|
-
constructor(e, t) {
|
|
479
|
-
super(t), this._libFiles = e;
|
|
480
|
-
}
|
|
481
|
-
async provideDefinition(e, t, s) {
|
|
482
|
-
const o = e.uri, i = e.getOffsetAt(t), u = await this._worker(o);
|
|
483
|
-
if (e.isDisposed())
|
|
484
|
-
return;
|
|
485
|
-
const c = await u.getDefinitionAtPosition(o.toString(), i);
|
|
486
|
-
if (!c || e.isDisposed() || (await this._libFiles.fetchLibFilesIfNecessary(c.map((g) => a.Uri.parse(g.fileName))), e.isDisposed()))
|
|
487
|
-
return;
|
|
488
|
-
const r = [];
|
|
489
|
-
for (let g of c) {
|
|
490
|
-
const d = this._libFiles.getOrCreateModel(g.fileName);
|
|
491
|
-
d && r.push({
|
|
492
|
-
uri: d.uri,
|
|
493
|
-
range: this._textSpanToRange(d, g.textSpan)
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
return r;
|
|
497
|
-
}
|
|
498
|
-
}, z = class extends _ {
|
|
499
|
-
constructor(e, t) {
|
|
500
|
-
super(t), this._libFiles = e;
|
|
501
|
-
}
|
|
502
|
-
async provideReferences(e, t, s, o) {
|
|
503
|
-
const i = e.uri, u = e.getOffsetAt(t), c = await this._worker(i);
|
|
504
|
-
if (e.isDisposed())
|
|
505
|
-
return;
|
|
506
|
-
const r = await c.getReferencesAtPosition(i.toString(), u);
|
|
507
|
-
if (!r || e.isDisposed() || (await this._libFiles.fetchLibFilesIfNecessary(r.map((d) => a.Uri.parse(d.fileName))), e.isDisposed()))
|
|
508
|
-
return;
|
|
509
|
-
const g = [];
|
|
510
|
-
for (let d of r) {
|
|
511
|
-
const p = this._libFiles.getOrCreateModel(d.fileName);
|
|
512
|
-
p && g.push({
|
|
513
|
-
uri: p.uri,
|
|
514
|
-
range: this._textSpanToRange(p, d.textSpan)
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
return g;
|
|
518
|
-
}
|
|
519
|
-
}, G = class extends _ {
|
|
520
|
-
async provideDocumentSymbols(e, t) {
|
|
521
|
-
const s = e.uri, o = await this._worker(s);
|
|
522
|
-
if (e.isDisposed())
|
|
523
|
-
return;
|
|
524
|
-
const i = await o.getNavigationTree(s.toString());
|
|
525
|
-
if (!i || e.isDisposed())
|
|
526
|
-
return;
|
|
527
|
-
const u = (r, g) => ({
|
|
528
|
-
name: r.text,
|
|
529
|
-
detail: "",
|
|
530
|
-
kind: m[r.kind] || a.languages.SymbolKind.Variable,
|
|
531
|
-
range: this._textSpanToRange(e, r.spans[0]),
|
|
532
|
-
selectionRange: this._textSpanToRange(e, r.spans[0]),
|
|
533
|
-
tags: [],
|
|
534
|
-
children: r.childItems?.map((p) => u(p, r.text)),
|
|
535
|
-
containerName: g
|
|
536
|
-
});
|
|
537
|
-
return i.childItems ? i.childItems.map((r) => u(r)) : [];
|
|
538
|
-
}
|
|
539
|
-
}, l = class {
|
|
540
|
-
};
|
|
541
|
-
f(l, "unknown", "");
|
|
542
|
-
f(l, "keyword", "keyword");
|
|
543
|
-
f(l, "script", "script");
|
|
544
|
-
f(l, "module", "module");
|
|
545
|
-
f(l, "class", "class");
|
|
546
|
-
f(l, "interface", "interface");
|
|
547
|
-
f(l, "type", "type");
|
|
548
|
-
f(l, "enum", "enum");
|
|
549
|
-
f(l, "variable", "var");
|
|
550
|
-
f(l, "localVariable", "local var");
|
|
551
|
-
f(l, "function", "function");
|
|
552
|
-
f(l, "localFunction", "local function");
|
|
553
|
-
f(l, "memberFunction", "method");
|
|
554
|
-
f(l, "memberGetAccessor", "getter");
|
|
555
|
-
f(l, "memberSetAccessor", "setter");
|
|
556
|
-
f(l, "memberVariable", "property");
|
|
557
|
-
f(l, "constructorImplementation", "constructor");
|
|
558
|
-
f(l, "callSignature", "call");
|
|
559
|
-
f(l, "indexSignature", "index");
|
|
560
|
-
f(l, "constructSignature", "construct");
|
|
561
|
-
f(l, "parameter", "parameter");
|
|
562
|
-
f(l, "typeParameter", "type parameter");
|
|
563
|
-
f(l, "primitiveType", "primitive type");
|
|
564
|
-
f(l, "label", "label");
|
|
565
|
-
f(l, "alias", "alias");
|
|
566
|
-
f(l, "const", "const");
|
|
567
|
-
f(l, "let", "let");
|
|
568
|
-
f(l, "warning", "warning");
|
|
569
|
-
var m = /* @__PURE__ */ Object.create(null);
|
|
570
|
-
m[l.module] = a.languages.SymbolKind.Module;
|
|
571
|
-
m[l.class] = a.languages.SymbolKind.Class;
|
|
572
|
-
m[l.enum] = a.languages.SymbolKind.Enum;
|
|
573
|
-
m[l.interface] = a.languages.SymbolKind.Interface;
|
|
574
|
-
m[l.memberFunction] = a.languages.SymbolKind.Method;
|
|
575
|
-
m[l.memberVariable] = a.languages.SymbolKind.Property;
|
|
576
|
-
m[l.memberGetAccessor] = a.languages.SymbolKind.Property;
|
|
577
|
-
m[l.memberSetAccessor] = a.languages.SymbolKind.Property;
|
|
578
|
-
m[l.variable] = a.languages.SymbolKind.Variable;
|
|
579
|
-
m[l.const] = a.languages.SymbolKind.Variable;
|
|
580
|
-
m[l.localVariable] = a.languages.SymbolKind.Variable;
|
|
581
|
-
m[l.variable] = a.languages.SymbolKind.Variable;
|
|
582
|
-
m[l.function] = a.languages.SymbolKind.Function;
|
|
583
|
-
m[l.localFunction] = a.languages.SymbolKind.Function;
|
|
584
|
-
var k = class extends _ {
|
|
585
|
-
static _convertOptions(e) {
|
|
586
|
-
return {
|
|
587
|
-
ConvertTabsToSpaces: e.insertSpaces,
|
|
588
|
-
TabSize: e.tabSize,
|
|
589
|
-
IndentSize: e.tabSize,
|
|
590
|
-
IndentStyle: 2,
|
|
591
|
-
NewLineCharacter: `
|
|
592
|
-
`,
|
|
593
|
-
InsertSpaceAfterCommaDelimiter: !0,
|
|
594
|
-
InsertSpaceAfterSemicolonInForStatements: !0,
|
|
595
|
-
InsertSpaceBeforeAndAfterBinaryOperators: !0,
|
|
596
|
-
InsertSpaceAfterKeywordsInControlFlowStatements: !0,
|
|
597
|
-
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: !0,
|
|
598
|
-
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: !1,
|
|
599
|
-
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: !1,
|
|
600
|
-
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: !1,
|
|
601
|
-
PlaceOpenBraceOnNewLineForControlBlocks: !1,
|
|
602
|
-
PlaceOpenBraceOnNewLineForFunctions: !1
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
_convertTextChanges(e, t) {
|
|
606
|
-
return {
|
|
607
|
-
text: t.newText,
|
|
608
|
-
range: this._textSpanToRange(e, t.span)
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
}, J = class extends k {
|
|
612
|
-
canFormatMultipleRanges = !1;
|
|
613
|
-
async provideDocumentRangeFormattingEdits(e, t, s, o) {
|
|
614
|
-
const i = e.uri, u = e.getOffsetAt({
|
|
615
|
-
lineNumber: t.startLineNumber,
|
|
616
|
-
column: t.startColumn
|
|
617
|
-
}), c = e.getOffsetAt({
|
|
618
|
-
lineNumber: t.endLineNumber,
|
|
619
|
-
column: t.endColumn
|
|
620
|
-
}), r = await this._worker(i);
|
|
621
|
-
if (e.isDisposed())
|
|
622
|
-
return;
|
|
623
|
-
const g = await r.getFormattingEditsForRange(i.toString(), u, c, k._convertOptions(s));
|
|
624
|
-
if (!(!g || e.isDisposed()))
|
|
625
|
-
return g.map((d) => this._convertTextChanges(e, d));
|
|
626
|
-
}
|
|
627
|
-
}, Q = class extends k {
|
|
628
|
-
get autoFormatTriggerCharacters() {
|
|
629
|
-
return [";", "}", `
|
|
630
|
-
`];
|
|
631
|
-
}
|
|
632
|
-
async provideOnTypeFormattingEdits(e, t, s, o, i) {
|
|
633
|
-
const u = e.uri, c = e.getOffsetAt(t), r = await this._worker(u);
|
|
634
|
-
if (e.isDisposed())
|
|
635
|
-
return;
|
|
636
|
-
const g = await r.getFormattingEditsAfterKeystroke(u.toString(), c, s, k._convertOptions(o));
|
|
637
|
-
if (!(!g || e.isDisposed()))
|
|
638
|
-
return g.map((d) => this._convertTextChanges(e, d));
|
|
639
|
-
}
|
|
640
|
-
}, q = class extends k {
|
|
641
|
-
async provideCodeActions(e, t, s, o) {
|
|
642
|
-
const i = e.uri, u = e.getOffsetAt({
|
|
643
|
-
lineNumber: t.startLineNumber,
|
|
644
|
-
column: t.startColumn
|
|
645
|
-
}), c = e.getOffsetAt({
|
|
646
|
-
lineNumber: t.endLineNumber,
|
|
647
|
-
column: t.endColumn
|
|
648
|
-
}), r = k._convertOptions(e.getOptions()), g = s.markers.filter((h) => h.code).map((h) => h.code).map(Number), d = await this._worker(i);
|
|
649
|
-
if (e.isDisposed())
|
|
650
|
-
return;
|
|
651
|
-
const p = await d.getCodeFixesAtPosition(i.toString(), u, c, g, r);
|
|
652
|
-
return !p || e.isDisposed() ? { actions: [], dispose: () => {
|
|
653
|
-
} } : {
|
|
654
|
-
actions: p.filter((h) => h.changes.filter((y) => y.isNewFile).length === 0).map((h) => this._tsCodeFixActionToMonacoCodeAction(e, s, h)),
|
|
655
|
-
dispose: () => {
|
|
656
|
-
}
|
|
657
|
-
};
|
|
658
|
-
}
|
|
659
|
-
_tsCodeFixActionToMonacoCodeAction(e, t, s) {
|
|
660
|
-
const o = [];
|
|
661
|
-
for (const u of s.changes)
|
|
662
|
-
for (const c of u.textChanges)
|
|
663
|
-
o.push({
|
|
664
|
-
resource: e.uri,
|
|
665
|
-
versionId: void 0,
|
|
666
|
-
textEdit: {
|
|
667
|
-
range: this._textSpanToRange(e, c.span),
|
|
668
|
-
text: c.newText
|
|
669
|
-
}
|
|
670
|
-
});
|
|
671
|
-
return {
|
|
672
|
-
title: s.description,
|
|
673
|
-
edit: { edits: o },
|
|
674
|
-
diagnostics: t.markers,
|
|
675
|
-
kind: "quickfix"
|
|
676
|
-
};
|
|
677
|
-
}
|
|
678
|
-
}, X = class extends _ {
|
|
679
|
-
constructor(e, t) {
|
|
680
|
-
super(t), this._libFiles = e;
|
|
681
|
-
}
|
|
682
|
-
async provideRenameEdits(e, t, s, o) {
|
|
683
|
-
const i = e.uri, u = i.toString(), c = e.getOffsetAt(t), r = await this._worker(i);
|
|
684
|
-
if (e.isDisposed())
|
|
685
|
-
return;
|
|
686
|
-
const g = await r.getRenameInfo(u, c, {
|
|
687
|
-
allowRenameOfImportPath: !1
|
|
688
|
-
});
|
|
689
|
-
if (g.canRename === !1)
|
|
690
|
-
return {
|
|
691
|
-
edits: [],
|
|
692
|
-
rejectReason: g.localizedErrorMessage
|
|
693
|
-
};
|
|
694
|
-
if (g.fileToRename !== void 0)
|
|
695
|
-
throw new Error("Renaming files is not supported.");
|
|
696
|
-
const d = await r.findRenameLocations(u, c, !1, !1, !1);
|
|
697
|
-
if (!d || e.isDisposed())
|
|
698
|
-
return;
|
|
699
|
-
const p = [];
|
|
700
|
-
for (const b of d) {
|
|
701
|
-
const h = this._libFiles.getOrCreateModel(b.fileName);
|
|
702
|
-
if (h)
|
|
703
|
-
p.push({
|
|
704
|
-
resource: h.uri,
|
|
705
|
-
versionId: void 0,
|
|
706
|
-
textEdit: {
|
|
707
|
-
range: this._textSpanToRange(h, b.textSpan),
|
|
708
|
-
text: s
|
|
709
|
-
}
|
|
710
|
-
});
|
|
711
|
-
else
|
|
712
|
-
throw new Error(`Unknown file ${b.fileName}.`);
|
|
713
|
-
}
|
|
714
|
-
return { edits: p };
|
|
715
|
-
}
|
|
716
|
-
}, Y = class extends _ {
|
|
717
|
-
async provideInlayHints(e, t, s) {
|
|
718
|
-
const o = e.uri, i = o.toString(), u = e.getOffsetAt({
|
|
719
|
-
lineNumber: t.startLineNumber,
|
|
720
|
-
column: t.startColumn
|
|
721
|
-
}), c = e.getOffsetAt({
|
|
722
|
-
lineNumber: t.endLineNumber,
|
|
723
|
-
column: t.endColumn
|
|
724
|
-
}), r = await this._worker(o);
|
|
725
|
-
return e.isDisposed() ? null : { hints: (await r.provideInlayHints(i, u, c)).map((p) => ({
|
|
726
|
-
...p,
|
|
727
|
-
label: p.text,
|
|
728
|
-
position: e.getPositionAt(p.position),
|
|
729
|
-
kind: this._convertHintKind(p.kind)
|
|
730
|
-
})), dispose: () => {
|
|
731
|
-
} };
|
|
732
|
-
}
|
|
733
|
-
_convertHintKind(e) {
|
|
734
|
-
switch (e) {
|
|
735
|
-
case "Parameter":
|
|
736
|
-
return a.languages.InlayHintKind.Parameter;
|
|
737
|
-
case "Type":
|
|
738
|
-
return a.languages.InlayHintKind.Type;
|
|
739
|
-
default:
|
|
740
|
-
return a.languages.InlayHintKind.Type;
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
}, D, F;
|
|
744
|
-
function te(e) {
|
|
745
|
-
F = P(e, "typescript");
|
|
746
|
-
}
|
|
747
|
-
function re(e) {
|
|
748
|
-
D = P(e, "javascript");
|
|
749
|
-
}
|
|
750
|
-
function se() {
|
|
751
|
-
return new Promise((e, t) => {
|
|
752
|
-
if (!D)
|
|
753
|
-
return t("JavaScript not registered!");
|
|
754
|
-
e(D);
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
|
-
function ie() {
|
|
758
|
-
return new Promise((e, t) => {
|
|
759
|
-
if (!F)
|
|
760
|
-
return t("TypeScript not registered!");
|
|
761
|
-
e(F);
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
function P(e, t) {
|
|
765
|
-
const s = [], o = new V(t, e), i = (...r) => o.getLanguageServiceWorker(...r), u = new W(i);
|
|
766
|
-
function c() {
|
|
767
|
-
const { modeConfiguration: r } = e;
|
|
768
|
-
Z(s), r.completionItems && s.push(a.languages.registerCompletionItemProvider(t, new x(i))), r.signatureHelp && s.push(a.languages.registerSignatureHelpProvider(t, new L(i))), r.hovers && s.push(a.languages.registerHoverProvider(t, new B(i))), r.documentHighlights && s.push(a.languages.registerDocumentHighlightProvider(t, new U(i))), r.definitions && s.push(a.languages.registerDefinitionProvider(t, new $(u, i))), r.references && s.push(a.languages.registerReferenceProvider(t, new z(u, i))), r.documentSymbols && s.push(a.languages.registerDocumentSymbolProvider(t, new G(i))), r.rename && s.push(a.languages.registerRenameProvider(t, new X(u, i))), r.documentRangeFormattingEdits && s.push(a.languages.registerDocumentRangeFormattingEditProvider(t, new J(i))), r.onTypeFormattingEdits && s.push(a.languages.registerOnTypeFormattingEditProvider(t, new Q(i))), r.codeActions && s.push(a.languages.registerCodeActionProvider(t, new q(i))), r.inlayHints && s.push(a.languages.registerInlayHintsProvider(t, new Y(i))), r.diagnostics && s.push(new j(u, e, t, i));
|
|
769
|
-
}
|
|
770
|
-
return c(), i;
|
|
771
|
-
}
|
|
772
|
-
function Z(e) {
|
|
773
|
-
for (; e.length; )
|
|
774
|
-
e.pop().dispose();
|
|
775
|
-
}
|
|
776
|
-
export {
|
|
777
|
-
_ as Adapter,
|
|
778
|
-
q as CodeActionAdaptor,
|
|
779
|
-
$ as DefinitionAdapter,
|
|
780
|
-
j as DiagnosticsAdapter,
|
|
781
|
-
U as DocumentHighlightAdapter,
|
|
782
|
-
J as FormatAdapter,
|
|
783
|
-
k as FormatHelper,
|
|
784
|
-
Q as FormatOnTypeAdapter,
|
|
785
|
-
Y as InlayHintsAdapter,
|
|
786
|
-
l as Kind,
|
|
787
|
-
W as LibFiles,
|
|
788
|
-
G as OutlineAdapter,
|
|
789
|
-
B as QuickInfoAdapter,
|
|
790
|
-
z as ReferenceAdapter,
|
|
791
|
-
X as RenameAdapter,
|
|
792
|
-
L as SignatureHelpAdapter,
|
|
793
|
-
x as SuggestAdapter,
|
|
794
|
-
V as WorkerManager,
|
|
795
|
-
C as flattenDiagnosticMessageText,
|
|
796
|
-
se as getJavaScriptWorker,
|
|
797
|
-
ie as getTypeScriptWorker,
|
|
798
|
-
re as setupJavaScript,
|
|
799
|
-
te as setupTypeScript
|
|
800
|
-
};
|