@lerx/promise-modal 0.8.7 → 0.8.8

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,5 +1,5 @@
1
1
  import type { ModalNode } from '../core';
2
- export declare const useModalDuration: (id?: ModalNode["id"]) => {
3
- duration: string;
2
+ export declare const useModalDuration: (modalId?: ModalNode["id"]) => {
3
+ duration: `${number}ms`;
4
4
  milliseconds: number;
5
5
  };
package/dist/index.cjs CHANGED
@@ -1058,15 +1058,18 @@ const useModalAnimation = (visible, handler) => {
1058
1058
  }, [visible]);
1059
1059
  };
1060
1060
 
1061
- const useModalDuration = (id) => {
1061
+ const useModalDuration = (modalId) => {
1062
1062
  const globalDuration = useConfigurationDuration();
1063
- if (id === undefined)
1063
+ if (modalId === undefined)
1064
1064
  return globalDuration;
1065
- const { modal } = useModalManager(id);
1065
+ const { modal } = useModalManager(modalId);
1066
1066
  if (modal === undefined)
1067
1067
  return globalDuration;
1068
1068
  const milliseconds = modal.duration;
1069
- return { duration: milliseconds + 'ms', milliseconds };
1069
+ return {
1070
+ duration: (milliseconds + 'ms'),
1071
+ milliseconds,
1072
+ };
1070
1073
  };
1071
1074
 
1072
1075
  exports.ModalProvider = BootstrapProvider;
package/dist/index.mjs CHANGED
@@ -1056,15 +1056,18 @@ const useModalAnimation = (visible, handler) => {
1056
1056
  }, [visible]);
1057
1057
  };
1058
1058
 
1059
- const useModalDuration = (id) => {
1059
+ const useModalDuration = (modalId) => {
1060
1060
  const globalDuration = useConfigurationDuration();
1061
- if (id === undefined)
1061
+ if (modalId === undefined)
1062
1062
  return globalDuration;
1063
- const { modal } = useModalManager(id);
1063
+ const { modal } = useModalManager(modalId);
1064
1064
  if (modal === undefined)
1065
1065
  return globalDuration;
1066
1066
  const milliseconds = modal.duration;
1067
- return { duration: milliseconds + 'ms', milliseconds };
1067
+ return {
1068
+ duration: (milliseconds + 'ms'),
1069
+ milliseconds,
1070
+ };
1068
1071
  };
1069
1072
 
1070
1073
  export { BootstrapProvider as ModalProvider, alert, confirm, prompt, useActiveModalCount, useDestroyAfter, useBootstrap as useInitializeModal, useModal, useModalAnimation, useConfigurationBackdrop as useModalBackdrop, useModalDuration, useConfigurationOptions as useModalOptions, useSubscribeModal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lerx/promise-modal",
3
- "version": "0.8.7",
3
+ "version": "0.8.8",
4
4
  "description": "Universal React modal utility that can be used outside React components with promise-based results for alert, confirm, and prompt modals",
5
5
  "keywords": [
6
6
  "react",