{"_id":"@bpdm/scheduler-core","name":"@bpdm/scheduler-core","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@bpdm/scheduler-core","version":"0.1.0","description":"Framework-agnostic core for the bpdm Scheduler — date math, an overlap layout engine, a data-source contract, and state. Zero runtime dependencies.","type":"module","license":"MIT","author":{"name":"bpdm","url":"https://bpdm.dev"},"homepage":"https://ui.bpdm.dev","repository":{"type":"git","url":"git+https://github.com/bpdm-hq/bpdm-ui.git","directory":"packages/scheduler-core"},"keywords":["scheduler","calendar","layout-engine","design-system","headless","typescript"],"sideEffects":false,"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"devDependencies":{"@eslint/js":"^10.0.1","@size-limit/preset-small-lib":"^12.1.0","eslint":"^10.5.0","globals":"^17.6.0","size-limit":"^12.1.0","tsup":"^8.5.1","typescript":"^6.0.3","typescript-eslint":"^8.61.1","vitest":"^4.1.9"},"scripts":{"build":"tsup","typecheck":"tsc --noEmit","test":"vitest run","size":"size-limit","lint":"eslint ."},"_id":"@bpdm/scheduler-core@0.1.0","bugs":{"url":"https://github.com/bpdm-hq/bpdm-ui/issues"},"_integrity":"sha512-KoMsRkrtfSDZKAeAKwUcVP+UxOcgWf/K0S0uSV4Bc0wTOGddswhOpAVBzotVD9VEKRH21QVI3mEy0EpBgNZu+Q==","_resolved":"/private/var/folders/s0/stnx6rcx6g1dnfdfb_qr2hlr0000gn/T/a7cb39b2b49418b4a967e3d0d9898b10/bpdm-scheduler-core-0.1.0.tgz","_from":"file:bpdm-scheduler-core-0.1.0.tgz","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-KoMsRkrtfSDZKAeAKwUcVP+UxOcgWf/K0S0uSV4Bc0wTOGddswhOpAVBzotVD9VEKRH21QVI3mEy0EpBgNZu+Q==","shasum":"80948a0e637355d328cd29bf60fc7ae51a750f26","tarball":"https://registry.npmjs.org/@bpdm/scheduler-core/-/scheduler-core-0.1.0.tgz","fileCount":7,"unpackedSize":30689,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDe7fm0uDhyA6g8wsqfILKVBhDeXpnqWYj7SYpFw7XoUAiB5XimVorvGxnuiE05U0CF7ooII8VEU0ZqSJ06N3kqDsA=="}]},"_npmUser":{"name":"bpdm9","email":"bpdm.tech@gmail.com"},"directories":{},"maintainers":[{"name":"bpdm9","email":"bpdm.tech@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/scheduler-core_0.1.0_1785347521312_0.3609004613793798"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-29T17:52:01.082Z","0.1.0":"2026-07-29T17:52:01.461Z","modified":"2026-07-29T17:52:01.733Z"},"maintainers":[{"name":"bpdm9","email":"bpdm.tech@gmail.com"}],"description":"Framework-agnostic core for the bpdm Scheduler — date math, an overlap layout engine, a data-source contract, and state. Zero runtime dependencies.","homepage":"https://ui.bpdm.dev","keywords":["scheduler","calendar","layout-engine","design-system","headless","typescript"],"repository":{"type":"git","url":"git+https://github.com/bpdm-hq/bpdm-ui.git","directory":"packages/scheduler-core"},"author":{"name":"bpdm","url":"https://bpdm.dev"},"bugs":{"url":"https://github.com/bpdm-hq/bpdm-ui/issues"},"license":"MIT","readme":"# @bpdm/scheduler-core\n\nThe **framework-agnostic engine** behind the bpdm Scheduler — date/time math, event\nlayout, a data-source abstraction, and a state store, with **zero UI and zero\nframework dependencies**. Build any calendar/scheduler UI on top of it, or use the\npieces on their own.\n\n[![npm version](https://img.shields.io/npm/v/@bpdm/scheduler-core.svg)](https://www.npmjs.com/package/@bpdm/scheduler-core)\n[![license](https://img.shields.io/npm/l/@bpdm/scheduler-core.svg)](./LICENSE)\n\n> The headless core of the **bpdm design system**'s scheduler. The React binding\n> [`@bpdm/scheduler`](https://www.npmjs.com/package/@bpdm/scheduler) renders on top of\n> it; future framework bindings reuse the same engine. See the\n> [monorepo overview](https://github.com/bpdm-hq/bpdm-ui).\n\n---\n\n## Features\n\n- **Framework-agnostic** — pure TypeScript, no React and no DOM. Runs in any framework, a worker, or on the server.\n- **Event layout** — overlap packing (`packEvents`, `layoutDay`) that positions colliding events into side-by-side columns.\n- **Time utilities** — day/week/month math (`startOfWeek`, `startOfMonth`, `endOfMonth`, `eachDayOfInterval`, …) with a configurable week start.\n- **Data-source abstraction** — an `InMemoryDataSource` plus a `DataSource` interface, so a UI can switch from client data to fetching a visible range from a server without changing.\n- **State store** — `createSchedulerStore` holds the current view, date and selection; subscribe and render.\n- **Typed & tested** — every export is TypeScript-first, covered by unit tests.\n\n## Install\n\n```bash\nnpm install @bpdm/scheduler-core\n```\n\n## Usage\n\n```ts\nimport { createSchedulerStore, InMemoryDataSource, type CalendarEvent } from \"@bpdm/scheduler-core\";\n\nconst events: CalendarEvent[] = [\n  { id: \"1\", title: \"Standup\", start: new Date(\"2026-01-05T09:00\"), end: new Date(\"2026-01-05T09:30\") },\n];\n\n// A data source the UI reads from (swap for a server-backed DataSource later):\nconst source = new InMemoryDataSource(events);\n\n// Holds the current view, date and selection — subscribe and render:\nconst store = createSchedulerStore();\n```\n\nMost apps use the ready-made React component in\n[`@bpdm/scheduler`](https://www.npmjs.com/package/@bpdm/scheduler) rather than wiring\nthe core by hand.\n\n## License\n\nMIT © [bpdm](https://github.com/bpdm-hq/bpdm-ui)\n","readmeFilename":"README.md","_rev":"1-00d263a44c7bf971a1c5f1aa5790ee0a"}