@harborclient/sdk 1.1.5 → 1.1.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 (64) hide show
  1. package/dist/components/Scrollbars/index.d.ts +34 -0
  2. package/dist/components/Scrollbars/index.d.ts.map +1 -0
  3. package/dist/components/Scrollbars/index.js +69 -0
  4. package/dist/components/Sidebar/index.d.ts +75 -0
  5. package/dist/components/Sidebar/index.d.ts.map +1 -0
  6. package/dist/components/Sidebar/index.js +27 -0
  7. package/dist/components/SidebarItem/SidebarColorDot.d.ts +22 -0
  8. package/dist/components/SidebarItem/SidebarColorDot.d.ts.map +1 -0
  9. package/dist/components/SidebarItem/SidebarColorDot.js +11 -0
  10. package/dist/components/SidebarItem/SidebarCommitItem.d.ts +31 -0
  11. package/dist/components/SidebarItem/SidebarCommitItem.d.ts.map +1 -0
  12. package/dist/components/SidebarItem/SidebarCommitItem.js +9 -0
  13. package/dist/components/SidebarItem/SidebarEnvironmentItem.d.ts +70 -0
  14. package/dist/components/SidebarItem/SidebarEnvironmentItem.d.ts.map +1 -0
  15. package/dist/components/SidebarItem/SidebarEnvironmentItem.js +21 -0
  16. package/dist/components/SidebarItem/SidebarFolderItem.d.ts +69 -0
  17. package/dist/components/SidebarItem/SidebarFolderItem.d.ts.map +1 -0
  18. package/dist/components/SidebarItem/SidebarFolderItem.js +21 -0
  19. package/dist/components/SidebarItem/SidebarHistoryItem.d.ts +58 -0
  20. package/dist/components/SidebarItem/SidebarHistoryItem.d.ts.map +1 -0
  21. package/dist/components/SidebarItem/SidebarHistoryItem.js +12 -0
  22. package/dist/components/SidebarItem/SidebarItem.d.ts +63 -0
  23. package/dist/components/SidebarItem/SidebarItem.d.ts.map +1 -0
  24. package/dist/components/SidebarItem/SidebarItem.js +17 -0
  25. package/dist/components/SidebarItem/SidebarMethodBadge.d.ts +17 -0
  26. package/dist/components/SidebarItem/SidebarMethodBadge.d.ts.map +1 -0
  27. package/dist/components/SidebarItem/SidebarMethodBadge.js +11 -0
  28. package/dist/components/SidebarItem/SidebarRequestItem.d.ts +143 -0
  29. package/dist/components/SidebarItem/SidebarRequestItem.d.ts.map +1 -0
  30. package/dist/components/SidebarItem/SidebarRequestItem.js +22 -0
  31. package/dist/components/SidebarItem/SidebarRunItem.d.ts +57 -0
  32. package/dist/components/SidebarItem/SidebarRunItem.d.ts.map +1 -0
  33. package/dist/components/SidebarItem/SidebarRunItem.js +13 -0
  34. package/dist/components/SidebarItem/SidebarStatusDot.d.ts +17 -0
  35. package/dist/components/SidebarItem/SidebarStatusDot.d.ts.map +1 -0
  36. package/dist/components/SidebarItem/SidebarStatusDot.js +8 -0
  37. package/dist/components/SidebarItem/SidebarStatusMarker.d.ts +21 -0
  38. package/dist/components/SidebarItem/SidebarStatusMarker.d.ts.map +1 -0
  39. package/dist/components/SidebarItem/SidebarStatusMarker.js +8 -0
  40. package/dist/components/SidebarItem/SidebarTabGroupItem.d.ts +51 -0
  41. package/dist/components/SidebarItem/SidebarTabGroupItem.d.ts.map +1 -0
  42. package/dist/components/SidebarItem/SidebarTabGroupItem.js +11 -0
  43. package/dist/components/SidebarItem/SortableSidebarItem.d.ts +35 -0
  44. package/dist/components/SidebarItem/SortableSidebarItem.d.ts.map +1 -0
  45. package/dist/components/SidebarItem/SortableSidebarItem.js +26 -0
  46. package/dist/components/SidebarItem/index.d.ts +16 -0
  47. package/dist/components/SidebarItem/index.d.ts.map +1 -0
  48. package/dist/components/SidebarItem/index.js +15 -0
  49. package/dist/components/SidebarItem/sidebarItemClasses.d.ts +27 -0
  50. package/dist/components/SidebarItem/sidebarItemClasses.d.ts.map +1 -0
  51. package/dist/components/SidebarItem/sidebarItemClasses.js +49 -0
  52. package/dist/components/SidebarItem/stopSortableDragPointerDown.d.ts +8 -0
  53. package/dist/components/SidebarItem/stopSortableDragPointerDown.d.ts.map +1 -0
  54. package/dist/components/SidebarItem/stopSortableDragPointerDown.js +8 -0
  55. package/dist/components/SidebarSection/SidebarSection.d.ts +43 -0
  56. package/dist/components/SidebarSection/SidebarSection.d.ts.map +1 -0
  57. package/dist/components/SidebarSection/SidebarSection.js +25 -0
  58. package/dist/components/SidebarSection/index.d.ts +65 -0
  59. package/dist/components/SidebarSection/index.d.ts.map +1 -0
  60. package/dist/components/SidebarSection/index.js +42 -0
  61. package/dist/components/index.d.ts +4 -0
  62. package/dist/components/index.d.ts.map +1 -1
  63. package/dist/components/index.js +4 -0
  64. package/package.json +7 -1
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
3
+ import { SortableSidebarItem } from './SortableSidebarItem.js';
4
+ import { sourceRow } from './sidebarItemClasses.js';
5
+ import { stopSortableDragPointerDown } from './stopSortableDragPointerDown.js';
6
+ /**
7
+ * Base shell for sidebar list rows. Applies shared row chrome, optional sortable
8
+ * drag behavior, and a trailing actions slot suitable for future Sidebar layout reuse.
9
+ */
10
+ export function SidebarItem({ selected = false, compact = true, sortable, onContextMenu, actions, actionsStopDrag = true, as: Container = 'div', className, children }) {
11
+ const rowClassName = cn('hc-sidebar-item', sourceRow(selected, compact), className);
12
+ const rowContent = (_jsxs(_Fragment, { children: [children, actions != null ? (_jsx("div", { className: "shrink-0", ...(actionsStopDrag ? { onPointerDown: stopSortableDragPointerDown } : {}), children: actions })) : null] }));
13
+ if (sortable != null) {
14
+ return (_jsx(SortableSidebarItem, { id: sortable.id, className: rowClassName, dragHandleLabel: sortable.dragHandleLabel, disabled: sortable.disabled, onRowContextMenu: onContextMenu, children: rowContent }));
15
+ }
16
+ return (_jsx(Container, { className: rowClassName, onContextMenu: onContextMenu, children: rowContent }));
17
+ }
@@ -0,0 +1,17 @@
1
+ import type { JSX } from 'react';
2
+ interface Props {
3
+ /**
4
+ * HTTP method name shown in the badge (e.g. GET, POST).
5
+ */
6
+ method: string;
7
+ /**
8
+ * When true, renders the method in uppercase with medium font weight.
9
+ */
10
+ uppercase?: boolean;
11
+ }
12
+ /**
13
+ * Renders a colored HTTP method badge for sidebar request and history rows.
14
+ */
15
+ export declare function SidebarMethodBadge({ method, uppercase }: Props): JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=SidebarMethodBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarMethodBadge.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarMethodBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,SAAiB,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAYpF"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
3
+ import { METHOD_CLASSES } from './sidebarItemClasses.js';
4
+ /**
5
+ * Renders a colored HTTP method badge for sidebar request and history rows.
6
+ */
7
+ export function SidebarMethodBadge({ method, uppercase = false }) {
8
+ const methodKey = method.toLowerCase();
9
+ const colorClass = METHOD_CLASSES[methodKey] ?? 'text-info';
10
+ return (_jsx("span", { className: cn('shrink-0 px-1 py-px', uppercase && 'font-medium uppercase', colorClass), "aria-hidden": uppercase ? true : undefined, children: method }));
11
+ }
@@ -0,0 +1,143 @@
1
+ import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+ import type { JSX, MouseEvent, ReactNode } from 'react';
3
+ import { type SidebarItemSortableConfig } from './SidebarItem.js';
4
+ interface Props {
5
+ /**
6
+ * HTTP method shown in the leading badge.
7
+ */
8
+ method: string;
9
+ /**
10
+ * Primary label text for the row.
11
+ */
12
+ name: string;
13
+ /**
14
+ * Optional Tailwind classes applied to the name text (e.g. git status colors).
15
+ */
16
+ nameClassName?: string;
17
+ /**
18
+ * Optional color dot configuration for collection sidebar rows.
19
+ */
20
+ colorDot?: {
21
+ color: string | null | undefined;
22
+ visible?: boolean;
23
+ label?: string;
24
+ };
25
+ /**
26
+ * Optional git change status marker shown after the name in git sidebar rows.
27
+ */
28
+ statusMarker?: {
29
+ marker: string;
30
+ className?: string;
31
+ label: string;
32
+ };
33
+ /**
34
+ * Whether this row should use selected/highlighted row styling.
35
+ */
36
+ selected?: boolean;
37
+ /**
38
+ * Optional dnd-kit sortable configuration.
39
+ */
40
+ sortable?: SidebarItemSortableConfig;
41
+ /**
42
+ * Called when the user right-clicks the row container.
43
+ */
44
+ onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
45
+ /**
46
+ * Called when the primary label button is clicked.
47
+ */
48
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
49
+ /**
50
+ * Accessible label for the primary button.
51
+ */
52
+ ariaLabel?: string;
53
+ /**
54
+ * When true, sets aria-current="true" on the primary button.
55
+ */
56
+ ariaCurrent?: boolean;
57
+ /**
58
+ * When true, sets aria-selected="true" on the primary button.
59
+ */
60
+ ariaSelected?: boolean;
61
+ /**
62
+ * Trailing actions slot, typically a row actions menu.
63
+ */
64
+ actions?: ReactNode;
65
+ /**
66
+ * HTML element for the row container when not sortable.
67
+ */
68
+ as?: 'div' | 'li';
69
+ }
70
+ /**
71
+ * Renders a saved-request sidebar row with method badge, optional color dot or git
72
+ * status marker, and shared row chrome. Used in both Collections and Git sidebars.
73
+ */
74
+ export declare function SidebarRequestItem({ method, name, nameClassName, colorDot, statusMarker, selected, sortable, onContextMenu, onClick, ariaLabel, ariaCurrent, ariaSelected, actions, as }: Props): JSX.Element;
75
+ interface DocumentProps {
76
+ /**
77
+ * Icon shown before the document name. Defaults to a file-lines icon when omitted.
78
+ */
79
+ icon?: IconDefinition;
80
+ /**
81
+ * Primary label text for the row.
82
+ */
83
+ name: string;
84
+ /**
85
+ * Optional Tailwind classes applied to the name text (e.g. git status colors).
86
+ */
87
+ nameClassName?: string;
88
+ /**
89
+ * Optional color dot configuration for collection sidebar rows.
90
+ */
91
+ colorDot?: {
92
+ color: string | null | undefined;
93
+ visible?: boolean;
94
+ label?: string;
95
+ };
96
+ /**
97
+ * Optional git change status marker shown after the name in git sidebar rows.
98
+ */
99
+ statusMarker?: {
100
+ marker: string;
101
+ className?: string;
102
+ label: string;
103
+ };
104
+ /**
105
+ * Whether this row should use selected/highlighted row styling.
106
+ */
107
+ selected?: boolean;
108
+ /**
109
+ * Called when the user right-clicks the row container.
110
+ */
111
+ onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
112
+ /**
113
+ * Called when the primary label button is clicked.
114
+ */
115
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
116
+ /**
117
+ * Called when the primary label button is double-clicked.
118
+ */
119
+ onDoubleClick?: (event: MouseEvent<HTMLButtonElement>) => void;
120
+ /**
121
+ * Accessible label for the primary button.
122
+ */
123
+ ariaLabel?: string;
124
+ /**
125
+ * When true, sets aria-current="true" on the primary button.
126
+ */
127
+ ariaCurrent?: boolean;
128
+ /**
129
+ * Trailing actions slot, typically a row actions menu.
130
+ */
131
+ actions?: ReactNode;
132
+ /**
133
+ * HTML element for the row container.
134
+ */
135
+ as?: 'div' | 'li';
136
+ }
137
+ /**
138
+ * Renders a markdown document sidebar row with file icon, optional color dot or git
139
+ * status marker, and shared row chrome. Used in both Collections and Git sidebars.
140
+ */
141
+ export declare function SidebarDocumentItem({ icon, name, nameClassName, colorDot, statusMarker, selected, onContextMenu, onClick, onDoubleClick, ariaLabel, ariaCurrent, actions, as }: DocumentProps): JSX.Element;
142
+ export {};
143
+ //# sourceMappingURL=SidebarRequestItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarRequestItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarRequestItem.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
+ import { faFileLines } from '@fortawesome/free-solid-svg-icons';
3
+ import { FaIcon } from '../FaIcon/index.js';
4
+ import { SidebarColorDot } from './SidebarColorDot.js';
5
+ import { SidebarItem } from './SidebarItem.js';
6
+ import { SidebarMethodBadge } from './SidebarMethodBadge.js';
7
+ import { SidebarStatusMarker } from './SidebarStatusMarker.js';
8
+ import { SIDEBAR_ITEM_BUTTON_CLASS } from './sidebarItemClasses.js';
9
+ /**
10
+ * Renders a saved-request sidebar row with method badge, optional color dot or git
11
+ * status marker, and shared row chrome. Used in both Collections and Git sidebars.
12
+ */
13
+ export function SidebarRequestItem({ method, name, nameClassName, colorDot, statusMarker, selected = false, sortable, onContextMenu, onClick, ariaLabel, ariaCurrent = false, ariaSelected = false, actions, as = 'div' }) {
14
+ return (_jsx(SidebarItem, { selected: selected, sortable: sortable, onContextMenu: onContextMenu, actions: actions, as: as, children: _jsxs("button", { type: "button", className: SIDEBAR_ITEM_BUTTON_CLASS, "aria-current": ariaCurrent ? 'true' : undefined, "aria-selected": ariaSelected ? 'true' : undefined, "aria-label": ariaLabel, onClick: onClick, children: [_jsx(SidebarMethodBadge, { method: method }), colorDot != null ? (_jsxs("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [_jsx("span", { className: `min-w-0 truncate ${nameClassName ?? ''}`, children: name }), _jsx(SidebarColorDot, { color: colorDot.color, visible: colorDot.visible, label: colorDot.label })] })) : (_jsx("span", { className: `min-w-0 truncate ${nameClassName ?? ''}`, children: name })), statusMarker != null ? (_jsx(SidebarStatusMarker, { marker: statusMarker.marker, className: statusMarker.className, label: statusMarker.label })) : null] }) }));
15
+ }
16
+ /**
17
+ * Renders a markdown document sidebar row with file icon, optional color dot or git
18
+ * status marker, and shared row chrome. Used in both Collections and Git sidebars.
19
+ */
20
+ export function SidebarDocumentItem({ icon = faFileLines, name, nameClassName, colorDot, statusMarker, selected = false, onContextMenu, onClick, onDoubleClick, ariaLabel, ariaCurrent = false, actions, as = 'div' }) {
21
+ return (_jsx(SidebarItem, { selected: selected, onContextMenu: onContextMenu, actions: actions, as: as, children: _jsxs("button", { type: "button", className: SIDEBAR_ITEM_BUTTON_CLASS, "aria-current": ariaCurrent ? 'true' : undefined, "aria-label": ariaLabel, onClick: onClick, onDoubleClick: onDoubleClick, children: [_jsx(FaIcon, { icon: icon, className: "h-3.5 w-3.5 shrink-0 text-muted", "aria-hidden": true }), colorDot != null ? (_jsxs("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [_jsx("span", { className: `min-w-0 truncate ${nameClassName ?? ''}`, children: name }), _jsx(SidebarColorDot, { color: colorDot.color, visible: colorDot.visible, label: colorDot.label })] })) : (_jsx("span", { className: `min-w-0 truncate ${nameClassName ?? ''}`, children: name })), statusMarker != null ? (_jsx(SidebarStatusMarker, { marker: statusMarker.marker, className: statusMarker.className, label: statusMarker.label })) : null] }) }));
22
+ }
@@ -0,0 +1,57 @@
1
+ import type { JSX, MouseEvent, ReactNode } from 'react';
2
+ interface Props {
3
+ /**
4
+ * Optional HTTP method shown in the leading badge.
5
+ */
6
+ method?: string;
7
+ /**
8
+ * Primary label text for the saved run row.
9
+ */
10
+ label: string;
11
+ /**
12
+ * Optional connection badge text (e.g. storage location name).
13
+ */
14
+ connectionBadge?: string;
15
+ /**
16
+ * Tailwind background color class for the pass/fail status dot.
17
+ */
18
+ statusDotClassName: string;
19
+ /**
20
+ * Screen-reader text describing the run summary status.
21
+ */
22
+ statusSummary: string;
23
+ /**
24
+ * Whether this row is part of a multi-selection.
25
+ */
26
+ selected?: boolean;
27
+ /**
28
+ * Tooltip title for the primary button.
29
+ */
30
+ title?: string;
31
+ /**
32
+ * Accessible label for the primary button.
33
+ */
34
+ ariaLabel: string;
35
+ /**
36
+ * Called when the user right-clicks the row container.
37
+ */
38
+ onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
39
+ /**
40
+ * Called when the primary row button is clicked.
41
+ */
42
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
43
+ /**
44
+ * Trailing actions slot, typically a row actions menu.
45
+ */
46
+ actions?: ReactNode;
47
+ /**
48
+ * Optional data attribute value for keyboard navigation focus targets.
49
+ */
50
+ dataSidebarRunResultId?: string | number;
51
+ }
52
+ /**
53
+ * Renders a saved run result row in the Collections sidebar Runs section.
54
+ */
55
+ export declare function SidebarRunItem({ method, label, connectionBadge, statusDotClassName, statusSummary, selected, title, ariaLabel, onContextMenu, onClick, actions, dataSidebarRunResultId }: Props): JSX.Element;
56
+ export {};
57
+ //# sourceMappingURL=SidebarRunItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarRunItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarRunItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMxD,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;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,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAEzD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,QAAgB,EAChB,KAAK,EACL,SAAS,EACT,aAAa,EACb,OAAO,EACP,OAAO,EACP,sBAAsB,EACvB,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA8BrB"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
+ import { Button } from '../Button/index.js';
3
+ import { SidebarItem } from './SidebarItem.js';
4
+ import { SidebarMethodBadge } from './SidebarMethodBadge.js';
5
+ import { SidebarStatusDot } from './SidebarStatusDot.js';
6
+ /**
7
+ * Renders a saved run result row in the Collections sidebar Runs section.
8
+ */
9
+ export function SidebarRunItem({ method, label, connectionBadge, statusDotClassName, statusSummary, selected = false, title, ariaLabel, onContextMenu, onClick, actions, dataSidebarRunResultId }) {
10
+ return (_jsx(SidebarItem, { selected: selected, onContextMenu: onContextMenu, actions: actions, children: _jsxs(Button, { variant: "toolbar", className: "flex min-w-0 flex-1 items-center gap-2 py-0.5 text-left text-text hover:bg-transparent", ...(dataSidebarRunResultId != null
11
+ ? { 'data-sidebar-run-result-id': String(dataSidebarRunResultId) }
12
+ : {}), title: title, "aria-label": ariaLabel, "aria-selected": selected ? 'true' : undefined, onClick: onClick, children: [method != null && method !== '' ? _jsx(SidebarMethodBadge, { method: method, uppercase: true }) : null, _jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [_jsx("span", { className: "min-w-0 truncate text-text", children: label }), connectionBadge != null ? (_jsx("span", { className: "shrink-0 rounded bg-info/15 px-1.5 py-0.5 text-[14px] font-medium text-info", title: `Stored in ${connectionBadge}`, children: connectionBadge })) : null] }), _jsx(SidebarStatusDot, { className: statusDotClassName, srOnlyLabel: statusSummary })] }) }));
13
+ }
@@ -0,0 +1,17 @@
1
+ import type { JSX } from 'react';
2
+ interface Props {
3
+ /**
4
+ * Tailwind background color class for the dot (e.g. from {@link statusDotClass}).
5
+ */
6
+ className: string;
7
+ /**
8
+ * Screen-reader text describing the status when a visible label is not shown.
9
+ */
10
+ srOnlyLabel?: string;
11
+ }
12
+ /**
13
+ * Renders a small circular status indicator with optional screen-reader text.
14
+ */
15
+ export declare function SidebarStatusDot({ className, srOnlyLabel }: Props): JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=SidebarStatusDot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarStatusDot.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarStatusDot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,UAAU,KAAK;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAU/E"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
3
+ /**
4
+ * Renders a small circular status indicator with optional screen-reader text.
5
+ */
6
+ export function SidebarStatusDot({ className, srOnlyLabel }) {
7
+ return (_jsxs("span", { className: "flex shrink-0 items-center gap-1.5", children: [_jsx("span", { className: cn('inline-block h-2 w-2 shrink-0 rounded-full', className), "aria-hidden": "true" }), srOnlyLabel != null ? _jsx("span", { className: "sr-only", children: srOnlyLabel }) : null] }));
8
+ }
@@ -0,0 +1,21 @@
1
+ import type { JSX } from 'react';
2
+ interface Props {
3
+ /**
4
+ * Bracket marker text (e.g. A, M, D, C).
5
+ */
6
+ marker: string;
7
+ /**
8
+ * Tailwind classes applied to the marker text.
9
+ */
10
+ className?: string;
11
+ /**
12
+ * Tooltip and accessible name for the marker.
13
+ */
14
+ label: string;
15
+ }
16
+ /**
17
+ * Renders a git change status marker in square brackets after a file name.
18
+ */
19
+ export declare function SidebarStatusMarker({ marker, className, label }: Props): JSX.Element;
20
+ export {};
21
+ //# sourceMappingURL=SidebarStatusMarker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarStatusMarker.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarStatusMarker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAMpF"}
@@ -0,0 +1,8 @@
1
+ import { jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
3
+ /**
4
+ * Renders a git change status marker in square brackets after a file name.
5
+ */
6
+ export function SidebarStatusMarker({ marker, className, label }) {
7
+ return (_jsxs("span", { className: cn('shrink-0', className), title: label, "aria-label": label, children: ["[", marker, "]"] }));
8
+ }
@@ -0,0 +1,51 @@
1
+ import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+ import type { JSX, MouseEvent, ReactNode } from 'react';
3
+ import { type SidebarItemSortableConfig } from './SidebarItem.js';
4
+ interface Props {
5
+ /**
6
+ * Tab group display name.
7
+ */
8
+ name: string;
9
+ /**
10
+ * Summary text for tab count (e.g. "3 tabs").
11
+ */
12
+ summary: string;
13
+ /**
14
+ * Icon shown before the tab group name.
15
+ */
16
+ icon: IconDefinition;
17
+ /**
18
+ * Optional color dot beside the tab group name.
19
+ */
20
+ colorDot?: {
21
+ color: string | null | undefined;
22
+ visible?: boolean;
23
+ label?: string;
24
+ };
25
+ /**
26
+ * Whether this row is part of a multi-selection.
27
+ */
28
+ selected?: boolean;
29
+ /**
30
+ * dnd-kit sortable configuration for tab group reordering.
31
+ */
32
+ sortable?: SidebarItemSortableConfig;
33
+ /**
34
+ * Called when the user right-clicks the row container.
35
+ */
36
+ onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
37
+ /**
38
+ * Called when the primary row button is clicked.
39
+ */
40
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
41
+ /**
42
+ * Trailing actions slot, typically a row actions menu.
43
+ */
44
+ actions?: ReactNode;
45
+ }
46
+ /**
47
+ * Renders a tab group row in the Collections sidebar Tab Groups section.
48
+ */
49
+ export declare function SidebarTabGroupItem({ name, summary, icon, colorDot, selected, sortable, onContextMenu, onClick, actions }: Props): JSX.Element;
50
+ export {};
51
+ //# sourceMappingURL=SidebarTabGroupItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarTabGroupItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarTabGroupItem.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;AAIxD,OAAO,EAAe,KAAK,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,UAAU,KAAK;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;QACjC,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IAErC;;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,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAEzD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,QAAgB,EAChB,QAAQ,EACR,aAAa,EACb,OAAO,EACP,OAAO,EACR,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA6BrB"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
+ import { Button } from '../Button/index.js';
3
+ import { FaIcon } from '../FaIcon/index.js';
4
+ import { SidebarColorDot } from './SidebarColorDot.js';
5
+ import { SidebarItem } from './SidebarItem.js';
6
+ /**
7
+ * Renders a tab group row in the Collections sidebar Tab Groups section.
8
+ */
9
+ export function SidebarTabGroupItem({ name, summary, icon, colorDot, selected = false, sortable, onContextMenu, onClick, actions }) {
10
+ return (_jsx(SidebarItem, { selected: selected, sortable: sortable, onContextMenu: onContextMenu, actions: actions, children: _jsxs(Button, { variant: "toolbar", className: "min-w-0 flex-1 justify-start gap-2 rounded-md px-2 py-1 text-left text-text hover:bg-transparent", "aria-selected": selected ? 'true' : undefined, onClick: onClick, children: [_jsx(FaIcon, { icon: icon, className: "h-3.5 w-3.5 shrink-0 text-muted", "aria-hidden": true }), _jsxs("span", { className: "inline-flex min-w-0 flex-1 items-center gap-1.5", children: [_jsx("span", { className: "min-w-0 truncate", children: name }), colorDot != null ? (_jsx(SidebarColorDot, { color: colorDot.color, visible: colorDot.visible, label: colorDot.label })) : null] }), _jsx("span", { className: "shrink-0 text-muted", children: summary })] }) }));
11
+ }
@@ -0,0 +1,35 @@
1
+ import type { JSX, MouseEvent, ReactNode } from 'react';
2
+ interface Props {
3
+ /**
4
+ * Stable dnd-kit sortable id for this row.
5
+ */
6
+ id: string;
7
+ /**
8
+ * Row container class names.
9
+ */
10
+ className: string;
11
+ /**
12
+ * Accessible name for the drag handle (e.g. "Reorder collection \"API\"").
13
+ */
14
+ dragHandleLabel: string;
15
+ /**
16
+ * Row contents, typically label and action controls.
17
+ */
18
+ children: ReactNode;
19
+ /**
20
+ * When true, renders a static row without drag-and-drop behavior.
21
+ */
22
+ disabled?: boolean;
23
+ /**
24
+ * Called when the user right-clicks the row container.
25
+ */
26
+ onRowContextMenu?: (event: MouseEvent<HTMLElement>) => void;
27
+ }
28
+ /**
29
+ * Wraps a sidebar row with dnd-kit sortable drag behavior. The row itself is
30
+ * the drag activator; nested controls should call
31
+ * {@link stopSortableDragPointerDown} so expand and menu actions do not start a drag.
32
+ */
33
+ export declare function SortableSidebarItem({ id, className, dragHandleLabel, children, disabled, onRowContextMenu }: Props): JSX.Element;
34
+ export {};
35
+ //# sourceMappingURL=SortableSidebarItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortableSidebarItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SortableSidebarItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvE,UAAU,KAAK;IACb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CAC7D;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,EAAE,EACF,SAAS,EACT,eAAe,EACf,QAAQ,EACR,QAAgB,EAChB,gBAAgB,EACjB,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA8CrB"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { useSortable } from '@dnd-kit/sortable';
3
+ import { CSS } from '@dnd-kit/utilities';
4
+ /**
5
+ * Wraps a sidebar row with dnd-kit sortable drag behavior. The row itself is
6
+ * the drag activator; nested controls should call
7
+ * {@link stopSortableDragPointerDown} so expand and menu actions do not start a drag.
8
+ */
9
+ export function SortableSidebarItem({ id, className, dragHandleLabel, children, disabled = false, onRowContextMenu }) {
10
+ const { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging } = useSortable({ id, disabled });
11
+ if (disabled) {
12
+ return (_jsx("div", { className: className, onContextMenu: onRowContextMenu, children: children }));
13
+ }
14
+ const style = {
15
+ transform: CSS.Transform.toString(transform),
16
+ transition: isDragging ? transition : undefined,
17
+ opacity: isDragging ? 0.45 : undefined
18
+ };
19
+ const { role, tabIndex, ...sortableAttributes } = attributes;
20
+ void role;
21
+ void tabIndex;
22
+ return (_jsx("div", { ref: (node) => {
23
+ setNodeRef(node);
24
+ setActivatorNodeRef(node);
25
+ }, style: style, className: `${className} cursor-grab active:cursor-grabbing`, "aria-label": dragHandleLabel, tabIndex: -1, onContextMenu: onRowContextMenu, ...sortableAttributes, ...listeners, children: children }));
26
+ }
@@ -0,0 +1,16 @@
1
+ export { SidebarItem, type SidebarItemSortableConfig } from './SidebarItem.js';
2
+ export { SortableSidebarItem } from './SortableSidebarItem.js';
3
+ export { stopSortableDragPointerDown } from './stopSortableDragPointerDown.js';
4
+ export { SidebarColorDot } from './SidebarColorDot.js';
5
+ export { sourceRow, METHOD_CLASSES, statusDotClass, SIDEBAR_ITEM_BUTTON_CLASS } from './sidebarItemClasses.js';
6
+ export { SidebarMethodBadge } from './SidebarMethodBadge.js';
7
+ export { SidebarStatusDot } from './SidebarStatusDot.js';
8
+ export { SidebarStatusMarker } from './SidebarStatusMarker.js';
9
+ export { SidebarRequestItem, SidebarDocumentItem } from './SidebarRequestItem.js';
10
+ export { SidebarFolderItem } from './SidebarFolderItem.js';
11
+ export { SidebarRunItem } from './SidebarRunItem.js';
12
+ export { SidebarHistoryItem } from './SidebarHistoryItem.js';
13
+ export { SidebarEnvironmentItem } from './SidebarEnvironmentItem.js';
14
+ export { SidebarTabGroupItem } from './SidebarTabGroupItem.js';
15
+ export { SidebarCommitItem } from './SidebarCommitItem.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,SAAS,EACT,cAAc,EACd,cAAc,EACd,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,15 @@
1
+ export { SidebarItem } from './SidebarItem.js';
2
+ export { SortableSidebarItem } from './SortableSidebarItem.js';
3
+ export { stopSortableDragPointerDown } from './stopSortableDragPointerDown.js';
4
+ export { SidebarColorDot } from './SidebarColorDot.js';
5
+ export { sourceRow, METHOD_CLASSES, statusDotClass, SIDEBAR_ITEM_BUTTON_CLASS } from './sidebarItemClasses.js';
6
+ export { SidebarMethodBadge } from './SidebarMethodBadge.js';
7
+ export { SidebarStatusDot } from './SidebarStatusDot.js';
8
+ export { SidebarStatusMarker } from './SidebarStatusMarker.js';
9
+ export { SidebarRequestItem, SidebarDocumentItem } from './SidebarRequestItem.js';
10
+ export { SidebarFolderItem } from './SidebarFolderItem.js';
11
+ export { SidebarRunItem } from './SidebarRunItem.js';
12
+ export { SidebarHistoryItem } from './SidebarHistoryItem.js';
13
+ export { SidebarEnvironmentItem } from './SidebarEnvironmentItem.js';
14
+ export { SidebarTabGroupItem } from './SidebarTabGroupItem.js';
15
+ export { SidebarCommitItem } from './SidebarCommitItem.js';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Tailwind classes for sidebar source rows and HTTP method badges.
3
+ */
4
+ /**
5
+ * Tailwind classes for a sidebar source row (collection, folder, request, etc.).
6
+ *
7
+ * @param selected - Whether this row is the active selection.
8
+ * @param compact - When true, uses tighter vertical padding for top-level list rows.
9
+ * @returns Combined Tailwind class string for the row container.
10
+ */
11
+ export declare function sourceRow(selected: boolean, compact?: boolean): string;
12
+ /**
13
+ * HTTP method color classes keyed by lowercase method name.
14
+ */
15
+ export declare const METHOD_CLASSES: Record<string, string>;
16
+ /**
17
+ * Status dot color class for an HTTP response code.
18
+ *
19
+ * @param status - HTTP status code, or 0 for network errors.
20
+ * @returns Tailwind background color class for the status dot.
21
+ */
22
+ export declare function statusDotClass(status: number): string;
23
+ /**
24
+ * Standard primary button classes for sidebar item label areas.
25
+ */
26
+ 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";
27
+ //# sourceMappingURL=sidebarItemClasses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebarItemClasses.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/sidebarItemClasses.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;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,CAQjD,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,+HACwF,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Tailwind classes for sidebar source rows and HTTP method badges.
3
+ */
4
+ /**
5
+ * Tailwind classes for a sidebar source row (collection, folder, request, etc.).
6
+ *
7
+ * @param selected - Whether this row is the active selection.
8
+ * @param compact - When true, uses tighter vertical padding for top-level list rows.
9
+ * @returns Combined Tailwind class string for the row container.
10
+ */
11
+ export function sourceRow(selected, compact = false) {
12
+ const py = compact ? 'py-0' : 'py-0.5';
13
+ return selected
14
+ ? `group flex items-center gap-1 rounded-md bg-selection px-1.5 ${py} app-no-drag`
15
+ : `group flex items-center gap-1 rounded-md px-1.5 ${py} hover:bg-selection/60 app-no-drag`;
16
+ }
17
+ /**
18
+ * HTTP method color classes keyed by lowercase method name.
19
+ */
20
+ export const METHOD_CLASSES = {
21
+ get: 'text-method-get',
22
+ post: 'text-method-post',
23
+ put: 'text-method-put',
24
+ patch: 'text-method-patch',
25
+ delete: 'text-method-delete',
26
+ head: 'text-method-head',
27
+ options: 'text-method-options'
28
+ };
29
+ /**
30
+ * Status dot color class for an HTTP response code.
31
+ *
32
+ * @param status - HTTP status code, or 0 for network errors.
33
+ * @returns Tailwind background color class for the status dot.
34
+ */
35
+ export function statusDotClass(status) {
36
+ if (status === 0)
37
+ return 'bg-danger';
38
+ if (status >= 200 && status < 300)
39
+ return 'bg-success';
40
+ if (status >= 300 && status < 400)
41
+ return 'bg-warning';
42
+ if (status >= 400)
43
+ return 'bg-danger';
44
+ return 'bg-info';
45
+ }
46
+ /**
47
+ * Standard primary button classes for sidebar item label areas.
48
+ */
49
+ 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';
@@ -0,0 +1,8 @@
1
+ import type { PointerEvent as ReactPointerEvent } from 'react';
2
+ /**
3
+ * Stops pointer events from bubbling to the sortable row drag activator.
4
+ *
5
+ * @param event - Pointer event from a nested interactive control.
6
+ */
7
+ export declare function stopSortableDragPointerDown(event: ReactPointerEvent): void;
8
+ //# sourceMappingURL=stopSortableDragPointerDown.d.ts.map