@samline/notify 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -50,8 +50,8 @@ Use the browser build when your project loads scripts directly and cannot compil
50
50
 
51
51
 
52
52
  ```html
53
- <script src="https://unpkg.com/@samline/notify@0.2.1/dist/notify.umd.js"></script>
54
- <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.2.1/dist/styles.css" />
53
+ <script src="https://unpkg.com/@samline/notify@0.2.3/dist/notify.umd.js"></script>
54
+ <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.2.3/dist/styles.css" />
55
55
 
56
56
  <script>
57
57
  // Always use an array of strings as the second argument
@@ -81,7 +81,7 @@ Choose the entrypoint matching your stack so you only import what you need.
81
81
  | Use case | Import | Guide |
82
82
  | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
83
83
  | Vanilla JS | `import { notify, initToasters } from '@samline/notify/vanilla'` | [docs/vanilla.md](docs/vanilla.md) |
84
- | Browser / CDN | `<script src="https://unpkg.com/@samline/notify@0.2.1/dist/notify.umd.js"></script>`<br/>`const api = window.notify; api.initToasters(...);` | [docs/browser.md](docs/browser.md) |
84
+ | Browser / CDN | `<script src="https://unpkg.com/@samline/notify@0.2.3/dist/notify.umd.js"></script>`<br/>`const api = window.notify; api.initToasters(...);` | [docs/browser.md](docs/browser.md) |
85
85
  | React | `import { Toaster, notify } from '@samline/notify/react'` | [docs/react.md](docs/react.md) |
86
86
  | Vue | `import { Toaster, notify } from '@samline/notify/vue'` | [docs/vue.md](docs/vue.md) |
87
87
  | Svelte | `import Toaster, { notify } from '@samline/notify/svelte'` | [docs/svelte.md](docs/svelte.md) |
package/dist/styles.css CHANGED
@@ -5,7 +5,7 @@
5
5
  --sileo-error: #ef4444;
6
6
  --sileo-info: #2563eb;
7
7
  --sileo-warning: #f59e0b;
8
- --sileo-gap: 12px;
8
+ --sileo-gap: 0.75rem;
9
9
  }
10
10
 
11
11
  .sileo-toaster{
@@ -17,33 +17,47 @@
17
17
  pointer-events: none;
18
18
  }
19
19
 
20
- .sileo-toaster[data-position="top-right"]{ top: 16px; right: 16px; align-items:flex-end; }
21
- .sileo-toaster[data-position="top-left"]{ top: 16px; left: 16px; align-items:flex-start; }
22
- .sileo-toaster[data-position="bottom-right"]{ bottom: 16px; right: 16px; align-items:flex-end; }
23
- .sileo-toaster[data-position="bottom-left"]{ bottom: 16px; left: 16px; align-items:flex-start; }
20
+ .sileo-toaster[data-position="top-right"]{ top: 1rem; right: 1rem; align-items:flex-end; }
21
+ .sileo-toaster[data-position="top-left"]{ top: 1rem; left: 1rem; align-items:flex-start; }
22
+ .sileo-toaster[data-position="bottom-right"]{ bottom: 1rem; right: 1rem; align-items:flex-end; }
23
+ .sileo-toaster[data-position="bottom-left"]{ bottom: 1rem; left: 1rem; align-items:flex-start; }
24
+
25
+ /* Soporte para posiciones centradas */
26
+ .sileo-toaster[data-position="top-center"] {
27
+ top: 1rem;
28
+ left: 50%;
29
+ transform: translateX(-50%);
30
+ align-items: center;
31
+ }
32
+ .sileo-toaster[data-position="bottom-center"] {
33
+ bottom: 1rem;
34
+ left: 50%;
35
+ transform: translateX(-50%);
36
+ align-items: center;
37
+ }
24
38
 
25
39
  .sileo-toast{
26
40
  pointer-events: auto;
27
- min-width: 220px;
28
- max-width: 360px;
41
+ min-width: 13.75rem;
42
+ max-width: 22.5rem;
29
43
  background: var(--sileo-bg);
30
44
  color: var(--sileo-foreground);
31
- padding: 12px 14px;
32
- border-radius: 10px;
33
- box-shadow: 0 6px 18px rgba(2,6,23,0.6);
45
+ padding: 0.75rem 0.875rem;
46
+ border-radius: 0.625rem;
47
+ box-shadow: 0 0.375rem 1.125rem rgba(2,6,23,0.6);
34
48
  display: flex;
35
- gap: 8px;
49
+ gap: 0.5rem;
36
50
  align-items: center;
37
51
  position: relative;
38
52
  overflow: hidden;
39
53
  }
40
54
 
41
- .sileo-toast[data-type="success"]{ border-left: 4px solid var(--sileo-success); }
42
- .sileo-toast[data-type="error"]{ border-left: 4px solid var(--sileo-error); }
43
- .sileo-toast[data-type="info"]{ border-left: 4px solid var(--sileo-info); }
44
- .sileo-toast[data-type="warning"]{ border-left: 4px solid var(--sileo-warning); }
55
+ .sileo-toast[data-type="success"]{ border-left: 0.25rem solid var(--sileo-success); }
56
+ .sileo-toast[data-type="error"]{ border-left: 0.25rem solid var(--sileo-error); }
57
+ .sileo-toast[data-type="info"]{ border-left: 0.25rem solid var(--sileo-info); }
58
+ .sileo-toast[data-type="warning"]{ border-left: 0.25rem solid var(--sileo-warning); }
45
59
 
46
- .sileo-toast-header{ font-weight: 600; font-size: 14px; }
47
- .sileo-toast-desc{ font-size: 13px; opacity: 0.85; margin-top: 4px; }
48
- .sileo-toast-btn{ margin-left: 8px; background: transparent; color: inherit; border: 1px solid rgba(255,255,255,0.08); padding: 6px 8px; border-radius: 6px; cursor: pointer; }
49
- .sileo-toast-close{ position: absolute; right: 8px; top: 6px; background: transparent; border: none; color: inherit; font-size: 16px; cursor: pointer; }
60
+ .sileo-toast-header{ font-weight: 600; font-size: 0.875rem; }
61
+ .sileo-toast-desc{ font-size: 0.8125rem; opacity: 0.85; margin-top: 0.25rem; }
62
+ .sileo-toast-btn{ margin-left: 0.5rem; background: transparent; color: inherit; border: 1px solid rgba(255,255,255,0.08); padding: 0.375rem 0.5rem; border-radius: 0.375rem; cursor: pointer; }
63
+ .sileo-toast-close{ position: absolute; right: 0.5rem; top: 0.375rem; background: transparent; border: none; color: inherit; font-size: 1rem; cursor: pointer; }
package/docs/browser.md CHANGED
@@ -8,8 +8,8 @@ Use this package directly in the browser when you cannot use npm modules or a bu
8
8
  Add the stylesheet and UMD bundle to your HTML:
9
9
 
10
10
  ```html
11
- <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.2.1/dist/styles.css">
12
- <script src="https://unpkg.com/@samline/notify@0.2.1/dist/notify.umd.js"></script>
11
+ <link rel="stylesheet" href="https://unpkg.com/@samline/notify@0.2.3/dist/styles.css">
12
+ <script src="https://unpkg.com/@samline/notify@0.2.3/dist/notify.umd.js"></script>
13
13
  <script>
14
14
  document.addEventListener('DOMContentLoaded', () => {
15
15
  const api = window.notify; // or window.notifications for legacy
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samline/notify",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Notifications engine inspired by Sileo, with adapters for vanilla, React, Vue and Svelte.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",