hanap-labs 7.5.1 → 8.0.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.
@@ -1,4 +1,4 @@
1
- import { n as e, r as t, t as n } from "./usePopup-C4TqBG3M.js";
1
+ import { n as e, r as t, t as n } from "./usePopup-CbluSYxf.js";
2
2
  import { Fragment as r, Teleport as i, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, customRef as m, defineComponent as h, getCurrentInstance as g, getCurrentScope as _, h as v, isRef as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onBeforeUnmount as T, onMounted as E, onScopeDispose as D, onUnmounted as O, openBlock as k, readonly as A, ref as j, render as M, renderList as N, renderSlot as P, resolveDynamicComponent as F, shallowRef as ee, toDisplayString as I, toRef as te, toValue as L, unref as R, useId as z, useModel as ne, useSlots as re, useTemplateRef as ie, vModelCheckbox as ae, vModelDynamic as oe, vModelText as se, vShow as ce, watch as B, watchEffect as le, withCtx as V, withDirectives as ue, withModifiers as de } from "vue";
3
3
  import H from "dayjs";
4
4
  import fe from "dayjs/plugin/isoWeek.js";
@@ -877,29 +877,29 @@ var at = {
877
877
  X.value !== void 0 && (clearTimeout(X.value), X.value = void 0);
878
878
  }, ut = () => {
879
879
  Y.value.visible = !1, lt();
880
- }, Z = (e, t, n, r, i = !1) => {
880
+ }, Z = (e, t) => {
881
881
  lt();
882
- let a = ct(t), o = Math.max(r, 0);
882
+ let n = ct(t.message), r = Math.max(t.duration ?? 3500, 0);
883
883
  Y.value = {
884
884
  id: ot++,
885
885
  visible: !0,
886
886
  type: e,
887
- message: a,
888
- html: i,
889
- title: n,
890
- durationMs: o,
887
+ message: n,
888
+ html: t.html ?? !1,
889
+ title: t.title ?? "",
890
+ durationMs: r,
891
891
  colorClass: at[e]
892
- }, o > 0 && (X.value = setTimeout(() => {
892
+ }, r > 0 && (X.value = setTimeout(() => {
893
893
  Y.value.visible = !1, X.value = void 0;
894
- }, o));
895
- }, dt = (e, t, n, r) => {
896
- Z("success", e, t ?? "", n ?? 3500, r);
897
- }, ft = (e, t, n, r) => {
898
- Z("error", e, t ?? "", n ?? 3500, r);
899
- }, pt = (e, t, n, r) => {
900
- Z("info", e, t ?? "", n ?? 3500, r);
901
- }, mt = (e, t, n, r) => {
902
- Z("warning", e, t ?? "", n ?? 3500, r);
894
+ }, r));
895
+ }, dt = (e) => {
896
+ Z("success", e);
897
+ }, ft = (e) => {
898
+ Z("error", e);
899
+ }, pt = (e) => {
900
+ Z("info", e);
901
+ }, mt = (e) => {
902
+ Z("warning", e);
903
903
  };
904
904
  function ht() {
905
905
  return {
@@ -1,2 +1,2 @@
1
- import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "../chunks/components-jVa5T9J6.js";
1
+ import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "../chunks/components-4M_JFArt.js";
2
2
  export { a as HLAvatar, O as HLBadge, D as HLBreadcrumb, l as HLButton, k as HLCard, s as HLCheckbox, w as HLDatepicker, o as HLIcon, p as HLInput, E as HLLabel, m as HLMenuAction, x as HLNotify, v as HLNotifyToast, _ as HLPopup, T as HLPopupContent, b as HLSelect, c as HLSkeleton, S as HLTable, h as HLTabs, y as HLTextarea, r as HL_ICON_NAMES, d as createNotifyPlugin, C as createPopupPlugin, n as getHLIconSvg, i as listHLIconNames, g as registerHLIcon, f as unmountNotifyHost, u as unmountPopupHost, e as unregisterHLIcon, t as useBreadcrumb };
@@ -1,3 +1,3 @@
1
1
  import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/composables-DYxDGCpw.js";
2
- import { n as c, r as l, t as u } from "../chunks/usePopup-C4TqBG3M.js";
2
+ import { n as c, r as l, t as u } from "../chunks/usePopup-CbluSYxf.js";
3
3
  export { n as createQueryPlugin, r as createUseMutation, e as createUseQuery, t as themePresets, l as useFloat, s as useForm, a as useMutation, c as useNotify, u as usePopup, i as useQuery, o as useTheme };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./chunks/composables-DYxDGCpw.js";
2
- import { A as l, C as u, D as d, E as f, O as ee, S as te, T as ne, _ as re, a as ie, b as ae, c as oe, d as se, f as ce, g as le, h as ue, i as de, k as fe, l as pe, m as me, n as he, o as ge, p as _e, r as ve, s as ye, t as be, u as xe, v as Se, w as Ce, x as we, y as Te } from "./chunks/components-jVa5T9J6.js";
3
- import { n as Ee, r as De, t as Oe } from "./chunks/usePopup-C4TqBG3M.js";
2
+ import { A as l, C as u, D as d, E as f, O as ee, S as te, T as ne, _ as re, a as ie, b as ae, c as oe, d as se, f as ce, g as le, h as ue, i as de, k as fe, l as pe, m as me, n as he, o as ge, p as _e, r as ve, s as ye, t as be, u as xe, v as Se, w as Ce, x as we, y as Te } from "./chunks/components-4M_JFArt.js";
3
+ import { n as Ee, r as De, t as Oe } from "./chunks/usePopup-CbluSYxf.js";
4
4
  import { t as ke } from "./chunks/helpers-BjMDD0mP.js";
5
5
  import { createToolkitAutoImportModules as Ae, createToolkitAutoImportOptions as je, createToolkitComponentsResolver as Me } from "./auto-import/index.js";
6
6
  //#region node_modules/zod/v4/core/core.js
@@ -3,7 +3,7 @@ export type { UseFloatFloatingBindings, UseFloatOptions, UseFloatReferenceBindin
3
3
  export { usePopup } from "./ui/usePopup";
4
4
  export type { ConfirmOptions, CustomPopupOptions, PopupConfirmProps, PopupKind, PopupOpenChain, PopupOpenOptions, PopupProps, UsePopupReturn, } from "./ui/usePopup";
5
5
  export { useNotify } from "./ui/useNotify";
6
- export type { NotifyState, NotifyType, UseNotifyReturn } from "./ui/useNotify";
6
+ export type { NotifyOptions, NotifyState, NotifyType, UseNotifyReturn, } from "./ui/useNotify";
7
7
  export { useTheme } from "./ui/useTheme";
8
8
  export type { UseThemeOptions, UseThemeReturn, ThemeMode, ThemePresetName, ThemeApplyMethod, } from "./ui/useTheme";
9
9
  export { themePresets } from "./ui/themePresets";
@@ -1,5 +1,11 @@
1
1
  import { type ComputedRef, type Ref } from "vue";
2
2
  type NotifyType = "success" | "error" | "info" | "warning";
3
+ type NotifyOptions = {
4
+ message: string | string[];
5
+ title?: string;
6
+ duration?: number;
7
+ html?: boolean;
8
+ };
3
9
  interface NotifyState {
4
10
  id: number;
5
11
  visible: boolean;
@@ -13,11 +19,11 @@ interface NotifyState {
13
19
  interface UseNotifyReturn {
14
20
  notification: Readonly<Ref<NotifyState>>;
15
21
  classes: ComputedRef<string>;
16
- success: (message: string | string[], title?: string, duration?: number, html?: boolean) => void;
17
- error: (message: string | string[], title?: string, duration?: number, html?: boolean) => void;
18
- info: (message: string | string[], title?: string, duration?: number, html?: boolean) => void;
19
- warning: (message: string | string[], title?: string, duration?: number, html?: boolean) => void;
22
+ success: (options: NotifyOptions) => void;
23
+ error: (options: NotifyOptions) => void;
24
+ info: (options: NotifyOptions) => void;
25
+ warning: (options: NotifyOptions) => void;
20
26
  hide: () => void;
21
27
  }
22
28
  export declare function useNotify(): UseNotifyReturn;
23
- export type { NotifyState, NotifyType, UseNotifyReturn };
29
+ export type { NotifyOptions, NotifyState, NotifyType, UseNotifyReturn };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hanap-labs",
3
- "version": "7.5.1",
3
+ "version": "8.0.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "vue",