mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
- Removed all Snow consensus code and dependencies - Replaced snow.Context with consensuscontext.Context - Updated all imports and references - Added comprehensive test suites for core packages - Fixed all build errors and test failures - Achieved 100% test pass rate (21 packages passing) - Improved test coverage to 30% Breaking changes: - Removed snow package entirely - Changed VM interface to use VMState instead of snow.State - Updated ChainContext structure Tests added: - core/app_error_test.go: 100% coverage - core/bootstrap_test.go: comprehensive concurrent tests - core/health_test.go: full integration tests - validators/validators_test.go: complete interface tests - version/version_test.go: 100% coverage - codec/codec_test.go: marshal/unmarshal tests - context/context_test.go: all functions tested
52 lines
2.3 KiB
TypeScript
52 lines
2.3 KiB
TypeScript
import * as React from 'react';
|
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
|
|
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
interface DismissableLayerProps extends PrimitiveDivProps {
|
|
/**
|
|
* When `true`, hover/focus/click interactions will be disabled on elements outside
|
|
* the `DismissableLayer`. Users will need to click twice on outside elements to
|
|
* interact with them: once to close the `DismissableLayer`, and again to trigger the element.
|
|
*/
|
|
disableOutsidePointerEvents?: boolean;
|
|
/**
|
|
* Event handler called when the escape key is down.
|
|
* Can be prevented.
|
|
*/
|
|
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
/**
|
|
* Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.
|
|
* Can be prevented.
|
|
*/
|
|
onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
|
|
/**
|
|
* Event handler called when the focus moves outside of the `DismissableLayer`.
|
|
* Can be prevented.
|
|
*/
|
|
onFocusOutside?: (event: FocusOutsideEvent) => void;
|
|
/**
|
|
* Event handler called when an interaction happens outside the `DismissableLayer`.
|
|
* Specifically, when a `pointerdown` event happens outside or focus moves outside of it.
|
|
* Can be prevented.
|
|
*/
|
|
onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
|
|
/**
|
|
* Handler called when the `DismissableLayer` should be dismissed
|
|
*/
|
|
onDismiss?: () => void;
|
|
}
|
|
declare const DismissableLayer: React.ForwardRefExoticComponent<DismissableLayerProps & React.RefAttributes<HTMLDivElement>>;
|
|
interface DismissableLayerBranchProps extends PrimitiveDivProps {
|
|
}
|
|
declare const DismissableLayerBranch: React.ForwardRefExoticComponent<DismissableLayerBranchProps & React.RefAttributes<HTMLDivElement>>;
|
|
type PointerDownOutsideEvent = CustomEvent<{
|
|
originalEvent: PointerEvent;
|
|
}>;
|
|
type FocusOutsideEvent = CustomEvent<{
|
|
originalEvent: FocusEvent;
|
|
}>;
|
|
declare const Root: React.ForwardRefExoticComponent<DismissableLayerProps & React.RefAttributes<HTMLDivElement>>;
|
|
declare const Branch: React.ForwardRefExoticComponent<DismissableLayerBranchProps & React.RefAttributes<HTMLDivElement>>;
|
|
|
|
export { Branch, DismissableLayer, DismissableLayerBranch, type DismissableLayerProps, Root };
|