@forgeax/app-shell 0.63.0 → 0.64.0

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/react.d.ts CHANGED
@@ -336,6 +336,16 @@ interface PanelMembershipObservationOptions<AddEvent = unknown, RemoveEvent = un
336
336
  /** Observe panel membership changes without owning panel or layout policy. */
337
337
  declare function installPanelMembershipObservation<AddEvent, RemoveEvent>(options: PanelMembershipObservationOptions<AddEvent, RemoveEvent>): () => void;
338
338
 
339
+ interface ActivePanelObservationSubscription {
340
+ dispose(): void;
341
+ }
342
+ interface ActivePanelObservationOptions<ChangeEvent = unknown> {
343
+ readonly subscribe: (listener: (event: ChangeEvent) => void) => ActivePanelObservationSubscription;
344
+ readonly onChange: (event: ChangeEvent) => void;
345
+ }
346
+ /** Observe active-panel changes without owning panel selection or reconciliation policy. */
347
+ declare function installActivePanelObservation<ChangeEvent>(options: ActivePanelObservationOptions<ChangeEvent>): () => void;
348
+
339
349
  type PanelContentPadding = 'none' | 'sm' | 'md';
340
350
  type PanelContentScroll = 'none' | 'auto';
341
351
  type PanelContentTone = 'default' | 'surface' | 'tool';
@@ -477,4 +487,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
477
487
  /** Structural shell marker that preserves the caller's semantic element. */
478
488
  declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
479
489
 
480
- export { 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 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, installBoundedFrameRetryLifecycle, installCaptureInteractionObservation, installCustomEventObservation, installDragPresenceLifecycle, installOutsideDismissLifecycle, installPanelMembershipObservation, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, installViewportResizeObservation, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
490
+ 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 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, installOutsideDismissLifecycle, installPanelMembershipObservation, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, installViewportResizeObservation, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
package/dist/react.js CHANGED
@@ -2169,6 +2169,37 @@ function installPanelMembershipObservation(options) {
2169
2169
  };
2170
2170
  }
2171
2171
 
2172
+ // src/active-panel-observation.ts
2173
+ function installActivePanelObservation(options) {
2174
+ let live = true;
2175
+ let subscription;
2176
+ const onChange = (event) => {
2177
+ if (!live) return;
2178
+ try {
2179
+ options.onChange(event);
2180
+ } catch {
2181
+ }
2182
+ };
2183
+ const disposeSubscription = () => {
2184
+ if (!subscription) return;
2185
+ try {
2186
+ subscription.dispose();
2187
+ } catch {
2188
+ }
2189
+ };
2190
+ try {
2191
+ subscription = options.subscribe(onChange);
2192
+ } catch {
2193
+ live = false;
2194
+ disposeSubscription();
2195
+ }
2196
+ return () => {
2197
+ if (!live) return;
2198
+ live = false;
2199
+ disposeSubscription();
2200
+ };
2201
+ }
2202
+
2172
2203
  // src/panel.tsx
2173
2204
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
2174
2205
  function PanelEmptyState({
@@ -2544,6 +2575,7 @@ export {
2544
2575
  createPersistentSizeStore,
2545
2576
  createReplaceableObservationSetLifecycle,
2546
2577
  hashSlotHue,
2578
+ installActivePanelObservation,
2547
2579
  installBoundedFrameRetryLifecycle,
2548
2580
  installCaptureInteractionObservation,
2549
2581
  installCustomEventObservation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeax/app-shell",
3
- "version": "0.63.0",
3
+ "version": "0.64.0",
4
4
  "description": "Generic Dock, Panel, Window, and Slot composition primitives",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",