react-resizable-panels
Advanced tools
Comparing version 2.1.3 to 2.1.4
# Changelog | ||
## 2.1.4 | ||
- Improve TypeScript HTML tag type generics (#407) | ||
- Edge case check to make sure resize handle hasn't been unmounted while dragging (#410) | ||
## 2.1.3 | ||
@@ -4,0 +9,0 @@ |
@@ -33,3 +33,3 @@ import { ForwardedRef, HTMLAttributes, PropsWithChildren, ReactElement } from "./vendor/react.js"; | ||
}; | ||
export type PanelProps = Omit<HTMLAttributes<keyof HTMLElementTagNameMap>, "id" | "onResize"> & PropsWithChildren<{ | ||
export type PanelProps<T extends keyof HTMLElementTagNameMap = keyof HTMLElementTagNameMap> = Omit<HTMLAttributes<HTMLElementTagNameMap[T]>, "id" | "onResize"> & PropsWithChildren<{ | ||
className?: string; | ||
@@ -47,3 +47,3 @@ collapsedSize?: number | undefined; | ||
style?: object; | ||
tagName?: keyof HTMLElementTagNameMap; | ||
tagName?: T; | ||
}>; | ||
@@ -56,3 +56,3 @@ export declare function PanelWithForwardedRef({ children, className: classNameFromProps, collapsedSize, collapsible, defaultSize, forwardedRef, id: idFromProps, maxSize, minSize, onCollapse, onExpand, onResize, order, style: styleFromProps, tagName: Type, ...rest }: PanelProps & { | ||
} | ||
export declare const Panel: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<keyof HTMLElementTagNameMap>, "id" | "onResize"> & { | ||
export declare const Panel: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLObjectElement | HTMLElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLSpanElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & { | ||
className?: string | undefined; | ||
@@ -59,0 +59,0 @@ collapsedSize?: number | undefined; |
{ | ||
"name": "react-resizable-panels", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "React components for resizable panel groups/layouts", | ||
@@ -5,0 +5,0 @@ "author": "Brian Vaughn <brian.david.vaughn@gmail.com>", |
@@ -57,6 +57,5 @@ import { isBrowser } from "#is-browser"; | ||
export type PanelProps = Omit< | ||
HTMLAttributes<keyof HTMLElementTagNameMap>, | ||
"id" | "onResize" | ||
> & | ||
export type PanelProps< | ||
T extends keyof HTMLElementTagNameMap = keyof HTMLElementTagNameMap, | ||
> = Omit<HTMLAttributes<HTMLElementTagNameMap[T]>, "id" | "onResize"> & | ||
PropsWithChildren<{ | ||
@@ -75,3 +74,3 @@ className?: string; | ||
style?: object; | ||
tagName?: keyof HTMLElementTagNameMap; | ||
tagName?: T; | ||
}>; | ||
@@ -78,0 +77,0 @@ |
@@ -200,2 +200,3 @@ import { Direction, ResizeEvent } from "./types"; | ||
targetElement !== null && | ||
document.contains(targetElement) && | ||
dragHandleElement !== targetElement && | ||
@@ -202,0 +203,0 @@ !dragHandleElement.contains(targetElement) && |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1270962
35858
4