@celljs/ta-notify 4.13.1 → 4.14.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/README.en.md CHANGED
@@ -24,6 +24,7 @@ The data of the package (`@celljs/ta-notify`): `notices` (the latest 30, the new
24
24
  What its host (`pi.host`) answers, for web extensions through `callPackageHost('@celljs/ta-notify', …)`:
25
25
 
26
26
  - `mute(target, muted, title?)`: mutes a conversation or not; the list after.
27
+ - `notices()`: the notices kept, the newest last. Another package (the brief of ta-recall) reads them so, not by the data of this package.
27
28
  - `notify({ from, id, level, title, text, view? })`: another package tells the user of what is no conversation's (a double in a room asks for a permission), as the setting Tell me allows; a notice of the system while the page is not in front, a tap opening `view`.
28
29
 
29
30
  Another extension that tells the user news of its own uses the page's `ui.notifySession` (see @celljs/ta-web), not the data of this package.
package/README.md CHANGED
@@ -24,6 +24,7 @@ Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展
24
24
  包宿主(`pi.host`)的方法,Web 扩展经 `callPackageHost('@celljs/ta-notify', …)` 调用:
25
25
 
26
26
  - `mute(target, muted, title?)`:设成或取消免打扰,返回新的列表。
27
+ - `notices()`:保留的提醒,最新的在后。别的包(ta-recall 的简报)这样读,不读本包的数据。
27
28
  - `notify({ from, id, level, title, text, view? })`:别的包告诉用户不属于某个对话的事(如房间里分身请你授权),按"提醒我"的设置过滤;页面不在前台时发系统通知,点开打开 `view`。
28
29
 
29
30
  别的扩展要告诉用户自己的消息,用页面的 `ui.notifySession`(见 @celljs/ta-web),不要写这个包的数据。
package/host/index.mjs CHANGED
@@ -162,6 +162,9 @@ class NotifyHost {
162
162
  return next;
163
163
  });
164
164
  }
165
+ async notices() {
166
+ return NotifyUtil.notices(await this.read(Keys.NOTICES));
167
+ }
165
168
  dispose() {}
166
169
  read(key) {
167
170
  return this.host.getExtensionData(NAME, key).catch(() => {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@celljs/ta-notify",
3
- "version": "4.13.1",
3
+ "version": "4.14.0",
4
4
  "description": "A pi package for Ta: tells the user when a conversation needs them, failed or answered, while they look elsewhere, and lets Ta ask them to decide with answers to pick",
5
5
  "keywords": [
6
6
  "pi-package"
7
7
  ],
8
- "homepage": "https://github.com/cellbang/cell",
8
+ "homepage": "https://github.com/cellbang/ta",
9
9
  "bugs": {
10
- "url": "https://github.com/cellbang/cell/issues"
10
+ "url": "https://github.com/cellbang/ta/issues"
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
@@ -27,8 +27,8 @@
27
27
  "watch": "tsc -b -w --preserveWatchOutput"
28
28
  },
29
29
  "devDependencies": {
30
- "@celljs/ta-protocol": "4.13.1",
31
- "@celljs/ta-web": "4.13.1",
30
+ "@celljs/ta-protocol": "4.14.0",
31
+ "@celljs/ta-web": "4.14.0",
32
32
  "@types/react": "^19.3.0"
33
33
  },
34
34
  "publishConfig": {