@teambit/command-bar 1.0.186 → 1.0.188

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.
@@ -1,2226 +0,0 @@
1
- {
2
- "__schema": "APISchema",
3
- "location": {
4
- "filePath": "index.ts",
5
- "line": 1,
6
- "character": 1
7
- },
8
- "module": {
9
- "__schema": "ModuleSchema",
10
- "location": {
11
- "filePath": "index.ts",
12
- "line": 1,
13
- "character": 1
14
- },
15
- "exports": [
16
- {
17
- "__schema": "VariableLikeSchema",
18
- "location": {
19
- "filePath": "command-bar.aspect.ts",
20
- "line": 3,
21
- "character": 14
22
- },
23
- "signature": "const CommandBarAspect: Aspect",
24
- "name": "CommandBarAspect",
25
- "type": {
26
- "__schema": "TypeRefSchema",
27
- "location": {
28
- "filePath": "command-bar.aspect.ts",
29
- "line": 3,
30
- "character": 14
31
- },
32
- "name": "Aspect",
33
- "componentId": {
34
- "scope": "teambit.harmony",
35
- "name": "harmony",
36
- "version": "0.4.6"
37
- }
38
- },
39
- "isOptional": false,
40
- "defaultValue": "Aspect.create({\n id: 'teambit.explorer/command-bar',\n dependencies: [],\n defaultConfig: {},\n})"
41
- },
42
- {
43
- "__schema": "VariableLikeSchema",
44
- "location": {
45
- "filePath": "command-bar.aspect.ts",
46
- "line": 3,
47
- "character": 14
48
- },
49
- "signature": "const CommandBarAspect: Aspect",
50
- "name": "CommandBarAspect",
51
- "type": {
52
- "__schema": "TypeRefSchema",
53
- "location": {
54
- "filePath": "command-bar.aspect.ts",
55
- "line": 3,
56
- "character": 14
57
- },
58
- "name": "Aspect",
59
- "componentId": {
60
- "scope": "teambit.harmony",
61
- "name": "harmony",
62
- "version": "0.4.6"
63
- }
64
- },
65
- "isOptional": false,
66
- "defaultValue": "Aspect.create({\n id: 'teambit.explorer/command-bar',\n dependencies: [],\n defaultConfig: {},\n})"
67
- },
68
- {
69
- "__schema": "VariableLikeSchema",
70
- "location": {
71
- "filePath": "command-bar.commands.ts",
72
- "line": 1,
73
- "character": 14
74
- },
75
- "signature": "const commandBarCommands: {\n open: string;\n}",
76
- "name": "commandBarCommands",
77
- "type": {
78
- "__schema": "InferenceTypeSchema",
79
- "location": {
80
- "filePath": "command-bar.commands.ts",
81
- "line": 1,
82
- "character": 14
83
- },
84
- "type": "{\n open: string;\n}"
85
- },
86
- "isOptional": false,
87
- "defaultValue": "{\n open: 'command-bar.open',\n}"
88
- },
89
- {
90
- "__schema": "InterfaceSchema",
91
- "location": {
92
- "filePath": "searchers/search-provider.ts",
93
- "line": 3,
94
- "character": 1
95
- },
96
- "signature": "interface SearchProvider",
97
- "name": "SearchProvider",
98
- "members": [
99
- {
100
- "__schema": "VariableLikeSchema",
101
- "location": {
102
- "filePath": "searchers/search-provider.ts",
103
- "line": 5,
104
- "character": 3
105
- },
106
- "doc": {
107
- "__schema": "DocSchema",
108
- "location": {
109
- "filePath": "searchers/search-provider.ts",
110
- "line": 4,
111
- "character": 3
112
- },
113
- "raw": "/** provide completions for this search term */",
114
- "comment": "provide completions for this search term"
115
- },
116
- "signature": "(property) SearchProvider.search: Searcher",
117
- "name": "search",
118
- "type": {
119
- "__schema": "TypeRefSchema",
120
- "location": {
121
- "filePath": "searchers/search-provider.ts",
122
- "line": 5,
123
- "character": 11
124
- },
125
- "name": "Searcher"
126
- },
127
- "isOptional": false
128
- },
129
- {
130
- "__schema": "FunctionLikeSchema",
131
- "location": {
132
- "filePath": "searchers/search-provider.ts",
133
- "line": 7,
134
- "character": 3
135
- },
136
- "doc": {
137
- "__schema": "DocSchema",
138
- "location": {
139
- "filePath": "searchers/search-provider.ts",
140
- "line": 6,
141
- "character": 3
142
- },
143
- "raw": "/** determines what terms are handled by this searcher. */",
144
- "comment": "determines what terms are handled by this searcher."
145
- },
146
- "signature": "(method) SearchProvider.test(term: string): boolean",
147
- "name": "test",
148
- "params": [
149
- {
150
- "__schema": "ParameterSchema",
151
- "location": {
152
- "filePath": "searchers/search-provider.ts",
153
- "line": 7,
154
- "character": 8
155
- },
156
- "name": "term",
157
- "type": {
158
- "__schema": "KeywordTypeSchema",
159
- "location": {
160
- "filePath": "searchers/search-provider.ts",
161
- "line": 7,
162
- "character": 14
163
- },
164
- "name": "string"
165
- },
166
- "isOptional": false,
167
- "isSpread": false
168
- }
169
- ],
170
- "returnType": {
171
- "__schema": "KeywordTypeSchema",
172
- "location": {
173
- "filePath": "searchers/search-provider.ts",
174
- "line": 7,
175
- "character": 23
176
- },
177
- "name": "boolean"
178
- },
179
- "modifiers": []
180
- }
181
- ],
182
- "extendsNodes": []
183
- },
184
- {
185
- "__schema": "ClassSchema",
186
- "location": {
187
- "filePath": "command-bar.ui.runtime.tsx",
188
- "line": 36,
189
- "character": 1
190
- },
191
- "doc": {
192
- "__schema": "DocSchema",
193
- "location": {
194
- "filePath": "command-bar.ui.runtime.tsx",
195
- "line": 35,
196
- "character": 1
197
- },
198
- "raw": "/** Quick launch actions. Use the `addSearcher` slot to extend the available actions */",
199
- "comment": "Quick launch actions. Use the `addSearcher` slot to extend the available actions"
200
- },
201
- "signature": "class CommandBarUI",
202
- "name": "CommandBarUI",
203
- "members": [
204
- {
205
- "__schema": "VariableLikeSchema",
206
- "location": {
207
- "filePath": "command-bar.ui.runtime.tsx",
208
- "line": 41,
209
- "character": 3
210
- },
211
- "doc": {
212
- "__schema": "DocSchema",
213
- "location": {
214
- "filePath": "command-bar.ui.runtime.tsx",
215
- "line": 40,
216
- "character": 3
217
- },
218
- "raw": "/** Opens the command bar */",
219
- "comment": "Opens the command bar"
220
- },
221
- "signature": "(property) CommandBarUI.open: () => boolean",
222
- "name": "open",
223
- "type": {
224
- "__schema": "InferenceTypeSchema",
225
- "location": {
226
- "filePath": "command-bar.ui.runtime.tsx",
227
- "line": 41,
228
- "character": 3
229
- },
230
- "type": "() => boolean"
231
- },
232
- "isOptional": true,
233
- "defaultValue": "() => {\n this.setVisibility?.(true);\n return false; // aka prevent default\n }"
234
- },
235
- {
236
- "__schema": "VariableLikeSchema",
237
- "location": {
238
- "filePath": "command-bar.ui.runtime.tsx",
239
- "line": 47,
240
- "character": 3
241
- },
242
- "doc": {
243
- "__schema": "DocSchema",
244
- "location": {
245
- "filePath": "command-bar.ui.runtime.tsx",
246
- "line": 46,
247
- "character": 3
248
- },
249
- "raw": "/** Closes the command bar */",
250
- "comment": "Closes the command bar"
251
- },
252
- "signature": "(property) CommandBarUI.close: () => void",
253
- "name": "close",
254
- "type": {
255
- "__schema": "InferenceTypeSchema",
256
- "location": {
257
- "filePath": "command-bar.ui.runtime.tsx",
258
- "line": 47,
259
- "character": 3
260
- },
261
- "type": "() => void"
262
- },
263
- "isOptional": true,
264
- "defaultValue": "() => {\n this.setVisibility?.(false);\n }"
265
- },
266
- {
267
- "__schema": "FunctionLikeSchema",
268
- "location": {
269
- "filePath": "command-bar.ui.runtime.tsx",
270
- "line": 52,
271
- "character": 3
272
- },
273
- "doc": {
274
- "__schema": "DocSchema",
275
- "location": {
276
- "filePath": "command-bar.ui.runtime.tsx",
277
- "line": 51,
278
- "character": 3
279
- },
280
- "raw": "/** Add and autocomplete provider. To support keyboard navigation, each result should have a props `active: boolean`, and `exectue: () => any` */",
281
- "comment": "Add and autocomplete provider. To support keyboard navigation, each result should have a props `active: boolean`, and `exectue: () => any`"
282
- },
283
- "signature": "(method) CommandBarUI.addSearcher(...commandSearcher: SearchProvider[]): this",
284
- "name": "addSearcher",
285
- "params": [
286
- {
287
- "__schema": "ParameterSchema",
288
- "location": {
289
- "filePath": "command-bar.ui.runtime.tsx",
290
- "line": 52,
291
- "character": 15
292
- },
293
- "name": "commandSearcher",
294
- "type": {
295
- "__schema": "TypeArraySchema",
296
- "location": {
297
- "filePath": "command-bar.ui.runtime.tsx",
298
- "line": 52,
299
- "character": 35
300
- },
301
- "type": {
302
- "__schema": "TypeRefSchema",
303
- "location": {
304
- "filePath": "command-bar.ui.runtime.tsx",
305
- "line": 52,
306
- "character": 35
307
- },
308
- "name": "SearchProvider"
309
- }
310
- },
311
- "isOptional": false,
312
- "isSpread": true
313
- }
314
- ],
315
- "returnType": {
316
- "__schema": "TypeRefSchema",
317
- "location": {
318
- "filePath": "command-bar.ui.runtime.tsx",
319
- "line": 52,
320
- "character": 3
321
- },
322
- "name": "CommandBarUI"
323
- },
324
- "modifiers": []
325
- },
326
- {
327
- "__schema": "FunctionLikeSchema",
328
- "location": {
329
- "filePath": "command-bar.ui.runtime.tsx",
330
- "line": 60,
331
- "character": 3
332
- },
333
- "doc": {
334
- "__schema": "DocSchema",
335
- "location": {
336
- "filePath": "command-bar.ui.runtime.tsx",
337
- "line": 57,
338
- "character": 3
339
- },
340
- "raw": "/**\n * registers a command\n */",
341
- "comment": "registers a command"
342
- },
343
- "signature": "(method) CommandBarUI.addCommand(...originalCommands: CommandEntry[]): ((next: CommandHandler) => void)[]",
344
- "name": "addCommand",
345
- "params": [
346
- {
347
- "__schema": "ParameterSchema",
348
- "location": {
349
- "filePath": "command-bar.ui.runtime.tsx",
350
- "line": 60,
351
- "character": 14
352
- },
353
- "name": "originalCommands",
354
- "type": {
355
- "__schema": "TypeArraySchema",
356
- "location": {
357
- "filePath": "command-bar.ui.runtime.tsx",
358
- "line": 60,
359
- "character": 35
360
- },
361
- "type": {
362
- "__schema": "TypeRefSchema",
363
- "location": {
364
- "filePath": "command-bar.ui.runtime.tsx",
365
- "line": 60,
366
- "character": 35
367
- },
368
- "name": "CommandEntry"
369
- }
370
- },
371
- "isOptional": false,
372
- "isSpread": true
373
- }
374
- ],
375
- "returnType": {
376
- "__schema": "InferenceTypeSchema",
377
- "location": {
378
- "filePath": "command-bar.ui.runtime.tsx",
379
- "line": 60,
380
- "character": 3
381
- },
382
- "type": "((next: CommandHandler) => void)[]"
383
- },
384
- "modifiers": []
385
- },
386
- {
387
- "__schema": "FunctionLikeSchema",
388
- "location": {
389
- "filePath": "command-bar.ui.runtime.tsx",
390
- "line": 93,
391
- "character": 3
392
- },
393
- "doc": {
394
- "__schema": "DocSchema",
395
- "location": {
396
- "filePath": "command-bar.ui.runtime.tsx",
397
- "line": 89,
398
- "character": 3
399
- },
400
- "raw": "/**\n * executes command by name, if exists.\n * @param commandId\n */",
401
- "comment": "executes command by name, if exists.",
402
- "tags": [
403
- {
404
- "__schema": "PropertyLikeTagSchema",
405
- "location": {
406
- "filePath": "command-bar.ui.runtime.tsx",
407
- "line": 91,
408
- "character": 6
409
- },
410
- "name": "commandId",
411
- "tagName": "parameter"
412
- }
413
- ]
414
- },
415
- "signature": "(method) CommandBarUI.run(commandId: CommandId): any",
416
- "name": "run",
417
- "params": [
418
- {
419
- "__schema": "ParameterSchema",
420
- "location": {
421
- "filePath": "command-bar.ui.runtime.tsx",
422
- "line": 93,
423
- "character": 7
424
- },
425
- "name": "commandId",
426
- "type": {
427
- "__schema": "TypeRefSchema",
428
- "location": {
429
- "filePath": "command-bar.ui.runtime.tsx",
430
- "line": 93,
431
- "character": 18
432
- },
433
- "name": "CommandId"
434
- },
435
- "isOptional": false,
436
- "isSpread": false
437
- }
438
- ],
439
- "returnType": {
440
- "__schema": "InferenceTypeSchema",
441
- "location": {
442
- "filePath": "command-bar.ui.runtime.tsx",
443
- "line": 93,
444
- "character": 3
445
- },
446
- "type": "any"
447
- },
448
- "modifiers": []
449
- },
450
- {
451
- "__schema": "VariableLikeSchema",
452
- "location": {
453
- "filePath": "command-bar.ui.runtime.tsx",
454
- "line": 103,
455
- "character": 3
456
- },
457
- "doc": {
458
- "__schema": "DocSchema",
459
- "location": {
460
- "filePath": "command-bar.ui.runtime.tsx",
461
- "line": 100,
462
- "character": 3
463
- },
464
- "raw": "/**\n * executes a keyboard shortcut manually\n */",
465
- "comment": "executes a keyboard shortcut manually"
466
- },
467
- "signature": "(property) CommandBarUI.trigger: (key: string) => void",
468
- "name": "trigger",
469
- "type": {
470
- "__schema": "InferenceTypeSchema",
471
- "location": {
472
- "filePath": "command-bar.ui.runtime.tsx",
473
- "line": 103,
474
- "character": 3
475
- },
476
- "type": "(key: string) => void"
477
- },
478
- "isOptional": true,
479
- "defaultValue": "(key: string) => {\n this.mousetrap.trigger(key);\n }"
480
- },
481
- {
482
- "__schema": "VariableLikeSchema",
483
- "location": {
484
- "filePath": "command-bar.ui.runtime.tsx",
485
- "line": 135,
486
- "character": 3
487
- },
488
- "doc": {
489
- "__schema": "DocSchema",
490
- "location": {
491
- "filePath": "command-bar.ui.runtime.tsx",
492
- "line": 132,
493
- "character": 3
494
- },
495
- "raw": "/**\n * Opens and closes the command bar UI.\n */",
496
- "comment": "Opens and closes the command bar UI."
497
- },
498
- "signature": "(property) CommandBarUI.setVisibility?: ((visible: boolean) => void) | undefined",
499
- "name": "setVisibility",
500
- "type": {
501
- "__schema": "FunctionLikeSchema",
502
- "location": {
503
- "filePath": "command-bar.ui.runtime.tsx",
504
- "line": 135,
505
- "character": 19
506
- },
507
- "signature": "(visible: boolean): void",
508
- "name": "",
509
- "params": [
510
- {
511
- "__schema": "ParameterSchema",
512
- "location": {
513
- "filePath": "command-bar.ui.runtime.tsx",
514
- "line": 135,
515
- "character": 20
516
- },
517
- "name": "visible",
518
- "type": {
519
- "__schema": "KeywordTypeSchema",
520
- "location": {
521
- "filePath": "command-bar.ui.runtime.tsx",
522
- "line": 135,
523
- "character": 29
524
- },
525
- "name": "boolean"
526
- },
527
- "isOptional": false,
528
- "isSpread": false
529
- }
530
- ],
531
- "returnType": {
532
- "__schema": "KeywordTypeSchema",
533
- "location": {
534
- "filePath": "command-bar.ui.runtime.tsx",
535
- "line": 135,
536
- "character": 41
537
- },
538
- "name": "void"
539
- },
540
- "modifiers": []
541
- },
542
- "isOptional": true
543
- },
544
- {
545
- "__schema": "VariableLikeSchema",
546
- "location": {
547
- "filePath": "command-bar.ui.runtime.tsx",
548
- "line": 140,
549
- "character": 3
550
- },
551
- "doc": {
552
- "__schema": "DocSchema",
553
- "location": {
554
- "filePath": "command-bar.ui.runtime.tsx",
555
- "line": 137,
556
- "character": 3
557
- },
558
- "raw": "/**\n * generate the ui for command bar\n */",
559
- "comment": "generate the ui for command bar"
560
- },
561
- "signature": "(property) CommandBarUI.CommandBar: ({ ResultComponent, onEnter, }: {\n ResultComponent?: React.ComponentType<ResultsComponentProps<SearchResult[], any>> | undefined;\n onEnter?: ((value: string) => void) | undefined;\n}) => React.JSX.Element",
562
- "name": "CommandBar",
563
- "type": {
564
- "__schema": "InferenceTypeSchema",
565
- "location": {
566
- "filePath": "command-bar.ui.runtime.tsx",
567
- "line": 140,
568
- "character": 3
569
- },
570
- "type": "({ ResultComponent, onEnter, }: {\n ResultComponent?: React.ComponentType<ResultsComponentProps<SearchResult[], any>> | undefined;\n onEnter?: ((value: string) => void) | undefined;\n}) => React.JSX.Element"
571
- },
572
- "isOptional": true,
573
- "defaultValue": "({\n ResultComponent,\n onEnter,\n }: {\n ResultComponent?: ComponentType<ResultsComponentProps>;\n onEnter?: (value: string) => void;\n }) => {\n const [visible, setVisibility] = useState(false);\n this.setVisibility = setVisibility;\n\n const results = useSearcher(this.search, {\n debounce: this.config.debounce,\n });\n\n return (\n <CommandBar\n {...results}\n onEnter={onEnter}\n key=\"CommandBarUI\"\n className={styles.commanderUi}\n placeholder=\"Search anything or type > to only search commands\"\n visible={visible}\n ResultsComponent={ResultComponent}\n onVisibilityChange={setVisibility}\n autofocus\n />\n );\n }"
574
- },
575
- {
576
- "__schema": "ConstructorSchema",
577
- "location": {
578
- "filePath": "command-bar.ui.runtime.tsx",
579
- "line": 169,
580
- "character": 3
581
- },
582
- "signature": "constructor CommandBarUI(searcherSlot: SearcherSlot, commandSlot: CommandSlot, config: CommandBarConfig): CommandBarUI",
583
- "name": "constructor",
584
- "params": [
585
- {
586
- "__schema": "ParameterSchema",
587
- "location": {
588
- "filePath": "command-bar.ui.runtime.tsx",
589
- "line": 169,
590
- "character": 15
591
- },
592
- "name": "searcherSlot",
593
- "type": {
594
- "__schema": "TypeRefSchema",
595
- "location": {
596
- "filePath": "command-bar.ui.runtime.tsx",
597
- "line": 169,
598
- "character": 37
599
- },
600
- "name": "SearcherSlot"
601
- },
602
- "isOptional": false,
603
- "isSpread": false
604
- },
605
- {
606
- "__schema": "ParameterSchema",
607
- "location": {
608
- "filePath": "command-bar.ui.runtime.tsx",
609
- "line": 169,
610
- "character": 51
611
- },
612
- "name": "commandSlot",
613
- "type": {
614
- "__schema": "TypeRefSchema",
615
- "location": {
616
- "filePath": "command-bar.ui.runtime.tsx",
617
- "line": 169,
618
- "character": 72
619
- },
620
- "name": "CommandSlot"
621
- },
622
- "isOptional": false,
623
- "isSpread": false
624
- },
625
- {
626
- "__schema": "ParameterSchema",
627
- "location": {
628
- "filePath": "command-bar.ui.runtime.tsx",
629
- "line": 169,
630
- "character": 85
631
- },
632
- "name": "config",
633
- "type": {
634
- "__schema": "TypeRefSchema",
635
- "location": {
636
- "filePath": "command-bar.ui.runtime.tsx",
637
- "line": 169,
638
- "character": 101
639
- },
640
- "name": "CommandBarConfig"
641
- },
642
- "isOptional": false,
643
- "isSpread": false
644
- }
645
- ],
646
- "returnType": {
647
- "__schema": "ThisTypeSchema",
648
- "location": {
649
- "filePath": "command-bar.ui.runtime.tsx",
650
- "line": 36,
651
- "character": 1
652
- },
653
- "name": "CommandBarUI"
654
- },
655
- "modifiers": []
656
- },
657
- {
658
- "__schema": "VariableLikeSchema",
659
- "location": {
660
- "filePath": "command-bar.ui.runtime.tsx",
661
- "line": 171,
662
- "character": 3
663
- },
664
- "signature": "(property) CommandBarUI.dependencies: Aspect[]",
665
- "name": "dependencies",
666
- "type": {
667
- "__schema": "InferenceTypeSchema",
668
- "location": {
669
- "filePath": "command-bar.ui.runtime.tsx",
670
- "line": 171,
671
- "character": 3
672
- },
673
- "type": "Aspect[]"
674
- },
675
- "isOptional": true,
676
- "defaultValue": "[UIAspect, PubsubAspect, ReactRouterAspect]"
677
- },
678
- {
679
- "__schema": "VariableLikeSchema",
680
- "location": {
681
- "filePath": "command-bar.ui.runtime.tsx",
682
- "line": 172,
683
- "character": 3
684
- },
685
- "signature": "(property) CommandBarUI.slots: (((registerFn: () => string) => SlotRegistry<SearchProvider>) | ((registerFn: () => string) => SlotRegistry<CommandEntry[]>))[]",
686
- "name": "slots",
687
- "type": {
688
- "__schema": "InferenceTypeSchema",
689
- "location": {
690
- "filePath": "command-bar.ui.runtime.tsx",
691
- "line": 172,
692
- "character": 3
693
- },
694
- "type": "(((registerFn: () => string) => SlotRegistry<SearchProvider>) | ((registerFn: () => string) => SlotRegistry<CommandEntry[]>))[]"
695
- },
696
- "isOptional": true,
697
- "defaultValue": "[Slot.withType<SearchProvider>(), Slot.withType<CommandEntry[]>()]"
698
- },
699
- {
700
- "__schema": "VariableLikeSchema",
701
- "location": {
702
- "filePath": "command-bar.ui.runtime.tsx",
703
- "line": 173,
704
- "character": 3
705
- },
706
- "signature": "(property) CommandBarUI.defaultConfig: CommandBarConfig",
707
- "name": "defaultConfig",
708
- "type": {
709
- "__schema": "TypeRefSchema",
710
- "location": {
711
- "filePath": "command-bar.ui.runtime.tsx",
712
- "line": 173,
713
- "character": 3
714
- },
715
- "name": "CommandBarConfig",
716
- "internalFilePath": "command-bar.ui.runtime.tsx"
717
- },
718
- "isOptional": true,
719
- "defaultValue": "{\n debounce: undefined,\n }"
720
- },
721
- {
722
- "__schema": "VariableLikeSchema",
723
- "location": {
724
- "filePath": "command-bar.ui.runtime.tsx",
725
- "line": 177,
726
- "character": 3
727
- },
728
- "signature": "(property) CommandBarUI.runtime: RuntimeDefinition",
729
- "name": "runtime",
730
- "type": {
731
- "__schema": "InferenceTypeSchema",
732
- "location": {
733
- "filePath": "command-bar.ui.runtime.tsx",
734
- "line": 177,
735
- "character": 3
736
- },
737
- "type": "RuntimeDefinition"
738
- },
739
- "isOptional": true,
740
- "defaultValue": "UIRuntime"
741
- },
742
- {
743
- "__schema": "FunctionLikeSchema",
744
- "location": {
745
- "filePath": "command-bar.ui.runtime.tsx",
746
- "line": 179,
747
- "character": 3
748
- },
749
- "signature": "(method) CommandBarUI.provider([uiUi, pubsubUI]: [UiUI | undefined, PubsubUI | undefined], config: CommandBarConfig, [searcherSlot, commandSlots]: [SearcherSlot, CommandSlot]): Promise<CommandBarUI>",
750
- "name": "provider",
751
- "params": [
752
- {
753
- "__schema": "ParameterSchema",
754
- "location": {
755
- "filePath": "command-bar.ui.runtime.tsx",
756
- "line": 180,
757
- "character": 5
758
- },
759
- "name": "[ uiUi, pubsubUI ]",
760
- "type": {
761
- "__schema": "TupleTypeSchema",
762
- "location": {
763
- "filePath": "command-bar.ui.runtime.tsx",
764
- "line": 180,
765
- "character": 23
766
- },
767
- "elements": [
768
- {
769
- "__schema": "TypeUnionSchema",
770
- "location": {
771
- "filePath": "command-bar.ui.runtime.tsx",
772
- "line": 180,
773
- "character": 24
774
- },
775
- "types": [
776
- {
777
- "__schema": "TypeRefSchema",
778
- "location": {
779
- "filePath": "command-bar.ui.runtime.tsx",
780
- "line": 180,
781
- "character": 24
782
- },
783
- "name": "UiUI"
784
- },
785
- {
786
- "__schema": "KeywordTypeSchema",
787
- "location": {
788
- "filePath": "command-bar.ui.runtime.tsx",
789
- "line": 180,
790
- "character": 31
791
- },
792
- "name": "undefined"
793
- }
794
- ]
795
- },
796
- {
797
- "__schema": "TypeUnionSchema",
798
- "location": {
799
- "filePath": "command-bar.ui.runtime.tsx",
800
- "line": 180,
801
- "character": 42
802
- },
803
- "types": [
804
- {
805
- "__schema": "TypeRefSchema",
806
- "location": {
807
- "filePath": "command-bar.ui.runtime.tsx",
808
- "line": 180,
809
- "character": 42
810
- },
811
- "name": "PubsubUI"
812
- },
813
- {
814
- "__schema": "KeywordTypeSchema",
815
- "location": {
816
- "filePath": "command-bar.ui.runtime.tsx",
817
- "line": 180,
818
- "character": 53
819
- },
820
- "name": "undefined"
821
- }
822
- ]
823
- }
824
- ]
825
- },
826
- "isOptional": false,
827
- "isSpread": false
828
- },
829
- {
830
- "__schema": "ParameterSchema",
831
- "location": {
832
- "filePath": "command-bar.ui.runtime.tsx",
833
- "line": 181,
834
- "character": 5
835
- },
836
- "name": "config",
837
- "type": {
838
- "__schema": "TypeRefSchema",
839
- "location": {
840
- "filePath": "command-bar.ui.runtime.tsx",
841
- "line": 181,
842
- "character": 13
843
- },
844
- "name": "CommandBarConfig"
845
- },
846
- "isOptional": false,
847
- "isSpread": false
848
- },
849
- {
850
- "__schema": "ParameterSchema",
851
- "location": {
852
- "filePath": "command-bar.ui.runtime.tsx",
853
- "line": 182,
854
- "character": 5
855
- },
856
- "name": "[ searcherSlot, commandSlots ]",
857
- "type": {
858
- "__schema": "TupleTypeSchema",
859
- "location": {
860
- "filePath": "command-bar.ui.runtime.tsx",
861
- "line": 182,
862
- "character": 35
863
- },
864
- "elements": [
865
- {
866
- "__schema": "TypeRefSchema",
867
- "location": {
868
- "filePath": "command-bar.ui.runtime.tsx",
869
- "line": 182,
870
- "character": 36
871
- },
872
- "name": "SearcherSlot"
873
- },
874
- {
875
- "__schema": "TypeRefSchema",
876
- "location": {
877
- "filePath": "command-bar.ui.runtime.tsx",
878
- "line": 182,
879
- "character": 50
880
- },
881
- "name": "CommandSlot"
882
- }
883
- ]
884
- },
885
- "isOptional": false,
886
- "isSpread": false
887
- }
888
- ],
889
- "returnType": {
890
- "__schema": "InferenceTypeSchema",
891
- "location": {
892
- "filePath": "command-bar.ui.runtime.tsx",
893
- "line": 179,
894
- "character": 3
895
- },
896
- "type": "Promise<CommandBarUI>"
897
- },
898
- "modifiers": [
899
- "static",
900
- "async"
901
- ]
902
- }
903
- ],
904
- "extendsNodes": [],
905
- "implementNodes": []
906
- },
907
- {
908
- "__schema": "TypeSchema",
909
- "location": {
910
- "filePath": "command-bar.ui.runtime.tsx",
911
- "line": 28,
912
- "character": 1
913
- },
914
- "signature": "type CommandEntry = {\n id: CommandId;\n action: CommandHandler;\n keybinding?: Keybinding | undefined;\n displayName: string;\n}",
915
- "name": "CommandEntry",
916
- "type": {
917
- "__schema": "TypeLiteralSchema",
918
- "location": {
919
- "filePath": "command-bar.ui.runtime.tsx",
920
- "line": 28,
921
- "character": 28
922
- },
923
- "members": [
924
- {
925
- "__schema": "VariableLikeSchema",
926
- "location": {
927
- "filePath": "command-bar.ui.runtime.tsx",
928
- "line": 29,
929
- "character": 3
930
- },
931
- "signature": "(property) id: string",
932
- "name": "id",
933
- "type": {
934
- "__schema": "TypeRefSchema",
935
- "location": {
936
- "filePath": "command-bar.ui.runtime.tsx",
937
- "line": 29,
938
- "character": 7
939
- },
940
- "name": "CommandId"
941
- },
942
- "isOptional": false
943
- },
944
- {
945
- "__schema": "VariableLikeSchema",
946
- "location": {
947
- "filePath": "command-bar.ui.runtime.tsx",
948
- "line": 30,
949
- "character": 3
950
- },
951
- "signature": "(property) action: Function",
952
- "name": "action",
953
- "type": {
954
- "__schema": "TypeRefSchema",
955
- "location": {
956
- "filePath": "command-bar.ui.runtime.tsx",
957
- "line": 30,
958
- "character": 11
959
- },
960
- "name": "CommandHandler"
961
- },
962
- "isOptional": false
963
- },
964
- {
965
- "__schema": "VariableLikeSchema",
966
- "location": {
967
- "filePath": "command-bar.ui.runtime.tsx",
968
- "line": 31,
969
- "character": 3
970
- },
971
- "signature": "(property) keybinding?: Keybinding | undefined",
972
- "name": "keybinding",
973
- "type": {
974
- "__schema": "TypeRefSchema",
975
- "location": {
976
- "filePath": "command-bar.ui.runtime.tsx",
977
- "line": 31,
978
- "character": 16
979
- },
980
- "name": "Keybinding"
981
- },
982
- "isOptional": true
983
- },
984
- {
985
- "__schema": "VariableLikeSchema",
986
- "location": {
987
- "filePath": "command-bar.ui.runtime.tsx",
988
- "line": 32,
989
- "character": 3
990
- },
991
- "signature": "(property) displayName: string",
992
- "name": "displayName",
993
- "type": {
994
- "__schema": "KeywordTypeSchema",
995
- "location": {
996
- "filePath": "command-bar.ui.runtime.tsx",
997
- "line": 32,
998
- "character": 16
999
- },
1000
- "name": "string"
1001
- },
1002
- "isOptional": false
1003
- }
1004
- ]
1005
- }
1006
- },
1007
- {
1008
- "__schema": "TypeSchema",
1009
- "location": {
1010
- "filePath": "types.tsx",
1011
- "line": 3,
1012
- "character": 1
1013
- },
1014
- "signature": "type CommandHandler = Function",
1015
- "name": "CommandHandler",
1016
- "type": {
1017
- "__schema": "TypeRefSchema",
1018
- "location": {
1019
- "filePath": "types.tsx",
1020
- "line": 3,
1021
- "character": 30
1022
- },
1023
- "name": "Function"
1024
- }
1025
- },
1026
- {
1027
- "__schema": "TypeSchema",
1028
- "location": {
1029
- "filePath": "types.tsx",
1030
- "line": 2,
1031
- "character": 1
1032
- },
1033
- "signature": "type CommandId = string",
1034
- "name": "CommandId",
1035
- "type": {
1036
- "__schema": "KeywordTypeSchema",
1037
- "location": {
1038
- "filePath": "types.tsx",
1039
- "line": 2,
1040
- "character": 25
1041
- },
1042
- "name": "string"
1043
- }
1044
- },
1045
- {
1046
- "__schema": "TypeSchema",
1047
- "location": {
1048
- "filePath": "types.tsx",
1049
- "line": 5,
1050
- "character": 1
1051
- },
1052
- "signature": "type Keybinding = string | string[]",
1053
- "name": "Keybinding",
1054
- "type": {
1055
- "__schema": "TypeUnionSchema",
1056
- "location": {
1057
- "filePath": "types.tsx",
1058
- "line": 5,
1059
- "character": 26
1060
- },
1061
- "types": [
1062
- {
1063
- "__schema": "KeywordTypeSchema",
1064
- "location": {
1065
- "filePath": "types.tsx",
1066
- "line": 5,
1067
- "character": 26
1068
- },
1069
- "name": "string"
1070
- },
1071
- {
1072
- "__schema": "TypeArraySchema",
1073
- "location": {
1074
- "filePath": "types.tsx",
1075
- "line": 5,
1076
- "character": 35
1077
- },
1078
- "type": {
1079
- "__schema": "KeywordTypeSchema",
1080
- "location": {
1081
- "filePath": "types.tsx",
1082
- "line": 5,
1083
- "character": 35
1084
- },
1085
- "name": "string"
1086
- }
1087
- }
1088
- ]
1089
- }
1090
- },
1091
- {
1092
- "__schema": "TypeRefSchema",
1093
- "location": {
1094
- "filePath": "index.ts",
1095
- "line": 6,
1096
- "character": 15
1097
- },
1098
- "name": "SearchResult",
1099
- "componentId": {
1100
- "scope": "teambit.explorer",
1101
- "name": "ui/command-bar",
1102
- "version": "2.0.14"
1103
- }
1104
- },
1105
- {
1106
- "__schema": "TypeRefSchema",
1107
- "location": {
1108
- "filePath": "index.ts",
1109
- "line": 6,
1110
- "character": 29
1111
- },
1112
- "name": "ResultsComponentProps",
1113
- "componentId": {
1114
- "scope": "teambit.explorer",
1115
- "name": "ui/command-bar",
1116
- "version": "2.0.14"
1117
- }
1118
- },
1119
- {
1120
- "__schema": "TypeRefSchema",
1121
- "location": {
1122
- "filePath": "index.ts",
1123
- "line": 6,
1124
- "character": 52
1125
- },
1126
- "name": "SearchResults",
1127
- "componentId": {
1128
- "scope": "teambit.explorer",
1129
- "name": "ui/command-bar",
1130
- "version": "2.0.14"
1131
- }
1132
- },
1133
- {
1134
- "__schema": "TypeRefSchema",
1135
- "location": {
1136
- "filePath": "index.ts",
1137
- "line": 7,
1138
- "character": 15
1139
- },
1140
- "name": "FuzzySearchItem",
1141
- "componentId": {
1142
- "scope": "teambit.explorer",
1143
- "name": "ui/command-bar",
1144
- "version": "2.0.14"
1145
- }
1146
- },
1147
- {
1148
- "__schema": "TypeRefSchema",
1149
- "location": {
1150
- "filePath": "index.ts",
1151
- "line": 8,
1152
- "character": 10
1153
- },
1154
- "name": "FuzzySearcher",
1155
- "componentId": {
1156
- "scope": "teambit.explorer",
1157
- "name": "ui/command-bar",
1158
- "version": "2.0.14"
1159
- }
1160
- },
1161
- {
1162
- "__schema": "TypeRefSchema",
1163
- "location": {
1164
- "filePath": "index.ts",
1165
- "line": 8,
1166
- "character": 25
1167
- },
1168
- "name": "CommandBarItem",
1169
- "componentId": {
1170
- "scope": "teambit.explorer",
1171
- "name": "ui/command-bar",
1172
- "version": "2.0.14"
1173
- }
1174
- }
1175
- ],
1176
- "internals": []
1177
- },
1178
- "internals": [
1179
- {
1180
- "__schema": "ModuleSchema",
1181
- "location": {
1182
- "filePath": "command-bar.aspect.ts",
1183
- "line": 1,
1184
- "character": 1
1185
- },
1186
- "exports": [
1187
- {
1188
- "__schema": "VariableLikeSchema",
1189
- "location": {
1190
- "filePath": "command-bar.aspect.ts",
1191
- "line": 3,
1192
- "character": 14
1193
- },
1194
- "signature": "const CommandBarAspect: Aspect",
1195
- "name": "CommandBarAspect",
1196
- "type": {
1197
- "__schema": "TypeRefSchema",
1198
- "location": {
1199
- "filePath": "command-bar.aspect.ts",
1200
- "line": 3,
1201
- "character": 14
1202
- },
1203
- "name": "Aspect",
1204
- "componentId": {
1205
- "scope": "teambit.harmony",
1206
- "name": "harmony",
1207
- "version": "0.4.6"
1208
- }
1209
- },
1210
- "isOptional": false,
1211
- "defaultValue": "Aspect.create({\n id: 'teambit.explorer/command-bar',\n dependencies: [],\n defaultConfig: {},\n})"
1212
- },
1213
- {
1214
- "__schema": "UnImplementedSchema",
1215
- "location": {
1216
- "filePath": "command-bar.aspect.ts",
1217
- "line": 9,
1218
- "character": 16
1219
- },
1220
- "name": "CommandBarAspect",
1221
- "type": "Identifier"
1222
- }
1223
- ],
1224
- "internals": []
1225
- },
1226
- {
1227
- "__schema": "ModuleSchema",
1228
- "location": {
1229
- "filePath": "command-bar.ui.runtime.tsx",
1230
- "line": 1,
1231
- "character": 1
1232
- },
1233
- "exports": [
1234
- {
1235
- "__schema": "TypeSchema",
1236
- "location": {
1237
- "filePath": "command-bar.ui.runtime.tsx",
1238
- "line": 24,
1239
- "character": 1
1240
- },
1241
- "signature": "type CommandBarConfig = {\n debounce?: number | undefined;\n}",
1242
- "name": "CommandBarConfig",
1243
- "type": {
1244
- "__schema": "TypeLiteralSchema",
1245
- "location": {
1246
- "filePath": "command-bar.ui.runtime.tsx",
1247
- "line": 24,
1248
- "character": 32
1249
- },
1250
- "members": [
1251
- {
1252
- "__schema": "VariableLikeSchema",
1253
- "location": {
1254
- "filePath": "command-bar.ui.runtime.tsx",
1255
- "line": 25,
1256
- "character": 3
1257
- },
1258
- "signature": "(property) debounce?: number | undefined",
1259
- "name": "debounce",
1260
- "type": {
1261
- "__schema": "KeywordTypeSchema",
1262
- "location": {
1263
- "filePath": "command-bar.ui.runtime.tsx",
1264
- "line": 25,
1265
- "character": 14
1266
- },
1267
- "name": "number"
1268
- },
1269
- "isOptional": true
1270
- }
1271
- ]
1272
- }
1273
- },
1274
- {
1275
- "__schema": "TypeSchema",
1276
- "location": {
1277
- "filePath": "command-bar.ui.runtime.tsx",
1278
- "line": 28,
1279
- "character": 1
1280
- },
1281
- "signature": "type CommandEntry = {\n id: CommandId;\n action: CommandHandler;\n keybinding?: Keybinding | undefined;\n displayName: string;\n}",
1282
- "name": "CommandEntry",
1283
- "type": {
1284
- "__schema": "TypeLiteralSchema",
1285
- "location": {
1286
- "filePath": "command-bar.ui.runtime.tsx",
1287
- "line": 28,
1288
- "character": 28
1289
- },
1290
- "members": [
1291
- {
1292
- "__schema": "VariableLikeSchema",
1293
- "location": {
1294
- "filePath": "command-bar.ui.runtime.tsx",
1295
- "line": 29,
1296
- "character": 3
1297
- },
1298
- "signature": "(property) id: string",
1299
- "name": "id",
1300
- "type": {
1301
- "__schema": "TypeRefSchema",
1302
- "location": {
1303
- "filePath": "command-bar.ui.runtime.tsx",
1304
- "line": 29,
1305
- "character": 7
1306
- },
1307
- "name": "CommandId"
1308
- },
1309
- "isOptional": false
1310
- },
1311
- {
1312
- "__schema": "VariableLikeSchema",
1313
- "location": {
1314
- "filePath": "command-bar.ui.runtime.tsx",
1315
- "line": 30,
1316
- "character": 3
1317
- },
1318
- "signature": "(property) action: Function",
1319
- "name": "action",
1320
- "type": {
1321
- "__schema": "TypeRefSchema",
1322
- "location": {
1323
- "filePath": "command-bar.ui.runtime.tsx",
1324
- "line": 30,
1325
- "character": 11
1326
- },
1327
- "name": "CommandHandler"
1328
- },
1329
- "isOptional": false
1330
- },
1331
- {
1332
- "__schema": "VariableLikeSchema",
1333
- "location": {
1334
- "filePath": "command-bar.ui.runtime.tsx",
1335
- "line": 31,
1336
- "character": 3
1337
- },
1338
- "signature": "(property) keybinding?: Keybinding | undefined",
1339
- "name": "keybinding",
1340
- "type": {
1341
- "__schema": "TypeRefSchema",
1342
- "location": {
1343
- "filePath": "command-bar.ui.runtime.tsx",
1344
- "line": 31,
1345
- "character": 16
1346
- },
1347
- "name": "Keybinding"
1348
- },
1349
- "isOptional": true
1350
- },
1351
- {
1352
- "__schema": "VariableLikeSchema",
1353
- "location": {
1354
- "filePath": "command-bar.ui.runtime.tsx",
1355
- "line": 32,
1356
- "character": 3
1357
- },
1358
- "signature": "(property) displayName: string",
1359
- "name": "displayName",
1360
- "type": {
1361
- "__schema": "KeywordTypeSchema",
1362
- "location": {
1363
- "filePath": "command-bar.ui.runtime.tsx",
1364
- "line": 32,
1365
- "character": 16
1366
- },
1367
- "name": "string"
1368
- },
1369
- "isOptional": false
1370
- }
1371
- ]
1372
- }
1373
- },
1374
- {
1375
- "__schema": "ClassSchema",
1376
- "location": {
1377
- "filePath": "command-bar.ui.runtime.tsx",
1378
- "line": 36,
1379
- "character": 1
1380
- },
1381
- "doc": {
1382
- "__schema": "DocSchema",
1383
- "location": {
1384
- "filePath": "command-bar.ui.runtime.tsx",
1385
- "line": 35,
1386
- "character": 1
1387
- },
1388
- "raw": "/** Quick launch actions. Use the `addSearcher` slot to extend the available actions */",
1389
- "comment": "Quick launch actions. Use the `addSearcher` slot to extend the available actions"
1390
- },
1391
- "signature": "class CommandBarUI",
1392
- "name": "CommandBarUI",
1393
- "members": [
1394
- {
1395
- "__schema": "VariableLikeSchema",
1396
- "location": {
1397
- "filePath": "command-bar.ui.runtime.tsx",
1398
- "line": 41,
1399
- "character": 3
1400
- },
1401
- "doc": {
1402
- "__schema": "DocSchema",
1403
- "location": {
1404
- "filePath": "command-bar.ui.runtime.tsx",
1405
- "line": 40,
1406
- "character": 3
1407
- },
1408
- "raw": "/** Opens the command bar */",
1409
- "comment": "Opens the command bar"
1410
- },
1411
- "signature": "(property) CommandBarUI.open: () => boolean",
1412
- "name": "open",
1413
- "type": {
1414
- "__schema": "InferenceTypeSchema",
1415
- "location": {
1416
- "filePath": "command-bar.ui.runtime.tsx",
1417
- "line": 41,
1418
- "character": 3
1419
- },
1420
- "type": "() => boolean"
1421
- },
1422
- "isOptional": true,
1423
- "defaultValue": "() => {\n this.setVisibility?.(true);\n return false; // aka prevent default\n }"
1424
- },
1425
- {
1426
- "__schema": "VariableLikeSchema",
1427
- "location": {
1428
- "filePath": "command-bar.ui.runtime.tsx",
1429
- "line": 47,
1430
- "character": 3
1431
- },
1432
- "doc": {
1433
- "__schema": "DocSchema",
1434
- "location": {
1435
- "filePath": "command-bar.ui.runtime.tsx",
1436
- "line": 46,
1437
- "character": 3
1438
- },
1439
- "raw": "/** Closes the command bar */",
1440
- "comment": "Closes the command bar"
1441
- },
1442
- "signature": "(property) CommandBarUI.close: () => void",
1443
- "name": "close",
1444
- "type": {
1445
- "__schema": "InferenceTypeSchema",
1446
- "location": {
1447
- "filePath": "command-bar.ui.runtime.tsx",
1448
- "line": 47,
1449
- "character": 3
1450
- },
1451
- "type": "() => void"
1452
- },
1453
- "isOptional": true,
1454
- "defaultValue": "() => {\n this.setVisibility?.(false);\n }"
1455
- },
1456
- {
1457
- "__schema": "FunctionLikeSchema",
1458
- "location": {
1459
- "filePath": "command-bar.ui.runtime.tsx",
1460
- "line": 52,
1461
- "character": 3
1462
- },
1463
- "doc": {
1464
- "__schema": "DocSchema",
1465
- "location": {
1466
- "filePath": "command-bar.ui.runtime.tsx",
1467
- "line": 51,
1468
- "character": 3
1469
- },
1470
- "raw": "/** Add and autocomplete provider. To support keyboard navigation, each result should have a props `active: boolean`, and `exectue: () => any` */",
1471
- "comment": "Add and autocomplete provider. To support keyboard navigation, each result should have a props `active: boolean`, and `exectue: () => any`"
1472
- },
1473
- "signature": "(method) CommandBarUI.addSearcher(...commandSearcher: SearchProvider[]): this",
1474
- "name": "addSearcher",
1475
- "params": [
1476
- {
1477
- "__schema": "ParameterSchema",
1478
- "location": {
1479
- "filePath": "command-bar.ui.runtime.tsx",
1480
- "line": 52,
1481
- "character": 15
1482
- },
1483
- "name": "commandSearcher",
1484
- "type": {
1485
- "__schema": "TypeArraySchema",
1486
- "location": {
1487
- "filePath": "command-bar.ui.runtime.tsx",
1488
- "line": 52,
1489
- "character": 35
1490
- },
1491
- "type": {
1492
- "__schema": "TypeRefSchema",
1493
- "location": {
1494
- "filePath": "command-bar.ui.runtime.tsx",
1495
- "line": 52,
1496
- "character": 35
1497
- },
1498
- "name": "SearchProvider"
1499
- }
1500
- },
1501
- "isOptional": false,
1502
- "isSpread": true
1503
- }
1504
- ],
1505
- "returnType": {
1506
- "__schema": "TypeRefSchema",
1507
- "location": {
1508
- "filePath": "command-bar.ui.runtime.tsx",
1509
- "line": 52,
1510
- "character": 3
1511
- },
1512
- "name": "CommandBarUI"
1513
- },
1514
- "modifiers": []
1515
- },
1516
- {
1517
- "__schema": "FunctionLikeSchema",
1518
- "location": {
1519
- "filePath": "command-bar.ui.runtime.tsx",
1520
- "line": 60,
1521
- "character": 3
1522
- },
1523
- "doc": {
1524
- "__schema": "DocSchema",
1525
- "location": {
1526
- "filePath": "command-bar.ui.runtime.tsx",
1527
- "line": 57,
1528
- "character": 3
1529
- },
1530
- "raw": "/**\n * registers a command\n */",
1531
- "comment": "registers a command"
1532
- },
1533
- "signature": "(method) CommandBarUI.addCommand(...originalCommands: CommandEntry[]): ((next: CommandHandler) => void)[]",
1534
- "name": "addCommand",
1535
- "params": [
1536
- {
1537
- "__schema": "ParameterSchema",
1538
- "location": {
1539
- "filePath": "command-bar.ui.runtime.tsx",
1540
- "line": 60,
1541
- "character": 14
1542
- },
1543
- "name": "originalCommands",
1544
- "type": {
1545
- "__schema": "TypeArraySchema",
1546
- "location": {
1547
- "filePath": "command-bar.ui.runtime.tsx",
1548
- "line": 60,
1549
- "character": 35
1550
- },
1551
- "type": {
1552
- "__schema": "TypeRefSchema",
1553
- "location": {
1554
- "filePath": "command-bar.ui.runtime.tsx",
1555
- "line": 60,
1556
- "character": 35
1557
- },
1558
- "name": "CommandEntry"
1559
- }
1560
- },
1561
- "isOptional": false,
1562
- "isSpread": true
1563
- }
1564
- ],
1565
- "returnType": {
1566
- "__schema": "InferenceTypeSchema",
1567
- "location": {
1568
- "filePath": "command-bar.ui.runtime.tsx",
1569
- "line": 60,
1570
- "character": 3
1571
- },
1572
- "type": "((next: CommandHandler) => void)[]"
1573
- },
1574
- "modifiers": []
1575
- },
1576
- {
1577
- "__schema": "FunctionLikeSchema",
1578
- "location": {
1579
- "filePath": "command-bar.ui.runtime.tsx",
1580
- "line": 93,
1581
- "character": 3
1582
- },
1583
- "doc": {
1584
- "__schema": "DocSchema",
1585
- "location": {
1586
- "filePath": "command-bar.ui.runtime.tsx",
1587
- "line": 89,
1588
- "character": 3
1589
- },
1590
- "raw": "/**\n * executes command by name, if exists.\n * @param commandId\n */",
1591
- "comment": "executes command by name, if exists.",
1592
- "tags": [
1593
- {
1594
- "__schema": "PropertyLikeTagSchema",
1595
- "location": {
1596
- "filePath": "command-bar.ui.runtime.tsx",
1597
- "line": 91,
1598
- "character": 6
1599
- },
1600
- "name": "commandId",
1601
- "tagName": "parameter"
1602
- }
1603
- ]
1604
- },
1605
- "signature": "(method) CommandBarUI.run(commandId: CommandId): any",
1606
- "name": "run",
1607
- "params": [
1608
- {
1609
- "__schema": "ParameterSchema",
1610
- "location": {
1611
- "filePath": "command-bar.ui.runtime.tsx",
1612
- "line": 93,
1613
- "character": 7
1614
- },
1615
- "name": "commandId",
1616
- "type": {
1617
- "__schema": "TypeRefSchema",
1618
- "location": {
1619
- "filePath": "command-bar.ui.runtime.tsx",
1620
- "line": 93,
1621
- "character": 18
1622
- },
1623
- "name": "CommandId"
1624
- },
1625
- "isOptional": false,
1626
- "isSpread": false
1627
- }
1628
- ],
1629
- "returnType": {
1630
- "__schema": "InferenceTypeSchema",
1631
- "location": {
1632
- "filePath": "command-bar.ui.runtime.tsx",
1633
- "line": 93,
1634
- "character": 3
1635
- },
1636
- "type": "any"
1637
- },
1638
- "modifiers": []
1639
- },
1640
- {
1641
- "__schema": "VariableLikeSchema",
1642
- "location": {
1643
- "filePath": "command-bar.ui.runtime.tsx",
1644
- "line": 103,
1645
- "character": 3
1646
- },
1647
- "doc": {
1648
- "__schema": "DocSchema",
1649
- "location": {
1650
- "filePath": "command-bar.ui.runtime.tsx",
1651
- "line": 100,
1652
- "character": 3
1653
- },
1654
- "raw": "/**\n * executes a keyboard shortcut manually\n */",
1655
- "comment": "executes a keyboard shortcut manually"
1656
- },
1657
- "signature": "(property) CommandBarUI.trigger: (key: string) => void",
1658
- "name": "trigger",
1659
- "type": {
1660
- "__schema": "InferenceTypeSchema",
1661
- "location": {
1662
- "filePath": "command-bar.ui.runtime.tsx",
1663
- "line": 103,
1664
- "character": 3
1665
- },
1666
- "type": "(key: string) => void"
1667
- },
1668
- "isOptional": true,
1669
- "defaultValue": "(key: string) => {\n this.mousetrap.trigger(key);\n }"
1670
- },
1671
- {
1672
- "__schema": "VariableLikeSchema",
1673
- "location": {
1674
- "filePath": "command-bar.ui.runtime.tsx",
1675
- "line": 135,
1676
- "character": 3
1677
- },
1678
- "doc": {
1679
- "__schema": "DocSchema",
1680
- "location": {
1681
- "filePath": "command-bar.ui.runtime.tsx",
1682
- "line": 132,
1683
- "character": 3
1684
- },
1685
- "raw": "/**\n * Opens and closes the command bar UI.\n */",
1686
- "comment": "Opens and closes the command bar UI."
1687
- },
1688
- "signature": "(property) CommandBarUI.setVisibility?: ((visible: boolean) => void) | undefined",
1689
- "name": "setVisibility",
1690
- "type": {
1691
- "__schema": "FunctionLikeSchema",
1692
- "location": {
1693
- "filePath": "command-bar.ui.runtime.tsx",
1694
- "line": 135,
1695
- "character": 19
1696
- },
1697
- "signature": "(visible: boolean): void",
1698
- "name": "",
1699
- "params": [
1700
- {
1701
- "__schema": "ParameterSchema",
1702
- "location": {
1703
- "filePath": "command-bar.ui.runtime.tsx",
1704
- "line": 135,
1705
- "character": 20
1706
- },
1707
- "name": "visible",
1708
- "type": {
1709
- "__schema": "KeywordTypeSchema",
1710
- "location": {
1711
- "filePath": "command-bar.ui.runtime.tsx",
1712
- "line": 135,
1713
- "character": 29
1714
- },
1715
- "name": "boolean"
1716
- },
1717
- "isOptional": false,
1718
- "isSpread": false
1719
- }
1720
- ],
1721
- "returnType": {
1722
- "__schema": "KeywordTypeSchema",
1723
- "location": {
1724
- "filePath": "command-bar.ui.runtime.tsx",
1725
- "line": 135,
1726
- "character": 41
1727
- },
1728
- "name": "void"
1729
- },
1730
- "modifiers": []
1731
- },
1732
- "isOptional": true
1733
- },
1734
- {
1735
- "__schema": "VariableLikeSchema",
1736
- "location": {
1737
- "filePath": "command-bar.ui.runtime.tsx",
1738
- "line": 140,
1739
- "character": 3
1740
- },
1741
- "doc": {
1742
- "__schema": "DocSchema",
1743
- "location": {
1744
- "filePath": "command-bar.ui.runtime.tsx",
1745
- "line": 137,
1746
- "character": 3
1747
- },
1748
- "raw": "/**\n * generate the ui for command bar\n */",
1749
- "comment": "generate the ui for command bar"
1750
- },
1751
- "signature": "(property) CommandBarUI.CommandBar: ({ ResultComponent, onEnter, }: {\n ResultComponent?: React.ComponentType<ResultsComponentProps<SearchResult[], any>> | undefined;\n onEnter?: ((value: string) => void) | undefined;\n}) => React.JSX.Element",
1752
- "name": "CommandBar",
1753
- "type": {
1754
- "__schema": "InferenceTypeSchema",
1755
- "location": {
1756
- "filePath": "command-bar.ui.runtime.tsx",
1757
- "line": 140,
1758
- "character": 3
1759
- },
1760
- "type": "({ ResultComponent, onEnter, }: {\n ResultComponent?: React.ComponentType<ResultsComponentProps<SearchResult[], any>> | undefined;\n onEnter?: ((value: string) => void) | undefined;\n}) => React.JSX.Element"
1761
- },
1762
- "isOptional": true,
1763
- "defaultValue": "({\n ResultComponent,\n onEnter,\n }: {\n ResultComponent?: ComponentType<ResultsComponentProps>;\n onEnter?: (value: string) => void;\n }) => {\n const [visible, setVisibility] = useState(false);\n this.setVisibility = setVisibility;\n\n const results = useSearcher(this.search, {\n debounce: this.config.debounce,\n });\n\n return (\n <CommandBar\n {...results}\n onEnter={onEnter}\n key=\"CommandBarUI\"\n className={styles.commanderUi}\n placeholder=\"Search anything or type > to only search commands\"\n visible={visible}\n ResultsComponent={ResultComponent}\n onVisibilityChange={setVisibility}\n autofocus\n />\n );\n }"
1764
- },
1765
- {
1766
- "__schema": "ConstructorSchema",
1767
- "location": {
1768
- "filePath": "command-bar.ui.runtime.tsx",
1769
- "line": 169,
1770
- "character": 3
1771
- },
1772
- "signature": "constructor CommandBarUI(searcherSlot: SearcherSlot, commandSlot: CommandSlot, config: CommandBarConfig): CommandBarUI",
1773
- "name": "constructor",
1774
- "params": [
1775
- {
1776
- "__schema": "ParameterSchema",
1777
- "location": {
1778
- "filePath": "command-bar.ui.runtime.tsx",
1779
- "line": 169,
1780
- "character": 15
1781
- },
1782
- "name": "searcherSlot",
1783
- "type": {
1784
- "__schema": "TypeRefSchema",
1785
- "location": {
1786
- "filePath": "command-bar.ui.runtime.tsx",
1787
- "line": 169,
1788
- "character": 37
1789
- },
1790
- "name": "SearcherSlot"
1791
- },
1792
- "isOptional": false,
1793
- "isSpread": false
1794
- },
1795
- {
1796
- "__schema": "ParameterSchema",
1797
- "location": {
1798
- "filePath": "command-bar.ui.runtime.tsx",
1799
- "line": 169,
1800
- "character": 51
1801
- },
1802
- "name": "commandSlot",
1803
- "type": {
1804
- "__schema": "TypeRefSchema",
1805
- "location": {
1806
- "filePath": "command-bar.ui.runtime.tsx",
1807
- "line": 169,
1808
- "character": 72
1809
- },
1810
- "name": "CommandSlot"
1811
- },
1812
- "isOptional": false,
1813
- "isSpread": false
1814
- },
1815
- {
1816
- "__schema": "ParameterSchema",
1817
- "location": {
1818
- "filePath": "command-bar.ui.runtime.tsx",
1819
- "line": 169,
1820
- "character": 85
1821
- },
1822
- "name": "config",
1823
- "type": {
1824
- "__schema": "TypeRefSchema",
1825
- "location": {
1826
- "filePath": "command-bar.ui.runtime.tsx",
1827
- "line": 169,
1828
- "character": 101
1829
- },
1830
- "name": "CommandBarConfig"
1831
- },
1832
- "isOptional": false,
1833
- "isSpread": false
1834
- }
1835
- ],
1836
- "returnType": {
1837
- "__schema": "ThisTypeSchema",
1838
- "location": {
1839
- "filePath": "command-bar.ui.runtime.tsx",
1840
- "line": 36,
1841
- "character": 1
1842
- },
1843
- "name": "CommandBarUI"
1844
- },
1845
- "modifiers": []
1846
- },
1847
- {
1848
- "__schema": "VariableLikeSchema",
1849
- "location": {
1850
- "filePath": "command-bar.ui.runtime.tsx",
1851
- "line": 171,
1852
- "character": 3
1853
- },
1854
- "signature": "(property) CommandBarUI.dependencies: Aspect[]",
1855
- "name": "dependencies",
1856
- "type": {
1857
- "__schema": "InferenceTypeSchema",
1858
- "location": {
1859
- "filePath": "command-bar.ui.runtime.tsx",
1860
- "line": 171,
1861
- "character": 3
1862
- },
1863
- "type": "Aspect[]"
1864
- },
1865
- "isOptional": true,
1866
- "defaultValue": "[UIAspect, PubsubAspect, ReactRouterAspect]"
1867
- },
1868
- {
1869
- "__schema": "VariableLikeSchema",
1870
- "location": {
1871
- "filePath": "command-bar.ui.runtime.tsx",
1872
- "line": 172,
1873
- "character": 3
1874
- },
1875
- "signature": "(property) CommandBarUI.slots: (((registerFn: () => string) => SlotRegistry<SearchProvider>) | ((registerFn: () => string) => SlotRegistry<CommandEntry[]>))[]",
1876
- "name": "slots",
1877
- "type": {
1878
- "__schema": "InferenceTypeSchema",
1879
- "location": {
1880
- "filePath": "command-bar.ui.runtime.tsx",
1881
- "line": 172,
1882
- "character": 3
1883
- },
1884
- "type": "(((registerFn: () => string) => SlotRegistry<SearchProvider>) | ((registerFn: () => string) => SlotRegistry<CommandEntry[]>))[]"
1885
- },
1886
- "isOptional": true,
1887
- "defaultValue": "[Slot.withType<SearchProvider>(), Slot.withType<CommandEntry[]>()]"
1888
- },
1889
- {
1890
- "__schema": "VariableLikeSchema",
1891
- "location": {
1892
- "filePath": "command-bar.ui.runtime.tsx",
1893
- "line": 173,
1894
- "character": 3
1895
- },
1896
- "signature": "(property) CommandBarUI.defaultConfig: CommandBarConfig",
1897
- "name": "defaultConfig",
1898
- "type": {
1899
- "__schema": "TypeRefSchema",
1900
- "location": {
1901
- "filePath": "command-bar.ui.runtime.tsx",
1902
- "line": 173,
1903
- "character": 3
1904
- },
1905
- "name": "CommandBarConfig",
1906
- "internalFilePath": "command-bar.ui.runtime.tsx"
1907
- },
1908
- "isOptional": true,
1909
- "defaultValue": "{\n debounce: undefined,\n }"
1910
- },
1911
- {
1912
- "__schema": "VariableLikeSchema",
1913
- "location": {
1914
- "filePath": "command-bar.ui.runtime.tsx",
1915
- "line": 177,
1916
- "character": 3
1917
- },
1918
- "signature": "(property) CommandBarUI.runtime: RuntimeDefinition",
1919
- "name": "runtime",
1920
- "type": {
1921
- "__schema": "InferenceTypeSchema",
1922
- "location": {
1923
- "filePath": "command-bar.ui.runtime.tsx",
1924
- "line": 177,
1925
- "character": 3
1926
- },
1927
- "type": "RuntimeDefinition"
1928
- },
1929
- "isOptional": true,
1930
- "defaultValue": "UIRuntime"
1931
- },
1932
- {
1933
- "__schema": "FunctionLikeSchema",
1934
- "location": {
1935
- "filePath": "command-bar.ui.runtime.tsx",
1936
- "line": 179,
1937
- "character": 3
1938
- },
1939
- "signature": "(method) CommandBarUI.provider([uiUi, pubsubUI]: [UiUI | undefined, PubsubUI | undefined], config: CommandBarConfig, [searcherSlot, commandSlots]: [SearcherSlot, CommandSlot]): Promise<CommandBarUI>",
1940
- "name": "provider",
1941
- "params": [
1942
- {
1943
- "__schema": "ParameterSchema",
1944
- "location": {
1945
- "filePath": "command-bar.ui.runtime.tsx",
1946
- "line": 180,
1947
- "character": 5
1948
- },
1949
- "name": "[ uiUi, pubsubUI ]",
1950
- "type": {
1951
- "__schema": "TupleTypeSchema",
1952
- "location": {
1953
- "filePath": "command-bar.ui.runtime.tsx",
1954
- "line": 180,
1955
- "character": 23
1956
- },
1957
- "elements": [
1958
- {
1959
- "__schema": "TypeUnionSchema",
1960
- "location": {
1961
- "filePath": "command-bar.ui.runtime.tsx",
1962
- "line": 180,
1963
- "character": 24
1964
- },
1965
- "types": [
1966
- {
1967
- "__schema": "TypeRefSchema",
1968
- "location": {
1969
- "filePath": "command-bar.ui.runtime.tsx",
1970
- "line": 180,
1971
- "character": 24
1972
- },
1973
- "name": "UiUI"
1974
- },
1975
- {
1976
- "__schema": "KeywordTypeSchema",
1977
- "location": {
1978
- "filePath": "command-bar.ui.runtime.tsx",
1979
- "line": 180,
1980
- "character": 31
1981
- },
1982
- "name": "undefined"
1983
- }
1984
- ]
1985
- },
1986
- {
1987
- "__schema": "TypeUnionSchema",
1988
- "location": {
1989
- "filePath": "command-bar.ui.runtime.tsx",
1990
- "line": 180,
1991
- "character": 42
1992
- },
1993
- "types": [
1994
- {
1995
- "__schema": "TypeRefSchema",
1996
- "location": {
1997
- "filePath": "command-bar.ui.runtime.tsx",
1998
- "line": 180,
1999
- "character": 42
2000
- },
2001
- "name": "PubsubUI"
2002
- },
2003
- {
2004
- "__schema": "KeywordTypeSchema",
2005
- "location": {
2006
- "filePath": "command-bar.ui.runtime.tsx",
2007
- "line": 180,
2008
- "character": 53
2009
- },
2010
- "name": "undefined"
2011
- }
2012
- ]
2013
- }
2014
- ]
2015
- },
2016
- "isOptional": false,
2017
- "isSpread": false
2018
- },
2019
- {
2020
- "__schema": "ParameterSchema",
2021
- "location": {
2022
- "filePath": "command-bar.ui.runtime.tsx",
2023
- "line": 181,
2024
- "character": 5
2025
- },
2026
- "name": "config",
2027
- "type": {
2028
- "__schema": "TypeRefSchema",
2029
- "location": {
2030
- "filePath": "command-bar.ui.runtime.tsx",
2031
- "line": 181,
2032
- "character": 13
2033
- },
2034
- "name": "CommandBarConfig"
2035
- },
2036
- "isOptional": false,
2037
- "isSpread": false
2038
- },
2039
- {
2040
- "__schema": "ParameterSchema",
2041
- "location": {
2042
- "filePath": "command-bar.ui.runtime.tsx",
2043
- "line": 182,
2044
- "character": 5
2045
- },
2046
- "name": "[ searcherSlot, commandSlots ]",
2047
- "type": {
2048
- "__schema": "TupleTypeSchema",
2049
- "location": {
2050
- "filePath": "command-bar.ui.runtime.tsx",
2051
- "line": 182,
2052
- "character": 35
2053
- },
2054
- "elements": [
2055
- {
2056
- "__schema": "TypeRefSchema",
2057
- "location": {
2058
- "filePath": "command-bar.ui.runtime.tsx",
2059
- "line": 182,
2060
- "character": 36
2061
- },
2062
- "name": "SearcherSlot"
2063
- },
2064
- {
2065
- "__schema": "TypeRefSchema",
2066
- "location": {
2067
- "filePath": "command-bar.ui.runtime.tsx",
2068
- "line": 182,
2069
- "character": 50
2070
- },
2071
- "name": "CommandSlot"
2072
- }
2073
- ]
2074
- },
2075
- "isOptional": false,
2076
- "isSpread": false
2077
- }
2078
- ],
2079
- "returnType": {
2080
- "__schema": "InferenceTypeSchema",
2081
- "location": {
2082
- "filePath": "command-bar.ui.runtime.tsx",
2083
- "line": 179,
2084
- "character": 3
2085
- },
2086
- "type": "Promise<CommandBarUI>"
2087
- },
2088
- "modifiers": [
2089
- "static",
2090
- "async"
2091
- ]
2092
- }
2093
- ],
2094
- "extendsNodes": [],
2095
- "implementNodes": []
2096
- }
2097
- ],
2098
- "internals": [
2099
- {
2100
- "__schema": "ModuleSchema",
2101
- "location": {
2102
- "filePath": "command-bar.ui.runtime.tsx",
2103
- "line": 20,
2104
- "character": 1
2105
- },
2106
- "exports": [
2107
- {
2108
- "__schema": "VariableLikeSchema",
2109
- "location": {
2110
- "filePath": "command-bar.ui.runtime.tsx",
2111
- "line": 20,
2112
- "character": 7
2113
- },
2114
- "signature": "const RESULT_LIMIT: 5",
2115
- "name": "RESULT_LIMIT",
2116
- "type": {
2117
- "__schema": "InferenceTypeSchema",
2118
- "location": {
2119
- "filePath": "command-bar.ui.runtime.tsx",
2120
- "line": 20,
2121
- "character": 7
2122
- },
2123
- "type": "5"
2124
- },
2125
- "isOptional": false,
2126
- "defaultValue": "5"
2127
- }
2128
- ],
2129
- "internals": []
2130
- },
2131
- {
2132
- "__schema": "TypeSchema",
2133
- "location": {
2134
- "filePath": "command-bar.ui.runtime.tsx",
2135
- "line": 21,
2136
- "character": 1
2137
- },
2138
- "signature": "type SearcherSlot = SlotRegistry<SearchProvider[]>",
2139
- "name": "SearcherSlot",
2140
- "type": {
2141
- "__schema": "TypeRefSchema",
2142
- "location": {
2143
- "filePath": "command-bar.ui.runtime.tsx",
2144
- "line": 21,
2145
- "character": 21
2146
- },
2147
- "name": "SlotRegistry",
2148
- "typeArgs": [
2149
- {
2150
- "__schema": "TypeArraySchema",
2151
- "location": {
2152
- "filePath": "command-bar.ui.runtime.tsx",
2153
- "line": 21,
2154
- "character": 34
2155
- },
2156
- "type": {
2157
- "__schema": "TypeRefSchema",
2158
- "location": {
2159
- "filePath": "command-bar.ui.runtime.tsx",
2160
- "line": 21,
2161
- "character": 34
2162
- },
2163
- "name": "SearchProvider"
2164
- }
2165
- }
2166
- ]
2167
- }
2168
- },
2169
- {
2170
- "__schema": "TypeSchema",
2171
- "location": {
2172
- "filePath": "command-bar.ui.runtime.tsx",
2173
- "line": 22,
2174
- "character": 1
2175
- },
2176
- "signature": "type CommandSlot = SlotRegistry<CommandEntry[]>",
2177
- "name": "CommandSlot",
2178
- "type": {
2179
- "__schema": "TypeRefSchema",
2180
- "location": {
2181
- "filePath": "command-bar.ui.runtime.tsx",
2182
- "line": 22,
2183
- "character": 20
2184
- },
2185
- "name": "SlotRegistry",
2186
- "typeArgs": [
2187
- {
2188
- "__schema": "TypeArraySchema",
2189
- "location": {
2190
- "filePath": "command-bar.ui.runtime.tsx",
2191
- "line": 22,
2192
- "character": 33
2193
- },
2194
- "type": {
2195
- "__schema": "TypeRefSchema",
2196
- "location": {
2197
- "filePath": "command-bar.ui.runtime.tsx",
2198
- "line": 22,
2199
- "character": 33
2200
- },
2201
- "name": "CommandEntry"
2202
- }
2203
- }
2204
- ]
2205
- }
2206
- },
2207
- {
2208
- "__schema": "UnImplementedSchema",
2209
- "location": {
2210
- "filePath": "command-bar.ui.runtime.tsx",
2211
- "line": 209,
2212
- "character": 1
2213
- },
2214
- "name": "CommandBarAspect.addRuntime(CommandBarUI);",
2215
- "type": "ExpressionStatement"
2216
- }
2217
- ]
2218
- }
2219
- ],
2220
- "componentId": {
2221
- "scope": "teambit.explorer",
2222
- "name": "command-bar",
2223
- "version": "1.0.186"
2224
- },
2225
- "taggedModuleExports": []
2226
- }