@lvce-editor/quick-pick-worker 4.4.2 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3100,10 +3100,15 @@ const selectPick$8 = async (_pick, value) => {
3100
3100
  } = state$1;
3101
3101
  const options = getOptions(args);
3102
3102
  const resolveId = args[2];
3103
- const result = options.mode === 'quickPick' ? _pick.value : {
3104
- canceled: false,
3105
- inputValue: value
3106
- };
3103
+ let result;
3104
+ if (options.mode === 'quickPick') {
3105
+ result = options.acceptInput && _pick.value === undefined ? value : _pick.value;
3106
+ } else {
3107
+ result = {
3108
+ canceled: false,
3109
+ inputValue: value
3110
+ };
3111
+ }
3107
3112
  if (options.callbackOwner === 'quickPickWorker') {
3108
3113
  if (typeof resolveId !== 'number') {
3109
3114
  throw new TypeError('expected resolve id to be a number');
@@ -4571,6 +4576,7 @@ const showQuickInput = async ({
4571
4576
  const QuickPick = 'QuickPick';
4572
4577
 
4573
4578
  const showQuickPick = async ({
4579
+ acceptInput = false,
4574
4580
  items,
4575
4581
  placeholder = '',
4576
4582
  waitUntil = 'selected'
@@ -4582,6 +4588,7 @@ const showQuickPick = async ({
4582
4588
  } = registerCallback();
4583
4589
  try {
4584
4590
  await invoke$1('Viewlet.openWidget', QuickPick, 'custom', [], id, {
4591
+ acceptInput,
4585
4592
  callbackOwner: 'quickPickWorker',
4586
4593
  customItemsId,
4587
4594
  mode: 'quickPick',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/quick-pick-worker",
3
- "version": "4.4.2",
3
+ "version": "4.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/quick-pick-worker.git"