dynaura 0.0.0-stage → 0.1.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/dist/vue.js ADDED
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import {
3
+ createToaster,
4
+ dynaura
5
+ } from "./chunk-VCDDW4W7.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.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
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
+ }