@buoy-gg/notifications 7.0.41

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.
Files changed (88) hide show
  1. package/LICENSE +58 -0
  2. package/README.md +28 -0
  3. package/lib/commonjs/components/LocalNotificationTest.js +185 -0
  4. package/lib/commonjs/components/LocalNotificationTest.js.map +1 -0
  5. package/lib/commonjs/components/NotificationTestView.js +329 -0
  6. package/lib/commonjs/components/NotificationTestView.js.map +1 -0
  7. package/lib/commonjs/components/NotificationToolView.js +673 -0
  8. package/lib/commonjs/components/NotificationToolView.js.map +1 -0
  9. package/lib/commonjs/components/notificationStyles.js +292 -0
  10. package/lib/commonjs/components/notificationStyles.js.map +1 -0
  11. package/lib/commonjs/expo.js +247 -0
  12. package/lib/commonjs/expo.js.map +1 -0
  13. package/lib/commonjs/index.js +148 -0
  14. package/lib/commonjs/index.js.map +1 -0
  15. package/lib/commonjs/json.js +58 -0
  16. package/lib/commonjs/json.js.map +1 -0
  17. package/lib/commonjs/package.json +1 -0
  18. package/lib/commonjs/payload.js +68 -0
  19. package/lib/commonjs/payload.js.map +1 -0
  20. package/lib/commonjs/preset.js +56 -0
  21. package/lib/commonjs/preset.js.map +1 -0
  22. package/lib/commonjs/preview.js +18 -0
  23. package/lib/commonjs/preview.js.map +1 -0
  24. package/lib/commonjs/recorder.js +339 -0
  25. package/lib/commonjs/recorder.js.map +1 -0
  26. package/lib/commonjs/runtime.js +110 -0
  27. package/lib/commonjs/runtime.js.map +1 -0
  28. package/lib/commonjs/storage.js +61 -0
  29. package/lib/commonjs/storage.js.map +1 -0
  30. package/lib/commonjs/types.js +2 -0
  31. package/lib/commonjs/types.js.map +1 -0
  32. package/lib/module/components/LocalNotificationTest.js +180 -0
  33. package/lib/module/components/LocalNotificationTest.js.map +1 -0
  34. package/lib/module/components/NotificationTestView.js +324 -0
  35. package/lib/module/components/NotificationTestView.js.map +1 -0
  36. package/lib/module/components/NotificationToolView.js +668 -0
  37. package/lib/module/components/NotificationToolView.js.map +1 -0
  38. package/lib/module/components/notificationStyles.js +288 -0
  39. package/lib/module/components/notificationStyles.js.map +1 -0
  40. package/lib/module/expo.js +241 -0
  41. package/lib/module/expo.js.map +1 -0
  42. package/lib/module/index.js +13 -0
  43. package/lib/module/index.js.map +1 -0
  44. package/lib/module/json.js +51 -0
  45. package/lib/module/json.js.map +1 -0
  46. package/lib/module/payload.js +63 -0
  47. package/lib/module/payload.js.map +1 -0
  48. package/lib/module/preset.js +50 -0
  49. package/lib/module/preset.js.map +1 -0
  50. package/lib/module/preview.js +14 -0
  51. package/lib/module/preview.js.map +1 -0
  52. package/lib/module/recorder.js +332 -0
  53. package/lib/module/recorder.js.map +1 -0
  54. package/lib/module/runtime.js +103 -0
  55. package/lib/module/runtime.js.map +1 -0
  56. package/lib/module/storage.js +56 -0
  57. package/lib/module/storage.js.map +1 -0
  58. package/lib/module/types.js +2 -0
  59. package/lib/module/types.js.map +1 -0
  60. package/lib/typescript/components/LocalNotificationTest.d.ts +8 -0
  61. package/lib/typescript/components/LocalNotificationTest.d.ts.map +1 -0
  62. package/lib/typescript/components/NotificationTestView.d.ts +27 -0
  63. package/lib/typescript/components/NotificationTestView.d.ts.map +1 -0
  64. package/lib/typescript/components/NotificationToolView.d.ts +16 -0
  65. package/lib/typescript/components/NotificationToolView.d.ts.map +1 -0
  66. package/lib/typescript/components/notificationStyles.d.ts +284 -0
  67. package/lib/typescript/components/notificationStyles.d.ts.map +1 -0
  68. package/lib/typescript/expo.d.ts +66 -0
  69. package/lib/typescript/expo.d.ts.map +1 -0
  70. package/lib/typescript/index.d.ts +15 -0
  71. package/lib/typescript/index.d.ts.map +1 -0
  72. package/lib/typescript/json.d.ts +7 -0
  73. package/lib/typescript/json.d.ts.map +1 -0
  74. package/lib/typescript/payload.d.ts +18 -0
  75. package/lib/typescript/payload.d.ts.map +1 -0
  76. package/lib/typescript/preset.d.ts +31 -0
  77. package/lib/typescript/preset.d.ts.map +1 -0
  78. package/lib/typescript/preview.d.ts +4 -0
  79. package/lib/typescript/preview.d.ts.map +1 -0
  80. package/lib/typescript/recorder.d.ts +52 -0
  81. package/lib/typescript/recorder.d.ts.map +1 -0
  82. package/lib/typescript/runtime.d.ts +50 -0
  83. package/lib/typescript/runtime.d.ts.map +1 -0
  84. package/lib/typescript/storage.d.ts +23 -0
  85. package/lib/typescript/storage.d.ts.map +1 -0
  86. package/lib/typescript/types.d.ts +64 -0
  87. package/lib/typescript/types.d.ts.map +1 -0
  88. package/package.json +66 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/payload.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE;AACjK,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAIxE;AACD,MAAM,WAAW,iBAAiB;IAAG,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;AACjI,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB,CAoB3E"}
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import type { ModalState } from "@buoy-gg/shared-ui";
3
+ export declare function NotificationsModal(props: {
4
+ visible: boolean;
5
+ onClose: () => void;
6
+ onMinimize?: (state: ModalState) => void;
7
+ persistenceKey?: string;
8
+ }): React.JSX.Element;
9
+ export declare const notificationToolPreset: {
10
+ id: string;
11
+ name: string;
12
+ description: string;
13
+ slot: "both";
14
+ icon: ({ size, color }: {
15
+ size: number;
16
+ color?: string;
17
+ }) => React.JSX.Element;
18
+ component: typeof NotificationsModal;
19
+ };
20
+ export declare const createNotificationTool: (options?: (Record<never, never> & import("@buoy-gg/shared-ui").ToolPresetOverrides) | undefined) => {
21
+ id: string;
22
+ name: string;
23
+ description: string;
24
+ slot: "both";
25
+ icon: ({ size, color }: {
26
+ size: number;
27
+ color?: string;
28
+ }) => React.JSX.Element;
29
+ component: typeof NotificationsModal;
30
+ };
31
+ //# sourceMappingURL=preset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,qBAiCA;AACD,eAAO,MAAM,sBAAsB;;;;;4BAKT;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;CAIxD,CAAC;AACH,eAAO,MAAM,sBAAsB;;;;;4BALT;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;CAKqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { NotificationPreviewAppearance } from "./types";
2
+ /** Keep preview artwork self-contained and small enough for device snapshots. */
3
+ export declare function normalizePreviewAppearance(value?: NotificationPreviewAppearance): NotificationPreviewAppearance | undefined;
4
+ //# sourceMappingURL=preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D,iFAAiF;AACjF,wBAAgB,0BAA0B,CACxC,KAAK,CAAC,EAAE,6BAA6B,GACpC,6BAA6B,GAAG,SAAS,CAkB3C"}
@@ -0,0 +1,52 @@
1
+ import type { CaptureSession, NotificationEventKind, NotificationRecord, NotificationSnapshot, NotificationStorage, NotificationToken } from "./types";
2
+ export interface RecorderOptions {
3
+ storage?: NotificationStorage;
4
+ durable?: boolean;
5
+ durability?: Promise<boolean>;
6
+ enabled?: () => boolean;
7
+ now?: () => number;
8
+ processId?: string;
9
+ appState?: () => string;
10
+ autoStart?: boolean;
11
+ }
12
+ /** Recording runs independently of the desktop's snapshot subscriptions. */
13
+ export declare class NotificationRecorder {
14
+ private options;
15
+ private state;
16
+ private listeners;
17
+ private sequence;
18
+ private queue;
19
+ private now;
20
+ readonly processId: string;
21
+ readonly ready: Promise<void>;
22
+ constructor(options?: RecorderOptions);
23
+ getSnapshot: () => NotificationSnapshot;
24
+ subscribe: (listener: () => void) => (() => void);
25
+ private update;
26
+ configure(patch: Pick<Partial<NotificationSnapshot>, "provider" | "providerVersion" | "platform" | "appId" | "capabilities" | "preview">): void;
27
+ private allowed;
28
+ private storageFailure;
29
+ private serial;
30
+ private hydrate;
31
+ setCaptureSession(runId: string | null, durationMs?: number): Promise<{
32
+ session: CaptureSession | null;
33
+ durable: boolean;
34
+ }>;
35
+ record(kind: NotificationEventKind, raw: unknown, metadata?: Partial<Pick<NotificationRecord, "notificationId" | "testId" | "title" | "actionIdentifier" | "provider" | "dedupeKey">>): Promise<NotificationRecord | null>;
36
+ private prune;
37
+ clearCapturedEvents(): Promise<{
38
+ cleared: true;
39
+ }>;
40
+ observeToken(type: NotificationToken["type"], value: string, metadata?: Pick<Partial<NotificationToken>, "projectId" | "environment">): Promise<void>;
41
+ setPermissions(permissions: unknown): void;
42
+ setPresented(presented: unknown): void;
43
+ flush(): Promise<void>;
44
+ }
45
+ export declare function expoMetadata(value: unknown): {
46
+ notificationId: string | null;
47
+ testId: string | null;
48
+ title: string | null;
49
+ actionIdentifier: string | null;
50
+ };
51
+ export declare function responseKey(value: unknown): string;
52
+ //# sourceMappingURL=recorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../src/recorder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAUvJ,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,4EAA4E;AAC5E,qBAAa,oBAAoB;IAYnB,OAAO,CAAC,OAAO;IAX3B,OAAO,CAAC,KAAK,CAIX;IACF,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,KAAK,CAAuC;IACpD,OAAO,CAAC,GAAG,CAAe;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBACV,OAAO,GAAE,eAAoB;IAOjD,WAAW,QAAO,oBAAoB,CAAe;IACrD,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC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otificationRecorder } from "./recorder";
2
+ import { type ExpoNotifications, type ExpoCaptureOptions } from "./expo";
3
+ import type { NotificationStorage } from "./types";
4
+ export interface InstallNotificationOptions extends Omit<ExpoCaptureOptions, "platform"> {
5
+ platform?: string;
6
+ storage?: NotificationStorage;
7
+ durable?: boolean;
8
+ /** Explicit opt-in for internal release builds. Desktop sync still requires Pro. */
9
+ enableInRelease?: boolean;
10
+ }
11
+ export declare function captureEnabled(enableInRelease?: boolean): boolean;
12
+ export declare function getNotificationRecorder(): NotificationRecorder | null;
13
+ export declare function installExpoNotificationCapture(sdk: ExpoNotifications, options?: InstallNotificationOptions): NotificationRecorder | null;
14
+ export declare const notificationSyncAdapter: {
15
+ version: number;
16
+ getSnapshot: () => import("./types").NotificationSnapshot;
17
+ subscribe: (listener: () => void) => () => void;
18
+ actions: {
19
+ getSnapshot: () => import("./types").NotificationSnapshot;
20
+ getCapabilities: () => {
21
+ ready: boolean;
22
+ provider: string | null;
23
+ providerVersion: string | null;
24
+ platform: string;
25
+ appId: string | null;
26
+ capabilities: string[];
27
+ durable: boolean;
28
+ storageError: string | null;
29
+ };
30
+ getEvent(params: unknown): import("./types").NotificationRecord | null;
31
+ setCaptureSession(params: unknown): Promise<{
32
+ session: import("./types").CaptureSession | null;
33
+ durable: boolean;
34
+ }>;
35
+ clearCapturedEvents: () => Promise<{
36
+ cleared: true;
37
+ }>;
38
+ getPermissions: () => Promise<import("./types").Json>;
39
+ listPresented: () => Promise<import("./types").Json>;
40
+ refreshToken: (params: unknown) => Promise<{
41
+ type: string;
42
+ value: string;
43
+ }>;
44
+ scheduleLocal: (params: unknown) => Promise<{
45
+ notificationId: string;
46
+ transport: string;
47
+ }>;
48
+ };
49
+ };
50
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAA2B,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAElG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAMnD,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oFAAoF;IACpF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AACD,wBAAgB,cAAc,CAAC,eAAe,UAAQ,WAErD;AACD,wBAAgB,uBAAuB,gCAA8D;AAErG,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,GAAE,0BAA+B,GAAG,oBAAoB,GAAG,IAAI,CAsB5I;AAQD,eAAO,MAAM,uBAAuB;;;0BAGZ,MAAM,IAAI;;;;;;;;;;;;;yBAOb,OAAO;kCAKQ,OAAO;;;;;;;;;+BAShB,OAAO;;;;gCACN,OAAO;;;;;CAElC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { NotificationStorage } from "./types";
2
+ export interface ExpoNotificationFileSystem {
3
+ documentDirectory: string | null;
4
+ getInfoAsync(path: string): Promise<{
5
+ exists: boolean;
6
+ }>;
7
+ makeDirectoryAsync(path: string, options: {
8
+ intermediates: boolean;
9
+ }): Promise<void>;
10
+ readAsStringAsync(path: string): Promise<string>;
11
+ writeAsStringAsync(path: string, value: string): Promise<void>;
12
+ deleteAsync(path: string, options: {
13
+ idempotent: boolean;
14
+ }): Promise<void>;
15
+ readDirectoryAsync(path: string): Promise<string[]>;
16
+ }
17
+ /** Propagates native I/O failures so capture never acknowledges a memory fallback as durable. */
18
+ export declare function createExpoNotificationStorage(fs: ExpoNotificationFileSystem): NotificationStorage;
19
+ export declare function defaultNotificationStorage(): {
20
+ storage?: NotificationStorage;
21
+ durable: boolean;
22
+ };
23
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACzD,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,aAAa,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACrD;AAED,iGAAiG;AACjG,wBAAgB,6BAA6B,CAAC,EAAE,EAAE,0BAA0B,GAAG,mBAAmB,CAqBjG;AAED,wBAAgB,0BAA0B,IAAI;IAAE,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAWhG"}
@@ -0,0 +1,64 @@
1
+ export type Json = null | boolean | number | string | Json[] | {
2
+ [key: string]: Json;
3
+ };
4
+ export type NotificationEventKind = "received" | "response" | "startup-response" | "presentation-decision" | "presentation-error" | "background-started" | "background-completed" | "background-error" | "app-outcome" | "local-scheduled";
5
+ export interface NotificationRecord {
6
+ id: string;
7
+ processId: string;
8
+ sequence: number;
9
+ capturedAt: number;
10
+ runId: string | null;
11
+ kind: NotificationEventKind;
12
+ provider: string;
13
+ observedAppState: string;
14
+ notificationId: string | null;
15
+ testId: string | null;
16
+ title: string | null;
17
+ actionIdentifier: string | null;
18
+ raw: Json;
19
+ dedupeKey?: string;
20
+ truncated?: boolean;
21
+ }
22
+ export interface NotificationToken {
23
+ type: "apns" | "fcm" | "expo";
24
+ value: string;
25
+ observedAt: number;
26
+ projectId?: string;
27
+ environment?: string;
28
+ }
29
+ export interface CaptureSession {
30
+ runId: string;
31
+ startedAt: number;
32
+ expiresAt: number;
33
+ }
34
+ export interface NotificationPreviewAppearance {
35
+ appName?: string;
36
+ iconUri?: string;
37
+ backgroundColor?: string;
38
+ textColor?: string;
39
+ }
40
+ export interface NotificationSnapshot {
41
+ version: 1;
42
+ preview?: NotificationPreviewAppearance;
43
+ ready: boolean;
44
+ provider: string | null;
45
+ providerVersion: string | null;
46
+ platform: string;
47
+ appId: string | null;
48
+ capabilities: string[];
49
+ durable: boolean;
50
+ storageError: string | null;
51
+ evicted: number;
52
+ session: CaptureSession | null;
53
+ events: NotificationRecord[];
54
+ tokens: NotificationToken[];
55
+ permissions: Json;
56
+ presented: Json;
57
+ }
58
+ export interface NotificationStorage {
59
+ getItem(key: string): Promise<string | null>;
60
+ setItem(key: string, value: string): Promise<void>;
61
+ removeItem(key: string): Promise<void>;
62
+ getAllKeys(): Promise<readonly string[]>;
63
+ }
64
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;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E,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACxC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,WAAW,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,UAAU,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;CAC1C"}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@buoy-gg/notifications",
3
+ "version": "7.0.41",
4
+ "description": "Send simulator notifications and inspect app receipt, interactions and device tokens.",
5
+ "main": "lib/commonjs/index.js",
6
+ "module": "lib/module/index.js",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "lib/module/index.js",
9
+ "source": "src/index.ts",
10
+ "files": [
11
+ "lib"
12
+ ],
13
+ "sideEffects": false,
14
+ "dependencies": {
15
+ "@buoy-gg/shared-ui": "^7.0.41"
16
+ },
17
+ "peerDependencies": {
18
+ "react": "*",
19
+ "react-native": "*"
20
+ },
21
+ "devDependencies": {
22
+ "@types/react": "^19.1.0",
23
+ "@types/react-native": "^0.73.0",
24
+ "typescript": "~5.8.3"
25
+ },
26
+ "react-native-builder-bob": {
27
+ "source": "src",
28
+ "output": "lib",
29
+ "targets": [
30
+ "commonjs",
31
+ "module",
32
+ [
33
+ "typescript",
34
+ {
35
+ "project": "tsconfig.build.json"
36
+ }
37
+ ]
38
+ ]
39
+ },
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/Buoy-gg/buoy.git",
43
+ "directory": "packages/notifications"
44
+ },
45
+ "bugs": {
46
+ "url": "https://github.com/LovesWorking/react-native-buoy/issues"
47
+ },
48
+ "homepage": "https://buoy.gg/buoy/latest/docs/tools/push-notifications",
49
+ "publishConfig": {
50
+ "access": "public",
51
+ "tag": "latest"
52
+ },
53
+ "keywords": [
54
+ "react-native",
55
+ "expo",
56
+ "notifications",
57
+ "devtools"
58
+ ],
59
+ "scripts": {
60
+ "build": "bob build",
61
+ "typecheck": "tsc --noEmit",
62
+ "clean": "rimraf lib",
63
+ "test": "pnpm run typecheck",
64
+ "postinstall": "echo \"Run pnpm build to compile this package\""
65
+ }
66
+ }