[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109175":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":36,"updatedAt":37,"readmeContent":38,"aiSummary":39,"trendingCount":16,"starSnapshotCount":16,"syncStatus":40,"lastSyncTime":41,"discoverSource":42},109175,"ding","YusufCeng1z\u002Fding","YusufCeng1z","Toasts with real spring physics. One toast that morphs in place. No dependencies. React, Svelte, Vue and plain DOM.","https:\u002F\u002Fding.yusufcengiz.dev",null,"TypeScript",825,24,3,1,0,8,102,755,38,94.19,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35],"animation","notifications","react","spring-physics","svelte","toast","typescript","ui-components","zero-dependency","2026-11-21 17:40:20","2026-11-23 20:10:23","\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets\u002Fding-dark.svg\" \u002F>\n    \u003Cimg src=\"assets\u002Fding.svg\" alt=\"Ding mascot\" width=\"180\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">Ding\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  Toasts with real spring physics.\u003Cbr \u002F>\n  One toast that morphs in place. No dependencies. React, Svelte or plain DOM.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fding.yusufcengiz.dev\">Live demo and docs\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fding-demo.gif\" alt=\"A progress toast turns into a success toast, then an error toast with a Retry button morphs into a new message\" width=\"660\" \u002F>\n\u003C\u002Fp>\n\n---\n\n## Why Ding\n\n- **One toast at a time.** A new call morphs the toast on screen instead of stacking a second one.\n- **Real springs.** Size, shape and text move on a spring solver, so interrupting an animation keeps its momentum.\n- **No stylesheet.** Styles are injected from JavaScript. Nothing to import.\n- **Light, dark and system themes**, six positions, right-to-left support.\n- **Rich content.** Description, avatar, buttons, progress bar, a countdown line, small trailing text.\n- **Accessible by default.** Persistent live regions, keyboard dismiss, `prefers-reduced-motion`.\n- **Optional sound.** A soft built-in tone per status, or plug in your own.\n- **Strict TypeScript**, ESM and CommonJS builds.\n\n## Install\n\n```bash\nnpm i @yusufceng1z\u002Fding-react    # React 18+\nnpm i @yusufceng1z\u002Fding-svelte   # Svelte 5\nnpm i @yusufceng1z\u002Fding          # plain DOM\n```\n\nEach framework package depends on the small `@yusufceng1z\u002Fding` core, so you install only one.\n\nUsing shadcn\u002Fui? Ding is in the shadcn registry directory, so one command installs the React package and adds a `ding-toaster.tsx` wrapper:\n\n```bash\nnpx shadcn@latest add @ding\u002Fding\n```\n\n## Quick start\n\nRender the toaster once, then call `toast` from anywhere.\n\n**React**\n\n```tsx\nimport { Toaster, toast } from '@yusufceng1z\u002Fding-react';\n\nexport default function App() {\n  return (\n    \u003C>\n      \u003CToaster position=\"top-center\" theme=\"system\" \u002F>\n      \u003Cbutton onClick={() => toast.success('Saved')}>Save\u003C\u002Fbutton>\n    \u003C\u002F>\n  );\n}\n```\n\n**Svelte 5**\n\n```svelte\n\u003Cscript>\n  import { Toaster, toast } from '@yusufceng1z\u002Fding-svelte';\n\u003C\u002Fscript>\n\n\u003CToaster position=\"top-center\" theme=\"system\" \u002F>\n\u003Cbutton onclick={() => toast.success('Saved')}>Save\u003C\u002Fbutton>\n```\n\n**Plain DOM**\n\n```ts\nimport { mountToaster, toast } from '@yusufceng1z\u002Fding';\n\nmountToaster({ position: 'top-center' });\ntoast.success('Saved');\n```\n\n## Usage\n\n```ts\ntoast.success('Saved');\ntoast.error('Payment failed', { description: 'Card declined' });\ntoast.warning('Storage almost full');\ntoast.info('New version available');\ntoast.loading('Uploading…');\n```\n\nEvery call returns the toast id.\n\n### Promises and updates\n\n```ts\ntoast.promise(save(), {\n  loading: 'Saving…',\n  success: 'Saved',\n  error: (err) => `Could not save: ${err.message}`,\n});\n\nconst id = toast.loading('Uploading photo…', { progress: 0 });\ntoast.update(id, { progress: 0.6 });\ntoast.update(id, { type: 'success', title: 'Photo uploaded', progress: null });\n```\n\nOnly the newest caller can update the shared toast, so a slow request that finishes late cannot overwrite a newer message.\n\n### Actions\n\nAn `onClick` may return a patch. The toast then morphs in place instead of closing.\n\n```ts\ntoast.success('Message deleted', {\n  action: {\n    label: 'Undo',\n    onClick: () => {\n      restore();\n      return { type: 'info', title: 'Restored' };\n    },\n  },\n});\n```\n\n## Options\n\n| Option | Description |\n| --- | --- |\n| `description` | Second line of text |\n| `action` | `{ label, onClick }`, the main button |\n| `secondary` | `{ label, onClick }`, a quieter button beside the action |\n| `image` | Avatar or thumbnail URL, replaces the status icon |\n| `meta` | Small trailing text, such as `now` or `⌘V` |\n| `progress` | `0` to `1`, draws a thin bar at the bottom |\n| `duration` | Milliseconds before it closes. `0` keeps it until dismissed. Default `5000` |\n| `id` | Reuse an id so repeated calls from one place stay one caller |\n\nErrors, loading toasts and toasts with a button stay until dismissed. Hover and keyboard focus pause the timer. Repeating the same toast adds a counter (×2).\n\n## Configure\n\n```ts\ntoast.configure({\n  position: 'bottom-right', \u002F\u002F top-left, top-center, top-right, bottom-left, bottom-center, bottom-right\n  theme: 'dark',            \u002F\u002F system, light, dark\n  sound: true,\n  volume: 0.5,\n});\n\ntoast.dismiss(id); \u002F\u002F one toast\ntoast.dismiss();   \u002F\u002F all\n```\n\n## Sound\n\nOff by default. With `sound: true` each status plays its own soft tone: success rises, error falls, warning double-taps, info is a single note. Loading is silent and progress updates never make a sound. Browsers keep audio locked until a click or key press.\n\nTo use your own sounds, pass a function. It receives `success`, `error`, `warning`, `info` or `loading`:\n\n```ts\ntoast.configure({ sound: (type) => mySounds.play(type) });\n```\n\n## Accessibility\n\n- Messages go through persistent live regions: errors are assertive, everything else is polite.\n- `Esc` dismisses. `Alt` + `T` moves focus into the toast.\n- Respects `prefers-reduced-motion`.\n- Mirrors automatically on right-to-left pages.\n\n### Labels\n\nThe notifications region and the close button have English accessible names by default. Pass your own strings to localize them; keys you leave out keep their default.\n\n```ts\ntoast.configure({\n  labels: {\n    region: 'Notifications',\n    dismiss: 'Fermer la notification',\n  },\n});\n```\n\n`\u003CToaster labels={{ dismiss: 'Fermer la notification' }} \u002F>` does the same in React and Svelte, and `mountToaster({ labels })` in plain DOM.\n\n## Packages\n\n| Package | Description |\n| --- | --- |\n| [`@yusufceng1z\u002Fding`](packages\u002Fcore) | Springs, timers, store, sound and the plain DOM renderer |\n| [`@yusufceng1z\u002Fding-react`](packages\u002Freact) | React renderer |\n| [`@yusufceng1z\u002Fding-svelte`](packages\u002Fsvelte) | Svelte 5 renderer |\n\nThe core owns all behavior. The framework packages only render.\n\n## Development\n\n```bash\npnpm install\npnpm test        # unit tests\npnpm typecheck\npnpm build       # build all packages\npnpm dev         # docs and demo site\n```\n\nThe docs site lives in `apps\u002Fdocs`. A machine-readable summary is in [`apps\u002Fdocs\u002Fpublic\u002Fllms.txt`](apps\u002Fdocs\u002Fpublic\u002Fllms.txt).\n\n## License\n\n[MIT](LICENSE)\n","Ding 是一个轻量级、零依赖的 Toast 通知组件库，支持 React、Svelte 和原生 DOM，核心特性是基于真实弹簧物理引擎（spring physics）实现单 Toast 原位形态变换动画。它通过纯 JavaScript 注入样式，无需外部 CSS，内置深色\u002F浅色\u002F系统主题、多位置布局、RTL 支持、无障碍访问（如 live region、键盘关闭）、可选提示音及丰富内容支持（进度条、按钮、描述等）。适用于需高交互性、流畅中断动画与主题一致性要求的 Web 应用通知场景。",2,"2026-11-24 04:36:04","CREATED_QUERY"]