@react-stately/virtualizer 4.4.0 → 4.4.1

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/Size.main.js CHANGED
@@ -31,8 +31,8 @@ $parcel$export(module.exports, "Size", () => $064492b79924894c$export$cb6da89c6a
31
31
  return this.width * this.height;
32
32
  }
33
33
  constructor(width = 0, height = 0){
34
- this.width = width;
35
- this.height = height;
34
+ this.width = Math.max(width, 0);
35
+ this.height = Math.max(height, 0);
36
36
  }
37
37
  }
38
38
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAEM,MAAM;IASX;;GAEC,GACD,OAAa;QACX,OAAO,IAAI,0CAAK,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM;IACzC;IAEA;;GAEC,GACD,OAAO,KAAW,EAAW;QAC3B,OAAO,IAAI,CAAC,KAAK,KAAK,MAAM,KAAK,IAC1B,IAAI,CAAC,MAAM,KAAK,MAAM,MAAM;IACrC;IAEA;;GAEC,GACD,IAAI,OAAe;QACjB,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM;IACjC;IAzBA,YAAY,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAE;QACjC,IAAI,CAAC,KAAK,GAAG;QACb,IAAI,CAAC,MAAM,GAAG;IAChB;AAuBF","sources":["packages/@react-stately/virtualizer/src/Size.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport class Size {\n width: number;\n height: number;\n\n constructor(width = 0, height = 0) {\n this.width = width;\n this.height = height;\n }\n\n /**\n * Returns a copy of this size.\n */\n copy(): Size {\n return new Size(this.width, this.height);\n }\n\n /**\n * Returns whether this size is equal to another one.\n */\n equals(other: Size): boolean {\n return this.width === other.width\n && this.height === other.height;\n }\n\n /**\n * The total area of the Size.\n */\n get area(): number {\n return this.width * this.height;\n }\n}\n"],"names":[],"version":3,"file":"Size.main.js.map"}
1
+ {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAEM,MAAM;IASX;;GAEC,GACD,OAAa;QACX,OAAO,IAAI,0CAAK,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM;IACzC;IAEA;;GAEC,GACD,OAAO,KAAW,EAAW;QAC3B,OAAO,IAAI,CAAC,KAAK,KAAK,MAAM,KAAK,IAC1B,IAAI,CAAC,MAAM,KAAK,MAAM,MAAM;IACrC;IAEA;;GAEC,GACD,IAAI,OAAe;QACjB,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM;IACjC;IAzBA,YAAY,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAE;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,CAAC,OAAO;QAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,QAAQ;IACjC;AAuBF","sources":["packages/@react-stately/virtualizer/src/Size.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport class Size {\n width: number;\n height: number;\n\n constructor(width = 0, height = 0) {\n this.width = Math.max(width, 0);\n this.height = Math.max(height, 0);\n }\n\n /**\n * Returns a copy of this size.\n */\n copy(): Size {\n return new Size(this.width, this.height);\n }\n\n /**\n * Returns whether this size is equal to another one.\n */\n equals(other: Size): boolean {\n return this.width === other.width\n && this.height === other.height;\n }\n\n /**\n * The total area of the Size.\n */\n get area(): number {\n return this.width * this.height;\n }\n}\n"],"names":[],"version":3,"file":"Size.main.js.map"}
package/dist/Size.mjs CHANGED
@@ -25,8 +25,8 @@
25
25
  return this.width * this.height;
26
26
  }
27
27
  constructor(width = 0, height = 0){
28
- this.width = width;
29
- this.height = height;
28
+ this.width = Math.max(width, 0);
29
+ this.height = Math.max(height, 0);
30
30
  }
31
31
  }
32
32
 
@@ -25,8 +25,8 @@
25
25
  return this.width * this.height;
26
26
  }
27
27
  constructor(width = 0, height = 0){
28
- this.width = width;
29
- this.height = height;
28
+ this.width = Math.max(width, 0);
29
+ this.height = Math.max(height, 0);
30
30
  }
31
31
  }
32
32
 
@@ -1 +1 @@
1
- {"mappings":"AAAA;;;;;;;;;;CAUC,GAEM,MAAM;IASX;;GAEC,GACD,OAAa;QACX,OAAO,IAAI,0CAAK,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM;IACzC;IAEA;;GAEC,GACD,OAAO,KAAW,EAAW;QAC3B,OAAO,IAAI,CAAC,KAAK,KAAK,MAAM,KAAK,IAC1B,IAAI,CAAC,MAAM,KAAK,MAAM,MAAM;IACrC;IAEA;;GAEC,GACD,IAAI,OAAe;QACjB,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM;IACjC;IAzBA,YAAY,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAE;QACjC,IAAI,CAAC,KAAK,GAAG;QACb,IAAI,CAAC,MAAM,GAAG;IAChB;AAuBF","sources":["packages/@react-stately/virtualizer/src/Size.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport class Size {\n width: number;\n height: number;\n\n constructor(width = 0, height = 0) {\n this.width = width;\n this.height = height;\n }\n\n /**\n * Returns a copy of this size.\n */\n copy(): Size {\n return new Size(this.width, this.height);\n }\n\n /**\n * Returns whether this size is equal to another one.\n */\n equals(other: Size): boolean {\n return this.width === other.width\n && this.height === other.height;\n }\n\n /**\n * The total area of the Size.\n */\n get area(): number {\n return this.width * this.height;\n }\n}\n"],"names":[],"version":3,"file":"Size.module.js.map"}
1
+ {"mappings":"AAAA;;;;;;;;;;CAUC,GAEM,MAAM;IASX;;GAEC,GACD,OAAa;QACX,OAAO,IAAI,0CAAK,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM;IACzC;IAEA;;GAEC,GACD,OAAO,KAAW,EAAW;QAC3B,OAAO,IAAI,CAAC,KAAK,KAAK,MAAM,KAAK,IAC1B,IAAI,CAAC,MAAM,KAAK,MAAM,MAAM;IACrC;IAEA;;GAEC,GACD,IAAI,OAAe;QACjB,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM;IACjC;IAzBA,YAAY,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAE;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,CAAC,OAAO;QAC7B,IAAI,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,QAAQ;IACjC;AAuBF","sources":["packages/@react-stately/virtualizer/src/Size.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport class Size {\n width: number;\n height: number;\n\n constructor(width = 0, height = 0) {\n this.width = Math.max(width, 0);\n this.height = Math.max(height, 0);\n }\n\n /**\n * Returns a copy of this size.\n */\n copy(): Size {\n return new Size(this.width, this.height);\n }\n\n /**\n * Returns whether this size is equal to another one.\n */\n equals(other: Size): boolean {\n return this.width === other.width\n && this.height === other.height;\n }\n\n /**\n * The total area of the Size.\n */\n get area(): number {\n return this.width * this.height;\n }\n}\n"],"names":[],"version":3,"file":"Size.module.js.map"}
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@react-stately/virtualizer",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
8
  "exports": {
9
- "types": "./dist/types.d.ts",
9
+ "source": "./src/index.ts",
10
+ "types": [
11
+ "./dist/types.d.ts",
12
+ "./src/index.ts"
13
+ ],
10
14
  "import": "./dist/import.mjs",
11
15
  "require": "./dist/main.js"
12
16
  },
@@ -22,8 +26,8 @@
22
26
  "url": "https://github.com/adobe/react-spectrum"
23
27
  },
24
28
  "dependencies": {
25
- "@react-aria/utils": "^3.29.0",
26
- "@react-types/shared": "^3.29.1",
29
+ "@react-aria/utils": "^3.29.1",
30
+ "@react-types/shared": "^3.30.0",
27
31
  "@swc/helpers": "^0.5.0"
28
32
  },
29
33
  "peerDependencies": {
@@ -33,5 +37,5 @@
33
37
  "publishConfig": {
34
38
  "access": "public"
35
39
  },
36
- "gitHead": "9c77d4e8267ed39469c65f65da94ece7be509874"
40
+ "gitHead": "265b4d7f107905ee1c6e87a8af1613ab440a6849"
37
41
  }
package/src/Size.ts CHANGED
@@ -15,8 +15,8 @@ export class Size {
15
15
  height: number;
16
16
 
17
17
  constructor(width = 0, height = 0) {
18
- this.width = width;
19
- this.height = height;
18
+ this.width = Math.max(width, 0);
19
+ this.height = Math.max(height, 0);
20
20
  }
21
21
 
22
22
  /**