import type { CSSProperties } from 'react'; // listRecords' XRPC max — request the full page on each call so users see // as many records as possible per fetch. export const RECORDS_PER_PAGE = 100; // com.atproto.repo.applyWrites caps a batch at 200 operations (lexicon // maxLength), so a larger selection is split into chunks. Each chunk lands as // one atomic repo commit instead of one commit per record. export const APPLY_WRITES_MAX = 200; // While paused for the throttle, re-check the budget on this cadence so the // countdown ticks and a Stop press is picked up within a second. export const THROTTLE_TICK_MS = 1000; // Deletes run one batch at a time. Throughput is dominated by the write-rate // throttle once a selection is large, and sequential batches keep the pacing // accounting and the "resuming in Ns" countdown simple and exact. export const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); // Reveal/retract thresholds for dropping the condensed edit bar into the nav, // matching the breadcrumb's behaviour: the top ~96px counts as occluded by the // sticky nav, and a dead band keeps the reveal from strobing at the boundary // (showing the bar grows the nav, which nudges the page back across the line). export const NAV_OFFSET_PX = 96; export const REVEAL_HYSTERESIS_PX = 72; // Row layout. The whole list is one CSS grid so the rkey and data-preview // columns line up across every row: the