@keystatic/core

Search for an npm package
import { c } from './react-compiler-runtime-0011f46e.js';
import 'react';
import { z as useConfig, a as useTree, t as getEntriesInCollectionWithTreeKey } from './index-48f075ab.js';
function useSlugsInCollection(collection) {
const $ = c(7);
const config = useConfig();
const tree = useTree().current;
let t0;
let t1;
if ($[0] !== tree) {
t1 = tree.kind === "loaded" ? tree.data.tree : new Map();
$[0] = tree;
$[1] = t1;
} else {
t1 = $[1];
}
const loadedTree = t1;
let t2;
if ($[2] !== config || $[3] !== collection || $[4] !== loadedTree) {
let t3;
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
t3 = x => x.slug;
$[6] = t3;
} else {
t3 = $[6];
}
t2 = getEntriesInCollectionWithTreeKey(config, collection, loadedTree).map(t3);
$[2] = config;
$[3] = collection;
$[4] = loadedTree;
$[5] = t2;
} else {
t2 = $[5];
}
t0 = t2;
return t0;
}
export { useSlugsInCollection as u };