@keystatic/core

Search for an npm package
import { useMemo } from 'react';
import { d as useConfig, b as useTree, c as getEntriesInCollectionWithTreeKey } from './cloud-image-preview-f3b1a388.esm.js';
function useSlugsInCollection(collection) {
const config = useConfig();
const tree = useTree().current;
return useMemo(() => {
const loadedTree = tree.kind === 'loaded' ? tree.data.tree : new Map();
return getEntriesInCollectionWithTreeKey(config, collection, loadedTree).map(x => x.slug);
}, [config, tree, collection]);
}
export { useSlugsInCollection as u };