@teambit/command-bar 1.0.226 → 1.0.228
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_explorer_command_bar-preview.js +1 -1
- package/artifacts/schema.json +17 -55
- package/dist/{preview-1712632644937.js → preview-1712805335812.js} +2 -2
- package/package.json +7 -7
- package/tsconfig.json +16 -1
- package/dist/command-bar.aspect.d.ts +0 -3
- package/dist/command-bar.commands.d.ts +0 -3
- package/dist/command-bar.composition.d.ts +0 -1
- package/dist/command-bar.preview.runtime.d.ts +0 -9
- package/dist/command-bar.ui.runtime.d.ts +0 -67
- package/dist/duplicate-command-error.d.ts +0 -5
- package/dist/index.d.ts +0 -8
- package/dist/keybinding.d.ts +0 -2
- package/dist/model/key-event/index.d.ts +0 -1
- package/dist/model/key-event/key-event.d.ts +0 -4
- package/dist/model/key-event/serialize-keyboard-event.d.ts +0 -1
- package/dist/mousetrap-stub.d.ts +0 -9
- package/dist/searchers/command-searcher/command-result.d.ts +0 -6
- package/dist/searchers/command-searcher/command-searcher.d.ts +0 -9
- package/dist/searchers/command-searcher/command.d.ts +0 -8
- package/dist/searchers/command-searcher/index.d.ts +0 -1
- package/dist/searchers/index.d.ts +0 -2
- package/dist/searchers/search-provider.d.ts +0 -7
- package/dist/types.d.ts +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.explorer/command-bar@1.0.
|
|
3
|
+
<testsuite name="teambit.explorer/command-bar@1.0.228" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.explorer/command-bar-preview"]=t():e["teambit.explorer/command-bar-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.explorer/command-bar-preview"]=t():e["teambit.explorer/command-bar-preview"]=t()}(self,(()=>(()=>{"use strict";var e={31472:(e,t,o)=>{var r={id:"teambit.explorer/command-bar@1.0.228",homepage:"https://bit.cloud/teambit/explorer/command-bar",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const a=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/command-bar.svg"}));a.__bit_component=r,t.Logo=a},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>m,compositions_metadata:()=>u,overview:()=>l});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(31472);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},p.apply(this,arguments)}var c={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(s,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,n.mdx)("p",null,"Opens on CMD+K and allows searching for components by name. Typing '> ' inside the command bar displays the different commands and their shortcuts.")))}d.isMDXComponent=!0;const m=[t],l=[e],u={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -597,8 +597,7 @@
|
|
|
597
597
|
"line": 169,
|
|
598
598
|
"character": 37
|
|
599
599
|
},
|
|
600
|
-
"name": "SearcherSlot"
|
|
601
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
600
|
+
"name": "SearcherSlot"
|
|
602
601
|
},
|
|
603
602
|
"isOptional": false,
|
|
604
603
|
"isSpread": false
|
|
@@ -618,8 +617,7 @@
|
|
|
618
617
|
"line": 169,
|
|
619
618
|
"character": 72
|
|
620
619
|
},
|
|
621
|
-
"name": "CommandSlot"
|
|
622
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
620
|
+
"name": "CommandSlot"
|
|
623
621
|
},
|
|
624
622
|
"isOptional": false,
|
|
625
623
|
"isSpread": false
|
|
@@ -639,8 +637,7 @@
|
|
|
639
637
|
"line": 169,
|
|
640
638
|
"character": 101
|
|
641
639
|
},
|
|
642
|
-
"name": "CommandBarConfig"
|
|
643
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
640
|
+
"name": "CommandBarConfig"
|
|
644
641
|
},
|
|
645
642
|
"isOptional": false,
|
|
646
643
|
"isSpread": false
|
|
@@ -783,11 +780,7 @@
|
|
|
783
780
|
"line": 180,
|
|
784
781
|
"character": 24
|
|
785
782
|
},
|
|
786
|
-
"name": "UiUI"
|
|
787
|
-
"componentId": {
|
|
788
|
-
"scope": "teambit.ui-foundation",
|
|
789
|
-
"name": "ui"
|
|
790
|
-
}
|
|
783
|
+
"name": "UiUI"
|
|
791
784
|
},
|
|
792
785
|
{
|
|
793
786
|
"__schema": "KeywordTypeSchema",
|
|
@@ -815,11 +808,7 @@
|
|
|
815
808
|
"line": 180,
|
|
816
809
|
"character": 42
|
|
817
810
|
},
|
|
818
|
-
"name": "PubsubUI"
|
|
819
|
-
"componentId": {
|
|
820
|
-
"scope": "teambit.harmony",
|
|
821
|
-
"name": "pubsub"
|
|
822
|
-
}
|
|
811
|
+
"name": "PubsubUI"
|
|
823
812
|
},
|
|
824
813
|
{
|
|
825
814
|
"__schema": "KeywordTypeSchema",
|
|
@@ -852,8 +841,7 @@
|
|
|
852
841
|
"line": 181,
|
|
853
842
|
"character": 13
|
|
854
843
|
},
|
|
855
|
-
"name": "CommandBarConfig"
|
|
856
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
844
|
+
"name": "CommandBarConfig"
|
|
857
845
|
},
|
|
858
846
|
"isOptional": false,
|
|
859
847
|
"isSpread": false
|
|
@@ -881,8 +869,7 @@
|
|
|
881
869
|
"line": 182,
|
|
882
870
|
"character": 36
|
|
883
871
|
},
|
|
884
|
-
"name": "SearcherSlot"
|
|
885
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
872
|
+
"name": "SearcherSlot"
|
|
886
873
|
},
|
|
887
874
|
{
|
|
888
875
|
"__schema": "TypeRefSchema",
|
|
@@ -891,8 +878,7 @@
|
|
|
891
878
|
"line": 182,
|
|
892
879
|
"character": 50
|
|
893
880
|
},
|
|
894
|
-
"name": "CommandSlot"
|
|
895
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
881
|
+
"name": "CommandSlot"
|
|
896
882
|
}
|
|
897
883
|
]
|
|
898
884
|
},
|
|
@@ -1801,8 +1787,7 @@
|
|
|
1801
1787
|
"line": 169,
|
|
1802
1788
|
"character": 37
|
|
1803
1789
|
},
|
|
1804
|
-
"name": "SearcherSlot"
|
|
1805
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
1790
|
+
"name": "SearcherSlot"
|
|
1806
1791
|
},
|
|
1807
1792
|
"isOptional": false,
|
|
1808
1793
|
"isSpread": false
|
|
@@ -1822,8 +1807,7 @@
|
|
|
1822
1807
|
"line": 169,
|
|
1823
1808
|
"character": 72
|
|
1824
1809
|
},
|
|
1825
|
-
"name": "CommandSlot"
|
|
1826
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
1810
|
+
"name": "CommandSlot"
|
|
1827
1811
|
},
|
|
1828
1812
|
"isOptional": false,
|
|
1829
1813
|
"isSpread": false
|
|
@@ -1843,8 +1827,7 @@
|
|
|
1843
1827
|
"line": 169,
|
|
1844
1828
|
"character": 101
|
|
1845
1829
|
},
|
|
1846
|
-
"name": "CommandBarConfig"
|
|
1847
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
1830
|
+
"name": "CommandBarConfig"
|
|
1848
1831
|
},
|
|
1849
1832
|
"isOptional": false,
|
|
1850
1833
|
"isSpread": false
|
|
@@ -1987,11 +1970,7 @@
|
|
|
1987
1970
|
"line": 180,
|
|
1988
1971
|
"character": 24
|
|
1989
1972
|
},
|
|
1990
|
-
"name": "UiUI"
|
|
1991
|
-
"componentId": {
|
|
1992
|
-
"scope": "teambit.ui-foundation",
|
|
1993
|
-
"name": "ui"
|
|
1994
|
-
}
|
|
1973
|
+
"name": "UiUI"
|
|
1995
1974
|
},
|
|
1996
1975
|
{
|
|
1997
1976
|
"__schema": "KeywordTypeSchema",
|
|
@@ -2019,11 +1998,7 @@
|
|
|
2019
1998
|
"line": 180,
|
|
2020
1999
|
"character": 42
|
|
2021
2000
|
},
|
|
2022
|
-
"name": "PubsubUI"
|
|
2023
|
-
"componentId": {
|
|
2024
|
-
"scope": "teambit.harmony",
|
|
2025
|
-
"name": "pubsub"
|
|
2026
|
-
}
|
|
2001
|
+
"name": "PubsubUI"
|
|
2027
2002
|
},
|
|
2028
2003
|
{
|
|
2029
2004
|
"__schema": "KeywordTypeSchema",
|
|
@@ -2056,8 +2031,7 @@
|
|
|
2056
2031
|
"line": 181,
|
|
2057
2032
|
"character": 13
|
|
2058
2033
|
},
|
|
2059
|
-
"name": "CommandBarConfig"
|
|
2060
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
2034
|
+
"name": "CommandBarConfig"
|
|
2061
2035
|
},
|
|
2062
2036
|
"isOptional": false,
|
|
2063
2037
|
"isSpread": false
|
|
@@ -2085,8 +2059,7 @@
|
|
|
2085
2059
|
"line": 182,
|
|
2086
2060
|
"character": 36
|
|
2087
2061
|
},
|
|
2088
|
-
"name": "SearcherSlot"
|
|
2089
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
2062
|
+
"name": "SearcherSlot"
|
|
2090
2063
|
},
|
|
2091
2064
|
{
|
|
2092
2065
|
"__schema": "TypeRefSchema",
|
|
@@ -2095,8 +2068,7 @@
|
|
|
2095
2068
|
"line": 182,
|
|
2096
2069
|
"character": 50
|
|
2097
2070
|
},
|
|
2098
|
-
"name": "CommandSlot"
|
|
2099
|
-
"internalFilePath": "command-bar.ui.runtime.tsx"
|
|
2071
|
+
"name": "CommandSlot"
|
|
2100
2072
|
}
|
|
2101
2073
|
]
|
|
2102
2074
|
},
|
|
@@ -2173,11 +2145,6 @@
|
|
|
2173
2145
|
"character": 21
|
|
2174
2146
|
},
|
|
2175
2147
|
"name": "SlotRegistry",
|
|
2176
|
-
"componentId": {
|
|
2177
|
-
"scope": "teambit.harmony",
|
|
2178
|
-
"name": "harmony",
|
|
2179
|
-
"version": "0.4.6"
|
|
2180
|
-
},
|
|
2181
2148
|
"typeArgs": [
|
|
2182
2149
|
{
|
|
2183
2150
|
"__schema": "TypeArraySchema",
|
|
@@ -2216,11 +2183,6 @@
|
|
|
2216
2183
|
"character": 20
|
|
2217
2184
|
},
|
|
2218
2185
|
"name": "SlotRegistry",
|
|
2219
|
-
"componentId": {
|
|
2220
|
-
"scope": "teambit.harmony",
|
|
2221
|
-
"name": "harmony",
|
|
2222
|
-
"version": "0.4.6"
|
|
2223
|
-
},
|
|
2224
2186
|
"typeArgs": [
|
|
2225
2187
|
{
|
|
2226
2188
|
"__schema": "TypeArraySchema",
|
|
@@ -2258,7 +2220,7 @@
|
|
|
2258
2220
|
"componentId": {
|
|
2259
2221
|
"scope": "teambit.explorer",
|
|
2260
2222
|
"name": "command-bar",
|
|
2261
|
-
"version": "1.0.
|
|
2223
|
+
"version": "1.0.228"
|
|
2262
2224
|
},
|
|
2263
2225
|
"taggedModuleExports": []
|
|
2264
2226
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.explorer_command-bar@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.explorer_command-bar@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.explorer_command-bar@1.0.228/dist/command-bar.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.explorer_command-bar@1.0.228/dist/command-bar.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/command-bar",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.228",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/explorer/command-bar",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.explorer",
|
|
8
8
|
"name": "command-bar",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.228"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash.flatten": "4.4.0",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"@teambit/base-ui.text.muted-text": "1.0.1",
|
|
21
21
|
"@teambit/design.ui.styles.ellipsis": "0.0.357",
|
|
22
22
|
"@teambit/ui-foundation.ui.keycap": "0.0.500",
|
|
23
|
-
"@teambit/pubsub": "1.0.
|
|
24
|
-
"@teambit/react-router": "1.0.
|
|
25
|
-
"@teambit/ui": "1.0.
|
|
23
|
+
"@teambit/pubsub": "1.0.228",
|
|
24
|
+
"@teambit/react-router": "1.0.228",
|
|
25
|
+
"@teambit/ui": "1.0.228"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/lodash.flatten": "4.4.6",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@types/classnames": "2.2.11",
|
|
31
31
|
"@types/mocha": "9.1.0",
|
|
32
32
|
"chai": "4.3.0",
|
|
33
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
34
|
-
"@teambit/preview": "1.0.
|
|
33
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.30",
|
|
34
|
+
"@teambit/preview": "1.0.228"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": "^17.0.0 || ^18.0.0",
|
package/tsconfig.json
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
23
|
+
"noImplicitAny": false,
|
|
24
|
+
"composite": true
|
|
24
25
|
},
|
|
25
26
|
"exclude": [
|
|
26
27
|
"artifacts",
|
|
@@ -35,5 +36,19 @@
|
|
|
35
36
|
"include": [
|
|
36
37
|
"**/*",
|
|
37
38
|
"**/*.json"
|
|
39
|
+
],
|
|
40
|
+
"references": [
|
|
41
|
+
{
|
|
42
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_pubsub@1.0.228"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_react-router@1.0.228"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@1.0.228"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.preview_preview@1.0.228"
|
|
52
|
+
}
|
|
38
53
|
]
|
|
39
54
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PubsubPreview } from '@teambit/pubsub';
|
|
2
|
-
export declare class CommandBarPreview {
|
|
3
|
-
private pubSub;
|
|
4
|
-
constructor(pubSub: PubsubPreview);
|
|
5
|
-
handleKeyEvent: (e: KeyboardEvent) => void;
|
|
6
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
|
7
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
8
|
-
static provider([pubSub]: [PubsubPreview]): Promise<CommandBarPreview>;
|
|
9
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType } from 'react';
|
|
2
|
-
import { SlotRegistry } from '@teambit/harmony';
|
|
3
|
-
import { UiUI } from '@teambit/ui';
|
|
4
|
-
import { PubsubUI } from '@teambit/pubsub';
|
|
5
|
-
import { ResultsComponentProps } from '@teambit/explorer.ui.command-bar';
|
|
6
|
-
import { SearchProvider } from './searchers';
|
|
7
|
-
import { Keybinding, CommandHandler, CommandId } from './types';
|
|
8
|
-
type SearcherSlot = SlotRegistry<SearchProvider[]>;
|
|
9
|
-
type CommandSlot = SlotRegistry<CommandEntry[]>;
|
|
10
|
-
export type CommandBarConfig = {
|
|
11
|
-
debounce?: number;
|
|
12
|
-
};
|
|
13
|
-
export type CommandEntry = {
|
|
14
|
-
id: CommandId;
|
|
15
|
-
action: CommandHandler;
|
|
16
|
-
keybinding?: Keybinding;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
19
|
-
/** Quick launch actions. Use the `addSearcher` slot to extend the available actions */
|
|
20
|
-
export declare class CommandBarUI {
|
|
21
|
-
private searcherSlot;
|
|
22
|
-
private commandSlot;
|
|
23
|
-
private config;
|
|
24
|
-
private mousetrap;
|
|
25
|
-
private commandSearcher;
|
|
26
|
-
/** Opens the command bar */
|
|
27
|
-
open: () => boolean;
|
|
28
|
-
/** Closes the command bar */
|
|
29
|
-
close: () => void;
|
|
30
|
-
/** Add and autocomplete provider. To support keyboard navigation, each result should have a props `active: boolean`, and `exectue: () => any` */
|
|
31
|
-
addSearcher(...commandSearcher: SearchProvider[]): this;
|
|
32
|
-
/**
|
|
33
|
-
* registers a command
|
|
34
|
-
*/
|
|
35
|
-
addCommand(...originalCommands: CommandEntry[]): ((next: CommandHandler) => void)[];
|
|
36
|
-
/**
|
|
37
|
-
* executes command by name, if exists.
|
|
38
|
-
* @param commandId
|
|
39
|
-
*/
|
|
40
|
-
run(commandId: CommandId): any;
|
|
41
|
-
/**
|
|
42
|
-
* executes a keyboard shortcut manually
|
|
43
|
-
*/
|
|
44
|
-
trigger: (key: string) => void;
|
|
45
|
-
private search;
|
|
46
|
-
private getCommand;
|
|
47
|
-
private updateCommandsSearcher;
|
|
48
|
-
private addKeybinding;
|
|
49
|
-
/**
|
|
50
|
-
* Opens and closes the command bar UI.
|
|
51
|
-
*/
|
|
52
|
-
setVisibility?: (visible: boolean) => void;
|
|
53
|
-
/**
|
|
54
|
-
* generate the ui for command bar
|
|
55
|
-
*/
|
|
56
|
-
CommandBar: ({ ResultComponent, onEnter, }: {
|
|
57
|
-
ResultComponent?: React.ComponentType<ResultsComponentProps> | undefined;
|
|
58
|
-
onEnter?: ((value: string) => void) | undefined;
|
|
59
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
60
|
-
constructor(searcherSlot: SearcherSlot, commandSlot: CommandSlot, config: CommandBarConfig);
|
|
61
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
|
62
|
-
static slots: (((registerFn: () => string) => SlotRegistry<SearchProvider>) | ((registerFn: () => string) => SlotRegistry<CommandEntry[]>))[];
|
|
63
|
-
static defaultConfig: CommandBarConfig;
|
|
64
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
65
|
-
static provider([uiUi, pubsubUI]: [UiUI | undefined, PubsubUI | undefined], config: CommandBarConfig, [searcherSlot, commandSlots]: [SearcherSlot, CommandSlot]): Promise<CommandBarUI>;
|
|
66
|
-
}
|
|
67
|
-
export {};
|
package/dist/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { CommandBarAspect, CommandBarAspect as default } from './command-bar.aspect';
|
|
2
|
-
export { commandBarCommands } from './command-bar.commands';
|
|
3
|
-
export type { SearchProvider } from './searchers';
|
|
4
|
-
export type { CommandBarUI, CommandEntry } from './command-bar.ui.runtime';
|
|
5
|
-
export type { CommandHandler, CommandId, Keybinding } from './types';
|
|
6
|
-
export type { SearchResult, ResultsComponentProps, SearchResults } from '@teambit/explorer.ui.command-bar';
|
|
7
|
-
export type { FuzzySearchItem } from '@teambit/explorer.ui.command-bar';
|
|
8
|
-
export { FuzzySearcher, CommandBarItem } from '@teambit/explorer.ui.command-bar';
|
package/dist/keybinding.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { KeyEvent } from './key-event';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function serializeKeyboardEvent(e: KeyboardEvent): KeyboardEventInit;
|
package/dist/mousetrap-stub.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FuzzySearcher, SearchResult, FuzzySearchItem } from '@teambit/explorer.ui.command-bar';
|
|
2
|
-
import { SearchProvider } from '../search-provider';
|
|
3
|
-
import { Command } from './command';
|
|
4
|
-
export declare class CommandSearcher extends FuzzySearcher<Command, Command> implements SearchProvider {
|
|
5
|
-
constructor(commands: Command[]);
|
|
6
|
-
test(term: string): boolean;
|
|
7
|
-
protected toSearchableItem(item: Command): Command;
|
|
8
|
-
protected toSearchResult({ item }: FuzzySearchItem<Command>): SearchResult;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CommandSearcher } from './command-searcher';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SearchProvider as Searcher } from '@teambit/explorer.ui.command-bar';
|
|
2
|
-
export interface SearchProvider {
|
|
3
|
-
/** provide completions for this search term */
|
|
4
|
-
search: Searcher;
|
|
5
|
-
/** determines what terms are handled by this searcher. */
|
|
6
|
-
test(term: string): boolean;
|
|
7
|
-
}
|
package/dist/types.d.ts
DELETED