@react-stately/layout
Advanced tools
Comparing version 3.13.10-nightly.4698 to 3.13.10-nightly.4700
@@ -21,3 +21,3 @@ var $7Tzdl$reactstatelyvirtualizer = require("@react-stately/virtualizer"); | ||
class $1f7773ceb2a3b9a6$export$7d2b12578154a735 extends (0, $7Tzdl$reactstatelyvirtualizer.Layout) { | ||
validate() { | ||
update() { | ||
let visibleWidth = this.virtualizer.visibleRect.width; | ||
@@ -24,0 +24,0 @@ // The max item width is always the entire viewport. |
@@ -15,3 +15,3 @@ import {Size as $ipgKF$Size, Rect as $ipgKF$Rect, LayoutInfo as $ipgKF$LayoutInfo, Layout as $ipgKF$Layout} from "@react-stately/virtualizer"; | ||
class $a58592d295a170a4$export$7d2b12578154a735 extends (0, $ipgKF$Layout) { | ||
validate() { | ||
update() { | ||
let visibleWidth = this.virtualizer.visibleRect.width; | ||
@@ -18,0 +18,0 @@ // The max item width is always the entire viewport. |
@@ -82,3 +82,3 @@ var $iId4j$reactstatelycollections = require("@react-stately/collections"); | ||
} | ||
validate(invalidationContext) { | ||
update(invalidationContext) { | ||
this.collection = this.virtualizer.collection; | ||
@@ -85,0 +85,0 @@ // Reset valid rect if we will have to invalidate everything. |
@@ -76,3 +76,3 @@ import {getChildNodes as $img26$getChildNodes} from "@react-stately/collections"; | ||
} | ||
validate(invalidationContext) { | ||
update(invalidationContext) { | ||
this.collection = this.virtualizer.collection; | ||
@@ -79,0 +79,0 @@ // Reset valid rect if we will have to invalidate everything. |
@@ -30,3 +30,3 @@ var $fe69e47e38ed0ac4$exports = require("./ListLayout.main.js"); | ||
} | ||
validate(invalidationContext) { | ||
update(invalidationContext) { | ||
var _invalidationContext_layoutOptions; | ||
@@ -46,3 +46,3 @@ let newCollection = this.virtualizer.collection; | ||
} | ||
super.validate(invalidationContext); | ||
super.update(invalidationContext); | ||
} | ||
@@ -185,5 +185,3 @@ buildCollection() { | ||
let rowHeight = this.getEstimatedRowHeight(); | ||
for (let [i, node] of [ | ||
...(0, $9lycG$reactstatelycollections.getChildNodes)(this.collection.body, this.collection) | ||
].entries()){ | ||
for (let node of (0, $9lycG$reactstatelycollections.getChildNodes)(this.collection.body, this.collection)){ | ||
// Skip rows before the valid rectangle unless they are already cached. | ||
@@ -197,3 +195,3 @@ if (y + rowHeight < this.requestedRect.y && !this.isValid(node, y)) { | ||
layoutNode.layoutInfo.parentKey = layoutInfo.key; | ||
layoutNode.index = i; | ||
layoutNode.index = children.length; | ||
y = layoutNode.layoutInfo.rect.maxY; | ||
@@ -238,5 +236,3 @@ width = Math.max(width, layoutNode.layoutInfo.rect.width); | ||
let height = 0; | ||
for (let [i, child] of [ | ||
...(0, $9lycG$reactstatelycollections.getChildNodes)(node, this.collection) | ||
].entries())if (child.type === 'cell') { | ||
for (let child of (0, $9lycG$reactstatelycollections.getChildNodes)(node, this.collection))if (child.type === 'cell') { | ||
if (x > this.requestedRect.maxX) { | ||
@@ -254,3 +250,3 @@ // Adjust existing cached layoutInfo to ensure that it is out of view. | ||
height = Math.max(height, layoutNode.layoutInfo.rect.height); | ||
layoutNode.index = i; | ||
layoutNode.index = children.length; | ||
children.push(layoutNode); | ||
@@ -257,0 +253,0 @@ } |
@@ -24,3 +24,3 @@ import {ListLayout as $61ef60fc9b1041f4$export$cacbb3924155d68e} from "./ListLayout.module.js"; | ||
} | ||
validate(invalidationContext) { | ||
update(invalidationContext) { | ||
var _invalidationContext_layoutOptions; | ||
@@ -40,3 +40,3 @@ let newCollection = this.virtualizer.collection; | ||
} | ||
super.validate(invalidationContext); | ||
super.update(invalidationContext); | ||
} | ||
@@ -179,5 +179,3 @@ buildCollection() { | ||
let rowHeight = this.getEstimatedRowHeight(); | ||
for (let [i, node] of [ | ||
...(0, $bmsJv$getChildNodes)(this.collection.body, this.collection) | ||
].entries()){ | ||
for (let node of (0, $bmsJv$getChildNodes)(this.collection.body, this.collection)){ | ||
// Skip rows before the valid rectangle unless they are already cached. | ||
@@ -191,3 +189,3 @@ if (y + rowHeight < this.requestedRect.y && !this.isValid(node, y)) { | ||
layoutNode.layoutInfo.parentKey = layoutInfo.key; | ||
layoutNode.index = i; | ||
layoutNode.index = children.length; | ||
y = layoutNode.layoutInfo.rect.maxY; | ||
@@ -232,5 +230,3 @@ width = Math.max(width, layoutNode.layoutInfo.rect.width); | ||
let height = 0; | ||
for (let [i, child] of [ | ||
...(0, $bmsJv$getChildNodes)(node, this.collection) | ||
].entries())if (child.type === 'cell') { | ||
for (let child of (0, $bmsJv$getChildNodes)(node, this.collection))if (child.type === 'cell') { | ||
if (x > this.requestedRect.maxX) { | ||
@@ -248,3 +244,3 @@ // Adjust existing cached layoutInfo to ensure that it is out of view. | ||
height = Math.max(height, layoutNode.layoutInfo.rect.height); | ||
layoutNode.index = i; | ||
layoutNode.index = children.length; | ||
children.push(layoutNode); | ||
@@ -251,0 +247,0 @@ } |
@@ -43,3 +43,3 @@ import { DropTarget, DropTargetDelegate, ItemDropTarget, Key, Node, Collection } from "@react-types/shared"; | ||
constructor(options: GridLayoutOptions); | ||
validate(): void; | ||
update(): void; | ||
getVisibleLayoutInfos(rect: Rect): LayoutInfo[]; | ||
@@ -104,3 +104,3 @@ protected getIndexAtPoint(x: number, y: number): number; | ||
protected shouldInvalidateEverything(invalidationContext: InvalidationContext<O>): boolean; | ||
validate(invalidationContext: InvalidationContext<O>): void; | ||
update(invalidationContext: InvalidationContext<O>): void; | ||
protected buildCollection(y?: number): LayoutNode[]; | ||
@@ -124,3 +124,3 @@ protected isValid(node: Node<T>, y: number): boolean; | ||
constructor(options: ListLayoutOptions); | ||
validate(invalidationContext: InvalidationContext<O>): void; | ||
update(invalidationContext: InvalidationContext<O>): void; | ||
protected buildCollection(): LayoutNode[]; | ||
@@ -127,0 +127,0 @@ protected buildTableHeader(): LayoutNode; |
{ | ||
"name": "@react-stately/layout", | ||
"version": "3.13.10-nightly.4698+b940126e4", | ||
"version": "3.13.10-nightly.4700+81abb2185", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,8 +25,8 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-stately/collections": "3.0.0-nightly.2986+b940126e4", | ||
"@react-stately/table": "3.11.9-nightly.4698+b940126e4", | ||
"@react-stately/virtualizer": "3.7.2-nightly.4698+b940126e4", | ||
"@react-types/grid": "3.2.7-nightly.4698+b940126e4", | ||
"@react-types/shared": "3.0.0-nightly.2986+b940126e4", | ||
"@react-types/table": "3.9.6-nightly.4698+b940126e4", | ||
"@react-stately/collections": "3.0.0-nightly.2988+81abb2185", | ||
"@react-stately/table": "3.11.9-nightly.4700+81abb2185", | ||
"@react-stately/virtualizer": "3.7.2-nightly.4700+81abb2185", | ||
"@react-types/grid": "3.2.7-nightly.4700+81abb2185", | ||
"@react-types/shared": "3.0.0-nightly.2988+81abb2185", | ||
"@react-types/table": "3.9.6-nightly.4700+81abb2185", | ||
"@swc/helpers": "^0.5.0" | ||
@@ -40,3 +40,3 @@ }, | ||
}, | ||
"gitHead": "b940126e4d67a11d28b7c0b098eab23205598b6c" | ||
"gitHead": "81abb2185cb3a9c52a8feaf76a136c64852aea13" | ||
} |
@@ -64,3 +64,3 @@ /* | ||
validate(): void { | ||
update(): void { | ||
let visibleWidth = this.virtualizer.visibleRect.width; | ||
@@ -67,0 +67,0 @@ |
@@ -165,3 +165,3 @@ /* | ||
validate(invalidationContext: InvalidationContext<O>) { | ||
update(invalidationContext: InvalidationContext<O>) { | ||
this.collection = this.virtualizer.collection; | ||
@@ -168,0 +168,0 @@ |
@@ -49,3 +49,3 @@ /* | ||
validate(invalidationContext: InvalidationContext<O>): void { | ||
update(invalidationContext: InvalidationContext<O>): void { | ||
let newCollection = this.virtualizer.collection as TableCollection<T>; | ||
@@ -66,3 +66,3 @@ | ||
super.validate(invalidationContext); | ||
super.update(invalidationContext); | ||
} | ||
@@ -232,3 +232,3 @@ | ||
let rowHeight = this.getEstimatedRowHeight(); | ||
for (let [i, node] of [...getChildNodes(this.collection.body, this.collection)].entries()) { | ||
for (let node of getChildNodes(this.collection.body, this.collection)) { | ||
// Skip rows before the valid rectangle unless they are already cached. | ||
@@ -243,3 +243,3 @@ if (y + rowHeight < this.requestedRect.y && !this.isValid(node, y)) { | ||
layoutNode.layoutInfo.parentKey = layoutInfo.key; | ||
layoutNode.index = i; | ||
layoutNode.index = children.length; | ||
y = layoutNode.layoutInfo.rect.maxY; | ||
@@ -292,3 +292,3 @@ width = Math.max(width, layoutNode.layoutInfo.rect.width); | ||
let height = 0; | ||
for (let [i, child] of [...getChildNodes(node, this.collection)].entries()) { | ||
for (let child of getChildNodes(node, this.collection)) { | ||
if (child.type === 'cell') { | ||
@@ -307,3 +307,3 @@ if (x > this.requestedRect.maxX) { | ||
height = Math.max(height, layoutNode.layoutInfo.rect.height); | ||
layoutNode.index = i; | ||
layoutNode.index = children.length; | ||
children.push(layoutNode); | ||
@@ -310,0 +310,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
374168
4033