@nice-code/action 0.4.3 → 0.4.4

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.
@@ -5166,7 +5166,7 @@ function DevtoolsLauncher({ items }) {
5166
5166
 
5167
5167
  // src/devtools/browser/devtools_dock.ts
5168
5168
  var GLOBAL_KEY = "__NICE_DEVTOOLS_DOCK__";
5169
- var VERSION = 2;
5169
+ var VERSION = 4;
5170
5170
  function createCoordinator() {
5171
5171
  const panels = new Map;
5172
5172
  const listeners = new Set;
@@ -5226,17 +5226,25 @@ function createCoordinator() {
5226
5226
  const anyOpen = list.some((p) => p.open);
5227
5227
  const firstId = list.length > 0 ? list[0].id : null;
5228
5228
  let dockOffset = 0;
5229
+ let stacked = false;
5229
5230
  const self = panels.get(id);
5230
5231
  if (self != null && self.open) {
5232
+ let seenSelf = false;
5231
5233
  for (const panel of list) {
5232
- if (panel.id === id)
5233
- break;
5234
- if (panel.open && panel.side === self.side)
5235
- dockOffset += panel.size;
5234
+ if (panel.id === id) {
5235
+ seenSelf = true;
5236
+ continue;
5237
+ }
5238
+ if (panel.open && panel.side === self.side) {
5239
+ stacked = true;
5240
+ if (!seenSelf)
5241
+ dockOffset += panel.size;
5242
+ }
5236
5243
  }
5237
5244
  }
5238
5245
  return {
5239
5246
  dockOffset,
5247
+ stacked,
5240
5248
  anyOpen,
5241
5249
  isPrimary: id === firstId,
5242
5250
  devtools: list.map(toRef),
@@ -5468,7 +5476,31 @@ function NiceActionDevtools_Panel({
5468
5476
  flexDirection: "column",
5469
5477
  boxShadow: "0 -4px 24px rgba(0,0,0,0.4)",
5470
5478
  overflow: "hidden",
5471
- ...dockSide === "bottom" ? { bottom: view.dockOffset, left: 0, right: 0, height: `${dockedSize}px`, borderRadius: "8px 8px 0 0" } : dockSide === "top" ? { top: view.dockOffset, left: 0, right: 0, height: `${dockedSize}px`, borderRadius: "0 0 8px 8px" } : dockSide === "left" ? { top: 0, left: view.dockOffset, bottom: 0, width: `${dockedSize}px`, borderRadius: "0 8px 8px 0" } : { top: 0, right: view.dockOffset, bottom: 0, width: `${dockedSize}px`, borderRadius: "8px 0 0 8px" }
5479
+ ...dockSide === "bottom" ? {
5480
+ bottom: view.dockOffset,
5481
+ left: 0,
5482
+ right: 0,
5483
+ height: `${dockedSize}px`,
5484
+ borderRadius: view.stacked ? "0" : "8px 8px 0 0"
5485
+ } : dockSide === "top" ? {
5486
+ top: view.dockOffset,
5487
+ left: 0,
5488
+ right: 0,
5489
+ height: `${dockedSize}px`,
5490
+ borderRadius: view.stacked ? "0" : "0 0 8px 8px"
5491
+ } : dockSide === "left" ? {
5492
+ top: 0,
5493
+ left: view.dockOffset,
5494
+ bottom: 0,
5495
+ width: `${dockedSize}px`,
5496
+ borderRadius: view.stacked ? "0" : "0 8px 8px 0"
5497
+ } : {
5498
+ top: 0,
5499
+ right: view.dockOffset,
5500
+ bottom: 0,
5501
+ width: `${dockedSize}px`,
5502
+ borderRadius: view.stacked ? "0" : "8px 0 0 8px"
5503
+ }
5472
5504
  };
5473
5505
  const selectedEntryParent = selectedEntry?.parentCuid != null ? entries.find((e) => e.cuid === selectedEntry.parentCuid) ?? null : null;
5474
5506
  const selectedEntryChildren = selectedEntry != null ? [...entries].filter((e) => e.parentCuid === selectedEntry.cuid).sort((a, b) => a.startTime - b.startTime) : [];
@@ -23,6 +23,13 @@ export interface IDockDevtoolInput extends IDockDevtoolSync {
23
23
  export interface IDockView {
24
24
  /** Offset (px) from the docked edge — stacks open panels on the same side. */
25
25
  dockOffset: number;
26
+ /**
27
+ * True when this panel shares its dock side with another open panel (stacked
28
+ * either nearer or further from the edge). Stacked panels square off all their
29
+ * corners so they sit flush as one continuous block — only a panel alone on
30
+ * its side keeps its rounded, page-facing corners.
31
+ */
32
+ stacked: boolean;
26
33
  /** Is any devtool on the page currently open? */
27
34
  anyOpen: boolean;
28
35
  /** First-registered devtool — the one that renders the combined launcher. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-code/action",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -44,9 +44,9 @@
44
44
  "build-types": "tsc --project tsconfig.build.json"
45
45
  },
46
46
  "dependencies": {
47
- "@nice-code/common-errors": "0.4.3",
48
- "@nice-code/error": "0.4.3",
49
- "@nice-code/util": "0.4.3",
47
+ "@nice-code/common-errors": "0.4.4",
48
+ "@nice-code/error": "0.4.4",
49
+ "@nice-code/util": "0.4.4",
50
50
  "@standard-schema/spec": "^1.1.0",
51
51
  "@tanstack/react-virtual": "^3.13.26",
52
52
  "http-status-codes": "^2.3.0",