@forgeax/app-shell 0.62.0 → 0.63.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
@@ -324,6 +324,18 @@ interface ReplaceableObservationSetLifecycle<Item> {
324
324
  /** Own a replaceable set of subscriptions without owning item or event policy. */
325
325
  declare function createReplaceableObservationSetLifecycle<Item, Observation>(options: ReplaceableObservationSetOptions<Item, Observation>): ReplaceableObservationSetLifecycle<Item>;
326
326
 
327
+ interface PanelMembershipObservationSubscription {
328
+ dispose(): void;
329
+ }
330
+ interface PanelMembershipObservationOptions<AddEvent = unknown, RemoveEvent = unknown> {
331
+ readonly subscribeAdd: (listener: (event: AddEvent) => void) => PanelMembershipObservationSubscription;
332
+ readonly subscribeRemove: (listener: (event: RemoveEvent) => void) => PanelMembershipObservationSubscription;
333
+ readonly onAdd: (event: AddEvent) => void;
334
+ readonly onRemove: (event: RemoveEvent) => void;
335
+ }
336
+ /** Observe panel membership changes without owning panel or layout policy. */
337
+ declare function installPanelMembershipObservation<AddEvent, RemoveEvent>(options: PanelMembershipObservationOptions<AddEvent, RemoveEvent>): () => void;
338
+
327
339
  type PanelContentPadding = 'none' | 'sm' | 'md';
328
340
  type PanelContentScroll = 'none' | 'auto';
329
341
  type PanelContentTone = 'default' | 'surface' | 'tool';
@@ -465,4 +477,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
465
477
  /** Structural shell marker that preserves the caller's semantic element. */
466
478
  declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
467
479
 
468
- 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, 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, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, installViewportResizeObservation, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
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 };
package/dist/react.js CHANGED
@@ -2127,6 +2127,48 @@ function createReplaceableObservationSetLifecycle(options) {
2127
2127
  };
2128
2128
  }
2129
2129
 
2130
+ // src/panel-membership-observation.ts
2131
+ function installPanelMembershipObservation(options) {
2132
+ let live = true;
2133
+ let addSubscription;
2134
+ let removeSubscription;
2135
+ const onAdd = (event) => {
2136
+ if (!live) return;
2137
+ try {
2138
+ options.onAdd(event);
2139
+ } catch {
2140
+ }
2141
+ };
2142
+ const onRemove = (event) => {
2143
+ if (!live) return;
2144
+ try {
2145
+ options.onRemove(event);
2146
+ } catch {
2147
+ }
2148
+ };
2149
+ const disposeOne = (subscription) => {
2150
+ if (!subscription) return;
2151
+ try {
2152
+ subscription.dispose();
2153
+ } catch {
2154
+ }
2155
+ };
2156
+ try {
2157
+ addSubscription = options.subscribeAdd(onAdd);
2158
+ removeSubscription = options.subscribeRemove(onRemove);
2159
+ } catch {
2160
+ live = false;
2161
+ disposeOne(removeSubscription);
2162
+ disposeOne(addSubscription);
2163
+ }
2164
+ return () => {
2165
+ if (!live) return;
2166
+ live = false;
2167
+ disposeOne(removeSubscription);
2168
+ disposeOne(addSubscription);
2169
+ };
2170
+ }
2171
+
2130
2172
  // src/panel.tsx
2131
2173
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
2132
2174
  function PanelEmptyState({
@@ -2507,6 +2549,7 @@ export {
2507
2549
  installCustomEventObservation,
2508
2550
  installDragPresenceLifecycle,
2509
2551
  installOutsideDismissLifecycle,
2552
+ installPanelMembershipObservation,
2510
2553
  installPointerDragSession,
2511
2554
  installPointerReorderSession,
2512
2555
  installThresholdPointerDragSession,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeax/app-shell",
3
- "version": "0.62.0",
3
+ "version": "0.63.0",
4
4
  "description": "Generic Dock, Panel, Window, and Slot composition primitives",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",