@forgeax/app-shell 0.65.1 → 0.66.1

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.
@@ -264,7 +264,8 @@ function createDockLayoutPersistence(adapter) {
264
264
  }
265
265
  function installDockLayoutObservation(source, adapter) {
266
266
  let active = true;
267
- const subscription = source.onDidLayoutChange(() => {
267
+ let subscription;
268
+ const onDidLayoutChange = () => {
268
269
  if (!active) return;
269
270
  let scope;
270
271
  try {
@@ -285,12 +286,21 @@ function installDockLayoutObservation(source, adapter) {
285
286
  adapter.onCommitted();
286
287
  } catch {
287
288
  }
288
- });
289
+ };
290
+ try {
291
+ subscription = source.onDidLayoutChange(onDidLayoutChange);
292
+ } catch {
293
+ active = false;
294
+ try {
295
+ subscription?.dispose();
296
+ } catch {
297
+ }
298
+ }
289
299
  return () => {
290
300
  if (!active) return;
291
301
  active = false;
292
302
  try {
293
- subscription.dispose();
303
+ subscription?.dispose();
294
304
  } catch {
295
305
  }
296
306
  };
package/dist/dock.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  replaceDockReadyAdapters,
29
29
  resolveRegion,
30
30
  trackDockPanelVisibility
31
- } from "./chunk-MYY2LEZI.js";
31
+ } from "./chunk-ZRVT36QD.js";
32
32
  export {
33
33
  DOCK_REGIONS,
34
34
  REGIONS,
package/dist/react.d.ts CHANGED
@@ -356,6 +356,16 @@ interface LayoutFromJsonObservationOptions<HydrationEvent = unknown> {
356
356
  /** Observe completed layout hydration without owning product reconciliation policy. */
357
357
  declare function installLayoutFromJsonObservation<HydrationEvent>(options: LayoutFromJsonObservationOptions<HydrationEvent>): () => void;
358
358
 
359
+ interface WillDropObservationSubscription {
360
+ dispose(): void;
361
+ }
362
+ interface WillDropObservationOptions<DropEvent = unknown> {
363
+ readonly subscribe: (listener: (event: DropEvent) => void) => WillDropObservationSubscription;
364
+ readonly onWillDrop: (event: DropEvent) => void;
365
+ }
366
+ /** Observe pending drops without owning target validation or mutation policy. */
367
+ declare function installWillDropObservation<DropEvent>(options: WillDropObservationOptions<DropEvent>): () => void;
368
+
359
369
  type PanelContentPadding = 'none' | 'sm' | 'md';
360
370
  type PanelContentScroll = 'none' | 'auto';
361
371
  type PanelContentTone = 'default' | 'surface' | 'tool';
@@ -497,4 +507,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
497
507
  /** Structural shell marker that preserves the caller's semantic element. */
498
508
  declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
499
509
 
500
- export { type ActivePanelObservationOptions, type ActivePanelObservationSubscription, type AnchoredResizeDirection, AnchoredResizeHandle, type AnchoredResizeHandleProps, type AnchoredResizeSession, type BoundedFrameRetryLifecycleOptions, type CaptureInteractionEventTarget, type CaptureInteractionObservationOptions, type CoalescedFrameTaskLifecycle, type CoalescedFrameTaskLifecycleOptions, type CustomEventObservationOptions, type CustomEventObservationTarget, DetachedPanelBoundary, type DetachedPanelBoundaryProps, DetachedSurfaceFrame, type DetachedSurfaceFrameProps, DetachedSurfaceStatus, type DetachedSurfaceStatusProps, type DetachedSurfaceStatusTone, type DockLayoutControlBinding, type DockLayoutControlBindingOptions, DockLayoutMenu, type DockLayoutMenuPanel, type DockLayoutMenuProps, DockTabAction, type DockTabActionProps, DockTabFrame, type DockTabFrameProps, DockTabIcon, type DockTabIconProps, DockTabStatusSummary, type DockTabStatusSummaryItem, type DockTabStatusSummaryProps, type DockTabStatusTone, DockTabTitle, type DockTabTitleProps, type DragPresenceEventTarget, type DragPresenceLifecycleOptions, FloatingMenu, type FloatingMenuAnchor, type FloatingMenuPoint, type FloatingMenuProps, type LayoutFromJsonObservationOptions, type LayoutFromJsonObservationSubscription, type LiveTabPlacement, type LiveTabPlacementSource, type LiveTabTitleSource, OWNED_INTERACTION_SURFACE_SELECTOR, type OutsideDismissEventTarget, type OutsideDismissLifecycleOptions, type OutsideDismissReason, type PanelContentPadding, type PanelContentPolicy, type PanelContentScroll, type PanelContentTone, PanelEmptyState, type PanelEmptyStateProps, type PanelMembershipObservationOptions, type PanelMembershipObservationSubscription, PanelSurface, type PanelSurfaceProps, type PersistentSizeStorage, type PersistentSizeStore, type PersistentSizeStoreOptions, type PersistentSizeUpdate, type PointerDragFinishReason, type PointerDragSessionOptions, type PointerReorderFinishReason, type PointerReorderSession, type PointerReorderSessionOptions, type ReplaceableObservationSetLifecycle, type ReplaceableObservationSetOptions, type ReplaceableObservationSubscription, ResizeHandle, type ResizeHandleProps, ShellSlot, type ShellSlotElement, type ShellSlotProps, SlotDebugOverlay, SurfacePlaceholder, type SurfacePlaceholderProps, SurfaceRegion, type SurfaceRegionProps, type TabCloseInteractions, type TabCloseInteractionsOptions, type TabPinnedStateSource, type ThresholdPointerDragFinishReason, type ThresholdPointerDragSession, type ThresholdPointerDragSessionOptions, type ViewportResizeEventTarget, type ViewportResizeObservationOptions, applyAnchoredResizeDelta, beginAnchoredResize, createCoalescedFrameTaskLifecycle, createPersistentSizeStore, createReplaceableObservationSetLifecycle, hashSlotHue, installActivePanelObservation, installBoundedFrameRetryLifecycle, installCaptureInteractionObservation, installCustomEventObservation, installDragPresenceLifecycle, installLayoutFromJsonObservation, installOutsideDismissLifecycle, installPanelMembershipObservation, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, installViewportResizeObservation, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
510
+ export { type ActivePanelObservationOptions, type ActivePanelObservationSubscription, type AnchoredResizeDirection, AnchoredResizeHandle, type AnchoredResizeHandleProps, type AnchoredResizeSession, type BoundedFrameRetryLifecycleOptions, type CaptureInteractionEventTarget, type CaptureInteractionObservationOptions, type CoalescedFrameTaskLifecycle, type CoalescedFrameTaskLifecycleOptions, type CustomEventObservationOptions, type CustomEventObservationTarget, DetachedPanelBoundary, type DetachedPanelBoundaryProps, DetachedSurfaceFrame, type DetachedSurfaceFrameProps, DetachedSurfaceStatus, type DetachedSurfaceStatusProps, type DetachedSurfaceStatusTone, type DockLayoutControlBinding, type DockLayoutControlBindingOptions, DockLayoutMenu, type DockLayoutMenuPanel, type DockLayoutMenuProps, DockTabAction, type DockTabActionProps, DockTabFrame, type DockTabFrameProps, DockTabIcon, type DockTabIconProps, DockTabStatusSummary, type DockTabStatusSummaryItem, type DockTabStatusSummaryProps, type DockTabStatusTone, DockTabTitle, type DockTabTitleProps, type DragPresenceEventTarget, type DragPresenceLifecycleOptions, FloatingMenu, type FloatingMenuAnchor, type FloatingMenuPoint, type FloatingMenuProps, type LayoutFromJsonObservationOptions, type LayoutFromJsonObservationSubscription, type LiveTabPlacement, type LiveTabPlacementSource, type LiveTabTitleSource, OWNED_INTERACTION_SURFACE_SELECTOR, type OutsideDismissEventTarget, type OutsideDismissLifecycleOptions, type OutsideDismissReason, type PanelContentPadding, type PanelContentPolicy, type PanelContentScroll, type PanelContentTone, PanelEmptyState, type PanelEmptyStateProps, type PanelMembershipObservationOptions, type PanelMembershipObservationSubscription, PanelSurface, type PanelSurfaceProps, type PersistentSizeStorage, type PersistentSizeStore, type PersistentSizeStoreOptions, type PersistentSizeUpdate, type PointerDragFinishReason, type PointerDragSessionOptions, type PointerReorderFinishReason, type PointerReorderSession, type PointerReorderSessionOptions, type ReplaceableObservationSetLifecycle, type ReplaceableObservationSetOptions, type ReplaceableObservationSubscription, ResizeHandle, type ResizeHandleProps, ShellSlot, type ShellSlotElement, type ShellSlotProps, SlotDebugOverlay, SurfacePlaceholder, type SurfacePlaceholderProps, SurfaceRegion, type SurfaceRegionProps, type TabCloseInteractions, type TabCloseInteractionsOptions, type TabPinnedStateSource, type ThresholdPointerDragFinishReason, type ThresholdPointerDragSession, type ThresholdPointerDragSessionOptions, type ViewportResizeEventTarget, type ViewportResizeObservationOptions, type WillDropObservationOptions, type WillDropObservationSubscription, applyAnchoredResizeDelta, beginAnchoredResize, createCoalescedFrameTaskLifecycle, createPersistentSizeStore, createReplaceableObservationSetLifecycle, hashSlotHue, installActivePanelObservation, installBoundedFrameRetryLifecycle, installCaptureInteractionObservation, installCustomEventObservation, installDragPresenceLifecycle, installLayoutFromJsonObservation, installOutsideDismissLifecycle, installPanelMembershipObservation, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, installViewportResizeObservation, installWillDropObservation, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
package/dist/react.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createDockLayoutPanelControl,
3
3
  installDockLayoutControlToggle
4
- } from "./chunk-MYY2LEZI.js";
4
+ } from "./chunk-ZRVT36QD.js";
5
5
  import {
6
6
  shouldShowDetachedPlaceholder
7
7
  } from "./chunk-QMT4V6XC.js";
@@ -1807,6 +1807,37 @@ function installLayoutFromJsonObservation(options) {
1807
1807
  };
1808
1808
  }
1809
1809
 
1810
+ // src/will-drop-observation.ts
1811
+ function installWillDropObservation(options) {
1812
+ let live = true;
1813
+ let subscription;
1814
+ const onWillDrop = (event) => {
1815
+ if (!live) return;
1816
+ try {
1817
+ options.onWillDrop(event);
1818
+ } catch {
1819
+ }
1820
+ };
1821
+ const disposeSubscription = () => {
1822
+ if (!subscription) return;
1823
+ try {
1824
+ subscription.dispose();
1825
+ } catch {
1826
+ }
1827
+ };
1828
+ try {
1829
+ subscription = options.subscribe(onWillDrop);
1830
+ } catch {
1831
+ live = false;
1832
+ disposeSubscription();
1833
+ }
1834
+ return () => {
1835
+ if (!live) return;
1836
+ live = false;
1837
+ disposeSubscription();
1838
+ };
1839
+ }
1840
+
1810
1841
  // src/panel.tsx
1811
1842
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1812
1843
  function PanelEmptyState({
@@ -2194,6 +2225,7 @@ export {
2194
2225
  installPointerReorderSession,
2195
2226
  installThresholdPointerDragSession,
2196
2227
  installViewportResizeObservation,
2228
+ installWillDropObservation,
2197
2229
  isDismissExemptInteractionTarget,
2198
2230
  isSlotDebugEnabled,
2199
2231
  useDockLayoutControlBinding,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeax/app-shell",
3
- "version": "0.65.1",
3
+ "version": "0.66.1",
4
4
  "description": "Generic Dock, Panel, Window, and Slot composition primitives",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",