monaco-editor-core 0.56.0-dev-20251218 → 0.56.0-dev-20251220
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/esm/nls.messages.cs.js +1 -1
- package/esm/nls.messages.de.js +1 -1
- package/esm/nls.messages.es.js +1 -1
- package/esm/nls.messages.fr.js +1 -1
- package/esm/nls.messages.it.js +1 -1
- package/esm/nls.messages.ja.js +1 -1
- package/esm/nls.messages.ko.js +1 -1
- package/esm/nls.messages.pl.js +1 -1
- package/esm/nls.messages.pt-br.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.tr.js +1 -1
- package/esm/nls.messages.zh-cn.js +1 -1
- package/esm/nls.messages.zh-tw.js +1 -1
- package/esm/vs/base/common/fuzzyScorer.js +3 -2
- package/esm/vs/base/common/fuzzyScorer.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js +3 -3
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js.map +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +4 -15
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +13 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +5 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +6 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +6 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +9 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +14 -9
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +9 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +5 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +3 -37
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputController.js +1 -0
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js.map +1 -1
- package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/quickinput/common/quickInput.ts","vs/platform/quickinput/common/quickInput.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAIhG,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AA8G9E,MAAM,CAAC,MAAM,WAAW,GAAa,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;AAiIpE,MAAM,CAAN,IAAY,oBAgBX;AAhBD,WAAY,oBAAoB;IAE/B;;OAEG;IACH,+DAAQ,CAAA;IAER;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,iEAAK,CAAA;AACN,CAAC,EAhBW,oBAAoB,KAApB,oBAAoB,QAgB/B;AAuGD;;;GAGG;AACH,MAAM,CAAN,IAAY,cAiBX;AAjBD,WAAY,cAAc;IACzB;;OAEG;IACH,mDAAI,CAAA;IACJ;;OAEG;IACH,qDAAK,CAAA;IACL;;OAEG;IACH,uDAAM,CAAA;IACN;;OAEG;IACH,mDAAI,CAAA;AACL,CAAC,EAjBW,cAAc,KAAd,cAAc,QAiBzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAqCX;AArCD,WAAY,cAAc;IACzB;;OAEG;IACH,qDAAS,CAAA;IACT;;OAEG;IACH,uDAAM,CAAA;IACN;;OAEG;IACH,mDAAI,CAAA;IACJ;;OAEG;IACH,mDAAI,CAAA;IACJ;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,mEAAY,CAAA;IACZ;;OAEG;IACH,qEAAa,CAAA;IACb;;OAEG;IACH,6EAAiB,CAAA;AAClB,CAAC,EArCW,cAAc,KAAd,cAAc,QAqCzB;AA6ND,MAAM,CAAN,IAAY,wBAgBX;AAhBD,WAAY,wBAAwB;IACnC;;OAEG;IACH,yEAAS,CAAA;IAET;;OAEG;IACH,2EAAU,CAAA;IAEV;;;OAGG;IACH,yEAAS,CAAA;AACV,CAAC,EAhBW,wBAAwB,KAAxB,wBAAwB,QAgBnC;AAqFD,MAAM,OAAO,2BAA2B;IAEvC,YAAoB,OAA2D;QAA3D,YAAO,GAAP,OAAO,CAAoD;IAAI,CAAC;CACpF;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,2BAA2B,EAAE,CAAC;AAE7E,YAAY;AAEZ,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAqB,mBAAmB,CAAC,CAAC;AA2H3F,YAAY","file":"quickInput.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Event } from '../../../base/common/event.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nimport { IQuickAccessController } from './quickAccess.js';\nimport { IMatch } from '../../../base/common/filters.js';\nimport { IItemAccessor } from '../../../base/common/fuzzyScorer.js';\nimport { ResolvedKeybinding } from '../../../base/common/keybindings.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport Severity from '../../../base/common/severity.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { IMarkdownString } from '../../../base/common/htmlContent.js';\n\nexport interface IQuickItemHighlights {\n\tlabel?: IMatch[];\n\tdescription?: IMatch[];\n}\n\nexport interface IQuickPickItemHighlights extends IQuickItemHighlights {\n\tdetail?: IMatch[];\n}\n\nexport type QuickPickItem = IQuickPickSeparator | IQuickPickItem;\n\n/**\n * Base properties for a quick pick and quick tree item.\n */\nexport interface IQuickItem {\n\tid?: string;\n\tlabel: string;\n\tariaLabel?: string;\n\tdescription?: string;\n\t/**\n\t * Whether the item is displayed in italics.\n\t */\n\titalic?: boolean;\n\t/**\n\t * Whether the item is displayed with a strikethrough.\n\t */\n\tstrikethrough?: boolean;\n\t/**\n\t * Icon classes to be passed on as `IIconLabelValueOptions`\n\t * to the underlying `IconLabel` widget.\n\t */\n\ticonClasses?: readonly string[];\n\ticonPath?: { dark: URI; light?: URI };\n\t/**\n\t * Icon class to be assigned to the quick item container\n\t * directly.\n\t */\n\ticonClass?: string;\n\tbuttons?: readonly IQuickInputButton[];\n\t/**\n\t * Used when we're in multi-select mode. Renders a disabled checkbox.\n\t */\n\tdisabled?: boolean;\n}\n\n/**\n * Represents a quick pick item used in the quick pick UI.\n */\nexport interface IQuickPickItem extends IQuickItem {\n\t/**\n\t * The type of the quick pick item. Used to distinguish between 'item' and 'separator'\n\t */\n\ttype?: 'item';\n\t/**\n\t * The detail text of the quick pick item. Shown as the second line.\n\t */\n\tdetail?: string;\n\t/**\n\t * The tooltip for the quick pick item.\n\t */\n\ttooltip?: string | IMarkdownString;\n\thighlights?: IQuickPickItemHighlights;\n\t/**\n\t * Allows to show a keybinding next to the item to indicate\n\t * how the item can be triggered outside of the picker using\n\t * keyboard shortcut.\n\t */\n\tkeybinding?: ResolvedKeybinding;\n\t/**\n\t * Whether the item is picked by default when the Quick Pick is shown.\n\t */\n\tpicked?: boolean;\n\t/**\n\t * Whether the item is always shown in the Quick Pick regardless of filtering.\n\t */\n\talwaysShow?: boolean;\n\t/**\n\t * Defaults to true with `IQuickPick.canSelectMany`, can be false to disable picks for a single item\n\t */\n\tpickable?: boolean;\n}\n\nexport interface IQuickPickSeparator {\n\t/**\n\t * The type of the quick pick item. Used to distinguish between 'item' and 'separator'\n\t */\n\ttype: 'separator';\n\tid?: string;\n\tlabel?: string;\n\tdescription?: string;\n\tariaLabel?: string;\n\tbuttons?: readonly IQuickInputButton[];\n\ttooltip?: string | IMarkdownString;\n}\n\nexport interface IKeyMods {\n\treadonly ctrlCmd: boolean;\n\treadonly alt: boolean;\n}\n\nexport const NO_KEY_MODS: IKeyMods = { ctrlCmd: false, alt: false };\n\nexport interface IQuickNavigateConfiguration {\n\tkeybindings: readonly ResolvedKeybinding[];\n}\n\nexport interface IPickOptions<T extends IQuickPickItem> {\n\n\t/**\n\t * an optional string to show as the title of the quick input\n\t */\n\ttitle?: string;\n\n\t/**\n\t * the value to prefill in the input box\n\t */\n\tvalue?: string;\n\n\t/**\n\t * an optional string to show as placeholder in the input box to guide the user what she picks on\n\t */\n\tplaceHolder?: string;\n\n\t/**\n\t * the text to display underneath the input box\n\t */\n\tprompt?: string;\n\n\t/**\n\t * an optional flag to include the description when filtering the picks\n\t */\n\tmatchOnDescription?: boolean;\n\n\t/**\n\t * an optional flag to include the detail when filtering the picks\n\t */\n\tmatchOnDetail?: boolean;\n\n\t/**\n\t * an optional flag to filter the picks based on label. Defaults to true.\n\t */\n\tmatchOnLabel?: boolean;\n\n\t/**\n\t * an optional flag to sort the picks based by the label.\n\t */\n\tsortByLabel?: boolean;\n\n\t/**\n\t * an optional flag to not close the picker on focus lost\n\t */\n\tignoreFocusLost?: boolean;\n\n\t/**\n\t * an optional flag to make this picker multi-select\n\t */\n\tcanPickMany?: boolean;\n\n\t/**\n\t * enables quick navigate in the picker to open an element without typing\n\t */\n\tquickNavigate?: IQuickNavigateConfiguration;\n\n\t/**\n\t * Hides the input box from the picker UI. This is typically used\n\t * in combination with quick-navigation where no search UI should\n\t * be presented.\n\t */\n\thideInput?: boolean;\n\n\t/**\n\t * a context key to set when this picker is active\n\t */\n\tcontextKey?: string;\n\n\t/**\n\t * an optional property for the item to focus initially.\n\t */\n\tactiveItem?: Promise<T> | T;\n\n\tonKeyMods?: (keyMods: IKeyMods) => void;\n\tonDidFocus?: (entry: T) => void;\n\tonDidTriggerItemButton?: (context: IQuickPickItemButtonContext<T>) => void;\n\tonDidTriggerSeparatorButton?: (context: IQuickPickSeparatorButtonEvent) => void;\n}\n\nexport interface IInputOptions {\n\n\t/**\n\t * an optional string to show as the title of the quick input\n\t */\n\ttitle?: string;\n\n\t/**\n\t * the value to prefill in the input box\n\t */\n\tvalue?: string;\n\n\t/**\n\t * the selection of value, default to the whole prefilled value\n\t */\n\tvalueSelection?: readonly [number, number];\n\n\t/**\n\t * the text to display underneath the input box\n\t */\n\tprompt?: string;\n\n\t/**\n\t * an optional string to show as placeholder in the input box to guide the user what to type\n\t */\n\tplaceHolder?: string;\n\n\t/**\n\t * Controls if a password input is shown. Password input hides the typed text.\n\t */\n\tpassword?: boolean;\n\n\t/**\n\t * an optional flag to not close the input on focus lost\n\t */\n\tignoreFocusLost?: boolean;\n\n\t/**\n\t * an optional function that is used to validate user input.\n\t */\n\tvalidateInput?: (input: string) => Promise<string | null | undefined | { content: string; severity: Severity }>;\n}\n\nexport enum QuickInputHideReason {\n\n\t/**\n\t * Focus moved away from the quick input.\n\t */\n\tBlur = 1,\n\n\t/**\n\t * An explicit user gesture, e.g. pressing Escape key.\n\t */\n\tGesture,\n\n\t/**\n\t * Anything else.\n\t */\n\tOther\n}\n\nexport interface IQuickInputHideEvent {\n\treason: QuickInputHideReason;\n}\n\n/**\n * A collection of the different types of QuickInput\n */\nexport const enum QuickInputType {\n\tQuickPick = 'quickPick',\n\tInputBox = 'inputBox',\n\tQuickWidget = 'quickWidget',\n\tQuickTree = 'quickTree'\n}\n\n/**\n * Represents a quick input control that allows users to make selections or provide input quickly.\n */\nexport interface IQuickInput extends IDisposable {\n\n\t/**\n\t * The type of the quick input.\n\t */\n\treadonly type: QuickInputType;\n\n\t/**\n\t * An event that is fired when the quick input is hidden.\n\t */\n\treadonly onDidHide: Event<IQuickInputHideEvent>;\n\n\t/**\n\t * The title of the quick input.\n\t */\n\ttitle: string | undefined;\n\n\t/**\n\t * The buttons displayed in the quick input titlebar.\n\t */\n\tbuttons: ReadonlyArray<IQuickInputButton>;\n\n\t/**\n\t * An event that is fired when a button in the quick input is triggered.\n\t */\n\treadonly onDidTriggerButton: Event<IQuickInputButton>;\n\n\t/**\n\t * The context key associated with the quick input.\n\t */\n\tcontextKey: string | undefined;\n\n\t/**\n\t * Indicates whether the quick input is busy. Renders a progress bar if true.\n\t */\n\tbusy: boolean;\n\n\t/**\n\t * Indicates whether the quick input should be hidden when it loses focus.\n\t */\n\tignoreFocusOut: boolean;\n\n\t/**\n\t * Shows the quick input.\n\t */\n\tshow(): void;\n\n\t/**\n\t * Hides the quick input.\n\t */\n\thide(): void;\n\n\t/**\n\t * Notifies that the quick input has been hidden.\n\t * @param reason The reason why the quick input was hidden.\n\t */\n\tdidHide(reason?: QuickInputHideReason): void;\n\n\t/**\n\t * Notifies that the quick input will be hidden.\n\t * @param reason The reason why the quick input will be hidden.\n\t */\n\twillHide(reason?: QuickInputHideReason): void;\n}\n\nexport interface IQuickPickWillAcceptEvent {\n\n\t/**\n\t * Allows to disable the default accept handling\n\t * of the picker. If `veto` is called, the picker\n\t * will not trigger the `onDidAccept` event.\n\t */\n\tveto(): void;\n}\n\nexport interface IQuickPickDidAcceptEvent {\n\n\t/**\n\t * Signals if the picker item is to be accepted\n\t * in the background while keeping the picker open.\n\t */\n\tinBackground: boolean;\n}\n\n/**\n * Represents the activation behavior for items in a quick input. This means which item will be\n * \"active\" (aka focused).\n */\nexport enum ItemActivation {\n\t/**\n\t * No item will be active.\n\t */\n\tNONE,\n\t/**\n\t * First item will be active.\n\t */\n\tFIRST,\n\t/**\n\t * Second item will be active.\n\t */\n\tSECOND,\n\t/**\n\t * Last item will be active.\n\t */\n\tLAST\n}\n\n/**\n * Represents the focus options for a quick pick.\n */\nexport enum QuickPickFocus {\n\t/**\n\t * Focus the first item in the list.\n\t */\n\tFirst = 1,\n\t/**\n\t * Focus the second item in the list.\n\t */\n\tSecond,\n\t/**\n\t * Focus the last item in the list.\n\t */\n\tLast,\n\t/**\n\t * Focus the next item in the list.\n\t */\n\tNext,\n\t/**\n\t * Focus the previous item in the list.\n\t */\n\tPrevious,\n\t/**\n\t * Focus the next page in the list.\n\t */\n\tNextPage,\n\t/**\n\t * Focus the previous page in the list.\n\t */\n\tPreviousPage,\n\t/**\n\t * Focus the first item under the next separator.\n\t */\n\tNextSeparator,\n\t/**\n\t * Focus the first item under the current separator.\n\t */\n\tPreviousSeparator\n}\n\n/**\n * Represents a quick pick control that allows the user to select an item from a list of options.\n */\nexport interface IQuickPick<T extends IQuickPickItem, O extends { useSeparators: boolean } = { useSeparators: false }> extends IQuickInput {\n\n\t/**\n\t * The current value of the quick pick input.\n\t */\n\tvalue: string;\n\n\t/**\n\t * A method that allows to massage the value used for filtering, e.g, to remove certain parts.\n\t * @param value The value to be filtered.\n\t * @returns The filtered value.\n\t */\n\tfilterValue: (value: string) => string;\n\n\t/**\n\t * The ARIA label for the quick pick input.\n\t */\n\tariaLabel: string | undefined;\n\n\t/**\n\t * The placeholder text for the quick pick input.\n\t */\n\tplaceholder: string | undefined;\n\n\t/**\n\t * Text shown below the quick pick input.\n\t */\n\tprompt: string | undefined;\n\n\t/**\n\t * An event that is fired when the value of the quick pick input changes.\n\t */\n\treadonly onDidChangeValue: Event<string>;\n\n\t/**\n\t * An event that is fired when the quick pick is about to accept the selected item.\n\t */\n\treadonly onWillAccept: Event<IQuickPickWillAcceptEvent>;\n\n\t/**\n\t * An event that is fired when the quick pick has accepted the selected item.\n\t */\n\treadonly onDidAccept: Event<IQuickPickDidAcceptEvent>;\n\n\t/**\n\t * If enabled, the `onDidAccept` event will be fired when pressing the arrow-right key to accept the selected item without closing the picker.\n\t */\n\tcanAcceptInBackground: boolean;\n\n\t/**\n\t * An event that is fired when an item button is triggered.\n\t */\n\treadonly onDidTriggerItemButton: Event<IQuickPickItemButtonEvent<T>>;\n\n\t/**\n\t * An event that is fired when a separator button is triggered.\n\t */\n\treadonly onDidTriggerSeparatorButton: Event<IQuickPickSeparatorButtonEvent>;\n\n\t/**\n\t * The items to be displayed in the quick pick.\n\t */\n\titems: O extends { useSeparators: true } ? ReadonlyArray<T | IQuickPickSeparator> : ReadonlyArray<T>;\n\n\t/**\n\t * Whether multiple items can be selected. If so, checkboxes will be rendered.\n\t */\n\tcanSelectMany: boolean;\n\n\t/**\n\t * Whether to match on the description of the items.\n\t */\n\tmatchOnDescription: boolean;\n\n\t/**\n\t * Whether to match on the detail of the items.\n\t */\n\tmatchOnDetail: boolean;\n\n\t/**\n\t * Whether to match on the label of the items.\n\t */\n\tmatchOnLabel: boolean;\n\n\t/**\n\t * Whether to sort the items by label.\n\t */\n\tsortByLabel: boolean;\n\n\t/**\n\t * Whether to keep the scroll position when the quick pick input is updated.\n\t */\n\tkeepScrollPosition: boolean;\n\n\t/**\n\t * The configuration for quick navigation.\n\t */\n\tquickNavigate: IQuickNavigateConfiguration | undefined;\n\n\t/**\n\t * The currently active items.\n\t */\n\tactiveItems: ReadonlyArray<T>;\n\n\t/**\n\t * An event that is fired when the active items change.\n\t */\n\treadonly onDidChangeActive: Event<T[]>;\n\n\t/**\n\t * The item activation behavior for the next time `items` is set. Item activation means which\n\t * item is \"active\" (aka focused) when the quick pick is opened or when `items` is set.\n\t */\n\titemActivation: ItemActivation;\n\n\t/**\n\t * The currently selected items.\n\t */\n\tselectedItems: ReadonlyArray<T>;\n\n\t/**\n\t * An event that is fired when the selected items change.\n\t */\n\treadonly onDidChangeSelection: Event<T[]>;\n\n\t/**\n\t * The key modifiers.\n\t */\n\treadonly keyMods: IKeyMods;\n\n\t/**\n\t * The selection range for the value in the input.\n\t */\n\tvalueSelection: Readonly<[number, number]> | undefined;\n\n\t/**\n\t * Hides the input box from the picker UI. This is typically used in combination with quick-navigation where no search UI should be presented.\n\t */\n\thideInput: boolean;\n\n\t/**\n\t * Focus a particular item in the list. Used internally for keyboard navigation.\n\t * @param focus The focus behavior.\n\t */\n\tfocus(focus: QuickPickFocus): void;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t * @param inBackground Whether you are accepting an item in the background and keeping the picker open.\n\t */\n\taccept(inBackground?: boolean): void;\n}\n\n/**\n * Represents a toggle for quick input.\n */\nexport interface IQuickInputToggle {\n}\n\n/**\n * Represents an input box in a quick input dialog.\n */\nexport interface IInputBox extends IQuickInput {\n\n\t/**\n\t * Value shown in the input box.\n\t */\n\tvalue: string;\n\n\t/**\n\t * Provide start and end values to be selected in the input box.\n\t */\n\tvalueSelection: Readonly<[number, number]> | undefined;\n\n\t/**\n\t * Value shown as example for input.\n\t */\n\tplaceholder: string | undefined;\n\n\t/**\n\t * Determines if the input value should be hidden while typing.\n\t */\n\tpassword: boolean;\n\n\t/**\n\t * Event called when the input value changes.\n\t */\n\treadonly onDidChangeValue: Event<string>;\n\n\t/**\n\t * Event called when the user submits the input.\n\t */\n\treadonly onDidAccept: Event<void>;\n\n\t/**\n\t * Text show below the input box.\n\t */\n\tprompt: string | undefined;\n\n\t/**\n\t * An optional validation message indicating a problem with the current input value.\n\t * Returning undefined clears the validation message.\n\t */\n\tvalidationMessage: string | undefined;\n\n\t/**\n\t * Severity of the input validation message.\n\t */\n\tseverity: Severity;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t */\n\taccept(): void;\n}\n\nexport enum QuickInputButtonLocation {\n\t/**\n\t * In the title bar.\n\t */\n\tTitle = 1,\n\n\t/**\n\t * To the right of the input box.\n\t */\n\tInline = 2,\n\n\t/**\n\t * At the far end inside the input box.\n\t * Used by the public API to create toggles.\n\t */\n\tInput = 3,\n}\n\n/**\n * Represents a button in the quick input UI.\n */\nexport interface IQuickInputButton {\n\t/**\n\t * The path to the icon for the button.\n\t * Either `iconPath` or `iconClass` is required.\n\t */\n\ticonPath?: { dark: URI; light?: URI };\n\t/**\n\t * The CSS class for the icon of the button.\n\t * Either `iconPath` or `iconClass` is required.\n\t */\n\ticonClass?: string;\n\t/**\n\t * The tooltip text for the button.\n\t */\n\ttooltip?: string;\n\t/**\n\t * Whether to always show the button.\n\t * By default, buttons are only visible when hovering over them with the mouse.\n\t */\n\talwaysVisible?: boolean;\n\t/**\n\t * Where the button should be rendered. The default is {@link QuickInputButtonLocation.Title}.\n\t * @note This property is ignored if the button was added to a QuickPickItem.\n\t */\n\tlocation?: QuickInputButtonLocation;\n\t/**\n\t * When present, indicates that the button is a toggle button that can be checked or unchecked.\n\t * The `checked` property indicates the current state of the toggle and will be updated\n\t * when the button is clicked.\n\t */\n\treadonly toggle?: { checked: boolean };\n}\n\n/**\n * Represents an event that occurs when a button associated with a quick pick item is clicked.\n * @template T - The type of the quick pick item.\n */\nexport interface IQuickPickItemButtonEvent<T extends IQuickPickItem> {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The quick pick item associated with the button.\n\t */\n\titem: T;\n}\n\n/**\n * Represents an event that occurs when a separator button is clicked in a quick pick.\n */\nexport interface IQuickPickSeparatorButtonEvent {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The separator associated with the button.\n\t */\n\tseparator: IQuickPickSeparator;\n}\n\n/**\n * Represents a context for a button associated with a quick pick item.\n * @template T - The type of the quick pick item.\n */\nexport interface IQuickPickItemButtonContext<T extends IQuickPickItem> extends IQuickPickItemButtonEvent<T> {\n\t/**\n\t * Removes the associated item from the quick pick.\n\t */\n\tremoveItem(): void;\n}\n\nexport type QuickPickInput<T = IQuickPickItem> = T | IQuickPickSeparator;\n\n\n//#region Fuzzy Scorer Support\n\nexport type IQuickPickItemWithResource = IQuickPickItem & { resource?: URI };\n\nexport class QuickPickItemScorerAccessor implements IItemAccessor<IQuickPickItemWithResource> {\n\n\tconstructor(private options?: { skipDescription?: boolean; skipPath?: boolean }) { }\n}\n\nexport const quickPickItemScorerAccessor = new QuickPickItemScorerAccessor();\n\n//#endregion\n\nexport const IQuickInputService = createDecorator<IQuickInputService>('quickInputService');\n\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\n\nexport interface IQuickInputService {\n\n\treadonly _serviceBrand: undefined;\n\n\t/**\n\t * Provides access to the quick access providers.\n\t */\n\treadonly quickAccess: IQuickAccessController;\n\n\t/**\n\t * Opens the quick input box for selecting items and returns a promise\n\t * with the user selected item(s) if any.\n\t */\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: true }, token?: CancellationToken): Promise<T[] | undefined>;\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: false }, token?: CancellationToken): Promise<T | undefined>;\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: Omit<IPickOptions<T>, 'canPickMany'>, token?: CancellationToken): Promise<T | undefined>;\n\n\t/**\n\t * Opens the quick input box for text input and returns a promise with the user typed value if any.\n\t */\n\tinput(options?: IInputOptions, token?: CancellationToken): Promise<string | undefined>;\n\n\t/**\n\t * Provides raw access to the quick pick controller.\n\t */\n\tcreateQuickPick<T extends IQuickPickItem>(options: { useSeparators: true }): IQuickPick<T, { useSeparators: true }>;\n\tcreateQuickPick<T extends IQuickPickItem>(options?: { useSeparators: boolean }): IQuickPick<T, { useSeparators: false }>;\n\n\t/**\n\t * Provides raw access to the input box controller.\n\t */\n\tcreateInputBox(): IInputBox;\n\n\t/**\n\t * Toggles hover for the current quick input item\n\t */\n\ttoggleHover(): void;\n\n\t/**\n\t * The current quick pick that is visible. Undefined if none is open.\n\t */\n\tcurrentQuickInput: IQuickInput | undefined;\n}\n\n//#region Quick Tree\n\n/**\n * Represents a quick tree control that displays hierarchical data with checkboxes.\n */\nexport interface IQuickTree<T extends IQuickTreeItem> extends IQuickInput {\n\n\t/**\n\t * Focus a particular item in the list. Used internally for keyboard navigation.\n\t * @param focus The focus behavior.\n\t */\n\tfocus(focus: QuickPickFocus): void;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t * @param inBackground Whether you are accepting an item in the background and keeping the picker open.\n\t */\n\taccept(inBackground?: boolean): void;\n}\n\n/**\n * Represents a tree item in the quick tree.\n */\nexport interface IQuickTreeItem extends IQuickItem {\n\t/**\n\t * The checked state of the item. Can be true, false, or 'mixed' for tri-state.\n\t * When canSelectMany is false, this is ignored and the item is treated as a single selection.\n\t * When canSelectMany is true, this indicates the checkbox state of the item.\n\t * If undefined, the item is unchecked by default.\n\t */\n\tchecked?: boolean | 'mixed';\n\n\t/**\n\t * The children of this tree item.\n\t */\n\tchildren?: readonly IQuickTreeItem[];\n\n\t/**\n\t * Defaults to true, can be false to disable picks for a single item.\n\t * When false, the item is not selectable and does not respond to mouse/keyboard activation.\n\t */\n\tpickable?: boolean;\n}\n\n/**\n * Represents an event that occurs when the checkbox state of a tree item changes.\n * @template T - The type of the tree item.\n */\nexport interface IQuickTreeCheckboxEvent<T extends IQuickTreeItem> {\n\t/**\n\t * The tree item whose checkbox state changed.\n\t */\n\titem: T;\n\n\t/**\n\t * The new checked state.\n\t */\n\tchecked: boolean | 'mixed';\n}\n\n/**\n * Represents an event that occurs when a button associated with a quick tree item is clicked.\n * @template T - The type of the quick tree item.\n */\nexport interface IQuickTreeItemButtonEvent<T extends IQuickTreeItem> {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The quick tree item associated with the button.\n\t */\n\titem: T;\n}\n\n//#endregion\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Event } from '../../../base/common/event.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nimport { IQuickAccessController } from './quickAccess.js';\nimport { IMatch } from '../../../base/common/filters.js';\nimport { IItemAccessor } from '../../../base/common/fuzzyScorer.js';\nimport { ResolvedKeybinding } from '../../../base/common/keybindings.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport Severity from '../../../base/common/severity.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { IMarkdownString } from '../../../base/common/htmlContent.js';\n\nexport interface IQuickItemHighlights {\n\tlabel?: IMatch[];\n\tdescription?: IMatch[];\n}\n\nexport interface IQuickPickItemHighlights extends IQuickItemHighlights {\n\tdetail?: IMatch[];\n}\n\nexport type QuickPickItem = IQuickPickSeparator | IQuickPickItem;\n\n/**\n * Base properties for a quick pick and quick tree item.\n */\nexport interface IQuickItem {\n\tid?: string;\n\tlabel: string;\n\tariaLabel?: string;\n\tdescription?: string;\n\t/**\n\t * Whether the item is displayed in italics.\n\t */\n\titalic?: boolean;\n\t/**\n\t * Whether the item is displayed with a strikethrough.\n\t */\n\tstrikethrough?: boolean;\n\t/**\n\t * Icon classes to be passed on as `IIconLabelValueOptions`\n\t * to the underlying `IconLabel` widget.\n\t */\n\ticonClasses?: readonly string[];\n\ticonPath?: { dark: URI; light?: URI };\n\t/**\n\t * Icon class to be assigned to the quick item container\n\t * directly.\n\t */\n\ticonClass?: string;\n\tbuttons?: readonly IQuickInputButton[];\n\t/**\n\t * Used when we're in multi-select mode. Renders a disabled checkbox.\n\t */\n\tdisabled?: boolean;\n}\n\n/**\n * Represents a quick pick item used in the quick pick UI.\n */\nexport interface IQuickPickItem extends IQuickItem {\n\t/**\n\t * The type of the quick pick item. Used to distinguish between 'item' and 'separator'\n\t */\n\ttype?: 'item';\n\t/**\n\t * The detail text of the quick pick item. Shown as the second line.\n\t */\n\tdetail?: string;\n\t/**\n\t * The tooltip for the quick pick item.\n\t */\n\ttooltip?: string | IMarkdownString;\n\thighlights?: IQuickPickItemHighlights;\n\t/**\n\t * Allows to show a keybinding next to the item to indicate\n\t * how the item can be triggered outside of the picker using\n\t * keyboard shortcut.\n\t */\n\tkeybinding?: ResolvedKeybinding;\n\t/**\n\t * Whether the item is picked by default when the Quick Pick is shown.\n\t */\n\tpicked?: boolean;\n\t/**\n\t * Whether the item is always shown in the Quick Pick regardless of filtering.\n\t */\n\talwaysShow?: boolean;\n\t/**\n\t * Defaults to true with `IQuickPick.canSelectMany`, can be false to disable picks for a single item\n\t */\n\tpickable?: boolean;\n}\n\nexport interface IQuickPickSeparator {\n\t/**\n\t * The type of the quick pick item. Used to distinguish between 'item' and 'separator'\n\t */\n\ttype: 'separator';\n\tid?: string;\n\tlabel?: string;\n\tdescription?: string;\n\tariaLabel?: string;\n\tbuttons?: readonly IQuickInputButton[];\n\ttooltip?: string | IMarkdownString;\n}\n\nexport interface IKeyMods {\n\treadonly ctrlCmd: boolean;\n\treadonly alt: boolean;\n}\n\nexport const NO_KEY_MODS: IKeyMods = { ctrlCmd: false, alt: false };\n\nexport interface IQuickNavigateConfiguration {\n\tkeybindings: readonly ResolvedKeybinding[];\n}\n\nexport interface IPickOptions<T extends IQuickPickItem> {\n\n\t/**\n\t * an optional string to show as the title of the quick input\n\t */\n\ttitle?: string;\n\n\t/**\n\t * the value to prefill in the input box\n\t */\n\tvalue?: string;\n\n\t/**\n\t * an optional string to show as placeholder in the input box to guide the user what she picks on\n\t */\n\tplaceHolder?: string;\n\n\t/**\n\t * the text to display underneath the input box\n\t */\n\tprompt?: string;\n\n\t/**\n\t * an optional flag to include the description when filtering the picks\n\t */\n\tmatchOnDescription?: boolean;\n\n\t/**\n\t * an optional flag to include the detail when filtering the picks\n\t */\n\tmatchOnDetail?: boolean;\n\n\t/**\n\t * an optional flag to filter the picks based on label. Defaults to true.\n\t */\n\tmatchOnLabel?: boolean;\n\n\t/**\n\t * an optional flag to sort the picks based by the label.\n\t */\n\tsortByLabel?: boolean;\n\n\t/**\n\t * an optional flag to not close the picker on focus lost\n\t */\n\tignoreFocusLost?: boolean;\n\n\t/**\n\t * an optional flag to make this picker multi-select\n\t */\n\tcanPickMany?: boolean;\n\n\t/**\n\t * enables quick navigate in the picker to open an element without typing\n\t */\n\tquickNavigate?: IQuickNavigateConfiguration;\n\n\t/**\n\t * Hides the input box from the picker UI. This is typically used\n\t * in combination with quick-navigation where no search UI should\n\t * be presented.\n\t */\n\thideInput?: boolean;\n\n\t/**\n\t * a context key to set when this picker is active\n\t */\n\tcontextKey?: string;\n\n\t/**\n\t * an optional property for the item to focus initially.\n\t */\n\tactiveItem?: Promise<T> | T;\n\n\tonKeyMods?: (keyMods: IKeyMods) => void;\n\tonDidFocus?: (entry: T) => void;\n\tonDidTriggerItemButton?: (context: IQuickPickItemButtonContext<T>) => void;\n\tonDidTriggerSeparatorButton?: (context: IQuickPickSeparatorButtonEvent) => void;\n}\n\nexport interface IInputOptions {\n\n\t/**\n\t * an optional string to show as the title of the quick input\n\t */\n\ttitle?: string;\n\n\t/**\n\t * the value to prefill in the input box\n\t */\n\tvalue?: string;\n\n\t/**\n\t * the selection of value, default to the whole prefilled value\n\t */\n\tvalueSelection?: readonly [number, number];\n\n\t/**\n\t * the text to display underneath the input box\n\t */\n\tprompt?: string;\n\n\t/**\n\t * an optional string to show as placeholder in the input box to guide the user what to type\n\t */\n\tplaceHolder?: string;\n\n\t/**\n\t * Controls if a password input is shown. Password input hides the typed text.\n\t */\n\tpassword?: boolean;\n\n\t/**\n\t * an optional flag to not close the input on focus lost\n\t */\n\tignoreFocusLost?: boolean;\n\n\t/**\n\t * an optional function that is used to validate user input.\n\t */\n\tvalidateInput?: (input: string) => Promise<string | null | undefined | { content: string; severity: Severity }>;\n}\n\nexport enum QuickInputHideReason {\n\n\t/**\n\t * Focus moved away from the quick input.\n\t */\n\tBlur = 1,\n\n\t/**\n\t * An explicit user gesture, e.g. pressing Escape key.\n\t */\n\tGesture,\n\n\t/**\n\t * Anything else.\n\t */\n\tOther\n}\n\nexport interface IQuickInputHideEvent {\n\treason: QuickInputHideReason;\n}\n\n/**\n * A collection of the different types of QuickInput\n */\nexport const enum QuickInputType {\n\tQuickPick = 'quickPick',\n\tInputBox = 'inputBox',\n\tQuickWidget = 'quickWidget',\n\tQuickTree = 'quickTree'\n}\n\n/**\n * Represents a quick input control that allows users to make selections or provide input quickly.\n */\nexport interface IQuickInput extends IDisposable {\n\n\t/**\n\t * The type of the quick input.\n\t */\n\treadonly type: QuickInputType;\n\n\t/**\n\t * An event that is fired when the quick input is hidden.\n\t */\n\treadonly onDidHide: Event<IQuickInputHideEvent>;\n\n\t/**\n\t * The title of the quick input.\n\t */\n\ttitle: string | undefined;\n\n\t/**\n\t * The buttons displayed in the quick input titlebar.\n\t */\n\tbuttons: ReadonlyArray<IQuickInputButton>;\n\n\t/**\n\t * An event that is fired when a button in the quick input is triggered.\n\t */\n\treadonly onDidTriggerButton: Event<IQuickInputButton>;\n\n\t/**\n\t * The context key associated with the quick input.\n\t */\n\tcontextKey: string | undefined;\n\n\t/**\n\t * Indicates whether the quick input is busy. Renders a progress bar if true.\n\t */\n\tbusy: boolean;\n\n\t/**\n\t * Indicates whether the quick input should be hidden when it loses focus.\n\t */\n\tignoreFocusOut: boolean;\n\n\t/**\n\t * Shows the quick input.\n\t */\n\tshow(): void;\n\n\t/**\n\t * Hides the quick input.\n\t */\n\thide(): void;\n\n\t/**\n\t * Notifies that the quick input has been hidden.\n\t * @param reason The reason why the quick input was hidden.\n\t */\n\tdidHide(reason?: QuickInputHideReason): void;\n\n\t/**\n\t * Notifies that the quick input will be hidden.\n\t * @param reason The reason why the quick input will be hidden.\n\t */\n\twillHide(reason?: QuickInputHideReason): void;\n}\n\nexport interface IQuickPickWillAcceptEvent {\n\n\t/**\n\t * Allows to disable the default accept handling\n\t * of the picker. If `veto` is called, the picker\n\t * will not trigger the `onDidAccept` event.\n\t */\n\tveto(): void;\n}\n\nexport interface IQuickPickDidAcceptEvent {\n\n\t/**\n\t * Signals if the picker item is to be accepted\n\t * in the background while keeping the picker open.\n\t */\n\tinBackground: boolean;\n}\n\n/**\n * Represents the activation behavior for items in a quick input. This means which item will be\n * \"active\" (aka focused).\n */\nexport enum ItemActivation {\n\t/**\n\t * No item will be active.\n\t */\n\tNONE,\n\t/**\n\t * First item will be active.\n\t */\n\tFIRST,\n\t/**\n\t * Second item will be active.\n\t */\n\tSECOND,\n\t/**\n\t * Last item will be active.\n\t */\n\tLAST\n}\n\n/**\n * Represents the focus options for a quick pick.\n */\nexport enum QuickPickFocus {\n\t/**\n\t * Focus the first item in the list.\n\t */\n\tFirst = 1,\n\t/**\n\t * Focus the second item in the list.\n\t */\n\tSecond,\n\t/**\n\t * Focus the last item in the list.\n\t */\n\tLast,\n\t/**\n\t * Focus the next item in the list.\n\t */\n\tNext,\n\t/**\n\t * Focus the previous item in the list.\n\t */\n\tPrevious,\n\t/**\n\t * Focus the next page in the list.\n\t */\n\tNextPage,\n\t/**\n\t * Focus the previous page in the list.\n\t */\n\tPreviousPage,\n\t/**\n\t * Focus the first item under the next separator.\n\t */\n\tNextSeparator,\n\t/**\n\t * Focus the first item under the current separator.\n\t */\n\tPreviousSeparator\n}\n\n/**\n * Represents a quick pick control that allows the user to select an item from a list of options.\n */\nexport interface IQuickPick<T extends IQuickPickItem, O extends { useSeparators: boolean } = { useSeparators: false }> extends IQuickInput {\n\n\t/**\n\t * The current value of the quick pick input.\n\t */\n\tvalue: string;\n\n\t/**\n\t * A method that allows to massage the value used for filtering, e.g, to remove certain parts.\n\t * @param value The value to be filtered.\n\t * @returns The filtered value.\n\t */\n\tfilterValue: (value: string) => string;\n\n\t/**\n\t * The ARIA label for the quick pick input.\n\t */\n\tariaLabel: string | undefined;\n\n\t/**\n\t * The placeholder text for the quick pick input.\n\t */\n\tplaceholder: string | undefined;\n\n\t/**\n\t * Text shown below the quick pick input.\n\t */\n\tprompt: string | undefined;\n\n\t/**\n\t * An event that is fired when the value of the quick pick input changes.\n\t */\n\treadonly onDidChangeValue: Event<string>;\n\n\t/**\n\t * An event that is fired when the quick pick is about to accept the selected item.\n\t */\n\treadonly onWillAccept: Event<IQuickPickWillAcceptEvent>;\n\n\t/**\n\t * An event that is fired when the quick pick has accepted the selected item.\n\t */\n\treadonly onDidAccept: Event<IQuickPickDidAcceptEvent>;\n\n\t/**\n\t * If enabled, the `onDidAccept` event will be fired when pressing the arrow-right key to accept the selected item without closing the picker.\n\t */\n\tcanAcceptInBackground: boolean;\n\n\t/**\n\t * An event that is fired when an item button is triggered.\n\t */\n\treadonly onDidTriggerItemButton: Event<IQuickPickItemButtonEvent<T>>;\n\n\t/**\n\t * An event that is fired when a separator button is triggered.\n\t */\n\treadonly onDidTriggerSeparatorButton: Event<IQuickPickSeparatorButtonEvent>;\n\n\t/**\n\t * The items to be displayed in the quick pick.\n\t */\n\titems: O extends { useSeparators: true } ? ReadonlyArray<T | IQuickPickSeparator> : ReadonlyArray<T>;\n\n\t/**\n\t * Whether multiple items can be selected. If so, checkboxes will be rendered.\n\t */\n\tcanSelectMany: boolean;\n\n\t/**\n\t * Whether to match on the description of the items.\n\t */\n\tmatchOnDescription: boolean;\n\n\t/**\n\t * Whether to match on the detail of the items.\n\t */\n\tmatchOnDetail: boolean;\n\n\t/**\n\t * Whether to match on the label of the items.\n\t */\n\tmatchOnLabel: boolean;\n\n\t/**\n\t * Whether to sort the items by label.\n\t */\n\tsortByLabel: boolean;\n\n\t/**\n\t * Whether to keep the scroll position when the quick pick input is updated.\n\t */\n\tkeepScrollPosition: boolean;\n\n\t/**\n\t * The configuration for quick navigation.\n\t */\n\tquickNavigate: IQuickNavigateConfiguration | undefined;\n\n\t/**\n\t * The currently active items.\n\t */\n\tactiveItems: ReadonlyArray<T>;\n\n\t/**\n\t * An event that is fired when the active items change.\n\t */\n\treadonly onDidChangeActive: Event<T[]>;\n\n\t/**\n\t * The item activation behavior for the next time `items` is set. Item activation means which\n\t * item is \"active\" (aka focused) when the quick pick is opened or when `items` is set.\n\t */\n\titemActivation: ItemActivation;\n\n\t/**\n\t * The currently selected items.\n\t */\n\tselectedItems: ReadonlyArray<T>;\n\n\t/**\n\t * An event that is fired when the selected items change.\n\t */\n\treadonly onDidChangeSelection: Event<T[]>;\n\n\t/**\n\t * The key modifiers.\n\t */\n\treadonly keyMods: IKeyMods;\n\n\t/**\n\t * The selection range for the value in the input.\n\t */\n\tvalueSelection: Readonly<[number, number]> | undefined;\n\n\t/**\n\t * Hides the input box from the picker UI. This is typically used in combination with quick-navigation where no search UI should be presented.\n\t */\n\thideInput: boolean;\n\n\t/**\n\t * Focus a particular item in the list. Used internally for keyboard navigation.\n\t * @param focus The focus behavior.\n\t */\n\tfocus(focus: QuickPickFocus): void;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t * @param inBackground Whether you are accepting an item in the background and keeping the picker open.\n\t */\n\taccept(inBackground?: boolean): void;\n}\n\n/**\n * Represents a toggle for quick input.\n */\nexport interface IQuickInputToggle {\n}\n\n/**\n * Represents an input box in a quick input dialog.\n */\nexport interface IInputBox extends IQuickInput {\n\n\t/**\n\t * Value shown in the input box.\n\t */\n\tvalue: string;\n\n\t/**\n\t * Provide start and end values to be selected in the input box.\n\t */\n\tvalueSelection: Readonly<[number, number]> | undefined;\n\n\t/**\n\t * Value shown as example for input.\n\t */\n\tplaceholder: string | undefined;\n\n\t/**\n\t * Determines if the input value should be hidden while typing.\n\t */\n\tpassword: boolean;\n\n\t/**\n\t * Event called when the input value changes.\n\t */\n\treadonly onDidChangeValue: Event<string>;\n\n\t/**\n\t * Event called when the user submits the input.\n\t */\n\treadonly onDidAccept: Event<void>;\n\n\t/**\n\t * Text show below the input box.\n\t */\n\tprompt: string | undefined;\n\n\t/**\n\t * An optional validation message indicating a problem with the current input value.\n\t * Returning undefined clears the validation message.\n\t */\n\tvalidationMessage: string | undefined;\n\n\t/**\n\t * Severity of the input validation message.\n\t */\n\tseverity: Severity;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t */\n\taccept(): void;\n}\n\nexport enum QuickInputButtonLocation {\n\t/**\n\t * In the title bar.\n\t */\n\tTitle = 1,\n\n\t/**\n\t * To the right of the input box.\n\t */\n\tInline = 2,\n\n\t/**\n\t * At the far end inside the input box.\n\t * Used by the public API to create toggles.\n\t */\n\tInput = 3,\n}\n\n/**\n * Represents a button in the quick input UI.\n */\nexport interface IQuickInputButton {\n\t/**\n\t * The path to the icon for the button.\n\t * Either `iconPath` or `iconClass` is required.\n\t */\n\ticonPath?: { dark: URI; light?: URI };\n\t/**\n\t * The CSS class for the icon of the button.\n\t * Either `iconPath` or `iconClass` is required.\n\t */\n\ticonClass?: string;\n\t/**\n\t * The tooltip text for the button.\n\t */\n\ttooltip?: string;\n\t/**\n\t * Whether to always show the button.\n\t * By default, buttons are only visible when hovering over them with the mouse.\n\t */\n\talwaysVisible?: boolean;\n\t/**\n\t * Where the button should be rendered. The default is {@link QuickInputButtonLocation.Title}.\n\t * @note This property is ignored if the button was added to a QuickPickItem.\n\t */\n\tlocation?: QuickInputButtonLocation;\n\t/**\n\t * When present, indicates that the button is a toggle button that can be checked or unchecked.\n\t * The `checked` property indicates the current state of the toggle and will be updated\n\t * when the button is clicked.\n\t */\n\treadonly toggle?: { checked: boolean };\n}\n\n/**\n * Represents an event that occurs when a button associated with a quick pick item is clicked.\n * @template T - The type of the quick pick item.\n */\nexport interface IQuickPickItemButtonEvent<T extends IQuickPickItem> {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The quick pick item associated with the button.\n\t */\n\titem: T;\n}\n\n/**\n * Represents an event that occurs when a separator button is clicked in a quick pick.\n */\nexport interface IQuickPickSeparatorButtonEvent {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The separator associated with the button.\n\t */\n\tseparator: IQuickPickSeparator;\n}\n\n/**\n * Represents a context for a button associated with a quick pick item.\n * @template T - The type of the quick pick item.\n */\nexport interface IQuickPickItemButtonContext<T extends IQuickPickItem> extends IQuickPickItemButtonEvent<T> {\n\t/**\n\t * Removes the associated item from the quick pick.\n\t */\n\tremoveItem(): void;\n}\n\nexport type QuickPickInput<T = IQuickPickItem> = T | IQuickPickSeparator;\n\n\n//#region Fuzzy Scorer Support\n\nexport type IQuickPickItemWithResource = IQuickPickItem & { resource?: URI };\n\nexport class QuickPickItemScorerAccessor implements IItemAccessor<IQuickPickItemWithResource> {\n\n\tconstructor(private options?: { skipDescription?: boolean; skipPath?: boolean }) { }\n}\n\nexport const quickPickItemScorerAccessor = new QuickPickItemScorerAccessor();\n\n//#endregion\n\nexport const IQuickInputService = createDecorator<IQuickInputService>('quickInputService');\n\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\n\nexport interface IQuickInputService {\n\n\treadonly _serviceBrand: undefined;\n\n\t/**\n\t * Provides access to the quick access providers.\n\t */\n\treadonly quickAccess: IQuickAccessController;\n\n\t/**\n\t * Opens the quick input box for selecting items and returns a promise\n\t * with the user selected item(s) if any.\n\t */\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: true }, token?: CancellationToken): Promise<T[] | undefined>;\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: false }, token?: CancellationToken): Promise<T | undefined>;\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: Omit<IPickOptions<T>, 'canPickMany'>, token?: CancellationToken): Promise<T | undefined>;\n\n\t/**\n\t * Opens the quick input box for text input and returns a promise with the user typed value if any.\n\t */\n\tinput(options?: IInputOptions, token?: CancellationToken): Promise<string | undefined>;\n\n\t/**\n\t * Provides raw access to the quick pick controller.\n\t */\n\tcreateQuickPick<T extends IQuickPickItem>(options: { useSeparators: true }): IQuickPick<T, { useSeparators: true }>;\n\tcreateQuickPick<T extends IQuickPickItem>(options?: { useSeparators: boolean }): IQuickPick<T, { useSeparators: false }>;\n\n\t/**\n\t * Provides raw access to the input box controller.\n\t */\n\tcreateInputBox(): IInputBox;\n\n\t/**\n\t * Toggles hover for the current quick input item\n\t */\n\ttoggleHover(): void;\n\n\t/**\n\t * The current quick pick that is visible. Undefined if none is open.\n\t */\n\tcurrentQuickInput: IQuickInput | undefined;\n}\n\n//#region Quick Tree\n\n/**\n * Represents a quick tree control that displays hierarchical data with checkboxes.\n */\nexport interface IQuickTree<T extends IQuickTreeItem> extends IQuickInput {\n\n\t/**\n\t * Focus a particular item in the list. Used internally for keyboard navigation.\n\t * @param focus The focus behavior.\n\t */\n\tfocus(focus: QuickPickFocus): void;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t * @param inBackground Whether you are accepting an item in the background and keeping the picker open.\n\t */\n\taccept(inBackground?: boolean): void;\n}\n\n/**\n * Represents a tree item in the quick tree.\n */\nexport interface IQuickTreeItem extends IQuickItem {\n\t/**\n\t * The checked state of the item. Can be true, false, or 'mixed' for tri-state.\n\t * When canSelectMany is false, this is ignored and the item is treated as a single selection.\n\t * When canSelectMany is true, this indicates the checkbox state of the item.\n\t * If undefined, the item is unchecked by default.\n\t */\n\tchecked?: boolean | 'mixed';\n\n\t/**\n\t * The children of this tree item.\n\t */\n\tchildren?: readonly IQuickTreeItem[];\n\n\t/**\n\t * Defaults to true, can be false to disable picks for a single item.\n\t * When false, the item is not selectable and does not respond to mouse/keyboard activation.\n\t */\n\tpickable?: boolean;\n}\n\n/**\n * Represents an event that occurs when the checkbox state of a tree item changes.\n * @template T - The type of the tree item.\n */\nexport interface IQuickTreeCheckboxEvent<T extends IQuickTreeItem> {\n\t/**\n\t * The tree item whose checkbox state changed.\n\t */\n\titem: T;\n\n\t/**\n\t * The new checked state.\n\t */\n\tchecked: boolean | 'mixed';\n}\n\n/**\n * Represents an event that occurs when a button associated with a quick tree item is clicked.\n * @template T - The type of the quick tree item.\n */\nexport interface IQuickTreeItemButtonEvent<T extends IQuickTreeItem> {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The quick tree item associated with the button.\n\t */\n\titem: T;\n}\n\n//#endregion\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/quickinput/common/quickInput.ts","vs/platform/quickinput/common/quickInput.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAIhG,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AA8G9E,MAAM,CAAC,MAAM,WAAW,GAAa,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;AAiIpE,MAAM,CAAN,IAAY,oBAgBX;AAhBD,WAAY,oBAAoB;IAE/B;;OAEG;IACH,+DAAQ,CAAA;IAER;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,iEAAK,CAAA;AACN,CAAC,EAhBW,oBAAoB,KAApB,oBAAoB,QAgB/B;AAuGD;;;GAGG;AACH,MAAM,CAAN,IAAY,cAiBX;AAjBD,WAAY,cAAc;IACzB;;OAEG;IACH,mDAAI,CAAA;IACJ;;OAEG;IACH,qDAAK,CAAA;IACL;;OAEG;IACH,uDAAM,CAAA;IACN;;OAEG;IACH,mDAAI,CAAA;AACL,CAAC,EAjBW,cAAc,KAAd,cAAc,QAiBzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAqCX;AArCD,WAAY,cAAc;IACzB;;OAEG;IACH,qDAAS,CAAA;IACT;;OAEG;IACH,uDAAM,CAAA;IACN;;OAEG;IACH,mDAAI,CAAA;IACJ;;OAEG;IACH,mDAAI,CAAA;IACJ;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,mEAAY,CAAA;IACZ;;OAEG;IACH,qEAAa,CAAA;IACb;;OAEG;IACH,6EAAiB,CAAA;AAClB,CAAC,EArCW,cAAc,KAAd,cAAc,QAqCzB;AAuND,MAAM,CAAN,IAAY,wBAgBX;AAhBD,WAAY,wBAAwB;IACnC;;OAEG;IACH,yEAAS,CAAA;IAET;;OAEG;IACH,2EAAU,CAAA;IAEV;;;OAGG;IACH,yEAAS,CAAA;AACV,CAAC,EAhBW,wBAAwB,KAAxB,wBAAwB,QAgBnC;AAqFD,MAAM,OAAO,2BAA2B;IAEvC,YAAoB,OAA2D;QAA3D,YAAO,GAAP,OAAO,CAAoD;IAAI,CAAC;CACpF;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,2BAA2B,EAAE,CAAC;AAE7E,YAAY;AAEZ,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAqB,mBAAmB,CAAC,CAAC;AA2H3F,YAAY","file":"quickInput.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Event } from '../../../base/common/event.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nimport { IQuickAccessController } from './quickAccess.js';\nimport { IMatch } from '../../../base/common/filters.js';\nimport { IItemAccessor } from '../../../base/common/fuzzyScorer.js';\nimport { ResolvedKeybinding } from '../../../base/common/keybindings.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport Severity from '../../../base/common/severity.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { IMarkdownString } from '../../../base/common/htmlContent.js';\n\nexport interface IQuickItemHighlights {\n\tlabel?: IMatch[];\n\tdescription?: IMatch[];\n}\n\nexport interface IQuickPickItemHighlights extends IQuickItemHighlights {\n\tdetail?: IMatch[];\n}\n\nexport type QuickPickItem = IQuickPickSeparator | IQuickPickItem;\n\n/**\n * Base properties for a quick pick and quick tree item.\n */\nexport interface IQuickItem {\n\tid?: string;\n\tlabel: string;\n\tariaLabel?: string;\n\tdescription?: string;\n\t/**\n\t * Whether the item is displayed in italics.\n\t */\n\titalic?: boolean;\n\t/**\n\t * Whether the item is displayed with a strikethrough.\n\t */\n\tstrikethrough?: boolean;\n\t/**\n\t * Icon classes to be passed on as `IIconLabelValueOptions`\n\t * to the underlying `IconLabel` widget.\n\t */\n\ticonClasses?: readonly string[];\n\ticonPath?: { dark: URI; light?: URI };\n\t/**\n\t * Icon class to be assigned to the quick item container\n\t * directly.\n\t */\n\ticonClass?: string;\n\tbuttons?: readonly IQuickInputButton[];\n\t/**\n\t * Used when we're in multi-select mode. Renders a disabled checkbox.\n\t */\n\tdisabled?: boolean;\n}\n\n/**\n * Represents a quick pick item used in the quick pick UI.\n */\nexport interface IQuickPickItem extends IQuickItem {\n\t/**\n\t * The type of the quick pick item. Used to distinguish between 'item' and 'separator'\n\t */\n\ttype?: 'item';\n\t/**\n\t * The detail text of the quick pick item. Shown as the second line.\n\t */\n\tdetail?: string;\n\t/**\n\t * The tooltip for the quick pick item.\n\t */\n\ttooltip?: string | IMarkdownString;\n\thighlights?: IQuickPickItemHighlights;\n\t/**\n\t * Allows to show a keybinding next to the item to indicate\n\t * how the item can be triggered outside of the picker using\n\t * keyboard shortcut.\n\t */\n\tkeybinding?: ResolvedKeybinding;\n\t/**\n\t * Whether the item is picked by default when the Quick Pick is shown.\n\t */\n\tpicked?: boolean;\n\t/**\n\t * Whether the item is always shown in the Quick Pick regardless of filtering.\n\t */\n\talwaysShow?: boolean;\n\t/**\n\t * Defaults to true with `IQuickPick.canSelectMany`, can be false to disable picks for a single item\n\t */\n\tpickable?: boolean;\n}\n\nexport interface IQuickPickSeparator {\n\t/**\n\t * The type of the quick pick item. Used to distinguish between 'item' and 'separator'\n\t */\n\ttype: 'separator';\n\tid?: string;\n\tlabel?: string;\n\tdescription?: string;\n\tariaLabel?: string;\n\tbuttons?: readonly IQuickInputButton[];\n\ttooltip?: string | IMarkdownString;\n}\n\nexport interface IKeyMods {\n\treadonly ctrlCmd: boolean;\n\treadonly alt: boolean;\n}\n\nexport const NO_KEY_MODS: IKeyMods = { ctrlCmd: false, alt: false };\n\nexport interface IQuickNavigateConfiguration {\n\tkeybindings: readonly ResolvedKeybinding[];\n}\n\nexport interface IPickOptions<T extends IQuickPickItem> {\n\n\t/**\n\t * an optional string to show as the title of the quick input\n\t */\n\ttitle?: string;\n\n\t/**\n\t * the value to prefill in the input box\n\t */\n\tvalue?: string;\n\n\t/**\n\t * an optional string to show as placeholder in the input box to guide the user what she picks on\n\t */\n\tplaceHolder?: string;\n\n\t/**\n\t * the text to display underneath the input box\n\t */\n\tprompt?: string;\n\n\t/**\n\t * an optional flag to include the description when filtering the picks\n\t */\n\tmatchOnDescription?: boolean;\n\n\t/**\n\t * an optional flag to include the detail when filtering the picks\n\t */\n\tmatchOnDetail?: boolean;\n\n\t/**\n\t * an optional flag to filter the picks based on label. Defaults to true.\n\t */\n\tmatchOnLabel?: boolean;\n\n\t/**\n\t * an optional flag to sort the picks based by the label.\n\t */\n\tsortByLabel?: boolean;\n\n\t/**\n\t * an optional flag to not close the picker on focus lost\n\t */\n\tignoreFocusLost?: boolean;\n\n\t/**\n\t * an optional flag to make this picker multi-select\n\t */\n\tcanPickMany?: boolean;\n\n\t/**\n\t * enables quick navigate in the picker to open an element without typing\n\t */\n\tquickNavigate?: IQuickNavigateConfiguration;\n\n\t/**\n\t * Hides the input box from the picker UI. This is typically used\n\t * in combination with quick-navigation where no search UI should\n\t * be presented.\n\t */\n\thideInput?: boolean;\n\n\t/**\n\t * a context key to set when this picker is active\n\t */\n\tcontextKey?: string;\n\n\t/**\n\t * an optional property for the item to focus initially.\n\t */\n\tactiveItem?: Promise<T> | T;\n\n\tonKeyMods?: (keyMods: IKeyMods) => void;\n\tonDidFocus?: (entry: T) => void;\n\tonDidTriggerItemButton?: (context: IQuickPickItemButtonContext<T>) => void;\n\tonDidTriggerSeparatorButton?: (context: IQuickPickSeparatorButtonEvent) => void;\n}\n\nexport interface IInputOptions {\n\n\t/**\n\t * an optional string to show as the title of the quick input\n\t */\n\ttitle?: string;\n\n\t/**\n\t * the value to prefill in the input box\n\t */\n\tvalue?: string;\n\n\t/**\n\t * the selection of value, default to the whole prefilled value\n\t */\n\tvalueSelection?: readonly [number, number];\n\n\t/**\n\t * the text to display underneath the input box\n\t */\n\tprompt?: string;\n\n\t/**\n\t * an optional string to show as placeholder in the input box to guide the user what to type\n\t */\n\tplaceHolder?: string;\n\n\t/**\n\t * Controls if a password input is shown. Password input hides the typed text.\n\t */\n\tpassword?: boolean;\n\n\t/**\n\t * an optional flag to not close the input on focus lost\n\t */\n\tignoreFocusLost?: boolean;\n\n\t/**\n\t * an optional function that is used to validate user input.\n\t */\n\tvalidateInput?: (input: string) => Promise<string | null | undefined | { content: string; severity: Severity }>;\n}\n\nexport enum QuickInputHideReason {\n\n\t/**\n\t * Focus moved away from the quick input.\n\t */\n\tBlur = 1,\n\n\t/**\n\t * An explicit user gesture, e.g. pressing Escape key.\n\t */\n\tGesture,\n\n\t/**\n\t * Anything else.\n\t */\n\tOther\n}\n\nexport interface IQuickInputHideEvent {\n\treason: QuickInputHideReason;\n}\n\n/**\n * A collection of the different types of QuickInput\n */\nexport const enum QuickInputType {\n\tQuickPick = 'quickPick',\n\tInputBox = 'inputBox',\n\tQuickWidget = 'quickWidget',\n\tQuickTree = 'quickTree'\n}\n\n/**\n * Represents a quick input control that allows users to make selections or provide input quickly.\n */\nexport interface IQuickInput extends IDisposable {\n\n\t/**\n\t * The type of the quick input.\n\t */\n\treadonly type: QuickInputType;\n\n\t/**\n\t * An event that is fired when the quick input is hidden.\n\t */\n\treadonly onDidHide: Event<IQuickInputHideEvent>;\n\n\t/**\n\t * The title of the quick input.\n\t */\n\ttitle: string | undefined;\n\n\t/**\n\t * The buttons displayed in the quick input titlebar.\n\t */\n\tbuttons: ReadonlyArray<IQuickInputButton>;\n\n\t/**\n\t * An event that is fired when a button in the quick input is triggered.\n\t */\n\treadonly onDidTriggerButton: Event<IQuickInputButton>;\n\n\t/**\n\t * The context key associated with the quick input.\n\t */\n\tcontextKey: string | undefined;\n\n\t/**\n\t * Indicates whether the quick input is busy. Renders a progress bar if true.\n\t */\n\tbusy: boolean;\n\n\t/**\n\t * Indicates whether the quick input should be hidden when it loses focus.\n\t */\n\tignoreFocusOut: boolean;\n\n\t/**\n\t * Shows the quick input.\n\t */\n\tshow(): void;\n\n\t/**\n\t * Hides the quick input.\n\t */\n\thide(): void;\n\n\t/**\n\t * Notifies that the quick input has been hidden.\n\t * @param reason The reason why the quick input was hidden.\n\t */\n\tdidHide(reason?: QuickInputHideReason): void;\n\n\t/**\n\t * Notifies that the quick input will be hidden.\n\t * @param reason The reason why the quick input will be hidden.\n\t */\n\twillHide(reason?: QuickInputHideReason): void;\n}\n\nexport interface IQuickPickWillAcceptEvent {\n\n\t/**\n\t * Allows to disable the default accept handling\n\t * of the picker. If `veto` is called, the picker\n\t * will not trigger the `onDidAccept` event.\n\t */\n\tveto(): void;\n}\n\nexport interface IQuickPickDidAcceptEvent {\n\n\t/**\n\t * Signals if the picker item is to be accepted\n\t * in the background while keeping the picker open.\n\t */\n\tinBackground: boolean;\n}\n\n/**\n * Represents the activation behavior for items in a quick input. This means which item will be\n * \"active\" (aka focused).\n */\nexport enum ItemActivation {\n\t/**\n\t * No item will be active.\n\t */\n\tNONE,\n\t/**\n\t * First item will be active.\n\t */\n\tFIRST,\n\t/**\n\t * Second item will be active.\n\t */\n\tSECOND,\n\t/**\n\t * Last item will be active.\n\t */\n\tLAST\n}\n\n/**\n * Represents the focus options for a quick pick.\n */\nexport enum QuickPickFocus {\n\t/**\n\t * Focus the first item in the list.\n\t */\n\tFirst = 1,\n\t/**\n\t * Focus the second item in the list.\n\t */\n\tSecond,\n\t/**\n\t * Focus the last item in the list.\n\t */\n\tLast,\n\t/**\n\t * Focus the next item in the list.\n\t */\n\tNext,\n\t/**\n\t * Focus the previous item in the list.\n\t */\n\tPrevious,\n\t/**\n\t * Focus the next page in the list.\n\t */\n\tNextPage,\n\t/**\n\t * Focus the previous page in the list.\n\t */\n\tPreviousPage,\n\t/**\n\t * Focus the first item under the next separator.\n\t */\n\tNextSeparator,\n\t/**\n\t * Focus the first item under the current separator.\n\t */\n\tPreviousSeparator\n}\n\n/**\n * Represents a quick pick control that allows the user to select an item from a list of options.\n */\nexport interface IQuickPick<T extends IQuickPickItem, O extends { useSeparators: boolean } = { useSeparators: false }> extends IQuickInput {\n\n\t/**\n\t * The current value of the quick pick input.\n\t */\n\tvalue: string;\n\n\t/**\n\t * A method that allows to massage the value used for filtering, e.g, to remove certain parts.\n\t * @param value The value to be filtered.\n\t * @returns The filtered value.\n\t */\n\tfilterValue: (value: string) => string;\n\n\t/**\n\t * The ARIA label for the quick pick input.\n\t */\n\tariaLabel: string | undefined;\n\n\t/**\n\t * The placeholder text for the quick pick input.\n\t */\n\tplaceholder: string | undefined;\n\n\t/**\n\t * Text shown below the quick pick input.\n\t */\n\tprompt: string | undefined;\n\n\t/**\n\t * An event that is fired when the value of the quick pick input changes.\n\t */\n\treadonly onDidChangeValue: Event<string>;\n\n\t/**\n\t * An event that is fired when the quick pick is about to accept the selected item.\n\t */\n\treadonly onWillAccept: Event<IQuickPickWillAcceptEvent>;\n\n\t/**\n\t * An event that is fired when the quick pick has accepted the selected item.\n\t */\n\treadonly onDidAccept: Event<IQuickPickDidAcceptEvent>;\n\n\t/**\n\t * If enabled, the `onDidAccept` event will be fired when pressing the arrow-right key to accept the selected item without closing the picker.\n\t */\n\tcanAcceptInBackground: boolean;\n\n\t/**\n\t * An event that is fired when an item button is triggered.\n\t */\n\treadonly onDidTriggerItemButton: Event<IQuickPickItemButtonEvent<T>>;\n\n\t/**\n\t * An event that is fired when a separator button is triggered.\n\t */\n\treadonly onDidTriggerSeparatorButton: Event<IQuickPickSeparatorButtonEvent>;\n\n\t/**\n\t * The items to be displayed in the quick pick.\n\t */\n\titems: O extends { useSeparators: true } ? ReadonlyArray<T | IQuickPickSeparator> : ReadonlyArray<T>;\n\n\t/**\n\t * Whether multiple items can be selected. If so, checkboxes will be rendered.\n\t */\n\tcanSelectMany: boolean;\n\n\t/**\n\t * Whether to match on the description of the items.\n\t */\n\tmatchOnDescription: boolean;\n\n\t/**\n\t * Whether to match on the detail of the items.\n\t */\n\tmatchOnDetail: boolean;\n\n\t/**\n\t * Whether to match on the label of the items.\n\t */\n\tmatchOnLabel: boolean;\n\n\t/**\n\t * Whether to sort the items by label.\n\t */\n\tsortByLabel: boolean;\n\n\t/**\n\t * Whether to keep the scroll position when the quick pick input is updated.\n\t */\n\tkeepScrollPosition: boolean;\n\n\t/**\n\t * The configuration for quick navigation.\n\t */\n\tquickNavigate: IQuickNavigateConfiguration | undefined;\n\n\t/**\n\t * The currently active items.\n\t */\n\tactiveItems: ReadonlyArray<T>;\n\n\t/**\n\t * An event that is fired when the active items change.\n\t */\n\treadonly onDidChangeActive: Event<T[]>;\n\n\t/**\n\t * The item activation behavior for the next time `items` is set. Item activation means which\n\t * item is \"active\" (aka focused) when the quick pick is opened or when `items` is set.\n\t */\n\titemActivation: ItemActivation;\n\n\t/**\n\t * The currently selected items.\n\t */\n\tselectedItems: ReadonlyArray<T>;\n\n\t/**\n\t * An event that is fired when the selected items change.\n\t */\n\treadonly onDidChangeSelection: Event<T[]>;\n\n\t/**\n\t * The key modifiers.\n\t */\n\treadonly keyMods: IKeyMods;\n\n\t/**\n\t * The selection range for the value in the input.\n\t */\n\tvalueSelection: Readonly<[number, number]> | undefined;\n\n\t/**\n\t * Hides the input box from the picker UI. This is typically used in combination with quick-navigation where no search UI should be presented.\n\t */\n\thideInput: boolean;\n\n\t/**\n\t * Focus a particular item in the list. Used internally for keyboard navigation.\n\t * @param focus The focus behavior.\n\t */\n\tfocus(focus: QuickPickFocus): void;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t * @param inBackground Whether you are accepting an item in the background and keeping the picker open.\n\t */\n\taccept(inBackground?: boolean): void;\n}\n\n/**\n * Represents an input box in a quick input dialog.\n */\nexport interface IInputBox extends IQuickInput {\n\n\t/**\n\t * Value shown in the input box.\n\t */\n\tvalue: string;\n\n\t/**\n\t * Provide start and end values to be selected in the input box.\n\t */\n\tvalueSelection: Readonly<[number, number]> | undefined;\n\n\t/**\n\t * Value shown as example for input.\n\t */\n\tplaceholder: string | undefined;\n\n\t/**\n\t * Determines if the input value should be hidden while typing.\n\t */\n\tpassword: boolean;\n\n\t/**\n\t * Event called when the input value changes.\n\t */\n\treadonly onDidChangeValue: Event<string>;\n\n\t/**\n\t * Event called when the user submits the input.\n\t */\n\treadonly onDidAccept: Event<void>;\n\n\t/**\n\t * Text show below the input box.\n\t */\n\tprompt: string | undefined;\n\n\t/**\n\t * An optional validation message indicating a problem with the current input value.\n\t * Returning undefined clears the validation message.\n\t */\n\tvalidationMessage: string | undefined;\n\n\t/**\n\t * Severity of the input validation message.\n\t */\n\tseverity: Severity;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t */\n\taccept(): void;\n}\n\nexport enum QuickInputButtonLocation {\n\t/**\n\t * In the title bar.\n\t */\n\tTitle = 1,\n\n\t/**\n\t * To the right of the input box.\n\t */\n\tInline = 2,\n\n\t/**\n\t * At the far end inside the input box.\n\t * Used by the public API to create toggles.\n\t */\n\tInput = 3,\n}\n\n/**\n * Represents a button in the quick input UI.\n */\nexport interface IQuickInputButton {\n\t/**\n\t * The path to the icon for the button.\n\t * Either `iconPath` or `iconClass` is required.\n\t */\n\ticonPath?: { dark: URI; light?: URI };\n\t/**\n\t * The CSS class for the icon of the button.\n\t * Either `iconPath` or `iconClass` is required.\n\t */\n\ticonClass?: string;\n\t/**\n\t * The tooltip text for the button.\n\t */\n\ttooltip?: string;\n\t/**\n\t * Whether to always show the button.\n\t * By default, buttons are only visible when hovering over them with the mouse.\n\t */\n\talwaysVisible?: boolean;\n\t/**\n\t * Where the button should be rendered. The default is {@link QuickInputButtonLocation.Title}.\n\t * @note This property is ignored if the button was added to a QuickPickItem.\n\t */\n\tlocation?: QuickInputButtonLocation;\n\t/**\n\t * When present, indicates that the button is a toggle button that can be checked or unchecked.\n\t * The `checked` property indicates the current state of the toggle and will be updated\n\t * when the button is clicked.\n\t */\n\treadonly toggle?: { checked: boolean };\n}\n\n/**\n * Represents an event that occurs when a button associated with a quick pick item is clicked.\n * @template T - The type of the quick pick item.\n */\nexport interface IQuickPickItemButtonEvent<T extends IQuickPickItem> {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The quick pick item associated with the button.\n\t */\n\titem: T;\n}\n\n/**\n * Represents an event that occurs when a separator button is clicked in a quick pick.\n */\nexport interface IQuickPickSeparatorButtonEvent {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The separator associated with the button.\n\t */\n\tseparator: IQuickPickSeparator;\n}\n\n/**\n * Represents a context for a button associated with a quick pick item.\n * @template T - The type of the quick pick item.\n */\nexport interface IQuickPickItemButtonContext<T extends IQuickPickItem> extends IQuickPickItemButtonEvent<T> {\n\t/**\n\t * Removes the associated item from the quick pick.\n\t */\n\tremoveItem(): void;\n}\n\nexport type QuickPickInput<T = IQuickPickItem> = T | IQuickPickSeparator;\n\n\n//#region Fuzzy Scorer Support\n\nexport type IQuickPickItemWithResource = IQuickPickItem & { resource?: URI };\n\nexport class QuickPickItemScorerAccessor implements IItemAccessor<IQuickPickItemWithResource> {\n\n\tconstructor(private options?: { skipDescription?: boolean; skipPath?: boolean }) { }\n}\n\nexport const quickPickItemScorerAccessor = new QuickPickItemScorerAccessor();\n\n//#endregion\n\nexport const IQuickInputService = createDecorator<IQuickInputService>('quickInputService');\n\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\n\nexport interface IQuickInputService {\n\n\treadonly _serviceBrand: undefined;\n\n\t/**\n\t * Provides access to the quick access providers.\n\t */\n\treadonly quickAccess: IQuickAccessController;\n\n\t/**\n\t * Opens the quick input box for selecting items and returns a promise\n\t * with the user selected item(s) if any.\n\t */\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: true }, token?: CancellationToken): Promise<T[] | undefined>;\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: false }, token?: CancellationToken): Promise<T | undefined>;\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: Omit<IPickOptions<T>, 'canPickMany'>, token?: CancellationToken): Promise<T | undefined>;\n\n\t/**\n\t * Opens the quick input box for text input and returns a promise with the user typed value if any.\n\t */\n\tinput(options?: IInputOptions, token?: CancellationToken): Promise<string | undefined>;\n\n\t/**\n\t * Provides raw access to the quick pick controller.\n\t */\n\tcreateQuickPick<T extends IQuickPickItem>(options: { useSeparators: true }): IQuickPick<T, { useSeparators: true }>;\n\tcreateQuickPick<T extends IQuickPickItem>(options?: { useSeparators: boolean }): IQuickPick<T, { useSeparators: false }>;\n\n\t/**\n\t * Provides raw access to the input box controller.\n\t */\n\tcreateInputBox(): IInputBox;\n\n\t/**\n\t * Toggles hover for the current quick input item\n\t */\n\ttoggleHover(): void;\n\n\t/**\n\t * The current quick pick that is visible. Undefined if none is open.\n\t */\n\tcurrentQuickInput: IQuickInput | undefined;\n}\n\n//#region Quick Tree\n\n/**\n * Represents a quick tree control that displays hierarchical data with checkboxes.\n */\nexport interface IQuickTree<T extends IQuickTreeItem> extends IQuickInput {\n\n\t/**\n\t * Focus a particular item in the list. Used internally for keyboard navigation.\n\t * @param focus The focus behavior.\n\t */\n\tfocus(focus: QuickPickFocus): void;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t * @param inBackground Whether you are accepting an item in the background and keeping the picker open.\n\t */\n\taccept(inBackground?: boolean): void;\n}\n\n/**\n * Represents a tree item in the quick tree.\n */\nexport interface IQuickTreeItem extends IQuickItem {\n\t/**\n\t * The checked state of the item. Can be true, false, or 'mixed' for tri-state.\n\t * When canSelectMany is false, this is ignored and the item is treated as a single selection.\n\t * When canSelectMany is true, this indicates the checkbox state of the item.\n\t * If undefined, the item is unchecked by default.\n\t */\n\tchecked?: boolean | 'mixed';\n\n\t/**\n\t * The children of this tree item.\n\t */\n\tchildren?: readonly IQuickTreeItem[];\n\n\t/**\n\t * Defaults to true, can be false to disable picks for a single item.\n\t * When false, the item is not selectable and does not respond to mouse/keyboard activation.\n\t */\n\tpickable?: boolean;\n}\n\n/**\n * Represents an event that occurs when the checkbox state of a tree item changes.\n * @template T - The type of the tree item.\n */\nexport interface IQuickTreeCheckboxEvent<T extends IQuickTreeItem> {\n\t/**\n\t * The tree item whose checkbox state changed.\n\t */\n\titem: T;\n\n\t/**\n\t * The new checked state.\n\t */\n\tchecked: boolean | 'mixed';\n}\n\n/**\n * Represents an event that occurs when a button associated with a quick tree item is clicked.\n * @template T - The type of the quick tree item.\n */\nexport interface IQuickTreeItemButtonEvent<T extends IQuickTreeItem> {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The quick tree item associated with the button.\n\t */\n\titem: T;\n}\n\n//#endregion\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Event } from '../../../base/common/event.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nimport { IQuickAccessController } from './quickAccess.js';\nimport { IMatch } from '../../../base/common/filters.js';\nimport { IItemAccessor } from '../../../base/common/fuzzyScorer.js';\nimport { ResolvedKeybinding } from '../../../base/common/keybindings.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport Severity from '../../../base/common/severity.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { IMarkdownString } from '../../../base/common/htmlContent.js';\n\nexport interface IQuickItemHighlights {\n\tlabel?: IMatch[];\n\tdescription?: IMatch[];\n}\n\nexport interface IQuickPickItemHighlights extends IQuickItemHighlights {\n\tdetail?: IMatch[];\n}\n\nexport type QuickPickItem = IQuickPickSeparator | IQuickPickItem;\n\n/**\n * Base properties for a quick pick and quick tree item.\n */\nexport interface IQuickItem {\n\tid?: string;\n\tlabel: string;\n\tariaLabel?: string;\n\tdescription?: string;\n\t/**\n\t * Whether the item is displayed in italics.\n\t */\n\titalic?: boolean;\n\t/**\n\t * Whether the item is displayed with a strikethrough.\n\t */\n\tstrikethrough?: boolean;\n\t/**\n\t * Icon classes to be passed on as `IIconLabelValueOptions`\n\t * to the underlying `IconLabel` widget.\n\t */\n\ticonClasses?: readonly string[];\n\ticonPath?: { dark: URI; light?: URI };\n\t/**\n\t * Icon class to be assigned to the quick item container\n\t * directly.\n\t */\n\ticonClass?: string;\n\tbuttons?: readonly IQuickInputButton[];\n\t/**\n\t * Used when we're in multi-select mode. Renders a disabled checkbox.\n\t */\n\tdisabled?: boolean;\n}\n\n/**\n * Represents a quick pick item used in the quick pick UI.\n */\nexport interface IQuickPickItem extends IQuickItem {\n\t/**\n\t * The type of the quick pick item. Used to distinguish between 'item' and 'separator'\n\t */\n\ttype?: 'item';\n\t/**\n\t * The detail text of the quick pick item. Shown as the second line.\n\t */\n\tdetail?: string;\n\t/**\n\t * The tooltip for the quick pick item.\n\t */\n\ttooltip?: string | IMarkdownString;\n\thighlights?: IQuickPickItemHighlights;\n\t/**\n\t * Allows to show a keybinding next to the item to indicate\n\t * how the item can be triggered outside of the picker using\n\t * keyboard shortcut.\n\t */\n\tkeybinding?: ResolvedKeybinding;\n\t/**\n\t * Whether the item is picked by default when the Quick Pick is shown.\n\t */\n\tpicked?: boolean;\n\t/**\n\t * Whether the item is always shown in the Quick Pick regardless of filtering.\n\t */\n\talwaysShow?: boolean;\n\t/**\n\t * Defaults to true with `IQuickPick.canSelectMany`, can be false to disable picks for a single item\n\t */\n\tpickable?: boolean;\n}\n\nexport interface IQuickPickSeparator {\n\t/**\n\t * The type of the quick pick item. Used to distinguish between 'item' and 'separator'\n\t */\n\ttype: 'separator';\n\tid?: string;\n\tlabel?: string;\n\tdescription?: string;\n\tariaLabel?: string;\n\tbuttons?: readonly IQuickInputButton[];\n\ttooltip?: string | IMarkdownString;\n}\n\nexport interface IKeyMods {\n\treadonly ctrlCmd: boolean;\n\treadonly alt: boolean;\n}\n\nexport const NO_KEY_MODS: IKeyMods = { ctrlCmd: false, alt: false };\n\nexport interface IQuickNavigateConfiguration {\n\tkeybindings: readonly ResolvedKeybinding[];\n}\n\nexport interface IPickOptions<T extends IQuickPickItem> {\n\n\t/**\n\t * an optional string to show as the title of the quick input\n\t */\n\ttitle?: string;\n\n\t/**\n\t * the value to prefill in the input box\n\t */\n\tvalue?: string;\n\n\t/**\n\t * an optional string to show as placeholder in the input box to guide the user what she picks on\n\t */\n\tplaceHolder?: string;\n\n\t/**\n\t * the text to display underneath the input box\n\t */\n\tprompt?: string;\n\n\t/**\n\t * an optional flag to include the description when filtering the picks\n\t */\n\tmatchOnDescription?: boolean;\n\n\t/**\n\t * an optional flag to include the detail when filtering the picks\n\t */\n\tmatchOnDetail?: boolean;\n\n\t/**\n\t * an optional flag to filter the picks based on label. Defaults to true.\n\t */\n\tmatchOnLabel?: boolean;\n\n\t/**\n\t * an optional flag to sort the picks based by the label.\n\t */\n\tsortByLabel?: boolean;\n\n\t/**\n\t * an optional flag to not close the picker on focus lost\n\t */\n\tignoreFocusLost?: boolean;\n\n\t/**\n\t * an optional flag to make this picker multi-select\n\t */\n\tcanPickMany?: boolean;\n\n\t/**\n\t * enables quick navigate in the picker to open an element without typing\n\t */\n\tquickNavigate?: IQuickNavigateConfiguration;\n\n\t/**\n\t * Hides the input box from the picker UI. This is typically used\n\t * in combination with quick-navigation where no search UI should\n\t * be presented.\n\t */\n\thideInput?: boolean;\n\n\t/**\n\t * a context key to set when this picker is active\n\t */\n\tcontextKey?: string;\n\n\t/**\n\t * an optional property for the item to focus initially.\n\t */\n\tactiveItem?: Promise<T> | T;\n\n\tonKeyMods?: (keyMods: IKeyMods) => void;\n\tonDidFocus?: (entry: T) => void;\n\tonDidTriggerItemButton?: (context: IQuickPickItemButtonContext<T>) => void;\n\tonDidTriggerSeparatorButton?: (context: IQuickPickSeparatorButtonEvent) => void;\n}\n\nexport interface IInputOptions {\n\n\t/**\n\t * an optional string to show as the title of the quick input\n\t */\n\ttitle?: string;\n\n\t/**\n\t * the value to prefill in the input box\n\t */\n\tvalue?: string;\n\n\t/**\n\t * the selection of value, default to the whole prefilled value\n\t */\n\tvalueSelection?: readonly [number, number];\n\n\t/**\n\t * the text to display underneath the input box\n\t */\n\tprompt?: string;\n\n\t/**\n\t * an optional string to show as placeholder in the input box to guide the user what to type\n\t */\n\tplaceHolder?: string;\n\n\t/**\n\t * Controls if a password input is shown. Password input hides the typed text.\n\t */\n\tpassword?: boolean;\n\n\t/**\n\t * an optional flag to not close the input on focus lost\n\t */\n\tignoreFocusLost?: boolean;\n\n\t/**\n\t * an optional function that is used to validate user input.\n\t */\n\tvalidateInput?: (input: string) => Promise<string | null | undefined | { content: string; severity: Severity }>;\n}\n\nexport enum QuickInputHideReason {\n\n\t/**\n\t * Focus moved away from the quick input.\n\t */\n\tBlur = 1,\n\n\t/**\n\t * An explicit user gesture, e.g. pressing Escape key.\n\t */\n\tGesture,\n\n\t/**\n\t * Anything else.\n\t */\n\tOther\n}\n\nexport interface IQuickInputHideEvent {\n\treason: QuickInputHideReason;\n}\n\n/**\n * A collection of the different types of QuickInput\n */\nexport const enum QuickInputType {\n\tQuickPick = 'quickPick',\n\tInputBox = 'inputBox',\n\tQuickWidget = 'quickWidget',\n\tQuickTree = 'quickTree'\n}\n\n/**\n * Represents a quick input control that allows users to make selections or provide input quickly.\n */\nexport interface IQuickInput extends IDisposable {\n\n\t/**\n\t * The type of the quick input.\n\t */\n\treadonly type: QuickInputType;\n\n\t/**\n\t * An event that is fired when the quick input is hidden.\n\t */\n\treadonly onDidHide: Event<IQuickInputHideEvent>;\n\n\t/**\n\t * The title of the quick input.\n\t */\n\ttitle: string | undefined;\n\n\t/**\n\t * The buttons displayed in the quick input titlebar.\n\t */\n\tbuttons: ReadonlyArray<IQuickInputButton>;\n\n\t/**\n\t * An event that is fired when a button in the quick input is triggered.\n\t */\n\treadonly onDidTriggerButton: Event<IQuickInputButton>;\n\n\t/**\n\t * The context key associated with the quick input.\n\t */\n\tcontextKey: string | undefined;\n\n\t/**\n\t * Indicates whether the quick input is busy. Renders a progress bar if true.\n\t */\n\tbusy: boolean;\n\n\t/**\n\t * Indicates whether the quick input should be hidden when it loses focus.\n\t */\n\tignoreFocusOut: boolean;\n\n\t/**\n\t * Shows the quick input.\n\t */\n\tshow(): void;\n\n\t/**\n\t * Hides the quick input.\n\t */\n\thide(): void;\n\n\t/**\n\t * Notifies that the quick input has been hidden.\n\t * @param reason The reason why the quick input was hidden.\n\t */\n\tdidHide(reason?: QuickInputHideReason): void;\n\n\t/**\n\t * Notifies that the quick input will be hidden.\n\t * @param reason The reason why the quick input will be hidden.\n\t */\n\twillHide(reason?: QuickInputHideReason): void;\n}\n\nexport interface IQuickPickWillAcceptEvent {\n\n\t/**\n\t * Allows to disable the default accept handling\n\t * of the picker. If `veto` is called, the picker\n\t * will not trigger the `onDidAccept` event.\n\t */\n\tveto(): void;\n}\n\nexport interface IQuickPickDidAcceptEvent {\n\n\t/**\n\t * Signals if the picker item is to be accepted\n\t * in the background while keeping the picker open.\n\t */\n\tinBackground: boolean;\n}\n\n/**\n * Represents the activation behavior for items in a quick input. This means which item will be\n * \"active\" (aka focused).\n */\nexport enum ItemActivation {\n\t/**\n\t * No item will be active.\n\t */\n\tNONE,\n\t/**\n\t * First item will be active.\n\t */\n\tFIRST,\n\t/**\n\t * Second item will be active.\n\t */\n\tSECOND,\n\t/**\n\t * Last item will be active.\n\t */\n\tLAST\n}\n\n/**\n * Represents the focus options for a quick pick.\n */\nexport enum QuickPickFocus {\n\t/**\n\t * Focus the first item in the list.\n\t */\n\tFirst = 1,\n\t/**\n\t * Focus the second item in the list.\n\t */\n\tSecond,\n\t/**\n\t * Focus the last item in the list.\n\t */\n\tLast,\n\t/**\n\t * Focus the next item in the list.\n\t */\n\tNext,\n\t/**\n\t * Focus the previous item in the list.\n\t */\n\tPrevious,\n\t/**\n\t * Focus the next page in the list.\n\t */\n\tNextPage,\n\t/**\n\t * Focus the previous page in the list.\n\t */\n\tPreviousPage,\n\t/**\n\t * Focus the first item under the next separator.\n\t */\n\tNextSeparator,\n\t/**\n\t * Focus the first item under the current separator.\n\t */\n\tPreviousSeparator\n}\n\n/**\n * Represents a quick pick control that allows the user to select an item from a list of options.\n */\nexport interface IQuickPick<T extends IQuickPickItem, O extends { useSeparators: boolean } = { useSeparators: false }> extends IQuickInput {\n\n\t/**\n\t * The current value of the quick pick input.\n\t */\n\tvalue: string;\n\n\t/**\n\t * A method that allows to massage the value used for filtering, e.g, to remove certain parts.\n\t * @param value The value to be filtered.\n\t * @returns The filtered value.\n\t */\n\tfilterValue: (value: string) => string;\n\n\t/**\n\t * The ARIA label for the quick pick input.\n\t */\n\tariaLabel: string | undefined;\n\n\t/**\n\t * The placeholder text for the quick pick input.\n\t */\n\tplaceholder: string | undefined;\n\n\t/**\n\t * Text shown below the quick pick input.\n\t */\n\tprompt: string | undefined;\n\n\t/**\n\t * An event that is fired when the value of the quick pick input changes.\n\t */\n\treadonly onDidChangeValue: Event<string>;\n\n\t/**\n\t * An event that is fired when the quick pick is about to accept the selected item.\n\t */\n\treadonly onWillAccept: Event<IQuickPickWillAcceptEvent>;\n\n\t/**\n\t * An event that is fired when the quick pick has accepted the selected item.\n\t */\n\treadonly onDidAccept: Event<IQuickPickDidAcceptEvent>;\n\n\t/**\n\t * If enabled, the `onDidAccept` event will be fired when pressing the arrow-right key to accept the selected item without closing the picker.\n\t */\n\tcanAcceptInBackground: boolean;\n\n\t/**\n\t * An event that is fired when an item button is triggered.\n\t */\n\treadonly onDidTriggerItemButton: Event<IQuickPickItemButtonEvent<T>>;\n\n\t/**\n\t * An event that is fired when a separator button is triggered.\n\t */\n\treadonly onDidTriggerSeparatorButton: Event<IQuickPickSeparatorButtonEvent>;\n\n\t/**\n\t * The items to be displayed in the quick pick.\n\t */\n\titems: O extends { useSeparators: true } ? ReadonlyArray<T | IQuickPickSeparator> : ReadonlyArray<T>;\n\n\t/**\n\t * Whether multiple items can be selected. If so, checkboxes will be rendered.\n\t */\n\tcanSelectMany: boolean;\n\n\t/**\n\t * Whether to match on the description of the items.\n\t */\n\tmatchOnDescription: boolean;\n\n\t/**\n\t * Whether to match on the detail of the items.\n\t */\n\tmatchOnDetail: boolean;\n\n\t/**\n\t * Whether to match on the label of the items.\n\t */\n\tmatchOnLabel: boolean;\n\n\t/**\n\t * Whether to sort the items by label.\n\t */\n\tsortByLabel: boolean;\n\n\t/**\n\t * Whether to keep the scroll position when the quick pick input is updated.\n\t */\n\tkeepScrollPosition: boolean;\n\n\t/**\n\t * The configuration for quick navigation.\n\t */\n\tquickNavigate: IQuickNavigateConfiguration | undefined;\n\n\t/**\n\t * The currently active items.\n\t */\n\tactiveItems: ReadonlyArray<T>;\n\n\t/**\n\t * An event that is fired when the active items change.\n\t */\n\treadonly onDidChangeActive: Event<T[]>;\n\n\t/**\n\t * The item activation behavior for the next time `items` is set. Item activation means which\n\t * item is \"active\" (aka focused) when the quick pick is opened or when `items` is set.\n\t */\n\titemActivation: ItemActivation;\n\n\t/**\n\t * The currently selected items.\n\t */\n\tselectedItems: ReadonlyArray<T>;\n\n\t/**\n\t * An event that is fired when the selected items change.\n\t */\n\treadonly onDidChangeSelection: Event<T[]>;\n\n\t/**\n\t * The key modifiers.\n\t */\n\treadonly keyMods: IKeyMods;\n\n\t/**\n\t * The selection range for the value in the input.\n\t */\n\tvalueSelection: Readonly<[number, number]> | undefined;\n\n\t/**\n\t * Hides the input box from the picker UI. This is typically used in combination with quick-navigation where no search UI should be presented.\n\t */\n\thideInput: boolean;\n\n\t/**\n\t * Focus a particular item in the list. Used internally for keyboard navigation.\n\t * @param focus The focus behavior.\n\t */\n\tfocus(focus: QuickPickFocus): void;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t * @param inBackground Whether you are accepting an item in the background and keeping the picker open.\n\t */\n\taccept(inBackground?: boolean): void;\n}\n\n/**\n * Represents an input box in a quick input dialog.\n */\nexport interface IInputBox extends IQuickInput {\n\n\t/**\n\t * Value shown in the input box.\n\t */\n\tvalue: string;\n\n\t/**\n\t * Provide start and end values to be selected in the input box.\n\t */\n\tvalueSelection: Readonly<[number, number]> | undefined;\n\n\t/**\n\t * Value shown as example for input.\n\t */\n\tplaceholder: string | undefined;\n\n\t/**\n\t * Determines if the input value should be hidden while typing.\n\t */\n\tpassword: boolean;\n\n\t/**\n\t * Event called when the input value changes.\n\t */\n\treadonly onDidChangeValue: Event<string>;\n\n\t/**\n\t * Event called when the user submits the input.\n\t */\n\treadonly onDidAccept: Event<void>;\n\n\t/**\n\t * Text show below the input box.\n\t */\n\tprompt: string | undefined;\n\n\t/**\n\t * An optional validation message indicating a problem with the current input value.\n\t * Returning undefined clears the validation message.\n\t */\n\tvalidationMessage: string | undefined;\n\n\t/**\n\t * Severity of the input validation message.\n\t */\n\tseverity: Severity;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t */\n\taccept(): void;\n}\n\nexport enum QuickInputButtonLocation {\n\t/**\n\t * In the title bar.\n\t */\n\tTitle = 1,\n\n\t/**\n\t * To the right of the input box.\n\t */\n\tInline = 2,\n\n\t/**\n\t * At the far end inside the input box.\n\t * Used by the public API to create toggles.\n\t */\n\tInput = 3,\n}\n\n/**\n * Represents a button in the quick input UI.\n */\nexport interface IQuickInputButton {\n\t/**\n\t * The path to the icon for the button.\n\t * Either `iconPath` or `iconClass` is required.\n\t */\n\ticonPath?: { dark: URI; light?: URI };\n\t/**\n\t * The CSS class for the icon of the button.\n\t * Either `iconPath` or `iconClass` is required.\n\t */\n\ticonClass?: string;\n\t/**\n\t * The tooltip text for the button.\n\t */\n\ttooltip?: string;\n\t/**\n\t * Whether to always show the button.\n\t * By default, buttons are only visible when hovering over them with the mouse.\n\t */\n\talwaysVisible?: boolean;\n\t/**\n\t * Where the button should be rendered. The default is {@link QuickInputButtonLocation.Title}.\n\t * @note This property is ignored if the button was added to a QuickPickItem.\n\t */\n\tlocation?: QuickInputButtonLocation;\n\t/**\n\t * When present, indicates that the button is a toggle button that can be checked or unchecked.\n\t * The `checked` property indicates the current state of the toggle and will be updated\n\t * when the button is clicked.\n\t */\n\treadonly toggle?: { checked: boolean };\n}\n\n/**\n * Represents an event that occurs when a button associated with a quick pick item is clicked.\n * @template T - The type of the quick pick item.\n */\nexport interface IQuickPickItemButtonEvent<T extends IQuickPickItem> {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The quick pick item associated with the button.\n\t */\n\titem: T;\n}\n\n/**\n * Represents an event that occurs when a separator button is clicked in a quick pick.\n */\nexport interface IQuickPickSeparatorButtonEvent {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The separator associated with the button.\n\t */\n\tseparator: IQuickPickSeparator;\n}\n\n/**\n * Represents a context for a button associated with a quick pick item.\n * @template T - The type of the quick pick item.\n */\nexport interface IQuickPickItemButtonContext<T extends IQuickPickItem> extends IQuickPickItemButtonEvent<T> {\n\t/**\n\t * Removes the associated item from the quick pick.\n\t */\n\tremoveItem(): void;\n}\n\nexport type QuickPickInput<T = IQuickPickItem> = T | IQuickPickSeparator;\n\n\n//#region Fuzzy Scorer Support\n\nexport type IQuickPickItemWithResource = IQuickPickItem & { resource?: URI };\n\nexport class QuickPickItemScorerAccessor implements IItemAccessor<IQuickPickItemWithResource> {\n\n\tconstructor(private options?: { skipDescription?: boolean; skipPath?: boolean }) { }\n}\n\nexport const quickPickItemScorerAccessor = new QuickPickItemScorerAccessor();\n\n//#endregion\n\nexport const IQuickInputService = createDecorator<IQuickInputService>('quickInputService');\n\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\n\nexport interface IQuickInputService {\n\n\treadonly _serviceBrand: undefined;\n\n\t/**\n\t * Provides access to the quick access providers.\n\t */\n\treadonly quickAccess: IQuickAccessController;\n\n\t/**\n\t * Opens the quick input box for selecting items and returns a promise\n\t * with the user selected item(s) if any.\n\t */\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: true }, token?: CancellationToken): Promise<T[] | undefined>;\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: false }, token?: CancellationToken): Promise<T | undefined>;\n\tpick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: Omit<IPickOptions<T>, 'canPickMany'>, token?: CancellationToken): Promise<T | undefined>;\n\n\t/**\n\t * Opens the quick input box for text input and returns a promise with the user typed value if any.\n\t */\n\tinput(options?: IInputOptions, token?: CancellationToken): Promise<string | undefined>;\n\n\t/**\n\t * Provides raw access to the quick pick controller.\n\t */\n\tcreateQuickPick<T extends IQuickPickItem>(options: { useSeparators: true }): IQuickPick<T, { useSeparators: true }>;\n\tcreateQuickPick<T extends IQuickPickItem>(options?: { useSeparators: boolean }): IQuickPick<T, { useSeparators: false }>;\n\n\t/**\n\t * Provides raw access to the input box controller.\n\t */\n\tcreateInputBox(): IInputBox;\n\n\t/**\n\t * Toggles hover for the current quick input item\n\t */\n\ttoggleHover(): void;\n\n\t/**\n\t * The current quick pick that is visible. Undefined if none is open.\n\t */\n\tcurrentQuickInput: IQuickInput | undefined;\n}\n\n//#region Quick Tree\n\n/**\n * Represents a quick tree control that displays hierarchical data with checkboxes.\n */\nexport interface IQuickTree<T extends IQuickTreeItem> extends IQuickInput {\n\n\t/**\n\t * Focus a particular item in the list. Used internally for keyboard navigation.\n\t * @param focus The focus behavior.\n\t */\n\tfocus(focus: QuickPickFocus): void;\n\n\t/**\n\t * Programmatically accepts an item. Used internally for keyboard navigation.\n\t * @param inBackground Whether you are accepting an item in the background and keeping the picker open.\n\t */\n\taccept(inBackground?: boolean): void;\n}\n\n/**\n * Represents a tree item in the quick tree.\n */\nexport interface IQuickTreeItem extends IQuickItem {\n\t/**\n\t * The checked state of the item. Can be true, false, or 'mixed' for tri-state.\n\t * When canSelectMany is false, this is ignored and the item is treated as a single selection.\n\t * When canSelectMany is true, this indicates the checkbox state of the item.\n\t * If undefined, the item is unchecked by default.\n\t */\n\tchecked?: boolean | 'mixed';\n\n\t/**\n\t * The children of this tree item.\n\t */\n\tchildren?: readonly IQuickTreeItem[];\n\n\t/**\n\t * Defaults to true, can be false to disable picks for a single item.\n\t * When false, the item is not selectable and does not respond to mouse/keyboard activation.\n\t */\n\tpickable?: boolean;\n}\n\n/**\n * Represents an event that occurs when the checkbox state of a tree item changes.\n * @template T - The type of the tree item.\n */\nexport interface IQuickTreeCheckboxEvent<T extends IQuickTreeItem> {\n\t/**\n\t * The tree item whose checkbox state changed.\n\t */\n\titem: T;\n\n\t/**\n\t * The new checked state.\n\t */\n\tchecked: boolean | 'mixed';\n}\n\n/**\n * Represents an event that occurs when a button associated with a quick tree item is clicked.\n * @template T - The type of the quick tree item.\n */\nexport interface IQuickTreeItemButtonEvent<T extends IQuickTreeItem> {\n\t/**\n\t * The button that was clicked.\n\t */\n\tbutton: IQuickInputButton;\n\t/**\n\t * The quick tree item associated with the button.\n\t */\n\titem: T;\n}\n\n//#endregion\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monaco-editor-core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.56.0-dev-
|
|
4
|
+
"version": "0.56.0-dev-20251220",
|
|
5
5
|
"description": "A browser based code editor",
|
|
6
6
|
"author": "Microsoft Corporation",
|
|
7
7
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"bugs": {
|
|
15
15
|
"url": "https://github.com/microsoft/vscode/issues"
|
|
16
16
|
},
|
|
17
|
-
"vscodeCommitId": "
|
|
17
|
+
"vscodeCommitId": "d87d06f0e66419d71d9cfc1e46f2f8f18e4c1909",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"marked": "14.0.0",
|
|
20
20
|
"dompurify": "3.2.7"
|