@copilotkit/web-inspector 1.55.0-next.7 → 1.55.0-next.9

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
@@ -1,5 +1,17 @@
1
1
  # @copilotkit/web-inspector
2
2
 
3
+ ## 1.55.0-next.9
4
+
5
+ ### Patch Changes
6
+
7
+ - @copilotkit/core@1.55.0-next.9
8
+
9
+ ## 1.55.0-next.8
10
+
11
+ ### Patch Changes
12
+
13
+ - @copilotkit/core@1.55.0-next.8
14
+
3
15
  ## 1.55.0-next.7
4
16
 
5
17
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -87,6 +87,7 @@ var WebInspectorElement = class extends lit.LitElement {
87
87
  this.dockMode = "floating";
88
88
  this.previousBodyMargins = null;
89
89
  this.transitionTimeoutId = null;
90
+ this.bodyTransitionTimeoutIds = /* @__PURE__ */ new Set();
90
91
  this.pendingSelectedContext = null;
91
92
  this.autoAttachCore = true;
92
93
  this.attemptedAutoAttach = false;
@@ -1028,7 +1029,13 @@ ${argsString}</pre
1028
1029
  window.removeEventListener("resize", this.handleResize);
1029
1030
  window.removeEventListener("pointerdown", this.handleGlobalPointerDown);
1030
1031
  }
1031
- this.removeDockStyles();
1032
+ for (const id of this.bodyTransitionTimeoutIds) clearTimeout(id);
1033
+ this.bodyTransitionTimeoutIds.clear();
1034
+ if (this.transitionTimeoutId !== null) {
1035
+ clearTimeout(this.transitionTimeoutId);
1036
+ this.transitionTimeoutId = null;
1037
+ }
1038
+ this.removeDockStyles(true);
1032
1039
  this.detachFromCore();
1033
1040
  }
1034
1041
  firstUpdated() {
@@ -1413,13 +1420,17 @@ ${argsString}</pre
1413
1420
  };
1414
1421
  if (!this.isResizing && !skipTransition) document.body.style.transition = "margin 300ms ease";
1415
1422
  if (this.dockMode === "docked-left") document.body.style.marginLeft = `${this.contextState.window.size.width}px`;
1416
- if (!this.isResizing && !skipTransition) setTimeout(() => {
1417
- if (document.body) document.body.style.transition = "";
1418
- }, 300);
1423
+ if (!this.isResizing && !skipTransition) {
1424
+ const id = setTimeout(() => {
1425
+ this.bodyTransitionTimeoutIds.delete(id);
1426
+ if (typeof document !== "undefined" && document.body) document.body.style.transition = "";
1427
+ }, 300);
1428
+ this.bodyTransitionTimeoutIds.add(id);
1429
+ }
1419
1430
  }
1420
- removeDockStyles() {
1431
+ removeDockStyles(skipTransition = false) {
1421
1432
  if (typeof document === "undefined" || !document.body) return;
1422
- if (!this.isResizing) document.body.style.transition = "margin 300ms ease";
1433
+ if (!this.isResizing && !skipTransition) document.body.style.transition = "margin 300ms ease";
1423
1434
  if (this.previousBodyMargins) {
1424
1435
  document.body.style.marginLeft = this.previousBodyMargins.left;
1425
1436
  document.body.style.marginBottom = this.previousBodyMargins.bottom;
@@ -1428,9 +1439,13 @@ ${argsString}</pre
1428
1439
  document.body.style.marginLeft = "";
1429
1440
  document.body.style.marginBottom = "";
1430
1441
  }
1431
- setTimeout(() => {
1432
- if (document.body) document.body.style.transition = "";
1433
- }, 300);
1442
+ if (!skipTransition) {
1443
+ const id = setTimeout(() => {
1444
+ this.bodyTransitionTimeoutIds.delete(id);
1445
+ if (typeof document !== "undefined" && document.body) document.body.style.transition = "";
1446
+ }, 300);
1447
+ this.bodyTransitionTimeoutIds.add(id);
1448
+ } else document.body.style.transition = "";
1434
1449
  }
1435
1450
  updateHostTransform(context = this.activeContext) {
1436
1451
  if (context !== this.activeContext) return;