@uipath/apollo-wind 2.87.0 → 2.89.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.
Files changed (79) hide show
  1. package/dist/components/ui/connection-picker/components/connection-actions-menu.cjs +129 -0
  2. package/dist/components/ui/connection-picker/components/connection-actions-menu.d.ts +21 -0
  3. package/dist/components/ui/connection-picker/components/connection-actions-menu.js +95 -0
  4. package/dist/components/ui/connection-picker/components/connection-status.cjs +81 -0
  5. package/dist/components/ui/connection-picker/components/connection-status.d.ts +22 -0
  6. package/dist/components/ui/connection-picker/components/connection-status.js +41 -0
  7. package/dist/components/ui/connection-picker/connection-picker.cjs +411 -0
  8. package/dist/components/ui/connection-picker/connection-picker.d.ts +12 -0
  9. package/dist/components/ui/connection-picker/connection-picker.js +374 -0
  10. package/dist/components/ui/connection-picker/index.cjs +39 -0
  11. package/dist/components/ui/connection-picker/index.d.ts +2 -0
  12. package/dist/components/ui/connection-picker/index.js +2 -0
  13. package/dist/components/ui/connection-picker/types.cjs +18 -0
  14. package/dist/components/ui/connection-picker/types.d.ts +124 -0
  15. package/dist/components/ui/connection-picker/types.js +0 -0
  16. package/dist/components/ui/field-actions/ai-assist-action.cjs +32 -8
  17. package/dist/components/ui/field-actions/ai-assist-action.d.ts +25 -2
  18. package/dist/components/ui/field-actions/ai-assist-action.js +33 -9
  19. package/dist/components/ui/field-actions/collapse.cjs +7 -3
  20. package/dist/components/ui/field-actions/collapse.d.ts +2 -0
  21. package/dist/components/ui/field-actions/collapse.js +3 -2
  22. package/dist/components/ui/field-actions/insert-variable-action.d.ts +4 -1
  23. package/dist/components/ui/folder-picker/folder-picker.cjs +4 -3
  24. package/dist/components/ui/folder-picker/folder-picker.js +4 -3
  25. package/dist/components/ui/index.cjs +254 -228
  26. package/dist/components/ui/index.d.ts +3 -1
  27. package/dist/components/ui/index.js +2 -0
  28. package/dist/components/ui/input-group.cjs +57 -5
  29. package/dist/components/ui/input-group.d.ts +2 -0
  30. package/dist/components/ui/input-group.js +58 -6
  31. package/dist/components/ui/{folder-picker/components/folder-picker-empty-state.cjs → picker-empty-state.cjs} +11 -11
  32. package/dist/components/ui/picker-empty-state.d.ts +33 -0
  33. package/dist/components/ui/{folder-picker/components/folder-picker-empty-state.js → picker-empty-state.js} +9 -9
  34. package/dist/components/ui/prompt-editor/components/TokenPill.cjs +1 -1
  35. package/dist/components/ui/prompt-editor/components/TokenPill.js +1 -1
  36. package/dist/components/ui/prompt-editor/types.d.ts +6 -0
  37. package/dist/components/ui/reference-chip-colors.cjs +6 -0
  38. package/dist/components/ui/reference-chip-colors.d.ts +14 -0
  39. package/dist/components/ui/reference-chip-colors.js +6 -0
  40. package/dist/components/ui/reference-chip.cjs +6 -7
  41. package/dist/components/ui/reference-chip.d.ts +3 -0
  42. package/dist/components/ui/reference-chip.js +6 -7
  43. package/dist/components/ui/resource-picker/command-value.cjs +48 -0
  44. package/dist/components/ui/resource-picker/command-value.d.ts +11 -0
  45. package/dist/components/ui/resource-picker/command-value.js +11 -0
  46. package/dist/components/ui/resource-picker/components/resource-group-header.cjs +102 -0
  47. package/dist/components/ui/resource-picker/components/resource-group-header.d.ts +44 -0
  48. package/dist/components/ui/resource-picker/components/resource-group-header.js +65 -0
  49. package/dist/components/ui/resource-picker/components/resource-picker-footer.cjs +55 -0
  50. package/dist/components/ui/resource-picker/components/resource-picker-footer.d.ts +14 -0
  51. package/dist/components/ui/resource-picker/components/resource-picker-footer.js +21 -0
  52. package/dist/components/ui/resource-picker/components/resource-row-actions-menu.cjs +136 -0
  53. package/dist/components/ui/resource-picker/components/resource-row-actions-menu.d.ts +30 -0
  54. package/dist/components/ui/resource-picker/components/resource-row-actions-menu.js +102 -0
  55. package/dist/components/ui/resource-picker/components/resource-row.cjs +115 -0
  56. package/dist/components/ui/resource-picker/components/resource-row.d.ts +16 -0
  57. package/dist/components/ui/resource-picker/components/resource-row.js +81 -0
  58. package/dist/components/ui/resource-picker/focus.cjs +66 -0
  59. package/dist/components/ui/resource-picker/focus.d.ts +1 -0
  60. package/dist/components/ui/resource-picker/focus.js +32 -0
  61. package/dist/components/ui/resource-picker/index.cjs +42 -0
  62. package/dist/components/ui/resource-picker/index.d.ts +2 -0
  63. package/dist/components/ui/resource-picker/index.js +2 -0
  64. package/dist/components/ui/resource-picker/resource-picker.cjs +606 -0
  65. package/dist/components/ui/resource-picker/resource-picker.d.ts +40 -0
  66. package/dist/components/ui/resource-picker/resource-picker.js +566 -0
  67. package/dist/components/ui/resource-picker/types.cjs +50 -0
  68. package/dist/components/ui/resource-picker/types.d.ts +209 -0
  69. package/dist/components/ui/resource-picker/types.js +16 -0
  70. package/dist/components/ui/variable-picker/variable-picker.cjs +1 -1
  71. package/dist/components/ui/variable-picker/variable-picker.d.ts +2 -1
  72. package/dist/components/ui/variable-picker/variable-picker.js +1 -1
  73. package/dist/components/ui/variable-value-control.d.ts +5 -2
  74. package/dist/index.cjs +24 -7
  75. package/dist/index.d.ts +5 -1
  76. package/dist/index.js +3 -1
  77. package/dist/styles.css +179 -39
  78. package/package.json +1 -1
  79. package/dist/components/ui/folder-picker/components/folder-picker-empty-state.d.ts +0 -26
@@ -21,6 +21,7 @@ export * from './code-block';
21
21
  export * from './collapsible';
22
22
  export * from './combobox';
23
23
  export * from './command';
24
+ export * from './connection-picker';
24
25
  export * from './context-menu';
25
26
  export * from './data-table';
26
27
  export * from './date-picker';
@@ -67,8 +68,9 @@ export * from './prompt-value-control';
67
68
  export * from './quick-form-field';
68
69
  export * from './radio-group';
69
70
  export { ReferenceChip, type ReferenceChipProps } from './reference-chip';
70
- export { getReferenceChipColors } from './reference-chip-colors';
71
+ export { getReferenceChipColors, type ReferenceChipVariant } from './reference-chip-colors';
71
72
  export * from './resizable';
73
+ export * from './resource-picker';
72
74
  export * from './scroll-area';
73
75
  export * from './search';
74
76
  export * from './select';
@@ -24,6 +24,7 @@ export * from "./code-block.js";
24
24
  export * from "./collapsible.js";
25
25
  export * from "./combobox.js";
26
26
  export * from "./command.js";
27
+ export * from "./connection-picker/index.js";
27
28
  export * from "./context-menu.js";
28
29
  export * from "./data-table.js";
29
30
  export * from "./date-picker.js";
@@ -70,6 +71,7 @@ export * from "./prompt-value-control.js";
70
71
  export * from "./quick-form-field/index.js";
71
72
  export * from "./radio-group.js";
72
73
  export * from "./resizable.js";
74
+ export * from "./resource-picker/index.js";
73
75
  export * from "./scroll-area.js";
74
76
  export * from "./search.js";
75
77
  export * from "./select.js";
@@ -142,10 +142,14 @@ const inputGroupVariants = (0, external_class_variance_authority_namespaceObject
142
142
  invalid: true,
143
143
  class: 'ring-error/20 future:ring-1 future:ring-error/40'
144
144
  },
145
+ {
146
+ layout: ROW_LAYOUTS,
147
+ class: 'has-[button[data-slot=input-group-control]:not(:disabled)]:cursor-pointer'
148
+ },
145
149
  {
146
150
  variant: FILLED,
147
151
  layout: ROW_LAYOUTS,
148
- class: 'has-[button[data-slot=input-group-control]:not(:disabled):hover]:bg-accent future:has-[button[data-slot=input-group-control]:not(:disabled):hover]:bg-surface-overlay future:has-[button[data-slot=input-group-control]:not(:disabled):hover]:not-has-[[data-slot=input-group-control]_[data-slot=badge]:hover]:bg-surface-hover'
152
+ class: 'hover:has-[button[data-slot=input-group-control]:not(:disabled)]:not-has-[[data-slot=input-group-addon]:hover]:bg-accent future:hover:has-[button[data-slot=input-group-control]:not(:disabled)]:not-has-[[data-slot=input-group-addon]:hover]:bg-surface-overlay future:hover:has-[button[data-slot=input-group-control]:not(:disabled)]:not-has-[[data-slot=input-group-addon]:hover]:not-has-[[data-slot=input-group-control]_[data-slot=badge]:hover]:bg-surface-hover'
149
153
  }
150
154
  ],
151
155
  defaultVariants: {
@@ -156,7 +160,11 @@ const inputGroupVariants = (0, external_class_variance_authority_namespaceObject
156
160
  disabled: false
157
161
  }
158
162
  });
159
- const InputGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, error, errorId, variant = 'default', size = 'default', layout = 'row', invalid, disabled, ...props }, ref)=>{
163
+ function enabledControl(box) {
164
+ const control = box.querySelector('[data-slot=input-group-control]');
165
+ return control && !control.matches(':disabled, [aria-disabled=true]') ? control : null;
166
+ }
167
+ const InputGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, error, errorId, variant = 'default', size = 'default', layout = 'row', invalid, disabled, onPointerDown, onMouseDown, onClick, ...props }, ref)=>{
160
168
  const generatedId = external_react_namespaceObject.useId();
161
169
  const validationId = errorId ?? `input-group-${generatedId.replace(/:/g, '')}-error`;
162
170
  const flagged = Boolean(invalid || error);
@@ -185,6 +193,42 @@ const InputGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ cl
185
193
  invalid,
186
194
  disabled
187
195
  ]);
196
+ const press = external_react_namespaceObject.useRef(null);
197
+ const boxControl = external_react_namespaceObject.useCallback((e)=>e.target !== e.currentTarget || disabled ? null : enabledControl(e.currentTarget), [
198
+ disabled
199
+ ]);
200
+ const handlePointerDown = external_react_namespaceObject.useCallback((e)=>{
201
+ onPointerDown?.(e);
202
+ const control = boxControl(e);
203
+ const pressed = control && {
204
+ control,
205
+ expanded: 'true' === control.getAttribute('aria-expanded')
206
+ };
207
+ if (control instanceof HTMLButtonElement) control.dispatchEvent(new PointerEvent('pointerdown', e.nativeEvent));
208
+ press.current = pressed;
209
+ }, [
210
+ onPointerDown,
211
+ boxControl
212
+ ]);
213
+ const handleMouseDown = external_react_namespaceObject.useCallback((e)=>{
214
+ onMouseDown?.(e);
215
+ if (press.current && e.target === e.currentTarget) e.preventDefault();
216
+ }, [
217
+ onMouseDown
218
+ ]);
219
+ const handleClick = external_react_namespaceObject.useCallback((e)=>{
220
+ onClick?.(e);
221
+ const pressed = press.current;
222
+ press.current = null;
223
+ if (!pressed || e.defaultPrevented || boxControl(e) !== pressed.control) return;
224
+ const { control } = pressed;
225
+ if (control instanceof HTMLButtonElement) {
226
+ if (!pressed.expanded || 'true' === control.getAttribute('aria-expanded')) control.click();
227
+ } else control.focus();
228
+ }, [
229
+ onClick,
230
+ boxControl
231
+ ]);
188
232
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_input_group_context_cjs_namespaceObject.InputGroupContext.Provider, {
189
233
  value: group,
190
234
  children: [
@@ -203,6 +247,9 @@ const InputGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ cl
203
247
  invalid: flagged,
204
248
  disabled
205
249
  }), className),
250
+ onPointerDown: handlePointerDown,
251
+ onMouseDown: handleMouseDown,
252
+ onClick: handleClick,
206
253
  ...props
207
254
  }),
208
255
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_form_field_cjs_namespaceObject.FormFieldError, {
@@ -327,7 +374,7 @@ InputGroupTrigger.displayName = 'InputGroupTrigger';
327
374
  function isEmpty(children) {
328
375
  return null == children || false === children || '' === children;
329
376
  }
330
- const InputGroupPopoverTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ children, placeholder, caret = true, ...props }, ref)=>{
377
+ const InputGroupPopoverTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ children, placeholder, caret = true, loading = false, ...props }, ref)=>{
331
378
  const { anchor } = (0, external_input_group_context_cjs_namespaceObject.useInputGroup)();
332
379
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
333
380
  children: [
@@ -335,6 +382,7 @@ const InputGroupPopoverTrigger = /*#__PURE__*/ external_react_namespaceObject.fo
335
382
  asChild: true,
336
383
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(InputGroupTrigger, {
337
384
  ref: ref,
385
+ "aria-busy": loading || void 0,
338
386
  ...props,
339
387
  children: [
340
388
  isEmpty(children) ? void 0 !== placeholder && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
@@ -342,9 +390,13 @@ const InputGroupPopoverTrigger = /*#__PURE__*/ external_react_namespaceObject.fo
342
390
  className: "truncate text-muted-foreground",
343
391
  children: placeholder
344
392
  }) : children,
345
- caret && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
393
+ caret && (loading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Loader2, {
394
+ "data-slot": "input-group-caret",
395
+ className: "ml-auto shrink-0 animate-spin text-muted-foreground motion-reduce:animate-none"
396
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
397
+ "data-slot": "input-group-caret",
346
398
  className: "ml-auto shrink-0 text-muted-foreground"
347
- })
399
+ }))
348
400
  ]
349
401
  })
350
402
  }),
@@ -82,6 +82,8 @@ export interface InputGroupPopoverTriggerProps extends InputGroupTriggerProps {
82
82
  placeholder?: React.ReactNode;
83
83
  /** Draws the trailing caret. Pass `false` for a trigger that brings its own. */
84
84
  caret?: boolean;
85
+ /** Spins the caret, and marks the trigger busy, while its options or value are on their way. */
86
+ loading?: boolean;
85
87
  }
86
88
  /**
87
89
  * A popover's trigger as the group's control. Must be rendered inside a `Popover`. The panel
@@ -1,6 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
- import { ChevronDown } from "lucide-react";
3
+ import { ChevronDown, Loader2 } from "lucide-react";
4
4
  import { forwardRef, useCallback, useId, useMemo, useRef, useState } from "react";
5
5
  import { Button } from "./button.js";
6
6
  import { Input } from "./input.js";
@@ -103,10 +103,14 @@ const inputGroupVariants = cva([
103
103
  invalid: true,
104
104
  class: 'ring-error/20 future:ring-1 future:ring-error/40'
105
105
  },
106
+ {
107
+ layout: ROW_LAYOUTS,
108
+ class: 'has-[button[data-slot=input-group-control]:not(:disabled)]:cursor-pointer'
109
+ },
106
110
  {
107
111
  variant: FILLED,
108
112
  layout: ROW_LAYOUTS,
109
- class: 'has-[button[data-slot=input-group-control]:not(:disabled):hover]:bg-accent future:has-[button[data-slot=input-group-control]:not(:disabled):hover]:bg-surface-overlay future:has-[button[data-slot=input-group-control]:not(:disabled):hover]:not-has-[[data-slot=input-group-control]_[data-slot=badge]:hover]:bg-surface-hover'
113
+ class: 'hover:has-[button[data-slot=input-group-control]:not(:disabled)]:not-has-[[data-slot=input-group-addon]:hover]:bg-accent future:hover:has-[button[data-slot=input-group-control]:not(:disabled)]:not-has-[[data-slot=input-group-addon]:hover]:bg-surface-overlay future:hover:has-[button[data-slot=input-group-control]:not(:disabled)]:not-has-[[data-slot=input-group-addon]:hover]:not-has-[[data-slot=input-group-control]_[data-slot=badge]:hover]:bg-surface-hover'
110
114
  }
111
115
  ],
112
116
  defaultVariants: {
@@ -117,7 +121,11 @@ const inputGroupVariants = cva([
117
121
  disabled: false
118
122
  }
119
123
  });
120
- const InputGroup = /*#__PURE__*/ forwardRef(({ className, error, errorId, variant = 'default', size = 'default', layout = 'row', invalid, disabled, ...props }, ref)=>{
124
+ function enabledControl(box) {
125
+ const control = box.querySelector('[data-slot=input-group-control]');
126
+ return control && !control.matches(':disabled, [aria-disabled=true]') ? control : null;
127
+ }
128
+ const InputGroup = /*#__PURE__*/ forwardRef(({ className, error, errorId, variant = 'default', size = 'default', layout = 'row', invalid, disabled, onPointerDown, onMouseDown, onClick, ...props }, ref)=>{
121
129
  const generatedId = useId();
122
130
  const validationId = errorId ?? `input-group-${generatedId.replace(/:/g, '')}-error`;
123
131
  const flagged = Boolean(invalid || error);
@@ -146,6 +154,42 @@ const InputGroup = /*#__PURE__*/ forwardRef(({ className, error, errorId, varian
146
154
  invalid,
147
155
  disabled
148
156
  ]);
157
+ const press = useRef(null);
158
+ const boxControl = useCallback((e)=>e.target !== e.currentTarget || disabled ? null : enabledControl(e.currentTarget), [
159
+ disabled
160
+ ]);
161
+ const handlePointerDown = useCallback((e)=>{
162
+ onPointerDown?.(e);
163
+ const control = boxControl(e);
164
+ const pressed = control && {
165
+ control,
166
+ expanded: 'true' === control.getAttribute('aria-expanded')
167
+ };
168
+ if (control instanceof HTMLButtonElement) control.dispatchEvent(new PointerEvent('pointerdown', e.nativeEvent));
169
+ press.current = pressed;
170
+ }, [
171
+ onPointerDown,
172
+ boxControl
173
+ ]);
174
+ const handleMouseDown = useCallback((e)=>{
175
+ onMouseDown?.(e);
176
+ if (press.current && e.target === e.currentTarget) e.preventDefault();
177
+ }, [
178
+ onMouseDown
179
+ ]);
180
+ const handleClick = useCallback((e)=>{
181
+ onClick?.(e);
182
+ const pressed = press.current;
183
+ press.current = null;
184
+ if (!pressed || e.defaultPrevented || boxControl(e) !== pressed.control) return;
185
+ const { control } = pressed;
186
+ if (control instanceof HTMLButtonElement) {
187
+ if (!pressed.expanded || 'true' === control.getAttribute('aria-expanded')) control.click();
188
+ } else control.focus();
189
+ }, [
190
+ onClick,
191
+ boxControl
192
+ ]);
149
193
  return /*#__PURE__*/ jsxs(InputGroupContext.Provider, {
150
194
  value: group,
151
195
  children: [
@@ -164,6 +208,9 @@ const InputGroup = /*#__PURE__*/ forwardRef(({ className, error, errorId, varian
164
208
  invalid: flagged,
165
209
  disabled
166
210
  }), className),
211
+ onPointerDown: handlePointerDown,
212
+ onMouseDown: handleMouseDown,
213
+ onClick: handleClick,
167
214
  ...props
168
215
  }),
169
216
  /*#__PURE__*/ jsx(FormFieldError, {
@@ -288,7 +335,7 @@ InputGroupTrigger.displayName = 'InputGroupTrigger';
288
335
  function isEmpty(children) {
289
336
  return null == children || false === children || '' === children;
290
337
  }
291
- const InputGroupPopoverTrigger = /*#__PURE__*/ forwardRef(({ children, placeholder, caret = true, ...props }, ref)=>{
338
+ const InputGroupPopoverTrigger = /*#__PURE__*/ forwardRef(({ children, placeholder, caret = true, loading = false, ...props }, ref)=>{
292
339
  const { anchor } = useInputGroup();
293
340
  return /*#__PURE__*/ jsxs(Fragment, {
294
341
  children: [
@@ -296,6 +343,7 @@ const InputGroupPopoverTrigger = /*#__PURE__*/ forwardRef(({ children, placehold
296
343
  asChild: true,
297
344
  children: /*#__PURE__*/ jsxs(InputGroupTrigger, {
298
345
  ref: ref,
346
+ "aria-busy": loading || void 0,
299
347
  ...props,
300
348
  children: [
301
349
  isEmpty(children) ? void 0 !== placeholder && /*#__PURE__*/ jsx("span", {
@@ -303,9 +351,13 @@ const InputGroupPopoverTrigger = /*#__PURE__*/ forwardRef(({ children, placehold
303
351
  className: "truncate text-muted-foreground",
304
352
  children: placeholder
305
353
  }) : children,
306
- caret && /*#__PURE__*/ jsx(ChevronDown, {
354
+ caret && (loading ? /*#__PURE__*/ jsx(Loader2, {
355
+ "data-slot": "input-group-caret",
356
+ className: "ml-auto shrink-0 animate-spin text-muted-foreground motion-reduce:animate-none"
357
+ }) : /*#__PURE__*/ jsx(ChevronDown, {
358
+ "data-slot": "input-group-caret",
307
359
  className: "ml-auto shrink-0 text-muted-foreground"
308
- })
360
+ }))
309
361
  ]
310
362
  })
311
363
  }),
@@ -24,19 +24,19 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- FolderPickerEmptyState: ()=>FolderPickerEmptyState
27
+ PickerEmptyState: ()=>PickerEmptyState
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- const external_button_cjs_namespaceObject = require("../../button.cjs");
31
- const external_spinner_cjs_namespaceObject = require("../../spinner.cjs");
32
- const defaultNoMatchText = (query)=>`No folders match “${query}”.`;
33
- function FolderPickerEmptyState({ error, loading = false, query = '', emptyText = 'No subfolders.', noMatchText = defaultNoMatchText, loadingText = 'Loading…', onRetry, retryLabel = 'Retry' }) {
30
+ const external_button_cjs_namespaceObject = require("./button.cjs");
31
+ const external_spinner_cjs_namespaceObject = require("./spinner.cjs");
32
+ const defaultNoMatchText = (query)=>`No results match “${query}”.`;
33
+ function PickerEmptyState({ error, loading = false, query = '', emptyText = 'No results.', noMatchText = defaultNoMatchText, loadingText = 'Loading…', onRetry, retryLabel = 'Retry', announce = true }) {
34
34
  if (error) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
35
35
  className: "flex items-center justify-between gap-2 px-3 py-2",
36
36
  children: [
37
37
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
38
- role: "alert",
39
- className: "text-xs text-destructive",
38
+ role: announce ? 'alert' : void 0,
39
+ className: "text-xs text-error",
40
40
  children: error
41
41
  }),
42
42
  onRetry && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
@@ -50,7 +50,7 @@ function FolderPickerEmptyState({ error, loading = false, query = '', emptyText
50
50
  ]
51
51
  });
52
52
  if (loading) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
53
- role: "status",
53
+ role: announce ? 'status' : void 0,
54
54
  className: "flex items-center gap-2 px-3 py-2 text-xs text-foreground-muted",
55
55
  children: [
56
56
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner, {
@@ -61,14 +61,14 @@ function FolderPickerEmptyState({ error, loading = false, query = '', emptyText
61
61
  ]
62
62
  });
63
63
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
64
- role: "status",
64
+ role: announce ? 'status' : void 0,
65
65
  className: "px-3 py-2 text-xs text-foreground-muted",
66
66
  children: query ? noMatchText(query) : emptyText
67
67
  });
68
68
  }
69
- exports.FolderPickerEmptyState = __webpack_exports__.FolderPickerEmptyState;
69
+ exports.PickerEmptyState = __webpack_exports__.PickerEmptyState;
70
70
  for(var __rspack_i in __webpack_exports__)if (-1 === [
71
- "FolderPickerEmptyState"
71
+ "PickerEmptyState"
72
72
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
73
73
  Object.defineProperty(exports, '__esModule', {
74
74
  value: true
@@ -0,0 +1,33 @@
1
+ export interface PickerEmptyStateProps {
2
+ /** A load that failed. Takes precedence over every other state. */
3
+ error?: string | null;
4
+ /** The list on screen has never resolved, so its contents are unknown. */
5
+ loading?: boolean;
6
+ /** The active search text, trimmed. Empty when the list is unfiltered. */
7
+ query?: string;
8
+ emptyText?: string;
9
+ noMatchText?: (query: string) => string;
10
+ loadingText?: string;
11
+ /** Requests the failed list again. Without it, the error offers no action. */
12
+ onRetry?: () => void;
13
+ retryLabel?: string;
14
+ /**
15
+ * Makes each message its own live region. Pass `false` when the caller
16
+ * keeps a region mounted around it, so the message is announced as it
17
+ * arrives in an existing region rather than as a new one, and not twice.
18
+ */
19
+ announce?: boolean;
20
+ }
21
+ /**
22
+ * What a picker's list shows when it has no rows. Shared by FolderPicker and
23
+ * ResourcePicker, and not exported from the package.
24
+ *
25
+ * The four cases say different things and must not collapse into one message:
26
+ * a list still loading is not an empty one, an empty list is not a failed
27
+ * search, and neither is an error. Ordered by precedence, so a list that
28
+ * fails to load reports the failure rather than claiming to be empty.
29
+ *
30
+ * Always renders one of the four messages, falling back to the empty-folder
31
+ * text, so the caller renders it only when the list has no rows.
32
+ */
33
+ export declare function PickerEmptyState({ error, loading, query, emptyText, noMatchText, loadingText, onRetry, retryLabel, announce, }: PickerEmptyStateProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,14 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Button } from "../../button.js";
3
- import { Spinner } from "../../spinner.js";
4
- const defaultNoMatchText = (query)=>`No folders match “${query}”.`;
5
- function FolderPickerEmptyState({ error, loading = false, query = '', emptyText = 'No subfolders.', noMatchText = defaultNoMatchText, loadingText = 'Loading…', onRetry, retryLabel = 'Retry' }) {
2
+ import { Button } from "./button.js";
3
+ import { Spinner } from "./spinner.js";
4
+ const defaultNoMatchText = (query)=>`No results match “${query}”.`;
5
+ function PickerEmptyState({ error, loading = false, query = '', emptyText = 'No results.', noMatchText = defaultNoMatchText, loadingText = 'Loading…', onRetry, retryLabel = 'Retry', announce = true }) {
6
6
  if (error) return /*#__PURE__*/ jsxs("div", {
7
7
  className: "flex items-center justify-between gap-2 px-3 py-2",
8
8
  children: [
9
9
  /*#__PURE__*/ jsx("span", {
10
- role: "alert",
11
- className: "text-xs text-destructive",
10
+ role: announce ? 'alert' : void 0,
11
+ className: "text-xs text-error",
12
12
  children: error
13
13
  }),
14
14
  onRetry && /*#__PURE__*/ jsx(Button, {
@@ -22,7 +22,7 @@ function FolderPickerEmptyState({ error, loading = false, query = '', emptyText
22
22
  ]
23
23
  });
24
24
  if (loading) return /*#__PURE__*/ jsxs("div", {
25
- role: "status",
25
+ role: announce ? 'status' : void 0,
26
26
  className: "flex items-center gap-2 px-3 py-2 text-xs text-foreground-muted",
27
27
  children: [
28
28
  /*#__PURE__*/ jsx(Spinner, {
@@ -33,9 +33,9 @@ function FolderPickerEmptyState({ error, loading = false, query = '', emptyText
33
33
  ]
34
34
  });
35
35
  return /*#__PURE__*/ jsx("div", {
36
- role: "status",
36
+ role: announce ? 'status' : void 0,
37
37
  className: "px-3 py-2 text-xs text-foreground-muted",
38
38
  children: query ? noMatchText(query) : emptyText
39
39
  });
40
40
  }
41
- export { FolderPickerEmptyState };
41
+ export { PickerEmptyState };
@@ -47,7 +47,7 @@ const TokenPillBase = ({ value, tokenType, onRemove, diffType, readonly, isInval
47
47
  onRemove: onRemove,
48
48
  removeLabel: strings.removeToken,
49
49
  readOnly: readonly,
50
- invalid: isInvalid && !diffType,
50
+ variant: isInvalid && !diffType ? 'invalid' : 'default',
51
51
  selected: isSelected,
52
52
  onMouseDown: onMouseDown,
53
53
  className: `${readonly ? 'cursor-default' : 'cursor-pointer'} ${'removed' === diffType ? 'line-through opacity-60' : ''}`,
@@ -19,7 +19,7 @@ const TokenPillBase = ({ value, tokenType, onRemove, diffType, readonly, isInval
19
19
  onRemove: onRemove,
20
20
  removeLabel: strings.removeToken,
21
21
  readOnly: readonly,
22
- invalid: isInvalid && !diffType,
22
+ variant: isInvalid && !diffType ? 'invalid' : 'default',
23
23
  selected: isSelected,
24
24
  onMouseDown: onMouseDown,
25
25
  className: `${readonly ? 'cursor-default' : 'cursor-pointer'} ${'removed' === diffType ? 'line-through opacity-60' : ''}`,
@@ -70,6 +70,12 @@ export declare const getPromptEditorTokenColors: () => {
70
70
  text: string;
71
71
  icon: string;
72
72
  };
73
+ warning: {
74
+ background: string;
75
+ border: string;
76
+ text: string;
77
+ icon: string;
78
+ };
73
79
  invalid: {
74
80
  background: string;
75
81
  border: string;
@@ -33,6 +33,12 @@ const getReferenceChipColors = ()=>({
33
33
  text: 'var(--color-info-text)',
34
34
  icon: 'var(--color-info-icon)'
35
35
  },
36
+ warning: {
37
+ background: 'var(--color-warning-background)',
38
+ border: 'var(--color-warning-icon)',
39
+ text: 'var(--color-warning-text)',
40
+ icon: 'var(--color-warning-icon)'
41
+ },
36
42
  invalid: {
37
43
  background: 'var(--color-error-background)',
38
44
  border: 'var(--color-error-icon)',
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Semantic look of a reference.
3
+ * - `default`: a valid reference. Uses the `valid` palette.
4
+ * - `warning`: valid but needs attention, such as a file variable no tool can read.
5
+ * - `invalid`: the reference doesn't resolve, such as a deleted or unknown variable.
6
+ */
7
+ export type ReferenceChipVariant = 'default' | 'warning' | 'invalid';
1
8
  /** Paired reference colors. Keep labels, icons and backgrounds on the same semantic palette. */
2
9
  export declare const getReferenceChipColors: () => {
3
10
  valid: {
@@ -6,6 +13,13 @@ export declare const getReferenceChipColors: () => {
6
13
  text: string;
7
14
  icon: string;
8
15
  };
16
+ /** A valid reference the host can't act on, such as a file variable no tool can read. */
17
+ warning: {
18
+ background: string;
19
+ border: string;
20
+ text: string;
21
+ icon: string;
22
+ };
9
23
  invalid: {
10
24
  background: string;
11
25
  border: string;
@@ -5,6 +5,12 @@ const getReferenceChipColors = ()=>({
5
5
  text: 'var(--color-info-text)',
6
6
  icon: 'var(--color-info-icon)'
7
7
  },
8
+ warning: {
9
+ background: 'var(--color-warning-background)',
10
+ border: 'var(--color-warning-icon)',
11
+ text: 'var(--color-warning-text)',
12
+ icon: 'var(--color-warning-icon)'
13
+ },
8
14
  invalid: {
9
15
  background: 'var(--color-error-background)',
10
16
  border: 'var(--color-error-icon)',
@@ -30,13 +30,15 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
30
  const external_react_namespaceObject = require("react");
31
31
  const index_cjs_namespaceObject = require("../../lib/index.cjs");
32
32
  const external_reference_chip_colors_cjs_namespaceObject = require("./reference-chip-colors.cjs");
33
- const ReferenceChip = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(({ label, icon, onRemove, removeLabel, readOnly = false, disabled = false, invalid = false, selected = false, className, style, ...props }, ref)=>{
34
- const colors = (0, external_reference_chip_colors_cjs_namespaceObject.getReferenceChipColors)()[invalid ? 'invalid' : 'valid'];
33
+ const ReferenceChip = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(({ label, icon, onRemove, removeLabel, readOnly = false, disabled = false, variant: variantProp = 'default', invalid = false, selected = false, className, style, ...props }, ref)=>{
34
+ const variant = invalid ? 'invalid' : variantProp;
35
+ const colors = (0, external_reference_chip_colors_cjs_namespaceObject.getReferenceChipColors)()['default' === variant ? 'valid' : variant];
35
36
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
36
37
  ...props,
37
38
  ref: ref,
38
39
  "data-slot": "reference-chip",
39
- "data-invalid": invalid || void 0,
40
+ "data-variant": variant,
41
+ "data-invalid": 'invalid' === variant || void 0,
40
42
  "data-selected": selected || void 0,
41
43
  "aria-disabled": disabled || void 0,
42
44
  className: (0, index_cjs_namespaceObject.cn)('relative inline-flex max-w-full min-w-0 items-center align-middle gap-[3px] h-5 rounded px-1 text-[13px] leading-5 outline-offset-1', selected && 'z-10', disabled && 'opacity-50', className),
@@ -57,16 +59,13 @@ const ReferenceChip = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRe
57
59
  }),
58
60
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
59
61
  className: "min-w-0 truncate font-normal",
60
- style: {
61
- fontFamily: "'Noto Sans', sans-serif"
62
- },
63
62
  children: label
64
63
  }),
65
64
  onRemove && !readOnly && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
66
65
  type: "button",
67
66
  disabled: disabled,
68
67
  "aria-label": removeLabel ?? ('string' == typeof label ? `Remove ${label}` : 'Remove'),
69
- className: "inline-flex shrink-0 items-center justify-center p-px border-0 bg-transparent cursor-pointer rounded-[2px] w-4 h-4 text-inherit focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-current disabled:cursor-default",
68
+ className: "inline-flex shrink-0 items-center justify-center p-px border-0 bg-transparent cursor-pointer rounded-[2px] w-4 h-4 text-inherit enabled:hover:bg-current/10 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-current disabled:cursor-default",
70
69
  onMouseDown: (event)=>{
71
70
  event.preventDefault();
72
71
  event.stopPropagation();
@@ -1,4 +1,5 @@
1
1
  import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import { type ReferenceChipVariant } from './reference-chip-colors';
2
3
  export interface ReferenceChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
3
4
  /** Display name of the referenced variable, resource or connection. */
4
5
  label: ReactNode;
@@ -9,6 +10,8 @@ export interface ReferenceChipProps extends Omit<HTMLAttributes<HTMLSpanElement>
9
10
  removeLabel?: string;
10
11
  readOnly?: boolean;
11
12
  disabled?: boolean;
13
+ variant?: ReferenceChipVariant;
14
+ /** @deprecated Use `variant="invalid"`. Wins over `variant` when true. */
12
15
  invalid?: boolean;
13
16
  /** Visual selection only. The containing editor or picker owns selection semantics. */
14
17
  selected?: boolean;
@@ -2,13 +2,15 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { cn } from "../../lib/index.js";
4
4
  import { getReferenceChipColors } from "./reference-chip-colors.js";
5
- const ReferenceChip = /*#__PURE__*/ forwardRef(({ label, icon, onRemove, removeLabel, readOnly = false, disabled = false, invalid = false, selected = false, className, style, ...props }, ref)=>{
6
- const colors = getReferenceChipColors()[invalid ? 'invalid' : 'valid'];
5
+ const ReferenceChip = /*#__PURE__*/ forwardRef(({ label, icon, onRemove, removeLabel, readOnly = false, disabled = false, variant: variantProp = 'default', invalid = false, selected = false, className, style, ...props }, ref)=>{
6
+ const variant = invalid ? 'invalid' : variantProp;
7
+ const colors = getReferenceChipColors()['default' === variant ? 'valid' : variant];
7
8
  return /*#__PURE__*/ jsxs("span", {
8
9
  ...props,
9
10
  ref: ref,
10
11
  "data-slot": "reference-chip",
11
- "data-invalid": invalid || void 0,
12
+ "data-variant": variant,
13
+ "data-invalid": 'invalid' === variant || void 0,
12
14
  "data-selected": selected || void 0,
13
15
  "aria-disabled": disabled || void 0,
14
16
  className: cn('relative inline-flex max-w-full min-w-0 items-center align-middle gap-[3px] h-5 rounded px-1 text-[13px] leading-5 outline-offset-1', selected && 'z-10', disabled && 'opacity-50', className),
@@ -29,16 +31,13 @@ const ReferenceChip = /*#__PURE__*/ forwardRef(({ label, icon, onRemove, removeL
29
31
  }),
30
32
  /*#__PURE__*/ jsx("span", {
31
33
  className: "min-w-0 truncate font-normal",
32
- style: {
33
- fontFamily: "'Noto Sans', sans-serif"
34
- },
35
34
  children: label
36
35
  }),
37
36
  onRemove && !readOnly && /*#__PURE__*/ jsx("button", {
38
37
  type: "button",
39
38
  disabled: disabled,
40
39
  "aria-label": removeLabel ?? ('string' == typeof label ? `Remove ${label}` : 'Remove'),
41
- className: "inline-flex shrink-0 items-center justify-center p-px border-0 bg-transparent cursor-pointer rounded-[2px] w-4 h-4 text-inherit focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-current disabled:cursor-default",
40
+ className: "inline-flex shrink-0 items-center justify-center p-px border-0 bg-transparent cursor-pointer rounded-[2px] w-4 h-4 text-inherit enabled:hover:bg-current/10 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-current disabled:cursor-default",
42
41
  onMouseDown: (event)=>{
43
42
  event.preventDefault();
44
43
  event.stopPropagation();
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ fromCommandValue: ()=>fromCommandValue,
28
+ toCommandValue: ()=>toCommandValue
29
+ });
30
+ const toCommandValue = (value)=>JSON.stringify(value);
31
+ const fromCommandValue = (value)=>{
32
+ if (!value) return '';
33
+ try {
34
+ const decoded = JSON.parse(value);
35
+ return 'string' == typeof decoded ? decoded : '';
36
+ } catch {
37
+ return '';
38
+ }
39
+ };
40
+ exports.fromCommandValue = __webpack_exports__.fromCommandValue;
41
+ exports.toCommandValue = __webpack_exports__.toCommandValue;
42
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
43
+ "fromCommandValue",
44
+ "toCommandValue"
45
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
46
+ Object.defineProperty(exports, '__esModule', {
47
+ value: true
48
+ });