@forgeax/app-shell 0.63.0 → 0.65.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,26 @@ 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
+
349
+ interface LayoutFromJsonObservationSubscription {
350
+ dispose(): void;
351
+ }
352
+ interface LayoutFromJsonObservationOptions<HydrationEvent = unknown> {
353
+ readonly subscribe: (listener: (event: HydrationEvent) => void) => LayoutFromJsonObservationSubscription;
354
+ readonly onHydrated: (event: HydrationEvent) => void;
355
+ }
356
+ /** Observe completed layout hydration without owning product reconciliation policy. */
357
+ declare function installLayoutFromJsonObservation<HydrationEvent>(options: LayoutFromJsonObservationOptions<HydrationEvent>): () => void;
358
+
339
359
  type PanelContentPadding = 'none' | 'sm' | 'md';
340
360
  type PanelContentScroll = 'none' | 'auto';
341
361
  type PanelContentTone = 'default' | 'surface' | 'tool';
@@ -477,4 +497,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
477
497
  /** Structural shell marker that preserves the caller's semantic element. */
478
498
  declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
479
499
 
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 };
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 };
package/dist/react.js CHANGED
@@ -2169,6 +2169,68 @@ 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
+
2203
+ // src/layout-from-json-observation.ts
2204
+ function installLayoutFromJsonObservation(options) {
2205
+ let live = true;
2206
+ let subscription;
2207
+ const onHydrated = (event) => {
2208
+ if (!live) return;
2209
+ try {
2210
+ options.onHydrated(event);
2211
+ } catch {
2212
+ }
2213
+ };
2214
+ const disposeSubscription = () => {
2215
+ if (!subscription) return;
2216
+ try {
2217
+ subscription.dispose();
2218
+ } catch {
2219
+ }
2220
+ };
2221
+ try {
2222
+ subscription = options.subscribe(onHydrated);
2223
+ } catch {
2224
+ live = false;
2225
+ disposeSubscription();
2226
+ }
2227
+ return () => {
2228
+ if (!live) return;
2229
+ live = false;
2230
+ disposeSubscription();
2231
+ };
2232
+ }
2233
+
2172
2234
  // src/panel.tsx
2173
2235
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
2174
2236
  function PanelEmptyState({
@@ -2544,10 +2606,12 @@ export {
2544
2606
  createPersistentSizeStore,
2545
2607
  createReplaceableObservationSetLifecycle,
2546
2608
  hashSlotHue,
2609
+ installActivePanelObservation,
2547
2610
  installBoundedFrameRetryLifecycle,
2548
2611
  installCaptureInteractionObservation,
2549
2612
  installCustomEventObservation,
2550
2613
  installDragPresenceLifecycle,
2614
+ installLayoutFromJsonObservation,
2551
2615
  installOutsideDismissLifecycle,
2552
2616
  installPanelMembershipObservation,
2553
2617
  installPointerDragSession,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeax/app-shell",
3
- "version": "0.63.0",
3
+ "version": "0.65.0",
4
4
  "description": "Generic Dock, Panel, Window, and Slot composition primitives",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",