@difizen/libro-common 0.3.4 → 1.0.0
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/es/app/app.d.ts +7 -0
- package/es/app/app.d.ts.map +1 -0
- package/es/app/app.js +51 -0
- package/es/app/file-tree/file-selection.d.ts +15 -0
- package/es/app/file-tree/file-selection.d.ts.map +1 -0
- package/es/app/file-tree/file-selection.js +38 -0
- package/es/app/file-tree/file-service.d.ts +19 -0
- package/es/app/file-tree/file-service.d.ts.map +1 -0
- package/es/app/file-tree/file-service.js +105 -0
- package/es/app/file-tree/file-tree-component.d.ts +6 -0
- package/es/app/file-tree/file-tree-component.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-component.js +14 -0
- package/es/app/file-tree/file-tree-icon.d.ts +3 -0
- package/es/app/file-tree/file-tree-icon.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-icon.js +14 -0
- package/es/app/file-tree/file-tree-label-provider.d.ts +18 -0
- package/es/app/file-tree/file-tree-label-provider.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-label-provider.js +54 -0
- package/es/app/file-tree/file-tree-model.d.ts +40 -0
- package/es/app/file-tree/file-tree-model.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-model.js +358 -0
- package/es/app/file-tree/file-tree-protocol.d.ts +12 -0
- package/es/app/file-tree/file-tree-protocol.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-protocol.js +33 -0
- package/es/app/file-tree/file-tree-view.d.ts +51 -0
- package/es/app/file-tree/file-tree-view.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-view.js +420 -0
- package/es/app/file-tree/file-tree.d.ts +48 -0
- package/es/app/file-tree/file-tree.d.ts.map +1 -0
- package/es/app/file-tree/file-tree.js +279 -0
- package/es/app/file-tree/files.d.ts +575 -0
- package/es/app/file-tree/files.d.ts.map +1 -0
- package/es/app/file-tree/files.js +478 -0
- package/es/app/file-tree/filesystem-utils.d.ts +14 -0
- package/es/app/file-tree/filesystem-utils.d.ts.map +1 -0
- package/es/app/file-tree/filesystem-utils.js +20 -0
- package/es/app/file-tree/index.d.ts +7 -0
- package/es/app/file-tree/index.d.ts.map +1 -0
- package/es/app/file-tree/index.js +6 -0
- package/es/app/file-tree/module.d.ts +3 -0
- package/es/app/file-tree/module.d.ts.map +1 -0
- package/es/app/file-tree/module.js +18 -0
- package/es/app/file-tree/selection-command-handler.d.ts +25 -0
- package/es/app/file-tree/selection-command-handler.d.ts.map +1 -0
- package/es/app/file-tree/selection-command-handler.js +124 -0
- package/es/app/file-tree/style/file-icon.less +51 -0
- package/es/app/index.d.ts +15 -0
- package/es/app/index.d.ts.map +1 -0
- package/es/app/index.js +22 -0
- package/es/app/label/index.d.ts +4 -0
- package/es/app/label/index.d.ts.map +1 -0
- package/es/app/label/index.js +4 -0
- package/es/app/label/label-provider.d.ts +169 -0
- package/es/app/label/label-provider.d.ts.map +1 -0
- package/es/app/label/label-provider.js +488 -0
- package/es/app/menu/index.d.ts +8 -0
- package/es/app/menu/index.d.ts.map +1 -0
- package/es/app/menu/index.js +21 -0
- package/es/app/menu/menu-bar-render.d.ts +11 -0
- package/es/app/menu/menu-bar-render.d.ts.map +1 -0
- package/es/app/menu/menu-bar-render.js +46 -0
- package/es/app/menu/menu-color-registry.d.ts +6 -0
- package/es/app/menu/menu-color-registry.d.ts.map +1 -0
- package/es/app/menu/menu-color-registry.js +59 -0
- package/es/app/menu/menu-context.d.ts +13 -0
- package/es/app/menu/menu-context.d.ts.map +1 -0
- package/es/app/menu/menu-context.js +7 -0
- package/es/app/menu/menu-item-keeper.d.ts +12 -0
- package/es/app/menu/menu-item-keeper.d.ts.map +1 -0
- package/es/app/menu/menu-item-keeper.js +68 -0
- package/es/app/menu/menu-item-render.d.ts +4 -0
- package/es/app/menu/menu-item-render.d.ts.map +1 -0
- package/es/app/menu/menu-item-render.js +13 -0
- package/es/app/menu/menu-protocol.d.ts +18 -0
- package/es/app/menu/menu-protocol.d.ts.map +1 -0
- package/es/app/menu/menu-protocol.js +5 -0
- package/es/app/menu/menu-render.d.ts +30 -0
- package/es/app/menu/menu-render.d.ts.map +1 -0
- package/es/app/menu/menu-render.js +85 -0
- package/es/app/menu/menu.d.ts +47 -0
- package/es/app/menu/menu.d.ts.map +1 -0
- package/es/app/menu/menu.js +234 -0
- package/es/app/modal/index.d.ts +9 -0
- package/es/app/modal/index.d.ts.map +1 -0
- package/es/app/modal/index.js +19 -0
- package/es/app/modal/modal-contribution.d.ts +7 -0
- package/es/app/modal/modal-contribution.d.ts.map +1 -0
- package/es/app/modal/modal-contribution.js +34 -0
- package/es/app/modal/modal-protocol.d.ts +22 -0
- package/es/app/modal/modal-protocol.d.ts.map +1 -0
- package/es/app/modal/modal-protocol.js +13 -0
- package/es/app/modal/modal-render.d.ts +6 -0
- package/es/app/modal/modal-render.d.ts.map +1 -0
- package/es/app/modal/modal-render.js +44 -0
- package/es/app/modal/modal-service.d.ts +41 -0
- package/es/app/modal/modal-service.d.ts.map +1 -0
- package/es/app/modal/modal-service.js +200 -0
- package/es/app/notification/index.d.ts +5 -0
- package/es/app/notification/index.d.ts.map +1 -0
- package/es/app/notification/index.js +5 -0
- package/es/app/notification/index.less +20 -0
- package/es/app/notification/protocol.d.ts +15 -0
- package/es/app/notification/protocol.d.ts.map +1 -0
- package/es/app/notification/protocol.js +1 -0
- package/es/app/notification/service.d.ts +11 -0
- package/es/app/notification/service.d.ts.map +1 -0
- package/es/app/notification/service.js +87 -0
- package/es/app/style/index.less +181 -0
- package/es/app/style/style-protocol.d.ts +10 -0
- package/es/app/style/style-protocol.d.ts.map +1 -0
- package/es/app/style/style-protocol.js +11 -0
- package/es/app/toolbar/index.d.ts +7 -0
- package/es/app/toolbar/index.d.ts.map +1 -0
- package/es/app/toolbar/index.js +15 -0
- package/es/app/toolbar/index.less +40 -0
- package/es/app/toolbar/toolbar-item-keeper.d.ts +12 -0
- package/es/app/toolbar/toolbar-item-keeper.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-item-keeper.js +49 -0
- package/es/app/toolbar/toolbar-item-render.d.ts +13 -0
- package/es/app/toolbar/toolbar-item-render.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-item-render.js +14 -0
- package/es/app/toolbar/toolbar-protocol.d.ts +9 -0
- package/es/app/toolbar/toolbar-protocol.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-protocol.js +1 -0
- package/es/app/toolbar/toolbar-render.d.ts +29 -0
- package/es/app/toolbar/toolbar-render.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-render.js +93 -0
- package/es/app/toolbar/toolbar-visible-render.d.ts +8 -0
- package/es/app/toolbar/toolbar-visible-render.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-visible-render.js +12 -0
- package/es/app/toolbar/toolbar.d.ts +51 -0
- package/es/app/toolbar/toolbar.d.ts.map +1 -0
- package/es/app/toolbar/toolbar.js +275 -0
- package/es/app/tree/components/index.d.ts +3 -0
- package/es/app/tree/components/index.d.ts.map +1 -0
- package/es/app/tree/components/index.js +20 -0
- package/es/app/tree/components/tree-ident.d.ts +4 -0
- package/es/app/tree/components/tree-ident.d.ts.map +1 -0
- package/es/app/tree/components/tree-ident.js +40 -0
- package/es/app/tree/components/tree-node-caption-affix.d.ts +4 -0
- package/es/app/tree/components/tree-node-caption-affix.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-caption-affix.js +39 -0
- package/es/app/tree/components/tree-node-caption.d.ts +3 -0
- package/es/app/tree/components/tree-node-caption.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-caption.js +103 -0
- package/es/app/tree/components/tree-node-expansion.d.ts +3 -0
- package/es/app/tree/components/tree-node-expansion.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-expansion.js +36 -0
- package/es/app/tree/components/tree-node-icon-decorator.d.ts +4 -0
- package/es/app/tree/components/tree-node-icon-decorator.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-icon-decorator.js +46 -0
- package/es/app/tree/components/tree-node-icon.d.ts +2 -0
- package/es/app/tree/components/tree-node-icon.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-icon.js +3 -0
- package/es/app/tree/components/tree-node-tail-decoration.d.ts +3 -0
- package/es/app/tree/components/tree-node-tail-decoration.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-tail-decoration.js +39 -0
- package/es/app/tree/components/tree-node.d.ts +4 -0
- package/es/app/tree/components/tree-node.d.ts.map +1 -0
- package/es/app/tree/components/tree-node.js +40 -0
- package/es/app/tree/components/tree-switch-icon.d.ts +4 -0
- package/es/app/tree/components/tree-switch-icon.d.ts.map +1 -0
- package/es/app/tree/components/tree-switch-icon.js +14 -0
- package/es/app/tree/index.d.ts +16 -0
- package/es/app/tree/index.d.ts.map +1 -0
- package/es/app/tree/index.js +15 -0
- package/es/app/tree/module.d.ts +5 -0
- package/es/app/tree/module.d.ts.map +1 -0
- package/es/app/tree/module.js +19 -0
- package/es/app/tree/style/index.less +206 -0
- package/es/app/tree/style/tree-decorator.less +65 -0
- package/es/app/tree/tree-decorator.d.ts +141 -0
- package/es/app/tree/tree-decorator.d.ts.map +1 -0
- package/es/app/tree/tree-decorator.js +248 -0
- package/es/app/tree/tree-expansion.d.ts +69 -0
- package/es/app/tree/tree-expansion.d.ts.map +1 -0
- package/es/app/tree/tree-expansion.js +250 -0
- package/es/app/tree/tree-impl.d.ts +40 -0
- package/es/app/tree/tree-impl.d.ts.map +1 -0
- package/es/app/tree/tree-impl.js +292 -0
- package/es/app/tree/tree-iterator.d.ts +94 -0
- package/es/app/tree/tree-iterator.d.ts.map +1 -0
- package/es/app/tree/tree-iterator.js +368 -0
- package/es/app/tree/tree-label-provider.d.ts +9 -0
- package/es/app/tree/tree-label-provider.d.ts.map +1 -0
- package/es/app/tree/tree-label-provider.js +39 -0
- package/es/app/tree/tree-model.d.ts +163 -0
- package/es/app/tree/tree-model.d.ts.map +1 -0
- package/es/app/tree/tree-model.js +616 -0
- package/es/app/tree/tree-navigation.d.ts +11 -0
- package/es/app/tree/tree-navigation.d.ts.map +1 -0
- package/es/app/tree/tree-navigation.js +54 -0
- package/es/app/tree/tree-protocol.d.ts +67 -0
- package/es/app/tree/tree-protocol.d.ts.map +1 -0
- package/es/app/tree/tree-protocol.js +24 -0
- package/es/app/tree/tree-selection-impl.d.ts +45 -0
- package/es/app/tree/tree-selection-impl.d.ts.map +1 -0
- package/es/app/tree/tree-selection-impl.js +192 -0
- package/es/app/tree/tree-selection-state.d.ts +48 -0
- package/es/app/tree/tree-selection-state.d.ts.map +1 -0
- package/es/app/tree/tree-selection-state.js +276 -0
- package/es/app/tree/tree-selection.d.ts +79 -0
- package/es/app/tree/tree-selection.d.ts.map +1 -0
- package/es/app/tree/tree-selection.js +72 -0
- package/es/app/tree/tree-view-decoration.d.ts +286 -0
- package/es/app/tree/tree-view-decoration.d.ts.map +1 -0
- package/es/app/tree/tree-view-decoration.js +127 -0
- package/es/app/tree/tree.d.ts +166 -0
- package/es/app/tree/tree.d.ts.map +1 -0
- package/es/app/tree/tree.js +155 -0
- package/es/app/tree/view/index.d.ts +4 -0
- package/es/app/tree/view/index.d.ts.map +1 -0
- package/es/app/tree/view/index.js +3 -0
- package/es/app/tree/view/index.less +3 -0
- package/es/app/tree/view/tree-view-decorator.d.ts +38 -0
- package/es/app/tree/view/tree-view-decorator.d.ts.map +1 -0
- package/es/app/tree/view/tree-view-decorator.js +128 -0
- package/es/app/tree/view/tree-view-module.d.ts +3 -0
- package/es/app/tree/view/tree-view-module.d.ts.map +1 -0
- package/es/app/tree/view/tree-view-module.js +8 -0
- package/es/app/tree/view/tree-view-selection.d.ts +12 -0
- package/es/app/tree/view/tree-view-selection.d.ts.map +1 -0
- package/es/app/tree/view/tree-view-selection.js +23 -0
- package/es/app/tree/view/tree-view.d.ts +262 -0
- package/es/app/tree/view/tree-view.d.ts.map +1 -0
- package/es/app/tree/view/tree-view.js +943 -0
- package/es/app/typings/index.d.ts +7 -0
- package/es/app/view/box/index.d.ts +19 -0
- package/es/app/view/box/index.d.ts.map +1 -0
- package/es/app/view/box/index.js +76 -0
- package/es/app/view/components/index.d.ts +2 -0
- package/es/app/view/components/index.d.ts.map +1 -0
- package/es/app/view/components/index.js +1 -0
- package/es/app/view/components/loading/index.d.ts +3 -0
- package/es/app/view/components/loading/index.d.ts.map +1 -0
- package/es/app/view/components/loading/index.js +7 -0
- package/es/app/view/components/loading/index.less +10 -0
- package/es/app/view/flex/index.d.ts +16 -0
- package/es/app/view/flex/index.d.ts.map +1 -0
- package/es/app/view/flex/index.js +67 -0
- package/es/app/view/flex/index.less +3 -0
- package/es/app/view/header/header-view.d.ts +12 -0
- package/es/app/view/header/header-view.d.ts.map +1 -0
- package/es/app/view/header/header-view.js +68 -0
- package/es/app/view/header/index.d.ts +4 -0
- package/es/app/view/header/index.d.ts.map +1 -0
- package/es/app/view/header/index.js +23 -0
- package/es/app/view/header/index.less +43 -0
- package/es/app/view/index.d.ts +8 -0
- package/es/app/view/index.d.ts.map +1 -0
- package/es/app/view/index.js +11 -0
- package/es/app/view/tab/card-tab-view.d.ts +13 -0
- package/es/app/view/tab/card-tab-view.d.ts.map +1 -0
- package/es/app/view/tab/card-tab-view.js +49 -0
- package/es/app/view/tab/index.d.ts +4 -0
- package/es/app/view/tab/index.d.ts.map +1 -0
- package/es/app/view/tab/index.js +3 -0
- package/es/app/view/tab/index.less +70 -0
- package/es/app/view/tab/side-tab-view.d.ts +23 -0
- package/es/app/view/tab/side-tab-view.d.ts.map +1 -0
- package/es/app/view/tab/side-tab-view.js +121 -0
- package/es/app/view/tab/tab-menu.d.ts +9 -0
- package/es/app/view/tab/tab-menu.d.ts.map +1 -0
- package/es/app/view/tab/tab-menu.js +34 -0
- package/es/app/view/tab/tab-protocol.d.ts +3 -0
- package/es/app/view/tab/tab-protocol.d.ts.map +1 -0
- package/es/app/view/tab/tab-protocol.js +1 -0
- package/es/app/view/tab/tab-view.d.ts +27 -0
- package/es/app/view/tab/tab-view.d.ts.map +1 -0
- package/es/app/view/tab/tab-view.js +169 -0
- package/es/common/assert.d.ts +5 -0
- package/es/common/assert.d.ts.map +1 -0
- package/es/common/assert.js +13 -0
- package/es/common/cancellation.d.ts +20 -0
- package/es/common/cancellation.d.ts.map +1 -0
- package/es/common/cancellation.js +143 -0
- package/es/common/charCode.d.ts +416 -0
- package/es/common/charCode.d.ts.map +1 -0
- package/es/common/charCode.js +604 -0
- package/es/common/collections.d.ts +44 -0
- package/es/common/collections.d.ts.map +1 -0
- package/es/common/collections.js +220 -0
- package/es/common/deferred.d.ts +10 -0
- package/es/common/deferred.d.ts.map +1 -0
- package/es/common/deferred.js +21 -0
- package/es/common/disposable-collection.d.ts +24 -0
- package/es/common/disposable-collection.d.ts.map +1 -0
- package/es/common/disposable-collection.js +117 -0
- package/es/common/disposable.d.ts +19 -0
- package/es/common/disposable.d.ts.map +1 -0
- package/es/common/disposable.js +23 -0
- package/es/common/event.d.ts +75 -0
- package/es/common/event.d.ts.map +1 -0
- package/es/common/event.js +313 -0
- package/es/common/index.d.ts +27 -0
- package/es/common/index.d.ts.map +1 -0
- package/es/common/index.js +26 -0
- package/es/common/iterator.d.ts +39 -0
- package/es/common/iterator.d.ts.map +1 -0
- package/es/common/iterator.js +389 -0
- package/es/common/linkedList.d.ts +16 -0
- package/es/common/linkedList.d.ts.map +1 -0
- package/es/common/linkedList.js +159 -0
- package/es/common/objects.d.ts +36 -0
- package/es/common/objects.d.ts.map +1 -0
- package/es/common/objects.js +232 -0
- package/es/common/observable-disposable.d.ts +12 -0
- package/es/common/observable-disposable.d.ts.map +1 -0
- package/es/common/observable-disposable.js +1 -0
- package/es/common/path.d.ts +59 -0
- package/es/common/path.d.ts.map +1 -0
- package/es/common/path.js +258 -0
- package/es/common/platform.d.ts +72 -0
- package/es/common/platform.d.ts.map +1 -0
- package/es/common/platform.js +213 -0
- package/es/common/priority.d.ts +23 -0
- package/es/common/priority.d.ts.map +1 -0
- package/es/common/priority.js +97 -0
- package/es/common/promise-util.d.ts +8 -0
- package/es/common/promise-util.d.ts.map +1 -0
- package/es/common/promise-util.js +63 -0
- package/es/common/stopwatch.d.ts +11 -0
- package/es/common/stopwatch.d.ts.map +1 -0
- package/es/common/stopwatch.js +47 -0
- package/es/common/strings.d.ts +102 -0
- package/es/common/strings.d.ts.map +1 -0
- package/es/common/strings.js +433 -0
- package/es/common/types.d.ts +16 -0
- package/es/common/types.d.ts.map +1 -0
- package/es/common/types.js +13 -0
- package/es/common/uint.d.ts +32 -0
- package/es/common/uint.d.ts.map +1 -0
- package/es/common/uint.js +56 -0
- package/es/common/uri.d.ts +56 -0
- package/es/common/uri.d.ts.map +1 -0
- package/es/common/uri.js +244 -0
- package/es/common/utils.d.ts +4 -0
- package/es/common/utils.d.ts.map +1 -0
- package/es/common/utils.js +26 -0
- package/es/common/valueTypes.d.ts +102 -0
- package/es/common/valueTypes.d.ts.map +1 -0
- package/es/common/valueTypes.js +270 -0
- package/es/common/vscode-uri/char-code.d.ts +416 -0
- package/es/common/vscode-uri/char-code.d.ts.map +1 -0
- package/es/common/vscode-uri/char-code.js +608 -0
- package/es/common/vscode-uri/index.d.ts +6 -0
- package/es/common/vscode-uri/index.d.ts.map +1 -0
- package/es/common/vscode-uri/index.js +8 -0
- package/es/common/vscode-uri/platform.d.ts +2 -0
- package/es/common/vscode-uri/platform.d.ts.map +1 -0
- package/es/common/vscode-uri/platform.js +17 -0
- package/es/common/vscode-uri/uri.d.ts +155 -0
- package/es/common/vscode-uri/uri.d.ts.map +1 -0
- package/es/common/vscode-uri/uri.js +637 -0
- package/es/common/vscode-uri/utils.d.ts +59 -0
- package/es/common/vscode-uri/utils.d.ts.map +1 -0
- package/es/common/vscode-uri/utils.js +61 -0
- package/es/common/wait-until-event.d.ts +17 -0
- package/es/common/wait-until-event.d.ts.map +1 -0
- package/es/common/wait-until-event.js +65 -0
- package/es/core/application/application-protocol.d.ts +19 -0
- package/es/core/application/application-protocol.d.ts.map +1 -0
- package/es/core/application/application-protocol.js +4 -0
- package/es/core/application/application-state.d.ts +24 -0
- package/es/core/application/application-state.d.ts.map +1 -0
- package/es/core/application/application-state.js +87 -0
- package/es/core/application/application.d.ts +86 -0
- package/es/core/application/application.d.ts.map +1 -0
- package/es/core/application/application.js +554 -0
- package/es/core/application/default-window-service.d.ts +27 -0
- package/es/core/application/default-window-service.d.ts.map +1 -0
- package/es/core/application/default-window-service.js +83 -0
- package/es/core/application/index.d.ts +5 -0
- package/es/core/application/index.d.ts.map +1 -0
- package/es/core/application/index.js +7 -0
- package/es/core/application/mock-window-service.d.ts +8 -0
- package/es/core/application/mock-window-service.d.ts.map +1 -0
- package/es/core/application/mock-window-service.js +31 -0
- package/es/core/browser.d.ts +21 -0
- package/es/core/browser.d.ts.map +1 -0
- package/es/core/browser.js +118 -0
- package/es/core/command/command-protocol.d.ts +124 -0
- package/es/core/command/command-protocol.d.ts.map +1 -0
- package/es/core/command/command-protocol.js +44 -0
- package/es/core/command/command-registry.d.ts +144 -0
- package/es/core/command/command-registry.d.ts.map +1 -0
- package/es/core/command/command-registry.js +595 -0
- package/es/core/command/index.d.ts +5 -0
- package/es/core/command/index.d.ts.map +1 -0
- package/es/core/command/index.js +5 -0
- package/es/core/common/debug.d.ts +5 -0
- package/es/core/common/debug.d.ts.map +1 -0
- package/es/core/common/debug.js +3 -0
- package/es/core/common/index.d.ts +6 -0
- package/es/core/common/index.d.ts.map +1 -0
- package/es/core/common/index.js +17 -0
- package/es/core/common/storage-protocol.d.ts +21 -0
- package/es/core/common/storage-protocol.d.ts.map +1 -0
- package/es/core/common/storage-protocol.js +5 -0
- package/es/core/common/storage-service.d.ts +23 -0
- package/es/core/common/storage-service.d.ts.map +1 -0
- package/es/core/common/storage-service.js +91 -0
- package/es/core/components/application.d.ts +16 -0
- package/es/core/components/application.d.ts.map +1 -0
- package/es/core/components/application.js +159 -0
- package/es/core/components/context.d.ts +19 -0
- package/es/core/components/context.d.ts.map +1 -0
- package/es/core/components/context.js +101 -0
- package/es/core/components/hooks.d.ts +4 -0
- package/es/core/components/hooks.d.ts.map +1 -0
- package/es/core/components/hooks.js +14 -0
- package/es/core/components/index.d.ts +7 -0
- package/es/core/components/index.d.ts.map +1 -0
- package/es/core/components/index.js +8 -0
- package/es/core/components/index.less +28 -0
- package/es/core/components/root-view-render.d.ts +5 -0
- package/es/core/components/root-view-render.d.ts.map +1 -0
- package/es/core/components/root-view-render.js +14 -0
- package/es/core/configuration/configuration-cache.d.ts +15 -0
- package/es/core/configuration/configuration-cache.d.ts.map +1 -0
- package/es/core/configuration/configuration-cache.js +67 -0
- package/es/core/configuration/configuration-protocol.d.ts +46 -0
- package/es/core/configuration/configuration-protocol.d.ts.map +1 -0
- package/es/core/configuration/configuration-protocol.js +1 -0
- package/es/core/configuration/configuration-provider.d.ts +46 -0
- package/es/core/configuration/configuration-provider.d.ts.map +1 -0
- package/es/core/configuration/configuration-provider.js +95 -0
- package/es/core/configuration/configuration-registry.d.ts +53 -0
- package/es/core/configuration/configuration-registry.d.ts.map +1 -0
- package/es/core/configuration/configuration-registry.js +360 -0
- package/es/core/configuration/configuration-render-registry.d.ts +35 -0
- package/es/core/configuration/configuration-render-registry.d.ts.map +1 -0
- package/es/core/configuration/configuration-render-registry.js +118 -0
- package/es/core/configuration/configuration-service.d.ts +46 -0
- package/es/core/configuration/configuration-service.d.ts.map +1 -0
- package/es/core/configuration/configuration-service.js +411 -0
- package/es/core/configuration/configuration-storage.d.ts +19 -0
- package/es/core/configuration/configuration-storage.d.ts.map +1 -0
- package/es/core/configuration/configuration-storage.js +15 -0
- package/es/core/configuration/hooks.d.ts +3 -0
- package/es/core/configuration/hooks.d.ts.map +1 -0
- package/es/core/configuration/hooks.js +60 -0
- package/es/core/configuration/index.d.ts +11 -0
- package/es/core/configuration/index.d.ts.map +1 -0
- package/es/core/configuration/index.js +10 -0
- package/es/core/configuration/module.d.ts +3 -0
- package/es/core/configuration/module.d.ts.map +1 -0
- package/es/core/configuration/module.js +8 -0
- package/es/core/configuration/typings.d.ts +1 -0
- package/es/core/configuration/validation.d.ts +12 -0
- package/es/core/configuration/validation.d.ts.map +1 -0
- package/es/core/configuration/validation.js +45 -0
- package/es/core/context/data-context-manager.d.ts +16 -0
- package/es/core/context/data-context-manager.d.ts.map +1 -0
- package/es/core/context/data-context-manager.js +80 -0
- package/es/core/context/data-context-protocol.d.ts +16 -0
- package/es/core/context/data-context-protocol.d.ts.map +1 -0
- package/es/core/context/data-context-protocol.js +10 -0
- package/es/core/context/data-context.d.ts +7 -0
- package/es/core/context/data-context.d.ts.map +1 -0
- package/es/core/context/data-context.js +32 -0
- package/es/core/context/index.d.ts +6 -0
- package/es/core/context/index.d.ts.map +1 -0
- package/es/core/context/index.js +12 -0
- package/es/core/index.d.ts +32 -0
- package/es/core/index.d.ts.map +1 -0
- package/es/core/index.js +42 -0
- package/es/core/keybinding/context-key-service.d.ts +22 -0
- package/es/core/keybinding/context-key-service.d.ts.map +1 -0
- package/es/core/keybinding/context-key-service.js +79 -0
- package/es/core/keybinding/index.d.ts +6 -0
- package/es/core/keybinding/index.d.ts.map +1 -0
- package/es/core/keybinding/index.js +5 -0
- package/es/core/keybinding/keybinding-proocol.d.ts +14 -0
- package/es/core/keybinding/keybinding-proocol.d.ts.map +1 -0
- package/es/core/keybinding/keybinding-proocol.js +5 -0
- package/es/core/keybinding/keybinding.d.ts +333 -0
- package/es/core/keybinding/keybinding.d.ts.map +1 -0
- package/es/core/keybinding/keybinding.js +912 -0
- package/es/core/keybinding/module.d.ts +3 -0
- package/es/core/keybinding/module.d.ts.map +1 -0
- package/es/core/keybinding/module.js +12 -0
- package/es/core/keybinding/vs/configuration/configuration.d.ts +129 -0
- package/es/core/keybinding/vs/configuration/configuration.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/configuration.js +328 -0
- package/es/core/keybinding/vs/configuration/configurationModels.d.ts +138 -0
- package/es/core/keybinding/vs/configuration/configurationModels.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/configurationModels.js +974 -0
- package/es/core/keybinding/vs/configuration/configurationRegistry.d.ts +145 -0
- package/es/core/keybinding/vs/configuration/configurationRegistry.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/configurationRegistry.js +500 -0
- package/es/core/keybinding/vs/configuration/configurationService.d.ts +36 -0
- package/es/core/keybinding/vs/configuration/configurationService.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/configurationService.js +161 -0
- package/es/core/keybinding/vs/configuration/json.d.ts +216 -0
- package/es/core/keybinding/vs/configuration/json.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/json.js +1303 -0
- package/es/core/keybinding/vs/contextKeyService.d.ts +73 -0
- package/es/core/keybinding/vs/contextKeyService.d.ts.map +1 -0
- package/es/core/keybinding/vs/contextKeyService.js +755 -0
- package/es/core/keybinding/vs/contextkey.d.ts +338 -0
- package/es/core/keybinding/vs/contextkey.d.ts.map +1 -0
- package/es/core/keybinding/vs/contextkey.js +1551 -0
- package/es/core/keybinding/vs/contextkeys.d.ts +10 -0
- package/es/core/keybinding/vs/contextkeys.d.ts.map +1 -0
- package/es/core/keybinding/vs/contextkeys.js +16 -0
- package/es/core/keybinding/vs/jsonContributionRegistry.d.ts +25 -0
- package/es/core/keybinding/vs/jsonContributionRegistry.d.ts.map +1 -0
- package/es/core/keybinding/vs/jsonContributionRegistry.js +52 -0
- package/es/core/keybinding/vs/jsonSchema.d.ts +65 -0
- package/es/core/keybinding/vs/jsonSchema.d.ts.map +1 -0
- package/es/core/keybinding/vs/jsonSchema.js +0 -0
- package/es/core/keybinding/vs/platform.d.ts +21 -0
- package/es/core/keybinding/vs/platform.d.ts.map +1 -0
- package/es/core/keybinding/vs/platform.js +39 -0
- package/es/core/keyboard/browser-keyboard-layout-provider.d.ts +101 -0
- package/es/core/keyboard/browser-keyboard-layout-provider.d.ts.map +1 -0
- package/es/core/keyboard/browser-keyboard-layout-provider.js +642 -0
- package/es/core/keyboard/index.d.ts +5 -0
- package/es/core/keyboard/index.d.ts.map +1 -0
- package/es/core/keyboard/index.js +4 -0
- package/es/core/keyboard/keyboard-layout-service.d.ts +51 -0
- package/es/core/keyboard/keyboard-layout-service.d.ts.map +1 -0
- package/es/core/keyboard/keyboard-layout-service.js +697 -0
- package/es/core/keyboard/keyboard-protocol.d.ts +26 -0
- package/es/core/keyboard/keyboard-protocol.d.ts.map +1 -0
- package/es/core/keyboard/keyboard-protocol.js +5 -0
- package/es/core/keyboard/keys.d.ts +254 -0
- package/es/core/keyboard/keys.d.ts.map +1 -0
- package/es/core/keyboard/keys.js +1070 -0
- package/es/core/keyboard/layouts/cs-Czech-mac.d.ts +269 -0
- package/es/core/keyboard/layouts/cs-Czech-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/cs-Czech-mac.js +267 -0
- package/es/core/keyboard/layouts/cs-Czech-mac.json +1 -0
- package/es/core/keyboard/layouts/cs-Czech-pc.d.ts +291 -0
- package/es/core/keyboard/layouts/cs-Czech-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/cs-Czech-pc.js +289 -0
- package/es/core/keyboard/layouts/cs-Czech-pc.json +1 -0
- package/es/core/keyboard/layouts/da-Danish-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/da-Danish-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/da-Danish-mac.js +296 -0
- package/es/core/keyboard/layouts/da-Danish-mac.json +1 -0
- package/es/core/keyboard/layouts/da-Danish-pc.d.ts +270 -0
- package/es/core/keyboard/layouts/da-Danish-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/da-Danish-pc.js +268 -0
- package/es/core/keyboard/layouts/da-Danish-pc.json +1 -0
- package/es/core/keyboard/layouts/de-German-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/de-German-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/de-German-mac.js +296 -0
- package/es/core/keyboard/layouts/de-German-mac.json +1 -0
- package/es/core/keyboard/layouts/de-German-pc.d.ts +270 -0
- package/es/core/keyboard/layouts/de-German-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/de-German-pc.js +268 -0
- package/es/core/keyboard/layouts/de-German-pc.json +1 -0
- package/es/core/keyboard/layouts/de-Swiss_German-mac.d.ts +296 -0
- package/es/core/keyboard/layouts/de-Swiss_German-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/de-Swiss_German-mac.js +294 -0
- package/es/core/keyboard/layouts/de-Swiss_German-mac.json +1 -0
- package/es/core/keyboard/layouts/de-Swiss_German-pc.d.ts +273 -0
- package/es/core/keyboard/layouts/de-Swiss_German-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/de-Swiss_German-pc.js +271 -0
- package/es/core/keyboard/layouts/de-Swiss_German-pc.json +1 -0
- package/es/core/keyboard/layouts/en-British-mac.d.ts +296 -0
- package/es/core/keyboard/layouts/en-British-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-British-mac.js +294 -0
- package/es/core/keyboard/layouts/en-British-mac.json +1 -0
- package/es/core/keyboard/layouts/en-British-pc.d.ts +271 -0
- package/es/core/keyboard/layouts/en-British-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-British-pc.js +269 -0
- package/es/core/keyboard/layouts/en-British-pc.json +1 -0
- package/es/core/keyboard/layouts/en-Colemak-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-Colemak-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Colemak-mac.js +296 -0
- package/es/core/keyboard/layouts/en-Colemak-mac.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-Dvorak-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak-mac.js +296 -0
- package/es/core/keyboard/layouts/en-Dvorak-mac.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak-pc.d.ts +257 -0
- package/es/core/keyboard/layouts/en-Dvorak-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak-pc.js +255 -0
- package/es/core/keyboard/layouts/en-Dvorak-pc.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.js +296 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.d.ts +257 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.js +255 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-mac.js +296 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-mac.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-pc.d.ts +257 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-pc.js +255 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-pc.json +1 -0
- package/es/core/keyboard/layouts/en-US-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-US-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-US-mac.js +296 -0
- package/es/core/keyboard/layouts/en-US-mac.json +1 -0
- package/es/core/keyboard/layouts/en-US-pc.d.ts +257 -0
- package/es/core/keyboard/layouts/en-US-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-US-pc.js +255 -0
- package/es/core/keyboard/layouts/en-US-pc.json +1 -0
- package/es/core/keyboard/layouts/es-Spanish-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/es-Spanish-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/es-Spanish-mac.js +296 -0
- package/es/core/keyboard/layouts/es-Spanish-mac.json +1 -0
- package/es/core/keyboard/layouts/es-Spanish-pc.d.ts +269 -0
- package/es/core/keyboard/layouts/es-Spanish-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/es-Spanish-pc.js +267 -0
- package/es/core/keyboard/layouts/es-Spanish-pc.json +1 -0
- package/es/core/keyboard/layouts/fr-Bepo-pc.d.ts +344 -0
- package/es/core/keyboard/layouts/fr-Bepo-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Bepo-pc.js +342 -0
- package/es/core/keyboard/layouts/fr-Bepo-pc.json +1 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-mac.js +296 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-mac.json +1 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-pc.d.ts +281 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-pc.js +279 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-pc.json +1 -0
- package/es/core/keyboard/layouts/fr-French-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/fr-French-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-French-mac.js +296 -0
- package/es/core/keyboard/layouts/fr-French-mac.json +1 -0
- package/es/core/keyboard/layouts/fr-French-pc.d.ts +269 -0
- package/es/core/keyboard/layouts/fr-French-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-French-pc.js +267 -0
- package/es/core/keyboard/layouts/fr-French-pc.json +1 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-mac.d.ts +296 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-mac.js +294 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-mac.json +1 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-pc.d.ts +273 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-pc.js +271 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-pc.json +1 -0
- package/es/core/keyboard/layouts/hu-Hungarian-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/hu-Hungarian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/hu-Hungarian-mac.js +296 -0
- package/es/core/keyboard/layouts/hu-Hungarian-mac.json +1 -0
- package/es/core/keyboard/layouts/hu-Hungarian-pc.d.ts +298 -0
- package/es/core/keyboard/layouts/hu-Hungarian-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/hu-Hungarian-pc.js +296 -0
- package/es/core/keyboard/layouts/hu-Hungarian-pc.json +1 -0
- package/es/core/keyboard/layouts/index.d.ts +4 -0
- package/es/core/keyboard/layouts/index.d.ts.map +1 -0
- package/es/core/keyboard/layouts/index.js +57 -0
- package/es/core/keyboard/layouts/it-Italian-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/it-Italian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/it-Italian-mac.js +296 -0
- package/es/core/keyboard/layouts/it-Italian-mac.json +1 -0
- package/es/core/keyboard/layouts/it-Italian-pc.d.ts +265 -0
- package/es/core/keyboard/layouts/it-Italian-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/it-Italian-pc.js +263 -0
- package/es/core/keyboard/layouts/it-Italian-pc.json +1 -0
- package/es/core/keyboard/layouts/nb-Norwegian-mac.d.ts +293 -0
- package/es/core/keyboard/layouts/nb-Norwegian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/nb-Norwegian-mac.js +291 -0
- package/es/core/keyboard/layouts/nb-Norwegian-mac.json +1 -0
- package/es/core/keyboard/layouts/nb-Norwegian-pc.d.ts +269 -0
- package/es/core/keyboard/layouts/nb-Norwegian-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/nb-Norwegian-pc.js +267 -0
- package/es/core/keyboard/layouts/nb-Norwegian-pc.json +1 -0
- package/es/core/keyboard/layouts/nl-Dutch-mac.d.ts +296 -0
- package/es/core/keyboard/layouts/nl-Dutch-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/nl-Dutch-mac.js +294 -0
- package/es/core/keyboard/layouts/nl-Dutch-mac.json +1 -0
- package/es/core/keyboard/layouts/nl-Dutch-pc.d.ts +278 -0
- package/es/core/keyboard/layouts/nl-Dutch-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/nl-Dutch-pc.js +276 -0
- package/es/core/keyboard/layouts/nl-Dutch-pc.json +1 -0
- package/es/core/keyboard/layouts/pl-Polish-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/pl-Polish-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pl-Polish-mac.js +296 -0
- package/es/core/keyboard/layouts/pl-Polish-mac.json +1 -0
- package/es/core/keyboard/layouts/pl-Polish-pc.d.ts +284 -0
- package/es/core/keyboard/layouts/pl-Polish-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pl-Polish-pc.js +282 -0
- package/es/core/keyboard/layouts/pl-Polish-pc.json +1 -0
- package/es/core/keyboard/layouts/pt-Brazilian-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/pt-Brazilian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pt-Brazilian-mac.js +296 -0
- package/es/core/keyboard/layouts/pt-Brazilian-mac.json +1 -0
- package/es/core/keyboard/layouts/pt-Portuguese-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/pt-Portuguese-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pt-Portuguese-mac.js +296 -0
- package/es/core/keyboard/layouts/pt-Portuguese-mac.json +1 -0
- package/es/core/keyboard/layouts/pt-Portuguese-pc.d.ts +268 -0
- package/es/core/keyboard/layouts/pt-Portuguese-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pt-Portuguese-pc.js +266 -0
- package/es/core/keyboard/layouts/pt-Portuguese-pc.json +65 -0
- package/es/core/keyboard/layouts/ro-Romanian-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/ro-Romanian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/ro-Romanian-mac.js +296 -0
- package/es/core/keyboard/layouts/ro-Romanian-mac.json +1 -0
- package/es/core/keyboard/layouts/ro-Romanian-pc.d.ts +295 -0
- package/es/core/keyboard/layouts/ro-Romanian-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/ro-Romanian-pc.js +293 -0
- package/es/core/keyboard/layouts/ro-Romanian-pc.json +1 -0
- package/es/core/keyboard/layouts/sv-Swedish-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/sv-Swedish-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/sv-Swedish-mac.js +296 -0
- package/es/core/keyboard/layouts/sv-Swedish-mac.json +1 -0
- package/es/core/keyboard/layouts/sv-Swedish-pc.d.ts +270 -0
- package/es/core/keyboard/layouts/sv-Swedish-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/sv-Swedish-pc.js +268 -0
- package/es/core/keyboard/layouts/sv-Swedish-pc.json +1 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-mac.d.ts +297 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-mac.js +295 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-mac.json +1 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-pc.d.ts +282 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-pc.js +280 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-pc.json +1 -0
- package/es/core/menu/default-menu-node.d.ts +82 -0
- package/es/core/menu/default-menu-node.d.ts.map +1 -0
- package/es/core/menu/default-menu-node.js +205 -0
- package/es/core/menu/index.d.ts +5 -0
- package/es/core/menu/index.d.ts.map +1 -0
- package/es/core/menu/index.js +39 -0
- package/es/core/menu/menu-protocol.d.ts +101 -0
- package/es/core/menu/menu-protocol.d.ts.map +1 -0
- package/es/core/menu/menu-protocol.js +72 -0
- package/es/core/menu/menu-registry.d.ts +92 -0
- package/es/core/menu/menu-registry.d.ts.map +1 -0
- package/es/core/menu/menu-registry.js +296 -0
- package/es/core/menu/module.d.ts +3 -0
- package/es/core/menu/module.d.ts.map +1 -0
- package/es/core/menu/module.js +31 -0
- package/es/core/module/index.d.ts +4 -0
- package/es/core/module/index.d.ts.map +1 -0
- package/es/core/module/index.js +3 -0
- package/es/core/module/mana-module-context.d.ts +7 -0
- package/es/core/module/mana-module-context.d.ts.map +1 -0
- package/es/core/module/mana-module-context.js +111 -0
- package/es/core/module/mana-module.d.ts +21 -0
- package/es/core/module/mana-module.d.ts.map +1 -0
- package/es/core/module/mana-module.js +71 -0
- package/es/core/module/module-protocol.d.ts +10 -0
- package/es/core/module/module-protocol.d.ts.map +1 -0
- package/es/core/module/module-protocol.js +1 -0
- package/es/core/nls.d.ts +19 -0
- package/es/core/nls.d.ts.map +1 -0
- package/es/core/nls.js +25 -0
- package/es/core/selection/index.d.ts +4 -0
- package/es/core/selection/index.d.ts.map +1 -0
- package/es/core/selection/index.js +4 -0
- package/es/core/selection/selection-service.d.ts +13 -0
- package/es/core/selection/selection-service.d.ts.map +1 -0
- package/es/core/selection/selection-service.js +27 -0
- package/es/core/theme/base-variable-registry.d.ts +31 -0
- package/es/core/theme/base-variable-registry.d.ts.map +1 -0
- package/es/core/theme/base-variable-registry.js +180 -0
- package/es/core/theme/basic/antd-variable-contribution.d.ts +6 -0
- package/es/core/theme/basic/antd-variable-contribution.d.ts.map +1 -0
- package/es/core/theme/basic/antd-variable-contribution.js +667 -0
- package/es/core/theme/basic/default-variable-contribution.d.ts +6 -0
- package/es/core/theme/basic/default-variable-contribution.d.ts.map +1 -0
- package/es/core/theme/basic/default-variable-contribution.js +212 -0
- package/es/core/theme/basic/index.d.ts +3 -0
- package/es/core/theme/basic/index.d.ts.map +1 -0
- package/es/core/theme/basic/index.js +2 -0
- package/es/core/theme/basic/variable-protocol.d.ts +7 -0
- package/es/core/theme/basic/variable-protocol.d.ts.map +1 -0
- package/es/core/theme/basic/variable-protocol.js +2 -0
- package/es/core/theme/basic/variable-registry.d.ts +13 -0
- package/es/core/theme/basic/variable-registry.d.ts.map +1 -0
- package/es/core/theme/basic/variable-registry.js +62 -0
- package/es/core/theme/color/antd-color-contribution.d.ts +6 -0
- package/es/core/theme/color/antd-color-contribution.d.ts.map +1 -0
- package/es/core/theme/color/antd-color-contribution.js +787 -0
- package/es/core/theme/color/color-protocol.d.ts +10 -0
- package/es/core/theme/color/color-protocol.d.ts.map +1 -0
- package/es/core/theme/color/color-protocol.js +2 -0
- package/es/core/theme/color/color-registry.d.ts +72 -0
- package/es/core/theme/color/color-registry.d.ts.map +1 -0
- package/es/core/theme/color/color-registry.js +176 -0
- package/es/core/theme/color/color.d.ts +165 -0
- package/es/core/theme/color/color.d.ts.map +1 -0
- package/es/core/theme/color/color.js +658 -0
- package/es/core/theme/color/default-color-contribution.d.ts +6 -0
- package/es/core/theme/color/default-color-contribution.d.ts.map +1 -0
- package/es/core/theme/color/default-color-contribution.js +550 -0
- package/es/core/theme/color/index.d.ts +3 -0
- package/es/core/theme/color/index.d.ts.map +1 -0
- package/es/core/theme/color/index.js +2 -0
- package/es/core/theme/index.d.ts +8 -0
- package/es/core/theme/index.d.ts.map +1 -0
- package/es/core/theme/index.js +22 -0
- package/es/core/theme/protocol.d.ts +16 -0
- package/es/core/theme/protocol.d.ts.map +1 -0
- package/es/core/theme/protocol.js +1 -0
- package/es/core/theme/style/mana-logo.png +0 -0
- package/es/core/theme/style/theme-base.less +3 -0
- package/es/core/theme/theme-app.d.ts +24 -0
- package/es/core/theme/theme-app.d.ts.map +1 -0
- package/es/core/theme/theme-app.js +151 -0
- package/es/core/theme/theme-service.d.ts +50 -0
- package/es/core/theme/theme-service.d.ts.map +1 -0
- package/es/core/theme/theme-service.js +181 -0
- package/es/core/toolbar/default-toolbar-item.d.ts +38 -0
- package/es/core/toolbar/default-toolbar-item.d.ts.map +1 -0
- package/es/core/toolbar/default-toolbar-item.js +82 -0
- package/es/core/toolbar/index.d.ts +6 -0
- package/es/core/toolbar/index.d.ts.map +1 -0
- package/es/core/toolbar/index.js +20 -0
- package/es/core/toolbar/toolbar-protocol.d.ts +77 -0
- package/es/core/toolbar/toolbar-protocol.d.ts.map +1 -0
- package/es/core/toolbar/toolbar-protocol.js +32 -0
- package/es/core/toolbar/toolbar-registry.d.ts +37 -0
- package/es/core/toolbar/toolbar-registry.d.ts.map +1 -0
- package/es/core/toolbar/toolbar-registry.js +96 -0
- package/es/core/typings/native-keymap.d.ts +72 -0
- package/es/core/utils/hooks.d.ts +12 -0
- package/es/core/utils/hooks.d.ts.map +1 -0
- package/es/core/utils/hooks.js +103 -0
- package/es/core/utils/index.d.ts +4 -0
- package/es/core/utils/index.d.ts.map +1 -0
- package/es/core/utils/index.js +3 -0
- package/es/core/utils/lifecycle.d.ts +75 -0
- package/es/core/utils/lifecycle.d.ts.map +1 -0
- package/es/core/utils/lifecycle.js +350 -0
- package/es/core/utils/map.d.ts +148 -0
- package/es/core/utils/map.d.ts.map +1 -0
- package/es/core/utils/map.js +1196 -0
- package/es/core/view/decorator.d.ts +19 -0
- package/es/core/view/decorator.d.ts.map +1 -0
- package/es/core/view/decorator.js +106 -0
- package/es/core/view/default-slot-view.d.ts +48 -0
- package/es/core/view/default-slot-view.d.ts.map +1 -0
- package/es/core/view/default-slot-view.js +289 -0
- package/es/core/view/default-view.d.ts +35 -0
- package/es/core/view/default-view.d.ts.map +1 -0
- package/es/core/view/default-view.js +90 -0
- package/es/core/view/focus-tracker.d.ts +165 -0
- package/es/core/view/focus-tracker.d.ts.map +1 -0
- package/es/core/view/focus-tracker.js +411 -0
- package/es/core/view/hooks.d.ts +8 -0
- package/es/core/view/hooks.d.ts.map +1 -0
- package/es/core/view/hooks.js +35 -0
- package/es/core/view/index.d.ts +23 -0
- package/es/core/view/index.d.ts.map +1 -0
- package/es/core/view/index.js +22 -0
- package/es/core/view/index.less +4 -0
- package/es/core/view/module.d.ts +3 -0
- package/es/core/view/module.d.ts.map +1 -0
- package/es/core/view/module.js +22 -0
- package/es/core/view/navigatable-types.d.ts +33 -0
- package/es/core/view/navigatable-types.d.ts.map +1 -0
- package/es/core/view/navigatable-types.js +34 -0
- package/es/core/view/navigatable.d.ts +9 -0
- package/es/core/view/navigatable.d.ts.map +1 -0
- package/es/core/view/navigatable.js +47 -0
- package/es/core/view/open-handler.d.ts +71 -0
- package/es/core/view/open-handler.d.ts.map +1 -0
- package/es/core/view/open-handler.js +167 -0
- package/es/core/view/portal-slot-view.d.ts +21 -0
- package/es/core/view/portal-slot-view.d.ts.map +1 -0
- package/es/core/view/portal-slot-view.js +157 -0
- package/es/core/view/root-view.d.ts +26 -0
- package/es/core/view/root-view.d.ts.map +1 -0
- package/es/core/view/root-view.js +139 -0
- package/es/core/view/saveable.d.ts +40 -0
- package/es/core/view/saveable.d.ts.map +1 -0
- package/es/core/view/saveable.js +152 -0
- package/es/core/view/slot-view-manager.d.ts +57 -0
- package/es/core/view/slot-view-manager.d.ts.map +1 -0
- package/es/core/view/slot-view-manager.js +321 -0
- package/es/core/view/slot.d.ts +11 -0
- package/es/core/view/slot.d.ts.map +1 -0
- package/es/core/view/slot.js +57 -0
- package/es/core/view/stateful-view.d.ts +12 -0
- package/es/core/view/stateful-view.d.ts.map +1 -0
- package/es/core/view/stateful-view.js +38 -0
- package/es/core/view/title.d.ts +13 -0
- package/es/core/view/title.d.ts.map +1 -0
- package/es/core/view/title.js +48 -0
- package/es/core/view/utils.d.ts +15 -0
- package/es/core/view/utils.d.ts.map +1 -0
- package/es/core/view/utils.js +35 -0
- package/es/core/view/view-application.d.ts +18 -0
- package/es/core/view/view-application.d.ts.map +1 -0
- package/es/core/view/view-application.js +171 -0
- package/es/core/view/view-container.d.ts +20 -0
- package/es/core/view/view-container.d.ts.map +1 -0
- package/es/core/view/view-container.js +82 -0
- package/es/core/view/view-context.d.ts +8 -0
- package/es/core/view/view-context.d.ts.map +1 -0
- package/es/core/view/view-context.js +29 -0
- package/es/core/view/view-decoration.d.ts +149 -0
- package/es/core/view/view-decoration.d.ts.map +1 -0
- package/es/core/view/view-decoration.js +4 -0
- package/es/core/view/view-manager.d.ts +66 -0
- package/es/core/view/view-manager.d.ts.map +1 -0
- package/es/core/view/view-manager.js +434 -0
- package/es/core/view/view-meta.d.ts +12 -0
- package/es/core/view/view-meta.d.ts.map +1 -0
- package/es/core/view/view-meta.js +35 -0
- package/es/core/view/view-open-handler.d.ts +76 -0
- package/es/core/view/view-open-handler.d.ts.map +1 -0
- package/es/core/view/view-open-handler.js +227 -0
- package/es/core/view/view-protocol.d.ts +171 -0
- package/es/core/view/view-protocol.d.ts.map +1 -0
- package/es/core/view/view-protocol.js +58 -0
- package/es/core/view/view-render.d.ts +9 -0
- package/es/core/view/view-render.d.ts.map +1 -0
- package/es/core/view/view-render.js +37 -0
- package/es/core/view/view-storage.d.ts +40 -0
- package/es/core/view/view-storage.d.ts.map +1 -0
- package/es/core/view/view-storage.js +310 -0
- package/es/index.js +2 -1
- package/es/ioc/container-api.d.ts +9 -0
- package/es/ioc/container-api.d.ts.map +1 -0
- package/es/ioc/container-api.js +32 -0
- package/es/ioc/container.d.ts +37 -0
- package/es/ioc/container.d.ts.map +1 -0
- package/es/ioc/container.js +191 -0
- package/es/ioc/contribution/contribution-protocol.d.ts +24 -0
- package/es/ioc/contribution/contribution-protocol.d.ts.map +1 -0
- package/es/ioc/contribution/contribution-protocol.js +16 -0
- package/es/ioc/contribution/contribution-provider.d.ts +21 -0
- package/es/ioc/contribution/contribution-provider.d.ts.map +1 -0
- package/es/ioc/contribution/contribution-provider.js +81 -0
- package/es/ioc/contribution/contribution-register.d.ts +5 -0
- package/es/ioc/contribution/contribution-register.d.ts.map +1 -0
- package/es/ioc/contribution/contribution-register.js +27 -0
- package/es/ioc/contribution/decorator.d.ts +3 -0
- package/es/ioc/contribution/decorator.d.ts.map +1 -0
- package/es/ioc/contribution/decorator.js +8 -0
- package/es/ioc/contribution/index.d.ts +12 -0
- package/es/ioc/contribution/index.d.ts.map +1 -0
- package/es/ioc/contribution/index.js +10 -0
- package/es/ioc/core.d.ts +105 -0
- package/es/ioc/core.d.ts.map +1 -0
- package/es/ioc/core.js +104 -0
- package/es/ioc/decorator.d.ts +9 -0
- package/es/ioc/decorator.d.ts.map +1 -0
- package/es/ioc/decorator.js +56 -0
- package/es/ioc/features/auto-factory.d.ts +8 -0
- package/es/ioc/features/auto-factory.d.ts.map +1 -0
- package/es/ioc/features/auto-factory.js +34 -0
- package/es/ioc/features/prioritized-contribution.d.ts +12 -0
- package/es/ioc/features/prioritized-contribution.d.ts.map +1 -0
- package/es/ioc/features/prioritized-contribution.js +40 -0
- package/es/ioc/index.d.ts +9 -0
- package/es/ioc/index.d.ts.map +1 -0
- package/es/ioc/index.js +8 -0
- package/es/ioc/inversify-api/index.d.ts +15 -0
- package/es/ioc/inversify-api/index.d.ts.map +1 -0
- package/es/ioc/inversify-api/index.js +48 -0
- package/es/ioc/inversify-api/inversify-protocol.d.ts +13 -0
- package/es/ioc/inversify-api/inversify-protocol.d.ts.map +1 -0
- package/es/ioc/inversify-api/inversify-protocol.js +7 -0
- package/es/ioc/module/index.d.ts +4 -0
- package/es/ioc/module/index.d.ts.map +1 -0
- package/es/ioc/module/index.js +5 -0
- package/es/ioc/module/syringe-module.d.ts +29 -0
- package/es/ioc/module/syringe-module.d.ts.map +1 -0
- package/es/ioc/module/syringe-module.js +110 -0
- package/es/ioc/register.d.ts +33 -0
- package/es/ioc/register.d.ts.map +1 -0
- package/es/ioc/register.js +194 -0
- package/es/ioc/side-option.d.ts +4 -0
- package/es/ioc/side-option.d.ts.map +1 -0
- package/es/ioc/side-option.js +4 -0
- package/es/l10n/index.d.ts +3 -0
- package/es/l10n/index.d.ts.map +1 -0
- package/es/l10n/index.js +2 -0
- package/es/l10n/l10n/index.d.ts +144 -0
- package/es/l10n/l10n/index.d.ts.map +1 -0
- package/es/l10n/l10n/index.js +269 -0
- package/es/l10n/l10n/platform.d.ts +3 -0
- package/es/l10n/l10n/platform.d.ts.map +1 -0
- package/es/l10n/l10n/platform.js +20 -0
- package/es/l10n/lang/bundle.l10n.en-US.json +5 -0
- package/es/l10n/lang/bundle.l10n.zh-CN.json +5 -0
- package/es/l10n/lang/index.d.ts +3 -0
- package/es/l10n/lang/index.d.ts.map +1 -0
- package/es/l10n/lang/index.js +6 -0
- package/es/observable/async-event.d.ts +28 -0
- package/es/observable/async-event.d.ts.map +1 -0
- package/es/observable/async-event.js +158 -0
- package/es/observable/config.d.ts +10 -0
- package/es/observable/config.d.ts.map +1 -0
- package/es/observable/config.js +58 -0
- package/es/observable/context.d.ts +15 -0
- package/es/observable/context.d.ts.map +1 -0
- package/es/observable/context.js +44 -0
- package/es/observable/core.d.ts +24 -0
- package/es/observable/core.d.ts.map +1 -0
- package/es/observable/core.js +11 -0
- package/es/observable/decorator.d.ts +9 -0
- package/es/observable/decorator.d.ts.map +1 -0
- package/es/observable/decorator.js +19 -0
- package/es/observable/hooks.d.ts +6 -0
- package/es/observable/hooks.d.ts.map +1 -0
- package/es/observable/hooks.js +44 -0
- package/es/observable/index.d.ts +12 -0
- package/es/observable/index.d.ts.map +1 -0
- package/es/observable/index.js +11 -0
- package/es/observable/notifiable.d.ts +19 -0
- package/es/observable/notifiable.d.ts.map +1 -0
- package/es/observable/notifiable.js +198 -0
- package/es/observable/notifier.d.ts +33 -0
- package/es/observable/notifier.d.ts.map +1 -0
- package/es/observable/notifier.js +154 -0
- package/es/observable/observable.d.ts +3 -0
- package/es/observable/observable.d.ts.map +1 -0
- package/es/observable/observable.js +87 -0
- package/es/observable/tracker.d.ts +27 -0
- package/es/observable/tracker.d.ts.map +1 -0
- package/es/observable/tracker.js +225 -0
- package/es/observable/utils.d.ts +31 -0
- package/es/observable/utils.d.ts.map +1 -0
- package/es/observable/utils.js +139 -0
- package/es/observable/watch.d.ts +5 -0
- package/es/observable/watch.d.ts.map +1 -0
- package/es/observable/watch.js +56 -0
- package/es/polling/poll.d.ts +3 -3
- package/es/polling/poll.d.ts.map +1 -1
- package/es/polling/poll.js +1 -1
- package/es/polling/protocol.d.ts +1 -1
- package/es/polling/protocol.d.ts.map +1 -1
- package/es/protocol/cell-protocol.d.ts +1 -1
- package/es/protocol/cell-protocol.d.ts.map +1 -1
- package/es/protocol/cell-protocol.js +1 -1
- package/es/react/constant.d.ts +2 -0
- package/es/react/constant.d.ts.map +1 -0
- package/es/react/constant.js +1 -0
- package/es/react/dropdown/index.d.ts +23 -0
- package/es/react/dropdown/index.d.ts.map +1 -0
- package/es/react/dropdown/index.js +53 -0
- package/es/react/dropdown/styles/index.less +121 -0
- package/es/react/index.d.ts +8 -0
- package/es/react/index.d.ts.map +1 -0
- package/es/react/index.js +7 -0
- package/es/react/layout/boxpanel/Pane.d.ts +13 -0
- package/es/react/layout/boxpanel/Pane.d.ts.map +1 -0
- package/es/react/layout/boxpanel/Pane.js +37 -0
- package/es/react/layout/boxpanel/context.d.ts +8 -0
- package/es/react/layout/boxpanel/context.d.ts.map +1 -0
- package/es/react/layout/boxpanel/context.js +4 -0
- package/es/react/layout/boxpanel/index.d.ts +19 -0
- package/es/react/layout/boxpanel/index.d.ts.map +1 -0
- package/es/react/layout/boxpanel/index.js +46 -0
- package/es/react/layout/boxpanel/styles/index.less +14 -0
- package/es/react/layout/layout.d.ts +12 -0
- package/es/react/layout/layout.d.ts.map +1 -0
- package/es/react/layout/layout.js +68 -0
- package/es/react/layout/splitpanel/context.d.ts +15 -0
- package/es/react/layout/splitpanel/context.d.ts.map +1 -0
- package/es/react/layout/splitpanel/context.js +24 -0
- package/es/react/layout/splitpanel/index.d.ts +23 -0
- package/es/react/layout/splitpanel/index.d.ts.map +1 -0
- package/es/react/layout/splitpanel/index.js +287 -0
- package/es/react/layout/splitpanel/pane.d.ts +18 -0
- package/es/react/layout/splitpanel/pane.d.ts.map +1 -0
- package/es/react/layout/splitpanel/pane.js +8 -0
- package/es/react/layout/splitpanel/styles/index.less +10 -0
- package/es/react/menu/context.d.ts +8 -0
- package/es/react/menu/context.d.ts.map +1 -0
- package/es/react/menu/context.js +4 -0
- package/es/react/menu/divider.d.ts +3 -0
- package/es/react/menu/divider.d.ts.map +1 -0
- package/es/react/menu/divider.js +10 -0
- package/es/react/menu/index.d.ts +4 -0
- package/es/react/menu/index.d.ts.map +1 -0
- package/es/react/menu/index.js +3 -0
- package/es/react/menu/item.d.ts +19 -0
- package/es/react/menu/item.d.ts.map +1 -0
- package/es/react/menu/item.js +69 -0
- package/es/react/menu/menu.d.ts +17 -0
- package/es/react/menu/menu.d.ts.map +1 -0
- package/es/react/menu/menu.js +35 -0
- package/es/react/menu/styles/index.less +163 -0
- package/es/react/menu/submenu.d.ts +5 -0
- package/es/react/menu/submenu.d.ts.map +1 -0
- package/es/react/menu/submenu.js +33 -0
- package/es/react/menubar/context.d.ts +14 -0
- package/es/react/menubar/context.d.ts.map +1 -0
- package/es/react/menubar/context.js +2 -0
- package/es/react/menubar/index.d.ts +2 -0
- package/es/react/menubar/index.d.ts.map +1 -0
- package/es/react/menubar/index.js +1 -0
- package/es/react/menubar/item.d.ts +8 -0
- package/es/react/menubar/item.d.ts.map +1 -0
- package/es/react/menubar/item.js +94 -0
- package/es/react/menubar/menubar.d.ts +15 -0
- package/es/react/menubar/menubar.d.ts.map +1 -0
- package/es/react/menubar/menubar.js +119 -0
- package/es/react/menubar/styles/index.less +113 -0
- package/es/react/notification/index.d.ts +20 -0
- package/es/react/notification/index.d.ts.map +1 -0
- package/es/react/notification/index.js +154 -0
- package/es/react/notification/protocol.d.ts +111 -0
- package/es/react/notification/protocol.d.ts.map +1 -0
- package/es/react/notification/protocol.js +61 -0
- package/es/react/notification/pure-panel.d.ts +28 -0
- package/es/react/notification/pure-panel.d.ts.map +1 -0
- package/es/react/notification/pure-panel.js +115 -0
- package/es/react/notification/render.d.ts +10 -0
- package/es/react/notification/render.d.ts.map +1 -0
- package/es/react/notification/render.js +101 -0
- package/es/react/notification/style/index.d.ts +2 -0
- package/es/react/notification/style/index.d.ts.map +1 -0
- package/es/react/notification/style/index.js +1 -0
- package/es/react/notification/style/index.less +192 -0
- package/es/react/notification/style/placement.less +68 -0
- package/es/react/notification/use-notification.d.ts +9 -0
- package/es/react/notification/use-notification.d.ts.map +1 -0
- package/es/react/notification/use-notification.js +173 -0
- package/es/react/resize/index.d.ts +41 -0
- package/es/react/resize/index.d.ts.map +1 -0
- package/es/react/resize/index.js +640 -0
- package/es/react/resize/styles/index.less +83 -0
- package/es/react/styles/variables.less +2 -0
- package/es/react/tabs/index.d.ts +19 -0
- package/es/react/tabs/index.d.ts.map +1 -0
- package/es/react/tabs/index.js +51 -0
- package/es/react/tabs/styles/card.less +111 -0
- package/es/react/tabs/styles/dropdown.less +70 -0
- package/es/react/tabs/styles/index.less +231 -0
- package/es/react/tabs/styles/position.less +217 -0
- package/es/react/typings/index.d.ts +5 -0
- package/es/react/util.d.ts +2 -0
- package/es/react/util.d.ts.map +1 -0
- package/es/react/util.js +4 -0
- package/es/url.js +1 -1
- package/package.json +55 -11
- package/src/app/app.tsx +23 -0
- package/src/app/file-tree/file-selection.ts +33 -0
- package/src/app/file-tree/file-service.ts +67 -0
- package/src/app/file-tree/file-tree-component.tsx +11 -0
- package/src/app/file-tree/file-tree-icon.tsx +15 -0
- package/src/app/file-tree/file-tree-label-provider.ts +54 -0
- package/src/app/file-tree/file-tree-model.ts +240 -0
- package/src/app/file-tree/file-tree-protocol.ts +35 -0
- package/src/app/file-tree/file-tree-view.tsx +340 -0
- package/src/app/file-tree/file-tree.ts +193 -0
- package/src/app/file-tree/files.ts +990 -0
- package/src/app/file-tree/filesystem-utils.ts +32 -0
- package/src/app/file-tree/index.ts +6 -0
- package/src/app/file-tree/module.ts +21 -0
- package/src/app/file-tree/selection-command-handler.ts +101 -0
- package/src/app/file-tree/style/file-icon.less +51 -0
- package/src/app/index.spec.ts +20 -0
- package/src/app/index.ts +37 -0
- package/src/app/label/index.ts +12 -0
- package/src/app/label/label-provider.tsx +454 -0
- package/src/app/menu/index.ts +24 -0
- package/src/app/menu/menu-bar-render.tsx +52 -0
- package/src/app/menu/menu-color-registry.ts +52 -0
- package/src/app/menu/menu-context.tsx +16 -0
- package/src/app/menu/menu-item-keeper.tsx +55 -0
- package/src/app/menu/menu-item-render.tsx +15 -0
- package/src/app/menu/menu-protocol.ts +22 -0
- package/src/app/menu/menu-render.tsx +92 -0
- package/src/app/menu/menu.tsx +212 -0
- package/src/app/modal/index.ts +29 -0
- package/src/app/modal/modal-contribution.ts +13 -0
- package/src/app/modal/modal-protocol.tsx +30 -0
- package/src/app/modal/modal-render.tsx +22 -0
- package/src/app/modal/modal-service.ts +166 -0
- package/src/app/notification/index.less +20 -0
- package/src/app/notification/index.ts +8 -0
- package/src/app/notification/protocol.ts +16 -0
- package/src/app/notification/service.tsx +60 -0
- package/src/app/style/index.less +181 -0
- package/src/app/style/style-protocol.ts +13 -0
- package/src/app/toolbar/index.less +40 -0
- package/src/app/toolbar/index.ts +20 -0
- package/src/app/toolbar/toolbar-item-keeper.tsx +45 -0
- package/src/app/toolbar/toolbar-item-render.tsx +23 -0
- package/src/app/toolbar/toolbar-protocol.ts +10 -0
- package/src/app/toolbar/toolbar-render.tsx +102 -0
- package/src/app/toolbar/toolbar-visible-render.tsx +21 -0
- package/src/app/toolbar/toolbar.tsx +241 -0
- package/src/app/tree/components/index.tsx +22 -0
- package/src/app/tree/components/tree-ident.tsx +44 -0
- package/src/app/tree/components/tree-node-caption-affix.tsx +47 -0
- package/src/app/tree/components/tree-node-caption.tsx +128 -0
- package/src/app/tree/components/tree-node-expansion.tsx +36 -0
- package/src/app/tree/components/tree-node-icon-decorator.tsx +75 -0
- package/src/app/tree/components/tree-node-icon.tsx +3 -0
- package/src/app/tree/components/tree-node-tail-decoration.tsx +59 -0
- package/src/app/tree/components/tree-node.tsx +38 -0
- package/src/app/tree/components/tree-switch-icon.tsx +13 -0
- package/src/app/tree/index.ts +15 -0
- package/src/app/tree/module.ts +30 -0
- package/src/app/tree/style/index.less +206 -0
- package/src/app/tree/style/tree-decorator.less +65 -0
- package/src/app/tree/tree-decorator.ts +216 -0
- package/src/app/tree/tree-expansion.ts +162 -0
- package/src/app/tree/tree-impl.ts +182 -0
- package/src/app/tree/tree-iterator.ts +243 -0
- package/src/app/tree/tree-label-provider.ts +23 -0
- package/src/app/tree/tree-model.ts +468 -0
- package/src/app/tree/tree-navigation.ts +41 -0
- package/src/app/tree/tree-protocol.ts +77 -0
- package/src/app/tree/tree-selection-impl.ts +169 -0
- package/src/app/tree/tree-selection-state.ts +271 -0
- package/src/app/tree/tree-selection.ts +138 -0
- package/src/app/tree/tree-view-decoration.ts +349 -0
- package/src/app/tree/tree.ts +288 -0
- package/src/app/tree/view/index.less +3 -0
- package/src/app/tree/view/index.ts +3 -0
- package/src/app/tree/view/tree-view-decorator.ts +91 -0
- package/src/app/tree/view/tree-view-module.ts +16 -0
- package/src/app/tree/view/tree-view-selection.ts +33 -0
- package/src/app/tree/view/tree-view.tsx +925 -0
- package/src/app/typings/index.d.ts +7 -0
- package/src/app/view/box/index.tsx +66 -0
- package/src/app/view/components/index.ts +1 -0
- package/src/app/view/components/loading/index.less +10 -0
- package/src/app/view/components/loading/index.tsx +4 -0
- package/src/app/view/flex/index.less +3 -0
- package/src/app/view/flex/index.tsx +57 -0
- package/src/app/view/header/header-view.tsx +35 -0
- package/src/app/view/header/index.less +43 -0
- package/src/app/view/header/index.ts +24 -0
- package/src/app/view/index.ts +15 -0
- package/src/app/view/tab/card-tab-view.tsx +34 -0
- package/src/app/view/tab/index.less +70 -0
- package/src/app/view/tab/index.ts +3 -0
- package/src/app/view/tab/side-tab-view.tsx +95 -0
- package/src/app/view/tab/tab-menu.ts +24 -0
- package/src/app/view/tab/tab-protocol.ts +3 -0
- package/src/app/view/tab/tab-view.tsx +153 -0
- package/src/common/assert.ts +13 -0
- package/src/common/cancellation.spec.ts +160 -0
- package/src/common/cancellation.ts +143 -0
- package/src/common/charCode.ts +434 -0
- package/src/common/collections.ts +158 -0
- package/src/common/deferred.ts +17 -0
- package/src/common/disposable-collection.ts +87 -0
- package/src/common/disposable.spec.ts +93 -0
- package/src/common/disposable.ts +41 -0
- package/src/common/event.spec.ts +182 -0
- package/src/common/event.ts +249 -0
- package/src/common/index.ts +27 -0
- package/src/common/iterator.ts +228 -0
- package/src/common/linkedList.ts +125 -0
- package/src/common/objects.ts +249 -0
- package/src/common/observable-disposable.ts +12 -0
- package/src/common/path.spec.ts +33 -0
- package/src/common/path.ts +226 -0
- package/src/common/platform.ts +281 -0
- package/src/common/priority.ts +79 -0
- package/src/common/promise-util.spec.ts +68 -0
- package/src/common/promise-util.ts +34 -0
- package/src/common/stopwatch.ts +40 -0
- package/src/common/strings.ts +513 -0
- package/src/common/types.spec.ts +16 -0
- package/src/common/types.ts +30 -0
- package/src/common/uint.ts +59 -0
- package/src/common/uri.spec.ts +73 -0
- package/src/common/uri.ts +208 -0
- package/src/common/utils.spec.ts +22 -0
- package/src/common/utils.ts +35 -0
- package/src/common/valueTypes.ts +311 -0
- package/src/common/vscode-uri/char-code.ts +438 -0
- package/src/common/vscode-uri/index.ts +11 -0
- package/src/common/vscode-uri/platform.ts +20 -0
- package/src/common/vscode-uri/uri.ts +757 -0
- package/src/common/vscode-uri/utils.ts +101 -0
- package/src/common/wait-until-event.spec.ts +70 -0
- package/src/common/wait-until-event.ts +49 -0
- package/src/core/application/application-protocol.ts +20 -0
- package/src/core/application/application-state.ts +68 -0
- package/src/core/application/application.ts +294 -0
- package/src/core/application/default-window-service.ts +66 -0
- package/src/core/application/index.ts +12 -0
- package/src/core/application/mock-window-service.ts +17 -0
- package/src/core/browser.ts +144 -0
- package/src/core/command/command-protocol.ts +152 -0
- package/src/core/command/command-registry.ts +432 -0
- package/src/core/command/index.ts +10 -0
- package/src/core/common/debug.ts +6 -0
- package/src/core/common/index.ts +23 -0
- package/src/core/common/storage-protocol.ts +25 -0
- package/src/core/common/storage-service.ts +81 -0
- package/src/core/components/application.tsx +144 -0
- package/src/core/components/context.tsx +67 -0
- package/src/core/components/hooks.tsx +23 -0
- package/src/core/components/index.less +28 -0
- package/src/core/components/index.tsx +10 -0
- package/src/core/components/root-view-render.tsx +13 -0
- package/src/core/configuration/configuration-cache.ts +50 -0
- package/src/core/configuration/configuration-protocol.ts +55 -0
- package/src/core/configuration/configuration-provider.ts +105 -0
- package/src/core/configuration/configuration-registry.ts +237 -0
- package/src/core/configuration/configuration-render-registry.ts +93 -0
- package/src/core/configuration/configuration-service.ts +190 -0
- package/src/core/configuration/configuration-storage.ts +26 -0
- package/src/core/configuration/configuration.test.ts +7 -0
- package/src/core/configuration/hooks.ts +39 -0
- package/src/core/configuration/index.ts +10 -0
- package/src/core/configuration/module.ts +34 -0
- package/src/core/configuration/typings.d.ts +1 -0
- package/src/core/configuration/validation.ts +33 -0
- package/src/core/context/data-context-manager.ts +65 -0
- package/src/core/context/data-context-protocol.ts +21 -0
- package/src/core/context/data-context.tsx +40 -0
- package/src/core/context/index.ts +15 -0
- package/src/core/index.spec.ts +14 -0
- package/src/core/index.ts +57 -0
- package/src/core/keybinding/context-key-service.ts +77 -0
- package/src/core/keybinding/index.ts +5 -0
- package/src/core/keybinding/keybinding-proocol.ts +15 -0
- package/src/core/keybinding/keybinding.ts +857 -0
- package/src/core/keybinding/module.ts +23 -0
- package/src/core/keybinding/vs/configuration/configuration.ts +460 -0
- package/src/core/keybinding/vs/configuration/configurationModels.ts +962 -0
- package/src/core/keybinding/vs/configuration/configurationRegistry.ts +617 -0
- package/src/core/keybinding/vs/configuration/configurationService.ts +172 -0
- package/src/core/keybinding/vs/configuration/json.ts +1509 -0
- package/src/core/keybinding/vs/contextKeyService.ts +694 -0
- package/src/core/keybinding/vs/contextkey.ts +1494 -0
- package/src/core/keybinding/vs/contextkeys.ts +52 -0
- package/src/core/keybinding/vs/jsonContributionRegistry.ts +74 -0
- package/src/core/keybinding/vs/jsonSchema.ts +85 -0
- package/src/core/keybinding/vs/platform.test.ts +50 -0
- package/src/core/keybinding/vs/platform.ts +50 -0
- package/src/core/keyboard/browser-keyboard-layout-provider.ts +455 -0
- package/src/core/keyboard/index.ts +4 -0
- package/src/core/keyboard/keyboard-layout-service.ts +490 -0
- package/src/core/keyboard/keyboard-protocol.ts +34 -0
- package/src/core/keyboard/keys.ts +787 -0
- package/src/core/keyboard/layouts/cs-Czech-mac.json +1 -0
- package/src/core/keyboard/layouts/cs-Czech-mac.ts +53 -0
- package/src/core/keyboard/layouts/cs-Czech-pc.json +1 -0
- package/src/core/keyboard/layouts/cs-Czech-pc.ts +55 -0
- package/src/core/keyboard/layouts/da-Danish-mac.json +1 -0
- package/src/core/keyboard/layouts/da-Danish-mac.ts +53 -0
- package/src/core/keyboard/layouts/da-Danish-pc.json +1 -0
- package/src/core/keyboard/layouts/da-Danish-pc.ts +55 -0
- package/src/core/keyboard/layouts/de-German-mac.json +1 -0
- package/src/core/keyboard/layouts/de-German-mac.ts +53 -0
- package/src/core/keyboard/layouts/de-German-pc.json +1 -0
- package/src/core/keyboard/layouts/de-German-pc.ts +61 -0
- package/src/core/keyboard/layouts/de-Swiss_German-mac.json +1 -0
- package/src/core/keyboard/layouts/de-Swiss_German-mac.ts +53 -0
- package/src/core/keyboard/layouts/de-Swiss_German-pc.json +1 -0
- package/src/core/keyboard/layouts/de-Swiss_German-pc.ts +55 -0
- package/src/core/keyboard/layouts/en-British-mac.json +1 -0
- package/src/core/keyboard/layouts/en-British-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-British-pc.json +1 -0
- package/src/core/keyboard/layouts/en-British-pc.ts +91 -0
- package/src/core/keyboard/layouts/en-Colemak-mac.json +1 -0
- package/src/core/keyboard/layouts/en-Colemak-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-Dvorak-mac.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-Dvorak-pc.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak-pc.ts +55 -0
- package/src/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.ts +55 -0
- package/src/core/keyboard/layouts/en-Dvorak_Righthanded-mac.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak_Righthanded-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-Dvorak_Righthanded-pc.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak_Righthanded-pc.ts +55 -0
- package/src/core/keyboard/layouts/en-US-mac.json +1 -0
- package/src/core/keyboard/layouts/en-US-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-US-pc.json +1 -0
- package/src/core/keyboard/layouts/en-US-pc.ts +55 -0
- package/src/core/keyboard/layouts/es-Spanish-mac.json +1 -0
- package/src/core/keyboard/layouts/es-Spanish-mac.ts +53 -0
- package/src/core/keyboard/layouts/es-Spanish-pc.json +1 -0
- package/src/core/keyboard/layouts/es-Spanish-pc.ts +55 -0
- package/src/core/keyboard/layouts/fr-Bepo-pc.json +1 -0
- package/src/core/keyboard/layouts/fr-Bepo-pc.ts +289 -0
- package/src/core/keyboard/layouts/fr-Canadian_French-mac.json +1 -0
- package/src/core/keyboard/layouts/fr-Canadian_French-mac.ts +53 -0
- package/src/core/keyboard/layouts/fr-Canadian_French-pc.json +1 -0
- package/src/core/keyboard/layouts/fr-Canadian_French-pc.ts +55 -0
- package/src/core/keyboard/layouts/fr-French-mac.json +1 -0
- package/src/core/keyboard/layouts/fr-French-mac.ts +53 -0
- package/src/core/keyboard/layouts/fr-French-pc.json +1 -0
- package/src/core/keyboard/layouts/fr-French-pc.ts +55 -0
- package/src/core/keyboard/layouts/fr-Swiss_French-mac.json +1 -0
- package/src/core/keyboard/layouts/fr-Swiss_French-mac.ts +53 -0
- package/src/core/keyboard/layouts/fr-Swiss_French-pc.json +1 -0
- package/src/core/keyboard/layouts/fr-Swiss_French-pc.ts +55 -0
- package/src/core/keyboard/layouts/hu-Hungarian-mac.json +1 -0
- package/src/core/keyboard/layouts/hu-Hungarian-mac.ts +53 -0
- package/src/core/keyboard/layouts/hu-Hungarian-pc.json +1 -0
- package/src/core/keyboard/layouts/hu-Hungarian-pc.ts +55 -0
- package/src/core/keyboard/layouts/index.ts +59 -0
- package/src/core/keyboard/layouts/it-Italian-mac.json +1 -0
- package/src/core/keyboard/layouts/it-Italian-mac.ts +53 -0
- package/src/core/keyboard/layouts/it-Italian-pc.json +1 -0
- package/src/core/keyboard/layouts/it-Italian-pc.ts +67 -0
- package/src/core/keyboard/layouts/nb-Norwegian-mac.json +1 -0
- package/src/core/keyboard/layouts/nb-Norwegian-mac.ts +53 -0
- package/src/core/keyboard/layouts/nb-Norwegian-pc.json +1 -0
- package/src/core/keyboard/layouts/nb-Norwegian-pc.ts +55 -0
- package/src/core/keyboard/layouts/nl-Dutch-mac.json +1 -0
- package/src/core/keyboard/layouts/nl-Dutch-mac.ts +53 -0
- package/src/core/keyboard/layouts/nl-Dutch-pc.json +1 -0
- package/src/core/keyboard/layouts/nl-Dutch-pc.ts +55 -0
- package/src/core/keyboard/layouts/pl-Polish-mac.json +1 -0
- package/src/core/keyboard/layouts/pl-Polish-mac.ts +53 -0
- package/src/core/keyboard/layouts/pl-Polish-pc.json +1 -0
- package/src/core/keyboard/layouts/pl-Polish-pc.ts +55 -0
- package/src/core/keyboard/layouts/pt-Brazilian-mac.json +1 -0
- package/src/core/keyboard/layouts/pt-Brazilian-mac.ts +53 -0
- package/src/core/keyboard/layouts/pt-Portuguese-mac.json +1 -0
- package/src/core/keyboard/layouts/pt-Portuguese-mac.ts +53 -0
- package/src/core/keyboard/layouts/pt-Portuguese-pc.json +65 -0
- package/src/core/keyboard/layouts/pt-Portuguese-pc.ts +55 -0
- package/src/core/keyboard/layouts/ro-Romanian-mac.json +1 -0
- package/src/core/keyboard/layouts/ro-Romanian-mac.ts +53 -0
- package/src/core/keyboard/layouts/ro-Romanian-pc.json +1 -0
- package/src/core/keyboard/layouts/ro-Romanian-pc.ts +127 -0
- package/src/core/keyboard/layouts/sv-Swedish-mac.json +1 -0
- package/src/core/keyboard/layouts/sv-Swedish-mac.ts +53 -0
- package/src/core/keyboard/layouts/sv-Swedish-pc.json +1 -0
- package/src/core/keyboard/layouts/sv-Swedish-pc.ts +55 -0
- package/src/core/keyboard/layouts/tr-Turkish_Q-mac.json +1 -0
- package/src/core/keyboard/layouts/tr-Turkish_Q-mac.ts +53 -0
- package/src/core/keyboard/layouts/tr-Turkish_Q-pc.json +1 -0
- package/src/core/keyboard/layouts/tr-Turkish_Q-pc.ts +67 -0
- package/src/core/menu/default-menu-node.ts +210 -0
- package/src/core/menu/index.ts +39 -0
- package/src/core/menu/menu-protocol.ts +142 -0
- package/src/core/menu/menu-registry.ts +271 -0
- package/src/core/menu/module.ts +32 -0
- package/src/core/module/index.ts +3 -0
- package/src/core/module/mana-module-context.ts +40 -0
- package/src/core/module/mana-module.test.ts +161 -0
- package/src/core/module/mana-module.ts +44 -0
- package/src/core/module/module-protocol.ts +12 -0
- package/src/core/nls.ts +46 -0
- package/src/core/selection/index.ts +7 -0
- package/src/core/selection/selection-service.ts +26 -0
- package/src/core/theme/base-variable-registry.ts +132 -0
- package/src/core/theme/basic/antd-variable-contribution.ts +849 -0
- package/src/core/theme/basic/default-variable-contribution.ts +163 -0
- package/src/core/theme/basic/index.spec.ts +16 -0
- package/src/core/theme/basic/index.ts +2 -0
- package/src/core/theme/basic/variable-protocol.ts +8 -0
- package/src/core/theme/basic/variable-registry.ts +23 -0
- package/src/core/theme/color/antd-color-contribution.ts +994 -0
- package/src/core/theme/color/color-protocol.ts +12 -0
- package/src/core/theme/color/color-registry.ts +140 -0
- package/src/core/theme/color/color.ts +695 -0
- package/src/core/theme/color/default-color-contribution.ts +502 -0
- package/src/core/theme/color/index.spec.ts +33 -0
- package/src/core/theme/color/index.ts +2 -0
- package/src/core/theme/index.spec.ts +17 -0
- package/src/core/theme/index.ts +37 -0
- package/src/core/theme/protocol.ts +19 -0
- package/src/core/theme/style/mana-logo.png +0 -0
- package/src/core/theme/style/theme-base.less +3 -0
- package/src/core/theme/theme-app.ts +80 -0
- package/src/core/theme/theme-service.ts +170 -0
- package/src/core/toolbar/default-toolbar-item.ts +80 -0
- package/src/core/toolbar/index.ts +23 -0
- package/src/core/toolbar/toolbar-protocol.ts +112 -0
- package/src/core/toolbar/toolbar-registry.ts +77 -0
- package/src/core/typings/native-keymap.d.ts +72 -0
- package/src/core/utils/hooks.ts +108 -0
- package/src/core/utils/index.ts +3 -0
- package/src/core/utils/lifecycle.ts +335 -0
- package/src/core/utils/map.ts +1020 -0
- package/src/core/view/decorator.ts +87 -0
- package/src/core/view/default-slot-view.tsx +231 -0
- package/src/core/view/default-view.tsx +70 -0
- package/src/core/view/focus-tracker.ts +363 -0
- package/src/core/view/hooks.tsx +40 -0
- package/src/core/view/index.less +4 -0
- package/src/core/view/index.ts +22 -0
- package/src/core/view/module.ts +41 -0
- package/src/core/view/navigatable-types.ts +49 -0
- package/src/core/view/navigatable.ts +29 -0
- package/src/core/view/open-handler.ts +122 -0
- package/src/core/view/portal-slot-view.tsx +107 -0
- package/src/core/view/root-view.tsx +102 -0
- package/src/core/view/saveable.ts +146 -0
- package/src/core/view/slot-view-manager.ts +199 -0
- package/src/core/view/slot.tsx +68 -0
- package/src/core/view/stateful-view.ts +22 -0
- package/src/core/view/title.tsx +24 -0
- package/src/core/view/utils.tsx +48 -0
- package/src/core/view/view-application.ts +70 -0
- package/src/core/view/view-container.tsx +91 -0
- package/src/core/view/view-context.tsx +37 -0
- package/src/core/view/view-decoration.ts +160 -0
- package/src/core/view/view-manager.ts +271 -0
- package/src/core/view/view-meta.ts +24 -0
- package/src/core/view/view-open-handler.ts +139 -0
- package/src/core/view/view-protocol.ts +218 -0
- package/src/core/view/view-render.tsx +39 -0
- package/src/core/view/view-storage.ts +218 -0
- package/src/index.ts +1 -0
- package/src/ioc/container-api.ts +22 -0
- package/src/ioc/container.spec.ts +291 -0
- package/src/ioc/container.ts +171 -0
- package/src/ioc/contribution/contribution-protocol.ts +27 -0
- package/src/ioc/contribution/contribution-provider.ts +73 -0
- package/src/ioc/contribution/contribution-register.ts +32 -0
- package/src/ioc/contribution/decorator.ts +16 -0
- package/src/ioc/contribution/index.spec.ts +174 -0
- package/src/ioc/contribution/index.ts +13 -0
- package/src/ioc/core.ts +198 -0
- package/src/ioc/decorator.spec.ts +43 -0
- package/src/ioc/decorator.ts +54 -0
- package/src/ioc/features/auto-factory.spec.ts +90 -0
- package/src/ioc/features/auto-factory.ts +44 -0
- package/src/ioc/features/prioritized-contribution.ts +43 -0
- package/src/ioc/index.ts +8 -0
- package/src/ioc/inversify-api/index.spec.ts +224 -0
- package/src/ioc/inversify-api/index.ts +76 -0
- package/src/ioc/inversify-api/inversify-protocol.ts +31 -0
- package/src/ioc/module/index.spec.ts +68 -0
- package/src/ioc/module/index.ts +7 -0
- package/src/ioc/module/syringe-module.ts +95 -0
- package/src/ioc/register.spec.ts +75 -0
- package/src/ioc/register.ts +210 -0
- package/src/ioc/side-option.spec.ts +39 -0
- package/src/ioc/side-option.ts +14 -0
- package/src/l10n/index.ts +2 -0
- package/src/l10n/l10n/index.test.ts +145 -0
- package/src/l10n/l10n/index.ts +319 -0
- package/src/l10n/l10n/platform.ts +51 -0
- package/src/l10n/lang/bundle.l10n.en-US.json +5 -0
- package/src/l10n/lang/bundle.l10n.zh-CN.json +5 -0
- package/src/l10n/lang/index.ts +9 -0
- package/src/observable/async-event.spec.tsx +64 -0
- package/src/observable/async-event.ts +110 -0
- package/src/observable/async.spec.tsx +142 -0
- package/src/observable/config.spec.ts +12 -0
- package/src/observable/config.ts +26 -0
- package/src/observable/context.spec.tsx +360 -0
- package/src/observable/context.tsx +39 -0
- package/src/observable/core.ts +28 -0
- package/src/observable/decorator.spec.ts +41 -0
- package/src/observable/decorator.ts +19 -0
- package/src/observable/hooks.spec.tsx +244 -0
- package/src/observable/hooks.ts +39 -0
- package/src/observable/index.ts +11 -0
- package/src/observable/notifiable.spec.ts +205 -0
- package/src/observable/notifiable.ts +185 -0
- package/src/observable/notifier.spec.ts +141 -0
- package/src/observable/notifier.ts +126 -0
- package/src/observable/observable.spec.ts +265 -0
- package/src/observable/observable.ts +87 -0
- package/src/observable/tracker.spec.ts +697 -0
- package/src/observable/tracker.ts +240 -0
- package/src/observable/utils.spec.tsx +93 -0
- package/src/observable/utils.ts +160 -0
- package/src/observable/watch.spec.ts +112 -0
- package/src/observable/watch.ts +77 -0
- package/src/polling/poll.ts +2 -2
- package/src/polling/protocol.ts +1 -1
- package/src/protocol/cell-protocol.ts +1 -1
- package/src/react/constant.ts +1 -0
- package/src/react/dropdown/index.tsx +86 -0
- package/src/react/dropdown/styles/index.less +121 -0
- package/src/react/index.spec.ts +13 -0
- package/src/react/index.ts +8 -0
- package/src/react/layout/boxpanel/Pane.tsx +51 -0
- package/src/react/layout/boxpanel/context.ts +11 -0
- package/src/react/layout/boxpanel/index.tsx +65 -0
- package/src/react/layout/boxpanel/styles/index.less +14 -0
- package/src/react/layout/layout.ts +85 -0
- package/src/react/layout/splitpanel/context.ts +35 -0
- package/src/react/layout/splitpanel/index.tsx +325 -0
- package/src/react/layout/splitpanel/pane.tsx +19 -0
- package/src/react/layout/splitpanel/styles/index.less +10 -0
- package/src/react/menu/context.tsx +10 -0
- package/src/react/menu/divider.tsx +9 -0
- package/src/react/menu/index.ts +3 -0
- package/src/react/menu/item.tsx +83 -0
- package/src/react/menu/menu.tsx +46 -0
- package/src/react/menu/styles/index.less +163 -0
- package/src/react/menu/submenu.tsx +28 -0
- package/src/react/menubar/context.tsx +17 -0
- package/src/react/menubar/index.ts +1 -0
- package/src/react/menubar/item.tsx +103 -0
- package/src/react/menubar/menubar.tsx +123 -0
- package/src/react/menubar/styles/index.less +113 -0
- package/src/react/notification/index.tsx +208 -0
- package/src/react/notification/protocol.ts +138 -0
- package/src/react/notification/pure-panel.tsx +119 -0
- package/src/react/notification/render.ts +92 -0
- package/src/react/notification/style/index.less +192 -0
- package/src/react/notification/style/index.tsx +1 -0
- package/src/react/notification/style/placement.less +68 -0
- package/src/react/notification/use-notification.tsx +186 -0
- package/src/react/resize/index.tsx +769 -0
- package/src/react/resize/styles/index.less +83 -0
- package/src/react/styles/variables.less +2 -0
- package/src/react/tabs/index.tsx +75 -0
- package/src/react/tabs/styles/card.less +111 -0
- package/src/react/tabs/styles/dropdown.less +70 -0
- package/src/react/tabs/styles/index.less +231 -0
- package/src/react/tabs/styles/position.less +217 -0
- package/src/react/typings/index.d.ts +5 -0
- package/src/react/util.ts +5 -0
- package/src/url.ts +1 -1
|
@@ -0,0 +1,787 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
2
|
+
/* eslint-disable no-restricted-syntax */
|
|
3
|
+
/* eslint-disable no-plusplus */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-redeclare */
|
|
5
|
+
import { isOSX } from '../../common/index.js';
|
|
6
|
+
|
|
7
|
+
export type KeySequence = KeyCode[];
|
|
8
|
+
export namespace KeySequence {
|
|
9
|
+
export function equals(a: KeySequence, b: KeySequence): boolean {
|
|
10
|
+
if (a.length !== b.length) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
for (let i = 0; i < a.length; i++) {
|
|
15
|
+
if (!a[i].equals(b[i])) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum CompareResult {
|
|
23
|
+
NONE = 0,
|
|
24
|
+
PARTIAL,
|
|
25
|
+
SHADOW,
|
|
26
|
+
FULL,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Compares two KeySequences, returns:
|
|
30
|
+
* FULL if the KeySequences are the same.
|
|
31
|
+
* PARTIAL if the KeySequence a part of b.
|
|
32
|
+
* SHADOW if the KeySequence b part of a.
|
|
33
|
+
* NONE if the KeySequences are not the same at all.
|
|
34
|
+
*/
|
|
35
|
+
export function compare(a: KeySequence, b: KeySequence): CompareResult {
|
|
36
|
+
let first = a;
|
|
37
|
+
let second = b;
|
|
38
|
+
let shadow = false;
|
|
39
|
+
|
|
40
|
+
if (b.length < a.length) {
|
|
41
|
+
first = b;
|
|
42
|
+
second = a;
|
|
43
|
+
shadow = true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
for (let i = 0; i < first.length; i++) {
|
|
47
|
+
if (first[i].equals(second[i]) === false) {
|
|
48
|
+
return KeySequence.CompareResult.NONE;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (first.length < second.length) {
|
|
52
|
+
if (shadow === false) {
|
|
53
|
+
return KeySequence.CompareResult.PARTIAL;
|
|
54
|
+
}
|
|
55
|
+
return KeySequence.CompareResult.SHADOW;
|
|
56
|
+
}
|
|
57
|
+
return KeySequence.CompareResult.FULL;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function parse(keybinding: string): KeySequence {
|
|
61
|
+
const keyCodes = [];
|
|
62
|
+
const rawKeyCodes = keybinding.trim().split(/\s+/g);
|
|
63
|
+
for (const rawKeyCode of rawKeyCodes) {
|
|
64
|
+
const keyCode = KeyCode.parse(rawKeyCode);
|
|
65
|
+
if (keyCode !== undefined) {
|
|
66
|
+
keyCodes.push(keyCode);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return keyCodes;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The key sequence for this binding. This key sequence should consist of one or more key strokes. Key strokes
|
|
75
|
+
* consist of one or more keys held down at the same time. This should be zero or more modifier keys, and zero or one other key.
|
|
76
|
+
* Since `M2+M3+<Key>` (Alt+Shift+<Key>) is reserved on MacOS X for writing special characters, such bindings are commonly
|
|
77
|
+
* undefined for platform MacOS X and redefined as `M1+M3+<Key>`. The rule applies on the `M3+M2+<Key>` sequence.
|
|
78
|
+
*/
|
|
79
|
+
export type Keystroke = {
|
|
80
|
+
readonly first?: Key | undefined;
|
|
81
|
+
readonly modifiers?: KeyModifier[] | undefined;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export type KeyCodeSchema = {
|
|
85
|
+
key?: Partial<Key> | undefined;
|
|
86
|
+
ctrl?: boolean | undefined;
|
|
87
|
+
shift?: boolean | undefined;
|
|
88
|
+
alt?: boolean | undefined;
|
|
89
|
+
meta?: boolean | undefined;
|
|
90
|
+
character?: string | undefined;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Representation of a pressed key combined with key modifiers.
|
|
95
|
+
*/
|
|
96
|
+
export class KeyCode {
|
|
97
|
+
public readonly key: Key | undefined;
|
|
98
|
+
|
|
99
|
+
public readonly ctrl: boolean;
|
|
100
|
+
|
|
101
|
+
public readonly shift: boolean;
|
|
102
|
+
|
|
103
|
+
public readonly alt: boolean;
|
|
104
|
+
|
|
105
|
+
public readonly meta: boolean;
|
|
106
|
+
|
|
107
|
+
public readonly character: string | undefined;
|
|
108
|
+
|
|
109
|
+
public constructor(schema: KeyCodeSchema) {
|
|
110
|
+
const { key } = schema;
|
|
111
|
+
if (key) {
|
|
112
|
+
if (key.code && key.keyCode && key.easyString) {
|
|
113
|
+
this.key = key as Key;
|
|
114
|
+
} else if (key.code) {
|
|
115
|
+
this.key = Key.getKey(key.code);
|
|
116
|
+
} else if (key.keyCode) {
|
|
117
|
+
this.key = Key.getKey(key.keyCode);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
this.ctrl = !!schema.ctrl;
|
|
121
|
+
this.shift = !!schema.shift;
|
|
122
|
+
this.alt = !!schema.alt;
|
|
123
|
+
this.meta = !!schema.meta;
|
|
124
|
+
this.character = schema.character;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Return true if this KeyCode only contains modifiers.
|
|
129
|
+
*/
|
|
130
|
+
public isModifierOnly(): boolean {
|
|
131
|
+
return this.key === undefined;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Return true if the given KeyCode is equal to this one.
|
|
136
|
+
*/
|
|
137
|
+
equals(other: KeyCode): boolean {
|
|
138
|
+
if (
|
|
139
|
+
(this.key && (!other.key || this.key.code !== other.key.code)) ||
|
|
140
|
+
(!this.key && other.key)
|
|
141
|
+
) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
return (
|
|
145
|
+
this.ctrl === other.ctrl &&
|
|
146
|
+
this.alt === other.alt &&
|
|
147
|
+
this.shift === other.shift &&
|
|
148
|
+
this.meta === other.meta
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/*
|
|
153
|
+
* Return a keybinding string compatible with the `Keybinding.keybinding` property.
|
|
154
|
+
*/
|
|
155
|
+
toString(): string {
|
|
156
|
+
const result = [];
|
|
157
|
+
if (this.meta) {
|
|
158
|
+
result.push(SpecialCases.META);
|
|
159
|
+
}
|
|
160
|
+
if (this.shift) {
|
|
161
|
+
result.push(Key.SHIFT_LEFT.easyString);
|
|
162
|
+
}
|
|
163
|
+
if (this.alt) {
|
|
164
|
+
result.push(Key.ALT_LEFT.easyString);
|
|
165
|
+
}
|
|
166
|
+
if (this.ctrl) {
|
|
167
|
+
result.push(Key.CONTROL_LEFT.easyString);
|
|
168
|
+
}
|
|
169
|
+
if (this.key) {
|
|
170
|
+
result.push(this.key.easyString);
|
|
171
|
+
}
|
|
172
|
+
return result.join('+');
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Create a KeyCode from one of several input types.
|
|
177
|
+
*/
|
|
178
|
+
public static createKeyCode(
|
|
179
|
+
input: KeyboardEvent | Keystroke | KeyCodeSchema | string,
|
|
180
|
+
eventDispatch: 'code' | 'keyCode' = 'code',
|
|
181
|
+
): KeyCode {
|
|
182
|
+
if (typeof input === 'string') {
|
|
183
|
+
const parts = input.split('+');
|
|
184
|
+
if (!KeyCode.isModifierString(parts[0])) {
|
|
185
|
+
return KeyCode.createKeyCode({
|
|
186
|
+
first: Key.getKey(parts[0]),
|
|
187
|
+
modifiers: parts.slice(1) as KeyModifier[],
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
return KeyCode.createKeyCode({ modifiers: parts as KeyModifier[] });
|
|
191
|
+
}
|
|
192
|
+
if (KeyCode.isKeyboardEvent(input)) {
|
|
193
|
+
const key = KeyCode.toKey(input, eventDispatch);
|
|
194
|
+
return new KeyCode({
|
|
195
|
+
key: Key.isModifier(key.code) ? undefined : key,
|
|
196
|
+
meta: isOSX && input.metaKey,
|
|
197
|
+
shift: input.shiftKey,
|
|
198
|
+
alt: input.altKey,
|
|
199
|
+
ctrl: input.ctrlKey,
|
|
200
|
+
character: KeyCode.toCharacter(input),
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
if ((input as Keystroke).first || (input as Keystroke).modifiers) {
|
|
204
|
+
const keystroke = input as Keystroke;
|
|
205
|
+
const schema: KeyCodeSchema = {
|
|
206
|
+
key: keystroke.first,
|
|
207
|
+
};
|
|
208
|
+
if (keystroke.modifiers) {
|
|
209
|
+
if (isOSX) {
|
|
210
|
+
schema.meta = keystroke.modifiers.some((mod) => mod === KeyModifier.CtrlCmd);
|
|
211
|
+
schema.ctrl = keystroke.modifiers.some((mod) => mod === KeyModifier.MacCtrl);
|
|
212
|
+
} else {
|
|
213
|
+
schema.meta = false;
|
|
214
|
+
schema.ctrl = keystroke.modifiers.some((mod) => mod === KeyModifier.CtrlCmd);
|
|
215
|
+
}
|
|
216
|
+
schema.shift = keystroke.modifiers.some((mod) => mod === KeyModifier.Shift);
|
|
217
|
+
schema.alt = keystroke.modifiers.some((mod) => mod === KeyModifier.Alt);
|
|
218
|
+
}
|
|
219
|
+
return new KeyCode(schema);
|
|
220
|
+
}
|
|
221
|
+
return new KeyCode(input as KeyCodeSchema);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
private static keybindings: Record<string, KeyCode> = {};
|
|
225
|
+
|
|
226
|
+
/* Reset the key hashmap, this is for testing purposes. */
|
|
227
|
+
public static resetKeyBindings(): void {
|
|
228
|
+
KeyCode.keybindings = {};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Parses a string and returns a KeyCode object.
|
|
233
|
+
* @param keybinding String representation of a keybinding
|
|
234
|
+
*/
|
|
235
|
+
public static parse(keybinding: string): KeyCode {
|
|
236
|
+
if (KeyCode.keybindings[keybinding]) {
|
|
237
|
+
return KeyCode.keybindings[keybinding];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const schema: KeyCodeSchema = {};
|
|
241
|
+
const keys = [];
|
|
242
|
+
let currentKey = '';
|
|
243
|
+
for (const character of keybinding.trim().toLowerCase()) {
|
|
244
|
+
if (currentKey && (character === '-' || character === '+')) {
|
|
245
|
+
keys.push(currentKey);
|
|
246
|
+
currentKey = '';
|
|
247
|
+
} else if (character !== '+') {
|
|
248
|
+
currentKey += character;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (currentKey) {
|
|
252
|
+
keys.push(currentKey);
|
|
253
|
+
}
|
|
254
|
+
/* If duplicates i.e ctrl+ctrl+a or alt+alt+b or b+alt+b it is invalid */
|
|
255
|
+
if (keys.length !== new Set(keys).size) {
|
|
256
|
+
throw new Error(`Can't parse keybinding ${keybinding} Duplicate modifiers`);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
for (let keyString of keys) {
|
|
260
|
+
if (SPECIAL_ALIASES[keyString] !== undefined) {
|
|
261
|
+
keyString = SPECIAL_ALIASES[keyString];
|
|
262
|
+
}
|
|
263
|
+
const key = EASY_TO_KEY[keyString];
|
|
264
|
+
|
|
265
|
+
/* meta only works on macOS */
|
|
266
|
+
if (keyString === SpecialCases.META) {
|
|
267
|
+
if (isOSX) {
|
|
268
|
+
schema.meta = true;
|
|
269
|
+
} else {
|
|
270
|
+
throw new Error(`Can't parse keybinding ${keybinding} meta is for OSX only`);
|
|
271
|
+
}
|
|
272
|
+
/* ctrlcmd for M1 keybindings that work on both macOS and other platforms */
|
|
273
|
+
} else if (keyString === SpecialCases.CTRLCMD) {
|
|
274
|
+
if (isOSX) {
|
|
275
|
+
schema.meta = true;
|
|
276
|
+
} else {
|
|
277
|
+
schema.ctrl = true;
|
|
278
|
+
}
|
|
279
|
+
} else if (Key.isKey(key)) {
|
|
280
|
+
if (Key.isModifier(key.code)) {
|
|
281
|
+
if (
|
|
282
|
+
key.code === Key.CONTROL_LEFT.code ||
|
|
283
|
+
key.code === Key.CONTROL_RIGHT.code
|
|
284
|
+
) {
|
|
285
|
+
schema.ctrl = true;
|
|
286
|
+
} else if (
|
|
287
|
+
key.code === Key.SHIFT_LEFT.code ||
|
|
288
|
+
key.code === Key.SHIFT_RIGHT.code
|
|
289
|
+
) {
|
|
290
|
+
schema.shift = true;
|
|
291
|
+
} else if (
|
|
292
|
+
key.code === Key.ALT_LEFT.code ||
|
|
293
|
+
key.code === Key.ALT_RIGHT.code
|
|
294
|
+
) {
|
|
295
|
+
schema.alt = true;
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
schema.key = key;
|
|
299
|
+
}
|
|
300
|
+
} else {
|
|
301
|
+
throw new Error(`Unrecognized key '${keyString}' in '${keybinding}'`);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
KeyCode.keybindings[keybinding] = new KeyCode(schema);
|
|
306
|
+
return KeyCode.keybindings[keybinding];
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export namespace KeyCode {
|
|
311
|
+
/**
|
|
312
|
+
* Determines a `true` of `false` value for the key code argument.
|
|
313
|
+
*/
|
|
314
|
+
export type Predicate = (keyCode: KeyCode) => boolean;
|
|
315
|
+
|
|
316
|
+
/*
|
|
317
|
+
* Return true if the string is a modifier M1 to M4.
|
|
318
|
+
*/
|
|
319
|
+
export function isModifierString(key: string): boolean {
|
|
320
|
+
return (
|
|
321
|
+
key === KeyModifier.CtrlCmd ||
|
|
322
|
+
key === KeyModifier.Shift ||
|
|
323
|
+
key === KeyModifier.Alt ||
|
|
324
|
+
key === KeyModifier.MacCtrl
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Different scopes have different execution environments. This means that they have different built-ins
|
|
330
|
+
* (different global object, different constructors, etc.). This may result in unexpected results. For instance,
|
|
331
|
+
* `[] instanceof window.frames[0].Array` will return `false`, because `Array.prototype !== window.frames[0].Array`
|
|
332
|
+
* and arrays inherit from the former.
|
|
333
|
+
* See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof
|
|
334
|
+
*
|
|
335
|
+
* Note: just add another check if the current `event.type` checking is insufficient.
|
|
336
|
+
*/
|
|
337
|
+
export function isKeyboardEvent(
|
|
338
|
+
event: object & { readonly type?: string },
|
|
339
|
+
): event is KeyboardEvent {
|
|
340
|
+
if (typeof KeyboardEvent === 'undefined') {
|
|
341
|
+
// This can happen in tests
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
if (event instanceof KeyboardEvent) {
|
|
345
|
+
return true;
|
|
346
|
+
}
|
|
347
|
+
const { type } = event;
|
|
348
|
+
if (type) {
|
|
349
|
+
return type === 'keypress' || type === 'keydown' || type === 'keyup';
|
|
350
|
+
}
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Determine the pressed key of a keyboard event. This key should correspond to the physical key according
|
|
356
|
+
* to a standard US keyboard layout. International keyboard layouts are handled by `KeyboardLayoutService`.
|
|
357
|
+
*
|
|
358
|
+
* `keyIdentifier` is used to access this deprecated field:
|
|
359
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyIdentifier
|
|
360
|
+
*/
|
|
361
|
+
export function toKey(
|
|
362
|
+
event: KeyboardEvent,
|
|
363
|
+
dispatch: 'code' | 'keyCode' = 'code',
|
|
364
|
+
): Key {
|
|
365
|
+
const { code } = event;
|
|
366
|
+
if (code && dispatch === 'code') {
|
|
367
|
+
if (isOSX) {
|
|
368
|
+
// https://github.com/eclipse-mana/mana/issues/4986
|
|
369
|
+
const char = event.key;
|
|
370
|
+
if (code === 'IntlBackslash' && (char === '`' || char === '~')) {
|
|
371
|
+
return Key.BACKQUOTE;
|
|
372
|
+
}
|
|
373
|
+
if (code === 'Backquote' && (char === '§' || char === '±')) {
|
|
374
|
+
return Key.INTL_BACKSLASH;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// https://github.com/eclipse-mana/mana/issues/7315
|
|
379
|
+
if (code.startsWith('Numpad') && event.key && event.key.length > 1) {
|
|
380
|
+
const k = Key.getKey(event.key);
|
|
381
|
+
if (k) {
|
|
382
|
+
return k;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
const key = Key.getKey(code);
|
|
387
|
+
if (key) {
|
|
388
|
+
return key;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// tslint:disable-next-line: deprecation
|
|
393
|
+
const { keyCode } = event;
|
|
394
|
+
if (keyCode) {
|
|
395
|
+
const key = Key.getKey(keyCode);
|
|
396
|
+
if (key) {
|
|
397
|
+
return key;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
const { keyIdentifier } = event as KeyboardEvent & { keyIdentifier?: string };
|
|
402
|
+
if (keyIdentifier) {
|
|
403
|
+
const key = Key.getKey(keyIdentifier);
|
|
404
|
+
if (key) {
|
|
405
|
+
return key;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
throw new Error(`Cannot get key code from the keyboard event: ${event}.`);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Determine the actual printable character that is generated from a pressed key.
|
|
413
|
+
* If the key does not correspond to a printable character, `undefined` is returned.
|
|
414
|
+
* The result may be altered by modifier keys.
|
|
415
|
+
*/
|
|
416
|
+
export function toCharacter(event: KeyboardEvent): string | undefined {
|
|
417
|
+
const { key } = event;
|
|
418
|
+
// Use the key property if it contains exactly one unicode character
|
|
419
|
+
if (key && Array.from(key).length === 1) {
|
|
420
|
+
return key;
|
|
421
|
+
}
|
|
422
|
+
const { charCode } = event;
|
|
423
|
+
// Use the charCode property if it does not correspond to a unicode control character
|
|
424
|
+
if (charCode && charCode > 0x1f && !(charCode >= 0x80 && charCode <= 0x9f)) {
|
|
425
|
+
return String.fromCharCode(charCode);
|
|
426
|
+
}
|
|
427
|
+
return undefined;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export enum KeyModifier {
|
|
432
|
+
/**
|
|
433
|
+
* M1 is the COMMAND key on MacOS X, and the CTRL key on most other platforms.
|
|
434
|
+
*/
|
|
435
|
+
CtrlCmd = 'M1',
|
|
436
|
+
/**
|
|
437
|
+
* M2 is the SHIFT key.
|
|
438
|
+
*/
|
|
439
|
+
Shift = 'M2',
|
|
440
|
+
/**
|
|
441
|
+
* M3 is the Option key on MacOS X, and the ALT key on most other platforms.
|
|
442
|
+
*/
|
|
443
|
+
Alt = 'M3',
|
|
444
|
+
/**
|
|
445
|
+
* M4 is the CTRL key on MacOS X, and is undefined on other platforms.
|
|
446
|
+
*/
|
|
447
|
+
MacCtrl = 'M4',
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export namespace KeyModifier {
|
|
451
|
+
/**
|
|
452
|
+
* The CTRL key, independently of the platform.
|
|
453
|
+
* _Note:_ In general `KeyModifier.CtrlCmd` should be preferred over this constant.
|
|
454
|
+
*/
|
|
455
|
+
export const CTRL: KeyModifier.MacCtrl | KeyModifier.CtrlCmd = isOSX
|
|
456
|
+
? KeyModifier.MacCtrl
|
|
457
|
+
: KeyModifier.CtrlCmd;
|
|
458
|
+
/**
|
|
459
|
+
* An alias for the SHIFT key (`KeyModifier.Shift`).
|
|
460
|
+
*/
|
|
461
|
+
export const SHIFT: KeyModifier.Shift = KeyModifier.Shift;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* `true` if the argument represents a modifier. Otherwise, `false`.
|
|
465
|
+
*/
|
|
466
|
+
export function isModifier(key: string | undefined): boolean {
|
|
467
|
+
if (key) {
|
|
468
|
+
switch (key) {
|
|
469
|
+
case 'M1': // Fall through.
|
|
470
|
+
case 'M2': // Fall through.
|
|
471
|
+
case 'M3': // Fall through.
|
|
472
|
+
case 'M4':
|
|
473
|
+
return true;
|
|
474
|
+
default:
|
|
475
|
+
return false;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
return false;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export type Key = {
|
|
483
|
+
readonly code: string;
|
|
484
|
+
readonly keyCode: number;
|
|
485
|
+
readonly easyString: string;
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
const CODE_TO_KEY: Record<string, Key> = {};
|
|
489
|
+
const KEY_CODE_TO_KEY: Record<number, Key> = {};
|
|
490
|
+
const EASY_TO_KEY: Record<string, Key> = {}; // From 'ctrl' to Key structure
|
|
491
|
+
const MODIFIERS: Key[] = [];
|
|
492
|
+
|
|
493
|
+
const SPECIAL_ALIASES: Record<string, string> = {
|
|
494
|
+
option: 'alt',
|
|
495
|
+
command: 'meta',
|
|
496
|
+
cmd: 'meta',
|
|
497
|
+
return: 'enter',
|
|
498
|
+
esc: 'escape',
|
|
499
|
+
mod: 'ctrl',
|
|
500
|
+
ins: 'insert',
|
|
501
|
+
del: 'delete',
|
|
502
|
+
control: 'ctrl',
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
export namespace SpecialCases {
|
|
506
|
+
export const META = 'meta';
|
|
507
|
+
export const CTRLCMD = 'ctrlcmd';
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export namespace Key {
|
|
511
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
512
|
+
export function isKey(arg: any): arg is Key {
|
|
513
|
+
return typeof arg === 'object' && 'code' in arg && 'keyCode' in arg;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export function getKey(arg: string | number): Key | undefined {
|
|
517
|
+
if (typeof arg === 'number') {
|
|
518
|
+
return KEY_CODE_TO_KEY[arg];
|
|
519
|
+
}
|
|
520
|
+
return CODE_TO_KEY[arg];
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export function isModifier(arg: string | number): boolean {
|
|
524
|
+
if (typeof arg === 'number') {
|
|
525
|
+
return MODIFIERS.find((key) => key.keyCode === arg) !== undefined;
|
|
526
|
+
}
|
|
527
|
+
return MODIFIERS.find((key) => key.code === arg) !== undefined;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export function equals(key: Key, keyCode: KeyCode): boolean {
|
|
531
|
+
return !!keyCode.key && key.keyCode === keyCode.key.keyCode;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export const BACKSPACE: Key = {
|
|
535
|
+
code: 'Backspace',
|
|
536
|
+
keyCode: 8,
|
|
537
|
+
easyString: 'backspace',
|
|
538
|
+
};
|
|
539
|
+
export const TAB: Key = { code: 'Tab', keyCode: 9, easyString: 'tab' };
|
|
540
|
+
export const ENTER: Key = { code: 'Enter', keyCode: 13, easyString: 'enter' };
|
|
541
|
+
export const ESCAPE: Key = { code: 'Escape', keyCode: 27, easyString: 'escape' };
|
|
542
|
+
export const SPACE: Key = { code: 'Space', keyCode: 32, easyString: 'space' };
|
|
543
|
+
export const PAGE_UP: Key = { code: 'PageUp', keyCode: 33, easyString: 'pageup' };
|
|
544
|
+
export const PAGE_DOWN: Key = {
|
|
545
|
+
code: 'PageDown',
|
|
546
|
+
keyCode: 34,
|
|
547
|
+
easyString: 'pagedown',
|
|
548
|
+
};
|
|
549
|
+
export const END: Key = { code: 'End', keyCode: 35, easyString: 'end' };
|
|
550
|
+
export const HOME: Key = { code: 'Home', keyCode: 36, easyString: 'home' };
|
|
551
|
+
export const ARROW_LEFT: Key = { code: 'ArrowLeft', keyCode: 37, easyString: 'left' };
|
|
552
|
+
export const ARROW_UP: Key = { code: 'ArrowUp', keyCode: 38, easyString: 'up' };
|
|
553
|
+
export const ARROW_RIGHT: Key = {
|
|
554
|
+
code: 'ArrowRight',
|
|
555
|
+
keyCode: 39,
|
|
556
|
+
easyString: 'right',
|
|
557
|
+
};
|
|
558
|
+
export const ARROW_DOWN: Key = { code: 'ArrowDown', keyCode: 40, easyString: 'down' };
|
|
559
|
+
export const INSERT: Key = { code: 'Insert', keyCode: 45, easyString: 'insert' };
|
|
560
|
+
export const DELETE: Key = { code: 'Delete', keyCode: 46, easyString: 'delete' };
|
|
561
|
+
|
|
562
|
+
export const SHIFT_LEFT: Key = {
|
|
563
|
+
code: 'ShiftLeft',
|
|
564
|
+
keyCode: 16,
|
|
565
|
+
easyString: 'shift',
|
|
566
|
+
};
|
|
567
|
+
export const SHIFT_RIGHT: Key = {
|
|
568
|
+
code: 'ShiftRight',
|
|
569
|
+
keyCode: 16,
|
|
570
|
+
easyString: 'shift',
|
|
571
|
+
};
|
|
572
|
+
export const CONTROL_LEFT: Key = {
|
|
573
|
+
code: 'ControlLeft',
|
|
574
|
+
keyCode: 17,
|
|
575
|
+
easyString: 'ctrl',
|
|
576
|
+
};
|
|
577
|
+
export const CONTROL_RIGHT: Key = {
|
|
578
|
+
code: 'ControlRight',
|
|
579
|
+
keyCode: 17,
|
|
580
|
+
easyString: 'ctrl',
|
|
581
|
+
};
|
|
582
|
+
export const ALT_LEFT: Key = { code: 'AltLeft', keyCode: 18, easyString: 'alt' };
|
|
583
|
+
export const ALT_RIGHT: Key = { code: 'AltRight', keyCode: 18, easyString: 'alt' };
|
|
584
|
+
export const CAPS_LOCK: Key = {
|
|
585
|
+
code: 'CapsLock',
|
|
586
|
+
keyCode: 20,
|
|
587
|
+
easyString: 'capslock',
|
|
588
|
+
};
|
|
589
|
+
export const OS_LEFT: Key = { code: 'OSLeft', keyCode: 91, easyString: 'super' };
|
|
590
|
+
export const OS_RIGHT: Key = { code: 'OSRight', keyCode: 92, easyString: 'super' };
|
|
591
|
+
|
|
592
|
+
export const DIGIT0: Key = { code: 'Digit0', keyCode: 48, easyString: '0' };
|
|
593
|
+
export const DIGIT1: Key = { code: 'Digit1', keyCode: 49, easyString: '1' };
|
|
594
|
+
export const DIGIT2: Key = { code: 'Digit2', keyCode: 50, easyString: '2' };
|
|
595
|
+
export const DIGIT3: Key = { code: 'Digit3', keyCode: 51, easyString: '3' };
|
|
596
|
+
export const DIGIT4: Key = { code: 'Digit4', keyCode: 52, easyString: '4' };
|
|
597
|
+
export const DIGIT5: Key = { code: 'Digit5', keyCode: 53, easyString: '5' };
|
|
598
|
+
export const DIGIT6: Key = { code: 'Digit6', keyCode: 54, easyString: '6' };
|
|
599
|
+
export const DIGIT7: Key = { code: 'Digit7', keyCode: 55, easyString: '7' };
|
|
600
|
+
export const DIGIT8: Key = { code: 'Digit8', keyCode: 56, easyString: '8' };
|
|
601
|
+
export const DIGIT9: Key = { code: 'Digit9', keyCode: 57, easyString: '9' };
|
|
602
|
+
|
|
603
|
+
export const KEY_A: Key = { code: 'KeyA', keyCode: 65, easyString: 'a' };
|
|
604
|
+
export const KEY_B: Key = { code: 'KeyB', keyCode: 66, easyString: 'b' };
|
|
605
|
+
export const KEY_C: Key = { code: 'KeyC', keyCode: 67, easyString: 'c' };
|
|
606
|
+
export const KEY_D: Key = { code: 'KeyD', keyCode: 68, easyString: 'd' };
|
|
607
|
+
export const KEY_E: Key = { code: 'KeyE', keyCode: 69, easyString: 'e' };
|
|
608
|
+
export const KEY_F: Key = { code: 'KeyF', keyCode: 70, easyString: 'f' };
|
|
609
|
+
export const KEY_G: Key = { code: 'KeyG', keyCode: 71, easyString: 'g' };
|
|
610
|
+
export const KEY_H: Key = { code: 'KeyH', keyCode: 72, easyString: 'h' };
|
|
611
|
+
export const KEY_I: Key = { code: 'KeyI', keyCode: 73, easyString: 'i' };
|
|
612
|
+
export const KEY_J: Key = { code: 'KeyJ', keyCode: 74, easyString: 'j' };
|
|
613
|
+
export const KEY_K: Key = { code: 'KeyK', keyCode: 75, easyString: 'k' };
|
|
614
|
+
export const KEY_L: Key = { code: 'KeyL', keyCode: 76, easyString: 'l' };
|
|
615
|
+
export const KEY_M: Key = { code: 'KeyM', keyCode: 77, easyString: 'm' };
|
|
616
|
+
export const KEY_N: Key = { code: 'KeyN', keyCode: 78, easyString: 'n' };
|
|
617
|
+
export const KEY_O: Key = { code: 'KeyO', keyCode: 79, easyString: 'o' };
|
|
618
|
+
export const KEY_P: Key = { code: 'KeyP', keyCode: 80, easyString: 'p' };
|
|
619
|
+
export const KEY_Q: Key = { code: 'KeyQ', keyCode: 81, easyString: 'q' };
|
|
620
|
+
export const KEY_R: Key = { code: 'KeyR', keyCode: 82, easyString: 'r' };
|
|
621
|
+
export const KEY_S: Key = { code: 'KeyS', keyCode: 83, easyString: 's' };
|
|
622
|
+
export const KEY_T: Key = { code: 'KeyT', keyCode: 84, easyString: 't' };
|
|
623
|
+
export const KEY_U: Key = { code: 'KeyU', keyCode: 85, easyString: 'u' };
|
|
624
|
+
export const KEY_V: Key = { code: 'KeyV', keyCode: 86, easyString: 'v' };
|
|
625
|
+
export const KEY_W: Key = { code: 'KeyW', keyCode: 87, easyString: 'w' };
|
|
626
|
+
export const KEY_X: Key = { code: 'KeyX', keyCode: 88, easyString: 'x' };
|
|
627
|
+
export const KEY_Y: Key = { code: 'KeyY', keyCode: 89, easyString: 'y' };
|
|
628
|
+
export const KEY_Z: Key = { code: 'KeyZ', keyCode: 90, easyString: 'z' };
|
|
629
|
+
|
|
630
|
+
export const MULTIPLY: Key = {
|
|
631
|
+
code: 'NumpadMultiply',
|
|
632
|
+
keyCode: 106,
|
|
633
|
+
easyString: 'multiply',
|
|
634
|
+
};
|
|
635
|
+
export const ADD: Key = { code: 'NumpadAdd', keyCode: 107, easyString: 'add' };
|
|
636
|
+
export const DECIMAL: Key = {
|
|
637
|
+
code: 'NumpadDecimal',
|
|
638
|
+
keyCode: 108,
|
|
639
|
+
easyString: 'decimal',
|
|
640
|
+
};
|
|
641
|
+
export const SUBTRACT: Key = {
|
|
642
|
+
code: 'NumpadSubtract',
|
|
643
|
+
keyCode: 109,
|
|
644
|
+
easyString: 'subtract',
|
|
645
|
+
};
|
|
646
|
+
export const DIVIDE: Key = {
|
|
647
|
+
code: 'NumpadDivide',
|
|
648
|
+
keyCode: 111,
|
|
649
|
+
easyString: 'divide',
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
export const F1: Key = { code: 'F1', keyCode: 112, easyString: 'f1' };
|
|
653
|
+
export const F2: Key = { code: 'F2', keyCode: 113, easyString: 'f2' };
|
|
654
|
+
export const F3: Key = { code: 'F3', keyCode: 114, easyString: 'f3' };
|
|
655
|
+
export const F4: Key = { code: 'F4', keyCode: 115, easyString: 'f4' };
|
|
656
|
+
export const F5: Key = { code: 'F5', keyCode: 116, easyString: 'f5' };
|
|
657
|
+
export const F6: Key = { code: 'F6', keyCode: 117, easyString: 'f6' };
|
|
658
|
+
export const F7: Key = { code: 'F7', keyCode: 118, easyString: 'f7' };
|
|
659
|
+
export const F8: Key = { code: 'F8', keyCode: 119, easyString: 'f8' };
|
|
660
|
+
export const F9: Key = { code: 'F9', keyCode: 120, easyString: 'f9' };
|
|
661
|
+
export const F10: Key = { code: 'F10', keyCode: 121, easyString: 'f10' };
|
|
662
|
+
export const F11: Key = { code: 'F11', keyCode: 122, easyString: 'f11' };
|
|
663
|
+
export const F12: Key = { code: 'F12', keyCode: 123, easyString: 'f12' };
|
|
664
|
+
export const F13: Key = { code: 'F13', keyCode: 124, easyString: 'f13' };
|
|
665
|
+
export const F14: Key = { code: 'F14', keyCode: 125, easyString: 'f14' };
|
|
666
|
+
export const F15: Key = { code: 'F15', keyCode: 126, easyString: 'f15' };
|
|
667
|
+
export const F16: Key = { code: 'F16', keyCode: 127, easyString: 'f16' };
|
|
668
|
+
export const F17: Key = { code: 'F17', keyCode: 128, easyString: 'f17' };
|
|
669
|
+
export const F18: Key = { code: 'F18', keyCode: 129, easyString: 'f18' };
|
|
670
|
+
export const F19: Key = { code: 'F19', keyCode: 130, easyString: 'f19' };
|
|
671
|
+
export const F20: Key = { code: 'F20', keyCode: 131, easyString: 'f20' };
|
|
672
|
+
export const F21: Key = { code: 'F21', keyCode: 132, easyString: 'f21' };
|
|
673
|
+
export const F22: Key = { code: 'F22', keyCode: 133, easyString: 'f22' };
|
|
674
|
+
export const F23: Key = { code: 'F23', keyCode: 134, easyString: 'f23' };
|
|
675
|
+
export const F24: Key = { code: 'F24', keyCode: 135, easyString: 'f24' };
|
|
676
|
+
|
|
677
|
+
export const NUM_LOCK: Key = { code: 'NumLock', keyCode: 144, easyString: 'numlock' };
|
|
678
|
+
export const SEMICOLON: Key = { code: 'Semicolon', keyCode: 186, easyString: ';' };
|
|
679
|
+
export const EQUAL: Key = { code: 'Equal', keyCode: 187, easyString: '=' };
|
|
680
|
+
export const COMMA: Key = { code: 'Comma', keyCode: 188, easyString: ',' };
|
|
681
|
+
export const MINUS: Key = { code: 'Minus', keyCode: 189, easyString: '-' };
|
|
682
|
+
export const PERIOD: Key = { code: 'Period', keyCode: 190, easyString: '.' };
|
|
683
|
+
export const SLASH: Key = { code: 'Slash', keyCode: 191, easyString: '/' };
|
|
684
|
+
export const BACKQUOTE: Key = { code: 'Backquote', keyCode: 192, easyString: '`' };
|
|
685
|
+
export const INTL_RO: Key = { code: 'IntlRo', keyCode: 193, easyString: 'intlro' };
|
|
686
|
+
export const BRACKET_LEFT: Key = {
|
|
687
|
+
code: 'BracketLeft',
|
|
688
|
+
keyCode: 219,
|
|
689
|
+
easyString: '[',
|
|
690
|
+
};
|
|
691
|
+
export const BACKSLASH: Key = { code: 'Backslash', keyCode: 220, easyString: '\\' };
|
|
692
|
+
export const BRACKET_RIGHT: Key = {
|
|
693
|
+
code: 'BracketRight',
|
|
694
|
+
keyCode: 221,
|
|
695
|
+
easyString: ']',
|
|
696
|
+
};
|
|
697
|
+
export const QUOTE: Key = { code: 'Quote', keyCode: 222, easyString: "'" };
|
|
698
|
+
export const INTL_BACKSLASH: Key = {
|
|
699
|
+
code: 'IntlBackslash',
|
|
700
|
+
keyCode: 229,
|
|
701
|
+
easyString: 'intlbackslash',
|
|
702
|
+
};
|
|
703
|
+
export const INTL_YEN: Key = { code: 'IntlYen', keyCode: 255, easyString: 'intlyen' };
|
|
704
|
+
|
|
705
|
+
export const MAX_KEY_CODE = INTL_YEN.keyCode;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/* -------------------- Initialize the static key mappings -------------------- */
|
|
709
|
+
(() => {
|
|
710
|
+
// Set the default key mappings from the constants in the Key namespace
|
|
711
|
+
Object.keys(Key)
|
|
712
|
+
.map((prop) => Reflect.get(Key, prop))
|
|
713
|
+
.filter((key) => Key.isKey(key))
|
|
714
|
+
.forEach((key) => {
|
|
715
|
+
CODE_TO_KEY[key.code] = key;
|
|
716
|
+
KEY_CODE_TO_KEY[key.keyCode] = key;
|
|
717
|
+
EASY_TO_KEY[key.easyString] = key;
|
|
718
|
+
});
|
|
719
|
+
|
|
720
|
+
// Set additional key mappings
|
|
721
|
+
// Set additional key mappings
|
|
722
|
+
CODE_TO_KEY['Numpad0'] = Key.DIGIT0;
|
|
723
|
+
KEY_CODE_TO_KEY[96] = Key.DIGIT0;
|
|
724
|
+
CODE_TO_KEY['Numpad1'] = Key.DIGIT1;
|
|
725
|
+
KEY_CODE_TO_KEY[97] = Key.DIGIT1;
|
|
726
|
+
CODE_TO_KEY['Numpad2'] = Key.DIGIT2;
|
|
727
|
+
KEY_CODE_TO_KEY[98] = Key.DIGIT2;
|
|
728
|
+
CODE_TO_KEY['Numpad3'] = Key.DIGIT3;
|
|
729
|
+
KEY_CODE_TO_KEY[99] = Key.DIGIT3;
|
|
730
|
+
CODE_TO_KEY['Numpad4'] = Key.DIGIT4;
|
|
731
|
+
KEY_CODE_TO_KEY[100] = Key.DIGIT4;
|
|
732
|
+
CODE_TO_KEY['Numpad5'] = Key.DIGIT5;
|
|
733
|
+
KEY_CODE_TO_KEY[101] = Key.DIGIT5;
|
|
734
|
+
CODE_TO_KEY['Numpad6'] = Key.DIGIT6;
|
|
735
|
+
KEY_CODE_TO_KEY[102] = Key.DIGIT6;
|
|
736
|
+
CODE_TO_KEY['Numpad7'] = Key.DIGIT7;
|
|
737
|
+
KEY_CODE_TO_KEY[103] = Key.DIGIT7;
|
|
738
|
+
CODE_TO_KEY['Numpad8'] = Key.DIGIT8;
|
|
739
|
+
KEY_CODE_TO_KEY[104] = Key.DIGIT8;
|
|
740
|
+
CODE_TO_KEY['Numpad9'] = Key.DIGIT9;
|
|
741
|
+
KEY_CODE_TO_KEY[105] = Key.DIGIT9;
|
|
742
|
+
CODE_TO_KEY['NumpadEnter'] = Key.ENTER;
|
|
743
|
+
CODE_TO_KEY['NumpadEqual'] = Key.EQUAL;
|
|
744
|
+
CODE_TO_KEY['MetaLeft'] = Key.OS_LEFT; // Chrome, Safari
|
|
745
|
+
KEY_CODE_TO_KEY[224] = Key.OS_LEFT; // Firefox on Mac
|
|
746
|
+
CODE_TO_KEY['MetaRight'] = Key.OS_RIGHT; // Chrome, Safari
|
|
747
|
+
KEY_CODE_TO_KEY[93] = Key.OS_RIGHT; // Chrome, Safari, Edge
|
|
748
|
+
KEY_CODE_TO_KEY[225] = Key.ALT_RIGHT; // Linux
|
|
749
|
+
KEY_CODE_TO_KEY[110] = Key.DECIMAL; // Mac, Windows
|
|
750
|
+
KEY_CODE_TO_KEY[59] = Key.SEMICOLON; // Firefox
|
|
751
|
+
KEY_CODE_TO_KEY[61] = Key.EQUAL; // Firefox
|
|
752
|
+
KEY_CODE_TO_KEY[173] = Key.MINUS; // Firefox
|
|
753
|
+
KEY_CODE_TO_KEY[226] = Key.BACKSLASH; // Chrome, Edge on Windows
|
|
754
|
+
KEY_CODE_TO_KEY[60] = Key.BACKSLASH; // Firefox on Linux
|
|
755
|
+
|
|
756
|
+
// Set the modifier keys
|
|
757
|
+
MODIFIERS.push(
|
|
758
|
+
...[
|
|
759
|
+
Key.ALT_LEFT,
|
|
760
|
+
Key.ALT_RIGHT,
|
|
761
|
+
Key.CONTROL_LEFT,
|
|
762
|
+
Key.CONTROL_RIGHT,
|
|
763
|
+
Key.OS_LEFT,
|
|
764
|
+
Key.OS_RIGHT,
|
|
765
|
+
Key.SHIFT_LEFT,
|
|
766
|
+
Key.SHIFT_RIGHT,
|
|
767
|
+
],
|
|
768
|
+
);
|
|
769
|
+
})();
|
|
770
|
+
|
|
771
|
+
export type KeysOrKeyCodes = Key | KeyCode | (Key | KeyCode)[];
|
|
772
|
+
export namespace KeysOrKeyCodes {
|
|
773
|
+
export const toKeyCode = (keyOrKeyCode: Key | KeyCode) =>
|
|
774
|
+
keyOrKeyCode instanceof KeyCode
|
|
775
|
+
? keyOrKeyCode
|
|
776
|
+
: KeyCode.createKeyCode({ first: keyOrKeyCode });
|
|
777
|
+
|
|
778
|
+
export const toKeyCodes = (keysOrKeyCodes: KeysOrKeyCodes) => {
|
|
779
|
+
if (keysOrKeyCodes instanceof KeyCode) {
|
|
780
|
+
return [keysOrKeyCodes];
|
|
781
|
+
}
|
|
782
|
+
if (Array.isArray(keysOrKeyCodes)) {
|
|
783
|
+
return keysOrKeyCodes.slice().map(toKeyCode);
|
|
784
|
+
}
|
|
785
|
+
return [toKeyCode(keysOrKeyCodes)];
|
|
786
|
+
};
|
|
787
|
+
}
|