{"_id":"@bm-front/bm-toast","_rev":"6-d5cfab0a0a184449bbad690ab605614f","name":"@bm-front/bm-toast","dist-tags":{"latest":"1.0.2"},"versions":{"0.2.0":{"name":"@bm-front/bm-toast","version":"0.2.0","keywords":["toast","toasts","notification","notifications","vanilla","typescript","queue","progressbar","dom","browser","ui","scss","css","lightweight"],"author":{"name":"BM-Front"},"license":"MIT","_id":"@bm-front/bm-toast@0.2.0","maintainers":[{"name":"poliklot","email":"poliklot@vk.com"}],"homepage":"https://github.com/BM-front/bm-toast#readme","bugs":{"url":"https://github.com/BM-front/bm-toast/issues"},"dist":{"shasum":"c52717dff6dc6dd4ec6c7b2bd6cb7f43751e8938","tarball":"https://registry.npmjs.org/@bm-front/bm-toast/-/bm-toast-0.2.0.tgz","fileCount":12,"integrity":"sha512-db89g7ydbSGmNfC2LFNnrK8DRzQ5kuC8uZw7AGyqyF/u/g9Ik5pXb9I8ZwgeQrVnyqRkir5+sj3KFUUe4QAxIw==","signatures":[{"sig":"MEYCIQCxgftpqm/tDvzx+qoLVnwHX0zgpzkaEI9jXQ65ZqigSwIhAPYCkEffQacgB/U1+oHpxxiiCg69OFZFOgmtbBEDmCwK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":100567},"main":"./dist/index.cjs","type":"module","style":"dist/style.css","types":"./dist/index.d.ts","module":"./dist/index.js","browser":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"},"./style.css":"./dist/style.css","./style.scss":"./dist/style.scss"},"scripts":{"dev":"rollup -c -w","build":"rimraf dist && rollup -c","prepare":"npm run build","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build"},"_npmUser":{"name":"poliklot","email":"poliklot@vk.com"},"repository":{"url":"git+https://github.com/BM-front/bm-toast.git","type":"git"},"_npmVersion":"10.8.2","description":"Tiny TypeScript toast notifications with queue, callbacks and styles. Zero deps.","directories":{},"sideEffects":["**/*.scss","dist/style.css"],"_nodeVersion":"20.19.0","dependencies":{"tslib":"^2.8.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.90.0","rimraf":"^6.0.1","rollup":"^4.47.1","cssnano":"^7.1.0","postcss":"^8.5.6","typescript":"^5.9.2","autoprefixer":"^10.4.21","rollup-plugin-dts":"^6.2.3","rollup-plugin-copy":"^3.5.0","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.4","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/bm-toast_0.2.0_1755865313401_0.932323912203697","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@bm-front/bm-toast","version":"0.2.1","keywords":["toast","toasts","notification","notifications","vanilla","typescript","queue","progressbar","dom","browser","ui","scss","css","lightweight"],"author":{"name":"BM-Front"},"license":"MIT","_id":"@bm-front/bm-toast@0.2.1","maintainers":[{"name":"aalex98","email":"ipalexeev98@mail.ru"},{"name":"poliklot","email":"poliklot@vk.com"}],"homepage":"https://github.com/BM-front/bm-toast#readme","bugs":{"url":"https://github.com/BM-front/bm-toast/issues"},"dist":{"shasum":"3d4112407e87f095b16732c38c8f6b8cbdd4a7ec","tarball":"https://registry.npmjs.org/@bm-front/bm-toast/-/bm-toast-0.2.1.tgz","fileCount":12,"integrity":"sha512-IxM/6B2lj4ZvCPh1ZzYBNiN+aN/SVNYDuZbJO2IIpk8YkER4AMuxfx6kHP9kOBak8Y5QGaWMCfOce2dzwXxO8g==","signatures":[{"sig":"MEQCIHSo0OGZvdsJNOF3aaO5wVz+JKGUcOFCk+tPVPwFyPRnAiAbKtoCT1EACFfgVFXVOrHzu4xV/R1o4letK/Ad/OAH8g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":100671},"main":"./dist/index.cjs","type":"module","style":"dist/style.css","types":"./dist/index.d.ts","module":"./dist/index.js","browser":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"},"./style.css":"./dist/style.css","./style.scss":"./dist/style.scss"},"gitHead":"2bac922eb1413548990299ef9adebf0aba35c233","scripts":{"dev":"rollup -c -w","build":"rimraf dist && rollup -c","prepare":"npm run build","release":"node scripts/release.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build"},"_npmUser":{"name":"poliklot","email":"poliklot@vk.com"},"repository":{"url":"git+https://github.com/BM-front/bm-toast.git","type":"git"},"_npmVersion":"10.8.2","description":"Tiny TypeScript toast notifications with queue, callbacks and styles. Zero deps.","directories":{},"sideEffects":["**/*.scss","dist/style.css"],"_nodeVersion":"20.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ora":"^8.2.0","sass":"^1.90.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.47.1","cssnano":"^7.1.0","postcss":"^8.5.6","inquirer":"^12.9.3","typescript":"^5.9.2","autoprefixer":"^10.4.21","rollup-plugin-dts":"^6.2.3","rollup-plugin-copy":"^3.5.0","prettier-plugin-jsdoc":"^1.3.0","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.4","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/bm-toast_0.2.1_1755866110634_0.27621963768962265","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@bm-front/bm-toast","version":"0.2.2","keywords":["toast","toasts","notification","notifications","vanilla","typescript","queue","progressbar","dom","browser","ui","scss","css","lightweight"],"author":{"name":"BM-Front"},"license":"MIT","_id":"@bm-front/bm-toast@0.2.2","maintainers":[{"name":"aalex98","email":"ipalexeev98@mail.ru"},{"name":"poliklot","email":"poliklot@vk.com"},{"name":"artemsites","email":"info@artemsites.ru"}],"homepage":"https://github.com/BM-front/bm-toast#readme","bugs":{"url":"https://github.com/BM-front/bm-toast/issues"},"dist":{"shasum":"35761b32e15e78933273b389be911452203fc1ab","tarball":"https://registry.npmjs.org/@bm-front/bm-toast/-/bm-toast-0.2.2.tgz","fileCount":12,"integrity":"sha512-ZcL2QbL+l6h3HMC5yFHYHTEk7zuyNF7+w3oGMlee6fYoDx5biawRW9M4ic+qL+f4qPjccskLNIOUlapaWpv8LQ==","signatures":[{"sig":"MEUCIQCaQqlhN2FHrubSFKYBjnJQm/AIpQEj2tndJ5OZJU7nqQIgMZqbguby7ob+O8ahVxmRBATB18v9NmbCU+3SdOmv+Eg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":100288},"main":"./dist/index.cjs","type":"module","style":"dist/style.css","types":"./dist/index.d.ts","module":"./dist/index.js","browser":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"},"./style.css":"./dist/style.css","./style.scss":"./dist/style.scss"},"gitHead":"1d9914f7ab5f77037fa958b9180ce115f124d3c4","scripts":{"dev":"rollup -c -w","build":"rimraf dist && rollup -c","prepare":"npm run build","release":"node scripts/release.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build"},"_npmUser":{"name":"artemsites","email":"info@artemsites.ru"},"repository":{"url":"git+https://github.com/BM-front/bm-toast.git","type":"git"},"_npmVersion":"10.9.2","description":"Tiny TypeScript toast notifications with queue, callbacks and styles. Zero deps.","directories":{},"sideEffects":["**/*.scss","dist/style.css"],"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ora":"^8.2.0","sass":"^1.90.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.47.1","cssnano":"^7.1.0","postcss":"^8.5.6","inquirer":"^12.9.3","typescript":"^5.9.2","autoprefixer":"^10.4.21","rollup-plugin-dts":"^6.2.3","rollup-plugin-copy":"^3.5.0","prettier-plugin-jsdoc":"^1.3.0","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.4","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/bm-toast_0.2.2_1756129386569_0.6635991105984953","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bm-front/bm-toast","version":"1.0.1","keywords":["toast","toasts","notification","notifications","vanilla","typescript","queue","progressbar","dom","browser","ui","scss","css","lightweight"],"author":{"name":"BM-Front"},"license":"MIT","_id":"@bm-front/bm-toast@1.0.1","maintainers":[{"name":"aalex98","email":"ipalexeev98@mail.ru"},{"name":"poliklot","email":"poliklot@vk.com"},{"name":"artemsites","email":"info@artemsites.ru"}],"homepage":"https://github.com/BM-front/bm-toast#readme","bugs":{"url":"https://github.com/BM-front/bm-toast/issues"},"dist":{"shasum":"aa651f7219f627a272d5af905afeaaa492c87a5e","tarball":"https://registry.npmjs.org/@bm-front/bm-toast/-/bm-toast-1.0.1.tgz","fileCount":12,"integrity":"sha512-ew8RAa8qGWyfzc7gBOowGscD+pqmxvXxqp2GVK1OC2Wyjqq/PhCLKI0d061UG/awspHFEAMUXVMdyjboIRNAIg==","signatures":[{"sig":"MEYCIQCokVqFVYo9/fH6ONxIdNoTBxKTAdEolmndNFxAfj+EEAIhAI/pF6Jjh70ltgv1+B5QG+vjXxV+OSWnGwuHqjM7b/s9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":123154},"main":"./dist/index.cjs","type":"module","style":"dist/style.css","types":"./dist/index.d.ts","module":"./dist/index.js","browser":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"},"./style.css":"./dist/style.css","./style.scss":"./dist/style.scss"},"gitHead":"2fb4e8019929f3d15e91b75dd87de6bb69817d0e","scripts":{"dev":"rollup -c -w","build":"rimraf dist && rollup -c","prepare":"npm run build","release":"node scripts/release.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build"},"_npmUser":{"name":"aalex98","email":"ipalexeev98@mail.ru"},"repository":{"url":"git+https://github.com/BM-front/bm-toast.git","type":"git"},"_npmVersion":"11.6.2","description":"Tiny TypeScript toast notifications with queue, callbacks and styles. Zero deps.","directories":{},"sideEffects":["**/*.scss","dist/style.css"],"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ora":"^8.2.0","sass":"^1.90.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.47.1","cssnano":"^7.1.0","postcss":"^8.5.6","inquirer":"^12.9.3","typescript":"^5.9.2","autoprefixer":"^10.4.21","rollup-plugin-dts":"^6.2.3","rollup-plugin-copy":"^3.5.0","rollup-plugin-serve":"^3.0.0","prettier-plugin-jsdoc":"^1.3.0","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^28.0.6","rollup-plugin-livereload":"^2.0.5","@rollup/plugin-typescript":"^12.1.4","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/bm-toast_1.0.1_1774355385978_0.30410247411283","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bm-front/bm-toast","version":"1.0.2","description":"Tiny TypeScript toast notifications with queue, callbacks and styles. Zero deps.","keywords":["toast","toasts","notification","notifications","vanilla","typescript","queue","progressbar","dom","browser","ui","scss","css","lightweight"],"author":{"name":"BM-Front"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/BM-front/bm-toast.git"},"bugs":{"url":"https://github.com/BM-front/bm-toast/issues"},"homepage":"https://github.com/BM-front/bm-toast#readme","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","browser":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs","default":"./dist/index.js"},"./style.css":"./dist/style.css","./style.scss":"./dist/style.scss"},"style":"dist/style.css","sideEffects":["**/*.scss","dist/style.css"],"publishConfig":{"access":"public"},"engines":{"node":">=18"},"scripts":{"build":"rimraf dist && rollup -c","dev":"rollup -c -w","release":"node scripts/release.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build","prepare":"npm run build"},"devDependencies":{"@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-node-resolve":"^16.0.1","@rollup/plugin-typescript":"^12.1.4","autoprefixer":"^10.4.21","cssnano":"^7.1.0","inquirer":"^12.9.3","ora":"^8.2.0","postcss":"^8.5.6","prettier-plugin-jsdoc":"^1.3.0","rimraf":"^6.0.1","rollup":"^4.47.1","rollup-plugin-copy":"^3.5.0","rollup-plugin-dts":"^6.2.3","rollup-plugin-livereload":"^2.0.5","rollup-plugin-postcss":"^4.0.2","rollup-plugin-serve":"^3.0.0","sass":"^1.90.0","tslib":"^2.8.1","typescript":"^5.9.2"},"gitHead":"36ecb1c29c7261f200bf696042f2c8737b0ff683","_id":"@bm-front/bm-toast@1.0.2","_nodeVersion":"22.14.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-gRWSWBPP+OC4JmK6dDvtniXdVkWiu3GUeu5s04f08Qh45AlgG3y7hixAv+g4rcC3ehSRdB9wp3pPI9toNLAmOA==","shasum":"3735b9582f458234dc913082cfd34be2e14037b1","tarball":"https://registry.npmjs.org/@bm-front/bm-toast/-/bm-toast-1.0.2.tgz","fileCount":12,"unpackedSize":123441,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEWvChSNK+iavLVO1Adp4qw6mp+u2o/8VgDRuIGrRp83AiEA40rn7GVOojqgAVNCHer3Pid/w8Nr1xGgFhcg6XhZ0mg="}]},"_npmUser":{"name":"aalex98","email":"ipalexeev98@mail.ru"},"directories":{},"maintainers":[{"name":"aalex98","email":"ipalexeev98@mail.ru"},{"name":"poliklot","email":"poliklot@vk.com"},{"name":"artemsites","email":"info@artemsites.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bm-toast_1.0.2_1774360746790_0.5084981978939396"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-22T12:21:53.296Z","modified":"2026-03-24T13:59:07.131Z","0.2.0":"2025-08-22T12:21:53.625Z","0.2.1":"2025-08-22T12:35:10.979Z","0.2.2":"2025-08-25T13:43:06.761Z","1.0.1":"2026-03-24T12:29:46.119Z","1.0.2":"2026-03-24T13:59:06.954Z"},"bugs":{"url":"https://github.com/BM-front/bm-toast/issues"},"author":{"name":"BM-Front"},"license":"MIT","homepage":"https://github.com/BM-front/bm-toast#readme","keywords":["toast","toasts","notification","notifications","vanilla","typescript","queue","progressbar","dom","browser","ui","scss","css","lightweight"],"repository":{"type":"git","url":"git+https://github.com/BM-front/bm-toast.git"},"description":"Tiny TypeScript toast notifications with queue, callbacks and styles. Zero deps.","maintainers":[{"name":"aalex98","email":"ipalexeev98@mail.ru"},{"name":"poliklot","email":"poliklot@vk.com"},{"name":"artemsites","email":"info@artemsites.ru"}],"readme":"# bm-toast\n\nМаленькая библиотека тостов на TypeScript без зависимостей. Очередь, лимит видимых, автозакрытие с прогресс-баром,\nколбэки и понятные стили (SCSS/CSS).\n\n- 🚫 Zero deps (только `tslib`)\n- 🧱 ESM + CJS + типы\n- 🧵 Очередь с FIFO/LIFO и лимитом видимых\n- ⏱️ Автозакрытие с анимированным прогресс-баром и паузой при скрытой вкладке\n- ♿ `role=\"alert\"/\"status\"`, `aria-label` на кнопке закрытия\n- 🎯 Колбэки на все этапы (enqueue, show, hide, click, close, timeout)\n\n## Установка\n\n```bash\nnpm i @bm-front/bm-toast\n# или pnpm add @bm-front/bm-toast\n```\n\nПодключите стили (любой вариант):\n\n```ts\n// CSS\nimport '@bm-front/bm-toast/style.css';\n\n// или SCSS (если у вас есть пайплайн для scss)\nimport '@bm-front/bm-toast/style.scss';\n```\n\n## Быстрый старт\n\n```ts\nimport { showToast } from '@bm-front/bm-toast';\nimport '@bm-front/bm-toast/style.css';\n\nshowToast({\n\ttype: 'success',\n\ttitle: 'Сохранено',\n\tdescription: 'Ваши изменения применены',\n});\n```\n\n## API\n\n### `showToast(options?: ShowToastOptions): string`\n\nПоказывает новый тост. Возвращает `id`.\n\nКлючевые опции:\n\n- `type`: `'success' | 'info' | 'warn' | 'error' | 'custom'` (по умолчанию `'info'`)\n- `title?: string`, `description?: string`\n- `position`: `'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center'` (по умолчанию\n  `'top-right'`)\n- `closeButton`: `boolean | { label?: string; ariaLabel?: string }` (по умолчанию `true`)\n- `autoCloseMs`: `number | false` — автозакрытие, мс (по умолчанию `5000`)\n- `progress`: `boolean` — рисовать прогресс-бар (по умолчанию `true`)\n- `customKey`: `string` — для кастомного типа добавит класс `bm-toast--custom-<key>`\n- `className`: `string` — дополнительные классы\n- `id`: `string` — контролируемый идентификатор\n- `insertAt`: `'start' | 'end'` — куда в контейнере вставлять (по умолчанию `'start'`)\n- Колбэки: `onEnqueue`, `onShow`, `onHide`, `onClick`, `onCloseClick`, `onTimeout`\n\n### `hideToast(id?: string): void`\n\nСкрывает тост по `id`. Если `id` не передан — скрывает самый старый видимый.\n\n### `setDefaultParameters({ lib?, show? }): void`\n\nУстанавливает глобальные дефолты для библиотеки и для каждого тоста:\n\n```ts\nimport { setDefaultParameters } from '@bm-front/bm-toast';\n\nsetDefaultParameters({\n\tlib: {\n\t\tmaxVisible: 3, // максимум видимых тостов\n\t\tcontainerClassName: 'bm-toast-container',\n\t\tinsertAt: 'start', // вставка в видимом контейнере\n\t\tqueueInsert: 'end', // 'end' (FIFO) или 'start' (LIFO)\n\t\t// Глобальные колбэки: onEnqueue/onShow/onHide/onClick/onCloseClick/onTimeout\n\t},\n\tshow: {\n\t\tposition: 'top-right',\n\t\tautoCloseMs: 5000,\n\t\tprogress: true,\n\t\tcloseButton: true,\n\t\t// Любые поля ShowToastOptions → станут дефолтами\n\t},\n});\n```\n\n> Есть алиас с опечаткой: `setDefaultParametrs` — оставлен для обратной совместимости.\n\n## Примеры\n\n### Очередь и лимит\n\n```ts\nsetDefaultParameters({ lib: { maxVisible: 2, queueInsert: 'end' } });\n\nfor (let i = 1; i <= 5; i++) {\n\tshowToast({ title: `Тост #${i}`, description: 'FIFO очередь' });\n}\n```\n\n### Кастомный тип\n\n```ts\nshowToast({\n\ttype: 'custom',\n\tcustomKey: 'purple',\n\ttitle: 'Фиолетовый тост',\n});\n\n// style.css / style.scss\n// .bm-toast--custom-purple { background: rebeccapurple; }\n```\n\n### Обработчики кликов/закрытия\n\n```ts\nshowToast({\n\ttitle: 'Нажми меня',\n\tonClick: (id, ev) => console.log('click', id, ev),\n\tonCloseClick: id => console.log('close', id),\n\tonHide: id => console.log('hidden', id),\n});\n```\n\n### Программное закрытие\n\n```ts\nconst id = showToast({ title: 'Закроюсь через 1с программно', autoCloseMs: false });\nsetTimeout(() => hideToast(id), 1000);\n```\n\n## Стили и позиционирование\n\nКонтейнеры создаются автоматически с классами:\n\n```\n.bm-toast-container\n.bm-toast-container--top-right | --top-left | --bottom-right | --bottom-left | --top-center | --bottom-center\n```\n\nСами тосты имеют базовый класс `.bm-toast` и модификаторы типа:\n\n```\n.bm-toast--success | --info | --warn | --error | --custom --custom-<key>\n```\n\nВы можете переопределить цвета, тени, шрифты и т.д. в своих стилях. Прогресс-бар — элемент `.bm-toast__progress` с\nанимацией по CSS.\n\n## A11y\n\n- Для типов `error`/`warn` используется `role=\"alert\"`, иначе — `role=\"status\"`.\n- Кнопка закрытия имеет `aria-label` (можно задать через `closeButton.ariaLabel`).\n\n## SSR / безопасное подключение\n\nБиблиотека предназначена для браузера и использует `document`. Если рендерите на сервере — вызывайте API только на\nклиенте (например, в `useEffect`).\n\n## Разработка\n\n### Установка зависимостей\n\n```bash\nnpm install\n```\n\n### Режим разработки\n\n```bash\nnpm run dev\n```\n\nЗапускает Rollup в режиме watch, открывает браузер на `http://localhost:3000` с демо-страницей из папки `dev/`. При\nизменении любого `.ts` или `.scss` файла страница перезагружается автоматически.\n\n### Продакшен-сборка\n\n```bash\nnpm run build\n```\n\nСобирает `dist/`:\n\n- `dist/index.js` — ESM-бандл\n- `dist/index.cjs` — CJS-бандл\n- `dist/index.d.ts` — TypeScript-типы\n- `dist/style.css` — скомпилированные стили\n- `dist/style.scss` — исходные стили (для проектов с SCSS-пайплайном)\n\n### Проверка типов\n\n```bash\nnpm run typecheck\n```\n\n### Релиз\n\n```bash\nnpm run release\n```\n\nИнтерактивный скрипт: выбирает тип версии (patch / minor / major / custom), собирает проект, публикует на npm, создаёт\ngit-коммит, тег и пушит в репозиторий.\n\n### Структура проекта\n\n```\nsrc/\n  index.ts      # основной код библиотеки\n  style.scss    # стили\n  icons/        # SVG-иконки для типов тостов\ndev/\n  index.html    # демо-страница для локальной разработки\ndocs/\n  index.html    # публичная демо-страница (GitHub Pages)\ndist/           # собранные файлы (генерируется автоматически)\nscripts/\n  release.js    # скрипт релиза\n```\n\n## Лицензия\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}