@opensumi/sumi 2.17.7 → 2.18.1-rc-1654142476.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensumi/sumi",
3
- "version": "2.17.7",
3
+ "version": "2.18.1-rc-1654142476.0",
4
4
  "typings": "index.d.ts",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -12,9 +12,9 @@
12
12
  "build": "ts-node ./build"
13
13
  },
14
14
  "dependencies": {
15
- "@opensumi/ide-components": "2.17.7",
15
+ "@opensumi/ide-components": "2.18.1-rc-1654142476.0",
16
16
  "@types/react": "^16.9.33",
17
17
  "vscode-uri": "^3.0.2"
18
18
  },
19
- "gitHead": "c1a5f2070c2ca04a6d87bb3769fde0d317f7a75f"
19
+ "gitHead": "3864ee8866c17d0d372e62d8f8b3d75f3c7f75ac"
20
20
  }
@@ -1970,6 +1970,27 @@ declare module 'sumi-worker' {
1970
1970
  dispose(): void;
1971
1971
  }
1972
1972
 
1973
+ /**
1974
+ * Represents the state of a {@link Terminal}.
1975
+ */
1976
+ export interface TerminalState {
1977
+ /**
1978
+ * Whether the {@link Terminal} has been interacted with. Interaction means that the
1979
+ * terminal has sent data to the process which depending on the terminal's _mode_. By
1980
+ * default input is sent when a key is pressed or when a command or extension sends text,
1981
+ * but based on the terminal's mode it can also happen on:
1982
+ *
1983
+ * - a pointer click event
1984
+ * - a pointer scroll event
1985
+ * - a pointer move event
1986
+ * - terminal focus in/out
1987
+ *
1988
+ * For more information on events that can send data see "DEC Private Mode Set (DECSET)" on
1989
+ * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
1990
+ */
1991
+ readonly isInteractedWith: boolean;
1992
+ }
1993
+
1973
1994
  export interface env {}
1974
1995
 
1975
1996
  /**
@@ -2656,6 +2656,27 @@ declare module 'vscode' {
2656
2656
  dispose(): void;
2657
2657
  }
2658
2658
 
2659
+ /**
2660
+ * Represents the state of a {@link Terminal}.
2661
+ */
2662
+ export interface TerminalState {
2663
+ /**
2664
+ * Whether the {@link Terminal} has been interacted with. Interaction means that the
2665
+ * terminal has sent data to the process which depending on the terminal's _mode_. By
2666
+ * default input is sent when a key is pressed or when a command or extension sends text,
2667
+ * but based on the terminal's mode it can also happen on:
2668
+ *
2669
+ * - a pointer click event
2670
+ * - a pointer scroll event
2671
+ * - a pointer move event
2672
+ * - terminal focus in/out
2673
+ *
2674
+ * For more information on events that can send data see "DEC Private Mode Set (DECSET)" on
2675
+ * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
2676
+ */
2677
+ readonly isInteractedWith: boolean;
2678
+ }
2679
+
2659
2680
  //#region EnvironmentVariable
2660
2681
 
2661
2682
  /**
@@ -261,6 +261,15 @@ declare module 'vscode' {
261
261
  */
262
262
  export function registerCallHierarchyProvider(selector: DocumentSelector, provider: CallHierarchyProvider): Disposable;
263
263
 
264
+ /**
265
+ * Register a type hierarchy provider.
266
+ *
267
+ * @param selector A selector that defines the documents this provider is applicable to.
268
+ * @param provider A type hierarchy provider.
269
+ * @return A {@link Disposable} that unregisters this provider when being disposed.
270
+ */
271
+ export function registerTypeHierarchyProvider(selector: DocumentSelector, provider: TypeHierarchyProvider): Disposable;
272
+
264
273
  /**
265
274
  * Register a linked editing range provider.
266
275
  *
@@ -2625,4 +2634,103 @@ declare module 'vscode' {
2625
2634
  */
2626
2635
  provideCallHierarchyOutgoingCalls(item: CallHierarchyItem, token: CancellationToken): ProviderResult<CallHierarchyOutgoingCall[]>;
2627
2636
  }
2637
+
2638
+ /**
2639
+ * Represents an item of a type hierarchy, like a class or an interface.
2640
+ */
2641
+ export class TypeHierarchyItem {
2642
+ /**
2643
+ * The name of this item.
2644
+ */
2645
+ name: string;
2646
+
2647
+ /**
2648
+ * The kind of this item.
2649
+ */
2650
+ kind: SymbolKind;
2651
+
2652
+ /**
2653
+ * Tags for this item.
2654
+ */
2655
+ tags?: ReadonlyArray<SymbolTag>;
2656
+
2657
+ /**
2658
+ * More detail for this item, e.g. the signature of a function.
2659
+ */
2660
+ detail?: string;
2661
+
2662
+ /**
2663
+ * The resource identifier of this item.
2664
+ */
2665
+ uri: Uri;
2666
+
2667
+ /**
2668
+ * The range enclosing this symbol not including leading/trailing whitespace
2669
+ * but everything else, e.g. comments and code.
2670
+ */
2671
+ range: Range;
2672
+
2673
+ /**
2674
+ * The range that should be selected and revealed when this symbol is being
2675
+ * picked, e.g. the name of a class. Must be contained by the {@link TypeHierarchyItem.range range}-property.
2676
+ */
2677
+ selectionRange: Range;
2678
+
2679
+ /**
2680
+ * Creates a new type hierarchy item.
2681
+ *
2682
+ * @param kind The kind of the item.
2683
+ * @param name The name of the item.
2684
+ * @param detail The details of the item.
2685
+ * @param uri The Uri of the item.
2686
+ * @param range The whole range of the item.
2687
+ * @param selectionRange The selection range of the item.
2688
+ */
2689
+ constructor(kind: SymbolKind, name: string, detail: string, uri: Uri, range: Range, selectionRange: Range);
2690
+ }
2691
+
2692
+
2693
+ /**
2694
+ * The type hierarchy provider interface describes the contract between extensions
2695
+ * and the type hierarchy feature.
2696
+ */
2697
+ export interface TypeHierarchyProvider {
2698
+
2699
+ /**
2700
+ * Bootstraps type hierarchy by returning the item that is denoted by the given document
2701
+ * and position. This item will be used as entry into the type graph. Providers should
2702
+ * return `undefined` or `null` when there is no item at the given location.
2703
+ *
2704
+ * @param document The document in which the command was invoked.
2705
+ * @param position The position at which the command was invoked.
2706
+ * @param token A cancellation token.
2707
+ * @returns One or multiple type hierarchy items or a thenable that resolves to such. The lack of a result can be
2708
+ * signaled by returning `undefined`, `null`, or an empty array.
2709
+ */
2710
+ prepareTypeHierarchy(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<TypeHierarchyItem | TypeHierarchyItem[]>;
2711
+
2712
+ /**
2713
+ * Provide all supertypes for an item, e.g all types from which a type is derived/inherited. In graph terms this describes directed
2714
+ * and annotated edges inside the type graph, e.g the given item is the starting node and the result is the nodes
2715
+ * that can be reached.
2716
+ *
2717
+ * @param item The hierarchy item for which super types should be computed.
2718
+ * @param token A cancellation token.
2719
+ * @returns A set of direct supertypes or a thenable that resolves to such. The lack of a result can be
2720
+ * signaled by returning `undefined` or `null`.
2721
+ */
2722
+ provideTypeHierarchySupertypes(item: TypeHierarchyItem, token: CancellationToken): ProviderResult<TypeHierarchyItem[]>;
2723
+
2724
+ /**
2725
+ * Provide all subtypes for an item, e.g all types which are derived/inherited from the given item. In
2726
+ * graph terms this describes directed and annotated edges inside the type graph, e.g the given item is the starting
2727
+ * node and the result is the nodes that can be reached.
2728
+ *
2729
+ * @param item The hierarchy item for which subtypes should be computed.
2730
+ * @param token A cancellation token.
2731
+ * @returns A set of direct subtypes or a thenable that resolves to such. The lack of a result can be
2732
+ * signaled by returning `undefined` or `null`.
2733
+ */
2734
+ provideTypeHierarchySubtypes(item: TypeHierarchyItem, token: CancellationToken): ProviderResult<TypeHierarchyItem[]>;
2735
+ }
2628
2736
  }
@@ -35,6 +35,14 @@ declare module 'vscode' {
35
35
  * not implemented yet
36
36
  */
37
37
  alwaysShow?: boolean;
38
+
39
+ /**
40
+ * Optional buttons that will be rendered on this particular item. These buttons will trigger
41
+ * an {@link QuickPickItemButtonEvent} when clicked. Buttons are only rendered when using a quickpick
42
+ * created by the {@link window.createQuickPick()} API. Buttons are not rendered when using
43
+ * the {@link window.showQuickPick()} API.
44
+ */
45
+ buttons?: QuickInputButton[];
38
46
  }
39
47
 
40
48
 
@@ -81,6 +89,13 @@ declare module 'vscode' {
81
89
  */
82
90
  readonly onDidTriggerButton: Event<QuickInputButton>;
83
91
 
92
+
93
+ /**
94
+ * An event signaling when a button in a particular {@link QuickPickItem} was triggered.
95
+ * This event does not fire for buttons in the title bar.
96
+ */
97
+ readonly onDidTriggerItemButton: Event<QuickPickItemButtonEvent<T>>;
98
+
84
99
  /**
85
100
  * Items to pick from.
86
101
  */
@@ -102,6 +117,11 @@ declare module 'vscode' {
102
117
  */
103
118
  matchOnDetail: boolean;
104
119
 
120
+ /*
121
+ * An optional flag to maintain the scroll position of the quick pick when the quick pick items are updated. Defaults to false.
122
+ */
123
+ keepScrollPosition?: boolean;
124
+
105
125
  /**
106
126
  * Active items. This can be read and updated by the extension.
107
127
  * not implemented yet
@@ -130,9 +150,9 @@ declare module 'vscode' {
130
150
  */
131
151
  export interface QuickPickOptions {
132
152
 
133
- /**
134
- * An optional string that represents the title of the quick pick.
135
- */
153
+ /**
154
+ * An optional string that represents the title of the quick pick.
155
+ */
136
156
  title?: string;
137
157
 
138
158
  /**
@@ -145,6 +165,11 @@ declare module 'vscode' {
145
165
  */
146
166
  matchOnDetail?: boolean;
147
167
 
168
+ /*
169
+ * An optional flag to maintain the scroll position of the quick pick when the quick pick items are updated. Defaults to false.
170
+ */
171
+ keepScrollPosition?: boolean;
172
+
148
173
  /**
149
174
  * An optional string to show as place holder in the input box to guide the user what to pick on.
150
175
  */
@@ -265,9 +290,9 @@ declare module 'vscode' {
265
290
  export interface InputBoxOptions {
266
291
 
267
292
  /**
268
- * An optional string that represents the title of the input box.
269
- */
270
- title?: string;
293
+ * An optional string that represents the title of the input box.
294
+ */
295
+ title?: string;
271
296
 
272
297
  /**
273
298
  * The value to prefill in the input box.
@@ -484,4 +509,19 @@ declare module 'vscode' {
484
509
  private constructor();
485
510
  }
486
511
 
512
+ /**
513
+ * An event signaling when a button in a particular {@link QuickPickItem} was triggered.
514
+ * This event does not fire for buttons in the title bar.
515
+ */
516
+ export interface QuickPickItemButtonEvent<T extends QuickPickItem> {
517
+ /**
518
+ * The button that was clicked.
519
+ */
520
+ readonly button: QuickInputButton;
521
+ /**
522
+ * The item that the button belongs to.
523
+ */
524
+ readonly item: T;
525
+ }
526
+
487
527
  }