dynaura 0.0.0-stage → 0.1.0
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 +21 -0
- package/README.md +422 -2
- package/dist/chunk-FNLIY6GQ.js +558 -0
- package/dist/index.cjs +614 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +39 -0
- package/dist/styles.css +161 -0
- package/dist/svelte.cjs +590 -0
- package/dist/svelte.d.cts +10 -0
- package/dist/svelte.d.ts +10 -0
- package/dist/svelte.js +15 -0
- package/dist/vanilla.cjs +584 -0
- package/dist/vanilla.d.cts +86 -0
- package/dist/vanilla.d.ts +86 -0
- package/dist/vanilla.js +9 -0
- package/dist/vue.cjs +608 -0
- package/dist/vue.d.cts +43 -0
- package/dist/vue.d.ts +43 -0
- package/dist/vue.js +33 -0
- package/package.json +131 -4
package/dist/vue.d.cts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
export { CustomTheme, Position, ToasterOptions, dynaura } from './vanilla.cjs';
|
|
3
|
+
|
|
4
|
+
/** <Toaster position="top" theme="system" /> — mount once. Content is string or DOM Node. */
|
|
5
|
+
declare const Toaster: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
6
|
+
position: StringConstructor;
|
|
7
|
+
offset: NumberConstructor;
|
|
8
|
+
theme: (StringConstructor | ObjectConstructor)[];
|
|
9
|
+
timer: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
haptics: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
queue: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: undefined;
|
|
20
|
+
};
|
|
21
|
+
}>, () => null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
22
|
+
position: StringConstructor;
|
|
23
|
+
offset: NumberConstructor;
|
|
24
|
+
theme: (StringConstructor | ObjectConstructor)[];
|
|
25
|
+
timer: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
haptics: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: undefined;
|
|
32
|
+
};
|
|
33
|
+
queue: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
37
|
+
}>> & Readonly<{}>, {
|
|
38
|
+
timer: boolean;
|
|
39
|
+
queue: boolean;
|
|
40
|
+
haptics: boolean;
|
|
41
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
42
|
+
|
|
43
|
+
export { Toaster };
|
package/dist/vue.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
export { CustomTheme, Position, ToasterOptions, dynaura } from './vanilla.js';
|
|
3
|
+
|
|
4
|
+
/** <Toaster position="top" theme="system" /> — mount once. Content is string or DOM Node. */
|
|
5
|
+
declare const Toaster: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
6
|
+
position: StringConstructor;
|
|
7
|
+
offset: NumberConstructor;
|
|
8
|
+
theme: (StringConstructor | ObjectConstructor)[];
|
|
9
|
+
timer: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
haptics: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
queue: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: undefined;
|
|
20
|
+
};
|
|
21
|
+
}>, () => null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
22
|
+
position: StringConstructor;
|
|
23
|
+
offset: NumberConstructor;
|
|
24
|
+
theme: (StringConstructor | ObjectConstructor)[];
|
|
25
|
+
timer: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
haptics: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: undefined;
|
|
32
|
+
};
|
|
33
|
+
queue: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
37
|
+
}>> & Readonly<{}>, {
|
|
38
|
+
timer: boolean;
|
|
39
|
+
queue: boolean;
|
|
40
|
+
haptics: boolean;
|
|
41
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
42
|
+
|
|
43
|
+
export { Toaster };
|
package/dist/vue.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
createToaster,
|
|
4
|
+
dynaura
|
|
5
|
+
} from "./chunk-FNLIY6GQ.js";
|
|
6
|
+
|
|
7
|
+
// src/vue.ts
|
|
8
|
+
import { defineComponent, onBeforeUnmount, onMounted, watch } from "vue";
|
|
9
|
+
var clean = (p) => Object.fromEntries(Object.entries(p).filter(([, v]) => v !== void 0));
|
|
10
|
+
var Toaster = defineComponent({
|
|
11
|
+
name: "DynauraToaster",
|
|
12
|
+
props: {
|
|
13
|
+
position: String,
|
|
14
|
+
offset: Number,
|
|
15
|
+
theme: [String, Object],
|
|
16
|
+
timer: { type: Boolean, default: void 0 },
|
|
17
|
+
haptics: { type: Boolean, default: void 0 },
|
|
18
|
+
queue: { type: Boolean, default: void 0 }
|
|
19
|
+
},
|
|
20
|
+
setup(props) {
|
|
21
|
+
let c;
|
|
22
|
+
onMounted(() => {
|
|
23
|
+
c = createToaster(clean({ ...props }));
|
|
24
|
+
});
|
|
25
|
+
watch(() => ({ ...props }), (p) => c == null ? void 0 : c.set(clean(p)), { deep: true });
|
|
26
|
+
onBeforeUnmount(() => c == null ? void 0 : c.destroy());
|
|
27
|
+
return () => null;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
Toaster,
|
|
32
|
+
dynaura
|
|
33
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,133 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dynaura",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Dynamic Island style toasts. Spring-morphing, swipeable, themeable, zero dependencies. React, Vue, Svelte, vanilla.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"**/*.css"
|
|
9
|
+
],
|
|
10
|
+
"main": "./dist/index.cjs",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"require": {
|
|
20
|
+
"types": "./dist/index.d.cts",
|
|
21
|
+
"default": "./dist/index.cjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"./styles.css": "./dist/styles.css",
|
|
25
|
+
"./vanilla": {
|
|
26
|
+
"import": {
|
|
27
|
+
"types": "./dist/vanilla.d.ts",
|
|
28
|
+
"default": "./dist/vanilla.js"
|
|
29
|
+
},
|
|
30
|
+
"require": {
|
|
31
|
+
"types": "./dist/vanilla.d.cts",
|
|
32
|
+
"default": "./dist/vanilla.cjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"./vue": {
|
|
36
|
+
"import": {
|
|
37
|
+
"types": "./dist/vue.d.ts",
|
|
38
|
+
"default": "./dist/vue.js"
|
|
39
|
+
},
|
|
40
|
+
"require": {
|
|
41
|
+
"types": "./dist/vue.d.cts",
|
|
42
|
+
"default": "./dist/vue.cjs"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"./svelte": {
|
|
46
|
+
"import": {
|
|
47
|
+
"types": "./dist/svelte.d.ts",
|
|
48
|
+
"default": "./dist/svelte.js"
|
|
49
|
+
},
|
|
50
|
+
"require": {
|
|
51
|
+
"types": "./dist/svelte.d.cts",
|
|
52
|
+
"default": "./dist/svelte.cjs"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"./package.json": "./package.json"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"dist",
|
|
59
|
+
"README.md",
|
|
60
|
+
"LICENSE"
|
|
61
|
+
],
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsup",
|
|
64
|
+
"dev": "vite",
|
|
65
|
+
"typecheck": "tsc -p .",
|
|
66
|
+
"test": "vitest run",
|
|
67
|
+
"prepublishOnly": "npm run typecheck && npm run build && npm test"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"react": ">=18",
|
|
71
|
+
"react-dom": ">=18",
|
|
72
|
+
"vue": ">=3"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@heroicons/react": "^2.2.0",
|
|
76
|
+
"@types/react": "^18.3.0",
|
|
77
|
+
"@types/react-dom": "^18.3.0",
|
|
78
|
+
"jsdom": "^25.0.0",
|
|
79
|
+
"react": "^18.3.1",
|
|
80
|
+
"react-dom": "^18.3.1",
|
|
81
|
+
"tsup": "^8.3.0",
|
|
82
|
+
"typescript": "^5.6.0",
|
|
83
|
+
"vite": "^5.4.0",
|
|
84
|
+
"vitest": "^2.1.0",
|
|
85
|
+
"vue": "^3.5.0"
|
|
86
|
+
},
|
|
87
|
+
"peerDependenciesMeta": {
|
|
88
|
+
"react": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
91
|
+
"react-dom": {
|
|
92
|
+
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"vue": {
|
|
95
|
+
"optional": true
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"keywords": [
|
|
99
|
+
"toast",
|
|
100
|
+
"notification",
|
|
101
|
+
"dynamic-island",
|
|
102
|
+
"react",
|
|
103
|
+
"vue",
|
|
104
|
+
"svelte",
|
|
105
|
+
"animation",
|
|
106
|
+
"spring"
|
|
107
|
+
],
|
|
108
|
+
"author": {
|
|
109
|
+
"name": "Ashutosh Swamy",
|
|
110
|
+
"url": "https://ashutoshswamy.in"
|
|
111
|
+
},
|
|
112
|
+
"repository": {
|
|
113
|
+
"type": "git",
|
|
114
|
+
"url": "git+https://github.com/ashutoshswamy/dynaura.git"
|
|
115
|
+
},
|
|
116
|
+
"homepage": "https://dynaura.ashutoshswamy.in",
|
|
117
|
+
"bugs": {
|
|
118
|
+
"url": "https://github.com/ashutoshswamy/dynaura/issues"
|
|
119
|
+
},
|
|
120
|
+
"typesVersions": {
|
|
121
|
+
"*": {
|
|
122
|
+
"vanilla": [
|
|
123
|
+
"./dist/vanilla.d.ts"
|
|
124
|
+
],
|
|
125
|
+
"vue": [
|
|
126
|
+
"./dist/vue.d.ts"
|
|
127
|
+
],
|
|
128
|
+
"svelte": [
|
|
129
|
+
"./dist/svelte.d.ts"
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|