@lerx/promise-modal 0.0.1

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 (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -0
  3. package/dist/app/ModalManager.d.ts +9 -0
  4. package/dist/app/ModalManager.d.ts.map +1 -0
  5. package/dist/app/constant.d.ts +3 -0
  6. package/dist/app/constant.d.ts.map +1 -0
  7. package/dist/components/Anchor/Anchor.d.ts +2 -0
  8. package/dist/components/Anchor/Anchor.d.ts.map +1 -0
  9. package/dist/components/Anchor/index.d.ts +2 -0
  10. package/dist/components/Anchor/index.d.ts.map +1 -0
  11. package/dist/components/Background/Background.d.ts +3 -0
  12. package/dist/components/Background/Background.d.ts.map +1 -0
  13. package/dist/components/Background/index.d.ts +2 -0
  14. package/dist/components/Background/index.d.ts.map +1 -0
  15. package/dist/components/FallbackComponents/FallbackContent.d.ts +3 -0
  16. package/dist/components/FallbackComponents/FallbackContent.d.ts.map +1 -0
  17. package/dist/components/FallbackComponents/FallbackFooter.d.ts +3 -0
  18. package/dist/components/FallbackComponents/FallbackFooter.d.ts.map +1 -0
  19. package/dist/components/FallbackComponents/FallbackForegroundFrame.d.ts +5 -0
  20. package/dist/components/FallbackComponents/FallbackForegroundFrame.d.ts.map +1 -0
  21. package/dist/components/FallbackComponents/FallbackSubtitle.d.ts +3 -0
  22. package/dist/components/FallbackComponents/FallbackSubtitle.d.ts.map +1 -0
  23. package/dist/components/FallbackComponents/FallbackTitle.d.ts +3 -0
  24. package/dist/components/FallbackComponents/FallbackTitle.d.ts.map +1 -0
  25. package/dist/components/FallbackComponents/index.d.ts +6 -0
  26. package/dist/components/FallbackComponents/index.d.ts.map +1 -0
  27. package/dist/components/Foreground/Foreground.d.ts +3 -0
  28. package/dist/components/Foreground/Foreground.d.ts.map +1 -0
  29. package/dist/components/Foreground/components/AlertInner.d.ts +9 -0
  30. package/dist/components/Foreground/components/AlertInner.d.ts.map +1 -0
  31. package/dist/components/Foreground/components/ConfirmInner.d.ts +9 -0
  32. package/dist/components/Foreground/components/ConfirmInner.d.ts.map +1 -0
  33. package/dist/components/Foreground/components/PromptInner.d.ts +9 -0
  34. package/dist/components/Foreground/components/PromptInner.d.ts.map +1 -0
  35. package/dist/components/Foreground/components/index.d.ts +4 -0
  36. package/dist/components/Foreground/components/index.d.ts.map +1 -0
  37. package/dist/components/Foreground/index.d.ts +2 -0
  38. package/dist/components/Foreground/index.d.ts.map +1 -0
  39. package/dist/components/Presenter/Presenter.d.ts +3 -0
  40. package/dist/components/Presenter/Presenter.d.ts.map +1 -0
  41. package/dist/components/Presenter/index.d.ts +2 -0
  42. package/dist/components/Presenter/index.d.ts.map +1 -0
  43. package/dist/core/handle/alert.d.ts +15 -0
  44. package/dist/core/handle/alert.d.ts.map +1 -0
  45. package/dist/core/handle/confirm.d.ts +15 -0
  46. package/dist/core/handle/confirm.d.ts.map +1 -0
  47. package/dist/core/handle/index.d.ts +4 -0
  48. package/dist/core/handle/index.d.ts.map +1 -0
  49. package/dist/core/handle/prompt.d.ts +18 -0
  50. package/dist/core/handle/prompt.d.ts.map +1 -0
  51. package/dist/core/index.d.ts +3 -0
  52. package/dist/core/index.d.ts.map +1 -0
  53. package/dist/core/node/ModalNode/AbstractBaseNode.d.ts +26 -0
  54. package/dist/core/node/ModalNode/AbstractBaseNode.d.ts.map +1 -0
  55. package/dist/core/node/ModalNode/AlertNode.d.ts +15 -0
  56. package/dist/core/node/ModalNode/AlertNode.d.ts.map +1 -0
  57. package/dist/core/node/ModalNode/ConfirmNode.d.ts +15 -0
  58. package/dist/core/node/ModalNode/ConfirmNode.d.ts.map +1 -0
  59. package/dist/core/node/ModalNode/PromptNode.d.ts +20 -0
  60. package/dist/core/node/ModalNode/PromptNode.d.ts.map +1 -0
  61. package/dist/core/node/ModalNode/index.d.ts +4 -0
  62. package/dist/core/node/ModalNode/index.d.ts.map +1 -0
  63. package/dist/core/node/index.d.ts +3 -0
  64. package/dist/core/node/index.d.ts.map +1 -0
  65. package/dist/core/node/nodeFactory.d.ts +4 -0
  66. package/dist/core/node/nodeFactory.d.ts.map +1 -0
  67. package/dist/core/node/type.d.ts +4 -0
  68. package/dist/core/node/type.d.ts.map +1 -0
  69. package/dist/helpers/getMillisecondsFromDuration.d.ts +2 -0
  70. package/dist/helpers/getMillisecondsFromDuration.d.ts.map +1 -0
  71. package/dist/hooks/useActiveModalCount.d.ts +2 -0
  72. package/dist/hooks/useActiveModalCount.d.ts.map +1 -0
  73. package/dist/hooks/useDefaultPathname.d.ts +4 -0
  74. package/dist/hooks/useDefaultPathname.d.ts.map +1 -0
  75. package/dist/hooks/useDestroyAfter.d.ts +3 -0
  76. package/dist/hooks/useDestroyAfter.d.ts.map +1 -0
  77. package/dist/hooks/useSubscribeModal.d.ts +3 -0
  78. package/dist/hooks/useSubscribeModal.d.ts.map +1 -0
  79. package/dist/hooks/useWindowSize.d.ts +5 -0
  80. package/dist/hooks/useWindowSize.d.ts.map +1 -0
  81. package/dist/index.cjs.js +18 -0
  82. package/dist/index.cjs.js.map +1 -0
  83. package/dist/index.d.ts +6 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.esm.js +18 -0
  86. package/dist/index.esm.js.map +1 -0
  87. package/dist/providers/ModalContext/ModalContext.d.ts +18 -0
  88. package/dist/providers/ModalContext/ModalContext.d.ts.map +1 -0
  89. package/dist/providers/ModalContext/ModalContextProvider.d.ts +22 -0
  90. package/dist/providers/ModalContext/ModalContextProvider.d.ts.map +1 -0
  91. package/dist/providers/ModalContext/index.d.ts +3 -0
  92. package/dist/providers/ModalContext/index.d.ts.map +1 -0
  93. package/dist/providers/ModalContext/useModalContext.d.ts +13 -0
  94. package/dist/providers/ModalContext/useModalContext.d.ts.map +1 -0
  95. package/dist/providers/ModalDataContext/ModalDataContext.d.ts +10 -0
  96. package/dist/providers/ModalDataContext/ModalDataContext.d.ts.map +1 -0
  97. package/dist/providers/ModalDataContext/ModalDataContextProvider.d.ts +7 -0
  98. package/dist/providers/ModalDataContext/ModalDataContextProvider.d.ts.map +1 -0
  99. package/dist/providers/ModalDataContext/index.d.ts +3 -0
  100. package/dist/providers/ModalDataContext/index.d.ts.map +1 -0
  101. package/dist/providers/ModalDataContext/useModalDataContext.d.ts +4 -0
  102. package/dist/providers/ModalDataContext/useModalDataContext.d.ts.map +1 -0
  103. package/dist/providers/index.d.ts +3 -0
  104. package/dist/providers/index.d.ts.map +1 -0
  105. package/dist/types/alert.d.ts +13 -0
  106. package/dist/types/alert.d.ts.map +1 -0
  107. package/dist/types/background.d.ts +4 -0
  108. package/dist/types/background.d.ts.map +1 -0
  109. package/dist/types/base.d.ts +30 -0
  110. package/dist/types/base.d.ts.map +1 -0
  111. package/dist/types/confirm.d.ts +14 -0
  112. package/dist/types/confirm.d.ts.map +1 -0
  113. package/dist/types/function.d.ts +16 -0
  114. package/dist/types/index.d.ts +7 -0
  115. package/dist/types/index.d.ts.map +1 -0
  116. package/dist/types/modal.d.ts +46 -0
  117. package/dist/types/modal.d.ts.map +1 -0
  118. package/dist/types/object.d.ts +14 -0
  119. package/dist/types/prompt.d.ts +26 -0
  120. package/dist/types/prompt.d.ts.map +1 -0
  121. package/dist/types/styles.d.ts +4 -0
  122. package/dist/types/units.d.ts +21 -0
  123. package/dist/types/utility.d.ts +45 -0
  124. package/package.json +97 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Vincent K. Kelvin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # @lerx/promise-modal
2
+
3
+ [![Typescript](https://img.shields.io/badge/typescript-✔-blue.svg)]()
4
+ [![Javascript](https://img.shields.io/badge/javascript-✔-yellow.svg)]()
5
+ [![React](https://img.shields.io/badge/react-✔-61DAFB.svg)]()
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ `@lerx/promise-modal` is a universal modal utility based on React.
12
+
13
+ It can be used even in places not included in React components,
14
+
15
+ and after the modal is opened, you can retrieve the result as a promise.
16
+
17
+ ---
18
+
19
+ ## How to use
20
+
21
+ ```bash
22
+ yarn add @lerx/promise-modal
23
+ ```
24
+
25
+ _Under Preparation_
26
+
27
+ ---
28
+
29
+ ## Contribution Guidelines
30
+
31
+ _Under Preparation_
32
+
33
+ ---
34
+
35
+ ## License
36
+
37
+ This repository is licensed under the MIT License. Please refer to the [`LICENSE`](./LICENSE) file for details.
38
+
39
+ ---
40
+
41
+ ## Contact
42
+
43
+ For inquiries or suggestions related to the project, please create an issue.
@@ -0,0 +1,9 @@
1
+ import type { Modal } from '../types';
2
+ export declare const ModalManager: {
3
+ readonly prerender: Modal[];
4
+ clearPrerender(): void;
5
+ open(modal: Modal): void;
6
+ setupOpen(open: (modal: Modal) => void): void;
7
+ anchor(name: string, label?: string): HTMLElement;
8
+ };
9
+ //# sourceMappingURL=ModalManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModalManager.d.ts","sourceRoot":"","sources":["../../src/app/ModalManager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,eAAO,MAAM,YAAY;;;gBAOX,KAAK;oBAGD,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;iBAGzB,MAAM,mBAA2B,WAAW;CAW1D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const DEFAULT_ANIMATION_DURATION = "300ms";
2
+ export declare const DEFAULT_BACKDROP_COLOR = "rgba(0, 0, 0, 0.5)";
3
+ //# sourceMappingURL=constant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/app/constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,UAAU,CAAC;AAElD,eAAO,MAAM,sBAAsB,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const Anchor: import("react").MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
2
+ //# sourceMappingURL=Anchor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Anchor.d.ts","sourceRoot":"","sources":["../../../src/components/Anchor/Anchor.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,MAAM,oFA0BjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Anchor } from './Anchor';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Anchor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ModalLayerProps } from '../../types';
2
+ export declare const Background: ({ modalId, onChangeOrder }: ModalLayerProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=Background.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../src/components/Background/Background.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,eAAO,MAAM,UAAU,+BAAgC,eAAe,mDA2CrE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Background } from './Background';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Background/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ export declare const FallbackContent: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=FallbackContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FallbackContent.d.ts","sourceRoot":"","sources":["../../../src/components/FallbackComponents/FallbackContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,eAAO,MAAM,eAAe,iBAAkB,iBAAiB,4CAE9D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FooterComponentProps } from '../../types';
2
+ export declare const FallbackFooter: ({ confirmLabel, hideConfirm, cancelLabel, hideCancel, disabled, onConfirm, onCancel, }: FooterComponentProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=FallbackFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FallbackFooter.d.ts","sourceRoot":"","sources":["../../../src/components/FallbackComponents/FallbackFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,eAAO,MAAM,cAAc,2FAQxB,oBAAoB,4CActB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { ModalFrameProps } from '../../types';
2
+ export declare const FallbackForegroundFrame: import("react").ForwardRefExoticComponent<ModalFrameProps & {
3
+ children?: import("react").ReactNode | undefined;
4
+ } & import("react").RefAttributes<HTMLDivElement>>;
5
+ //# sourceMappingURL=FallbackForegroundFrame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FallbackForegroundFrame.d.ts","sourceRoot":"","sources":["../../../src/components/FallbackComponents/FallbackForegroundFrame.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAO7D,eAAO,MAAM,uBAAuB;;kDA8BnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ export declare const FallbackSubtitle: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=FallbackSubtitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FallbackSubtitle.d.ts","sourceRoot":"","sources":["../../../src/components/FallbackComponents/FallbackSubtitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,eAAO,MAAM,gBAAgB,iBAAkB,iBAAiB,4CAE/D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ export declare const FallbackTitle: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=FallbackTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FallbackTitle.d.ts","sourceRoot":"","sources":["../../../src/components/FallbackComponents/FallbackTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,eAAO,MAAM,aAAa,iBAAkB,iBAAiB,4CAE5D,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { FallbackTitle } from './FallbackTitle';
2
+ export { FallbackSubtitle } from './FallbackSubtitle';
3
+ export { FallbackContent } from './FallbackContent';
4
+ export { FallbackFooter } from './FallbackFooter';
5
+ export { FallbackForegroundFrame } from './FallbackForegroundFrame';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FallbackComponents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ModalLayerProps } from '../../types';
2
+ export declare const Foreground: ({ modalId, onChangeOrder }: ModalLayerProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=Foreground.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Foreground.d.ts","sourceRoot":"","sources":["../../../src/components/Foreground/Foreground.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK7D,eAAO,MAAM,UAAU,+BAAgC,eAAe,mDA2CrE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { AlertNode } from '../../../core';
2
+ import type { ModalActions } from '../../../types';
3
+ interface AlertInnerProps<B> {
4
+ modal: AlertNode<B>;
5
+ handlers: Pick<ModalActions, 'onConfirm'>;
6
+ }
7
+ export declare const AlertInner: import("react").MemoExoticComponent<(<B>({ modal, handlers }: AlertInnerProps<B>) => import("react/jsx-runtime").JSX.Element)>;
8
+ export {};
9
+ //# sourceMappingURL=AlertInner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertInner.d.ts","sourceRoot":"","sources":["../../../../src/components/Foreground/components/AlertInner.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,UAAU,eAAe,CAAC,CAAC;IACzB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACpB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;CAC3C;AAED,eAAO,MAAM,UAAU,wCACpB,CAAC,uBAAwB,eAAe,CAAC,CAAC,CAAC,8CA4C7C,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ConfirmNode } from '../../../core';
2
+ import type { ModalActions } from '../../../types';
3
+ interface ConfirmInnerProps<B> {
4
+ modal: ConfirmNode<B>;
5
+ handlers: Pick<ModalActions, 'onConfirm' | 'onClose'>;
6
+ }
7
+ export declare const ConfirmInner: import("react").MemoExoticComponent<(<B>({ modal, handlers }: ConfirmInnerProps<B>) => import("react/jsx-runtime").JSX.Element)>;
8
+ export {};
9
+ //# sourceMappingURL=ConfirmInner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmInner.d.ts","sourceRoot":"","sources":["../../../../src/components/Foreground/components/ConfirmInner.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,UAAU,iBAAiB,CAAC,CAAC;IAC3B,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACtB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,SAAS,CAAC,CAAC;CACvD;AAED,eAAO,MAAM,YAAY,wCACtB,CAAC,uBAAwB,iBAAiB,CAAC,CAAC,CAAC,8CAoD/C,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { PromptNode } from '../../../core';
2
+ import type { ModalActions } from '../../../types';
3
+ interface PromptInnerProps<T, B> {
4
+ modal: PromptNode<T, B>;
5
+ handlers: Pick<ModalActions, 'onChange' | 'onClose' | 'onConfirm'>;
6
+ }
7
+ export declare const PromptInner: import("react").MemoExoticComponent<(<T, B>({ modal, handlers }: PromptInnerProps<T, B>) => import("react/jsx-runtime").JSX.Element)>;
8
+ export {};
9
+ //# sourceMappingURL=PromptInner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptInner.d.ts","sourceRoot":"","sources":["../../../../src/components/Foreground/components/PromptInner.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,UAAU,gBAAgB,CAAC,CAAC,EAAE,CAAC;IAC7B,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,WAAW,wCACrB,CAAC,EAAE,CAAC,uBAAuB,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,8CAwGnD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { AlertInner } from './AlertInner';
2
+ export { ConfirmInner } from './ConfirmInner';
3
+ export { PromptInner } from './PromptInner';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Foreground/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Foreground } from './Foreground';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Foreground/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ModalIdProps } from '../../types';
2
+ export declare const Presenter: import("react").MemoExoticComponent<({ modalId }: ModalIdProps) => import("react/jsx-runtime").JSX.Element>;
3
+ //# sourceMappingURL=Presenter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Presenter.d.ts","sourceRoot":"","sources":["../../../src/components/Presenter/Presenter.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,eAAO,MAAM,SAAS,oDAAsB,YAAY,6CAetD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Presenter } from './Presenter';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Presenter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { AlertContentProps, AlertFooterRender, FooterOptions, ModalBackground } from '../../types';
3
+ interface AlertProps<B> {
4
+ subtype?: 'info' | 'success' | 'warning' | 'error';
5
+ title: string;
6
+ subtitle?: ReactNode;
7
+ content?: ReactNode | ComponentType<AlertContentProps>;
8
+ background?: ModalBackground<B>;
9
+ footer?: AlertFooterRender | Pick<FooterOptions, 'confirm' | 'hideConfirm'> | false;
10
+ manualDestroy?: boolean;
11
+ closeOnBackdropClick?: boolean;
12
+ }
13
+ export declare const alert: <B = any>({ subtype, title, subtitle, content, background, footer, manualDestroy, closeOnBackdropClick, }: AlertProps<B>) => Promise<void>;
14
+ export {};
15
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/core/handle/alert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAE/B,UAAU,UAAU,CAAC,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvD,UAAU,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,EACH,iBAAiB,GACjB,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,aAAa,CAAC,GAC9C,KAAK,CAAC;IACV,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,KAAK,GAAI,CAAC,yGASpB,UAAU,CAAC,CAAC,CAAC,kBAmBf,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { ConfirmContentProps, ConfirmFooterRender, FooterOptions, ModalBackground } from '../../types';
3
+ interface ConfirmProps<B> {
4
+ subtype?: 'info' | 'success' | 'warning' | 'error';
5
+ title?: ReactNode;
6
+ subtitle?: ReactNode;
7
+ content?: ReactNode | ComponentType<ConfirmContentProps>;
8
+ background?: ModalBackground<B>;
9
+ footer?: ConfirmFooterRender | FooterOptions | false;
10
+ closeOnBackdropClick?: boolean;
11
+ manualDestroy?: boolean;
12
+ }
13
+ export declare const confirm: <B = any>({ subtype, title, subtitle, content, background, footer, manualDestroy, closeOnBackdropClick, }: ConfirmProps<B>) => Promise<boolean>;
14
+ export {};
15
+ //# sourceMappingURL=confirm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm.d.ts","sourceRoot":"","sources":["../../../src/core/handle/confirm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAE/B,UAAU,YAAY,CAAC,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACnD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACzD,UAAU,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,mBAAmB,GAAG,aAAa,GAAG,KAAK,CAAC;IACrD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,OAAO,GAAI,CAAC,yGAStB,YAAY,CAAC,CAAC,CAAC,qBAmBjB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { alert } from './alert';
2
+ export { confirm } from './confirm';
3
+ export { prompt } from './prompt';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/handle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { FooterOptions, ModalBackground, PromptContentProps, PromptFooterRender, PromptInputProps } from '../../types';
3
+ interface PromptProps<T, B = any> {
4
+ title?: ReactNode;
5
+ subtitle?: ReactNode;
6
+ content?: ReactNode | ComponentType<PromptContentProps>;
7
+ Input: (props: PromptInputProps<T>) => ReactNode;
8
+ defaultValue?: T;
9
+ disabled?: (value: T) => boolean;
10
+ returnOnCancel?: boolean;
11
+ background?: ModalBackground<B>;
12
+ footer?: PromptFooterRender<T> | FooterOptions | false;
13
+ manualDestroy?: boolean;
14
+ closeOnBackdropClick?: boolean;
15
+ }
16
+ export declare const prompt: <T, B = any>({ defaultValue, title, subtitle, content, Input, disabled, returnOnCancel, background, footer, manualDestroy, closeOnBackdropClick, }: PromptProps<T, B>) => Promise<T>;
17
+ export {};
18
+ //# sourceMappingURL=prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/core/handle/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAI/B,UAAU,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACxD,KAAK,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;IACjD,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,aAAa,GAAG,KAAK,CAAC;IACvD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,CAAC,+IAYxB,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,eA2BnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './handle';
2
+ export * from './node';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseModal, ManagedEntity, ModalBackground } from '../../../types';
3
+ type BaseNodeProps<T, B> = BaseModal<T, B> & ManagedEntity;
4
+ export declare abstract class BaseNode<T, B> {
5
+ #private;
6
+ readonly id: number;
7
+ readonly initiator: string;
8
+ readonly title?: ReactNode;
9
+ readonly subtitle?: ReactNode;
10
+ readonly background?: ModalBackground<B>;
11
+ readonly manualDestroy: boolean;
12
+ readonly closeOnBackdropClick: boolean;
13
+ get alive(): boolean;
14
+ get visible(): boolean;
15
+ constructor({ id, initiator, title, subtitle, background, manualDestroy, closeOnBackdropClick, resolve, }: BaseNodeProps<T, B>);
16
+ subscribe(listener: Fn): () => void;
17
+ publish(): void;
18
+ protected resolve(result: T | null): void;
19
+ onDestroy(): void;
20
+ onShow(): void;
21
+ onHide(): void;
22
+ abstract onClose(): void;
23
+ abstract onConfirm(): void;
24
+ }
25
+ export {};
26
+ //# sourceMappingURL=AbstractBaseNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AbstractBaseNode.d.ts","sourceRoot":"","sources":["../../../../src/core/node/ModalNode/AbstractBaseNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAE/B,KAAK,aAAa,CAAC,CAAC,EAAE,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC;AAE3D,8BAAsB,QAAQ,CAAC,CAAC,EAAE,CAAC;;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAEzC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IAGvC,IAAI,KAAK,YAER;IAED,IAAI,OAAO,YAEV;gBAKW,EACV,EAAE,EACF,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,aAAqB,EACrB,oBAA2B,EAC3B,OAAO,GACR,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC;IActB,SAAS,CAAC,QAAQ,EAAE,EAAE;IAMtB,OAAO;IAGP,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI;IAGlC,SAAS;IAKT,MAAM;IAKN,MAAM;IAKN,QAAQ,CAAC,OAAO,IAAI,IAAI;IACxB,QAAQ,CAAC,SAAS,IAAI,IAAI;CAC3B"}
@@ -0,0 +1,15 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { AlertContentProps, AlertFooterRender, AlertModal, FooterOptions, ManagedEntity } from '../../../types';
3
+ import { BaseNode } from './AbstractBaseNode';
4
+ type AlertNodeProps<B> = AlertModal<B> & ManagedEntity;
5
+ export declare class AlertNode<B> extends BaseNode<null, B> {
6
+ readonly type: 'alert';
7
+ readonly subtype?: 'info' | 'success' | 'warning' | 'error';
8
+ readonly content?: ReactNode | ComponentType<AlertContentProps>;
9
+ readonly footer?: AlertFooterRender | Pick<FooterOptions, 'confirm' | 'hideConfirm'> | false;
10
+ constructor({ id, initiator, type, subtype, title, subtitle, content, footer, background, manualDestroy, closeOnBackdropClick, resolve, }: AlertNodeProps<B>);
11
+ onClose(): void;
12
+ onConfirm(): void;
13
+ }
14
+ export {};
15
+ //# sourceMappingURL=AlertNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertNode.d.ts","sourceRoot":"","sources":["../../../../src/core/node/ModalNode/AlertNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,KAAK,cAAc,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC;AAEvD,qBAAa,SAAS,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC5D,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAChE,QAAQ,CAAC,MAAM,CAAC,EACZ,iBAAiB,GACjB,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,aAAa,CAAC,GAC9C,KAAK,CAAC;gBAEE,EACV,EAAE,EACF,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,OAAO,GACR,EAAE,cAAc,CAAC,CAAC,CAAC;IAgBpB,OAAO;IAGP,SAAS;CAGV"}
@@ -0,0 +1,15 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { ConfirmContentProps, ConfirmFooterRender, ConfirmModal, FooterOptions, ManagedEntity } from '../../../types';
3
+ import { BaseNode } from './AbstractBaseNode';
4
+ type ConfirmNodeProps<B> = ConfirmModal<B> & ManagedEntity;
5
+ export declare class ConfirmNode<B> extends BaseNode<boolean, B> {
6
+ readonly type: 'confirm';
7
+ readonly subtype?: 'info' | 'success' | 'warning' | 'error';
8
+ readonly content?: ReactNode | ComponentType<ConfirmContentProps>;
9
+ readonly footer?: ConfirmFooterRender | FooterOptions | false;
10
+ constructor({ id, initiator, type, subtype, title, subtitle, content, footer, background, manualDestroy, closeOnBackdropClick, resolve, }: ConfirmNodeProps<B>);
11
+ onClose(): void;
12
+ onConfirm(): void;
13
+ }
14
+ export {};
15
+ //# sourceMappingURL=ConfirmNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmNode.d.ts","sourceRoot":"","sources":["../../../../src/core/node/ModalNode/ConfirmNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,KAAK,gBAAgB,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC;AAE3D,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACtD,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC5D,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAClE,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,aAAa,GAAG,KAAK,CAAC;gBAElD,EACV,EAAE,EACF,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,OAAO,GACR,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAgBtB,OAAO;IAGP,SAAS;CAGV"}
@@ -0,0 +1,20 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { FooterOptions, ManagedEntity, PromptContentProps, PromptFooterRender, PromptInputProps, PromptModal } from '../../../types';
3
+ import { BaseNode } from './AbstractBaseNode';
4
+ type PromptNodeProps<T, B> = PromptModal<T, B> & ManagedEntity;
5
+ export declare class PromptNode<T, B> extends BaseNode<T, B> {
6
+ #private;
7
+ readonly type: 'prompt';
8
+ readonly content?: ReactNode | ComponentType<PromptContentProps>;
9
+ readonly defaultValue: T | undefined;
10
+ readonly Input: (props: PromptInputProps<T>) => ReactNode;
11
+ readonly disabled?: (value: T) => boolean;
12
+ readonly returnOnCancel?: boolean;
13
+ readonly footer?: PromptFooterRender<T> | FooterOptions | false;
14
+ constructor({ id, initiator, type, title, subtitle, content, defaultValue, Input, disabled, returnOnCancel, footer, background, manualDestroy, closeOnBackdropClick, resolve, }: PromptNodeProps<T, B>);
15
+ onChange(value: T): void;
16
+ onConfirm(): void;
17
+ onClose(): void;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=PromptNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptNode.d.ts","sourceRoot":"","sources":["../../../../src/core/node/ModalNode/PromptNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACZ,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC;AAE/D,qBAAa,UAAU,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;;IAClD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACjE,QAAQ,CAAC,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;IAC1C,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,aAAa,GAAG,KAAK,CAAC;gBAGpD,EACV,EAAE,EACF,SAAS,EACT,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,cAAc,EACd,MAAM,EACN,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,OAAO,GACR,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;IAqBxB,QAAQ,CAAC,KAAK,EAAE,CAAC;IAGjB,SAAS;IAGT,OAAO;CAIR"}
@@ -0,0 +1,4 @@
1
+ export { AlertNode } from './AlertNode';
2
+ export { ConfirmNode } from './ConfirmNode';
3
+ export { PromptNode } from './PromptNode';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/node/ModalNode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { nodeFactory } from './nodeFactory';
2
+ export type { ModalNode, AlertNode, ConfirmNode, PromptNode } from './type';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ManagedModal } from '../../types';
2
+ import { AlertNode, ConfirmNode, PromptNode } from './ModalNode';
3
+ export declare const nodeFactory: <T, B>(modal: ManagedModal<T, B>) => AlertNode<B> | ConfirmNode<B> | PromptNode<T, B>;
4
+ //# sourceMappingURL=nodeFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeFactory.d.ts","sourceRoot":"","sources":["../../../src/core/node/nodeFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,CAAC,SAAS,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,qDAW1D,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AlertNode, ConfirmNode, PromptNode } from './ModalNode';
2
+ export type ModalNode<T = any, B = any> = AlertNode<B> | ConfirmNode<B> | PromptNode<T, B>;
3
+ export type { AlertNode, ConfirmNode, PromptNode };
4
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/core/node/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtE,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,IAClC,SAAS,CAAC,CAAC,CAAC,GACZ,WAAW,CAAC,CAAC,CAAC,GACd,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAErB,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const getMillisecondsFromDuration: (input: string) => number;
2
+ //# sourceMappingURL=getMillisecondsFromDuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMillisecondsFromDuration.d.ts","sourceRoot":"","sources":["../../src/helpers/getMillisecondsFromDuration.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B,UAAW,MAAM,WASxD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useActiveModalCount: (tick?: string | number) => number;
2
+ //# sourceMappingURL=useActiveModalCount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useActiveModalCount.d.ts","sourceRoot":"","sources":["../../src/hooks/useActiveModalCount.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,UAAU,MAAM,GAAG,MAAM,WAUxD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const usePathname: () => {
2
+ pathname: string;
3
+ };
4
+ //# sourceMappingURL=useDefaultPathname.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDefaultPathname.d.ts","sourceRoot":"","sources":["../../src/hooks/useDefaultPathname.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;CAuBvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ModalNode } from '../core';
2
+ export declare const useDestroyAfter: (modalId: ModalNode["id"], duration: Duration | number) => void;
3
+ //# sourceMappingURL=useDestroyAfter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDestroyAfter.d.ts","sourceRoot":"","sources":["../../src/hooks/useDestroyAfter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMtD,eAAO,MAAM,eAAe,YACjB,SAAS,CAAC,IAAI,CAAC,YACd,QAAQ,GAAG,MAAM,SAuB5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ModalNode } from '../core';
2
+ export declare const useSubscribeModal: (modal?: ModalNode) => number;
3
+ //# sourceMappingURL=useSubscribeModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSubscribeModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useSubscribeModal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,eAAO,MAAM,iBAAiB,WAAY,SAAS,WAQlD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const useWindowSize: () => {
2
+ width: number;
3
+ height: number;
4
+ };
5
+ //# sourceMappingURL=useWindowSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWindowSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useWindowSize.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;CAWzB,CAAC"}