@harborclient/sdk 1.6.6 → 1.6.7
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,10 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 1.6.7 - 2026-08-05
|
|
8
|
+
|
|
9
|
+
- Refactor Team Hub integration to support tenantId. (`1baf9475`)
|
|
10
|
+
|
|
7
11
|
## 1.6.6 - 2026-08-05
|
|
8
12
|
|
|
9
13
|
- 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
|
-
*
|
|
44
|
-
* (CodeMirror may collapse into the gutter in the same event
|
|
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
|
|
121
|
-
*
|
|
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
|
|
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;;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
|
|
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,q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,IAAI,gCAAgC,CASzF;AA0BD;;;;;;;;;;GAUG;AACH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,gCAAgC,EAC5C,MAAM,EAAE,0BAA0B,EAClC,OAAO,EAAE;IACP,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,mBAAmB,EAAE,CAAC,KAAK,EAAE,2BAA2B,GAAG,IAAI,KAAK,IAAI,CAAC;IACzE,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,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,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
|
|
75
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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') {
|