@marianmeres/stuic 1.27.0 → 1.29.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 {};
@@ -1,4 +1,4 @@
1
- <script>import { tooltip } from "../..";
1
+ <script>import { tooltip } from "../../actions/tooltip/tooltip.js";
2
2
  export let options = {};
3
3
  const POPOVER_DEFAULTS = {
4
4
  hideOnInsufficientSpace: true,
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import type { TooltipOptions } from '../../actions/tooltip/tooltip.js';
2
+ import { type TooltipOptions } from '../../actions/tooltip/tooltip.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  options?: Partial<TooltipOptions> | undefined;
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';
@@ -13,12 +13,13 @@ export { default as FieldCheckbox } from './components/Input/FieldCheckbox.svelt
13
13
  export { default as FieldRadios } from './components/Input/FieldRadios.svelte';
14
14
  export { default as FieldSelect } from './components/Input/FieldSelect.svelte';
15
15
  export { default as Fieldset } from './components/Input/Fieldset.svelte';
16
+ export { default as Popover } from './components/Popover/Popover.svelte';
16
17
  export { default as Switch, SwitchConfig } from './components/Switch/Switch.svelte';
17
18
  export { default as Thc } from './components/Thc/Thc.svelte';
18
19
  export { default as X } from './components/X/X.svelte';
19
20
  export { focusTrap } from './actions/focus-trap.js';
20
21
  export { onOutside } from './actions/on-outside.js';
21
- export { tooltip, TooltipConfig } from './actions/tooltip/tooltip.js';
22
+ export { tooltip, TooltipConfig, type TooltipOptions, } from './actions/tooltip/tooltip.js';
22
23
  export { validate, type ValidateOptions, type ValidationResult, } from './actions/validate.js';
23
24
  export { trim } from './actions/trim.js';
24
25
  export { autogrow } from './actions/autogrow.js';
package/dist/index.js CHANGED
@@ -23,6 +23,8 @@ export { default as FieldRadios } from './components/Input/FieldRadios.svelte';
23
23
  export { default as FieldSelect } from './components/Input/FieldSelect.svelte';
24
24
  export { default as Fieldset } from './components/Input/Fieldset.svelte';
25
25
  //
26
+ export { default as Popover } from './components/Popover/Popover.svelte';
27
+ //
26
28
  export { default as Switch, SwitchConfig } from './components/Switch/Switch.svelte';
27
29
  export { default as Thc } from './components/Thc/Thc.svelte';
28
30
  //
@@ -30,7 +32,7 @@ export { default as X } from './components/X/X.svelte';
30
32
  // actions
31
33
  export { focusTrap } from './actions/focus-trap.js';
32
34
  export { onOutside } from './actions/on-outside.js';
33
- export { tooltip, TooltipConfig } from './actions/tooltip/tooltip.js';
35
+ export { tooltip, TooltipConfig, } from './actions/tooltip/tooltip.js';
34
36
  export { validate, } from './actions/validate.js';
35
37
  export { trim } from './actions/trim.js';
36
38
  export { autogrow } from './actions/autogrow.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.27.0",
3
+ "version": "1.29.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package && node ./scripts/date.js",