Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5 Only #82

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ node_modules
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
/dist
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
<img src="./header-image.png" alt="" />
<p align="center">
<img src="https://badgen.net/badge/license/MIT/blue" />
<img src="https://badgen.net/npm/v/svelte-french-toast" />
<img src="https://badgen.net/npm/v/svelte-5-french-toast" />
</p>
<p align="center">
<a href="https://svelte-french-toast.vercel.app">Website</a> · <a href="https://npmjs.com/package/svelte-french-toast">NPM Package</a>
<a href="https://svelte-french-toast.vercel.app">Website</a> · <a href="https://npmjs.com/package/svelte-5-french-toast">NPM Package</a>
</p>

# svelte-french-toast
# svelte-5-french-toast

> Buttery smooth Svelte notifications.
`svelte-5-french-toast` is `svelte-french-toast` from https://github.com/kbrgl/svelte-french-toast rewritten to Svelte 5.

svelte-french-toast is a Svelte port of Timo Lins’s react-hot-toast, a lightweight, customizable, and beautiful-by-default toast notification library.
(Could not wait for [PR](https://github.com/kbrgl/svelte-french-toast/pull/82) to be merged.)

## Installation

Install the package with your favorite package manager:

```
npm install svelte-french-toast
npm install svelte-5-french-toast
```

```
pnpm install svelte-french-toast
pnpm install svelte-5-french-toast
```

```
yarn add svelte-french-toast
yarn add svelte-5-french-toast
```

```
bun add svelte-5-french-toast
```

## Basic usage
Expand All @@ -35,7 +39,7 @@ Mount a `<Toaster />` at the top level of your app and use the `toast` API to di

```js
<script>
import toast, {Toaster} from 'svelte-french-toast'
import toast, {Toaster} from 'svelte-5-french-toast'

function handleClick() {
toast.success('Hello, world!')
Expand Down
63 changes: 33 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "svelte-french-toast",
"version": "1.2.0",
anatoliy-t7 marked this conversation as resolved.
Show resolved Hide resolved
"description": "Buttery smooth Svelte toasts. Lightweight, customizable, and beautiful by default.",
"name": "svelte-5-french-toast",
"version": "2.0.4",
"description": "Buttery smooth Svelte 5 toasts. Lightweight, customizable, and beautiful by default. Svelte 5 Only",
"keywords": [
"svelte",
"notifications",
Expand All @@ -10,10 +10,10 @@
],
"repository": {
"type": "git",
"url": "https://github.com/kbrgl/svelte-french-toast.git"
"url": "git+https://github.com/anatoliy-t7/svelte-5-french-toast.git"
},
"license": "MIT",
"author": "Kabir Goel",
"author": "Anatoliy",
"type": "module",
"exports": {
".": {
Expand All @@ -24,7 +24,9 @@
"svelte": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
"dist",
"!dist/**/*.test.*",
"!dist/**/*.spec.*"
],
"scripts": {
"build": "vite build && pnpm run package",
Expand All @@ -41,35 +43,36 @@
"test:unit": "vitest"
},
"dependencies": {
"svelte-writable-derived": "^3.1.0"
"svelte-writable-derived": "^3.1.1"
},
"peerDependencies": {
"svelte": "^3.57.0 || ^4.0.0"
"svelte": "^5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.31.2",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.20.5",
"@sveltejs/package": "^2.1.0",
"@types/prismjs": "^1.26.0",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-svelte": "^2.31.1",
"postcss": "^8.4.21",
"prettier": "^2.8.4",
"prettier-plugin-svelte": "^2.10.1",
"@playwright/test": "^1.49.1",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/kit": "^2.15.2",
"@sveltejs/package": "^2.3.7",
"@types/prismjs": "^1.26.5",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^2.46.1",
"postcss": "^8.5.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"prism-svelte": "^0.5.0",
"prismjs": "^1.29.0",
"publint": "^0.1.10",
"svelte": "^4.0.0",
"svelte-check": "^3.4.4",
"tailwindcss": "^3.2.7",
"tslib": "^2.5.0",
"typescript": "~5.0.2",
"vite": "^4.2.0",
"vitest": "^0.29.3"
"publint": "^0.3.2",
"svelte": "^5.17.4",
"svelte-check": "^4.1.4",
"tailwindcss": "^3.4.17",
"tslib": "^2.8.1",
"typescript": "~5.7.3",
"vite": "^6.0.7",
"vitest": "^2.1.8"
}
}
Loading