react-resizable-panels
Advanced tools
Comparing version 2.0.12 to 2.0.13
# Changelog | ||
## 2.0.13 | ||
- Fix potential cycle in stacking-order logic for an unmounted node (#317) | ||
## 2.0.12 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "react-resizable-panels", | ||
"version": "2.0.12", | ||
"version": "2.0.13", | ||
"description": "React components for resizable panel groups/layouts", | ||
@@ -63,8 +63,2 @@ "author": "Brian Vaughn <brian.david.vaughn@gmail.com>", | ||
"types": "dist/react-resizable-panels.cjs.d.ts", | ||
"scripts": { | ||
"lint": "eslint \"src/**/*.{ts,tsx}\"", | ||
"test": "jest --config=jest.config.js", | ||
"test:watch": "jest --config=jest.config.js --watch", | ||
"watch": "parcel watch --port=2345" | ||
}, | ||
"devDependencies": { | ||
@@ -87,3 +81,9 @@ "@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6", | ||
"Chrome 79" | ||
] | ||
} | ||
], | ||
"scripts": { | ||
"lint": "eslint \"src/**/*.{ts,tsx}\"", | ||
"test": "jest --config=jest.config.js", | ||
"test:watch": "jest --config=jest.config.js --watch", | ||
"watch": "parcel watch --port=2345" | ||
} | ||
} |
// Forked from NPM stacking-order@2.0.0 | ||
// Background at https://github.com/Rich-Harris/stacking-order/issues/3 | ||
// Background at https://github.com/Rich-Harris/stacking-order/issues/6 | ||
@@ -64,3 +65,4 @@ import { assert } from ".."; | ||
function is_flex_item(node: HTMLElement) { | ||
const display = getComputedStyle(get_parent(node)).display; | ||
// @ts-ignore | ||
const display = getComputedStyle(get_parent(node) ?? node).display; | ||
return display === "flex" || display === "inline-flex"; | ||
@@ -119,3 +121,3 @@ } | ||
/** @param {HTMLElement} node */ | ||
function get_ancestors(node: HTMLElement) { | ||
function get_ancestors(node: HTMLElement | null) { | ||
const ancestors = []; | ||
@@ -125,2 +127,3 @@ | ||
ancestors.push(node); | ||
// @ts-ignore | ||
node = get_parent(node); | ||
@@ -134,4 +137,7 @@ } | ||
function get_parent(node: HTMLElement) { | ||
// @ts-ignore | ||
return node.parentNode?.host || node.parentNode; | ||
const { parentNode } = node; | ||
if (parentNode && parentNode instanceof ShadowRoot) { | ||
return parentNode.host | ||
} | ||
return parentNode; | ||
} |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
2569890
120
34809
1