@forgeax/app-shell 0.60.0 → 0.61.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 +13 -1
- package/dist/react.js +48 -0
- package/package.json +1 -1
package/dist/react.d.ts
CHANGED
|
@@ -298,6 +298,18 @@ interface CustomEventObservationOptions {
|
|
|
298
298
|
/** Observe a caller-owned custom event without owning its payload or command policy. */
|
|
299
299
|
declare function installCustomEventObservation(options: CustomEventObservationOptions): () => void;
|
|
300
300
|
|
|
301
|
+
interface CaptureInteractionEventTarget {
|
|
302
|
+
addEventListener(type: string, listener: EventListener, capture?: boolean): void;
|
|
303
|
+
removeEventListener(type: string, listener: EventListener, capture?: boolean): void;
|
|
304
|
+
}
|
|
305
|
+
interface CaptureInteractionObservationOptions {
|
|
306
|
+
readonly target?: CaptureInteractionEventTarget;
|
|
307
|
+
readonly onPointerDown: (event: PointerEvent) => void;
|
|
308
|
+
readonly onClick: (event: MouseEvent) => void;
|
|
309
|
+
}
|
|
310
|
+
/** Observe pointerdown and click in capture order without owning interaction policy. */
|
|
311
|
+
declare function installCaptureInteractionObservation(options: CaptureInteractionObservationOptions): () => void;
|
|
312
|
+
|
|
301
313
|
type PanelContentPadding = 'none' | 'sm' | 'md';
|
|
302
314
|
type PanelContentScroll = 'none' | 'auto';
|
|
303
315
|
type PanelContentTone = 'default' | 'surface' | 'tool';
|
|
@@ -439,4 +451,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
|
|
|
439
451
|
/** Structural shell marker that preserves the caller's semantic element. */
|
|
440
452
|
declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
|
|
441
453
|
|
|
442
|
-
export { type AnchoredResizeDirection, AnchoredResizeHandle, type AnchoredResizeHandleProps, type AnchoredResizeSession, type BoundedFrameRetryLifecycleOptions, 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, 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, hashSlotHue, installBoundedFrameRetryLifecycle, installCustomEventObservation, installDragPresenceLifecycle, installOutsideDismissLifecycle, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, installViewportResizeObservation, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
|
|
454
|
+
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, 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, hashSlotHue, installBoundedFrameRetryLifecycle, installCaptureInteractionObservation, installCustomEventObservation, installDragPresenceLifecycle, installOutsideDismissLifecycle, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, installViewportResizeObservation, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
|
package/dist/react.js
CHANGED
|
@@ -2008,6 +2008,53 @@ function installCustomEventObservation(options) {
|
|
|
2008
2008
|
};
|
|
2009
2009
|
}
|
|
2010
2010
|
|
|
2011
|
+
// src/capture-interaction-observation.ts
|
|
2012
|
+
function installCaptureInteractionObservation(options) {
|
|
2013
|
+
const target = options.target ?? (typeof document === "undefined" ? void 0 : document);
|
|
2014
|
+
if (!target) return () => {
|
|
2015
|
+
};
|
|
2016
|
+
let disposed = false;
|
|
2017
|
+
let pointerRegistered = false;
|
|
2018
|
+
let clickRegistered = false;
|
|
2019
|
+
const onPointerDown = (event) => {
|
|
2020
|
+
if (disposed) return;
|
|
2021
|
+
try {
|
|
2022
|
+
options.onPointerDown(event);
|
|
2023
|
+
} catch {
|
|
2024
|
+
}
|
|
2025
|
+
};
|
|
2026
|
+
const onClick = (event) => {
|
|
2027
|
+
if (disposed) return;
|
|
2028
|
+
try {
|
|
2029
|
+
options.onClick(event);
|
|
2030
|
+
} catch {
|
|
2031
|
+
}
|
|
2032
|
+
};
|
|
2033
|
+
const remove = (type, listener, registered) => {
|
|
2034
|
+
if (!registered) return;
|
|
2035
|
+
try {
|
|
2036
|
+
target.removeEventListener(type, listener, true);
|
|
2037
|
+
} catch {
|
|
2038
|
+
}
|
|
2039
|
+
};
|
|
2040
|
+
try {
|
|
2041
|
+
pointerRegistered = true;
|
|
2042
|
+
target.addEventListener("pointerdown", onPointerDown, true);
|
|
2043
|
+
clickRegistered = true;
|
|
2044
|
+
target.addEventListener("click", onClick, true);
|
|
2045
|
+
} catch {
|
|
2046
|
+
disposed = true;
|
|
2047
|
+
remove("click", onClick, clickRegistered);
|
|
2048
|
+
remove("pointerdown", onPointerDown, pointerRegistered);
|
|
2049
|
+
}
|
|
2050
|
+
return () => {
|
|
2051
|
+
if (disposed) return;
|
|
2052
|
+
disposed = true;
|
|
2053
|
+
remove("click", onClick, clickRegistered);
|
|
2054
|
+
remove("pointerdown", onPointerDown, pointerRegistered);
|
|
2055
|
+
};
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2011
2058
|
// src/panel.tsx
|
|
2012
2059
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2013
2060
|
function PanelEmptyState({
|
|
@@ -2383,6 +2430,7 @@ export {
|
|
|
2383
2430
|
createPersistentSizeStore,
|
|
2384
2431
|
hashSlotHue,
|
|
2385
2432
|
installBoundedFrameRetryLifecycle,
|
|
2433
|
+
installCaptureInteractionObservation,
|
|
2386
2434
|
installCustomEventObservation,
|
|
2387
2435
|
installDragPresenceLifecycle,
|
|
2388
2436
|
installOutsideDismissLifecycle,
|