@forgeax/app-shell 0.58.0 → 0.60.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 +24 -1
- package/dist/react.js +78 -0
- package/package.json +1 -1
package/dist/react.d.ts
CHANGED
|
@@ -275,6 +275,29 @@ interface DragPresenceLifecycleOptions {
|
|
|
275
275
|
/** Own one HTML5 drag-presence lease without owning target or presentation policy. */
|
|
276
276
|
declare function installDragPresenceLifecycle(options: DragPresenceLifecycleOptions): () => void;
|
|
277
277
|
|
|
278
|
+
interface ViewportResizeEventTarget {
|
|
279
|
+
addEventListener(type: 'resize', listener: EventListener): void;
|
|
280
|
+
removeEventListener(type: 'resize', listener: EventListener): void;
|
|
281
|
+
}
|
|
282
|
+
interface ViewportResizeObservationOptions {
|
|
283
|
+
readonly target?: ViewportResizeEventTarget;
|
|
284
|
+
readonly onResize: () => void;
|
|
285
|
+
}
|
|
286
|
+
/** Observe viewport resize without owning the caller's geometry policy. */
|
|
287
|
+
declare function installViewportResizeObservation(options: ViewportResizeObservationOptions): () => void;
|
|
288
|
+
|
|
289
|
+
interface CustomEventObservationTarget {
|
|
290
|
+
addEventListener(type: string, listener: EventListener): void;
|
|
291
|
+
removeEventListener(type: string, listener: EventListener): void;
|
|
292
|
+
}
|
|
293
|
+
interface CustomEventObservationOptions {
|
|
294
|
+
readonly eventType: string;
|
|
295
|
+
readonly target?: CustomEventObservationTarget;
|
|
296
|
+
readonly onEvent: (event: Event) => void;
|
|
297
|
+
}
|
|
298
|
+
/** Observe a caller-owned custom event without owning its payload or command policy. */
|
|
299
|
+
declare function installCustomEventObservation(options: CustomEventObservationOptions): () => void;
|
|
300
|
+
|
|
278
301
|
type PanelContentPadding = 'none' | 'sm' | 'md';
|
|
279
302
|
type PanelContentScroll = 'none' | 'auto';
|
|
280
303
|
type PanelContentTone = 'default' | 'surface' | 'tool';
|
|
@@ -416,4 +439,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
|
|
|
416
439
|
/** Structural shell marker that preserves the caller's semantic element. */
|
|
417
440
|
declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
|
|
418
441
|
|
|
419
|
-
export { type AnchoredResizeDirection, AnchoredResizeHandle, type AnchoredResizeHandleProps, type AnchoredResizeSession, type BoundedFrameRetryLifecycleOptions, type CoalescedFrameTaskLifecycle, type CoalescedFrameTaskLifecycleOptions, 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, applyAnchoredResizeDelta, beginAnchoredResize, createCoalescedFrameTaskLifecycle, createPersistentSizeStore, hashSlotHue, installBoundedFrameRetryLifecycle, installDragPresenceLifecycle, installOutsideDismissLifecycle, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
|
|
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 };
|
package/dist/react.js
CHANGED
|
@@ -1932,6 +1932,82 @@ function installDragPresenceLifecycle(options) {
|
|
|
1932
1932
|
};
|
|
1933
1933
|
}
|
|
1934
1934
|
|
|
1935
|
+
// src/viewport-resize.ts
|
|
1936
|
+
function installViewportResizeObservation(options) {
|
|
1937
|
+
const target = options.target ?? (typeof window === "undefined" ? void 0 : window);
|
|
1938
|
+
if (!target) return () => {
|
|
1939
|
+
};
|
|
1940
|
+
let disposed = false;
|
|
1941
|
+
let registered = false;
|
|
1942
|
+
const onResize = () => {
|
|
1943
|
+
if (disposed) return;
|
|
1944
|
+
try {
|
|
1945
|
+
options.onResize();
|
|
1946
|
+
} catch {
|
|
1947
|
+
}
|
|
1948
|
+
};
|
|
1949
|
+
try {
|
|
1950
|
+
registered = true;
|
|
1951
|
+
target.addEventListener("resize", onResize);
|
|
1952
|
+
} catch {
|
|
1953
|
+
disposed = true;
|
|
1954
|
+
if (registered) {
|
|
1955
|
+
try {
|
|
1956
|
+
target.removeEventListener("resize", onResize);
|
|
1957
|
+
} catch {
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
return () => {
|
|
1962
|
+
if (disposed) return;
|
|
1963
|
+
disposed = true;
|
|
1964
|
+
if (registered) {
|
|
1965
|
+
try {
|
|
1966
|
+
target.removeEventListener("resize", onResize);
|
|
1967
|
+
} catch {
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
};
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
// src/custom-event-observation.ts
|
|
1974
|
+
function installCustomEventObservation(options) {
|
|
1975
|
+
const target = options.target ?? (typeof window === "undefined" ? void 0 : window);
|
|
1976
|
+
if (!target) return () => {
|
|
1977
|
+
};
|
|
1978
|
+
let disposed = false;
|
|
1979
|
+
let registered = false;
|
|
1980
|
+
const listener = (event) => {
|
|
1981
|
+
if (disposed) return;
|
|
1982
|
+
try {
|
|
1983
|
+
options.onEvent(event);
|
|
1984
|
+
} catch {
|
|
1985
|
+
}
|
|
1986
|
+
};
|
|
1987
|
+
try {
|
|
1988
|
+
registered = true;
|
|
1989
|
+
target.addEventListener(options.eventType, listener);
|
|
1990
|
+
} catch {
|
|
1991
|
+
disposed = true;
|
|
1992
|
+
if (registered) {
|
|
1993
|
+
try {
|
|
1994
|
+
target.removeEventListener(options.eventType, listener);
|
|
1995
|
+
} catch {
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
return () => {
|
|
2000
|
+
if (disposed) return;
|
|
2001
|
+
disposed = true;
|
|
2002
|
+
if (registered) {
|
|
2003
|
+
try {
|
|
2004
|
+
target.removeEventListener(options.eventType, listener);
|
|
2005
|
+
} catch {
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
};
|
|
2009
|
+
}
|
|
2010
|
+
|
|
1935
2011
|
// src/panel.tsx
|
|
1936
2012
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1937
2013
|
function PanelEmptyState({
|
|
@@ -2307,11 +2383,13 @@ export {
|
|
|
2307
2383
|
createPersistentSizeStore,
|
|
2308
2384
|
hashSlotHue,
|
|
2309
2385
|
installBoundedFrameRetryLifecycle,
|
|
2386
|
+
installCustomEventObservation,
|
|
2310
2387
|
installDragPresenceLifecycle,
|
|
2311
2388
|
installOutsideDismissLifecycle,
|
|
2312
2389
|
installPointerDragSession,
|
|
2313
2390
|
installPointerReorderSession,
|
|
2314
2391
|
installThresholdPointerDragSession,
|
|
2392
|
+
installViewportResizeObservation,
|
|
2315
2393
|
isDismissExemptInteractionTarget,
|
|
2316
2394
|
isSlotDebugEnabled,
|
|
2317
2395
|
useDockLayoutControlBinding,
|