@samline/notify 1.0.2 → 2.0.1
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/{LICENSE → LICENSE.md} +2 -2
- package/README.md +27 -163
- package/dist/_runtime.d.mts +87 -0
- package/dist/_runtime.d.ts +87 -0
- package/dist/_runtime.js +97 -0
- package/dist/_runtime.mjs +83 -0
- package/dist/browser/assets-client-B-VVPPYQ.js +114 -0
- package/dist/browser/assets-client-CUzxHubR.mjs +108 -0
- package/dist/browser/index-client-BBOQyMFk.mjs +173 -0
- package/dist/browser/index-client-Czb7hTpD.js +181 -0
- package/dist/browser/index.cjs +24716 -0
- package/dist/browser/index.d.mts +134 -0
- package/dist/browser/index.d.ts +134 -0
- package/dist/browser/index.js +24718 -0
- package/dist/browser/index.mjs +24707 -0
- package/dist/browser/render-client-CjcQoukB.js +981 -0
- package/dist/browser/render-client-bGRSTd-L.mjs +974 -0
- package/dist/core/index.d.mts +68 -0
- package/dist/core/index.d.ts +68 -0
- package/dist/core/index.js +1 -0
- package/dist/core/index.mjs +1 -0
- package/dist/index.d.mts +131 -0
- package/dist/index.d.ts +131 -0
- package/dist/index.js +24700 -0
- package/dist/index.mjs +24693 -0
- package/dist/react/index.d.mts +158 -0
- package/dist/react/index.d.ts +158 -0
- package/dist/react/index.js +1116 -0
- package/dist/react/index.mjs +1107 -0
- package/dist/styles.css +589 -422
- package/dist/svelte/assets-client-B-VVPPYQ.js +114 -0
- package/dist/svelte/assets-client-CUzxHubR.mjs +108 -0
- package/dist/svelte/index-client-DbXbWMIe.js +177 -0
- package/dist/svelte/index-client-Dj_WfPK9.mjs +170 -0
- package/dist/svelte/index.d.mts +14 -0
- package/dist/svelte/index.d.ts +14 -0
- package/dist/svelte/index.js +24722 -0
- package/dist/svelte/index.mjs +24713 -0
- package/dist/svelte/render-client-CjcQoukB.js +981 -0
- package/dist/svelte/render-client-bGRSTd-L.mjs +974 -0
- package/dist/vue/assets-client-B-VVPPYQ.js +114 -0
- package/dist/vue/assets-client-CUzxHubR.mjs +108 -0
- package/dist/vue/index-client-DbXbWMIe.js +177 -0
- package/dist/vue/index-client-Dj_WfPK9.mjs +170 -0
- package/dist/vue/index.d.mts +50 -0
- package/dist/vue/index.d.ts +50 -0
- package/dist/vue/index.js +24777 -0
- package/dist/vue/index.mjs +24770 -0
- package/dist/vue/render-client-CjcQoukB.js +981 -0
- package/dist/vue/render-client-bGRSTd-L.mjs +974 -0
- package/package.json +141 -95
- package/dist/browser-notify.js +0 -68
- package/dist/cc-2Yt7NqMX.mjs +0 -21
- package/dist/cc-B6peeNak.mjs +0 -33
- package/dist/cc-BWuAzFJ6.js +0 -12
- package/dist/cc-CaBHsjUt.js +0 -34
- package/dist/cc-DGff5sSY.js +0 -21
- package/dist/cc-he3fHS3P.mjs +0 -12
- package/dist/notify.d.mts +0 -48
- package/dist/notify.d.mts.map +0 -1
- package/dist/notify.d.ts +0 -48
- package/dist/notify.d.ts.map +0 -1
- package/dist/notify.js +0 -206
- package/dist/notify.mjs +0 -202
- package/dist/react-notify-12s--2JK5UjB.mjs +0 -1244
- package/dist/react-notify-12s-Kv2M6zlv.js +0 -1247
- package/dist/react.d.mts +0 -70
- package/dist/react.d.mts.map +0 -1
- package/dist/react.d.ts +0 -70
- package/dist/react.d.ts.map +0 -1
- package/dist/react.js +0 -19
- package/dist/react.mjs +0 -10
- package/dist/render-notify-toasts.js +0 -213
- package/dist/svelte.d.mts +0 -49
- package/dist/svelte.d.mts.map +0 -1
- package/dist/svelte.d.ts +0 -49
- package/dist/svelte.d.ts.map +0 -1
- package/dist/svelte.js +0 -284
- package/dist/svelte.mjs +0 -280
- package/dist/vue.d.mts +0 -107
- package/dist/vue.d.mts.map +0 -1
- package/dist/vue.d.ts +0 -107
- package/dist/vue.d.ts.map +0 -1
- package/dist/vue.js +0 -2215
- package/dist/vue.mjs +0 -2211
package/package.json
CHANGED
|
@@ -1,97 +1,143 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
2
|
+
"name": "@samline/notify",
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "A universal toast notification package for React, Vue, Svelte, vanilla JS, and browser/CDN usage.",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": {
|
|
8
|
+
"types": "./dist/index.d.mts",
|
|
9
|
+
"default": "./dist/index.mjs"
|
|
10
|
+
},
|
|
11
|
+
"require": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./react": {
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./dist/react/index.d.mts",
|
|
20
|
+
"default": "./dist/react/index.mjs"
|
|
21
|
+
},
|
|
22
|
+
"require": {
|
|
23
|
+
"types": "./dist/react/index.d.ts",
|
|
24
|
+
"default": "./dist/react/index.js"
|
|
25
|
+
},
|
|
26
|
+
"default": "./dist/react/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./core": {
|
|
29
|
+
"import": {
|
|
30
|
+
"types": "./dist/core/index.d.mts",
|
|
31
|
+
"default": "./dist/core/index.mjs"
|
|
32
|
+
},
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./dist/core/index.d.ts",
|
|
35
|
+
"default": "./dist/core/index.js"
|
|
36
|
+
},
|
|
37
|
+
"default": "./dist/core/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./browser": {
|
|
40
|
+
"import": {
|
|
41
|
+
"types": "./dist/browser/index.d.mts",
|
|
42
|
+
"default": "./dist/browser/index.mjs"
|
|
43
|
+
},
|
|
44
|
+
"require": {
|
|
45
|
+
"types": "./dist/browser/index.d.ts",
|
|
46
|
+
"default": "./dist/browser/index.cjs"
|
|
47
|
+
},
|
|
48
|
+
"default": "./dist/browser/index.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./vue": {
|
|
51
|
+
"import": {
|
|
52
|
+
"types": "./dist/vue/index.d.mts",
|
|
53
|
+
"default": "./dist/vue/index.mjs"
|
|
54
|
+
},
|
|
55
|
+
"require": {
|
|
56
|
+
"types": "./dist/vue/index.d.ts",
|
|
57
|
+
"default": "./dist/vue/index.js"
|
|
58
|
+
},
|
|
59
|
+
"default": "./dist/vue/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./svelte": {
|
|
62
|
+
"import": {
|
|
63
|
+
"types": "./dist/svelte/index.d.mts",
|
|
64
|
+
"default": "./dist/svelte/index.mjs"
|
|
65
|
+
},
|
|
66
|
+
"require": {
|
|
67
|
+
"types": "./dist/svelte/index.d.ts",
|
|
68
|
+
"default": "./dist/svelte/index.js"
|
|
69
|
+
},
|
|
70
|
+
"default": "./dist/svelte/index.js"
|
|
71
|
+
},
|
|
72
|
+
"./styles.css": "./dist/styles.css",
|
|
73
|
+
"./dist/styles.css": "./dist/styles.css"
|
|
74
|
+
},
|
|
75
|
+
"main": "./dist/index.js",
|
|
76
|
+
"types": "./dist/index.d.ts",
|
|
77
|
+
"files": [
|
|
78
|
+
"dist"
|
|
79
|
+
],
|
|
80
|
+
"scripts": {
|
|
81
|
+
"dev": "bun scripts/build.mjs --watch",
|
|
82
|
+
"build": "bun scripts/build.mjs",
|
|
83
|
+
"type-check": "bunx tsc --noEmit",
|
|
84
|
+
"format": "bunx prettier --write .",
|
|
85
|
+
"test": "bunx vitest run tests/runtime.test.ts tests/state.test.ts --environment node --globals",
|
|
86
|
+
"test:watch": "bunx vitest tests/runtime.test.ts tests/state.test.ts --environment node --globals"
|
|
87
|
+
},
|
|
88
|
+
"keywords": [
|
|
89
|
+
"react",
|
|
90
|
+
"vue",
|
|
91
|
+
"svelte",
|
|
92
|
+
"vanilla-js",
|
|
93
|
+
"browser",
|
|
94
|
+
"notifications",
|
|
95
|
+
"toast",
|
|
96
|
+
"snackbar",
|
|
97
|
+
"message"
|
|
98
|
+
],
|
|
99
|
+
"author": "Emil Kowalski <e@emilkowal.ski>",
|
|
100
|
+
"license": "MIT",
|
|
101
|
+
"homepage": "https://github.com/samline/notify",
|
|
102
|
+
"repository": {
|
|
103
|
+
"type": "git",
|
|
104
|
+
"url": "git+https://github.com/samline/notify.git"
|
|
105
|
+
},
|
|
106
|
+
"bugs": {
|
|
107
|
+
"url": "https://github.com/samline/notify/issues"
|
|
108
|
+
},
|
|
109
|
+
"devDependencies": {
|
|
110
|
+
"@types/node": "^18.11.13",
|
|
111
|
+
"@types/react": "^18.0.26",
|
|
112
|
+
"bunchee": "6.3.3",
|
|
113
|
+
"esbuild": "^0.27.4",
|
|
114
|
+
"prettier": "^2.8.4",
|
|
115
|
+
"react": "^18.2.0",
|
|
116
|
+
"react-dom": "^18.2.0",
|
|
117
|
+
"svelte": "^5.0.0",
|
|
118
|
+
"typescript": "^4.8.4",
|
|
119
|
+
"vitest": "^2.1.8",
|
|
120
|
+
"vue": "3.4.0"
|
|
121
|
+
},
|
|
122
|
+
"peerDependencies": {
|
|
123
|
+
"react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
124
|
+
"react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
125
|
+
"vue": "^3.4.0",
|
|
126
|
+
"svelte": "^4.2.0 || ^5.0.0"
|
|
127
|
+
},
|
|
128
|
+
"peerDependenciesMeta": {
|
|
129
|
+
"react": {
|
|
130
|
+
"optional": true
|
|
131
|
+
},
|
|
132
|
+
"react-dom": {
|
|
133
|
+
"optional": true
|
|
134
|
+
},
|
|
135
|
+
"vue": {
|
|
136
|
+
"optional": true
|
|
137
|
+
},
|
|
138
|
+
"svelte": {
|
|
139
|
+
"optional": true
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"packageManager": "bun@1.1.29"
|
|
97
143
|
}
|
package/dist/browser-notify.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
(() => {
|
|
2
|
-
// src/core/notify-core.ts
|
|
3
|
-
class NotifyCore {
|
|
4
|
-
toasts = [];
|
|
5
|
-
listeners = new Set;
|
|
6
|
-
position = "top-right";
|
|
7
|
-
options = undefined;
|
|
8
|
-
idCounter = 0;
|
|
9
|
-
generateId() {
|
|
10
|
-
return `${++this.idCounter}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
11
|
-
}
|
|
12
|
-
subscribe(fn) {
|
|
13
|
-
this.listeners.add(fn);
|
|
14
|
-
fn(this.toasts);
|
|
15
|
-
return () => this.listeners.delete(fn);
|
|
16
|
-
}
|
|
17
|
-
emit() {
|
|
18
|
-
for (const fn of this.listeners)
|
|
19
|
-
fn(this.toasts);
|
|
20
|
-
}
|
|
21
|
-
update(fn) {
|
|
22
|
-
this.toasts = fn(this.toasts);
|
|
23
|
-
this.emit();
|
|
24
|
-
}
|
|
25
|
-
dismiss(id) {
|
|
26
|
-
const item = this.toasts.find((t) => t.id === id);
|
|
27
|
-
if (!item || item.exiting)
|
|
28
|
-
return;
|
|
29
|
-
this.update((prev) => prev.map((t) => t.id === id ? { ...t, exiting: true } : t));
|
|
30
|
-
setTimeout(() => this.update((prev) => prev.filter((t) => t.id !== id)), 600);
|
|
31
|
-
}
|
|
32
|
-
show(opts) {
|
|
33
|
-
const id = opts.title ? `notify-${opts.title}` : "notify-default";
|
|
34
|
-
const prevItem = this.toasts.find((t) => t.id === id);
|
|
35
|
-
const instanceId = prevItem?.instanceId ?? this.generateId();
|
|
36
|
-
const state = opts.type ?? prevItem?.type ?? "success";
|
|
37
|
-
const item = {
|
|
38
|
-
...prevItem,
|
|
39
|
-
...opts,
|
|
40
|
-
id,
|
|
41
|
-
instanceId,
|
|
42
|
-
type: state
|
|
43
|
-
};
|
|
44
|
-
this.update((prev) => {
|
|
45
|
-
const filtered = prev.filter((t) => t.id !== id);
|
|
46
|
-
return [...filtered, item];
|
|
47
|
-
});
|
|
48
|
-
return id;
|
|
49
|
-
}
|
|
50
|
-
getToasts() {
|
|
51
|
-
return this.toasts;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
var notifyCore = new NotifyCore;
|
|
55
|
-
|
|
56
|
-
// src/browser-notify.js
|
|
57
|
-
var notifyApi = {
|
|
58
|
-
show: (options) => notifyCore.show(options),
|
|
59
|
-
dismiss: (id) => notifyCore.dismiss(id),
|
|
60
|
-
clear: () => {
|
|
61
|
-
for (const toast of notifyCore.getToasts()) {
|
|
62
|
-
notifyCore.dismiss(toast.id);
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
subscribe: (listener) => notifyCore.subscribe(listener)
|
|
66
|
-
};
|
|
67
|
-
window.notify = notifyApi;
|
|
68
|
-
})();
|
package/dist/cc-2Yt7NqMX.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function __insertCSS(code) {
|
|
2
|
-
if (!code || typeof document == 'undefined') return
|
|
3
|
-
let head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
-
let style = document.createElement('style')
|
|
5
|
-
style.type = 'text/css'
|
|
6
|
-
head.appendChild(style)
|
|
7
|
-
;style.styleSheet ? (style.styleSheet.cssText = code) : style.appendChild(document.createTextNode(code))
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function _extends() {
|
|
11
|
-
_extends = Object.assign || function assign(target) {
|
|
12
|
-
for(var i = 1; i < arguments.length; i++){
|
|
13
|
-
var source = arguments[i];
|
|
14
|
-
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
15
|
-
}
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
|
-
return _extends.apply(this, arguments);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { _extends as _ };
|
package/dist/cc-B6peeNak.mjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
function __insertCSS(code) {
|
|
2
|
-
if (!code || typeof document == 'undefined') return
|
|
3
|
-
let head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
-
let style = document.createElement('style')
|
|
5
|
-
style.type = 'text/css'
|
|
6
|
-
head.appendChild(style)
|
|
7
|
-
;style.styleSheet ? (style.styleSheet.cssText = code) : style.appendChild(document.createTextNode(code))
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function _extends() {
|
|
11
|
-
_extends = Object.assign || function assign(target) {
|
|
12
|
-
for(var i = 1; i < arguments.length; i++){
|
|
13
|
-
var source = arguments[i];
|
|
14
|
-
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
15
|
-
}
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
|
-
return _extends.apply(this, arguments);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function _object_without_properties_loose(source, excluded) {
|
|
22
|
-
if (source == null) return {};
|
|
23
|
-
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
24
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
25
|
-
key = sourceKeys[i];
|
|
26
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
27
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
28
|
-
target[key] = source[key];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { _extends as _, _object_without_properties_loose as a };
|
package/dist/cc-BWuAzFJ6.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
_extends = Object.assign || function assign(target) {
|
|
3
|
-
for(var i = 1; i < arguments.length; i++){
|
|
4
|
-
var source = arguments[i];
|
|
5
|
-
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
6
|
-
}
|
|
7
|
-
return target;
|
|
8
|
-
};
|
|
9
|
-
return _extends.apply(this, arguments);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
exports._extends = _extends;
|
package/dist/cc-CaBHsjUt.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
function __insertCSS(code) {
|
|
2
|
-
if (!code || typeof document == 'undefined') return
|
|
3
|
-
let head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
-
let style = document.createElement('style')
|
|
5
|
-
style.type = 'text/css'
|
|
6
|
-
head.appendChild(style)
|
|
7
|
-
;style.styleSheet ? (style.styleSheet.cssText = code) : style.appendChild(document.createTextNode(code))
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function _extends() {
|
|
11
|
-
_extends = Object.assign || function assign(target) {
|
|
12
|
-
for(var i = 1; i < arguments.length; i++){
|
|
13
|
-
var source = arguments[i];
|
|
14
|
-
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
15
|
-
}
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
|
-
return _extends.apply(this, arguments);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function _object_without_properties_loose(source, excluded) {
|
|
22
|
-
if (source == null) return {};
|
|
23
|
-
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
24
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
25
|
-
key = sourceKeys[i];
|
|
26
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
27
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
28
|
-
target[key] = source[key];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
exports._extends = _extends;
|
|
34
|
-
exports._object_without_properties_loose = _object_without_properties_loose;
|
package/dist/cc-DGff5sSY.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function __insertCSS(code) {
|
|
2
|
-
if (!code || typeof document == 'undefined') return
|
|
3
|
-
let head = document.head || document.getElementsByTagName('head')[0]
|
|
4
|
-
let style = document.createElement('style')
|
|
5
|
-
style.type = 'text/css'
|
|
6
|
-
head.appendChild(style)
|
|
7
|
-
;style.styleSheet ? (style.styleSheet.cssText = code) : style.appendChild(document.createTextNode(code))
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function _extends() {
|
|
11
|
-
_extends = Object.assign || function assign(target) {
|
|
12
|
-
for(var i = 1; i < arguments.length; i++){
|
|
13
|
-
var source = arguments[i];
|
|
14
|
-
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
15
|
-
}
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
|
-
return _extends.apply(this, arguments);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
exports._extends = _extends;
|
package/dist/cc-he3fHS3P.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
_extends = Object.assign || function assign(target) {
|
|
3
|
-
for(var i = 1; i < arguments.length; i++){
|
|
4
|
-
var source = arguments[i];
|
|
5
|
-
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
6
|
-
}
|
|
7
|
-
return target;
|
|
8
|
-
};
|
|
9
|
-
return _extends.apply(this, arguments);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { _extends as _ };
|
package/dist/notify.d.mts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
type NotifyState = "success" | "loading" | "error" | "warning" | "info" | "action";
|
|
2
|
-
interface NotifyStyles {
|
|
3
|
-
title?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
badge?: string;
|
|
6
|
-
button?: string;
|
|
7
|
-
}
|
|
8
|
-
interface NotifyButton {
|
|
9
|
-
title: string;
|
|
10
|
-
onClick: () => void;
|
|
11
|
-
}
|
|
12
|
-
declare const NOTIFY_POSITIONS: readonly ["top-left", "top-center", "top-right", "bottom-left", "bottom-center", "bottom-right"];
|
|
13
|
-
type NotifyPosition = (typeof NOTIFY_POSITIONS)[number];
|
|
14
|
-
interface NotifyOptions {
|
|
15
|
-
title?: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
type?: NotifyState;
|
|
18
|
-
position?: NotifyPosition;
|
|
19
|
-
duration?: number | null;
|
|
20
|
-
icon?: any;
|
|
21
|
-
styles?: NotifyStyles;
|
|
22
|
-
fill?: string;
|
|
23
|
-
roundness?: number;
|
|
24
|
-
autopilot?: boolean | {
|
|
25
|
-
expand?: number;
|
|
26
|
-
collapse?: number;
|
|
27
|
-
};
|
|
28
|
-
button?: NotifyButton;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface NotifyItem extends NotifyOptions {
|
|
32
|
-
id: string;
|
|
33
|
-
instanceId: string;
|
|
34
|
-
exiting?: boolean;
|
|
35
|
-
autoExpandDelayMs?: number;
|
|
36
|
-
autoCollapseDelayMs?: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare function showNotifyToast(options: NotifyOptions): string;
|
|
40
|
-
declare function onNotifyToastsChange(fn: (toasts: NotifyItem[]) => void): () => void;
|
|
41
|
-
|
|
42
|
-
declare function renderNotifyToasts(options?: {
|
|
43
|
-
position?: NotifyPosition;
|
|
44
|
-
}): () => boolean;
|
|
45
|
-
|
|
46
|
-
export { onNotifyToastsChange, renderNotifyToasts, showNotifyToast };
|
|
47
|
-
export type { NotifyButton, NotifyOptions, NotifyPosition, NotifyState, NotifyStyles };
|
|
48
|
-
//# sourceMappingURL=notify.d.mts.map
|
package/dist/notify.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notify.d.mts","sources":["../src/types.ts","../src/core/notify-core.ts","../src/vanilla-notify.ts","../src/render-notify-toasts.ts"],"mappings":"AAAA,KAAK,WAAW;AAChB,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA,UAAU,YAAY;AACtB;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B,KAAK,cAAc,WAAW,gBAAgB;AAC9C,UAAU,aAAa;AACvB;AACA;AACA,WAAW,WAAW;AACtB,eAAe,cAAc;AAC7B;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;;AC1BA,UAAU,UAAU,SAAS,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;;ACPA,iBAAiB,eAAe,UAAU,aAAa;AACvD,iBAAiB,oBAAoB,cAAc,UAAU;;ACD7D,iBAAiB,kBAAkB;AACnC,eAAe,cAAc;AAC7B;;;;","names":[]}
|
package/dist/notify.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
type NotifyState = "success" | "loading" | "error" | "warning" | "info" | "action";
|
|
2
|
-
interface NotifyStyles {
|
|
3
|
-
title?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
badge?: string;
|
|
6
|
-
button?: string;
|
|
7
|
-
}
|
|
8
|
-
interface NotifyButton {
|
|
9
|
-
title: string;
|
|
10
|
-
onClick: () => void;
|
|
11
|
-
}
|
|
12
|
-
declare const NOTIFY_POSITIONS: readonly ["top-left", "top-center", "top-right", "bottom-left", "bottom-center", "bottom-right"];
|
|
13
|
-
type NotifyPosition = (typeof NOTIFY_POSITIONS)[number];
|
|
14
|
-
interface NotifyOptions {
|
|
15
|
-
title?: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
type?: NotifyState;
|
|
18
|
-
position?: NotifyPosition;
|
|
19
|
-
duration?: number | null;
|
|
20
|
-
icon?: any;
|
|
21
|
-
styles?: NotifyStyles;
|
|
22
|
-
fill?: string;
|
|
23
|
-
roundness?: number;
|
|
24
|
-
autopilot?: boolean | {
|
|
25
|
-
expand?: number;
|
|
26
|
-
collapse?: number;
|
|
27
|
-
};
|
|
28
|
-
button?: NotifyButton;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface NotifyItem extends NotifyOptions {
|
|
32
|
-
id: string;
|
|
33
|
-
instanceId: string;
|
|
34
|
-
exiting?: boolean;
|
|
35
|
-
autoExpandDelayMs?: number;
|
|
36
|
-
autoCollapseDelayMs?: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare function showNotifyToast(options: NotifyOptions): string;
|
|
40
|
-
declare function onNotifyToastsChange(fn: (toasts: NotifyItem[]) => void): () => void;
|
|
41
|
-
|
|
42
|
-
declare function renderNotifyToasts(options?: {
|
|
43
|
-
position?: NotifyPosition;
|
|
44
|
-
}): () => boolean;
|
|
45
|
-
|
|
46
|
-
export { onNotifyToastsChange, renderNotifyToasts, showNotifyToast };
|
|
47
|
-
export type { NotifyButton, NotifyOptions, NotifyPosition, NotifyState, NotifyStyles };
|
|
48
|
-
//# sourceMappingURL=notify.d.ts.map
|
package/dist/notify.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notify.d.ts","sources":["../src/types.ts","../src/core/notify-core.ts","../src/vanilla-notify.ts","../src/render-notify-toasts.ts"],"mappings":"AAAA,KAAK,WAAW;AAChB,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA,UAAU,YAAY;AACtB;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B,KAAK,cAAc,WAAW,gBAAgB;AAC9C,UAAU,aAAa;AACvB;AACA;AACA,WAAW,WAAW;AACtB,eAAe,cAAc;AAC7B;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;;AC1BA,UAAU,UAAU,SAAS,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;;ACPA,iBAAiB,eAAe,UAAU,aAAa;AACvD,iBAAiB,oBAAoB,cAAc,UAAU;;ACD7D,iBAAiB,kBAAkB;AACnC,eAAe,cAAc;AAC7B;;;;","names":[]}
|