@noya-app/noya-file-explorer 0.0.24 → 0.0.26

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/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@noya-app/noya-file-explorer",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
7
- "browser": "./dist/bundle/index.js",
8
7
  "exports": {
9
8
  ".": {
10
9
  "import": "./dist/index.mjs",
@@ -20,9 +19,9 @@
20
19
  "dev": "npm run build:main -- --watch"
21
20
  },
22
21
  "dependencies": {
23
- "@noya-app/noya-designsystem": "0.1.71",
22
+ "@noya-app/noya-designsystem": "0.1.72",
24
23
  "@noya-app/noya-icons": "0.1.16",
25
- "@noya-app/noya-multiplayer-react": "0.1.71",
24
+ "@noya-app/noya-multiplayer-react": "0.1.73",
26
25
  "@noya-app/noya-keymap": "0.1.4",
27
26
  "@noya-app/react-utils": "0.1.27",
28
27
  "@noya-app/noya-utils": "0.1.9",
@@ -53,9 +53,9 @@ import {
53
53
  } from "@noya-app/noya-schemas";
54
54
  import { Base64, groupBy, isDeepEqual, uuid } from "@noya-app/noya-utils";
55
55
  import {
56
- AutoSizer,
57
56
  downloadUrl,
58
57
  memoGeneric,
58
+ SingleDimensionAutoSizer,
59
59
  useControlledOrUncontrolled,
60
60
  } from "@noya-app/react-utils";
61
61
  import { fileOpen } from "browser-fs-access";
@@ -71,7 +71,6 @@ import {
71
71
  useState,
72
72
  } from "react";
73
73
 
74
- import { Size } from "@noya-app/noya-geometry";
75
74
  import { path } from "imfs";
76
75
  import React from "react";
77
76
  import { getContentTypeFromFile } from "./utils/contentType";
@@ -866,7 +865,7 @@ export const ResourceExplorer = memo(
866
865
 
867
866
  const keyExtractor = useCallback((item: Resource) => item.id, []);
868
867
 
869
- const renderCollection = (virtualizedSize: Size | undefined) => (
868
+ const renderCollection = (virtualizedHeight: number | undefined) => (
870
869
  <FileExplorerCollection<Resource, MenuAction>
871
870
  ref={collectionRef}
872
871
  sortableId={sortableId}
@@ -915,7 +914,7 @@ export const ResourceExplorer = memo(
915
914
  selectedIds={selectedIds}
916
915
  itemClassName={itemClassName}
917
916
  itemStyle={itemStyle}
918
- virtualized={virtualizedSize}
917
+ virtualized={virtualizedHeight}
919
918
  renderThumbnail={(props) => (
920
919
  <ResourceThumbnail
921
920
  {...props}
@@ -1080,12 +1079,9 @@ export const ResourceExplorer = memo(
1080
1079
  className={className}
1081
1080
  >
1082
1081
  {virtualized ? (
1083
- <AutoSizer>
1084
- {({ width, height }) =>
1085
- // add 24px to account for the -mx-3 on the Collection component
1086
- renderCollection({ width: width + 24, height })
1087
- }
1088
- </AutoSizer>
1082
+ <SingleDimensionAutoSizer dimension="height">
1083
+ {(height) => renderCollection(height)}
1084
+ </SingleDimensionAutoSizer>
1089
1085
  ) : (
1090
1086
  renderCollection(undefined)
1091
1087
  )}