@harborclient/sdk 1.1.14 → 1.1.15

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 (42) hide show
  1. package/dist/components/Breadcrumb/CrumbSegment.d.ts +19 -0
  2. package/dist/components/Breadcrumb/CrumbSegment.d.ts.map +1 -0
  3. package/dist/components/Breadcrumb/CrumbSegment.js +19 -0
  4. package/dist/components/Breadcrumb/EditableSegment.d.ts +46 -0
  5. package/dist/components/Breadcrumb/EditableSegment.d.ts.map +1 -0
  6. package/dist/components/Breadcrumb/EditableSegment.js +14 -0
  7. package/dist/components/Breadcrumb/SegmentShell.d.ts +32 -0
  8. package/dist/components/Breadcrumb/SegmentShell.d.ts.map +1 -0
  9. package/dist/components/Breadcrumb/SegmentShell.js +35 -0
  10. package/dist/components/Breadcrumb/index.d.ts +2 -18
  11. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  12. package/dist/components/Breadcrumb/index.js +2 -61
  13. package/dist/components/Breadcrumb/types.d.ts +18 -0
  14. package/dist/components/Breadcrumb/types.d.ts.map +1 -0
  15. package/dist/components/Breadcrumb/types.js +1 -0
  16. package/dist/components/SidebarItem/SidebarDocumentItem.d.ts +79 -0
  17. package/dist/components/SidebarItem/SidebarDocumentItem.d.ts.map +1 -0
  18. package/dist/components/SidebarItem/SidebarDocumentItem.js +26 -0
  19. package/dist/components/SidebarItem/SidebarRequestItem.d.ts +0 -76
  20. package/dist/components/SidebarItem/SidebarRequestItem.d.ts.map +1 -1
  21. package/dist/components/SidebarItem/SidebarRequestItem.js +0 -21
  22. package/dist/components/SidebarItem/SidebarTree.d.ts +0 -21
  23. package/dist/components/SidebarItem/SidebarTree.d.ts.map +1 -1
  24. package/dist/components/SidebarItem/SidebarTree.js +0 -9
  25. package/dist/components/SidebarItem/SidebarTreeGroup.d.ts +24 -0
  26. package/dist/components/SidebarItem/SidebarTreeGroup.d.ts.map +1 -0
  27. package/dist/components/SidebarItem/SidebarTreeGroup.js +11 -0
  28. package/dist/components/SidebarItem/index.d.ts +4 -2
  29. package/dist/components/SidebarItem/index.d.ts.map +1 -1
  30. package/dist/components/SidebarItem/index.js +4 -2
  31. package/dist/components/SidebarSection/SectionItem.d.ts +40 -0
  32. package/dist/components/SidebarSection/SectionItem.d.ts.map +1 -0
  33. package/dist/components/SidebarSection/SectionItem.js +19 -0
  34. package/dist/components/SidebarSection/SidebarSection.d.ts +2 -38
  35. package/dist/components/SidebarSection/SidebarSection.d.ts.map +1 -1
  36. package/dist/components/SidebarSection/SidebarSection.js +2 -19
  37. package/dist/components/VisibilityMenu/MenuCheckboxItem.d.ts +14 -0
  38. package/dist/components/VisibilityMenu/MenuCheckboxItem.d.ts.map +1 -0
  39. package/dist/components/VisibilityMenu/MenuCheckboxItem.js +14 -0
  40. package/dist/components/VisibilityMenu/index.d.ts.map +1 -1
  41. package/dist/components/VisibilityMenu/index.js +2 -11
  42. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import type { JSX } from 'react';
2
+ import { type SegmentShape } from './SegmentShell.js';
3
+ import type { BreadcrumbSegment } from './types.js';
4
+ interface Props {
5
+ /**
6
+ * Crumb data and optional navigation handler.
7
+ */
8
+ segment: BreadcrumbSegment;
9
+ /**
10
+ * Segment position within the bar.
11
+ */
12
+ shape: SegmentShape;
13
+ }
14
+ /**
15
+ * Renders one leading, non-editable breadcrumb segment.
16
+ */
17
+ export declare function CrumbSegment({ segment, shape }: Props): JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=CrumbSegment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CrumbSegment.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/CrumbSegment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAc,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,UAAU,KAAK;IACb;;OAEG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAE3B;;OAEG;IACH,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAkCnE"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
3
+ import { SegmentShell } from './SegmentShell.js';
4
+ /**
5
+ * Renders one leading, non-editable breadcrumb segment.
6
+ */
7
+ export function CrumbSegment({ segment, shape }) {
8
+ const contentClass = cn('block w-full truncate border-none bg-transparent p-0 text-left', segment.onClick && 'cursor-pointer hover:text-text focus-visible:text-text');
9
+ /**
10
+ * Stops click propagation so breadcrumb navigation does not trigger edit mode.
11
+ *
12
+ * @param event - Mouse event from a breadcrumb segment control.
13
+ */
14
+ const handleClick = (event) => {
15
+ event.stopPropagation();
16
+ segment.onClick?.();
17
+ };
18
+ return (_jsx(SegmentShell, { shape: shape, 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'), onClick: handleClick, children: segment.label })) : (_jsx("span", { className: contentClass, children: segment.label })) }));
19
+ }
@@ -0,0 +1,46 @@
1
+ import type { JSX, RefObject } from 'react';
2
+ import { type SegmentShape } from './SegmentShell.js';
3
+ interface Props {
4
+ /**
5
+ * Current editable value.
6
+ */
7
+ value: string;
8
+ /**
9
+ * Placeholder when the value is empty.
10
+ */
11
+ placeholder: string;
12
+ /**
13
+ * Accessible name for the editable input.
14
+ */
15
+ editableLabel: string;
16
+ /**
17
+ * Whether inline edit mode is active.
18
+ */
19
+ editing: boolean;
20
+ /**
21
+ * Segment position within the bar.
22
+ */
23
+ shape: SegmentShape;
24
+ /**
25
+ * Ref forwarded to the inline input when editing.
26
+ */
27
+ inputRef: RefObject<HTMLInputElement | null>;
28
+ /**
29
+ * Opens inline edit mode for the trailing segment.
30
+ */
31
+ onStartEditing: () => void;
32
+ /**
33
+ * Closes inline edit mode for the trailing segment.
34
+ */
35
+ onStopEditing: () => void;
36
+ /**
37
+ * Called when the editable value changes.
38
+ */
39
+ onValueChange: (value: string) => void;
40
+ }
41
+ /**
42
+ * Renders the trailing breadcrumb segment with click-to-edit behavior.
43
+ */
44
+ export declare function EditableSegment({ value, placeholder, editableLabel, editing, shape, inputRef, onStartEditing, onStopEditing, onValueChange }: Props): JSX.Element;
45
+ export {};
46
+ //# sourceMappingURL=EditableSegment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditableSegment.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/EditableSegment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAEpE,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,YAAY,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAE7C;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,EACL,QAAQ,EACR,cAAc,EACd,aAAa,EACb,aAAa,EACd,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAmCrB"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { Input } from '../forms/index.js';
3
+ import { SegmentShell } from './SegmentShell.js';
4
+ /**
5
+ * Renders the trailing breadcrumb segment with click-to-edit behavior.
6
+ */
7
+ export function EditableSegment({ value, placeholder, editableLabel, editing, shape, inputRef, onStartEditing, onStopEditing, onValueChange }) {
8
+ return (_jsx(SegmentShell, { shape: shape, 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) => {
9
+ if (event.key === 'Enter' || event.key === 'Escape') {
10
+ event.preventDefault();
11
+ onStopEditing();
12
+ }
13
+ } })) : (_jsx("button", { type: "button", "aria-current": "page", "aria-label": editableLabel, className: "app-no-drag flex 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 }) }) })) }));
14
+ }
@@ -0,0 +1,32 @@
1
+ import type { JSX, ReactNode } from 'react';
2
+ /**
3
+ * Shape position within the interlocking breadcrumb bar.
4
+ */
5
+ export type SegmentShape = 'first' | 'middle' | 'last' | 'only';
6
+ /**
7
+ * Shared shell classes and clip-path styling for one breadcrumb segment.
8
+ */
9
+ interface Props {
10
+ /**
11
+ * Segment position within the bar.
12
+ */
13
+ shape: SegmentShape;
14
+ /**
15
+ * When true, the segment grows to fill remaining horizontal space.
16
+ */
17
+ grow?: boolean;
18
+ /**
19
+ * Additional classes merged onto the segment shell.
20
+ */
21
+ className?: string;
22
+ /**
23
+ * Segment contents.
24
+ */
25
+ children: ReactNode;
26
+ }
27
+ /**
28
+ * Renders the arrow-shaped background shell shared by crumb and editable segments.
29
+ */
30
+ export declare function SegmentShell({ shape, grow, className, children }: Props): JSX.Element;
31
+ export {};
32
+ //# sourceMappingURL=SegmentShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentShell.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/SegmentShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM5C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAsBhE;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,YAAY,CAAC;IAEpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,IAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAuB7F"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
3
+ /** Pixel width of the chevron notch shared between interlocking segments. */
4
+ const CHEVRON_PX = 9;
5
+ /**
6
+ * Returns a CSS clip-path polygon for the given segment shape.
7
+ *
8
+ * @param shape - Which segment position to clip for.
9
+ * @returns Clip-path polygon string for inline style use.
10
+ */
11
+ function clipPathForShape(shape) {
12
+ switch (shape) {
13
+ case 'first':
14
+ return `polygon(0 0, calc(100% - ${CHEVRON_PX}px) 0, 100% 50%, calc(100% - ${CHEVRON_PX}px) 100%, 0 100%)`;
15
+ case 'middle':
16
+ return `polygon(0 0, calc(100% - ${CHEVRON_PX}px) 0, 100% 50%, calc(100% - ${CHEVRON_PX}px) 100%, 0 100%, ${CHEVRON_PX}px 50%)`;
17
+ case 'last':
18
+ return `polygon(0 0, 100% 0, 100% 100%, 0 100%, ${CHEVRON_PX}px 50%)`;
19
+ case 'only':
20
+ default:
21
+ return 'none';
22
+ }
23
+ }
24
+ /**
25
+ * Renders the arrow-shaped background shell shared by crumb and editable segments.
26
+ */
27
+ export function SegmentShell({ shape, grow = false, className, children }) {
28
+ const hasChevron = shape !== 'only';
29
+ const clipPath = clipPathForShape(shape);
30
+ const needsLeadingInset = shape !== 'first' && shape !== 'only';
31
+ return (_jsx("div", { className: cn('hc-breadcrumb-segment relative flex min-h-[30px] min-w-0 items-center bg-sidebar py-2', grow ? 'min-w-[6rem] flex-1' : 'max-w-[45%] shrink-0', hasChevron && shape !== 'last' && '-mr-[6px]', !needsLeadingInset && 'pl-3', 'pr-3', className), style: {
32
+ ...(clipPath !== 'none' ? { clipPath } : {}),
33
+ ...(needsLeadingInset ? { paddingLeft: `${CHEVRON_PX + 8}px` } : {})
34
+ }, children: _jsx("div", { className: "min-w-0 truncate", children: children }) }));
35
+ }
@@ -1,21 +1,6 @@
1
1
  import { type JSX } from 'react';
2
- /**
3
- * One non-editable breadcrumb segment rendered before the trailing editable item.
4
- */
5
- export interface BreadcrumbSegment {
6
- /**
7
- * Visible label for the segment.
8
- */
9
- label: string;
10
- /**
11
- * Optional stable key; falls back to the segment index when omitted.
12
- */
13
- id?: string;
14
- /**
15
- * When set, the segment renders as a navigable button.
16
- */
17
- onClick?: () => void;
18
- }
2
+ import { type BreadcrumbSegment } from './types.js';
3
+ export type { BreadcrumbSegment } from './types.js';
19
4
  interface Props {
20
5
  /**
21
6
  * Leading, non-editable crumbs (collection, folder, and so on).
@@ -52,5 +37,4 @@ interface Props {
52
37
  * segments are optionally clickable; the trailing segment is inline-editable.
53
38
  */
54
39
  export declare function Breadcrumb({ segments, value, placeholder, editableLabel, onValueChange, className, flush }: Props): JSX.Element;
55
- export {};
56
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAQT,MAAM,OAAO,CAAC;AAOf;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAyOD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,WAAgB,EAChB,aAAsB,EACtB,aAAa,EACb,SAAS,EACT,KAAa,EACd,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA2DrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAsC,MAAM,OAAO,CAAC;AAKrE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,WAAgB,EAChB,aAAsB,EACtB,aAAa,EACb,SAAS,EACT,KAAa,EACd,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA2DrB"}
@@ -1,67 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
2
  import { useEffect, useId, useRef, useState } from 'react';
3
- import { Input } from '../forms/index.js';
4
3
  import { cn } from '../utils.js';
5
- /** Pixel width of the chevron notch shared between interlocking segments. */
6
- const CHEVRON_PX = 9;
7
- /**
8
- * Returns a CSS clip-path polygon for the given segment shape.
9
- *
10
- * @param shape - Which segment position to clip for.
11
- * @returns Clip-path polygon string for inline style use.
12
- */
13
- function clipPathForShape(shape) {
14
- switch (shape) {
15
- case 'first':
16
- return `polygon(0 0, calc(100% - ${CHEVRON_PX}px) 0, 100% 50%, calc(100% - ${CHEVRON_PX}px) 100%, 0 100%)`;
17
- case 'middle':
18
- return `polygon(0 0, calc(100% - ${CHEVRON_PX}px) 0, 100% 50%, calc(100% - ${CHEVRON_PX}px) 100%, 0 100%, ${CHEVRON_PX}px 50%)`;
19
- case 'last':
20
- return `polygon(0 0, 100% 0, 100% 100%, 0 100%, ${CHEVRON_PX}px 50%)`;
21
- case 'only':
22
- default:
23
- return 'none';
24
- }
25
- }
26
- /**
27
- * Renders the arrow-shaped background shell shared by crumb and editable segments.
28
- */
29
- function SegmentShell({ shape, grow = false, className, children }) {
30
- const hasChevron = shape !== 'only';
31
- const clipPath = clipPathForShape(shape);
32
- const needsLeadingInset = shape !== 'first' && shape !== 'only';
33
- return (_jsx("div", { className: cn('hc-breadcrumb-segment relative flex min-h-[30px] min-w-0 items-center bg-sidebar py-2', grow ? 'min-w-[6rem] flex-1' : 'max-w-[45%] shrink-0', hasChevron && shape !== 'last' && '-mr-[6px]', !needsLeadingInset && 'pl-3', 'pr-3', className), style: {
34
- ...(clipPath !== 'none' ? { clipPath } : {}),
35
- ...(needsLeadingInset ? { paddingLeft: `${CHEVRON_PX + 8}px` } : {})
36
- }, children: _jsx("div", { className: "min-w-0 truncate", children: children }) }));
37
- }
38
- /**
39
- * Renders one leading, non-editable breadcrumb segment.
40
- */
41
- function CrumbSegment({ segment, shape }) {
42
- const contentClass = cn('block w-full truncate border-none bg-transparent p-0 text-left', segment.onClick && 'cursor-pointer hover:text-text focus-visible:text-text');
43
- /**
44
- * Stops click propagation so breadcrumb navigation does not trigger edit mode.
45
- *
46
- * @param event - Mouse event from a breadcrumb segment control.
47
- */
48
- const handleClick = (event) => {
49
- event.stopPropagation();
50
- segment.onClick?.();
51
- };
52
- return (_jsx(SegmentShell, { shape: shape, 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'), onClick: handleClick, children: segment.label })) : (_jsx("span", { className: contentClass, children: segment.label })) }));
53
- }
54
- /**
55
- * Renders the trailing breadcrumb segment with click-to-edit behavior.
56
- */
57
- function EditableSegment({ value, placeholder, editableLabel, editing, shape, inputRef, onStartEditing, onStopEditing, onValueChange }) {
58
- return (_jsx(SegmentShell, { shape: shape, 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) => {
59
- if (event.key === 'Enter' || event.key === 'Escape') {
60
- event.preventDefault();
61
- onStopEditing();
62
- }
63
- } })) : (_jsx("button", { type: "button", "aria-current": "page", "aria-label": editableLabel, className: "app-no-drag flex 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 }) }) })) }));
64
- }
4
+ import { CrumbSegment } from './CrumbSegment.js';
5
+ import { EditableSegment } from './EditableSegment.js';
65
6
  /**
66
7
  * Full-width breadcrumb bar with interlocking arrow-shaped segments. Leading
67
8
  * segments are optionally clickable; the trailing segment is inline-editable.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * One non-editable breadcrumb segment rendered before the trailing editable item.
3
+ */
4
+ export interface BreadcrumbSegment {
5
+ /**
6
+ * Visible label for the segment.
7
+ */
8
+ label: string;
9
+ /**
10
+ * Optional stable key; falls back to the segment index when omitted.
11
+ */
12
+ id?: string;
13
+ /**
14
+ * When set, the segment renders as a navigable button.
15
+ */
16
+ onClick?: () => void;
17
+ }
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,79 @@
1
+ import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+ import type { JSX, MouseEvent, ReactNode } from 'react';
3
+ interface Props {
4
+ /**
5
+ * Icon shown before the document name. Defaults to a file-lines icon when omitted.
6
+ */
7
+ icon?: IconDefinition;
8
+ /**
9
+ * Primary label text for the row.
10
+ */
11
+ name: string;
12
+ /**
13
+ * Optional Tailwind classes applied to the name text (e.g. git status colors).
14
+ */
15
+ nameClassName?: string;
16
+ /**
17
+ * Optional color dot configuration for collection sidebar rows.
18
+ */
19
+ colorDot?: {
20
+ color: string | null | undefined;
21
+ visible?: boolean;
22
+ label?: string;
23
+ };
24
+ /**
25
+ * Optional git change status marker shown after the name in git sidebar rows.
26
+ */
27
+ statusMarker?: {
28
+ marker: string;
29
+ className?: string;
30
+ label: string;
31
+ };
32
+ /**
33
+ * Whether this row should use selected/highlighted row styling.
34
+ */
35
+ selected?: boolean;
36
+ /**
37
+ * Accessible label for the listbox option. When omitted, the name is derived
38
+ * from visible row content (name, markers).
39
+ */
40
+ ariaLabel?: string;
41
+ /**
42
+ * Overrides the `aria-selected` state. When omitted, falls back to `selected`.
43
+ */
44
+ ariaSelected?: boolean;
45
+ /**
46
+ * When true, marks the row as the current item with `aria-current="true"`.
47
+ */
48
+ ariaCurrent?: boolean;
49
+ /**
50
+ * Called when the user right-clicks the row container.
51
+ */
52
+ onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
53
+ /**
54
+ * Called when the primary label area is activated.
55
+ */
56
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
57
+ /**
58
+ * Called when the primary label area is double-clicked.
59
+ */
60
+ onDoubleClick?: (event: MouseEvent<HTMLElement>) => void;
61
+ /**
62
+ * Trailing actions slot, typically a row actions menu.
63
+ */
64
+ actions?: ReactNode;
65
+ /**
66
+ * HTML element for the row container. Use `li` inside {@link SidebarListbox}.
67
+ */
68
+ as?: 'div' | 'li';
69
+ }
70
+ /**
71
+ * Renders a markdown document sidebar row with file icon, optional color dot or git
72
+ * status marker, and shared row chrome. Used in both Collections and Git sidebars.
73
+ *
74
+ * The accessible name defaults to visible row content (name, markers) but can be
75
+ * overridden with `ariaLabel` (e.g. to include git status context).
76
+ */
77
+ export declare function SidebarDocumentItem({ icon, name, nameClassName, colorDot, statusMarker, selected, ariaLabel, ariaSelected, ariaCurrent, onContextMenu, onClick, onDoubleClick, actions, as }: Props): JSX.Element;
78
+ export {};
79
+ //# sourceMappingURL=SidebarDocumentItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarDocumentItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarDocumentItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOxD,UAAU,KAAK;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;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,YAAY,CAAC,EAAE;QACb,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;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,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAEzD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,IAAkB,EAClB,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,QAAgB,EAChB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,EACP,aAAa,EACb,OAAO,EACP,EAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA6CrB"}
@@ -0,0 +1,26 @@
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 { SidebarStatusMarker } from './SidebarStatusMarker.js';
7
+ import { SIDEBAR_ITEM_BUTTON_CLASS } from './sidebarItemClasses.js';
8
+ /**
9
+ * Renders a markdown document sidebar row with file icon, optional color dot or git
10
+ * status marker, and shared row chrome. Used in both Collections and Git sidebars.
11
+ *
12
+ * The accessible name defaults to visible row content (name, markers) but can be
13
+ * overridden with `ariaLabel` (e.g. to include git status context).
14
+ */
15
+ export function SidebarDocumentItem({ icon = faFileLines, name, nameClassName, colorDot, statusMarker, selected = false, ariaLabel, ariaSelected, ariaCurrent, onContextMenu, onClick, onDoubleClick, actions, as = 'li' }) {
16
+ const useListboxOption = as === 'li';
17
+ return (_jsx(SidebarItem, { selected: selected, onContextMenu: onContextMenu, actions: actions, as: as, listboxOption: useListboxOption
18
+ ? {
19
+ ariaLabel,
20
+ ariaSelected,
21
+ ariaCurrent,
22
+ onClick,
23
+ onDoubleClick
24
+ }
25
+ : undefined, children: _jsxs("span", { className: SIDEBAR_ITEM_BUTTON_CLASS, 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] }) }));
26
+ }
@@ -1,4 +1,3 @@
1
- import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
1
  import type { JSX, MouseEvent, ReactNode } from 'react';
3
2
  import { type SidebarItemSortableConfig } from './SidebarItem.js';
4
3
  interface Props {
@@ -79,80 +78,5 @@ interface Props {
79
78
  * Wrap lists in {@link SidebarListbox} and pass `as="li"` for valid listbox semantics.
80
79
  */
81
80
  export declare function SidebarRequestItem({ method, name, nameClassName, colorDot, statusMarker, selected, sortable, ariaLabel, ariaSelected, ariaCurrent, onContextMenu, onClick, actions, as }: Props): JSX.Element;
82
- interface DocumentProps {
83
- /**
84
- * Icon shown before the document name. Defaults to a file-lines icon when omitted.
85
- */
86
- icon?: IconDefinition;
87
- /**
88
- * Primary label text for the row.
89
- */
90
- name: string;
91
- /**
92
- * Optional Tailwind classes applied to the name text (e.g. git status colors).
93
- */
94
- nameClassName?: string;
95
- /**
96
- * Optional color dot configuration for collection sidebar rows.
97
- */
98
- colorDot?: {
99
- color: string | null | undefined;
100
- visible?: boolean;
101
- label?: string;
102
- };
103
- /**
104
- * Optional git change status marker shown after the name in git sidebar rows.
105
- */
106
- statusMarker?: {
107
- marker: string;
108
- className?: string;
109
- label: string;
110
- };
111
- /**
112
- * Whether this row should use selected/highlighted row styling.
113
- */
114
- selected?: boolean;
115
- /**
116
- * Accessible label for the listbox option. When omitted, the name is derived
117
- * from visible row content (name, markers).
118
- */
119
- ariaLabel?: string;
120
- /**
121
- * Overrides the `aria-selected` state. When omitted, falls back to `selected`.
122
- */
123
- ariaSelected?: boolean;
124
- /**
125
- * When true, marks the row as the current item with `aria-current="true"`.
126
- */
127
- ariaCurrent?: boolean;
128
- /**
129
- * Called when the user right-clicks the row container.
130
- */
131
- onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
132
- /**
133
- * Called when the primary label area is activated.
134
- */
135
- onClick?: (event: MouseEvent<HTMLElement>) => void;
136
- /**
137
- * Called when the primary label area is double-clicked.
138
- */
139
- onDoubleClick?: (event: MouseEvent<HTMLElement>) => void;
140
- /**
141
- * Trailing actions slot, typically a row actions menu.
142
- */
143
- actions?: ReactNode;
144
- /**
145
- * HTML element for the row container. Use `li` inside {@link SidebarListbox}.
146
- */
147
- as?: 'div' | 'li';
148
- }
149
- /**
150
- * Renders a markdown document sidebar row with file icon, optional color dot or git
151
- * status marker, and shared row chrome. Used in both Collections and Git sidebars.
152
- *
153
- * The accessible name defaults to visible row content (name, markers) but can be
154
- * overridden with `ariaLabel` (e.g. to include git status context).
155
- */
156
- export declare function SidebarDocumentItem({ icon, name, nameClassName, colorDot, statusMarker, selected, ariaLabel, ariaSelected, ariaCurrent, onContextMenu, onClick, onDoubleClick, actions, as }: DocumentProps): JSX.Element;
157
81
  export {};
158
82
  //# sourceMappingURL=SidebarRequestItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarRequestItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarRequestItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAe,KAAK,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAK/E,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;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,YAAY,CAAC,EAAE;QACb,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;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;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,EACP,OAAO,EACP,EAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA6CrB;AAED,UAAU,aAAa;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;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,YAAY,CAAC,EAAE;QACb,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;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,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAEzD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,IAAkB,EAClB,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,QAAgB,EAChB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,EACP,aAAa,EACb,OAAO,EACP,EAAS,EACV,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CA6C7B"}
1
+ {"version":3,"file":"SidebarRequestItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarRequestItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAe,KAAK,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAK/E,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;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,YAAY,CAAC,EAAE;QACb,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;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;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,EACP,OAAO,EACP,EAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA6CrB"}
@@ -1,6 +1,4 @@
1
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
2
  import { SidebarColorDot } from './SidebarColorDot.js';
5
3
  import { SidebarItem } from './SidebarItem.js';
6
4
  import { SidebarMethodBadge } from './SidebarMethodBadge.js';
@@ -26,22 +24,3 @@ export function SidebarRequestItem({ method, name, nameClassName, colorDot, stat
26
24
  }
27
25
  : undefined, children: _jsxs("span", { className: SIDEBAR_ITEM_BUTTON_CLASS, 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] }) }));
28
26
  }
29
- /**
30
- * Renders a markdown document sidebar row with file icon, optional color dot or git
31
- * status marker, and shared row chrome. Used in both Collections and Git sidebars.
32
- *
33
- * The accessible name defaults to visible row content (name, markers) but can be
34
- * overridden with `ariaLabel` (e.g. to include git status context).
35
- */
36
- export function SidebarDocumentItem({ icon = faFileLines, name, nameClassName, colorDot, statusMarker, selected = false, ariaLabel, ariaSelected, ariaCurrent, onContextMenu, onClick, onDoubleClick, actions, as = 'li' }) {
37
- const useListboxOption = as === 'li';
38
- return (_jsx(SidebarItem, { selected: selected, onContextMenu: onContextMenu, actions: actions, as: as, listboxOption: useListboxOption
39
- ? {
40
- ariaLabel,
41
- ariaSelected,
42
- ariaCurrent,
43
- onClick,
44
- onDoubleClick
45
- }
46
- : undefined, children: _jsxs("span", { className: SIDEBAR_ITEM_BUTTON_CLASS, 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] }) }));
47
- }
@@ -30,26 +30,5 @@ interface TreeProps {
30
30
  * ```
31
31
  */
32
32
  export declare function SidebarTree({ children, 'aria-label': ariaLabel, className }: TreeProps): JSX.Element;
33
- interface TreeGroupProps {
34
- /**
35
- * Child tree rows or nested groups.
36
- */
37
- children: ReactNode;
38
- /**
39
- * Stable id referenced by the parent treeitem's `aria-controls`.
40
- */
41
- id: string;
42
- /**
43
- * Additional classes merged onto the group element.
44
- */
45
- className?: string;
46
- }
47
- /**
48
- * Child region for an expanded folder treeitem.
49
- *
50
- * Renders `role="group"` and must use the same `id` passed to the parent
51
- * folder's `childrenId` / `aria-controls`.
52
- */
53
- export declare function SidebarTreeGroup({ children, id, className }: TreeGroupProps): JSX.Element;
54
33
  export {};
55
34
  //# sourceMappingURL=SidebarTree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarTree.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,UAAU,SAAS;IACjB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,SAAS,EACV,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAMzB;AAED,UAAU,cAAc;IACtB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAMzF"}
1
+ {"version":3,"file":"SidebarTree.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,UAAU,SAAS;IACjB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,SAAS,EACV,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAMzB"}
@@ -19,12 +19,3 @@ import { cn } from '../utils.js';
19
19
  export function SidebarTree({ children, 'aria-label': ariaLabel, className }) {
20
20
  return (_jsx("ul", { role: "tree", "aria-label": ariaLabel, className: cn('m-0 list-none p-0', className), children: children }));
21
21
  }
22
- /**
23
- * Child region for an expanded folder treeitem.
24
- *
25
- * Renders `role="group"` and must use the same `id` passed to the parent
26
- * folder's `childrenId` / `aria-controls`.
27
- */
28
- export function SidebarTreeGroup({ children, id, className }) {
29
- return (_jsx("ul", { role: "group", id: id, className: cn('m-0 list-none p-0', className), children: children }));
30
- }
@@ -0,0 +1,24 @@
1
+ import type { JSX, ReactNode } from 'react';
2
+ interface Props {
3
+ /**
4
+ * Child tree rows or nested groups.
5
+ */
6
+ children: ReactNode;
7
+ /**
8
+ * Stable id referenced by the parent treeitem's `aria-controls`.
9
+ */
10
+ id: string;
11
+ /**
12
+ * Additional classes merged onto the group element.
13
+ */
14
+ className?: string;
15
+ }
16
+ /**
17
+ * Child region for an expanded folder treeitem.
18
+ *
19
+ * Renders `role="group"` and must use the same `id` passed to the parent
20
+ * folder's `childrenId` / `aria-controls`.
21
+ */
22
+ export declare function SidebarTreeGroup({ children, id, className }: Props): JSX.Element;
23
+ export {};
24
+ //# sourceMappingURL=SidebarTreeGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarTreeGroup.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/SidebarTreeGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAMhF"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
3
+ /**
4
+ * Child region for an expanded folder treeitem.
5
+ *
6
+ * Renders `role="group"` and must use the same `id` passed to the parent
7
+ * folder's `childrenId` / `aria-controls`.
8
+ */
9
+ export function SidebarTreeGroup({ children, id, className }) {
10
+ return (_jsx("ul", { role: "group", id: id, className: cn('m-0 list-none p-0', className), children: children }));
11
+ }
@@ -1,7 +1,8 @@
1
1
  export { SidebarItem, type SidebarItemListboxOption, type SidebarItemSortableConfig, type SidebarItemTreeItem } from './SidebarItem.js';
2
2
  export { SidebarListbox } from './SidebarListbox.js';
3
3
  export { SidebarList } from './SidebarList.js';
4
- export { SidebarTree, SidebarTreeGroup } from './SidebarTree.js';
4
+ export { SidebarTree } from './SidebarTree.js';
5
+ export { SidebarTreeGroup } from './SidebarTreeGroup.js';
5
6
  export { handleSidebarOptionKeyDown } from './sidebarListOption.js';
6
7
  export { SortableSidebarItem } from './SortableSidebarItem.js';
7
8
  export { stopSortableDragPointerDown } from './stopSortableDragPointerDown.js';
@@ -11,7 +12,8 @@ export { sourceRow, METHOD_CLASSES, statusDotVariant, statusDotClass, SIDEBAR_IT
11
12
  export { SidebarMethodBadge } from './SidebarMethodBadge.js';
12
13
  export { SidebarStatusDot } from './SidebarStatusDot.js';
13
14
  export { SidebarStatusMarker } from './SidebarStatusMarker.js';
14
- export { SidebarRequestItem, SidebarDocumentItem } from './SidebarRequestItem.js';
15
+ export { SidebarRequestItem } from './SidebarRequestItem.js';
16
+ export { SidebarDocumentItem } from './SidebarDocumentItem.js';
15
17
  export { SidebarFolderItem } from './SidebarFolderItem.js';
16
18
  export { SidebarRunItem } from './SidebarRunItem.js';
17
19
  export { SidebarHistoryItem } from './SidebarHistoryItem.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,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,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACL,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,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,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACL,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,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,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,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"}
@@ -1,7 +1,8 @@
1
1
  export { SidebarItem } from './SidebarItem.js';
2
2
  export { SidebarListbox } from './SidebarListbox.js';
3
3
  export { SidebarList } from './SidebarList.js';
4
- export { SidebarTree, SidebarTreeGroup } from './SidebarTree.js';
4
+ export { SidebarTree } from './SidebarTree.js';
5
+ export { SidebarTreeGroup } from './SidebarTreeGroup.js';
5
6
  export { handleSidebarOptionKeyDown } from './sidebarListOption.js';
6
7
  export { SortableSidebarItem } from './SortableSidebarItem.js';
7
8
  export { stopSortableDragPointerDown } from './stopSortableDragPointerDown.js';
@@ -11,7 +12,8 @@ export { sourceRow, METHOD_CLASSES, statusDotVariant, statusDotClass, SIDEBAR_IT
11
12
  export { SidebarMethodBadge } from './SidebarMethodBadge.js';
12
13
  export { SidebarStatusDot } from './SidebarStatusDot.js';
13
14
  export { SidebarStatusMarker } from './SidebarStatusMarker.js';
14
- export { SidebarRequestItem, SidebarDocumentItem } from './SidebarRequestItem.js';
15
+ export { SidebarRequestItem } from './SidebarRequestItem.js';
16
+ export { SidebarDocumentItem } from './SidebarDocumentItem.js';
15
17
  export { SidebarFolderItem } from './SidebarFolderItem.js';
16
18
  export { SidebarRunItem } from './SidebarRunItem.js';
17
19
  export { SidebarHistoryItem } from './SidebarHistoryItem.js';
@@ -0,0 +1,40 @@
1
+ import { type JSX, type ReactNode } from 'react';
2
+ interface SectionContentProps {
3
+ /**
4
+ * Section title shown in the header.
5
+ */
6
+ title: string;
7
+ /**
8
+ * Section body content.
9
+ */
10
+ children: ReactNode;
11
+ /**
12
+ * Called when the add button is clicked.
13
+ */
14
+ onAdd?: () => void;
15
+ /**
16
+ * Accessible label for the add button.
17
+ */
18
+ addLabel?: string;
19
+ /**
20
+ * Optional action controls rendered in the header row (for example plugin header actions).
21
+ */
22
+ headerActions?: ReactNode;
23
+ /**
24
+ * When true, removes the margin below the header so body content sits flush against it.
25
+ */
26
+ flushBody?: boolean;
27
+ }
28
+ export interface Props extends SectionContentProps {
29
+ /**
30
+ * Stable accordion item key shared with the sidebar sections provider.
31
+ */
32
+ itemKey: string;
33
+ /**
34
+ * Whether the section body starts expanded on first mount.
35
+ */
36
+ initialEntered: boolean;
37
+ }
38
+ export declare const AccordionSection: (props: Props) => JSX.Element;
39
+ export {};
40
+ //# sourceMappingURL=SectionItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionItem.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarSection/SectionItem.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,GAAG,EAA4B,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAG3F,UAAU,mBAAmB;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,KAAM,SAAQ,mBAAmB;IAChD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;CACzB;AA8ED,eAAO,MAAM,gBAAgB,EAIb,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,OAAO,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
+ import { faChevronDown, faChevronRight, faPlus } from '@fortawesome/free-solid-svg-icons';
3
+ import { useAccordionItem, useHeightTransition, useMergeRef, withAccordionItem } from '@szhsin/react-accordion';
4
+ import { memo } from 'react';
5
+ import { FaIcon } from '../FaIcon/index.js';
6
+ /**
7
+ * Renders the sidebar section header row and animated body panel.
8
+ */
9
+ const SectionItem = memo(function SectionItem({ forwardedRef, itemRef, state, toggle, title, children, onAdd, addLabel, headerActions, flushBody = false }) {
10
+ const { buttonProps, panelProps } = useAccordionItem({ state, toggle });
11
+ const [transitionStyle, panelRef] = useHeightTransition(state);
12
+ const itemElementRef = useMergeRef(forwardedRef, itemRef);
13
+ const { status, isMounted, isEnter } = state;
14
+ return (_jsxs("div", { ref: itemElementRef, className: "-mr-2 mb-1", children: [_jsxs("div", { className: `hc-sidebar-section-header bg-sidebar-section flex min-h-8 items-center justify-between gap-2 py-0.5 pr-2 ${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-1.5 border-none bg-transparent p-0 text-left", children: [_jsx("span", { className: "ms-2 inline-flex h-4 w-4 shrink-0 items-center justify-center", children: _jsx(FaIcon, { icon: isEnter ? faChevronDown : faChevronRight, className: "h-2 w-2 text-muted" }) }), _jsx("h2", { className: "m-0 text-[15px] leading-none font-medium tracking-wide text-muted uppercase", children: title })] }), (headerActions || onAdd) && (_jsxs("div", { className: "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-4 w-4" }) })) : null] }))] }), isMounted ? (_jsx("div", { style: {
15
+ display: status === 'exited' ? 'none' : undefined,
16
+ ...transitionStyle
17
+ }, className: "transition-[height] duration-200 ease-out motion-reduce:transition-none", children: _jsx("div", { ...panelProps, ref: panelRef, children: children }) })) : null] }));
18
+ });
19
+ export const AccordionSection = withAccordionItem(SectionItem);
@@ -1,43 +1,7 @@
1
- import { type JSX, type ReactNode } from 'react';
2
- interface SectionContentProps {
3
- /**
4
- * Section title shown in the header.
5
- */
6
- title: string;
7
- /**
8
- * Section body content.
9
- */
10
- children: ReactNode;
11
- /**
12
- * Called when the add button is clicked.
13
- */
14
- onAdd?: () => void;
15
- /**
16
- * Accessible label for the add button.
17
- */
18
- addLabel?: string;
19
- /**
20
- * Optional action controls rendered in the header row (for example plugin header actions).
21
- */
22
- headerActions?: ReactNode;
23
- /**
24
- * When true, removes the margin below the header so body content sits flush against it.
25
- */
26
- flushBody?: boolean;
27
- }
28
- interface Props extends SectionContentProps {
29
- /**
30
- * Stable accordion item key shared with the sidebar sections provider.
31
- */
32
- itemKey: string;
33
- /**
34
- * Whether the section body starts expanded on first mount.
35
- */
36
- initialEntered: boolean;
37
- }
1
+ import type { JSX } from 'react';
2
+ import { type Props } from './SectionItem.js';
38
3
  /**
39
4
  * Collapsible sidebar section backed by `@szhsin/react-accordion` with optional add action.
40
5
  */
41
6
  export declare function SidebarSection({ itemKey, title, initialEntered, children, onAdd, addLabel, headerActions, flushBody }: Props): JSX.Element;
42
- export {};
43
7
  //# sourceMappingURL=SidebarSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarSection.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarSection/SidebarSection.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,GAAG,EAA4B,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAG3F,UAAU,mBAAmB;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,KAAM,SAAQ,mBAAmB;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;CACzB;AAoFD;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,KAAK,EACL,cAAc,EACd,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAcrB"}
1
+ {"version":3,"file":"SidebarSection.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarSection/SidebarSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEhE;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,KAAK,EACL,cAAc,EACd,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAcrB"}
@@ -1,22 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
- import { faChevronDown, faChevronRight, faPlus } from '@fortawesome/free-solid-svg-icons';
3
- import { useAccordionItem, useHeightTransition, useMergeRef, withAccordionItem } from '@szhsin/react-accordion';
4
- import { memo } from 'react';
5
- import { FaIcon } from '../FaIcon/index.js';
6
- /**
7
- * Renders the sidebar section header row and animated body panel.
8
- */
9
- const SectionItem = memo(function SectionItem({ forwardedRef, itemRef, state, toggle, title, children, onAdd, addLabel, headerActions, flushBody = false }) {
10
- const { buttonProps, panelProps } = useAccordionItem({ state, toggle });
11
- const [transitionStyle, panelRef] = useHeightTransition(state);
12
- const itemElementRef = useMergeRef(forwardedRef, itemRef);
13
- const { status, isMounted, isEnter } = state;
14
- return (_jsxs("div", { ref: itemElementRef, className: "-mr-2 mb-1", children: [_jsxs("div", { className: `hc-sidebar-section-header bg-sidebar-section flex min-h-8 items-center justify-between gap-2 py-0.5 pr-2 ${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-1.5 border-none bg-transparent p-0 text-left", children: [_jsx("span", { className: "ms-2 inline-flex h-4 w-4 shrink-0 items-center justify-center", children: _jsx(FaIcon, { icon: isEnter ? faChevronDown : faChevronRight, className: "h-2 w-2 text-muted" }) }), _jsx("h2", { className: "m-0 text-[15px] leading-none font-medium tracking-wide text-muted uppercase", children: title })] }), (headerActions || onAdd) && (_jsxs("div", { className: "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-4 w-4" }) })) : null] }))] }), isMounted ? (_jsx("div", { style: {
15
- display: status === 'exited' ? 'none' : undefined,
16
- ...transitionStyle
17
- }, className: "transition-[height] duration-200 ease-out motion-reduce:transition-none", children: _jsx("div", { ...panelProps, ref: panelRef, children: children }) })) : null] }));
18
- });
19
- const AccordionSection = withAccordionItem(SectionItem);
1
+ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { AccordionSection } from './SectionItem.js';
20
3
  /**
21
4
  * Collapsible sidebar section backed by `@szhsin/react-accordion` with optional add action.
22
5
  */
@@ -0,0 +1,14 @@
1
+ import type { JSX, ReactNode } from 'react';
2
+ interface Props {
3
+ checked: boolean;
4
+ label: ReactNode;
5
+ tabIndex: number;
6
+ onSelect: () => void;
7
+ ref?: (element: HTMLButtonElement | null) => void;
8
+ }
9
+ /**
10
+ * Single checkbox-style row in the visibility menu.
11
+ */
12
+ export declare function MenuCheckboxItem({ checked, label, tabIndex, onSelect, ref }: Props): JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=MenuCheckboxItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuCheckboxItem.d.ts","sourceRoot":"","sources":["../../../src/components/VisibilityMenu/MenuCheckboxItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAO5C,UAAU,KAAK;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;CACnD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAuBhG"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
+ import { faCheck } from '@fortawesome/free-solid-svg-icons';
3
+ import { FaIcon } from '../FaIcon/index.js';
4
+ import { cn } from '../utils.js';
5
+ const menuItemClass = '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 app-no-drag';
6
+ /**
7
+ * Single checkbox-style row in the visibility menu.
8
+ */
9
+ export function MenuCheckboxItem({ checked, label, tabIndex, onSelect, ref }) {
10
+ return (_jsxs("button", { ref: ref, type: "button", role: "menuitemcheckbox", "aria-checked": checked, tabIndex: tabIndex, className: cn('hc-visibility-menu-item', menuItemClass), onClick: (e) => {
11
+ e.stopPropagation();
12
+ onSelect();
13
+ }, children: [_jsx("span", { className: "hc-visibility-menu-item-check inline-flex w-4 shrink-0 justify-center", "aria-hidden": true, children: checked ? _jsx(FaIcon, { icon: faCheck, className: "h-3 w-3" }) : null }), _jsx("span", { className: "hc-visibility-menu-item-label min-w-0", children: label })] }));
14
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/VisibilityMenu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3D;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM;IAClD;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC;IAET;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;IAC9B;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;IAE/B;;OAEG;IACH,aAAa,EAAE,CAAC,EAAE,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC9B;AAQD;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,EAAE,EAC/C,KAAK,EACL,aAAa,EACb,QAAQ,EACT,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAgLxB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/VisibilityMenu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAM3D;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM;IAClD;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC;IAET;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;IAC9B;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;IAE/B;;OAEG;IACH,aAAa,EAAE,CAAC,EAAE,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC9B;AAKD;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,EAAE,EAC/C,KAAK,EACL,aAAa,EACb,QAAQ,EACT,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAgLxB"}
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
2
- import { faCaretDown, faCheck } from '@fortawesome/free-solid-svg-icons';
2
+ import { faCaretDown } from '@fortawesome/free-solid-svg-icons';
3
3
  import { useCallback, useEffect, useId, useRef, useState } from '@harborclient/sdk/react';
4
4
  import { Button } from '../Button/index.js';
5
5
  import { FaIcon } from '../FaIcon/index.js';
6
6
  import { cn, resolveTabListKeyAction } from '../utils.js';
7
- const menuItemClass = '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 app-no-drag';
7
+ import { MenuCheckboxItem } from './MenuCheckboxItem.js';
8
8
  const triggerClassName = '!rounded-full hover:!bg-[rgba(0,122,255,0.18)] dark:hover:!bg-[rgba(10,132,255,0.22)]';
9
9
  /**
10
10
  * Caret-triggered menu for toggling which items are visible in a parent control.
@@ -136,12 +136,3 @@ export function VisibilityMenu({ items, visibleValues, onToggle }) {
136
136
  }, checked: checked, tabIndex: index === focusedIndex ? 0 : -1, label: item.label, onSelect: () => onToggle(item.value) }, item.value));
137
137
  }) }))] }));
138
138
  }
139
- /**
140
- * Single checkbox-style row in the visibility menu.
141
- */
142
- function MenuCheckboxItem({ checked, label, tabIndex, onSelect, ref }) {
143
- return (_jsxs("button", { ref: ref, type: "button", role: "menuitemcheckbox", "aria-checked": checked, tabIndex: tabIndex, className: cn('hc-visibility-menu-item', menuItemClass), onClick: (e) => {
144
- e.stopPropagation();
145
- onSelect();
146
- }, children: [_jsx("span", { className: "hc-visibility-menu-item-check inline-flex w-4 shrink-0 justify-center", "aria-hidden": true, children: checked ? _jsx(FaIcon, { icon: faCheck, className: "h-3 w-3" }) : null }), _jsx("span", { className: "hc-visibility-menu-item-label min-w-0", children: label })] }));
147
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harborclient/sdk",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "TypeScript SDK for HarborClient development.",
5
5
  "keywords": [
6
6
  "harborclient",