@tutti-os/workbench-surface 0.0.74 → 0.0.75

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/dist/index.d.ts CHANGED
@@ -528,10 +528,6 @@ type WorkbenchDockPreviewContent = {
528
528
  };
529
529
  type WorkbenchHostDockPopupPreviewProvider = (input: WorkbenchHostDockPopupItemInput) => WorkbenchDockPreviewContent | null;
530
530
  interface WorkbenchHostDockPopupItemDescriptor {
531
- /**
532
- * @deprecated Use preview with kind: "image".
533
- */
534
- previewImageUrl?: string | null;
535
531
  preview?: WorkbenchDockPreviewContent | null;
536
532
  revision?: string | null;
537
533
  subtitle?: string | null;
@@ -559,6 +555,14 @@ interface WorkbenchHostDockEntry {
559
555
  instanceMode?: WorkbenchHostNodeInstanceStrategy["mode"];
560
556
  launchBehavior?: WorkbenchHostDockEntryLaunchBehavior;
561
557
  launchPayload?: unknown;
558
+ /**
559
+ * Payload used by the dock popup's explicit "New window" action instead of
560
+ * `launchPayload`. Supply this when a normal dock launch reuses/focuses an
561
+ * existing node (e.g. a single logical instance per provider/target) but the
562
+ * "New window" command must always open a fresh node. Falls back to
563
+ * `launchPayload` when omitted.
564
+ */
565
+ newWindowLaunchPayload?: unknown;
562
566
  matchNode?: (node: WorkbenchNode<WorkbenchHostNodeData>) => boolean;
563
567
  order?: number;
564
568
  popupCardLabelMode?: WorkbenchHostDockPopupCardLabelMode;
package/dist/index.js CHANGED
@@ -9471,6 +9471,7 @@ var minimizedDockPreviewViewport = {
9471
9471
  height: 34.2,
9472
9472
  width: 46.8
9473
9473
  };
9474
+ var dockPopupNewWindowLaunchSource = "dock-popup-new-window";
9474
9475
  function stripDockDescriptionTerminalPunctuation(value) {
9475
9476
  const trimmed = value.trim();
9476
9477
  if (!trimmed || trimmed.endsWith("...") || trimmed.endsWith("\u2026")) {
@@ -11239,12 +11240,7 @@ function WorkbenchHostDock({
11239
11240
  node
11240
11241
  };
11241
11242
  const descriptor = popupEntry.entry.resolvePopupItem?.(item) ?? {};
11242
- const descriptorPreviewImageUrl = descriptor.previewImageUrl ?? null;
11243
- const descriptorPreview = descriptor.preview ?? (descriptorPreviewImageUrl ? {
11244
- kind: "image",
11245
- revision: descriptor.revision ?? null,
11246
- src: descriptorPreviewImageUrl
11247
- } : popupEntry.entry.providePopupItemPreview?.(item) ?? null);
11243
+ const descriptorPreview = descriptor.preview ?? popupEntry.entry.providePopupItemPreview?.(item) ?? null;
11248
11244
  return {
11249
11245
  ...item,
11250
11246
  preview: descriptorPreview,
@@ -11293,7 +11289,8 @@ function WorkbenchHostDock({
11293
11289
  popupEntry.entry.id,
11294
11290
  () => host.launchNode({
11295
11291
  dockEntryId: popupEntry.entry.id,
11296
- payload: popupEntry.entry.launchPayload,
11292
+ launchSource: dockPopupNewWindowLaunchSource,
11293
+ payload: popupEntry.entry.newWindowLaunchPayload ?? popupEntry.entry.launchPayload,
11297
11294
  reason: "dock",
11298
11295
  typeId: popupEntry.entry.typeId
11299
11296
  })