@svadmin/core 0.17.0 → 0.17.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/package.json CHANGED
@@ -1,14 +1,20 @@
1
1
  {
2
2
  "name": "@svadmin/core",
3
- "version": "0.17.0",
4
- "description": "Core SDK — hooks, types, context, i18n, permissions, router",
5
- "type": "module",
6
- "sideEffects": false,
7
- "files": [
8
- "src/**/*"
9
- ],
3
+ "version": "0.17.1",
4
+ "author": "zuohuadong",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/zuohuadong/svadmin.git",
8
+ "directory": "packages/core"
9
+ },
10
10
  "main": "src/index.ts",
11
- "types": "src/index.ts",
11
+ "devDependencies": {
12
+ "@types/bun": "^1.3.11"
13
+ },
14
+ "peerDependencies": {
15
+ "svelte": "^5.0.0",
16
+ "@tanstack/svelte-query": "^6.0.0"
17
+ },
12
18
  "exports": {
13
19
  ".": {
14
20
  "types": "./src/index.ts",
@@ -43,25 +49,19 @@
43
49
  "default": "./src/theme.svelte.ts"
44
50
  }
45
51
  },
46
- "peerDependencies": {
47
- "svelte": "^5.0.0",
48
- "@tanstack/svelte-query": "^6.0.0"
49
- },
50
- "license": "MIT",
51
- "author": "zuohuadong",
52
- "repository": {
53
- "type": "git",
54
- "url": "https://github.com/zuohuadong/svadmin.git",
55
- "directory": "packages/core"
56
- },
57
- "homepage": "https://github.com/zuohuadong/svadmin#readme",
58
52
  "bugs": {
59
53
  "url": "https://github.com/zuohuadong/svadmin/issues"
60
54
  },
61
- "devDependencies": {
62
- "@types/bun": "^1.3.11"
63
- },
55
+ "description": "Core SDK — hooks, types, context, i18n, permissions, router",
56
+ "files": [
57
+ "src/**/*"
58
+ ],
59
+ "homepage": "https://github.com/zuohuadong/svadmin#readme",
60
+ "license": "MIT",
61
+ "sideEffects": false,
62
+ "type": "module",
63
+ "types": "src/index.ts",
64
64
  "dependencies": {
65
- "svelte-sonner": "^1.1.0"
65
+ "sonner-svelte": "^0.3.3"
66
66
  }
67
67
  }
package/src/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # Name
2
+ ### {{module_name}}
3
+
4
+ # Synopsis
5
+ {{synopsis}}
6
+
7
+ # Description
8
+
9
+ # Example
10
+
11
+ # Install:
12
+ `npm install {{module_name}}`
13
+
14
+ # Test:
15
+ `npm test`
16
+
17
+ #License:
18
+ {{license}}
@@ -1,7 +1,7 @@
1
- // Toast notification system — wraps svelte-sonner for consistent API
1
+ // Toast notification system — wraps sonner-svelte for consistent API
2
2
  // Maintains backward-compatible `toast.success()` / `toast.error()` etc.
3
3
 
4
- import { toast as sonner } from 'svelte-sonner';
4
+ import { toast as sonner } from 'sonner-svelte';
5
5
 
6
6
  export type ToastType = 'success' | 'error' | 'info' | 'warning' | 'undoable';
7
7
 
@@ -23,7 +23,7 @@ export function getToasts(): Toast[] {
23
23
  }
24
24
 
25
25
  export function addToast(type: ToastType, message: string, duration = 3000, options?: { onUndo?: () => void, onTimeout?: () => void }): void {
26
- // Use svelte-sonner for regular toasts
26
+ // Use sonner-svelte for regular toasts
27
27
  if (type !== 'undoable') {
28
28
  switch (type) {
29
29
  case 'success': sonner.success(message, { duration }); break;