@open-pioneer/notifier 4.0.0-dev.20250512105016 → 4.0.0-dev.20250527091545
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/CHANGELOG.md +5 -4
- package/README.md +23 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @open-pioneer/notifier
|
|
2
2
|
|
|
3
|
-
## 4.0.0-dev.
|
|
3
|
+
## 4.0.0-dev.20250527091545
|
|
4
4
|
|
|
5
5
|
### Major Changes
|
|
6
6
|
|
|
@@ -35,10 +35,11 @@
|
|
|
35
35
|
### Patch Changes
|
|
36
36
|
|
|
37
37
|
- Updated dependencies [9f074d8]
|
|
38
|
+
- Updated dependencies [53c92ba]
|
|
38
39
|
- Updated dependencies [9f074d8]
|
|
39
|
-
- @open-pioneer/react-utils@4.0.0-dev.
|
|
40
|
-
- @open-pioneer/runtime@4.0.0-dev.
|
|
41
|
-
- @open-pioneer/core@4.0.0-dev.
|
|
40
|
+
- @open-pioneer/react-utils@4.0.0-dev.20250527091545
|
|
41
|
+
- @open-pioneer/runtime@4.0.0-dev.20250527091545
|
|
42
|
+
- @open-pioneer/core@4.0.0-dev.20250527091545
|
|
42
43
|
|
|
43
44
|
## 3.1.0
|
|
44
45
|
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ import { Notifier } from "@open-pioneer/notifier";
|
|
|
14
14
|
export function AppUI() {
|
|
15
15
|
return (
|
|
16
16
|
<>
|
|
17
|
-
<Notifier
|
|
17
|
+
<Notifier />
|
|
18
18
|
{/* The rest of your application */}
|
|
19
19
|
</>
|
|
20
20
|
);
|
|
@@ -23,10 +23,14 @@ export function AppUI() {
|
|
|
23
23
|
|
|
24
24
|
> Note: In most cases the notifier should be located at or near the root of your app's UI.
|
|
25
25
|
|
|
26
|
-
The
|
|
26
|
+
The implementation of `<Notifier />` is based on [Chakra's Toast](https://chakra-ui.com/docs/components/toast).
|
|
27
|
+
|
|
28
|
+
### Configuring the notifier
|
|
29
|
+
|
|
30
|
+
The notifier can be configured by specifying the following _package properties_:
|
|
27
31
|
|
|
28
32
|
```ts
|
|
29
|
-
export interface
|
|
33
|
+
export interface NotifierProperties {
|
|
30
34
|
/**
|
|
31
35
|
* The position for new notifications.
|
|
32
36
|
*
|
|
@@ -36,7 +40,22 @@ export interface NotifierProps {
|
|
|
36
40
|
}
|
|
37
41
|
```
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
For example, to show notifications in the top-left corner of your application:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
// app.ts
|
|
47
|
+
const Element = createCustomElement({
|
|
48
|
+
// ...
|
|
49
|
+
config: {
|
|
50
|
+
properties: {
|
|
51
|
+
"@open-pioneer/notifier": {
|
|
52
|
+
position: "top-left"
|
|
53
|
+
} satisfies NotifierProperties
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// or use resolveConfig()
|
|
57
|
+
});
|
|
58
|
+
```
|
|
40
59
|
|
|
41
60
|
### Emitting notifications
|
|
42
61
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/notifier",
|
|
4
|
-
"version": "4.0.0-dev.
|
|
4
|
+
"version": "4.0.0-dev.20250527091545",
|
|
5
5
|
"description": "Provides support for application-wide notifications.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"directory": "src/packages/notifier"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@chakra-ui/react": "^3.
|
|
17
|
+
"@chakra-ui/react": "^3.19.1",
|
|
18
18
|
"react-icons": "^5.5.0",
|
|
19
19
|
"react": "^19.1.0",
|
|
20
|
-
"@open-pioneer/core": "4.0.0-dev.
|
|
21
|
-
"@open-pioneer/runtime": "4.0.0-dev.
|
|
22
|
-
"@open-pioneer/react-utils": "4.0.0-dev.
|
|
20
|
+
"@open-pioneer/core": "4.0.0-dev.20250527091545",
|
|
21
|
+
"@open-pioneer/runtime": "4.0.0-dev.20250527091545",
|
|
22
|
+
"@open-pioneer/react-utils": "4.0.0-dev.20250527091545"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
"./package.json": "./package.json",
|