@harborclient/sdk 1.6.5 → 1.6.6

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 (67) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/components/AnchorMenuPanel/index.js +1 -1
  3. package/dist/components/Breadcrumb/CrumbSegment.js +1 -1
  4. package/dist/components/Breadcrumb/EditableSegment.js +2 -2
  5. package/dist/components/Button/index.js +1 -1
  6. package/dist/components/CodeEditor/index.d.ts +2 -2
  7. package/dist/components/CodeEditor/index.js +5 -5
  8. package/dist/components/CopyToChatButton/index.js +1 -1
  9. package/dist/components/FooterButton/index.js +2 -2
  10. package/dist/components/FooterIcon/index.js +1 -1
  11. package/dist/components/FormDataEditor/index.d.ts.map +1 -1
  12. package/dist/components/FormDataEditor/index.js +2 -2
  13. package/dist/components/FormGroup/index.js +2 -2
  14. package/dist/components/KeyValueEditor/index.d.ts.map +1 -1
  15. package/dist/components/KeyValueEditor/index.js +1 -1
  16. package/dist/components/MethodSelect/MethodSelectMenu.js +1 -1
  17. package/dist/components/MethodSelect/MethodSelectOption.js +1 -1
  18. package/dist/components/MethodSelect/index.js +1 -1
  19. package/dist/components/Resizable/ResizeHandle.js +1 -1
  20. package/dist/components/Resizable/footerPanelUtils.d.ts +1 -1
  21. package/dist/components/Resizable/footerPanelUtils.d.ts.map +1 -1
  22. package/dist/components/Resizable/footerPanelUtils.js +2 -2
  23. package/dist/components/RowActionsMenu/Submenu.js +1 -1
  24. package/dist/components/RowActionsMenu/index.js +1 -1
  25. package/dist/components/SidebarItem/SidebarBadge.js +2 -2
  26. package/dist/components/SidebarItem/SidebarCommitItem.js +1 -1
  27. package/dist/components/SidebarItem/SidebarFolderItem.js +1 -1
  28. package/dist/components/SidebarItem/SidebarHistoryItem.d.ts +5 -1
  29. package/dist/components/SidebarItem/SidebarHistoryItem.d.ts.map +1 -1
  30. package/dist/components/SidebarItem/SidebarHistoryItem.js +3 -2
  31. package/dist/components/SidebarItem/sidebarItemClasses.d.ts +3 -3
  32. package/dist/components/SidebarItem/sidebarItemClasses.d.ts.map +1 -1
  33. package/dist/components/SidebarItem/sidebarItemClasses.js +5 -5
  34. package/dist/components/SidebarRail/SidebarRailItem.js +1 -1
  35. package/dist/components/SidebarRail/index.js +2 -2
  36. package/dist/components/SidebarSection/SectionItem.js +1 -1
  37. package/dist/components/SortButton/SortMenu.js +1 -1
  38. package/dist/components/SortButton/SortMenuOption.js +1 -1
  39. package/dist/components/TabBar/TabBarShell.js +1 -1
  40. package/dist/components/TabBar/TabContextMenu.js +1 -1
  41. package/dist/components/TabBar/TabNewButton.js +2 -2
  42. package/dist/components/TabBar/index.d.ts.map +1 -1
  43. package/dist/components/TabBar/index.js +2 -2
  44. package/dist/components/TabCloseButton/index.js +1 -1
  45. package/dist/components/Toolbar/index.js +2 -2
  46. package/dist/components/VariableInput/index.d.ts +2 -2
  47. package/dist/components/VariableInput/index.js +2 -2
  48. package/dist/components/VariableTooltip/dom.js +2 -2
  49. package/dist/components/VisibilityMenu/MenuCheckboxItem.js +1 -1
  50. package/dist/components/VisibilityMenu/index.js +1 -1
  51. package/dist/components/classes.d.ts +1 -1
  52. package/dist/components/classes.d.ts.map +1 -1
  53. package/dist/components/classes.js +5 -5
  54. package/dist/components/forms/classes.d.ts +1 -1
  55. package/dist/components/forms/classes.d.ts.map +1 -1
  56. package/dist/components/forms/classes.js +1 -1
  57. package/dist/components/rowActionsMenuHelpers.d.ts.map +1 -1
  58. package/dist/components/rowActionsMenuHelpers.js +1 -1
  59. package/dist/http/resolveRequest.d.ts +3 -0
  60. package/dist/http/resolveRequest.d.ts.map +1 -1
  61. package/dist/http/resolveRequest.js +4 -1
  62. package/dist/http/substitute.d.ts +1 -0
  63. package/dist/http/substitute.d.ts.map +1 -1
  64. package/dist/http/substitute.js +9 -0
  65. package/dist/types.d.ts +54 -35
  66. package/dist/types.d.ts.map +1 -1
  67. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 1.6.6 - 2026-08-05
8
+
9
+ - Refactor UI components to remove `app-no-drag` class. (`c9cbe40e`)
10
+ - Enhance CLI and UI theme support with new tab color tokens. (`7864533e`)
11
+ - chore: enhance security documentation and improve JSON parsing across modules. (`0040e7a4`)
12
+
7
13
  ## 1.6.4 - 2026-08-04
8
14
 
9
15
  - feat: enhance sidebar navigation and focus management. (`015e793a`)
@@ -326,7 +326,7 @@ export function AnchorMenuPanel({ groups, anchor, onDismiss, menuId = 'anchor-me
326
326
  }
327
327
  const openSubmenuItem = openSubmenuIndex != null ? flatItems[openSubmenuIndex] : undefined;
328
328
  const openSubmenuAnchorRect = openSubmenuIndex != null ? itemRefs.current[openSubmenuIndex]?.getBoundingClientRect() : null;
329
- const menuPanel = (_jsx("div", { ref: panelRef, id: menuElementId, role: "menu", tabIndex: hasEnabledItems ? undefined : -1, className: cn('hc-anchor-menu-panel hc-row-actions-menu-panel app-no-drag fixed z-50 min-w-[200px] rounded-md border border-separator bg-surface py-1 shadow-md', className), style: { left: menuPosition.x, top: menuPosition.y }, onKeyDown: handleMenuKeyDown, onMouseLeave: () => {
329
+ const menuPanel = (_jsx("div", { ref: panelRef, id: menuElementId, role: "menu", tabIndex: hasEnabledItems ? undefined : -1, className: cn('hc-anchor-menu-panel hc-row-actions-menu-panel fixed z-50 min-w-[200px] rounded-md border border-separator bg-surface py-1 shadow-md', className), style: { left: menuPosition.x, top: menuPosition.y }, onKeyDown: handleMenuKeyDown, onMouseLeave: () => {
330
330
  if (openSubmenuIndex != null) {
331
331
  scheduleCloseSubmenu();
332
332
  }
@@ -19,5 +19,5 @@ export function CrumbSegment({ segment, shape }) {
19
19
  const showLabel = !segment.iconOnly && segment.label.length > 0;
20
20
  const accessibleName = segment.ariaLabel ?? (showLabel ? undefined : segment.label);
21
21
  const content = (_jsxs(_Fragment, { children: [segment.icon && _jsx(FaIcon, { icon: segment.icon, className: "h-3.5 w-3.5 shrink-0" }), showLabel ? _jsx("span", { className: "min-w-0 truncate", children: segment.label }) : null] }));
22
- return (_jsx(SegmentShell, { shape: shape, tone: shape === 'first' ? 'selection' : 'path', children: segment.onClick ? (_jsx("button", { type: "button", className: cn(contentClass, 'app-no-drag focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-accent'), "aria-label": accessibleName, onClick: handleClick, children: content })) : (_jsx("span", { className: contentClass, "aria-label": accessibleName, children: content })) }));
22
+ return (_jsx(SegmentShell, { shape: shape, tone: shape === 'first' ? 'selection' : 'path', children: segment.onClick ? (_jsx("button", { type: "button", className: cn(contentClass, 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-accent'), "aria-label": accessibleName, onClick: handleClick, children: content })) : (_jsx("span", { className: contentClass, "aria-label": accessibleName, children: content })) }));
23
23
  }
@@ -7,10 +7,10 @@ import { SegmentShell } from './SegmentShell.js';
7
7
  * Renders the trailing breadcrumb segment with click-to-edit behavior.
8
8
  */
9
9
  export function EditableSegment({ value, placeholder, editableLabel, editing, shape, inputRef, onStartEditing, onStopEditing, onValueChange }) {
10
- return (_jsx(SegmentShell, { shape: shape, tone: "current", grow: true, children: editing ? (_jsx(Input, { ref: inputRef, variant: "plain", "aria-label": editableLabel, className: "app-no-drag w-full min-w-0 border-none bg-transparent p-0 font-semibold text-text outline-none", type: "text", value: value, onChange: (event) => onValueChange(event.target.value), onBlur: onStopEditing, onKeyDown: (event) => {
10
+ return (_jsx(SegmentShell, { shape: shape, tone: "current", grow: true, children: editing ? (_jsx(Input, { ref: inputRef, variant: "plain", "aria-label": editableLabel, className: "w-full min-w-0 border-none bg-transparent p-0 font-semibold text-text outline-none", type: "text", value: value, onChange: (event) => onValueChange(event.target.value), onBlur: onStopEditing, onKeyDown: (event) => {
11
11
  if (event.key === 'Enter' || event.key === 'Escape') {
12
12
  event.preventDefault();
13
13
  onStopEditing();
14
14
  }
15
- } })) : (_jsxs("button", { type: "button", "aria-current": "page", "aria-label": editableLabel, className: "app-no-drag inline-flex max-w-full min-w-0 cursor-text items-center border-none bg-transparent p-0 text-left font-semibold text-text hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-accent", onClick: onStartEditing, children: [_jsx("span", { className: "min-w-0 truncate", children: value ? value : _jsx("span", { className: "font-normal text-muted", children: placeholder }) }), _jsx(FaIcon, { icon: faPen, className: "ms-3 h-2.5 w-2.5 shrink-0 cursor-pointer text-muted opacity-60", "aria-hidden": true })] })) }));
15
+ } })) : (_jsxs("button", { type: "button", "aria-current": "page", "aria-label": editableLabel, className: "inline-flex max-w-full min-w-0 cursor-text items-center border-none bg-transparent p-0 text-left font-semibold text-text hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-accent", onClick: onStartEditing, children: [_jsx("span", { className: "min-w-0 truncate", children: value ? value : _jsx("span", { className: "font-normal text-muted", children: placeholder }) }), _jsx(FaIcon, { icon: faPen, className: "ms-3 h-2.5 w-2.5 shrink-0 cursor-pointer text-muted opacity-60", "aria-hidden": true })] })) }));
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
2
  import { cn } from '../utils.js';
3
- const BUTTON_BASE = 'inline-flex cursor-pointer items-center rounded-full app-no-drag';
3
+ const BUTTON_BASE = 'inline-flex cursor-pointer items-center rounded-full';
4
4
  /**
5
5
  * Keyboard focus ring for variants that use `shadow-sm`. Host apps often style
6
6
  * `button:focus-visible` with `box-shadow`, which Tailwind `shadow-sm` overrides —
@@ -283,8 +283,8 @@ export interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children'
283
283
  /**
284
284
  * CodeMirror wrapper for editable request bodies and read-only response views.
285
285
  *
286
- * Styling relies on host CSS variables (`--mac-*`, `--font-mono`) and the `.app-no-drag`
287
- * class defined in HarborClient `styles.css`.
286
+ * Styling relies on host CSS variables (`--mac-*`, `--font-mono`) defined in
287
+ * HarborClient `styles.css`.
288
288
  */
289
289
  export declare function CodeEditor({ value, onChange, language, readOnly, editable, placeholder, placeholderHighlight, minHeight, height, onHeightChange, initialScrollTop, initialSelection, onViewStateChange, className, variables, onEditVariable, completionSource, slashCommands, onSlashCommand, selectionActions, lint, diagnostics, themeOverride, setupOverride, fontSize, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, ...props }: Props): JSX.Element;
290
290
  //# sourceMappingURL=index.d.ts.map
@@ -447,8 +447,8 @@ function buildPlaceholderExtensions(options) {
447
447
  /**
448
448
  * CodeMirror wrapper for editable request bodies and read-only response views.
449
449
  *
450
- * Styling relies on host CSS variables (`--mac-*`, `--font-mono`) and the `.app-no-drag`
451
- * class defined in HarborClient `styles.css`.
450
+ * Styling relies on host CSS variables (`--mac-*`, `--font-mono`) defined in
451
+ * HarborClient `styles.css`.
452
452
  */
453
453
  export function CodeEditor({ value, onChange, language = 'text', readOnly = false, editable, placeholder, placeholderHighlight = false, minHeight = '144px', height, onHeightChange, initialScrollTop, initialSelection, onViewStateChange, className = '', variables, onEditVariable, completionSource, slashCommands, onSlashCommand, selectionActions, lint = true, diagnostics, themeOverride, setupOverride, fontSize, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, ...props }) {
454
454
  const config = useCodeEditorConfig();
@@ -982,7 +982,7 @@ export function CodeEditor({ value, onChange, language = 'text', readOnly = fals
982
982
  * (`.hc-code-editor:focus-within::after`) so it stays visible inside
983
983
  * OverlayScrollbars / overflow-hidden hosts such as the response Body viewer.
984
984
  */
985
- const editorSurfaceClass = 'overflow-hidden rounded-lg bg-control shadow-[inset_0_0.5px_1px_rgba(0,0,0,0.06)] app-no-drag';
985
+ const editorSurfaceClass = 'overflow-hidden rounded-lg bg-control shadow-[inset_0_0.5px_1px_rgba(0,0,0,0.06)]';
986
986
  const wrapperClassName = readOnly
987
987
  ? `hc-code-editor ${editorSurfaceClass} ${className}`
988
988
  : `hc-code-editor min-h-36 resize-y border border-separator ${editorSurfaceClass} ${className}`;
@@ -991,7 +991,7 @@ export function CodeEditor({ value, onChange, language = 'text', readOnly = fals
991
991
  : null;
992
992
  const wrapperStyle = height ? { height } : undefined;
993
993
  const activeSelectionActions = selectionActionsRef.current ?? [];
994
- const selectionActionToolbarNode = selectionActionToolbar && hasSelectionActions ? (_jsx("div", { ref: selectionToolbarElementRef, role: "toolbar", "aria-label": "Selection actions", className: "hc-code-editor-selection-toolbar app-no-drag pointer-events-auto fixed z-50 flex -translate-x-1/2 -translate-y-full items-center gap-1 bg-transparent p-0 text-[14px] text-text", style: {
994
+ const selectionActionToolbarNode = selectionActionToolbar && hasSelectionActions ? (_jsx("div", { ref: selectionToolbarElementRef, role: "toolbar", "aria-label": "Selection actions", className: "hc-code-editor-selection-toolbar pointer-events-auto fixed z-50 flex -translate-x-1/2 -translate-y-full items-center gap-1 bg-transparent p-0 text-[14px] text-text", style: {
995
995
  top: selectionActionToolbar.top - SELECTION_TOOLBAR_OFFSET_PX,
996
996
  left: selectionActionToolbar.left
997
997
  }, children: activeSelectionActions.map((action) => {
@@ -1025,7 +1025,7 @@ export function CodeEditor({ value, onChange, language = 'text', readOnly = fals
1025
1025
  ...(height ? { height: '100%' } : {}),
1026
1026
  basicSetup,
1027
1027
  onCreateEditor: stableOnCreateEditor
1028
- }), selectionTooltip && selectionTooltipContent && variables ? (_jsxs("div", { id: tooltipId, role: "tooltip", className: "hc-code-editor-tooltip app-no-drag pointer-events-auto fixed z-50 flex max-w-sm -translate-x-1/2 -translate-y-full flex-col gap-1.5 rounded-lg border border-separator bg-surface px-3 py-2 text-text shadow-md", style: { top: selectionTooltip.top - 4, left: selectionTooltip.left }, children: [_jsx(VariableTooltipValue, { value: selectionTooltipContent.text, variableKey: selectionTooltip.key, muted: selectionTooltipContent.muted }), onEditVariable ? (_jsx(Button, { variant: "secondary", className: "hc-code-editor-tooltip-edit self-start", "aria-label": `Edit value for ${selectionTooltip.key}`, onMouseDown: (event) => {
1028
+ }), selectionTooltip && selectionTooltipContent && variables ? (_jsxs("div", { id: tooltipId, role: "tooltip", className: "hc-code-editor-tooltip pointer-events-auto fixed z-50 flex max-w-sm -translate-x-1/2 -translate-y-full flex-col gap-1.5 rounded-lg border border-separator bg-surface px-3 py-2 text-text shadow-md", style: { top: selectionTooltip.top - 4, left: selectionTooltip.left }, children: [_jsx(VariableTooltipValue, { value: selectionTooltipContent.text, variableKey: selectionTooltip.key, muted: selectionTooltipContent.muted }), onEditVariable ? (_jsx(Button, { variant: "secondary", className: "hc-code-editor-tooltip-edit self-start", "aria-label": `Edit value for ${selectionTooltip.key}`, onMouseDown: (event) => {
1029
1029
  event.preventDefault();
1030
1030
  onEditVariable(selectionTooltip.key);
1031
1031
  setSelectionTooltip(null);
@@ -7,7 +7,7 @@ import { cn } from '../utils.js';
7
7
  import { COPY_TO_CHAT_ICON, COPY_TO_CHAT_LABEL, COPY_TO_CHAT_SHORTCUT_HINT } from './constants.js';
8
8
  export { COPY_TO_CHAT_ICON, COPY_TO_CHAT_LABEL, COPY_TO_CHAT_SHORTCUT_CODEMIRROR_KEY, COPY_TO_CHAT_SHORTCUT_HINT, COPY_TO_CHAT_SHORTCUT_LETTER, copyToChatActionLabel } from './constants.js';
9
9
  /** Shared chrome for the labeled breadcrumb-style Copy to chat control. */
10
- const LABELED_BUTTON_CLASS = 'hc-copy-to-chat-button hc-code-editor-selection-action app-no-drag inline-flex cursor-pointer items-stretch overflow-hidden rounded-lg border-none bg-breadcrumb-background p-0 text-[14px] text-text shadow-sm hover:brightness-110 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent';
10
+ const LABELED_BUTTON_CLASS = 'hc-copy-to-chat-button hc-code-editor-selection-action inline-flex cursor-pointer items-stretch overflow-hidden rounded-lg border-none bg-breadcrumb-background p-0 text-[14px] text-text shadow-sm hover:brightness-110 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent';
11
11
  /**
12
12
  * Shared Copy to chat control used for selection toolbars, floating overlays, and
13
13
  * icon-only row/header actions so label, icon, shortcut, and styles stay in one place.
@@ -5,8 +5,8 @@ import { cn } from '../utils.js';
5
5
  */
6
6
  function footerSegment(active) {
7
7
  return active
8
- ? 'cursor-pointer rounded-md border-none bg-surface px-2 py-0.5 text-[14px] text-footer-text shadow-sm app-no-drag'
9
- : 'cursor-pointer rounded-md border-none bg-transparent px-2 py-0.5 text-[14px] text-footer-muted hover:text-footer-text app-no-drag';
8
+ ? 'cursor-pointer rounded-md border-none bg-surface px-2 py-0.5 text-[14px] text-footer-text shadow-sm'
9
+ : 'cursor-pointer rounded-md border-none bg-transparent px-2 py-0.5 text-[14px] text-footer-muted hover:text-footer-text';
10
10
  }
11
11
  /**
12
12
  * Text segment toggle button for the window footer bar, used to open and close
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
2
  import { FaIcon } from '../FaIcon/index.js';
3
3
  import { footerIconButtonSizeClass } from '../footerBarUtils.js';
4
4
  import { cn } from '../utils.js';
5
- const footerIconBase = `inline-flex ${footerIconButtonSizeClass} shrink-0 cursor-pointer items-center justify-center rounded-md border-none app-no-drag`;
5
+ const footerIconBase = `inline-flex ${footerIconButtonSizeClass} shrink-0 cursor-pointer items-center justify-center rounded-md border-none`;
6
6
  /**
7
7
  * Square icon toggle styles for footer sidebar buttons.
8
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormDataEditor/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAoB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAQ/E,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,KAAK,EAAE,YAAY,EAAE,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAE1C;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IAEtB;;OAEG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEvC;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACf,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAyKrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormDataEditor/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAoB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAQ/E,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,KAAK,EAAE,YAAY,EAAE,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAE1C;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IAEtB;;OAEG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEvC;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACf,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAuKrB"}
@@ -60,12 +60,12 @@ export function FormDataEditor({ parts, onChange, variables, onSelectFiles, onEd
60
60
  const currentFiles = rows[index]?.files ?? [];
61
61
  updateRow(index, { files: currentFiles.filter((file) => file !== filePath) });
62
62
  };
63
- return (_jsxs(Table, { className: "hc-form-data-editor", children: [_jsx(TableHeader, { className: "hc-form-data-editor-header", children: _jsxs("tr", { children: [_jsx(TableHead, { className: "w-6 p-0", children: _jsx("span", { className: "sr-only", children: "Enable" }) }), _jsx(TableHead, { children: "Key" }), _jsx(TableHead, { className: "w-24", children: "Type" }), _jsx(TableHead, { children: "Value" }), _jsx(TableHead, { className: "w-7 p-0" })] }) }), _jsx(TableBody, { className: "hc-form-data-editor-body", children: rows.map((row, index) => (_jsxs("tr", { children: [_jsx(TableCell, { className: "hc-form-data-editor-cell w-6 p-1 text-center", children: _jsx(Checkbox, { className: "app-no-drag", checked: row.enabled, onChange: (e) => updateRow(index, { enabled: e.target.checked }), "aria-label": `Enable row ${index + 1}`, title: "Enable" }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: _jsx(Input, { type: "text", className: "w-full", value: row.key, placeholder: "field", "aria-label": `Key, row ${index + 1}`, onChange: (e) => updateRow(index, { key: e.target.value }) }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: _jsxs(Select, { className: "w-full", value: row.type, "aria-label": `Type, row ${index + 1}`, onChange: (e) => {
63
+ return (_jsxs(Table, { className: "hc-form-data-editor", children: [_jsx(TableHeader, { className: "hc-form-data-editor-header", children: _jsxs("tr", { children: [_jsx(TableHead, { className: "w-6 p-0", children: _jsx("span", { className: "sr-only", children: "Enable" }) }), _jsx(TableHead, { children: "Key" }), _jsx(TableHead, { className: "w-24", children: "Type" }), _jsx(TableHead, { children: "Value" }), _jsx(TableHead, { className: "w-7 p-0" })] }) }), _jsx(TableBody, { className: "hc-form-data-editor-body", children: rows.map((row, index) => (_jsxs("tr", { children: [_jsx(TableCell, { className: "hc-form-data-editor-cell w-6 p-1 text-center", children: _jsx(Checkbox, { checked: row.enabled, onChange: (e) => updateRow(index, { enabled: e.target.checked }), "aria-label": `Enable row ${index + 1}`, title: "Enable" }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: _jsx(Input, { type: "text", className: "w-full", value: row.key, placeholder: "field", "aria-label": `Key, row ${index + 1}`, onChange: (e) => updateRow(index, { key: e.target.value }) }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: _jsxs(Select, { className: "w-full", value: row.type, "aria-label": `Type, row ${index + 1}`, onChange: (e) => {
64
64
  const type = e.target.value;
65
65
  updateRow(index, {
66
66
  type,
67
67
  value: type === 'text' ? row.value : '',
68
68
  files: type === 'file' ? row.files : []
69
69
  });
70
- }, children: [_jsx("option", { value: "text", children: "Text" }), _jsx("option", { value: "file", children: "File" })] }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: row.type === 'text' ? (_jsx(VariableInput, { wrapperClassName: `${fieldFrame} w-full`, className: "app-no-drag", value: row.value, onChange: (value) => updateRow(index, { value }), variables: variables, placeholder: "value", "aria-label": `Value, row ${index + 1}`, onEditVariable: onEditVariable })) : (_jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [_jsx(Button, { type: "button", variant: "secondary", className: "shrink-0 px-2 py-0.5 text-[14px]", onClick: () => void chooseFiles(index), children: "Choose files" }), row.files.map((filePath) => (_jsxs("span", { className: "inline-flex max-w-full items-center gap-1 rounded-md border border-separator bg-control px-1.5 py-0.5 text-[14px] text-text", title: filePath, "aria-label": filePath, children: [_jsx("span", { className: "truncate", children: fileBasename(filePath) }), _jsx("button", { type: "button", className: "app-no-drag inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded border-none bg-transparent text-muted hover:bg-selection hover:text-text", onClick: () => removeFile(index, filePath), title: `Remove file ${fileBasename(filePath)}`, "aria-label": `Remove file ${fileBasename(filePath)}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3 w-3" }) })] }, filePath)))] })) }), _jsx(TableCell, { className: "hc-form-data-editor-cell w-7 p-1 text-center", children: _jsx(Button, { type: "button", variant: "iconDanger", onClick: () => removeRow(index), title: "Remove", "aria-label": `Remove row ${index + 1}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }) })] }, index))) })] }));
70
+ }, children: [_jsx("option", { value: "text", children: "Text" }), _jsx("option", { value: "file", children: "File" })] }) }), _jsx(TableCell, { className: "hc-form-data-editor-cell", children: row.type === 'text' ? (_jsx(VariableInput, { wrapperClassName: `${fieldFrame} w-full`, value: row.value, onChange: (value) => updateRow(index, { value }), variables: variables, placeholder: "value", "aria-label": `Value, row ${index + 1}`, onEditVariable: onEditVariable })) : (_jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [_jsx(Button, { type: "button", variant: "secondary", className: "shrink-0 px-2 py-0.5 text-[14px]", onClick: () => void chooseFiles(index), children: "Choose files" }), row.files.map((filePath) => (_jsxs("span", { className: "inline-flex max-w-full items-center gap-1 rounded-md border border-separator bg-control px-1.5 py-0.5 text-[14px] text-text", title: filePath, "aria-label": filePath, children: [_jsx("span", { className: "truncate", children: fileBasename(filePath) }), _jsx("button", { type: "button", className: "inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded border-none bg-transparent text-muted hover:bg-selection hover:text-text", onClick: () => removeFile(index, filePath), title: `Remove file ${fileBasename(filePath)}`, "aria-label": `Remove file ${fileBasename(filePath)}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3 w-3" }) })] }, filePath)))] })) }), _jsx(TableCell, { className: "hc-form-data-editor-cell w-7 p-1 text-center", children: _jsx(Button, { type: "button", variant: "iconDanger", onClick: () => removeRow(index), title: "Remove", "aria-label": `Remove row ${index + 1}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }) })] }, index))) })] }));
71
71
  }
@@ -58,8 +58,8 @@ export function FormGroup({ label, children, htmlFor, description, error, errorI
58
58
  }
59
59
  if (layout === 'radio') {
60
60
  const wrapperClasses = extra
61
- ? `hc-form-group inline-flex cursor-pointer items-center gap-1.5 text-text app-no-drag ${extra}`
62
- : 'hc-form-group inline-flex cursor-pointer items-center gap-1.5 text-text app-no-drag';
61
+ ? `hc-form-group inline-flex cursor-pointer items-center gap-1.5 text-text ${extra}`
62
+ : 'hc-form-group inline-flex cursor-pointer items-center gap-1.5 text-text';
63
63
  const linkedChildren = enhanceControl(children, { id: controlId });
64
64
  return (_jsxs("label", { htmlFor: controlId, className: wrapperClasses, children: [linkedChildren, _jsx("span", { className: "hc-form-group-label", children: label })] }));
65
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/KeyValueEditor/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAOnE,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,IAAI,EAAE,QAAQ,EAAE,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IAEtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC;;OAEG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,cAAsB,EACtB,gBAA0B,EAC1B,SAAS,EACT,cAAc,EACd,SAAS,EACT,WAAW,EACZ,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAoGrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/KeyValueEditor/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAOnE,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,IAAI,EAAE,QAAQ,EAAE,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IAEtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC;;OAEG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,cAAsB,EACtB,gBAA0B,EAC1B,SAAS,EACT,cAAc,EACd,SAAS,EACT,WAAW,EACZ,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAkGrB"}
@@ -41,6 +41,6 @@ export function KeyValueEditor({ rows, onChange, placeholderKey = 'Key', placeho
41
41
  });
42
42
  return (_jsxs(Table, { className: "hc-key-value-editor", children: [_jsx(TableHeader, { className: "hc-key-value-editor-header", children: _jsxs("tr", { children: [_jsx(TableHead, { className: "w-6 p-0", children: _jsx("span", { className: "sr-only", children: "Enable" }) }), _jsx(TableHead, { children: "Key" }), _jsx(TableHead, { children: "Value" }), _jsx(TableHead, { className: "w-7 p-0" })] }) }), _jsx(TableBody, { className: "hc-key-value-editor-body", children: rows.map((row, index) => {
43
43
  const normalizedRow = normalizeRow(row);
44
- return (_jsxs("tr", { children: [_jsx(TableCell, { className: "hc-key-value-editor-cell w-6 text-center", children: _jsx(Checkbox, { className: "app-no-drag", checked: normalizedRow.enabled, onChange: (e) => updateRow(index, { enabled: e.target.checked }), "aria-label": `Enable row ${index + 1}`, title: "Enable" }) }), _jsx(TableCell, { className: "hc-key-value-editor-cell", children: _jsx(AutocompleteInput, { type: "text", className: "w-full", value: normalizedRow.key, source: keySource, placeholder: placeholderKey, "aria-label": `Key, row ${index + 1}`, onChange: (key) => updateRow(index, { key }) }) }), _jsx(TableCell, { className: "hc-key-value-editor-cell", children: _jsx(VariableInput, { wrapperClassName: `${fieldFrame} w-full`, className: "app-no-drag", value: normalizedRow.value, onChange: (value) => updateRow(index, { value }), variables: variables, source: valueSource, placeholder: placeholderValue, "aria-label": `Value, row ${index + 1}`, onEditVariable: onEditVariable }) }), _jsx(TableCell, { className: "hc-key-value-editor-cell w-7 p-1 text-center", children: _jsx(Button, { type: "button", variant: "iconDanger", onClick: () => removeRow(index), title: "Remove", "aria-label": `Remove row ${index + 1}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }) })] }, index));
44
+ return (_jsxs("tr", { children: [_jsx(TableCell, { className: "hc-key-value-editor-cell w-6 text-center", children: _jsx(Checkbox, { checked: normalizedRow.enabled, onChange: (e) => updateRow(index, { enabled: e.target.checked }), "aria-label": `Enable row ${index + 1}`, title: "Enable" }) }), _jsx(TableCell, { className: "hc-key-value-editor-cell", children: _jsx(AutocompleteInput, { type: "text", className: "w-full", value: normalizedRow.key, source: keySource, placeholder: placeholderKey, "aria-label": `Key, row ${index + 1}`, onChange: (key) => updateRow(index, { key }) }) }), _jsx(TableCell, { className: "hc-key-value-editor-cell", children: _jsx(VariableInput, { wrapperClassName: `${fieldFrame} w-full`, value: normalizedRow.value, onChange: (value) => updateRow(index, { value }), variables: variables, source: valueSource, placeholder: placeholderValue, "aria-label": `Value, row ${index + 1}`, onEditVariable: onEditVariable }) }), _jsx(TableCell, { className: "hc-key-value-editor-cell w-7 p-1 text-center", children: _jsx(Button, { type: "button", variant: "iconDanger", onClick: () => removeRow(index), title: "Remove", "aria-label": `Remove row ${index + 1}`, children: _jsx(FaIcon, { icon: faXmark, className: "h-3.5 w-3.5" }) }) })] }, index));
45
45
  }) })] }));
46
46
  }
@@ -142,7 +142,7 @@ export function MethodSelectMenu({ anchorRef, listboxId, value, onSelect, onClos
142
142
  return null;
143
143
  }
144
144
  const menuWidth = Math.max(LISTBOX_WIDTH_PX, anchorRef.current?.getBoundingClientRect().width ?? LISTBOX_WIDTH_PX);
145
- return portalToBody(_jsxs("div", { ref: listboxRef, id: listboxId, role: "listbox", "aria-label": "Request method or protocol", className: "hc-method-select-listbox app-no-drag fixed z-50 max-h-[320px] overflow-y-auto rounded-md border border-separator bg-surface py-1 shadow-md", style: { top: position.y, left: position.x, width: menuWidth }, onKeyDown: handleListboxKeyDown, children: [METHODS.map((method, index) => (_jsx(MethodSelectOption, { label: method, colorKey: method, selected: method === value, focused: index === focusedIndex, optionRef: (element) => {
145
+ return portalToBody(_jsxs("div", { ref: listboxRef, id: listboxId, role: "listbox", "aria-label": "Request method or protocol", className: "hc-method-select-listbox fixed z-50 max-h-[320px] overflow-y-auto rounded-md border border-separator bg-surface py-1 shadow-md", style: { top: position.y, left: position.x, width: menuWidth }, onKeyDown: handleListboxKeyDown, children: [METHODS.map((method, index) => (_jsx(MethodSelectOption, { label: method, colorKey: method, selected: method === value, focused: index === focusedIndex, optionRef: (element) => {
146
146
  optionRefs.current[index] = element;
147
147
  }, onSelect: () => onSelect(method) }, method))), _jsx(MethodSelectSeparator, {}), _jsx(MethodSelectOption, { label: "SSE", colorKey: "sse", selected: value === 'SSE', focused: focusedIndex === SSE_OPTION_INDEX, optionRef: (element) => {
148
148
  optionRefs.current[SSE_OPTION_INDEX] = element;
@@ -8,7 +8,7 @@ import { cn } from '../utils.js';
8
8
  * @returns Accessible listbox option button.
9
9
  */
10
10
  export function MethodSelectOption({ label, colorKey, selected, focused, optionRef, onSelect }) {
11
- return (_jsx("button", { ref: optionRef, type: "button", role: "option", "aria-selected": selected, tabIndex: focused ? 0 : -1, className: cn('app-no-drag flex w-full cursor-pointer items-center border-none bg-transparent px-3.5 py-1.5 text-left text-[14px] font-normal hover:bg-selection', methodColorClass(colorKey), selected ? 'bg-selection/60' : ''), onClick: (event) => {
11
+ return (_jsx("button", { ref: optionRef, type: "button", role: "option", "aria-selected": selected, tabIndex: focused ? 0 : -1, className: cn('flex w-full cursor-pointer items-center border-none bg-transparent px-3.5 py-1.5 text-left text-[14px] font-normal hover:bg-selection', methodColorClass(colorKey), selected ? 'bg-selection/60' : ''), onClick: (event) => {
12
12
  event.stopPropagation();
13
13
  onSelect();
14
14
  }, children: label }));
@@ -48,5 +48,5 @@ export function MethodSelect({ value, protocol = 'http', onChange, onProtocolCha
48
48
  const toggleOpen = useCallback(() => {
49
49
  setOpen((wasOpen) => !wasOpen);
50
50
  }, []);
51
- return (_jsxs(_Fragment, { children: [_jsx("button", { ...props, ref: triggerRef, type: "button", role: "combobox", "aria-expanded": open, "aria-controls": listboxId, "aria-haspopup": "listbox", "aria-label": "Request method or protocol", className: cn('hc-method-select app-no-drag w-[100px] shrink-0 cursor-pointer border-none bg-transparent px-2 py-1.5 text-left text-[14px] leading-none font-normal focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent', methodColorClass(colorKey), className), onClick: toggleOpen, children: selectValue }), open ? (_jsx(MethodSelectMenu, { anchorRef: triggerRef, listboxId: listboxId, value: selectValue, onSelect: handleSelect, onClose: handleClose })) : null] }));
51
+ return (_jsxs(_Fragment, { children: [_jsx("button", { ...props, ref: triggerRef, type: "button", role: "combobox", "aria-expanded": open, "aria-controls": listboxId, "aria-haspopup": "listbox", "aria-label": "Request method or protocol", className: cn('hc-method-select w-[100px] shrink-0 cursor-pointer border-none bg-transparent px-2 py-1.5 text-left text-[14px] leading-none font-normal focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent', methodColorClass(colorKey), className), onClick: toggleOpen, children: selectValue }), open ? (_jsx(MethodSelectMenu, { anchorRef: triggerRef, listboxId: listboxId, value: selectValue, onSelect: handleSelect, onClose: handleClose })) : null] }));
52
52
  }
@@ -12,7 +12,7 @@ export function ResizeHandle({ orientation, value, min, max, onResizeStart, onKe
12
12
  const valueText = formatValueText
13
13
  ? formatValueText(value, orientation)
14
14
  : `${dimension} ${Math.round(value)} pixels`;
15
- return (_jsx("div", { ...props, role: "separator", tabIndex: 0, className: cn('hc-resize-handle font-inherit app-no-drag m-0 flex shrink-0 items-center justify-center bg-resize-separator p-0 text-inherit hover:bg-selection/60', isHorizontal
15
+ return (_jsx("div", { ...props, role: "separator", tabIndex: 0, className: cn('hc-resize-handle font-inherit m-0 flex shrink-0 items-center justify-center bg-resize-separator p-0 text-inherit hover:bg-selection/60', isHorizontal
16
16
  ? 'h-1.5 w-full cursor-row-resize border-b border-resize-separator'
17
17
  : 'h-full w-1.5 cursor-col-resize border-r border-resize-separator', className), onMouseDown: onResizeStart, onKeyDown: onKeyboardResize, "aria-orientation": orientation, "aria-label": ariaLabel, "aria-valuenow": Math.round(value), "aria-valuemin": min, "aria-valuemax": Math.round(max), "aria-valuetext": valueText, children: _jsx("div", { className: isHorizontal
18
18
  ? 'hc-resize-handle-grip h-0.5 w-8 rounded-full bg-resize-handle'
@@ -21,5 +21,5 @@ export declare function getFooterPanelMaxSize(containerRef: RefObject<HTMLDivEle
21
21
  */
22
22
  export declare function footerPanelClassName(open: boolean): string;
23
23
  /** Shared close-button styling for footer slide-up panels. */
24
- export declare const footerPanelCloseButtonClassName = "inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center self-center rounded-full border-none bg-transparent text-[14px] text-muted hover:bg-selection hover:text-text app-no-drag";
24
+ export declare const footerPanelCloseButtonClassName = "inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center self-center rounded-full border-none bg-transparent text-[14px] text-muted hover:bg-selection hover:text-text";
25
25
  //# sourceMappingURL=footerPanelUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"footerPanelUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/footerPanelUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,sDAAsD;AACtD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,sDAAsD;AACtD,eAAO,MAAM,UAAU,MAAM,CAAC;AAiC9B;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,MAAM,CAI5F;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAQ1D;AAED,8DAA8D;AAC9D,eAAO,MAAM,+BAA+B,sMACyJ,CAAC"}
1
+ {"version":3,"file":"footerPanelUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/footerPanelUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,sDAAsD;AACtD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,sDAAsD;AACtD,eAAO,MAAM,UAAU,MAAM,CAAC;AAiC9B;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,MAAM,CAI5F;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAQ1D;AAED,8DAA8D;AAC9D,eAAO,MAAM,+BAA+B,0LAC6I,CAAC"}
@@ -51,11 +51,11 @@ export function getFooterPanelMaxSize(containerRef) {
51
51
  export function footerPanelClassName(open) {
52
52
  return [
53
53
  'absolute inset-x-0 bottom-full z-40 flex flex-col border-t border-separator bg-surface',
54
- 'transition-transform duration-300 ease-out app-no-drag',
54
+ 'transition-transform duration-300 ease-out',
55
55
  open
56
56
  ? 'translate-y-0 shadow-[0_-4px_16px_rgba(0,0,0,0.12)]'
57
57
  : 'translate-y-full pointer-events-none shadow-none'
58
58
  ].join(' ');
59
59
  }
60
60
  /** Shared close-button styling for footer slide-up panels. */
61
- export const footerPanelCloseButtonClassName = 'inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center self-center rounded-full border-none bg-transparent text-[14px] text-muted hover:bg-selection hover:text-text app-no-drag';
61
+ export const footerPanelCloseButtonClassName = 'inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center self-center rounded-full border-none bg-transparent text-[14px] text-muted hover:bg-selection hover:text-text';
@@ -134,7 +134,7 @@ export function Submenu({ groups, anchorRect, menuElementId, onSelectItem, onReq
134
134
  focusItem(typeahead.index);
135
135
  }
136
136
  };
137
- return portalToBody(_jsx("div", { ref: panelRef, id: menuElementId, role: "menu", className: "hc-row-actions-menu-panel hc-row-actions-submenu-panel app-no-drag fixed z-50 min-w-[200px] rounded-md border border-separator bg-surface py-1 shadow-md", style: { left: position.x, top: position.y }, onKeyDown: handleKeyDown, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: groups.map((group, groupIndex) => {
137
+ return portalToBody(_jsx("div", { ref: panelRef, id: menuElementId, role: "menu", className: "hc-row-actions-menu-panel hc-row-actions-submenu-panel fixed z-50 min-w-[200px] rounded-md border border-separator bg-surface py-1 shadow-md", style: { left: position.x, top: position.y }, onKeyDown: handleKeyDown, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: groups.map((group, groupIndex) => {
138
138
  let flatIndex = groups.slice(0, groupIndex).reduce((count, g) => count + g.length, 0);
139
139
  return (_jsx("div", { className: groupIndex > 0
140
140
  ? 'hc-row-actions-menu-group border-t border-separator'
@@ -370,7 +370,7 @@ export function RowActionsMenu({ groups, menuId, openMenuId, onOpenChange, trigg
370
370
  };
371
371
  const openSubmenuItem = openSubmenuIndex != null ? flatItems[openSubmenuIndex] : undefined;
372
372
  const openSubmenuAnchorRect = openSubmenuIndex != null ? itemRefs.current[openSubmenuIndex]?.getBoundingClientRect() : null;
373
- const menuPanel = isOpen ? (_jsx("div", { ref: panelRef, id: menuElementId, role: "menu", tabIndex: hasEnabledItems ? undefined : -1, className: "hc-row-actions-menu-panel app-no-drag fixed z-50 min-w-[200px] rounded-md border border-separator bg-surface py-1 shadow-md", style: { left: menuPosition.x, top: menuPosition.y }, onKeyDown: handleMenuKeyDown, onMouseLeave: () => {
373
+ const menuPanel = isOpen ? (_jsx("div", { ref: panelRef, id: menuElementId, role: "menu", tabIndex: hasEnabledItems ? undefined : -1, className: "hc-row-actions-menu-panel fixed z-50 min-w-[200px] rounded-md border border-separator bg-surface py-1 shadow-md", style: { left: menuPosition.x, top: menuPosition.y }, onKeyDown: handleMenuKeyDown, onMouseLeave: () => {
374
374
  if (openSubmenuIndex != null) {
375
375
  scheduleCloseSubmenu();
376
376
  }
@@ -28,10 +28,10 @@ function variantClasses(variant, interactive) {
28
28
  const base = 'hc-sidebar-badge inline-flex h-[18px] shrink-0 items-center text-[14px] leading-none';
29
29
  if (variant === 'recessed') {
30
30
  return cn(base, 'min-w-[22px] justify-center rounded-full bg-selection px-2 font-normal text-muted shadow-[inset_0_0.5px_1px_rgba(0,0,0,0.06)]', interactive &&
31
- 'app-no-drag cursor-pointer hover:text-text focus-visible:ring-2 focus-visible:ring-accent focus-visible:outline-none');
31
+ 'cursor-pointer hover:text-text focus-visible:ring-2 focus-visible:ring-accent focus-visible:outline-none');
32
32
  }
33
33
  return cn(base, 'rounded bg-info/15 px-1.5 font-medium text-info', interactive &&
34
- 'app-no-drag cursor-pointer hover:bg-info/25 focus-visible:ring-2 focus-visible:ring-accent focus-visible:outline-none');
34
+ 'cursor-pointer hover:bg-info/25 focus-visible:ring-2 focus-visible:ring-accent focus-visible:outline-none');
35
35
  }
36
36
  /**
37
37
  * Compact sidebar badge for storage locations, git branches, and count indicators.
@@ -24,5 +24,5 @@ function pushStatusLabel(pushStatus) {
24
24
  */
25
25
  export function SidebarCommitItem({ message, author, timestampLabel, icon, pushStatus, onClick, as: Container = 'li' }) {
26
26
  const statusLabel = pushStatus != null ? pushStatusLabel(pushStatus) : null;
27
- return (_jsx(Container, { children: _jsxs("button", { type: "button", className: "hc-sidebar-commit-item group app-no-drag flex w-full cursor-pointer rounded-md p-2 text-left hover:bg-selection/60", onClick: onClick, children: [_jsxs("div", { className: "mr-2 flex shrink-0 flex-col items-center gap-0.5 self-start", children: [_jsx(FaIcon, { icon: icon, className: "h-4 w-4 text-muted", "aria-hidden": true }), pushStatus != null && statusLabel != null ? (_jsx(SidebarStatusDot, { className: pushStatus === 'pushed' ? 'mt-3 mr-1 bg-success' : 'mt-3 mr-1 bg-muted', srOnlyLabel: statusLabel, title: statusLabel })) : null] }), _jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [_jsx("span", { className: "-mt-1 block min-w-0 truncate font-medium text-text", children: message }), _jsxs("span", { className: "block min-w-0 truncate text-[14px] text-muted", children: [author, " \u00B7 ", timestampLabel] })] })] }) }));
27
+ return (_jsx(Container, { children: _jsxs("button", { type: "button", className: "hc-sidebar-commit-item group flex w-full cursor-pointer rounded-md p-2 text-left hover:bg-selection/60", onClick: onClick, children: [_jsxs("div", { className: "mr-2 flex shrink-0 flex-col items-center gap-0.5 self-start", children: [_jsx(FaIcon, { icon: icon, className: "h-4 w-4 text-muted", "aria-hidden": true }), pushStatus != null && statusLabel != null ? (_jsx(SidebarStatusDot, { className: pushStatus === 'pushed' ? 'mt-3 mr-1 bg-success' : 'mt-3 mr-1 bg-muted', srOnlyLabel: statusLabel, title: statusLabel })) : null] }), _jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [_jsx("span", { className: "-mt-1 block min-w-0 truncate font-medium text-text", children: message }), _jsxs("span", { className: "block min-w-0 truncate text-[14px] text-muted", children: [author, " \u00B7 ", timestampLabel] })] })] }) }));
28
28
  }
@@ -40,5 +40,5 @@ export function SidebarFolderItem({ name, expanded, childrenId, level, setSize,
40
40
  : undefined, children: [_jsx("button", { type: "button", className: SIDEBAR_CHEVRON_BUTTON_CLASS, onClick: (event) => {
41
41
  event.stopPropagation();
42
42
  onToggleExpand();
43
- }, onPointerDown: stopSortableDragPointerDown, tabIndex: -1, "aria-label": chevronLabel, children: _jsx(FaIcon, { icon: expanded ? collapseIcon : expandIcon, className: SIDEBAR_CHEVRON_ICON_CLASS }) }), _jsxs("span", { className: `app-no-drag ${SIDEBAR_CHEVRON_LABEL_OFFSET_CLASS} min-w-0 flex-1 cursor-pointer truncate border-none bg-transparent py-0 text-left leading-none font-medium text-inherit`, "aria-current": selected ? 'true' : undefined, children: [_jsxs("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [name, markerDot != null ? (_jsx(SidebarMarkerDot, { marker: markerDot.marker, visible: markerDot.visible, label: markerDot.label })) : null] }), dropHighlighted ? _jsx("span", { className: "ml-1.5 font-normal text-info", children: "Drop here" }) : null] })] }));
43
+ }, onPointerDown: stopSortableDragPointerDown, tabIndex: -1, "aria-label": chevronLabel, children: _jsx(FaIcon, { icon: expanded ? collapseIcon : expandIcon, className: SIDEBAR_CHEVRON_ICON_CLASS }) }), _jsxs("span", { className: `${SIDEBAR_CHEVRON_LABEL_OFFSET_CLASS} min-w-0 flex-1 cursor-pointer truncate border-none bg-transparent py-0 text-left leading-none font-medium text-inherit`, "aria-current": selected ? 'true' : undefined, children: [_jsxs("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [name, markerDot != null ? (_jsx(SidebarMarkerDot, { marker: markerDot.marker, visible: markerDot.visible, label: markerDot.label })) : null] }), dropHighlighted ? _jsx("span", { className: "ml-1.5 font-normal text-info", children: "Drop here" }) : null] })] }));
44
44
  }
@@ -29,6 +29,10 @@ interface Props {
29
29
  * When false, renders the method badge in neutral theme text instead of per-method colors.
30
30
  */
31
31
  methodColors?: boolean;
32
+ /**
33
+ * When true, shows a danger badge indicating stored JSON for this entry was corrupt.
34
+ */
35
+ corrupt?: boolean;
32
36
  /**
33
37
  * Icon shown for run history entries.
34
38
  */
@@ -69,6 +73,6 @@ interface Props {
69
73
  /**
70
74
  * Renders a request or run history entry row in the Collections sidebar History section.
71
75
  */
72
- export declare function SidebarHistoryItem({ method, name, isRun, status, statusText, statusDotVisible, methodColors, runIcon, selected, title, ariaLabel, onContextMenu, onClick, actions, as, className }: Props): JSX.Element;
76
+ export declare function SidebarHistoryItem({ method, name, isRun, status, statusText, statusDotVisible, methodColors, corrupt, runIcon, selected, title, ariaLabel, onContextMenu, onClick, actions, as, className }: Props): JSX.Element;
73
77
  export {};
74
78
  //# sourceMappingURL=SidebarHistoryItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarHistoryItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarHistoryItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOxD,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAEzD;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAEnD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAI,EACJ,KAAa,EACb,MAAM,EACN,UAAU,EACV,gBAAuB,EACvB,YAAmB,EACnB,OAAO,EACP,QAAgB,EAChB,KAAK,EACL,SAAS,EACT,aAAa,EACb,OAAO,EACP,OAAO,EACP,EAAS,EACT,SAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA0CrB"}
1
+ {"version":3,"file":"SidebarHistoryItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarHistoryItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQxD,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAEzD;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAEnD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAI,EACJ,KAAa,EACb,MAAM,EACN,UAAU,EACV,gBAAuB,EACvB,YAAmB,EACnB,OAAe,EACf,OAAO,EACP,QAAgB,EAChB,KAAK,EACL,SAAS,EACT,aAAa,EACb,OAAO,EACP,OAAO,EACP,EAAS,EACT,SAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA+CrB"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
+ import { Badge } from '../Badge/index.js';
2
3
  import { FaIcon } from '../FaIcon/index.js';
3
4
  import { SidebarItem } from './SidebarItem.js';
4
5
  import { SidebarMethodBadge } from './SidebarMethodBadge.js';
@@ -7,7 +8,7 @@ import { SIDEBAR_ITEM_BUTTON_CLASS, statusDotClass } from './sidebarItemClasses.
7
8
  /**
8
9
  * Renders a request or run history entry row in the Collections sidebar History section.
9
10
  */
10
- export function SidebarHistoryItem({ method, name, isRun = false, status, statusText, statusDotVisible = true, methodColors = true, runIcon, selected = false, title, ariaLabel, onContextMenu, onClick, actions, as = 'li', className }) {
11
+ export function SidebarHistoryItem({ method, name, isRun = false, status, statusText, statusDotVisible = true, methodColors = true, corrupt = false, runIcon, selected = false, title, ariaLabel, onContextMenu, onClick, actions, as = 'li', className }) {
11
12
  const useListboxOption = as === 'li';
12
13
  const optionAriaLabel = !isRun && status != null && statusText != null
13
14
  ? `${ariaLabel}, responded ${status} ${statusText}`
@@ -17,5 +18,5 @@ export function SidebarHistoryItem({ method, name, isRun = false, status, status
17
18
  ariaLabel: optionAriaLabel,
18
19
  onClick
19
20
  }
20
- : undefined, children: _jsxs("span", { className: `${SIDEBAR_ITEM_BUTTON_CLASS} py-0.5`, title: title, children: [_jsx(SidebarMethodBadge, { method: method, uppercase: true, methodColors: methodColors }), _jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden", children: [_jsx("span", { className: "min-w-0 flex-1 truncate text-text", children: name }), isRun && runIcon != null ? (_jsx(FaIcon, { icon: runIcon, className: "h-3.5 w-3.5 shrink-0 text-muted", "aria-hidden": true })) : null] }), !isRun && status != null && statusText != null ? (_jsx(SidebarStatusDot, { className: statusDotClass(status), visible: statusDotVisible, title: `${status} ${statusText}`, srOnlyLabel: `${status} ${statusText}` })) : null] }) }));
21
+ : undefined, children: _jsxs("span", { className: `${SIDEBAR_ITEM_BUTTON_CLASS} py-0.5`, title: title, children: [_jsx(SidebarMethodBadge, { method: method, uppercase: true, methodColors: methodColors }), _jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden", children: [_jsx("span", { className: "min-w-0 flex-1 truncate text-text", children: name }), corrupt ? (_jsx(Badge, { variant: "danger", title: "Stored headers or params JSON for this entry is corrupt", children: "Corrupt" })) : null, isRun && runIcon != null ? (_jsx(FaIcon, { icon: runIcon, className: "h-3.5 w-3.5 shrink-0 text-muted", "aria-hidden": true })) : null] }), !isRun && status != null && statusText != null ? (_jsx(SidebarStatusDot, { className: statusDotClass(status), visible: statusDotVisible, title: `${status} ${statusText}`, srOnlyLabel: `${status} ${statusText}` })) : null] }) }));
21
22
  }
@@ -49,16 +49,16 @@ export declare function statusDotClass(status: number): string;
49
49
  /**
50
50
  * Standard primary button classes for sidebar item label areas.
51
51
  */
52
- export declare const SIDEBAR_ITEM_BUTTON_CLASS = "flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 border-none bg-transparent py-0 text-left text-inherit app-no-drag";
52
+ export declare const SIDEBAR_ITEM_BUTTON_CLASS = "flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 border-none bg-transparent py-0 text-left text-inherit";
53
53
  /**
54
54
  * Tailwind classes for the sortable row drag handle. Hidden until row hover or handle focus.
55
55
  */
56
- export declare const SIDEBAR_DRAG_HANDLE_CLASS = "app-no-drag inline-flex h-4 w-4 shrink-0 cursor-grab items-center justify-center rounded border-none bg-transparent p-0 text-muted opacity-0 hover:text-text focus-visible:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent active:cursor-grabbing group-hover:opacity-100";
56
+ export declare const SIDEBAR_DRAG_HANDLE_CLASS = "inline-flex h-4 w-4 shrink-0 cursor-grab items-center justify-center rounded border-none bg-transparent p-0 text-muted opacity-0 hover:text-text focus-visible:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent active:cursor-grabbing group-hover:opacity-100";
57
57
  /**
58
58
  * Expand/collapse chevron button (collection and folder rows). 16×16 hit target
59
59
  * sized to match Cursor’s file explorer twistie.
60
60
  */
61
- export declare const SIDEBAR_CHEVRON_BUTTON_CLASS = "app-no-drag inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded border-none bg-transparent p-0 text-muted hover:text-text";
61
+ export declare const SIDEBAR_CHEVRON_BUTTON_CLASS = "inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded border-none bg-transparent p-0 text-muted hover:text-text";
62
62
  /**
63
63
  * Expand/collapse chevron glyph size (12×12), forced past Font Awesome's
64
64
  * text-relative dimensions to match Cursor’s explorer carets.
@@ -1 +1 @@
1
- {"version":3,"file":"sidebarItemClasses.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/sidebarItemClasses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;GAEG;AAEH;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,UAAQ,GAAG,MAAM,CAKpE;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CASjD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,UAAO,GAAG,MAAM,CAK5E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,UAAO,GAAG,MAAM,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAMjE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,+HACwF,CAAC;AAE/H;;GAEG;AACH,eAAO,MAAM,yBAAyB,oVAC6S,CAAC;AAEpV;;;GAGG;AACH,eAAO,MAAM,4BAA4B,0JACgH,CAAC;AAE1J;;;GAGG;AACH,eAAO,MAAM,0BAA0B,cAAc,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,kEAC0B,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,kCAAkC,WAAW,CAAC"}
1
+ {"version":3,"file":"sidebarItemClasses.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/sidebarItemClasses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;GAEG;AAEH;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,UAAQ,GAAG,MAAM,CAKpE;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CASjD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,UAAO,GAAG,MAAM,CAK5E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,UAAO,GAAG,MAAM,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAMjE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,mHAC4E,CAAC;AAEnH;;GAEG;AACH,eAAO,MAAM,yBAAyB,wUACiS,CAAC;AAExU;;;GAGG;AACH,eAAO,MAAM,4BAA4B,8IACoG,CAAC;AAE9I;;;GAGG;AACH,eAAO,MAAM,0BAA0B,cAAc,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,kEAC0B,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,kCAAkC,WAAW,CAAC"}
@@ -15,8 +15,8 @@ import { statusDotVariantClass } from '../StatusDot/index.js';
15
15
  export function sourceRow(selected, compact = false) {
16
16
  const py = compact ? 'py-0' : 'py-0.5';
17
17
  return selected
18
- ? `group flex items-center gap-1 rounded-md bg-selection pl-1.5 pr-0 ${py} app-no-drag`
19
- : `group flex items-center gap-1 rounded-md pl-1.5 pr-0 ${py} hover:bg-selection/60 app-no-drag`;
18
+ ? `group flex items-center gap-1 rounded-md bg-selection pl-1.5 pr-0 ${py}`
19
+ : `group flex items-center gap-1 rounded-md pl-1.5 pr-0 ${py} hover:bg-selection/60`;
20
20
  }
21
21
  /**
22
22
  * HTTP method color classes keyed by lowercase method name.
@@ -82,16 +82,16 @@ export function statusDotClass(status) {
82
82
  /**
83
83
  * Standard primary button classes for sidebar item label areas.
84
84
  */
85
- export const SIDEBAR_ITEM_BUTTON_CLASS = 'flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 border-none bg-transparent py-0 text-left text-inherit app-no-drag';
85
+ export const SIDEBAR_ITEM_BUTTON_CLASS = 'flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 border-none bg-transparent py-0 text-left text-inherit';
86
86
  /**
87
87
  * Tailwind classes for the sortable row drag handle. Hidden until row hover or handle focus.
88
88
  */
89
- export const SIDEBAR_DRAG_HANDLE_CLASS = 'app-no-drag inline-flex h-4 w-4 shrink-0 cursor-grab items-center justify-center rounded border-none bg-transparent p-0 text-muted opacity-0 hover:text-text focus-visible:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent active:cursor-grabbing group-hover:opacity-100';
89
+ export const SIDEBAR_DRAG_HANDLE_CLASS = 'inline-flex h-4 w-4 shrink-0 cursor-grab items-center justify-center rounded border-none bg-transparent p-0 text-muted opacity-0 hover:text-text focus-visible:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent active:cursor-grabbing group-hover:opacity-100';
90
90
  /**
91
91
  * Expand/collapse chevron button (collection and folder rows). 16×16 hit target
92
92
  * sized to match Cursor’s file explorer twistie.
93
93
  */
94
- export const SIDEBAR_CHEVRON_BUTTON_CLASS = 'app-no-drag inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded border-none bg-transparent p-0 text-muted hover:text-text';
94
+ export const SIDEBAR_CHEVRON_BUTTON_CLASS = 'inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded border-none bg-transparent p-0 text-muted hover:text-text';
95
95
  /**
96
96
  * Expand/collapse chevron glyph size (12×12), forced past Font Awesome's
97
97
  * text-relative dimensions to match Cursor’s explorer carets.
@@ -59,7 +59,7 @@ function railItemSectionClasses(active) {
59
59
  * @returns Class string for the item button.
60
60
  */
61
61
  function railItemButtonClasses(active, expanded) {
62
- return cn('hc-sidebar-rail-item app-no-drag relative inline-flex min-h-12 w-full shrink-0 cursor-pointer items-center rounded-none border-none bg-transparent py-5', expanded ? 'gap-2 px-3' : 'justify-center', !active && 'hover:bg-sidebar-rail-active', railItemFocusVisible);
62
+ return cn('hc-sidebar-rail-item relative inline-flex min-h-12 w-full shrink-0 cursor-pointer items-center rounded-none border-none bg-transparent py-5', expanded ? 'gap-2 px-3' : 'justify-center', !active && 'hover:bg-sidebar-rail-active', railItemFocusVisible);
63
63
  }
64
64
  /**
65
65
  * Single rail navigation tab: full-width active chrome with an icon button.
@@ -113,10 +113,10 @@ export function SidebarRail({ items, activeId, onSelect, expanded, onExpandedCha
113
113
  }, [expanded, onExpandedChange]);
114
114
  const expandLabel = expanded ? 'Collapse' : 'Expand';
115
115
  const expandAriaLabel = expanded ? 'Collapse sidebar rail' : 'Expand sidebar rail';
116
- return (_jsxs("div", { ...props, className: cn('hc-sidebar-rail app-no-drag flex h-full shrink-0 flex-col bg-sidebar-rail text-sidebar-rail-text', expanded ? 'w-[168px]' : 'w-18', 'transition-[width] duration-200 ease-out motion-reduce:transition-none', className), children: [_jsx("div", { role: "tablist", "aria-orientation": "vertical", "aria-label": ariaLabel, className: "hc-sidebar-rail-items flex min-h-0 flex-1 flex-col items-stretch overflow-x-hidden overflow-y-auto", children: items.flatMap((item, index) => [
116
+ return (_jsxs("div", { ...props, className: cn('hc-sidebar-rail flex h-full shrink-0 flex-col bg-sidebar-rail text-sidebar-rail-text', expanded ? 'w-[168px]' : 'w-18', 'transition-[width] duration-200 ease-out motion-reduce:transition-none', className), children: [_jsx("div", { role: "tablist", "aria-orientation": "vertical", "aria-label": ariaLabel, className: "hc-sidebar-rail-items flex min-h-0 flex-1 flex-col items-stretch overflow-x-hidden overflow-y-auto", children: items.flatMap((item, index) => [
117
117
  _jsx(SidebarRailItem, { item: item, active: item.id === activeId, expanded: expanded, tabIndex: item.id === activeId ? 0 : -1, panelId: panelId, onSelect: () => onSelect(item.id), onKeyDown: (event) => handleItemKeyDown(event, index), buttonRef: (node) => {
118
118
  itemRefs.current[index] = node;
119
119
  } }, item.id),
120
120
  _jsx(SidebarRailSeparator, {}, `${item.id}-separator`)
121
- ]) }), _jsxs("div", { className: "hc-sidebar-rail-footer shrink-0", children: [footer != null ? _jsx("div", { className: "hc-sidebar-rail-footer-content", children: footer }) : null, _jsxs("button", { type: "button", className: cn('hc-sidebar-rail-expand app-no-drag inline-flex min-h-12 w-full cursor-pointer items-center rounded-none border-none bg-transparent py-3 text-sidebar-rail-text', expanded ? 'gap-2 px-3' : 'justify-center', 'hover:bg-sidebar-rail-active', railExpandFocusVisible), "aria-label": expanded ? undefined : expandAriaLabel, "aria-expanded": expanded, title: expandLabel, onClick: handleToggleExpanded, children: [_jsx(FaIcon, { icon: expanded ? faAnglesLeft : faAnglesRight, className: "h-[18px]! w-[18px]!", "aria-hidden": true }), expanded ? _jsx("span", { className: "min-w-0 truncate text-left", children: expandLabel }) : null] })] })] }));
121
+ ]) }), _jsxs("div", { className: "hc-sidebar-rail-footer shrink-0", children: [footer != null ? _jsx("div", { className: "hc-sidebar-rail-footer-content", children: footer }) : null, _jsxs("button", { type: "button", className: cn('hc-sidebar-rail-expand inline-flex min-h-12 w-full cursor-pointer items-center rounded-none border-none bg-transparent py-3 text-sidebar-rail-text', expanded ? 'gap-2 px-3' : 'justify-center', 'hover:bg-sidebar-rail-active', railExpandFocusVisible), "aria-label": expanded ? undefined : expandAriaLabel, "aria-expanded": expanded, title: expandLabel, onClick: handleToggleExpanded, children: [_jsx(FaIcon, { icon: expanded ? faAnglesLeft : faAnglesRight, className: "h-[18px]! w-[18px]!", "aria-hidden": true }), expanded ? _jsx("span", { className: "min-w-0 truncate text-left", children: expandLabel }) : null] })] })] }));
122
122
  }
@@ -17,7 +17,7 @@ const SectionItem = memo(function SectionItem({ forwardedRef, itemRef, state, to
17
17
  const [transitionStyle, panelRef] = useHeightTransition(state);
18
18
  const itemElementRef = useMergeRef(forwardedRef, itemRef);
19
19
  const { status, isMounted, isEnter } = state;
20
- return (_jsxs("div", { ref: itemElementRef, className: "mb-1", children: [_jsxs("div", { className: `hc-sidebar-section-header flex min-h-8 items-center justify-between gap-2 border-b border-sidebar-rail-separator bg-sidebar-section py-1 pl-0.5 ${flushBody ? 'mb-0' : 'mb-1'}`, children: [_jsxs("button", { ...buttonProps, type: "button", className: "app-no-drag inline-flex min-w-0 flex-1 cursor-pointer items-center gap-2.5 border-none bg-transparent p-0 text-left", children: [_jsx("span", { className: SIDEBAR_CHEVRON_SLOT_CLASS, children: _jsx(FaIcon, { icon: isEnter ? faChevronDown : faChevronRight, className: `${SIDEBAR_CHEVRON_ICON_CLASS} text-sidebar-section-text` }) }), _jsx("h2", { tabIndex: -1, className: "hc-sidebar-section-label m-0 text-[15px] leading-none font-medium tracking-wide text-sidebar-section-text uppercase", children: title })] }), (headerActions || onAdd) && (_jsxs("div", { className: "hc-sidebar-section-header-actions flex shrink-0 items-center gap-1", children: [headerActions, onAdd ? (_jsx("button", { type: "button", className: "hc-sidebar-add-button app-no-drag inline-flex shrink-0 cursor-pointer items-center justify-center border-none bg-transparent text-muted hover:bg-selection hover:text-text focus-visible:bg-selection focus-visible:text-text", title: addLabel ?? 'Add', "aria-label": addLabel ?? 'Add', onClick: onAdd, children: _jsx(FaIcon, { icon: faPlus, className: "h-3.5 w-3.5" }) })) : null] }))] }), isMounted ? (_jsx("div", { style: {
20
+ return (_jsxs("div", { ref: itemElementRef, className: "mb-1", children: [_jsxs("div", { className: `hc-sidebar-section-header flex min-h-8 items-center justify-between gap-2 border-b border-sidebar-rail-separator bg-sidebar-section py-1 pl-0.5 ${flushBody ? 'mb-0' : 'mb-1'}`, children: [_jsxs("button", { ...buttonProps, type: "button", className: "inline-flex min-w-0 flex-1 cursor-pointer items-center gap-2.5 border-none bg-transparent p-0 text-left", children: [_jsx("span", { className: SIDEBAR_CHEVRON_SLOT_CLASS, children: _jsx(FaIcon, { icon: isEnter ? faChevronDown : faChevronRight, className: `${SIDEBAR_CHEVRON_ICON_CLASS} text-sidebar-section-text` }) }), _jsx("h2", { tabIndex: -1, className: "hc-sidebar-section-label m-0 text-[15px] leading-none font-medium tracking-wide text-sidebar-section-text uppercase", children: title })] }), (headerActions || onAdd) && (_jsxs("div", { className: "hc-sidebar-section-header-actions flex shrink-0 items-center gap-1", children: [headerActions, onAdd ? (_jsx("button", { type: "button", className: "hc-sidebar-add-button inline-flex shrink-0 cursor-pointer items-center justify-center border-none bg-transparent text-muted hover:bg-selection hover:text-text focus-visible:bg-selection focus-visible:text-text", title: addLabel ?? 'Add', "aria-label": addLabel ?? 'Add', onClick: onAdd, children: _jsx(FaIcon, { icon: faPlus, className: "h-3.5 w-3.5" }) })) : null] }))] }), isMounted ? (_jsx("div", { style: {
21
21
  display: status === 'exited' ? 'none' : undefined,
22
22
  ...transitionStyle
23
23
  }, className: "transition-[height] duration-200 ease-out motion-reduce:transition-none", children: _jsx("div", { ...panelProps, ref: panelRef, children: children }) })) : null] }));
@@ -131,7 +131,7 @@ export function SortMenu({ anchorRef, options, value, ariaLabel = 'Sort', onSele
131
131
  if (position == null) {
132
132
  return null;
133
133
  }
134
- return portalToBody(_jsx("div", { ref: listboxRef, id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "hc-sort-menu-listbox app-no-drag fixed z-50 max-h-[280px] overflow-y-auto rounded-md border border-separator bg-surface py-1 shadow-md", style: { top: position.y, left: position.x, width: LISTBOX_WIDTH_PX }, onKeyDown: handleListboxKeyDown, children: options.map((option, index) => (_jsx(SortMenuOption, { label: option.label, selected: option.id === value, focused: index === focusedIndex, optionRef: (element) => {
134
+ return portalToBody(_jsx("div", { ref: listboxRef, id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "hc-sort-menu-listbox fixed z-50 max-h-[280px] overflow-y-auto rounded-md border border-separator bg-surface py-1 shadow-md", style: { top: position.y, left: position.x, width: LISTBOX_WIDTH_PX }, onKeyDown: handleListboxKeyDown, children: options.map((option, index) => (_jsx(SortMenuOption, { label: option.label, selected: option.id === value, focused: index === focusedIndex, optionRef: (element) => {
135
135
  optionRefs.current[index] = element;
136
136
  }, onSelect: () => onSelect(option.id) }, option.id))) }));
137
137
  }
@@ -11,7 +11,7 @@ import { FaIcon } from '../FaIcon/index.js';
11
11
  * @param onSelect - Called when the option is activated.
12
12
  */
13
13
  export function SortMenuOption({ label, selected, focused, optionRef, onSelect }) {
14
- return (_jsxs("button", { ref: optionRef, type: "button", role: "option", "aria-selected": selected, tabIndex: focused ? 0 : -1, className: "app-no-drag flex w-full cursor-pointer items-center gap-2 border-none bg-transparent px-3.5 py-1.5 text-left text-[14px] text-text hover:bg-selection", onClick: (event) => {
14
+ return (_jsxs("button", { ref: optionRef, type: "button", role: "option", "aria-selected": selected, tabIndex: focused ? 0 : -1, className: "flex w-full cursor-pointer items-center gap-2 border-none bg-transparent px-3.5 py-1.5 text-left text-[14px] text-text hover:bg-selection", onClick: (event) => {
15
15
  event.stopPropagation();
16
16
  onSelect();
17
17
  }, children: [_jsx("span", { className: "inline-flex w-4 shrink-0 justify-center", "aria-hidden": true, children: selected ? _jsx(FaIcon, { icon: faCheck, className: "h-3 w-3" }) : null }), _jsx("span", { className: "min-w-0 truncate", children: label })] }));
@@ -30,7 +30,7 @@ export function TabBarShell({ item, tabIndex, sortableId, sortableDisabled = fal
30
30
  : (event) => {
31
31
  event.preventDefault();
32
32
  onContextMenu?.(item.id, event);
33
- }, onKeyDown: exiting ? undefined : handleTabKeyDown, ...(sortableDisabled || exiting ? {} : listeners), children: [_jsx("span", { className: "app-no-drag flex min-w-0 flex-1 items-center gap-1.5 py-2 text-inherit", children: item.content }), !exiting && (_jsx("span", { className: "app-no-drag flex shrink-0 items-center self-center", onPointerDown: (event) => event.stopPropagation(), children: _jsx(TabCloseButton, { ariaLabel: item.closeAccessibleName, title: item.closeAccessibleName, tabIndex: 0, onClick: (event) => {
33
+ }, onKeyDown: exiting ? undefined : handleTabKeyDown, ...(sortableDisabled || exiting ? {} : listeners), children: [_jsx("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 py-2 text-inherit", children: item.content }), !exiting && (_jsx("span", { className: "flex shrink-0 items-center self-center", onPointerDown: (event) => event.stopPropagation(), children: _jsx(TabCloseButton, { ariaLabel: item.closeAccessibleName, title: item.closeAccessibleName, tabIndex: 0, onClick: (event) => {
34
34
  event.stopPropagation();
35
35
  onClose(item.id);
36
36
  } }) }))] }));
@@ -104,7 +104,7 @@ export function TabContextMenu({ groups, position, onClose, ariaLabel = 'Tab act
104
104
  if (flatItems.length === 0) {
105
105
  return null;
106
106
  }
107
- return portalToBody(_jsx("div", { ref: menuRef, role: "menu", "aria-label": ariaLabel, className: "hc-tab-context-menu app-no-drag fixed z-[70] min-w-[200px] rounded-md border border-separator bg-surface py-1 shadow-md", style: { left: clampedPosition.x, top: clampedPosition.y }, onKeyDown: handleMenuKeyDown, children: groups.map((group, groupIndex) => {
107
+ return portalToBody(_jsx("div", { ref: menuRef, role: "menu", "aria-label": ariaLabel, className: "hc-tab-context-menu fixed z-[70] min-w-[200px] rounded-md border border-separator bg-surface py-1 shadow-md", style: { left: clampedPosition.x, top: clampedPosition.y }, onKeyDown: handleMenuKeyDown, children: groups.map((group, groupIndex) => {
108
108
  let flatIndex = groups
109
109
  .slice(0, groupIndex)
110
110
  .reduce((count, groupItems) => count + groupItems.length, 0);