@harborclient/sdk 1.6.6 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 1.7.0 - 2026-08-07
8
+
9
+ - Enhance discussion features and UI components. (`43dd0414`)
10
+ - Enhance SSE session management and event detail navigation. (`9188f31a`)
11
+
12
+ ## 1.6.7 - 2026-08-05
13
+
14
+ - Refactor Team Hub integration to support tenantId. (`1baf9475`)
15
+
7
16
  ## 1.6.6 - 2026-08-05
8
17
 
9
18
  - Refactor UI components to remove `app-no-drag` class. (`c9cbe40e`)
@@ -40,8 +40,10 @@ export interface SelectionActionToolbarController {
40
40
  */
41
41
  lastNonEmptySelection: SelectionActionToolbarState | null;
42
42
  /**
43
- * When true, ignore collapsed-selection dismissals that race pointerup
44
- * (CodeMirror may collapse into the gutter in the same event turn).
43
+ * One-shot shield: ignore the next collapsed/unusable selection dismissal that
44
+ * races pointerup (CodeMirror may collapse into the gutter in the same event
45
+ * turn). Cleared after it is consumed, when the toolbar hides, or on the next
46
+ * pointerdown.
45
47
  */
46
48
  suppressCollapseDismiss: boolean;
47
49
  }
@@ -117,13 +119,13 @@ export declare function createSelectionActionToolbarController(): SelectionActio
117
119
  /**
118
120
  * Applies a view update to the selection toolbar controller.
119
121
  *
120
- * Encodes the RTL-gutter fix: collapsed selections during a pointer drag (or
121
- * immediately after pointerup) do not dismiss a previously captured selection.
122
+ * Encodes the RTL-gutter fix: collapsed selections during a pointer drag do not
123
+ * dismiss a previously captured selection. A one-shot post-pointerup shield
124
+ * ignores a single gutter-induced collapse, then later collapses dismiss normally.
122
125
  *
123
126
  * @param controller - Shared toolbar controller.
124
127
  * @param update - CodeMirror view update.
125
128
  * @param options - Enable/open callbacks and notify/dismiss helpers.
126
- * @returns Whether the toolbar should remain open after this update (for tests).
127
129
  */
128
130
  export declare function applySelectionActionToolbarUpdate(controller: SelectionActionToolbarController, update: SelectionToolbarUpdateLike, options: {
129
131
  isEnabled: () => boolean;
@@ -138,16 +140,18 @@ export declare function applySelectionActionToolbarUpdate(controller: SelectionA
138
140
  * Finalizes the toolbar after a primary-button pointer drag ends.
139
141
  *
140
142
  * Prefers the live selection; falls back to {@link SelectionActionToolbarController.lastNonEmptySelection}
141
- * so RTL releases into the gutter still reveal Copy to chat.
143
+ * so RTL releases into the gutter still reveal Copy to chat. When neither yields a
144
+ * snapshot, dismisses any open or pending toolbar so a plain click collapses it.
142
145
  *
143
146
  * @param controller - Shared toolbar controller.
144
147
  * @param view - CodeMirror editor view at pointerup.
145
- * @param options - Open check and show helpers.
148
+ * @param options - Open check, show, and dismiss helpers.
146
149
  */
147
150
  export declare function finalizeSelectionActionToolbarOnPointerUp(controller: SelectionActionToolbarController, view: SelectionToolbarViewLike, options: {
148
151
  isOpen: () => boolean;
149
152
  scheduleShow: (state: SelectionActionToolbarState) => void;
150
153
  showImmediately: (state: SelectionActionToolbarState) => void;
154
+ dismissToolbar: () => void;
151
155
  }): void;
152
156
  /**
153
157
  * Builds update and pointer handlers that debounce toolbar display until selection settles.
@@ -1 +1 @@
1
- {"version":3,"file":"selectionActionToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/selectionActionToolbar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,iFAAiF;AACjF,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;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,IAAI,GACpB,SAAS,EAAE,CAsLb"}
1
+ {"version":3,"file":"selectionActionToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/selectionActionToolbar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,iFAAiF;AACjF,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,SAAS,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,SAAS,CAAC;IACrD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACjD;;;OAGG;IACH,qBAAqB,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAC1D;;;;;OAKG;IACH,uBAAuB,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,sBAAsB,GAAG,IAAI,CAAC;IAE5D;;OAEG;IACH,KAAK,EAAE;QACL,SAAS,EAAE;YAAE,IAAI,EAAE;gBAAE,IAAI,EAAE,MAAM,CAAC;gBAAC,EAAE,E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GACA,IAAI,CA6CN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,gCAAgC,EAC5C,IAAI,EAAE,wBAAwB,EAC9B,OAAO,EAAE;IACP,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,YAAY,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAC3D,eAAe,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAC9D,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,GACA,IAAI,CAsBN;AAED;;;;;;;;GAQG;AACH,wBAAgB,sCAAsC,CACpD,eAAe,EAAE,CAAC,KAAK,EAAE,2BAA2B,GAAG,IAAI,KAAK,IAAI,EACpE,SAAS,EAAE,MAAM,OAAO,EACxB,MAAM,EAAE,MAAM,OAAO,EACrB,SAAS,EAAE,MAAM,IAAI,GACpB,SAAS,EAAE,CA2Lb"}
@@ -68,16 +68,37 @@ export function createSelectionActionToolbarController() {
68
68
  suppressCollapseDismiss: false
69
69
  };
70
70
  }
71
+ /**
72
+ * Returns whether a collapsed or unusable selection should skip dismissal.
73
+ *
74
+ * During a pointer drag, collapses are ignored so RTL gutter releases can still
75
+ * finalize. Immediately after pointerup, {@link SelectionActionToolbarController.suppressCollapseDismiss}
76
+ * is a one-shot shield for the gutter race; it is consumed here so later collapses
77
+ * (arrow keys, typing, clicks) dismiss the toolbar normally.
78
+ *
79
+ * @param controller - Shared toolbar controller.
80
+ * @returns True when this update should not dismiss the toolbar.
81
+ */
82
+ function shouldSuppressCollapseDismiss(controller) {
83
+ if (controller.isPointerSelecting) {
84
+ return true;
85
+ }
86
+ if (controller.suppressCollapseDismiss) {
87
+ controller.suppressCollapseDismiss = false;
88
+ return true;
89
+ }
90
+ return false;
91
+ }
71
92
  /**
72
93
  * Applies a view update to the selection toolbar controller.
73
94
  *
74
- * Encodes the RTL-gutter fix: collapsed selections during a pointer drag (or
75
- * immediately after pointerup) do not dismiss a previously captured selection.
95
+ * Encodes the RTL-gutter fix: collapsed selections during a pointer drag do not
96
+ * dismiss a previously captured selection. A one-shot post-pointerup shield
97
+ * ignores a single gutter-induced collapse, then later collapses dismiss normally.
76
98
  *
77
99
  * @param controller - Shared toolbar controller.
78
100
  * @param update - CodeMirror view update.
79
101
  * @param options - Enable/open callbacks and notify/dismiss helpers.
80
- * @returns Whether the toolbar should remain open after this update (for tests).
81
102
  */
82
103
  export function applySelectionActionToolbarUpdate(controller, update, options) {
83
104
  if (!options.isEnabled()) {
@@ -89,9 +110,9 @@ export function applySelectionActionToolbarUpdate(controller, update, options) {
89
110
  }
90
111
  const { from, to } = update.state.selection.main;
91
112
  if (from === to) {
92
- // During drag or immediately after pointer finalize, CodeMirror may collapse
113
+ // During drag or on the one-shot post-pointerup race, CodeMirror may collapse
93
114
  // into the gutter; keep the last non-empty selection for finalize.
94
- if (controller.isPointerSelecting || controller.suppressCollapseDismiss) {
115
+ if (shouldSuppressCollapseDismiss(controller)) {
95
116
  return;
96
117
  }
97
118
  options.dismissToolbar();
@@ -99,7 +120,7 @@ export function applySelectionActionToolbarUpdate(controller, update, options) {
99
120
  }
100
121
  const nextState = buildSelectionActionToolbarState(update.view);
101
122
  if (!nextState) {
102
- if (controller.isPointerSelecting || controller.suppressCollapseDismiss) {
123
+ if (shouldSuppressCollapseDismiss(controller)) {
103
124
  return;
104
125
  }
105
126
  options.dismissToolbar();
@@ -122,11 +143,12 @@ export function applySelectionActionToolbarUpdate(controller, update, options) {
122
143
  * Finalizes the toolbar after a primary-button pointer drag ends.
123
144
  *
124
145
  * Prefers the live selection; falls back to {@link SelectionActionToolbarController.lastNonEmptySelection}
125
- * so RTL releases into the gutter still reveal Copy to chat.
146
+ * so RTL releases into the gutter still reveal Copy to chat. When neither yields a
147
+ * snapshot, dismisses any open or pending toolbar so a plain click collapses it.
126
148
  *
127
149
  * @param controller - Shared toolbar controller.
128
150
  * @param view - CodeMirror editor view at pointerup.
129
- * @param options - Open check and show helpers.
151
+ * @param options - Open check, show, and dismiss helpers.
130
152
  */
131
153
  export function finalizeSelectionActionToolbarOnPointerUp(controller, view, options) {
132
154
  if (!controller.isPointerSelecting) {
@@ -143,7 +165,9 @@ export function finalizeSelectionActionToolbarOnPointerUp(controller, view, opti
143
165
  }
144
166
  if (controller.pendingState != null && !options.isOpen()) {
145
167
  options.scheduleShow(controller.pendingState);
168
+ return;
146
169
  }
170
+ options.dismissToolbar();
147
171
  }
148
172
  /**
149
173
  * Builds update and pointer handlers that debounce toolbar display until selection settles.
@@ -175,6 +199,7 @@ export function createSelectionActionToolbarExtensions(onToolbarChange, isEnable
175
199
  controller.isToolbarOpen = state != null;
176
200
  if (state == null) {
177
201
  controller.pendingState = null;
202
+ controller.suppressCollapseDismiss = false;
178
203
  }
179
204
  onToolbarChange(state);
180
205
  };
@@ -182,10 +207,13 @@ export function createSelectionActionToolbarExtensions(onToolbarChange, isEnable
182
207
  * Hides the toolbar immediately and cancels any pending reveal.
183
208
  *
184
209
  * Does not clear {@link SelectionActionToolbarController.lastNonEmptySelection}
185
- * so a later pointerup can still recover an RTL gutter collapse.
210
+ * so a later pointerup can still recover an RTL gutter collapse. Clears
211
+ * {@link SelectionActionToolbarController.suppressCollapseDismiss} so a closed
212
+ * toolbar never starts out suppressed.
186
213
  */
187
214
  const dismissToolbar = () => {
188
215
  clearShowTimer();
216
+ controller.suppressCollapseDismiss = false;
189
217
  if (controller.isToolbarOpen || controller.pendingState != null) {
190
218
  notifyToolbarChange(null);
191
219
  }
@@ -230,7 +258,8 @@ export function createSelectionActionToolbarExtensions(onToolbarChange, isEnable
230
258
  finalizeSelectionActionToolbarOnPointerUp(controller, activeView, {
231
259
  isOpen,
232
260
  scheduleShow,
233
- showImmediately
261
+ showImmediately,
262
+ dismissToolbar
234
263
  });
235
264
  };
236
265
  if (typeof window !== 'undefined') {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"m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"}
@@ -31,8 +31,8 @@ export function Modal({ onClose, className = 'w-96', overlayClassName, disableEs
31
31
  }, [disableEscape, onClose]);
32
32
  const overlayClass = cn('hc-modal fixed inset-0 flex items-center justify-center bg-black/40', overlayClassName ?? 'z-50');
33
33
  const panelClass = title
34
- ? cn(className, 'flex max-h-[85vh] flex-col overflow-hidden rounded-lg border border-separator bg-surface shadow-xl')
35
- : cn(className, 'rounded-lg border border-separator bg-surface p-4 shadow-xl');
34
+ ? cn('flex max-h-[85vh] flex-col overflow-hidden rounded-lg border border-separator bg-surface shadow-xl', className)
35
+ : cn('rounded-lg border border-separator bg-surface p-4 shadow-xl', className);
36
36
  const descriptionId = description && labelledBy ? `${labelledBy}-description` : undefined;
37
- return (_jsxs("div", { ref: overlayRef, ...props, className: overlayClass, children: [_jsx("div", { ref: panelRef, role: "dialog", "aria-modal": "true", "aria-labelledby": labelledBy, "aria-describedby": descriptionId, "aria-label": label, className: cn('hc-modal-panel relative z-10', panelClass), onClick: (event) => event.stopPropagation(), children: title && labelledBy ? (_jsxs(_Fragment, { children: [_jsx(ModalHeader, { titleId: labelledBy, title: title, description: description, descriptionId: descriptionId, headerActions: headerActions, closeDisabled: closeDisabled, onClose: onClose }), _jsx("div", { className: "hc-modal-body flex-1 overflow-y-auto p-4", children: children })] })) : (children) }), _jsx("button", { type: "button", tabIndex: -1, className: "hc-modal-backdrop absolute inset-0 z-0 cursor-default border-none bg-transparent p-0", "aria-label": "Close dialog", onClick: onClose })] }));
37
+ return (_jsxs("div", { ref: overlayRef, ...props, className: overlayClass, children: [_jsx("div", { ref: panelRef, role: "dialog", "aria-modal": "true", "aria-labelledby": labelledBy, "aria-describedby": descriptionId, "aria-label": label, className: cn('hc-modal-panel relative z-10', panelClass), onClick: (event) => event.stopPropagation(), children: title && labelledBy ? (_jsxs(_Fragment, { children: [_jsx(ModalHeader, { titleId: labelledBy, title: title, description: description, descriptionId: descriptionId, headerActions: headerActions, closeDisabled: closeDisabled, onClose: onClose }), _jsx("div", { className: "hc-modal-body flex min-h-0 flex-1 flex-col overflow-y-auto p-4", children: children })] })) : (children) }), _jsx("button", { type: "button", tabIndex: -1, className: "hc-modal-backdrop absolute inset-0 z-0 cursor-default border-none bg-transparent p-0", "aria-label": "Close dialog", onClick: onClose })] }));
38
38
  }
@@ -8,10 +8,15 @@ interface Props<T extends string> extends Omit<ComponentPropsWithoutRef<'div'>,
8
8
  * Panel content shown when this tab is selected.
9
9
  */
10
10
  children: ReactNode;
11
+ /**
12
+ * When true, keeps the panel mounted while inactive so expensive tab content
13
+ * can preserve local state and preload data before it becomes visible.
14
+ */
15
+ keepMounted?: boolean;
11
16
  }
12
17
  /**
13
18
  * Renders a WAI-ARIA tab panel linked to the matching tab in the parent group.
14
19
  */
15
- export declare function SegmentedTabPanel<T extends string>({ value, children, className, ...props }: Props<T>): JSX.Element | null;
20
+ export declare function SegmentedTabPanel<T extends string>({ value, children, keepMounted, className, ...props }: Props<T>): JSX.Element | null;
16
21
  export {};
17
22
  //# sourceMappingURL=SegmentedTabPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedTabPanel.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedTabs/SegmentedTabPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrF,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACzF;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC;IAET;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,EAClD,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA2C/B"}
1
+ {"version":3,"file":"SegmentedTabPanel.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedTabs/SegmentedTabPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrF,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACzF;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC;IAET;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,EAClD,KAAK,EACL,QAAQ,EACR,WAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA6C/B"}
@@ -5,7 +5,7 @@ import { SegmentedTabsContext } from './SegmentedTabsContext.js';
5
5
  /**
6
6
  * Renders a WAI-ARIA tab panel linked to the matching tab in the parent group.
7
7
  */
8
- export function SegmentedTabPanel({ value, children, className, ...props }) {
8
+ export function SegmentedTabPanel({ value, children, keepMounted = false, className, ...props }) {
9
9
  const context = useContext(SegmentedTabsContext);
10
10
  if (!context) {
11
11
  throw new Error('SegmentedTabPanel must be used within SegmentedTabsGroup');
@@ -29,7 +29,8 @@ export function SegmentedTabPanel({ value, children, className, ...props }) {
29
29
  tab.focus();
30
30
  }
31
31
  }, [context, value]);
32
- if (context.value !== value)
32
+ const selected = context.value === value;
33
+ if (!selected && !keepMounted)
33
34
  return null;
34
- return (_jsx("div", { ...props, role: "tabpanel", id: context.getPanelId(value), "aria-labelledby": context.getTabId(value), className: cn('hc-segmented-tab-panel', className), onKeyDown: handleKeyDown, children: children }));
35
+ return (_jsx("div", { ...props, role: "tabpanel", id: context.getPanelId(value), "aria-labelledby": context.getTabId(value), hidden: !selected, className: cn('hc-segmented-tab-panel', className), onKeyDown: handleKeyDown, children: children }));
35
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harborclient/sdk",
3
- "version": "1.6.6",
3
+ "version": "1.7.0",
4
4
  "description": "TypeScript SDK for HarborClient development.",
5
5
  "keywords": [
6
6
  "harborclient",