flicker-alerts 1.0.33 → 1.0.34

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 (2) hide show
  1. package/index.d.ts +14 -18
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,29 +1,25 @@
1
1
  declare module 'flicker-alerts' {
2
- // Definição das opções para os alertas
3
- interface AlertOptions {
4
- type: 'success' | 'info' | 'warning' | 'danger'; // Tipos de alerta disponíveis
2
+ export interface AlertOptions {
3
+ type: 'success' | 'info' | 'warning' | 'danger';
5
4
  title: string;
6
5
  message: string;
7
- timer?: number; // Duração opcional do alerta (em milissegundos)
8
- position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center'; // Posições possíveis do alerta
6
+ timer?: number;
7
+ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center';
9
8
  }
10
9
 
11
- // Definição das opções para os modais
12
- interface ModalOptions {
13
- type: 'warning' | 'delete' ; // Tipos de modal disponíveis
10
+ export interface ModalOptions {
11
+ type: 'warning' | 'delete';
14
12
  title: string;
15
13
  message: string;
16
- onConfirm?: () => void; // Função executada no botão de confirmação
17
- onCancel?: () => void; // Função executada no botão de cancelamento
18
- timer?: number; // Duração opcional do modal (em milissegundos)
14
+ onConfirm?: () => void;
15
+ onCancel?: () => void;
16
+ timer?: number;
19
17
  }
20
18
 
21
- // Classe principal para a biblioteca FlickerAlerts
22
- export default class FlickerAlerts {
23
- // Método estático para mostrar um alerta
24
- static showAlert(options: AlertOptions): void;
19
+ const FlickerAlerts: {
20
+ showAlert(options: AlertOptions): void;
21
+ showModal(options: ModalOptions): void;
22
+ };
25
23
 
26
- // Método estático para mostrar um modal
27
- static showModal(options: ModalOptions): void;
28
- }
24
+ export default FlickerAlerts;
29
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flicker-alerts",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "Biblioteca para alertas animados",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -16,6 +16,6 @@
16
16
  "author": "https://www.linkedin.com/in/bruno-carneiro-9a51aa190/",
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
- "flicker-alerts": "^1.0.33"
19
+ "flicker-alerts": "^1.0.34"
20
20
  }
21
21
  }