@forgeax/app-shell 0.55.0 → 0.56.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 +16 -1
- package/dist/react.js +63 -0
- package/package.json +1 -1
package/dist/react.d.ts
CHANGED
|
@@ -246,6 +246,21 @@ interface BoundedFrameRetryLifecycleOptions {
|
|
|
246
246
|
*/
|
|
247
247
|
declare function installBoundedFrameRetryLifecycle(options: BoundedFrameRetryLifecycleOptions): () => void;
|
|
248
248
|
|
|
249
|
+
interface CoalescedFrameTaskLifecycleOptions {
|
|
250
|
+
readonly task: () => void;
|
|
251
|
+
readonly requestFrame?: (callback: FrameRequestCallback) => number;
|
|
252
|
+
readonly cancelFrame?: (handle: number) => void;
|
|
253
|
+
}
|
|
254
|
+
interface CoalescedFrameTaskLifecycle {
|
|
255
|
+
schedule(): void;
|
|
256
|
+
dispose(): void;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Coalesce repeated requests into one next-frame task. Products own the task;
|
|
260
|
+
* App Shell owns pending-state release, cancellation and stale-callback fencing.
|
|
261
|
+
*/
|
|
262
|
+
declare function createCoalescedFrameTaskLifecycle(options: CoalescedFrameTaskLifecycleOptions): CoalescedFrameTaskLifecycle;
|
|
263
|
+
|
|
249
264
|
type PanelContentPadding = 'none' | 'sm' | 'md';
|
|
250
265
|
type PanelContentScroll = 'none' | 'auto';
|
|
251
266
|
type PanelContentTone = 'default' | 'surface' | 'tool';
|
|
@@ -387,4 +402,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
|
|
|
387
402
|
/** Structural shell marker that preserves the caller's semantic element. */
|
|
388
403
|
declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
|
|
389
404
|
|
|
390
|
-
export { type AnchoredResizeDirection, AnchoredResizeHandle, type AnchoredResizeHandleProps, type AnchoredResizeSession, type BoundedFrameRetryLifecycleOptions, 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, 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, createPersistentSizeStore, hashSlotHue, installBoundedFrameRetryLifecycle, installOutsideDismissLifecycle, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
|
|
405
|
+
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, 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, installOutsideDismissLifecycle, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
|
package/dist/react.js
CHANGED
|
@@ -1794,6 +1794,68 @@ function installBoundedFrameRetryLifecycle(options) {
|
|
|
1794
1794
|
};
|
|
1795
1795
|
}
|
|
1796
1796
|
|
|
1797
|
+
// src/coalesced-frame-task.ts
|
|
1798
|
+
function createCoalescedFrameTaskLifecycle(options) {
|
|
1799
|
+
const requestFrame = options.requestFrame ?? (typeof requestAnimationFrame === "undefined" ? void 0 : requestAnimationFrame.bind(globalThis));
|
|
1800
|
+
const cancelFrame = options.cancelFrame ?? (typeof cancelAnimationFrame === "undefined" ? void 0 : cancelAnimationFrame.bind(globalThis));
|
|
1801
|
+
let disposed = false;
|
|
1802
|
+
let pending = false;
|
|
1803
|
+
let frameHandle = null;
|
|
1804
|
+
let frameGeneration = 0;
|
|
1805
|
+
const schedule = () => {
|
|
1806
|
+
if (disposed || pending || !requestFrame) return;
|
|
1807
|
+
pending = true;
|
|
1808
|
+
const generation = ++frameGeneration;
|
|
1809
|
+
let callbackRan = false;
|
|
1810
|
+
let handle;
|
|
1811
|
+
try {
|
|
1812
|
+
handle = requestFrame(() => {
|
|
1813
|
+
callbackRan = true;
|
|
1814
|
+
if (disposed || !pending || generation !== frameGeneration) return;
|
|
1815
|
+
pending = false;
|
|
1816
|
+
frameHandle = null;
|
|
1817
|
+
frameGeneration++;
|
|
1818
|
+
try {
|
|
1819
|
+
options.task();
|
|
1820
|
+
} catch {
|
|
1821
|
+
}
|
|
1822
|
+
});
|
|
1823
|
+
} catch {
|
|
1824
|
+
if (generation === frameGeneration) {
|
|
1825
|
+
pending = false;
|
|
1826
|
+
frameHandle = null;
|
|
1827
|
+
frameGeneration++;
|
|
1828
|
+
}
|
|
1829
|
+
return;
|
|
1830
|
+
}
|
|
1831
|
+
if (callbackRan) return;
|
|
1832
|
+
if (disposed || !pending || generation !== frameGeneration) {
|
|
1833
|
+
try {
|
|
1834
|
+
cancelFrame?.(handle);
|
|
1835
|
+
} catch {
|
|
1836
|
+
}
|
|
1837
|
+
return;
|
|
1838
|
+
}
|
|
1839
|
+
frameHandle = handle;
|
|
1840
|
+
};
|
|
1841
|
+
return {
|
|
1842
|
+
schedule,
|
|
1843
|
+
dispose() {
|
|
1844
|
+
if (disposed) return;
|
|
1845
|
+
disposed = true;
|
|
1846
|
+
pending = false;
|
|
1847
|
+
frameGeneration++;
|
|
1848
|
+
if (frameHandle !== null) {
|
|
1849
|
+
try {
|
|
1850
|
+
cancelFrame?.(frameHandle);
|
|
1851
|
+
} catch {
|
|
1852
|
+
}
|
|
1853
|
+
frameHandle = null;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
};
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1797
1859
|
// src/panel.tsx
|
|
1798
1860
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1799
1861
|
function PanelEmptyState({
|
|
@@ -2165,6 +2227,7 @@ export {
|
|
|
2165
2227
|
SurfaceRegion,
|
|
2166
2228
|
applyAnchoredResizeDelta,
|
|
2167
2229
|
beginAnchoredResize,
|
|
2230
|
+
createCoalescedFrameTaskLifecycle,
|
|
2168
2231
|
createPersistentSizeStore,
|
|
2169
2232
|
hashSlotHue,
|
|
2170
2233
|
installBoundedFrameRetryLifecycle,
|