@opensumi/ide-core-browser 2.12.1-next-079c1930
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/lib/application/application-state-service.d.ts +16 -0
- package/lib/application/application-state-service.d.ts.map +1 -0
- package/lib/application/application-state-service.js +47 -0
- package/lib/application/application-state-service.js.map +1 -0
- package/lib/application/application.service.d.ts +11 -0
- package/lib/application/application.service.d.ts.map +1 -0
- package/lib/application/application.service.js +41 -0
- package/lib/application/application.service.js.map +1 -0
- package/lib/application/index.d.ts +3 -0
- package/lib/application/index.d.ts.map +1 -0
- package/lib/application/index.js +6 -0
- package/lib/application/index.js.map +1 -0
- package/lib/authentication/authentication.contribution.d.ts +8 -0
- package/lib/authentication/authentication.contribution.d.ts.map +1 -0
- package/lib/authentication/authentication.contribution.js +32 -0
- package/lib/authentication/authentication.contribution.js.map +1 -0
- package/lib/authentication/authentication.service.d.ts +54 -0
- package/lib/authentication/authentication.service.d.ts.map +1 -0
- package/lib/authentication/authentication.service.js +413 -0
- package/lib/authentication/authentication.service.js.map +1 -0
- package/lib/bootstrap/app.d.ts +142 -0
- package/lib/bootstrap/app.d.ts.map +1 -0
- package/lib/bootstrap/app.js +516 -0
- package/lib/bootstrap/app.js.map +1 -0
- package/lib/bootstrap/app.view.d.ts +11 -0
- package/lib/bootstrap/app.view.d.ts.map +1 -0
- package/lib/bootstrap/app.view.js +72 -0
- package/lib/bootstrap/app.view.js.map +1 -0
- package/lib/bootstrap/connection.d.ts +7 -0
- package/lib/bootstrap/connection.d.ts.map +1 -0
- package/lib/bootstrap/connection.js +78 -0
- package/lib/bootstrap/connection.js.map +1 -0
- package/lib/bootstrap/index.d.ts +4 -0
- package/lib/bootstrap/index.d.ts.map +1 -0
- package/lib/bootstrap/index.js +7 -0
- package/lib/bootstrap/index.js.map +1 -0
- package/lib/bootstrap/inner-providers.d.ts +3 -0
- package/lib/bootstrap/inner-providers.d.ts.map +1 -0
- package/lib/bootstrap/inner-providers.js +231 -0
- package/lib/bootstrap/inner-providers.js.map +1 -0
- package/lib/browser-module.d.ts +20 -0
- package/lib/browser-module.d.ts.map +1 -0
- package/lib/browser-module.js +15 -0
- package/lib/browser-module.js.map +1 -0
- package/lib/common/common.command.d.ts +156 -0
- package/lib/common/common.command.d.ts.map +1 -0
- package/lib/common/common.command.js +611 -0
- package/lib/common/common.command.js.map +1 -0
- package/lib/common/common.contribution.d.ts +22 -0
- package/lib/common/common.contribution.d.ts.map +1 -0
- package/lib/common/common.contribution.js +241 -0
- package/lib/common/common.contribution.js.map +1 -0
- package/lib/common/common.define.d.ts +47 -0
- package/lib/common/common.define.d.ts.map +1 -0
- package/lib/common/common.define.js +5 -0
- package/lib/common/common.define.js.map +1 -0
- package/lib/common/common.module.d.ts +13 -0
- package/lib/common/common.module.d.ts.map +1 -0
- package/lib/common/common.module.js +41 -0
- package/lib/common/common.module.js.map +1 -0
- package/lib/common/common.storage.d.ts +9 -0
- package/lib/common/common.storage.d.ts.map +1 -0
- package/lib/common/common.storage.js +25 -0
- package/lib/common/common.storage.js.map +1 -0
- package/lib/common/index.d.ts +5 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +8 -0
- package/lib/common/index.js.map +1 -0
- package/lib/components/actions/index.d.ts +77 -0
- package/lib/components/actions/index.d.ts.map +1 -0
- package/lib/components/actions/index.js +201 -0
- package/lib/components/actions/index.js.map +1 -0
- package/lib/components/actions/placements.d.ts +58 -0
- package/lib/components/actions/placements.d.ts.map +1 -0
- package/lib/components/actions/placements.js +48 -0
- package/lib/components/actions/placements.js.map +1 -0
- package/lib/components/actions/styles.module.less +128 -0
- package/lib/components/badge/index.d.ts +2 -0
- package/lib/components/badge/index.d.ts.map +1 -0
- package/lib/components/badge/index.js +6 -0
- package/lib/components/badge/index.js.map +1 -0
- package/lib/components/click-outside/index.d.ts +6 -0
- package/lib/components/click-outside/index.d.ts.map +1 -0
- package/lib/components/click-outside/index.js +27 -0
- package/lib/components/click-outside/index.js.map +1 -0
- package/lib/components/index.d.ts +25 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +30 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/layout/box-panel.d.ts +18 -0
- package/lib/components/layout/box-panel.d.ts.map +1 -0
- package/lib/components/layout/box-panel.js +20 -0
- package/lib/components/layout/box-panel.js.map +1 -0
- package/lib/components/layout/default-layout.d.ts +15 -0
- package/lib/components/layout/default-layout.d.ts.map +1 -0
- package/lib/components/layout/default-layout.js +39 -0
- package/lib/components/layout/default-layout.js.map +1 -0
- package/lib/components/layout/index.d.ts +5 -0
- package/lib/components/layout/index.d.ts.map +1 -0
- package/lib/components/layout/index.js +8 -0
- package/lib/components/layout/index.js.map +1 -0
- package/lib/components/layout/layout.d.ts +13 -0
- package/lib/components/layout/layout.d.ts.map +1 -0
- package/lib/components/layout/layout.js +72 -0
- package/lib/components/layout/layout.js.map +1 -0
- package/lib/components/layout/split-panel.d.ts +38 -0
- package/lib/components/layout/split-panel.d.ts.map +1 -0
- package/lib/components/layout/split-panel.js +182 -0
- package/lib/components/layout/split-panel.js.map +1 -0
- package/lib/components/layout/split-panel.service.d.ts +16 -0
- package/lib/components/layout/split-panel.service.d.ts.map +1 -0
- package/lib/components/layout/split-panel.service.js +69 -0
- package/lib/components/layout/split-panel.service.js.map +1 -0
- package/lib/components/layout/styles.module.less +119 -0
- package/lib/components/loading/index.d.ts +2 -0
- package/lib/components/loading/index.d.ts.map +1 -0
- package/lib/components/loading/index.js +5 -0
- package/lib/components/loading/index.js.map +1 -0
- package/lib/components/loading/loading.less +14 -0
- package/lib/components/loading/loading.view.d.ts +4 -0
- package/lib/components/loading/loading.view.d.ts.map +1 -0
- package/lib/components/loading/loading.view.js +12 -0
- package/lib/components/loading/loading.view.js.map +1 -0
- package/lib/components/loading/media/loading-dark.svg +52 -0
- package/lib/components/loading/media/loading-hc.svg +52 -0
- package/lib/components/loading/media/loading.svg +52 -0
- package/lib/components/popover/styles.module.less +81 -0
- package/lib/components/portal/index.d.ts +6 -0
- package/lib/components/portal/index.d.ts.map +1 -0
- package/lib/components/portal/index.js +11 -0
- package/lib/components/portal/index.js.map +1 -0
- package/lib/components/progressbar/index.d.ts +5 -0
- package/lib/components/progressbar/index.d.ts.map +1 -0
- package/lib/components/progressbar/index.js +15 -0
- package/lib/components/progressbar/index.js.map +1 -0
- package/lib/components/progressbar/styles.module.less +31 -0
- package/lib/components/recycle-tree/index.d.ts +2 -0
- package/lib/components/recycle-tree/index.d.ts.map +1 -0
- package/lib/components/recycle-tree/index.js +5 -0
- package/lib/components/recycle-tree/index.js.map +1 -0
- package/lib/components/recycle-tree/recycle-tree.view.d.ts +82 -0
- package/lib/components/recycle-tree/recycle-tree.view.d.ts.map +1 -0
- package/lib/components/recycle-tree/recycle-tree.view.js +192 -0
- package/lib/components/recycle-tree/recycle-tree.view.js.map +1 -0
- package/lib/components/resize/resize.d.ts +39 -0
- package/lib/components/resize/resize.d.ts.map +1 -0
- package/lib/components/resize/resize.js +609 -0
- package/lib/components/resize/resize.js.map +1 -0
- package/lib/components/resize/resize.module.less +78 -0
- package/lib/components/scrollbar/index.d.ts +2 -0
- package/lib/components/scrollbar/index.d.ts.map +1 -0
- package/lib/components/scrollbar/index.js +5 -0
- package/lib/components/scrollbar/index.js.map +1 -0
- package/lib/components/scrollbar/scrollbar.less +36 -0
- package/lib/components/scrollbar/scrollbar.view.d.ts +7 -0
- package/lib/components/scrollbar/scrollbar.view.d.ts.map +1 -0
- package/lib/components/scrollbar/scrollbar.view.js +11 -0
- package/lib/components/scrollbar/scrollbar.view.js.map +1 -0
- package/lib/components/select/index.d.ts +4 -0
- package/lib/components/select/index.d.ts.map +1 -0
- package/lib/components/select/index.js +14 -0
- package/lib/components/select/index.js.map +1 -0
- package/lib/components/select/styles.less +8 -0
- package/lib/components/tree/index.d.ts +4 -0
- package/lib/components/tree/index.d.ts.map +1 -0
- package/lib/components/tree/index.js +7 -0
- package/lib/components/tree/index.js.map +1 -0
- package/lib/components/tree/tree-node.view.d.ts +26 -0
- package/lib/components/tree/tree-node.view.d.ts.map +1 -0
- package/lib/components/tree/tree-node.view.js +346 -0
- package/lib/components/tree/tree-node.view.js.map +1 -0
- package/lib/components/tree/tree.module.less +295 -0
- package/lib/components/tree/tree.view.d.ts +132 -0
- package/lib/components/tree/tree.view.d.ts.map +1 -0
- package/lib/components/tree/tree.view.js +246 -0
- package/lib/components/tree/tree.view.js.map +1 -0
- package/lib/context-key.d.ts +32 -0
- package/lib/context-key.d.ts.map +1 -0
- package/lib/context-key.js +9 -0
- package/lib/context-key.js.map +1 -0
- package/lib/contextkey/explorer.d.ts +16 -0
- package/lib/contextkey/explorer.d.ts.map +1 -0
- package/lib/contextkey/explorer.js +20 -0
- package/lib/contextkey/explorer.js.map +1 -0
- package/lib/contextkey/index.d.ts +6 -0
- package/lib/contextkey/index.d.ts.map +1 -0
- package/lib/contextkey/index.js +9 -0
- package/lib/contextkey/index.js.map +1 -0
- package/lib/contextkey/outline.d.ts +4 -0
- package/lib/contextkey/outline.d.ts.map +1 -0
- package/lib/contextkey/outline.js +7 -0
- package/lib/contextkey/outline.js.map +1 -0
- package/lib/contextkey/resource.d.ts +17 -0
- package/lib/contextkey/resource.d.ts.map +1 -0
- package/lib/contextkey/resource.js +45 -0
- package/lib/contextkey/resource.js.map +1 -0
- package/lib/contextkey/terminal.d.ts +7 -0
- package/lib/contextkey/terminal.d.ts.map +1 -0
- package/lib/contextkey/terminal.js +10 -0
- package/lib/contextkey/terminal.js.map +1 -0
- package/lib/contextkey/workspace.d.ts +7 -0
- package/lib/contextkey/workspace.d.ts.map +1 -0
- package/lib/contextkey/workspace.js +10 -0
- package/lib/contextkey/workspace.js.map +1 -0
- package/lib/core-preferences.d.ts +57 -0
- package/lib/core-preferences.d.ts.map +1 -0
- package/lib/core-preferences.js +328 -0
- package/lib/core-preferences.js.map +1 -0
- package/lib/dom/index.d.ts +68 -0
- package/lib/dom/index.d.ts.map +1 -0
- package/lib/dom/index.js +126 -0
- package/lib/dom/index.js.map +1 -0
- package/lib/encoding-registry.d.ts +31 -0
- package/lib/encoding-registry.d.ts.map +1 -0
- package/lib/encoding-registry.js +85 -0
- package/lib/encoding-registry.js.map +1 -0
- package/lib/fs/index.d.ts +12 -0
- package/lib/fs/index.d.ts.map +1 -0
- package/lib/fs/index.js +9 -0
- package/lib/fs/index.js.map +1 -0
- package/lib/hash-calculate/hash-calculate.contribution.d.ts +6 -0
- package/lib/hash-calculate/hash-calculate.contribution.d.ts.map +1 -0
- package/lib/hash-calculate/hash-calculate.contribution.js +27 -0
- package/lib/hash-calculate/hash-calculate.contribution.js.map +1 -0
- package/lib/index.d.ts +28 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +34 -0
- package/lib/index.js.map +1 -0
- package/lib/keybinding/index.d.ts +2 -0
- package/lib/keybinding/index.d.ts.map +1 -0
- package/lib/keybinding/index.js +5 -0
- package/lib/keybinding/index.js.map +1 -0
- package/lib/keybinding/keybinding.d.ts +340 -0
- package/lib/keybinding/keybinding.d.ts.map +1 -0
- package/lib/keybinding/keybinding.js +720 -0
- package/lib/keybinding/keybinding.js.map +1 -0
- package/lib/keyboard/index.d.ts +4 -0
- package/lib/keyboard/index.d.ts.map +1 -0
- package/lib/keyboard/index.js +7 -0
- package/lib/keyboard/index.js.map +1 -0
- package/lib/keyboard/keyboard-layout-provider.d.ts +92 -0
- package/lib/keyboard/keyboard-layout-provider.d.ts.map +1 -0
- package/lib/keyboard/keyboard-layout-provider.js +344 -0
- package/lib/keyboard/keyboard-layout-provider.js.map +1 -0
- package/lib/keyboard/keyboard-layout-service.d.ts +65 -0
- package/lib/keyboard/keyboard-layout-service.d.ts.map +1 -0
- package/lib/keyboard/keyboard-layout-service.js +415 -0
- package/lib/keyboard/keyboard-layout-service.js.map +1 -0
- package/lib/keyboard/keys.d.ts +294 -0
- package/lib/keyboard/keys.d.ts.map +1 -0
- package/lib/keyboard/keys.js +699 -0
- package/lib/keyboard/keys.js.map +1 -0
- package/lib/keyboard/layouts/_.contribution.d.ts +9 -0
- package/lib/keyboard/layouts/_.contribution.d.ts.map +1 -0
- package/lib/keyboard/layouts/_.contribution.js +21 -0
- package/lib/keyboard/layouts/_.contribution.js.map +1 -0
- package/lib/keyboard/layouts/cz.win.d.ts +2 -0
- package/lib/keyboard/layouts/cz.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/cz.win.js +169 -0
- package/lib/keyboard/layouts/cz.win.js.map +1 -0
- package/lib/keyboard/layouts/de-swiss.win.d.ts +2 -0
- package/lib/keyboard/layouts/de-swiss.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/de-swiss.win.js +169 -0
- package/lib/keyboard/layouts/de-swiss.win.js.map +1 -0
- package/lib/keyboard/layouts/de.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/de.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/de.darwin.js +132 -0
- package/lib/keyboard/layouts/de.darwin.js.map +1 -0
- package/lib/keyboard/layouts/de.linux.d.ts +2 -0
- package/lib/keyboard/layouts/de.linux.d.ts.map +1 -0
- package/lib/keyboard/layouts/de.linux.js +187 -0
- package/lib/keyboard/layouts/de.linux.js.map +1 -0
- package/lib/keyboard/layouts/de.win.d.ts +2 -0
- package/lib/keyboard/layouts/de.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/de.win.js +169 -0
- package/lib/keyboard/layouts/de.win.js.map +1 -0
- package/lib/keyboard/layouts/dk.win.d.ts +2 -0
- package/lib/keyboard/layouts/dk.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/dk.win.js +169 -0
- package/lib/keyboard/layouts/dk.win.js.map +1 -0
- package/lib/keyboard/layouts/dvorak.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/dvorak.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/dvorak.darwin.js +132 -0
- package/lib/keyboard/layouts/dvorak.darwin.js.map +1 -0
- package/lib/keyboard/layouts/en-belgian.win.d.ts +2 -0
- package/lib/keyboard/layouts/en-belgian.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/en-belgian.win.js +169 -0
- package/lib/keyboard/layouts/en-belgian.win.js.map +1 -0
- package/lib/keyboard/layouts/en-ext.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/en-ext.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/en-ext.darwin.js +132 -0
- package/lib/keyboard/layouts/en-ext.darwin.js.map +1 -0
- package/lib/keyboard/layouts/en-in.win.d.ts +2 -0
- package/lib/keyboard/layouts/en-in.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/en-in.win.js +169 -0
- package/lib/keyboard/layouts/en-in.win.js.map +1 -0
- package/lib/keyboard/layouts/en-intl.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/en-intl.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/en-intl.darwin.js +132 -0
- package/lib/keyboard/layouts/en-intl.darwin.js.map +1 -0
- package/lib/keyboard/layouts/en-intl.win.d.ts +2 -0
- package/lib/keyboard/layouts/en-intl.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/en-intl.win.js +169 -0
- package/lib/keyboard/layouts/en-intl.win.js.map +1 -0
- package/lib/keyboard/layouts/en-uk.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/en-uk.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/en-uk.darwin.js +132 -0
- package/lib/keyboard/layouts/en-uk.darwin.js.map +1 -0
- package/lib/keyboard/layouts/en-uk.win.d.ts +2 -0
- package/lib/keyboard/layouts/en-uk.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/en-uk.win.js +169 -0
- package/lib/keyboard/layouts/en-uk.win.js.map +1 -0
- package/lib/keyboard/layouts/en.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/en.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/en.darwin.js +140 -0
- package/lib/keyboard/layouts/en.darwin.js.map +1 -0
- package/lib/keyboard/layouts/en.linux.d.ts +2 -0
- package/lib/keyboard/layouts/en.linux.d.ts.map +1 -0
- package/lib/keyboard/layouts/en.linux.js +189 -0
- package/lib/keyboard/layouts/en.linux.js.map +1 -0
- package/lib/keyboard/layouts/en.win.d.ts +2 -0
- package/lib/keyboard/layouts/en.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/en.win.js +174 -0
- package/lib/keyboard/layouts/en.win.js.map +1 -0
- package/lib/keyboard/layouts/es-latin.win.d.ts +2 -0
- package/lib/keyboard/layouts/es-latin.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/es-latin.win.js +169 -0
- package/lib/keyboard/layouts/es-latin.win.js.map +1 -0
- package/lib/keyboard/layouts/es.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/es.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/es.darwin.js +132 -0
- package/lib/keyboard/layouts/es.darwin.js.map +1 -0
- package/lib/keyboard/layouts/es.linux.d.ts +2 -0
- package/lib/keyboard/layouts/es.linux.d.ts.map +1 -0
- package/lib/keyboard/layouts/es.linux.js +187 -0
- package/lib/keyboard/layouts/es.linux.js.map +1 -0
- package/lib/keyboard/layouts/es.win.d.ts +2 -0
- package/lib/keyboard/layouts/es.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/es.win.js +169 -0
- package/lib/keyboard/layouts/es.win.js.map +1 -0
- package/lib/keyboard/layouts/fr.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/fr.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/fr.darwin.js +132 -0
- package/lib/keyboard/layouts/fr.darwin.js.map +1 -0
- package/lib/keyboard/layouts/fr.linux.d.ts +2 -0
- package/lib/keyboard/layouts/fr.linux.d.ts.map +1 -0
- package/lib/keyboard/layouts/fr.linux.js +187 -0
- package/lib/keyboard/layouts/fr.linux.js.map +1 -0
- package/lib/keyboard/layouts/fr.win.d.ts +2 -0
- package/lib/keyboard/layouts/fr.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/fr.win.js +169 -0
- package/lib/keyboard/layouts/fr.win.js.map +1 -0
- package/lib/keyboard/layouts/hu.win.d.ts +2 -0
- package/lib/keyboard/layouts/hu.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/hu.win.js +169 -0
- package/lib/keyboard/layouts/hu.win.js.map +1 -0
- package/lib/keyboard/layouts/it.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/it.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/it.darwin.js +132 -0
- package/lib/keyboard/layouts/it.darwin.js.map +1 -0
- package/lib/keyboard/layouts/it.win.d.ts +2 -0
- package/lib/keyboard/layouts/it.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/it.win.js +169 -0
- package/lib/keyboard/layouts/it.win.js.map +1 -0
- package/lib/keyboard/layouts/jp-roman.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/jp-roman.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/jp-roman.darwin.js +132 -0
- package/lib/keyboard/layouts/jp-roman.darwin.js.map +1 -0
- package/lib/keyboard/layouts/jp.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/jp.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/jp.darwin.js +132 -0
- package/lib/keyboard/layouts/jp.darwin.js.map +1 -0
- package/lib/keyboard/layouts/ko.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/ko.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/ko.darwin.js +132 -0
- package/lib/keyboard/layouts/ko.darwin.js.map +1 -0
- package/lib/keyboard/layouts/layout.contribution.d.ts +3 -0
- package/lib/keyboard/layouts/layout.contribution.d.ts.map +1 -0
- package/lib/keyboard/layouts/layout.contribution.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/layout.contribution.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/layout.contribution.darwin.js +27 -0
- package/lib/keyboard/layouts/layout.contribution.darwin.js.map +1 -0
- package/lib/keyboard/layouts/layout.contribution.js +11 -0
- package/lib/keyboard/layouts/layout.contribution.js.map +1 -0
- package/lib/keyboard/layouts/layout.contribution.linux.d.ts +2 -0
- package/lib/keyboard/layouts/layout.contribution.linux.d.ts.map +1 -0
- package/lib/keyboard/layouts/layout.contribution.linux.js +16 -0
- package/lib/keyboard/layouts/layout.contribution.linux.js.map +1 -0
- package/lib/keyboard/layouts/layout.contribution.win.d.ts +2 -0
- package/lib/keyboard/layouts/layout.contribution.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/layout.contribution.win.js +33 -0
- package/lib/keyboard/layouts/layout.contribution.win.js.map +1 -0
- package/lib/keyboard/layouts/no.win.d.ts +2 -0
- package/lib/keyboard/layouts/no.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/no.win.js +169 -0
- package/lib/keyboard/layouts/no.win.js.map +1 -0
- package/lib/keyboard/layouts/pl.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/pl.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/pl.darwin.js +132 -0
- package/lib/keyboard/layouts/pl.darwin.js.map +1 -0
- package/lib/keyboard/layouts/pl.win.d.ts +2 -0
- package/lib/keyboard/layouts/pl.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/pl.win.js +169 -0
- package/lib/keyboard/layouts/pl.win.js.map +1 -0
- package/lib/keyboard/layouts/pt-br.win.d.ts +2 -0
- package/lib/keyboard/layouts/pt-br.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/pt-br.win.js +169 -0
- package/lib/keyboard/layouts/pt-br.win.js.map +1 -0
- package/lib/keyboard/layouts/pt.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/pt.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/pt.darwin.js +132 -0
- package/lib/keyboard/layouts/pt.darwin.js.map +1 -0
- package/lib/keyboard/layouts/pt.win.d.ts +2 -0
- package/lib/keyboard/layouts/pt.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/pt.win.js +169 -0
- package/lib/keyboard/layouts/pt.win.js.map +1 -0
- package/lib/keyboard/layouts/ru.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/ru.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/ru.darwin.js +132 -0
- package/lib/keyboard/layouts/ru.darwin.js.map +1 -0
- package/lib/keyboard/layouts/ru.linux.d.ts +2 -0
- package/lib/keyboard/layouts/ru.linux.d.ts.map +1 -0
- package/lib/keyboard/layouts/ru.linux.js +187 -0
- package/lib/keyboard/layouts/ru.linux.js.map +1 -0
- package/lib/keyboard/layouts/ru.win.d.ts +2 -0
- package/lib/keyboard/layouts/ru.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/ru.win.js +169 -0
- package/lib/keyboard/layouts/ru.win.js.map +1 -0
- package/lib/keyboard/layouts/sv.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/sv.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/sv.darwin.js +132 -0
- package/lib/keyboard/layouts/sv.darwin.js.map +1 -0
- package/lib/keyboard/layouts/sv.win.d.ts +2 -0
- package/lib/keyboard/layouts/sv.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/sv.win.js +171 -0
- package/lib/keyboard/layouts/sv.win.js.map +1 -0
- package/lib/keyboard/layouts/thai.win.d.ts +2 -0
- package/lib/keyboard/layouts/thai.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/thai.win.js +169 -0
- package/lib/keyboard/layouts/thai.win.js.map +1 -0
- package/lib/keyboard/layouts/tr.win.d.ts +2 -0
- package/lib/keyboard/layouts/tr.win.d.ts.map +1 -0
- package/lib/keyboard/layouts/tr.win.js +169 -0
- package/lib/keyboard/layouts/tr.win.js.map +1 -0
- package/lib/keyboard/layouts/zh-hans.darwin.d.ts +2 -0
- package/lib/keyboard/layouts/zh-hans.darwin.d.ts.map +1 -0
- package/lib/keyboard/layouts/zh-hans.darwin.js +132 -0
- package/lib/keyboard/layouts/zh-hans.darwin.js.map +1 -0
- package/lib/layout/accordion/tab-bar-toolbar.d.ts +25 -0
- package/lib/layout/accordion/tab-bar-toolbar.d.ts.map +1 -0
- package/lib/layout/accordion/tab-bar-toolbar.js +37 -0
- package/lib/layout/accordion/tab-bar-toolbar.js.map +1 -0
- package/lib/layout/accordion/view-context-key.registry.d.ts +9 -0
- package/lib/layout/accordion/view-context-key.registry.d.ts.map +1 -0
- package/lib/layout/accordion/view-context-key.registry.js +38 -0
- package/lib/layout/accordion/view-context-key.registry.js.map +1 -0
- package/lib/layout/index.d.ts +103 -0
- package/lib/layout/index.d.ts.map +1 -0
- package/lib/layout/index.js +143 -0
- package/lib/layout/index.js.map +1 -0
- package/lib/layout/layout-state.d.ts +24 -0
- package/lib/layout/layout-state.d.ts.map +1 -0
- package/lib/layout/layout-state.js +99 -0
- package/lib/layout/layout-state.js.map +1 -0
- package/lib/logger/browser-logger.d.ts +17 -0
- package/lib/logger/browser-logger.d.ts.map +1 -0
- package/lib/logger/browser-logger.js +50 -0
- package/lib/logger/browser-logger.js.map +1 -0
- package/lib/logger/index.d.ts +2 -0
- package/lib/logger/index.d.ts.map +1 -0
- package/lib/logger/index.js +5 -0
- package/lib/logger/index.js.map +1 -0
- package/lib/menu/next/base.d.ts +242 -0
- package/lib/menu/next/base.d.ts.map +1 -0
- package/lib/menu/next/base.js +267 -0
- package/lib/menu/next/base.js.map +1 -0
- package/lib/menu/next/ctxmenu-service.d.ts +42 -0
- package/lib/menu/next/ctxmenu-service.d.ts.map +1 -0
- package/lib/menu/next/ctxmenu-service.js +151 -0
- package/lib/menu/next/ctxmenu-service.js.map +1 -0
- package/lib/menu/next/index.d.ts +11 -0
- package/lib/menu/next/index.d.ts.map +1 -0
- package/lib/menu/next/index.js +14 -0
- package/lib/menu/next/index.js.map +1 -0
- package/lib/menu/next/menu-id.d.ts +59 -0
- package/lib/menu/next/menu-id.d.ts.map +1 -0
- package/lib/menu/next/menu-id.js +73 -0
- package/lib/menu/next/menu-id.js.map +1 -0
- package/lib/menu/next/menu-service.d.ts +9 -0
- package/lib/menu/next/menu-service.d.ts.map +1 -0
- package/lib/menu/next/menu-service.js +205 -0
- package/lib/menu/next/menu-service.js.map +1 -0
- package/lib/menu/next/menu-util.d.ts +18 -0
- package/lib/menu/next/menu-util.d.ts.map +1 -0
- package/lib/menu/next/menu-util.js +64 -0
- package/lib/menu/next/menu-util.js.map +1 -0
- package/lib/menu/next/menu.contrib.interface.d.ts +22 -0
- package/lib/menu/next/menu.contrib.interface.d.ts.map +1 -0
- package/lib/menu/next/menu.contrib.interface.js +9 -0
- package/lib/menu/next/menu.contrib.interface.js.map +1 -0
- package/lib/menu/next/menu.interface.d.ts +100 -0
- package/lib/menu/next/menu.interface.d.ts.map +1 -0
- package/lib/menu/next/menu.interface.js +192 -0
- package/lib/menu/next/menu.interface.js.map +1 -0
- package/lib/menu/next/menubar-service.d.ts +53 -0
- package/lib/menu/next/menubar-service.d.ts.map +1 -0
- package/lib/menu/next/menubar-service.js +178 -0
- package/lib/menu/next/menubar-service.js.map +1 -0
- package/lib/menu/next/renderer/ctxmenu/base.d.ts +19 -0
- package/lib/menu/next/renderer/ctxmenu/base.d.ts.map +1 -0
- package/lib/menu/next/renderer/ctxmenu/base.js +7 -0
- package/lib/menu/next/renderer/ctxmenu/base.js.map +1 -0
- package/lib/menu/next/renderer/ctxmenu/browser.d.ts +19 -0
- package/lib/menu/next/renderer/ctxmenu/browser.d.ts.map +1 -0
- package/lib/menu/next/renderer/ctxmenu/browser.js +40 -0
- package/lib/menu/next/renderer/ctxmenu/browser.js.map +1 -0
- package/lib/menu/next/renderer/ctxmenu/electron.d.ts +34 -0
- package/lib/menu/next/renderer/ctxmenu/electron.d.ts.map +1 -0
- package/lib/menu/next/renderer/ctxmenu/electron.js +198 -0
- package/lib/menu/next/renderer/ctxmenu/electron.js.map +1 -0
- package/lib/menu/next/toolbar-action.service.d.ts +50 -0
- package/lib/menu/next/toolbar-action.service.d.ts.map +1 -0
- package/lib/menu/next/toolbar-action.service.js +93 -0
- package/lib/menu/next/toolbar-action.service.js.map +1 -0
- package/lib/monaco/index.d.ts +99 -0
- package/lib/monaco/index.d.ts.map +1 -0
- package/lib/monaco/index.js +32 -0
- package/lib/monaco/index.js.map +1 -0
- package/lib/opener/command-opener.d.ts +12 -0
- package/lib/opener/command-opener.d.ts.map +1 -0
- package/lib/opener/command-opener.js +49 -0
- package/lib/opener/command-opener.js.map +1 -0
- package/lib/opener/default-opener.d.ts +8 -0
- package/lib/opener/default-opener.d.ts.map +1 -0
- package/lib/opener/default-opener.js +32 -0
- package/lib/opener/default-opener.js.map +1 -0
- package/lib/opener/http-opener.d.ts +9 -0
- package/lib/opener/http-opener.d.ts.map +1 -0
- package/lib/opener/http-opener.js +33 -0
- package/lib/opener/http-opener.js.map +1 -0
- package/lib/opener/index.d.ts +16 -0
- package/lib/opener/index.d.ts.map +1 -0
- package/lib/opener/index.js +6 -0
- package/lib/opener/index.js.map +1 -0
- package/lib/opener/opener.contribution.d.ts +14 -0
- package/lib/opener/opener.contribution.d.ts.map +1 -0
- package/lib/opener/opener.contribution.js +63 -0
- package/lib/opener/opener.contribution.js.map +1 -0
- package/lib/opener/opener.service.d.ts +14 -0
- package/lib/opener/opener.service.d.ts.map +1 -0
- package/lib/opener/opener.service.js +67 -0
- package/lib/opener/opener.service.js.map +1 -0
- package/lib/preferences/early-preferences.d.ts +24 -0
- package/lib/preferences/early-preferences.d.ts.map +1 -0
- package/lib/preferences/early-preferences.js +96 -0
- package/lib/preferences/early-preferences.js.map +1 -0
- package/lib/preferences/index.d.ts +9 -0
- package/lib/preferences/index.d.ts.map +1 -0
- package/lib/preferences/index.js +12 -0
- package/lib/preferences/index.js.map +1 -0
- package/lib/preferences/preference-configurations.d.ts +22 -0
- package/lib/preferences/preference-configurations.d.ts.map +1 -0
- package/lib/preferences/preference-configurations.js +68 -0
- package/lib/preferences/preference-configurations.js.map +1 -0
- package/lib/preferences/preference-contribution.d.ts +82 -0
- package/lib/preferences/preference-contribution.d.ts.map +1 -0
- package/lib/preferences/preference-contribution.js +325 -0
- package/lib/preferences/preference-contribution.js.map +1 -0
- package/lib/preferences/preference-provider.d.ts +117 -0
- package/lib/preferences/preference-provider.d.ts.map +1 -0
- package/lib/preferences/preference-provider.js +275 -0
- package/lib/preferences/preference-provider.js.map +1 -0
- package/lib/preferences/preference-proxy.d.ts +45 -0
- package/lib/preferences/preference-proxy.d.ts.map +1 -0
- package/lib/preferences/preference-proxy.js +195 -0
- package/lib/preferences/preference-proxy.js.map +1 -0
- package/lib/preferences/preference-scope.d.ts +3 -0
- package/lib/preferences/preference-scope.d.ts.map +1 -0
- package/lib/preferences/preference-scope.js +6 -0
- package/lib/preferences/preference-scope.js.map +1 -0
- package/lib/preferences/preference-service.d.ts +194 -0
- package/lib/preferences/preference-service.d.ts.map +1 -0
- package/lib/preferences/preference-service.js +425 -0
- package/lib/preferences/preference-service.js.map +1 -0
- package/lib/preferences/settings.d.ts +41 -0
- package/lib/preferences/settings.d.ts.map +1 -0
- package/lib/preferences/settings.js +5 -0
- package/lib/preferences/settings.js.map +1 -0
- package/lib/progress/index.d.ts +36 -0
- package/lib/progress/index.d.ts.map +1 -0
- package/lib/progress/index.js +10 -0
- package/lib/progress/index.js.map +1 -0
- package/lib/progress/progress-bar.d.ts +7 -0
- package/lib/progress/progress-bar.d.ts.map +1 -0
- package/lib/progress/progress-bar.js +14 -0
- package/lib/progress/progress-bar.js.map +1 -0
- package/lib/progress/progress-indicator.d.ts +12 -0
- package/lib/progress/progress-indicator.d.ts.map +1 -0
- package/lib/progress/progress-indicator.js +106 -0
- package/lib/progress/progress-indicator.js.map +1 -0
- package/lib/progress/progress.module.less +40 -0
- package/lib/progress/progress.service.d.ts +19 -0
- package/lib/progress/progress.service.d.ts.map +1 -0
- package/lib/progress/progress.service.js +343 -0
- package/lib/progress/progress.service.js.map +1 -0
- package/lib/quick-open/index.d.ts +467 -0
- package/lib/quick-open/index.d.ts.map +1 -0
- package/lib/quick-open/index.js +145 -0
- package/lib/quick-open/index.js.map +1 -0
- package/lib/quick-open/recent-files.d.ts +11 -0
- package/lib/quick-open/recent-files.d.ts.map +1 -0
- package/lib/quick-open/recent-files.js +73 -0
- package/lib/quick-open/recent-files.js.map +1 -0
- package/lib/raw-context-key.d.ts +57 -0
- package/lib/raw-context-key.d.ts.map +1 -0
- package/lib/raw-context-key.js +96 -0
- package/lib/raw-context-key.js.map +1 -0
- package/lib/react-hooks/event.d.ts +11 -0
- package/lib/react-hooks/event.d.ts.map +1 -0
- package/lib/react-hooks/event.js +64 -0
- package/lib/react-hooks/event.js.map +1 -0
- package/lib/react-hooks/hot-key.d.ts +5 -0
- package/lib/react-hooks/hot-key.d.ts.map +1 -0
- package/lib/react-hooks/hot-key.js +48 -0
- package/lib/react-hooks/hot-key.js.map +1 -0
- package/lib/react-hooks/index.d.ts +4 -0
- package/lib/react-hooks/index.d.ts.map +1 -0
- package/lib/react-hooks/index.js +7 -0
- package/lib/react-hooks/index.js.map +1 -0
- package/lib/react-hooks/injectable-hooks.d.ts +3 -0
- package/lib/react-hooks/injectable-hooks.d.ts.map +1 -0
- package/lib/react-hooks/injectable-hooks.js +33 -0
- package/lib/react-hooks/injectable-hooks.js.map +1 -0
- package/lib/react-hooks/portal-hooks.d.ts +2 -0
- package/lib/react-hooks/portal-hooks.d.ts.map +1 -0
- package/lib/react-hooks/portal-hooks.js +36 -0
- package/lib/react-hooks/portal-hooks.js.map +1 -0
- package/lib/react-providers/config-provider.d.ts +182 -0
- package/lib/react-providers/config-provider.d.ts.map +1 -0
- package/lib/react-providers/config-provider.js +24 -0
- package/lib/react-providers/config-provider.js.map +1 -0
- package/lib/react-providers/index.d.ts +3 -0
- package/lib/react-providers/index.d.ts.map +1 -0
- package/lib/react-providers/index.js +6 -0
- package/lib/react-providers/index.js.map +1 -0
- package/lib/react-providers/slot.d.ts +73 -0
- package/lib/react-providers/slot.d.ts.map +1 -0
- package/lib/react-providers/slot.js +184 -0
- package/lib/react-providers/slot.js.map +1 -0
- package/lib/services/clipboard.service.d.ts +17 -0
- package/lib/services/clipboard.service.d.ts.map +1 -0
- package/lib/services/clipboard.service.js +57 -0
- package/lib/services/clipboard.service.js.map +1 -0
- package/lib/services/credentials-service.d.ts +36 -0
- package/lib/services/credentials-service.d.ts.map +1 -0
- package/lib/services/credentials-service.js +62 -0
- package/lib/services/credentials-service.js.map +1 -0
- package/lib/services/cryptr-service.d.ts +11 -0
- package/lib/services/cryptr-service.d.ts.map +1 -0
- package/lib/services/cryptr-service.js +24 -0
- package/lib/services/cryptr-service.js.map +1 -0
- package/lib/services/external-uri.service.d.ts +28 -0
- package/lib/services/external-uri.service.d.ts.map +1 -0
- package/lib/services/external-uri.service.js +58 -0
- package/lib/services/external-uri.service.js.map +1 -0
- package/lib/services/index.d.ts +8 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +11 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/label-service.d.ts +74 -0
- package/lib/services/label-service.d.ts.map +1 -0
- package/lib/services/label-service.js +306 -0
- package/lib/services/label-service.js.map +1 -0
- package/lib/services/status-bar-service.d.ts +86 -0
- package/lib/services/status-bar-service.d.ts.map +1 -0
- package/lib/services/status-bar-service.js +25 -0
- package/lib/services/status-bar-service.js.map +1 -0
- package/lib/services/storage-service.d.ts +72 -0
- package/lib/services/storage-service.d.ts.map +1 -0
- package/lib/services/storage-service.js +128 -0
- package/lib/services/storage-service.js.map +1 -0
- package/lib/style/codicons/README.md +32 -0
- package/lib/style/codicons/codicon-animations.css +15 -0
- package/lib/style/entry.less +25 -0
- package/lib/style/icon/fileicons/file-default.svg +1 -0
- package/lib/style/icon/fileicons/folder-default.svg +1 -0
- package/lib/style/icon/fileicons.less +9 -0
- package/lib/style/icon/icon.d.ts +19 -0
- package/lib/style/icon/icon.d.ts.map +1 -0
- package/lib/style/icon/icon.js +64 -0
- package/lib/style/icon/icon.js.map +1 -0
- package/lib/style/icon/ide-iconfont.d.ts +5 -0
- package/lib/style/icon/ide-iconfont.d.ts.map +1 -0
- package/lib/style/icon/ide-iconfont.js +10 -0
- package/lib/style/icon/ide-iconfont.js.map +1 -0
- package/lib/style/icon/index.less +54 -0
- package/lib/style/icon/seti.woff +0 -0
- package/lib/style/icon/symbol-icons/boolean-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/boolean-light.svg +3 -0
- package/lib/style/icon/symbol-icons/class-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/class-light.svg +3 -0
- package/lib/style/icon/symbol-icons/constant-dark.svg +4 -0
- package/lib/style/icon/symbol-icons/constant-light.svg +4 -0
- package/lib/style/icon/symbol-icons/enumerator-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/enumerator-item-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/enumerator-item-light.svg +3 -0
- package/lib/style/icon/symbol-icons/enumerator-light.svg +3 -0
- package/lib/style/icon/symbol-icons/event-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/event-light.svg +3 -0
- package/lib/style/icon/symbol-icons/field-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/field-light.svg +3 -0
- package/lib/style/icon/symbol-icons/file-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/file-light.svg +3 -0
- package/lib/style/icon/symbol-icons/indexer-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/indexer-light.svg +3 -0
- package/lib/style/icon/symbol-icons/interface-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/interface-light.svg +3 -0
- package/lib/style/icon/symbol-icons/keyword-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/keyword-light.svg +3 -0
- package/lib/style/icon/symbol-icons/method-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/method-light.svg +3 -0
- package/lib/style/icon/symbol-icons/namespace-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/namespace-light.svg +3 -0
- package/lib/style/icon/symbol-icons/numeric-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/numeric-light.svg +3 -0
- package/lib/style/icon/symbol-icons/operator-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/operator-light.svg +3 -0
- package/lib/style/icon/symbol-icons/property-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/property-light.svg +3 -0
- package/lib/style/icon/symbol-icons/snippet-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/snippet-light.svg +3 -0
- package/lib/style/icon/symbol-icons/string-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/string-light.svg +3 -0
- package/lib/style/icon/symbol-icons/structure-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/structure-light.svg +3 -0
- package/lib/style/icon/symbol-icons/symbol-icons.css +284 -0
- package/lib/style/icon/symbol-icons/template-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/template-light.svg +3 -0
- package/lib/style/icon/symbol-icons/variable-dark.svg +3 -0
- package/lib/style/icon/symbol-icons/variable-light.svg +3 -0
- package/lib/style/icon.less +8 -0
- package/lib/style/index.less +14 -0
- package/lib/style/monaco-override.less +86 -0
- package/lib/style/normalize.less +89 -0
- package/lib/style/octicons/octicons-cdn.css +269 -0
- package/lib/style/octicons/octicons.css +263 -0
- package/lib/style/octicons/octicons.html +1882 -0
- package/lib/style/octicons/octicons.svg +582 -0
- package/lib/style/octicons/octicons.ttf +0 -0
- package/lib/style/override.less +80 -0
- package/lib/style/toolbar.less +193 -0
- package/lib/style/utilities.less +18 -0
- package/lib/style/variable.less +16 -0
- package/lib/toolbar/components/auto-complete.d.ts +1 -0
- package/lib/toolbar/components/auto-complete.d.ts.map +1 -0
- package/lib/toolbar/components/auto-complete.js +2 -0
- package/lib/toolbar/components/auto-complete.js.map +1 -0
- package/lib/toolbar/components/button.d.ts +11 -0
- package/lib/toolbar/components/button.d.ts.map +1 -0
- package/lib/toolbar/components/button.js +324 -0
- package/lib/toolbar/components/button.js.map +1 -0
- package/lib/toolbar/components/index.d.ts +3 -0
- package/lib/toolbar/components/index.d.ts.map +1 -0
- package/lib/toolbar/components/index.js +6 -0
- package/lib/toolbar/components/index.js.map +1 -0
- package/lib/toolbar/components/select.d.ts +5 -0
- package/lib/toolbar/components/select.d.ts.map +1 -0
- package/lib/toolbar/components/select.js +161 -0
- package/lib/toolbar/components/select.js.map +1 -0
- package/lib/toolbar/index.d.ts +4 -0
- package/lib/toolbar/index.d.ts.map +1 -0
- package/lib/toolbar/index.js +9 -0
- package/lib/toolbar/index.js.map +1 -0
- package/lib/toolbar/toolbar.d.ts +17 -0
- package/lib/toolbar/toolbar.d.ts.map +1 -0
- package/lib/toolbar/toolbar.js +508 -0
- package/lib/toolbar/toolbar.js.map +1 -0
- package/lib/toolbar/toolbar.popover.registry.d.ts +11 -0
- package/lib/toolbar/toolbar.popover.registry.d.ts.map +1 -0
- package/lib/toolbar/toolbar.popover.registry.js +36 -0
- package/lib/toolbar/toolbar.popover.registry.js.map +1 -0
- package/lib/toolbar/toolbar.registry.d.ts +46 -0
- package/lib/toolbar/toolbar.registry.d.ts.map +1 -0
- package/lib/toolbar/toolbar.registry.js +283 -0
- package/lib/toolbar/toolbar.registry.js.map +1 -0
- package/lib/toolbar/types.d.ts +286 -0
- package/lib/toolbar/types.d.ts.map +1 -0
- package/lib/toolbar/types.js +18 -0
- package/lib/toolbar/types.js.map +1 -0
- package/lib/tree/index.d.ts +4 -0
- package/lib/tree/index.d.ts.map +1 -0
- package/lib/tree/index.js +7 -0
- package/lib/tree/index.js.map +1 -0
- package/lib/tree/tree-expansion.d.ts +16 -0
- package/lib/tree/tree-expansion.d.ts.map +1 -0
- package/lib/tree/tree-expansion.js +20 -0
- package/lib/tree/tree-expansion.js.map +1 -0
- package/lib/tree/tree-selection.d.ts +48 -0
- package/lib/tree/tree-selection.d.ts.map +1 -0
- package/lib/tree/tree-selection.js +64 -0
- package/lib/tree/tree-selection.js.map +1 -0
- package/lib/tree/tree.d.ts +195 -0
- package/lib/tree/tree.d.ts.map +1 -0
- package/lib/tree/tree.js +108 -0
- package/lib/tree/tree.js.map +1 -0
- package/lib/utils/create-overlay.d.ts +8 -0
- package/lib/utils/create-overlay.d.ts.map +1 -0
- package/lib/utils/create-overlay.js +50 -0
- package/lib/utils/create-overlay.js.map +1 -0
- package/lib/utils/electron.d.ts +23 -0
- package/lib/utils/electron.d.ts.map +1 -0
- package/lib/utils/electron.js +56 -0
- package/lib/utils/electron.js.map +1 -0
- package/lib/utils/env.d.ts +4 -0
- package/lib/utils/env.d.ts.map +1 -0
- package/lib/utils/env.js +31 -0
- package/lib/utils/env.js.map +1 -0
- package/lib/utils/icon.d.ts +7 -0
- package/lib/utils/icon.d.ts.map +1 -0
- package/lib/utils/icon.js +18 -0
- package/lib/utils/icon.js.map +1 -0
- package/lib/utils/index.d.ts +6 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +9 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/parse.d.ts +25 -0
- package/lib/utils/parse.d.ts.map +1 -0
- package/lib/utils/parse.js +72 -0
- package/lib/utils/parse.js.map +1 -0
- package/lib/utils/react-hooks.d.ts +12 -0
- package/lib/utils/react-hooks.d.ts.map +1 -0
- package/lib/utils/react-hooks.js +84 -0
- package/lib/utils/react-hooks.js.map +1 -0
- package/lib/variable/index.d.ts +2 -0
- package/lib/variable/index.d.ts.map +1 -0
- package/lib/variable/index.js +5 -0
- package/lib/variable/index.js.map +1 -0
- package/lib/variable/variable.d.ts +49 -0
- package/lib/variable/variable.d.ts.map +1 -0
- package/lib/variable/variable.js +56 -0
- package/lib/variable/variable.js.map +1 -0
- package/lib/window/index.d.ts +25 -0
- package/lib/window/index.d.ts.map +1 -0
- package/lib/window/index.js +5 -0
- package/lib/window/index.js.map +1 -0
- package/lib/window/window.service.d.ts +14 -0
- package/lib/window/window.service.d.ts.map +1 -0
- package/lib/window/window.service.js +103 -0
- package/lib/window/window.service.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecentFilesManager = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const di_1 = require("@opensumi/di");
|
|
6
|
+
const common_storage_1 = require("../common/common.storage");
|
|
7
|
+
const __1 = require("..");
|
|
8
|
+
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
9
|
+
const fs_1 = require("../fs");
|
|
10
|
+
const OPENED_FILE = 'OPENED_FILE';
|
|
11
|
+
const FILES_POSITION = 'OPENED_FILES_POSITION';
|
|
12
|
+
let RecentFilesManager = class RecentFilesManager extends __1.WithEventBus {
|
|
13
|
+
async updateMostRecentlyOpenedFile(url, position) {
|
|
14
|
+
const recentStorage = await this.recentStorage.getScopeStorage();
|
|
15
|
+
const openedFilesPosition = recentStorage.get(FILES_POSITION) || {};
|
|
16
|
+
openedFilesPosition[url] = `#${position.lineNumber},${position.column}`;
|
|
17
|
+
recentStorage.set(FILES_POSITION, openedFilesPosition);
|
|
18
|
+
}
|
|
19
|
+
async setMostRecentlyOpenedFile(uriString, isDelete) {
|
|
20
|
+
const recentStorage = await this.recentStorage.getScopeStorage();
|
|
21
|
+
let fileList = await this.getMostRecentlyOpenedFiles();
|
|
22
|
+
const existIdx = fileList.findIndex((file) => file === uriString);
|
|
23
|
+
if (existIdx > -1) {
|
|
24
|
+
fileList.splice(existIdx, 1);
|
|
25
|
+
}
|
|
26
|
+
if (!isDelete) {
|
|
27
|
+
fileList.unshift(uriString);
|
|
28
|
+
}
|
|
29
|
+
// 仅存储50个最近文件
|
|
30
|
+
if (fileList.length > 50) {
|
|
31
|
+
fileList = fileList.slice(0, 50);
|
|
32
|
+
}
|
|
33
|
+
recentStorage.set(OPENED_FILE, fileList);
|
|
34
|
+
}
|
|
35
|
+
async getMostRecentlyOpenedFiles(includingRange) {
|
|
36
|
+
const recentStorage = await this.recentStorage.getScopeStorage();
|
|
37
|
+
const fileList = recentStorage.get(OPENED_FILE) || [];
|
|
38
|
+
const openedFilesPosition = recentStorage.get(FILES_POSITION) || {};
|
|
39
|
+
if (includingRange) {
|
|
40
|
+
return fileList.map((url) => {
|
|
41
|
+
if (openedFilesPosition[url]) {
|
|
42
|
+
return url + openedFilesPosition[url];
|
|
43
|
+
}
|
|
44
|
+
return url;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return fileList;
|
|
48
|
+
}
|
|
49
|
+
handleFilesDelete(event) {
|
|
50
|
+
event.payload.forEach((change) => {
|
|
51
|
+
if (change.type === ide_core_common_1.FileChangeType.DELETED) {
|
|
52
|
+
if (change.uri) {
|
|
53
|
+
this.setMostRecentlyOpenedFile(change.uri, true);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
(0, tslib_1.__decorate)([
|
|
60
|
+
(0, di_1.Autowired)(common_storage_1.RecentStorage),
|
|
61
|
+
(0, tslib_1.__metadata)("design:type", common_storage_1.RecentStorage)
|
|
62
|
+
], RecentFilesManager.prototype, "recentStorage", void 0);
|
|
63
|
+
(0, tslib_1.__decorate)([
|
|
64
|
+
(0, ide_core_common_1.OnEvent)(fs_1.FilesChangeEvent),
|
|
65
|
+
(0, tslib_1.__metadata)("design:type", Function),
|
|
66
|
+
(0, tslib_1.__metadata)("design:paramtypes", [fs_1.FilesChangeEvent]),
|
|
67
|
+
(0, tslib_1.__metadata)("design:returntype", void 0)
|
|
68
|
+
], RecentFilesManager.prototype, "handleFilesDelete", null);
|
|
69
|
+
RecentFilesManager = (0, tslib_1.__decorate)([
|
|
70
|
+
(0, di_1.Injectable)()
|
|
71
|
+
], RecentFilesManager);
|
|
72
|
+
exports.RecentFilesManager = RecentFilesManager;
|
|
73
|
+
//# sourceMappingURL=recent-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recent-files.js","sourceRoot":"","sources":["../../src/quick-open/recent-files.ts"],"names":[],"mappings":";;;;AAAA,qCAAqD;AACrD,6DAAyD;AACzD,0BAAkC;AAClC,+DAA+E;AAC/E,8BAAyC;AAEzC,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAG/C,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,gBAAY;IAIlD,KAAK,CAAC,4BAA4B,CAAC,GAAW,EAAE,QAAmB;QACjE,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;QACjE,MAAM,mBAAmB,GAAG,aAAa,CAAC,GAAG,CAA6B,cAAc,CAAC,IAAI,EAAE,CAAC;QAChG,mBAAmB,CAAC,GAAG,CAAC,GAAG,IAAI,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACxE,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,yBAAyB,CAAC,SAAiB,EAAE,QAAkB;QACnE,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;QAEjE,IAAI,QAAQ,GAAG,MAAM,IAAI,CAAC,0BAA0B,EAAE,CAAC;QACvD,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;QAClE,IAAI,QAAQ,GAAG,CAAC,CAAC,EAAE;YACjB,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;SAC9B;QACD,IAAI,CAAC,QAAQ,EAAE;YACb,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;SAC7B;QAED,aAAa;QACb,IAAI,QAAQ,CAAC,MAAM,GAAG,EAAE,EAAE;YACxB,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;SAClC;QACD,aAAa,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,0BAA0B,CAAC,cAAwB;QACvD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;QACjE,MAAM,QAAQ,GAAa,aAAa,CAAC,GAAG,CAAW,WAAW,CAAC,IAAI,EAAE,CAAC;QAC1E,MAAM,mBAAmB,GAAG,aAAa,CAAC,GAAG,CAA6B,cAAc,CAAC,IAAI,EAAE,CAAC;QAChG,IAAI,cAAc,EAAE;YAClB,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC1B,IAAI,mBAAmB,CAAC,GAAG,CAAC,EAAE;oBAC5B,OAAO,GAAG,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;iBACvC;gBACD,OAAO,GAAG,CAAC;YACb,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAGS,iBAAiB,CAAC,KAAuB;QACjD,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAC/B,IAAI,MAAM,CAAC,IAAI,KAAK,gCAAc,CAAC,OAAO,EAAE;gBAC1C,IAAI,MAAM,CAAC,GAAG,EAAE;oBACd,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;iBAClD;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CAEF,CAAA;AAtDC;IADC,IAAA,cAAS,EAAC,8BAAa,CAAC;2CACF,8BAAa;yDAAC;AA4CrC;IADC,IAAA,yBAAO,EAAC,qBAAgB,CAAC;;kDACS,qBAAgB;;2DAQlD;AAtDU,kBAAkB;IAD9B,IAAA,eAAU,GAAE;GACA,kBAAkB,CAwD9B;AAxDY,gDAAkB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IContextKeyService, IContextKey } from './context-key';
|
|
2
|
+
export declare abstract class IRawContextKey<T> {
|
|
3
|
+
raw: string;
|
|
4
|
+
not: string;
|
|
5
|
+
abstract equalsTo(value: string): string;
|
|
6
|
+
abstract notEqualTo(value: string): string;
|
|
7
|
+
abstract regexMatches(regexp: RegExp): string;
|
|
8
|
+
abstract bind(target: IContextKeyService): IContextKey<T>;
|
|
9
|
+
abstract getValue(target: IContextKeyService): T | undefined;
|
|
10
|
+
}
|
|
11
|
+
declare type ContextkeyCombinedClause<T = any> = Array<RawContextKey<T> | string>;
|
|
12
|
+
/**
|
|
13
|
+
* 我们目前的 when 的使用并没有直接使用 monaco.contextkey.ContextKeyExpr
|
|
14
|
+
* 实现了 bind/getValue 方法
|
|
15
|
+
* 实现了 and/or/not/equals/notEquals/regexMatches 等工具方法
|
|
16
|
+
* 实现了类似效果:
|
|
17
|
+
* when: RawContextKey.and(ExplorerRootContext, ExplorerFolderContext)
|
|
18
|
+
* 参考 https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts
|
|
19
|
+
*/
|
|
20
|
+
export declare class RawContextKey<T> implements IRawContextKey<T> {
|
|
21
|
+
private key;
|
|
22
|
+
private defaultValue;
|
|
23
|
+
/**
|
|
24
|
+
* and alias '&&'
|
|
25
|
+
*/
|
|
26
|
+
static and(...args: ContextkeyCombinedClause): string;
|
|
27
|
+
/**
|
|
28
|
+
* or alias '||'
|
|
29
|
+
*/
|
|
30
|
+
static or(...args: ContextkeyCombinedClause): string;
|
|
31
|
+
constructor(key: string, defaultValue: T | undefined);
|
|
32
|
+
bind(target: IContextKeyService): IContextKey<T>;
|
|
33
|
+
getValue(target: IContextKeyService): T | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* maybe you don't need use this directly
|
|
36
|
+
*/
|
|
37
|
+
get raw(): string;
|
|
38
|
+
/**
|
|
39
|
+
* get negated value
|
|
40
|
+
*/
|
|
41
|
+
get not(): string;
|
|
42
|
+
/**
|
|
43
|
+
* is equal to
|
|
44
|
+
*/
|
|
45
|
+
equalsTo(value: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* is not equal to
|
|
48
|
+
*/
|
|
49
|
+
notEqualTo(value: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* matches regex
|
|
52
|
+
*/
|
|
53
|
+
regexMatches(regexp: RegExp): string;
|
|
54
|
+
evaluate(target: IContextKeyService): boolean;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=raw-context-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-context-key.d.ts","sourceRoot":"","sources":["../src/raw-context-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEhE,8BAAsB,cAAc,CAAC,CAAC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IACxC,QAAQ,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAC1C,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7C,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,kBAAkB,GAAG,WAAW,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,CAAC,GAAG,SAAS;CAC7D;AAED,aAAK,wBAAwB,CAAC,CAAC,GAAG,GAAG,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;AAiB1E;;;;;;;GAOG;AACH,qBAAa,aAAa,CAAC,CAAC,CAAE,YAAW,cAAc,CAAC,CAAC,CAAC;IACxD,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,YAAY,CAAgB;IAEpC;;OAEG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,wBAAwB,GAAG,MAAM;IAOrD;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,wBAAwB;gBAO/B,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,SAAS;IAK7C,IAAI,CAAC,MAAM,EAAE,kBAAkB,GAAG,WAAW,CAAC,CAAC,CAAC;IAIhD,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,CAAC,GAAG,SAAS;IAI1D;;OAEG;IACH,IAAW,GAAG,WAEb;IAED;;OAEG;IACH,IAAW,GAAG,WAEb;IAED;;OAEG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAItC;;OAEG;IACI,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIxC;;OAEG;IACI,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAOpC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO;CAGrD"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RawContextKey = exports.IRawContextKey = void 0;
|
|
4
|
+
class IRawContextKey {
|
|
5
|
+
}
|
|
6
|
+
exports.IRawContextKey = IRawContextKey;
|
|
7
|
+
function whenNormalizer(arr, separator) {
|
|
8
|
+
const result = [];
|
|
9
|
+
if (Array.isArray(arr) && arr.length) {
|
|
10
|
+
for (const item of arr) {
|
|
11
|
+
if (item instanceof RawContextKey) {
|
|
12
|
+
result.push(item.raw);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
result.push(item);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return result.join(' ' + separator + ' ');
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 我们目前的 when 的使用并没有直接使用 monaco.contextkey.ContextKeyExpr
|
|
23
|
+
* 实现了 bind/getValue 方法
|
|
24
|
+
* 实现了 and/or/not/equals/notEquals/regexMatches 等工具方法
|
|
25
|
+
* 实现了类似效果:
|
|
26
|
+
* when: RawContextKey.and(ExplorerRootContext, ExplorerFolderContext)
|
|
27
|
+
* 参考 https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts
|
|
28
|
+
*/
|
|
29
|
+
class RawContextKey {
|
|
30
|
+
constructor(key, defaultValue) {
|
|
31
|
+
this.key = key;
|
|
32
|
+
this.defaultValue = defaultValue;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* and alias '&&'
|
|
36
|
+
*/
|
|
37
|
+
static and(...args) {
|
|
38
|
+
if (!args.length) {
|
|
39
|
+
return '';
|
|
40
|
+
}
|
|
41
|
+
return whenNormalizer(args, '&&');
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* or alias '||'
|
|
45
|
+
*/
|
|
46
|
+
static or(...args) {
|
|
47
|
+
if (!args.length) {
|
|
48
|
+
return '';
|
|
49
|
+
}
|
|
50
|
+
return whenNormalizer(args, '||');
|
|
51
|
+
}
|
|
52
|
+
bind(target) {
|
|
53
|
+
return target.createKey(this.key, this.defaultValue);
|
|
54
|
+
}
|
|
55
|
+
getValue(target) {
|
|
56
|
+
return target.getContextValue(this.key);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* maybe you don't need use this directly
|
|
60
|
+
*/
|
|
61
|
+
get raw() {
|
|
62
|
+
return this.key;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* get negated value
|
|
66
|
+
*/
|
|
67
|
+
get not() {
|
|
68
|
+
return '!' + this.raw;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* is equal to
|
|
72
|
+
*/
|
|
73
|
+
equalsTo(value) {
|
|
74
|
+
return this.raw + ' == ' + value;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* is not equal to
|
|
78
|
+
*/
|
|
79
|
+
notEqualTo(value) {
|
|
80
|
+
return this.raw + ' != ' + value;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* matches regex
|
|
84
|
+
*/
|
|
85
|
+
regexMatches(regexp) {
|
|
86
|
+
const regexpStr = regexp
|
|
87
|
+
? `/${regexp.source}/${regexp.ignoreCase ? 'i' : ''}`
|
|
88
|
+
: '/invalid/';
|
|
89
|
+
return this.raw + ' =~ ' + regexpStr;
|
|
90
|
+
}
|
|
91
|
+
evaluate(target) {
|
|
92
|
+
return (!!target.getValue(this.key));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.RawContextKey = RawContextKey;
|
|
96
|
+
//# sourceMappingURL=raw-context-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-context-key.js","sourceRoot":"","sources":["../src/raw-context-key.ts"],"names":[],"mappings":";;;AAEA,MAAsB,cAAc;CAQnC;AARD,wCAQC;AAID,SAAS,cAAc,CAAC,GAA6B,EAAE,SAAsB;IAC3E,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE;QACpC,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE;YACtB,IAAI,IAAI,YAAY,aAAa,EAAE;gBACjC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACvB;iBAAM;gBACL,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACnB;SACF;KACF;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,SAAS,GAAG,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;GAOG;AACH,MAAa,aAAa;IAwBxB,YAAY,GAAW,EAAE,YAA2B;QAClD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAvBD;;OAEG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,IAA8B;QAC1C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,OAAO,EAAE,CAAC;SACX;QACD,OAAO,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,IAA8B;QACzC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,OAAO,EAAE,CAAC;SACX;QACD,OAAO,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAOM,IAAI,CAAC,MAA0B;QACpC,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACvD,CAAC;IAEM,QAAQ,CAAC,MAA0B;QACxC,OAAO,MAAM,CAAC,eAAe,CAAI,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,QAAQ,CAAC,KAAa;QAC3B,OAAO,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,KAAK,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,UAAU,CAAC,KAAa;QAC7B,OAAO,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,KAAK,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,YAAY,CAAC,MAAc;QAChC,MAAM,SAAS,GAAG,MAAM;YACtB,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACrD,CAAC,CAAC,WAAW,CAAC;QAChB,OAAO,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,CAAC;IAEM,QAAQ,CAAC,MAA0B;QACxC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,CAAC;CACF;AA9ED,sCA8EC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Event, ConstructorOf, BasicEvent } from '@opensumi/ide-core-common';
|
|
2
|
+
/**
|
|
3
|
+
* 在事件来临时更新当前元素
|
|
4
|
+
* 会自动 dispose 监听器
|
|
5
|
+
* @param event 要监听的事件
|
|
6
|
+
* @param dependencies React.useEffect的依赖
|
|
7
|
+
* @param condition 返回 true 时
|
|
8
|
+
*/
|
|
9
|
+
export declare function useUpdateOnEvent<T = any>(event: Event<T>, dependencies?: any[], condition?: (payload: T) => boolean): void;
|
|
10
|
+
export declare function useUpdateOnEventBusEvent<T = any>(eventType: ConstructorOf<BasicEvent<T>>, dependencies?: any[], condition?: (payload: T) => boolean): void;
|
|
11
|
+
//# sourceMappingURL=event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/react-hooks/event.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAc,aAAa,EAAE,UAAU,EAAa,MAAM,2BAA2B,CAAC;AAGpG;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,GAAE,GAAG,EAAO,EAAE,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,QAsBvH;AAED,wBAAgB,wBAAwB,CAAC,CAAC,GAAG,GAAG,EAAE,SAAS,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,GAAE,GAAG,EAAO,EAAE,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,QAuBvJ"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useUpdateOnEventBusEvent = exports.useUpdateOnEvent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
6
|
+
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
7
|
+
const injectable_hooks_1 = require("./injectable-hooks");
|
|
8
|
+
/**
|
|
9
|
+
* 在事件来临时更新当前元素
|
|
10
|
+
* 会自动 dispose 监听器
|
|
11
|
+
* @param event 要监听的事件
|
|
12
|
+
* @param dependencies React.useEffect的依赖
|
|
13
|
+
* @param condition 返回 true 时
|
|
14
|
+
*/
|
|
15
|
+
function useUpdateOnEvent(event, dependencies = [], condition) {
|
|
16
|
+
const [, updateState] = react_1.default.useState();
|
|
17
|
+
const forceUpdate = react_1.default.useCallback(() => updateState({}), []);
|
|
18
|
+
react_1.default.useEffect(() => {
|
|
19
|
+
const disposer = new ide_core_common_1.Disposable();
|
|
20
|
+
disposer.addDispose(event((payload) => {
|
|
21
|
+
if (disposer.disposed) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (!condition) {
|
|
25
|
+
forceUpdate();
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
if (condition(payload)) {
|
|
29
|
+
forceUpdate();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
return () => {
|
|
34
|
+
disposer.dispose();
|
|
35
|
+
};
|
|
36
|
+
}, dependencies);
|
|
37
|
+
}
|
|
38
|
+
exports.useUpdateOnEvent = useUpdateOnEvent;
|
|
39
|
+
function useUpdateOnEventBusEvent(eventType, dependencies = [], condition) {
|
|
40
|
+
const [, updateState] = react_1.default.useState();
|
|
41
|
+
const forceUpdate = react_1.default.useCallback(() => updateState({}), []);
|
|
42
|
+
const eventBus = (0, injectable_hooks_1.useInjectable)(ide_core_common_1.IEventBus);
|
|
43
|
+
react_1.default.useEffect(() => {
|
|
44
|
+
const disposer = new ide_core_common_1.Disposable();
|
|
45
|
+
disposer.addDispose(eventBus.on(eventType, (event) => {
|
|
46
|
+
if (disposer.disposed) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (!condition) {
|
|
50
|
+
forceUpdate();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
if (condition(event.payload)) {
|
|
54
|
+
forceUpdate();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
return () => {
|
|
59
|
+
disposer.dispose();
|
|
60
|
+
};
|
|
61
|
+
}, dependencies);
|
|
62
|
+
}
|
|
63
|
+
exports.useUpdateOnEventBusEvent = useUpdateOnEventBusEvent;
|
|
64
|
+
//# sourceMappingURL=event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/react-hooks/event.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAC1B,+DAAoG;AACpG,yDAAmD;AAEnD;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAU,KAAe,EAAE,eAAsB,EAAE,EAAE,SAAmC;IACtH,MAAM,CAAC,EAAE,WAAW,CAAC,GAAG,eAAK,CAAC,QAAQ,EAAO,CAAC;IAC9C,MAAM,WAAW,GAAG,eAAK,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEjE,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,IAAI,4BAAU,EAAE,CAAC;QAClC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAU,EAAE,EAAE;YACvC,IAAI,QAAQ,CAAC,QAAQ,EAAE;gBACrB,OAAO;aACR;YACD,IAAI,CAAC,SAAS,EAAE;gBACd,WAAW,EAAE,CAAC;aACf;iBAAM;gBACL,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE;oBACtB,WAAW,EAAE,CAAC;iBACf;aACF;QACH,CAAC,CAAC,CAAC,CAAC;QACJ,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC,EAAE,YAAY,CAAE,CAAC;AACpB,CAAC;AAtBD,4CAsBC;AAED,SAAgB,wBAAwB,CAAU,SAAuC,EAAE,eAAsB,EAAE,EAAE,SAAmC;IACtJ,MAAM,CAAC,EAAE,WAAW,CAAC,GAAG,eAAK,CAAC,QAAQ,EAAO,CAAC;IAC9C,MAAM,WAAW,GAAG,eAAK,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAc,IAAA,gCAAa,EAAC,2BAAS,CAAC,CAAC;IAErD,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,IAAI,4BAAU,EAAE,CAAC;QAClC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,KAAoB,EAAE,EAAE;YAClE,IAAI,QAAQ,CAAC,QAAQ,EAAE;gBACrB,OAAO;aACR;YACD,IAAI,CAAC,SAAS,EAAE;gBACd,WAAW,EAAE,CAAC;aACf;iBAAM;gBACL,IAAI,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;oBAC5B,WAAW,EAAE,CAAC;iBACf;aACF;QACH,CAAC,CAAC,CAAC,CAAC;QACJ,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC,EAAE,YAAY,CAAC,CAAC;AACnB,CAAC;AAvBD,4DAuBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hot-key.d.ts","sourceRoot":"","sources":["../../src/react-hooks/hot-key.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,YAAa,MAAM,EAAE,WAAW,MAAM,IAAI;yBACzC,MAAM,KAAK,IAAI;aAC3B,MAAM,IAAI;CA6CpB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useHotKey = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const keycode_1 = (0, tslib_1.__importDefault)(require("keycode"));
|
|
7
|
+
// todo: hotkeys 增加类型提示
|
|
8
|
+
// 键位值请查看 https://github.com/timoxley/keycode
|
|
9
|
+
const useHotKey = (hotkeys, handler) => {
|
|
10
|
+
// 初始化函数
|
|
11
|
+
const initializer = (0, react_1.useCallback)(() => {
|
|
12
|
+
return hotkeys.reduce((prev, key) => {
|
|
13
|
+
const keycodeNum = (0, keycode_1.default)(key);
|
|
14
|
+
if (typeof keycodeNum === 'number') {
|
|
15
|
+
prev[keycodeNum] = false;
|
|
16
|
+
}
|
|
17
|
+
return prev;
|
|
18
|
+
}, {});
|
|
19
|
+
}, [hotkeys]);
|
|
20
|
+
const [keyPressRecords, setKeyPressRecords] = (0, react_1.useState)(initializer);
|
|
21
|
+
function onKeyDown(keyCode) {
|
|
22
|
+
setKeyPressRecords((r) => {
|
|
23
|
+
if (keyCode in r) {
|
|
24
|
+
return Object.assign(Object.assign({}, r), { [keyCode]: true });
|
|
25
|
+
}
|
|
26
|
+
return r;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function onKeyUp() {
|
|
30
|
+
// 快捷键匹配触发
|
|
31
|
+
if (Object.values(keyPressRecords).every((n) => n === true)) {
|
|
32
|
+
handler();
|
|
33
|
+
}
|
|
34
|
+
// reset value
|
|
35
|
+
setKeyPressRecords((r) => {
|
|
36
|
+
return Object.keys(keyPressRecords).reduce((prev, keyNum) => {
|
|
37
|
+
prev[keyNum] = false;
|
|
38
|
+
return prev;
|
|
39
|
+
}, {});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
onKeyDown,
|
|
44
|
+
onKeyUp,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
exports.useHotKey = useHotKey;
|
|
48
|
+
//# sourceMappingURL=hot-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hot-key.js","sourceRoot":"","sources":["../../src/react-hooks/hot-key.tsx"],"names":[],"mappings":";;;;AAAA,iCAA8C;AAC9C,mEAA8B;AAE9B,uBAAuB;AACvB,6CAA6C;AACtC,MAAM,SAAS,GAAG,CAAC,OAAiB,EAAE,OAAmB,EAG9D,EAAE;IACF,QAAQ;IACR,MAAM,WAAW,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACnC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YAClC,MAAM,UAAU,GAAG,IAAA,iBAAO,EAAC,GAAG,CAAC,CAAC;YAChC,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;gBAClC,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;aAC1B;YACD,OAAO,IAAI,CAAC;QACd,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC,EAAE,CAAE,OAAO,CAAE,CAAC,CAAC;IAEhB,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAEnD,WAAW,CAAC,CAAC;IAEhB,SAAS,SAAS,CAAC,OAAe;QAChC,kBAAkB,CAAC,CAAC,CAAC,EAAE,EAAE;YACvB,IAAI,OAAO,IAAI,CAAC,EAAE;gBAChB,uCAAY,CAAC,KAAE,CAAC,OAAO,CAAC,EAAE,IAAI,IAAG;aAClC;YACD,OAAO,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;IACL,CAAC;IAED,SAAS,OAAO;QACd,UAAU;QACV,IAAI,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE;YAC3D,OAAO,EAAE,CAAC;SACX;QAED,cAAc;QACd,kBAAkB,CAAC,CAAC,CAAC,EAAE,EAAE;YACvB,OAAO,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;gBAC1D,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;gBACrB,OAAO,IAAI,CAAC;YACd,CAAC,EAAE,EAAE,CAAC,CAAC;QACT,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,SAAS;QACT,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AA/CW,QAAA,SAAS,aA+CpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react-hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./injectable-hooks"), exports);
|
|
5
|
+
(0, tslib_1.__exportStar)(require("./portal-hooks"), exports);
|
|
6
|
+
(0, tslib_1.__exportStar)(require("./event"), exports);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react-hooks/index.ts"],"names":[],"mappings":";;;AAAA,kEAAmC;AACnC,8DAA+B;AAC/B,uDAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectable-hooks.d.ts","sourceRoot":"","sources":["../../src/react-hooks/injectable-hooks.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAY,MAAM,cAAc,CAAC;AAM/C,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAwBxE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useInjectable = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
6
|
+
const react_providers_1 = require("../react-providers");
|
|
7
|
+
function isDisposable(target) {
|
|
8
|
+
return target && target.dispose;
|
|
9
|
+
}
|
|
10
|
+
function useInjectable(Constructor, args) {
|
|
11
|
+
const { injector } = react_1.default.useContext(react_providers_1.ConfigContext);
|
|
12
|
+
const instance = react_1.default.useMemo(() => {
|
|
13
|
+
return injector.get(Constructor, args);
|
|
14
|
+
}, [injector, Constructor]);
|
|
15
|
+
react_1.default.useEffect(() => {
|
|
16
|
+
return () => {
|
|
17
|
+
// 如果这是多例模式,DI 中不会留有这个实例对象
|
|
18
|
+
// 由于实例可能存在在父 injector 中,需要做一下递归判断
|
|
19
|
+
let curr = injector;
|
|
20
|
+
while (curr && !curr.hasInstance(instance)) {
|
|
21
|
+
curr = curr.parent;
|
|
22
|
+
}
|
|
23
|
+
if (!curr) {
|
|
24
|
+
if (isDisposable(instance)) {
|
|
25
|
+
instance.dispose();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}, [instance]);
|
|
30
|
+
return instance;
|
|
31
|
+
}
|
|
32
|
+
exports.useInjectable = useInjectable;
|
|
33
|
+
//# sourceMappingURL=injectable-hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectable-hooks.js","sourceRoot":"","sources":["../../src/react-hooks/injectable-hooks.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAE1B,wDAAmD;AAGnD,SAAS,YAAY,CAAC,MAAW;IAC/B,OAAO,MAAM,IAAK,MAAc,CAAC,OAAO,CAAC;AAC3C,CAAC;AAED,SAAgB,aAAa,CAAU,WAAkB,EAAE,IAAU;IACnE,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAK,CAAC,UAAU,CAAC,+BAAa,CAAC,CAAC;IAErD,MAAM,QAAQ,GAAG,eAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAClC,OAAO,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IAE5B,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,GAAG,EAAE;YACV,0BAA0B;YAC1B,kCAAkC;YAClC,IAAI,IAAI,GAAyB,QAAQ,CAAC;YAC1C,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE;gBAC1C,IAAI,GAAI,IAAY,CAAC,MAAM,CAAC;aAC7B;YACD,IAAI,CAAC,IAAI,EAAE;gBACT,IAAI,YAAY,CAAC,QAAQ,CAAC,EAAE;oBAC1B,QAAQ,CAAC,OAAO,EAAE,CAAC;iBACpB;aACF;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,QAAQ,CAAC;AAClB,CAAC;AAxBD,sCAwBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-hooks.d.ts","sourceRoot":"","sources":["../../src/react-hooks/portal-hooks.tsx"],"names":[],"mappings":"AAQA,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,kBA6BnC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePortal = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function createRootElement(id) {
|
|
6
|
+
const rootContainer = document.createElement('div');
|
|
7
|
+
rootContainer.setAttribute('id', id);
|
|
8
|
+
return rootContainer;
|
|
9
|
+
}
|
|
10
|
+
function usePortal(id) {
|
|
11
|
+
const rootElemRef = (0, react_1.useRef)(null);
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
const existingParent = document.querySelector(`#${id}`);
|
|
14
|
+
const parentElem = existingParent || createRootElement(id);
|
|
15
|
+
if (!existingParent) {
|
|
16
|
+
document.body.appendChild(parentElem);
|
|
17
|
+
}
|
|
18
|
+
if (rootElemRef.current) {
|
|
19
|
+
parentElem.appendChild(rootElemRef.current);
|
|
20
|
+
}
|
|
21
|
+
return () => {
|
|
22
|
+
if (rootElemRef.current) {
|
|
23
|
+
rootElemRef.current.remove();
|
|
24
|
+
}
|
|
25
|
+
if (parentElem.childNodes.length === -1) {
|
|
26
|
+
parentElem.remove();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}, []);
|
|
30
|
+
if (!rootElemRef.current) {
|
|
31
|
+
rootElemRef.current = document.createElement('div');
|
|
32
|
+
}
|
|
33
|
+
return rootElemRef.current;
|
|
34
|
+
}
|
|
35
|
+
exports.usePortal = usePortal;
|
|
36
|
+
//# sourceMappingURL=portal-hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-hooks.js","sourceRoot":"","sources":["../../src/react-hooks/portal-hooks.tsx"],"names":[],"mappings":";;;AAAA,iCAA0C;AAE1C,SAAS,iBAAiB,CAAC,EAAU;IACnC,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,aAAa,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACrC,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,SAAgB,SAAS,CAAC,EAAU;IAClC,MAAM,WAAW,GAAG,IAAA,cAAM,EAAwB,IAAI,CAAC,CAAC;IAExD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACxD,MAAM,UAAU,GAAG,cAAc,IAAI,iBAAiB,CAAC,EAAE,CAAC,CAAC;QAE3D,IAAI,CAAC,cAAc,EAAE;YACnB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SACvC;QAED,IAAI,WAAW,CAAC,OAAO,EAAE;YACvB,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;SAC7C;QAED,OAAO,GAAG,EAAE;YACV,IAAI,WAAW,CAAC,OAAO,EAAE;gBACvB,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;aAC9B;YACD,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;gBACvC,UAAU,CAAC,MAAM,EAAE,CAAC;aACrB;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;QACxB,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KACrD;IACD,OAAO,WAAW,CAAC,OAAO,CAAC;AAC7B,CAAC;AA7BD,8BA6BC"}
|