@marianmeres/stuic 1.27.0 → 1.28.0

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.
@@ -9,7 +9,7 @@ type FnOnOK = (value: any) => any;
9
9
  type FnOnCancel = (value: false) => any;
10
10
  type FnOnEscape = () => undefined;
11
11
  type FnOnCustom = (value: any) => any;
12
- interface Dialog extends Record<string, any> {
12
+ export interface AlertConfirmPromptOptions extends Record<string, any> {
13
13
  type: AlertConfirmPromptType.ALERT | AlertConfirmPromptType.CONFIRM | AlertConfirmPromptType.PROMPT;
14
14
  title: THC;
15
15
  content: THC;
@@ -39,18 +39,18 @@ interface Dialog extends Record<string, any> {
39
39
  }>;
40
40
  }
41
41
  export declare const createAlertConfirmPromptStore: () => {
42
- subscribe: (cb: import("@marianmeres/store").Subscribe<Dialog[]>) => import("@marianmeres/store").Unsubscribe;
43
- get: () => Dialog[];
44
- push: (o: Partial<Dialog>) => void;
42
+ subscribe: (cb: import("@marianmeres/store").Subscribe<AlertConfirmPromptOptions[]>) => import("@marianmeres/store").Unsubscribe;
43
+ get: () => AlertConfirmPromptOptions[];
44
+ push: (o: Partial<AlertConfirmPromptOptions>) => void;
45
45
  shift: () => void;
46
- reset: (stack?: Dialog[]) => void;
46
+ reset: (stack?: AlertConfirmPromptOptions[]) => void;
47
47
  escape: () => void;
48
48
  close: () => void;
49
- alert: (o?: Partial<Dialog> | string) => void;
50
- confirm: (onOk: FnOnOK, o?: Partial<Dialog>) => void;
51
- prompt: (onOk: FnOnOK, o?: Partial<Dialog>) => void;
49
+ alert: (o?: Partial<AlertConfirmPromptOptions> | string) => void;
50
+ confirm: (onOk: FnOnOK, o?: Partial<AlertConfirmPromptOptions>) => void;
51
+ prompt: (onOk: FnOnOK, o?: Partial<AlertConfirmPromptOptions>) => void;
52
52
  };
53
- export declare const createAlert: (acp: ReturnType<typeof createAlertConfirmPromptStore>, defaults?: Partial<Dialog>) => (message: string, o?: Partial<Dialog>) => Promise<unknown>;
54
- export declare const createConfirm: (acp: ReturnType<typeof createAlertConfirmPromptStore>, defaults?: Partial<Dialog>) => (message: string, o?: Partial<Dialog>) => Promise<unknown>;
55
- export declare const createPrompt: (acp: ReturnType<typeof createAlertConfirmPromptStore>, defaults?: Partial<Dialog>) => (message: string, defaultValue?: string, o?: Partial<Dialog>) => Promise<unknown>;
53
+ export declare const createAlert: (acp: ReturnType<typeof createAlertConfirmPromptStore>, defaults?: Partial<AlertConfirmPromptOptions>) => (message: string, o?: Partial<AlertConfirmPromptOptions>) => Promise<unknown>;
54
+ export declare const createConfirm: (acp: ReturnType<typeof createAlertConfirmPromptStore>, defaults?: Partial<AlertConfirmPromptOptions>) => (message: string, o?: Partial<AlertConfirmPromptOptions>) => Promise<unknown>;
55
+ export declare const createPrompt: (acp: ReturnType<typeof createAlertConfirmPromptStore>, defaults?: Partial<AlertConfirmPromptOptions>) => (message: string, defaultValue?: string, o?: Partial<AlertConfirmPromptOptions>) => Promise<unknown>;
56
56
  export {};
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { default as AlertConfirmPrompt, AlertConfirmPromptConfig, } from './components/AlertConfirmPrompt/AlertConfirmPrompt.svelte';
2
- export { createAlertConfirmPromptStore, createAlert, createConfirm, createPrompt, AlertConfirmPromptType, type AlertConfirmPromptVariant, } from './components/AlertConfirmPrompt/alert-confirm-prompt.js';
2
+ export { createAlertConfirmPromptStore, createAlert, createConfirm, createPrompt, AlertConfirmPromptType, type AlertConfirmPromptVariant, type AlertConfirmPromptOptions, } from './components/AlertConfirmPrompt/alert-confirm-prompt.js';
3
3
  export { default as AppShell, appShellSetHtmlBodyHeight, } from './components/AppShell/AppShell.svelte';
4
4
  export { default as Backdrop, BackdropConfig, } from './components/Backdrop/Backdrop.svelte';
5
5
  export { default as Button, ButtonConfig } from './components/Button/Button.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.27.0",
3
+ "version": "1.28.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package && node ./scripts/date.js",