sanity-plugin-media 3.0.2 → 3.0.4
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/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/AssetGridVirtualized/index.tsx +8 -7
package/dist/index.mjs
CHANGED
|
@@ -4460,23 +4460,19 @@ const CardWrapper = styled(Flex)`
|
|
|
4460
4460
|
), StyledItemContainer = styled.div`
|
|
4461
4461
|
height: ${CARD_HEIGHT}px;
|
|
4462
4462
|
width: ${CARD_WIDTH}px;
|
|
4463
|
-
|
|
4464
|
-
function ItemContainer(props) {
|
|
4463
|
+
`, ItemContainer = forwardRef((props, ref) => {
|
|
4465
4464
|
const { context, ...rest } = props;
|
|
4466
|
-
return /* @__PURE__ */ jsx(StyledItemContainer, { ...rest });
|
|
4467
|
-
}
|
|
4468
|
-
const StyledListContainer = styled.div`
|
|
4465
|
+
return /* @__PURE__ */ jsx(StyledItemContainer, { ref, ...rest });
|
|
4466
|
+
}), StyledListContainer = styled.div`
|
|
4469
4467
|
display: grid;
|
|
4470
4468
|
grid-template-columns: repeat(auto-fill, ${CARD_WIDTH}px);
|
|
4471
4469
|
grid-template-rows: repeat(auto-fill, ${CARD_HEIGHT}px);
|
|
4472
4470
|
justify-content: center;
|
|
4473
4471
|
margin: 0 auto;
|
|
4474
|
-
|
|
4475
|
-
function ListContainer(props) {
|
|
4472
|
+
`, ListContainer = forwardRef((props, ref) => {
|
|
4476
4473
|
const { context, ...rest } = props;
|
|
4477
|
-
return /* @__PURE__ */ jsx(StyledListContainer, { ...rest });
|
|
4478
|
-
}
|
|
4479
|
-
const AssetGridVirtualized = (props) => {
|
|
4474
|
+
return /* @__PURE__ */ jsx(StyledListContainer, { ref, ...rest });
|
|
4475
|
+
}), AssetGridVirtualized = (props) => {
|
|
4480
4476
|
const { items, onLoadMore } = props, selectedAssets = useTypedSelector((state) => state.selected.assets), selectedIds = selectedAssets && selectedAssets.map((asset) => asset._id) || [], totalCount = items?.length;
|
|
4481
4477
|
return totalCount === 0 ? null : /* @__PURE__ */ jsx(
|
|
4482
4478
|
VirtuosoGrid,
|