```typescript

/** Group items into slots of a fixed capacity, in order. */
export function slotPack(items: string[], capacity: number): string[][] {
  if (capacity <= 0) {
    throw new Error("Capacity must be greater than zero.");
  }
  const slots: string[][] = [];
  for (let i = 0; i < items.length; i += capacity) {
    slots.push(items.slice(i, Math.min(i + capacity, items.length)));
  }
  return slots;
}
```