capacitor-timer-notification
Advanced tools
Comparing version 0.0.36 to 0.1.0
@@ -42,4 +42,10 @@ { | ||
"name": "stopTimer", | ||
"signature": "() => Promise<void>", | ||
"parameters": [], | ||
"signature": "(options: { playSound?: boolean; }) => Promise<void>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "", | ||
"type": "{ playSound?: boolean | undefined; }" | ||
} | ||
], | ||
"returns": "Promise<void>", | ||
@@ -50,12 +56,2 @@ "tags": [], | ||
"slug": "stoptimer" | ||
}, | ||
{ | ||
"name": "getButtonClicked", | ||
"signature": "() => Promise<{ observe(callback: (action: string) => void): void; }>", | ||
"parameters": [], | ||
"returns": "Promise<{ observe(callback: (action: string) => void): void; }>", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [], | ||
"slug": "getbuttonclicked" | ||
} | ||
@@ -62,0 +58,0 @@ ], |
@@ -9,6 +9,5 @@ export interface TimerNotificationPlugin { | ||
}): Promise<void>; | ||
stopTimer(): Promise<void>; | ||
getButtonClicked(): Promise<{ | ||
observe(callback: (action: string) => void): void; | ||
}>; | ||
stopTimer(options: { | ||
playSound?: boolean; | ||
}): Promise<void>; | ||
} |
@@ -1,4 +0,4 @@ | ||
import type { TimerNotificationPlugin } from './definitions'; | ||
import { TimerNotificationPlugin } from './definitions'; | ||
declare const TimerNotification: TimerNotificationPlugin; | ||
export * from './definitions'; | ||
export { TimerNotification }; |
import { registerPlugin } from '@capacitor/core'; | ||
const TimerNotification = registerPlugin('TimerNotification', { | ||
web: () => import('./web').then((m) => new m.TimerNotificationWeb()), | ||
}); | ||
const TimerNotification = registerPlugin('TimerNotification'); | ||
export * from './definitions'; | ||
export { TimerNotification }; | ||
//# sourceMappingURL=index.js.map |
@@ -7,35 +7,5 @@ 'use strict'; | ||
const TimerNotification$1 = core.registerPlugin('TimerNotification', { | ||
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.TimerNotificationWeb()), | ||
}); | ||
const TimerNotification = core.registerPlugin('TimerNotification'); | ||
class TimerNotificationWeb extends core.WebPlugin { | ||
async startTimer(options) { | ||
console.log(`Starting timer for ${options.duration} seconds`); | ||
} | ||
async updateNotification(options) { | ||
console.log(`Updating notification: ${options.statusText} with ${options.duration} seconds remaining`); | ||
} | ||
async stopTimer() { | ||
console.log('Stopping timer and removing notification'); | ||
} | ||
async getButtonClicked() { | ||
console.log('getButtonClicked not supported on web'); | ||
return { | ||
observe: (callback) => { | ||
// No-op for web platform | ||
console.log('Simulating button click action on web', callback); | ||
}, | ||
}; | ||
} | ||
} | ||
const TimerNotification = new TimerNotificationWeb(); | ||
var web = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
TimerNotificationWeb: TimerNotificationWeb, | ||
TimerNotification: TimerNotification | ||
}); | ||
exports.TimerNotification = TimerNotification$1; | ||
exports.TimerNotification = TimerNotification; | ||
//# sourceMappingURL=plugin.cjs.js.map |
var capacitorTimerNotification = (function (exports, core) { | ||
'use strict'; | ||
'use strict'; | ||
const TimerNotification$1 = core.registerPlugin('TimerNotification', { | ||
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.TimerNotificationWeb()), | ||
}); | ||
const TimerNotification = core.registerPlugin('TimerNotification'); | ||
class TimerNotificationWeb extends core.WebPlugin { | ||
async startTimer(options) { | ||
console.log(`Starting timer for ${options.duration} seconds`); | ||
} | ||
async updateNotification(options) { | ||
console.log(`Updating notification: ${options.statusText} with ${options.duration} seconds remaining`); | ||
} | ||
async stopTimer() { | ||
console.log('Stopping timer and removing notification'); | ||
} | ||
async getButtonClicked() { | ||
console.log('getButtonClicked not supported on web'); | ||
return { | ||
observe: (callback) => { | ||
// No-op for web platform | ||
console.log('Simulating button click action on web', callback); | ||
}, | ||
}; | ||
} | ||
} | ||
const TimerNotification = new TimerNotificationWeb(); | ||
exports.TimerNotification = TimerNotification; | ||
var web = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
TimerNotificationWeb: TimerNotificationWeb, | ||
TimerNotification: TimerNotification | ||
}); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.TimerNotification = TimerNotification$1; | ||
return exports; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
return exports; | ||
})({}, capacitorExports); | ||
//# sourceMappingURL=plugin.js.map |
{ | ||
"name": "capacitor-timer-notification", | ||
"version": "0.0.36", | ||
"version": "0.1.0", | ||
"description": "timer notifcation", | ||
@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js", |
@@ -35,4 +35,3 @@ ## capacitor-timer-notification | ||
* [`updateNotification(...)`](#updatenotification) | ||
* [`stopTimer()`](#stoptimer) | ||
* [`getButtonClicked()`](#getbuttonclicked) | ||
* [`stopTimer(...)`](#stoptimer) | ||
@@ -70,21 +69,14 @@ </docgen-index> | ||
### stopTimer() | ||
### stopTimer(...) | ||
```typescript | ||
stopTimer() => Promise<void> | ||
stopTimer(options: { playSound?: boolean; }) => Promise<void> | ||
``` | ||
-------------------- | ||
| Param | Type | | ||
| ------------- | ------------------------------------- | | ||
| **`options`** | <code>{ playSound?: boolean; }</code> | | ||
### getButtonClicked() | ||
```typescript | ||
getButtonClicked() => Promise<{ observe(callback: (action: string) => void): void; }> | ||
``` | ||
**Returns:** <code>Promise<{ observe(callback: (action: string) => void): void; }></code> | ||
-------------------- | ||
</docgen-api> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66508
24
97
81
1
7