react-native-alarms 0.0.2 → 0.0.3

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.md CHANGED
@@ -246,7 +246,9 @@ Rings at regular intervals. Note: intervals reset if the app is killed.
246
246
  }
247
247
  ```
248
248
 
249
- ## Complete Example
249
+ ## Building Your Own Alarm UI
250
+
251
+ The library provides the core alarm management logic. You build your own UI components. Here's a complete example:
250
252
 
251
253
  ```typescript
252
254
  import React, { useEffect, useState } from 'react';
@@ -384,3 +386,44 @@ For issues and questions, please visit:
384
386
  - Cross-platform alarm scheduling
385
387
  - Event-driven architecture
386
388
  - Permission management
389
+
390
+ ## Custom Alarm UI & Custom Data
391
+
392
+ The library supports completely custom alarm UI screens with custom data payloads.
393
+
394
+ ### Basic Custom Screen Example
395
+
396
+ ```typescript
397
+ import { NativeModules } from 'react-native';
398
+ import { AlarmService } from 'react-native-alarms/service';
399
+
400
+ export function MyCustomAlarmScreen({ alarmId, title, data }) {
401
+ const customData = JSON.parse(data || '{}');
402
+
403
+ return (
404
+ <View style={{ backgroundColor: customData.color }}>
405
+ <Text>{title}</Text>
406
+ <TouchableOpacity onPress={() => AlarmService.stopAlarm(alarmId)}>
407
+ <Text>Stop</Text>
408
+ </TouchableOpacity>
409
+ </View>
410
+ );
411
+ }
412
+ ```
413
+
414
+ ### Passing Custom Data
415
+
416
+ ```typescript
417
+ await AlarmService.scheduleAlarm({
418
+ timestamp: Date.now() + 5 * 60 * 1000,
419
+ title: 'Important!',
420
+ data: JSON.stringify({
421
+ backgroundColor: '#FF5252',
422
+ priority: 'high',
423
+ customMessage: 'This is urgent!',
424
+ }),
425
+ });
426
+ ```
427
+
428
+ **Full Guide:** See [CUSTOM_UI_GUIDE.md](./CUSTOM_UI_GUIDE.md) for complete examples and best practices.
429
+
package/index.d.ts CHANGED
@@ -9,12 +9,8 @@ export type {
9
9
  Alarm,
10
10
  AlarmPermission,
11
11
  AlarmEvent,
12
+ Spec as AlarmModuleSpec,
12
13
  } from './specs/NativeAlarm';
13
14
 
14
- export type { Spec as AlarmModuleSpec } from './specs/NativeAlarm';
15
-
16
- export { AlarmDemo } from './AlarmDemo';
17
-
18
- // Default export for backward compatibility
19
- import type NativeAlarm from './specs/NativeAlarm';
20
- export default NativeAlarm;
15
+ // Default export for type compatibility
16
+ export type { Spec as default } from './specs/NativeAlarm';
package/index.ts CHANGED
@@ -14,8 +14,6 @@ export type {
14
14
  Spec as AlarmModuleSpec,
15
15
  } from './specs/NativeAlarm';
16
16
 
17
- export { AlarmDemo } from './AlarmDemo';
18
-
19
17
  // Default export for backward compatibility
20
18
  import NativeAlarm from './specs/NativeAlarm';
21
19
  export default NativeAlarm;
@@ -0,0 +1 @@
1
+ export NODE_BINARY=/opt/homebrew/Cellar/node/26.10.0_1/bin/node
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-alarms",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "A powerful, cross-platform alarm management library for React Native",
5
5
  "private": false,
6
6
  "main": "index.ts",