@ahoo-wang/fetcher-react 3.11.1 → 3.11.2
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/notification/channel/browserNotification.d.ts +12 -0
- package/dist/notification/channel/browserNotification.d.ts.map +1 -0
- package/dist/notification/channel/index.d.ts +4 -0
- package/dist/notification/channel/index.d.ts.map +1 -0
- package/dist/notification/channel/notificationChannel.d.ts +5 -0
- package/dist/notification/channel/notificationChannel.d.ts.map +1 -0
- package/dist/notification/channel/notificationChannelRegistry.d.ts +17 -0
- package/dist/notification/channel/notificationChannelRegistry.d.ts.map +1 -0
- package/dist/notification/index.d.ts +5 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/notificationCenter.d.ts +16 -0
- package/dist/notification/notificationCenter.d.ts.map +1 -0
- package/dist/notification/types.d.ts +10 -0
- package/dist/notification/types.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NotificationChannel } from './';
|
|
2
|
+
import { Message, ChannelType } from '../';
|
|
3
|
+
export declare const BROWSER_NOTIFICATION_TYPE: ChannelType;
|
|
4
|
+
export type BrowserNotificationPayload = NotificationOptions;
|
|
5
|
+
declare class BrowserNotificationChannel implements NotificationChannel<BrowserNotificationPayload> {
|
|
6
|
+
send(message: Message<BrowserNotificationPayload>): Promise<void>;
|
|
7
|
+
private requestPermission;
|
|
8
|
+
private isSupported;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: BrowserNotificationChannel;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=browserNotification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browserNotification.d.ts","sourceRoot":"","sources":["../../../src/notification/channel/browserNotification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,IAAI,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAE3C,eAAO,MAAM,yBAAyB,EAAE,WAAuB,CAAC;AAEhE,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;AAE7D,cAAM,0BAA2B,YAAW,mBAAmB,CAAC,0BAA0B,CAAC;IACnF,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BvE,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,WAAW;CAGpB;;AAED,wBAAgD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/notification/channel/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationChannel.d.ts","sourceRoot":"","sources":["../../../src/notification/channel/notificationChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAE9B,MAAM,WAAW,mBAAmB,CAAC,OAAO,GAAG,GAAG;IAChD,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACvD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NotificationChannel } from './';
|
|
2
|
+
import { ChannelType } from '../';
|
|
3
|
+
declare class NotificationChannelRegistry {
|
|
4
|
+
private readonly registry;
|
|
5
|
+
get types(): ChannelType[];
|
|
6
|
+
get entries(): [ChannelType, NotificationChannel][];
|
|
7
|
+
get size(): number;
|
|
8
|
+
has(type: ChannelType): boolean;
|
|
9
|
+
clear(): void;
|
|
10
|
+
register(type: ChannelType, channel: NotificationChannel): void;
|
|
11
|
+
unregister(type: ChannelType): void;
|
|
12
|
+
get(type: ChannelType): NotificationChannel | undefined;
|
|
13
|
+
static create(channels?: [ChannelType, NotificationChannel][]): NotificationChannelRegistry;
|
|
14
|
+
}
|
|
15
|
+
export declare const channelRegistry: NotificationChannelRegistry;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=notificationChannelRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationChannelRegistry.d.ts","sourceRoot":"","sources":["../../../src/notification/channel/notificationChannelRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAA6B,MAAM,IAAI,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAElC,cAAM,2BAA2B;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoD;IAE7E,IAAI,KAAK,IAAI,WAAW,EAAE,CAEzB;IAED,IAAI,OAAO,IAAI,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAAE,CAElD;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,GAAG,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO;IAI/B,KAAK,IAAI,IAAI;IAIb,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAO/D,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAInC,GAAG,CAAC,IAAI,EAAE,WAAW,GAAG,mBAAmB,GAAG,SAAS;IAIvD,MAAM,CAAC,MAAM,CACX,QAAQ,GAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAAO,GAClD,2BAA2B;CAK/B;AAED,eAAO,MAAM,eAAe,EAAE,2BAG1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notification/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChannelType, Message } from './';
|
|
2
|
+
import { BroadcastTypedEventBus } from '@ahoo-wang/fetcher-eventbus';
|
|
3
|
+
export interface NotificationCenterEvent {
|
|
4
|
+
type: ChannelType;
|
|
5
|
+
message: Message;
|
|
6
|
+
}
|
|
7
|
+
export declare class NotificationCenter {
|
|
8
|
+
readonly eventBus: BroadcastTypedEventBus<NotificationCenterEvent>;
|
|
9
|
+
constructor();
|
|
10
|
+
private sendNotification;
|
|
11
|
+
publish(type: ChannelType, message: Message): Promise<void>;
|
|
12
|
+
off(): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const notificationCenter: NotificationCenter;
|
|
16
|
+
//# sourceMappingURL=notificationCenter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationCenter.d.ts","sourceRoot":"","sources":["../../src/notification/notificationCenter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC1C,OAAO,EACL,sBAAsB,EAEvB,MAAM,6BAA6B,CAAC;AAKrC,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,kBAAkB;IAC7B,SAAgB,QAAQ,EAAE,sBAAsB,CAAC,uBAAuB,CAAC,CAAC;;YAmB5D,gBAAgB;IAW9B,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D,GAAG;IAIH,OAAO;CAIR;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/notification/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,OAAO,CAAC,OAAO,GAAG,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ahoo-wang/fetcher-react",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.2",
|
|
4
4
|
"description": "React integration for Fetcher HTTP client. Provides React Hooks and components for seamless data fetching with automatic re-rendering and loading states.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fetch",
|