mui-notifications 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.
@@ -0,0 +1,2 @@
1
+ export declare function useNonNullableContext<T>(context: React.Context<T>, name?: string): NonNullable<T>;
2
+ export default useNonNullableContext;
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ export interface ShowNotificationOptions {
3
+ key?: string;
4
+ severity?: "info" | "warning" | "error" | "success";
5
+ autoHideDuration?: number;
6
+ actionText?: React.ReactNode;
7
+ onAction?: () => void;
8
+ }
9
+ export interface ShowNotification {
10
+ (message: React.ReactNode, options?: ShowNotificationOptions): string;
11
+ }
12
+ export interface CloseNotification {
13
+ (key: string): void;
14
+ }
15
+ interface UseNotifications {
16
+ show: ShowNotification;
17
+ close: CloseNotification;
18
+ }
19
+ export declare function useNotifications(): UseNotifications;
20
+ export {};
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "mui-notifications",
3
+ "version": "0.1.0",
4
+ "description": "Application notifications component using Material UI.",
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "main": "./dist/mui-notifications.cjs.js",
10
+ "module": "./dist/mui-notifications.es.js",
11
+ "types": "./dist/main.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/mui-notifications.es.js",
15
+ "require": "./dist/mui-notifications.cjs.js",
16
+ "types": "./dist/main.d.ts"
17
+ }
18
+ },
19
+ "scripts": {
20
+ "dev": "vite",
21
+ "build": "tsc --p ./tsconfig-build.json && vite build",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "dependencies": {
25
+ "react": "^19.2.6",
26
+ "react-dom": "^19.2.6"
27
+ },
28
+ "peerDependencies": {
29
+ "@mui/icons-material": "^9.0.1",
30
+ "@mui/material": "^9.0.1",
31
+ "@mui/utils": "^9.0.1",
32
+ "@emotion/react": "^11.0.0",
33
+ "@emotion/styled": "^11.0.0"
34
+ },
35
+ "devDependencies": {
36
+ "@mui/icons-material": "^9.0.1",
37
+ "@mui/material": "^9.0.1",
38
+ "@mui/utils": "^9.0.1",
39
+ "@emotion/react": "^11.0.0",
40
+ "@emotion/styled": "^11.0.0",
41
+ "@eslint/js": "^10.0.1",
42
+ "@types/node": "^24.12.3",
43
+ "@types/react": "^19.2.14",
44
+ "@types/react-dom": "^19.2.3",
45
+ "@vitejs/plugin-react": "^6.0.1",
46
+ "eslint": "^10.3.0",
47
+ "eslint-plugin-react-hooks": "^7.1.1",
48
+ "eslint-plugin-react-refresh": "^0.5.2",
49
+ "globals": "^17.6.0",
50
+ "typescript": "~6.0.2",
51
+ "typescript-eslint": "^8.59.2",
52
+ "vite": "^8.0.12",
53
+ "vite-plugin-dts": "^5.0.1",
54
+ "vitest": "^4.1.7"
55
+ }
56
+ }