@lerx/promise-modal 0.1.0 → 0.2.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.
- package/dist/app/ModalManager.d.ts +0 -1
- package/dist/app/constant.d.ts +0 -1
- package/dist/bootstrap/BootstrapProvider/BootstrapProvider.d.ts +0 -1
- package/dist/bootstrap/BootstrapProvider/helpers/bootstrap.d.ts +0 -1
- package/dist/bootstrap/BootstrapProvider/hooks/useInitialize.d.ts +0 -1
- package/dist/bootstrap/BootstrapProvider/index.d.ts +0 -1
- package/dist/bootstrap/BootstrapProvider/type.d.ts +0 -1
- package/dist/bootstrap/BootstrapProvider/useBootstrap.d.ts +0 -1
- package/dist/bootstrap/index.d.ts +0 -1
- package/dist/components/Anchor/Anchor.d.ts +0 -1
- package/dist/components/Anchor/classNames.emotion.d.ts +0 -1
- package/dist/components/Anchor/index.d.ts +0 -1
- package/dist/components/Background/Background.d.ts +0 -1
- package/dist/components/Background/classNames.emotion.d.ts +0 -1
- package/dist/components/Background/index.d.ts +0 -1
- package/dist/components/FallbackComponents/FallbackContent.d.ts +0 -1
- package/dist/components/FallbackComponents/FallbackFooter.d.ts +0 -1
- package/dist/components/FallbackComponents/FallbackForegroundFrame.d.ts +0 -1
- package/dist/components/FallbackComponents/FallbackSubtitle.d.ts +0 -1
- package/dist/components/FallbackComponents/FallbackTitle.d.ts +0 -1
- package/dist/components/FallbackComponents/classNames.emotion.d.ts +0 -1
- package/dist/components/FallbackComponents/index.d.ts +0 -1
- package/dist/components/Foreground/Foreground.d.ts +0 -1
- package/dist/components/Foreground/classNames.emotion.d.ts +0 -1
- package/dist/components/Foreground/components/AlertInner.d.ts +0 -1
- package/dist/components/Foreground/components/ConfirmInner.d.ts +0 -1
- package/dist/components/Foreground/components/PromptInner.d.ts +0 -1
- package/dist/components/Foreground/components/index.d.ts +0 -1
- package/dist/components/Foreground/index.d.ts +0 -1
- package/dist/components/Presenter/Presenter.d.ts +0 -1
- package/dist/components/Presenter/classNames.emotion.d.ts +0 -1
- package/dist/components/Presenter/index.d.ts +0 -1
- package/dist/core/handle/alert.d.ts +0 -1
- package/dist/core/handle/confirm.d.ts +0 -1
- package/dist/core/handle/index.d.ts +0 -1
- package/dist/core/handle/prompt.d.ts +0 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/node/ModalNode/AbstractNode.d.ts +0 -1
- package/dist/core/node/ModalNode/AlertNode.d.ts +0 -1
- package/dist/core/node/ModalNode/ConfirmNode.d.ts +0 -1
- package/dist/core/node/ModalNode/PromptNode.d.ts +0 -1
- package/dist/core/node/ModalNode/index.d.ts +0 -1
- package/dist/core/node/index.d.ts +0 -1
- package/dist/core/node/nodeFactory.d.ts +0 -1
- package/dist/core/node/type.d.ts +0 -1
- package/dist/hooks/useActiveModalCount.d.ts +0 -1
- package/dist/hooks/useDefaultPathname.d.ts +0 -1
- package/dist/hooks/useDestroyAfter.d.ts +0 -1
- package/dist/hooks/useModalAnimation.d.ts +0 -1
- package/dist/hooks/useSubscribeModal.d.ts +0 -1
- package/dist/index.cjs +966 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +953 -0
- package/dist/providers/ConfigurationContext/ConfigurationContext.d.ts +0 -1
- package/dist/providers/ConfigurationContext/ConfigurationContextProvider.d.ts +4 -1
- package/dist/providers/ConfigurationContext/index.d.ts +0 -1
- package/dist/providers/ConfigurationContext/useConfigurationContext.d.ts +0 -1
- package/dist/providers/ModalManagerContext/ModalManagerContext.d.ts +0 -1
- package/dist/providers/ModalManagerContext/ModalManagerContextProvider.d.ts +0 -1
- package/dist/providers/ModalManagerContext/index.d.ts +0 -1
- package/dist/providers/ModalManagerContext/useModalManagerContext.d.ts +0 -1
- package/dist/providers/UserDefinedContext/UserDefinedContext.d.ts +0 -1
- package/dist/providers/UserDefinedContext/UserDefinedContextProvider.d.ts +2 -2
- package/dist/providers/UserDefinedContext/index.d.ts +0 -1
- package/dist/providers/UserDefinedContext/useUserDefinedContext.d.ts +0 -1
- package/dist/providers/index.d.ts +0 -1
- package/dist/types/alert.d.ts +0 -1
- package/dist/types/background.d.ts +0 -1
- package/dist/types/base.d.ts +0 -1
- package/dist/types/confirm.d.ts +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/modal.d.ts +0 -1
- package/dist/types/prompt.d.ts +0 -1
- package/package.json +19 -31
- package/dist/app/ModalManager.d.ts.map +0 -1
- package/dist/app/constant.d.ts.map +0 -1
- package/dist/bootstrap/BootstrapProvider/BootstrapProvider.d.ts.map +0 -1
- package/dist/bootstrap/BootstrapProvider/helpers/bootstrap.d.ts.map +0 -1
- package/dist/bootstrap/BootstrapProvider/hooks/useInitialize.d.ts.map +0 -1
- package/dist/bootstrap/BootstrapProvider/index.d.ts.map +0 -1
- package/dist/bootstrap/BootstrapProvider/type.d.ts.map +0 -1
- package/dist/bootstrap/BootstrapProvider/useBootstrap.d.ts.map +0 -1
- package/dist/bootstrap/index.d.ts.map +0 -1
- package/dist/components/Anchor/Anchor.d.ts.map +0 -1
- package/dist/components/Anchor/classNames.emotion.d.ts.map +0 -1
- package/dist/components/Anchor/index.d.ts.map +0 -1
- package/dist/components/Background/Background.d.ts.map +0 -1
- package/dist/components/Background/classNames.emotion.d.ts.map +0 -1
- package/dist/components/Background/index.d.ts.map +0 -1
- package/dist/components/FallbackComponents/FallbackContent.d.ts.map +0 -1
- package/dist/components/FallbackComponents/FallbackFooter.d.ts.map +0 -1
- package/dist/components/FallbackComponents/FallbackForegroundFrame.d.ts.map +0 -1
- package/dist/components/FallbackComponents/FallbackSubtitle.d.ts.map +0 -1
- package/dist/components/FallbackComponents/FallbackTitle.d.ts.map +0 -1
- package/dist/components/FallbackComponents/classNames.emotion.d.ts.map +0 -1
- package/dist/components/FallbackComponents/index.d.ts.map +0 -1
- package/dist/components/Foreground/Foreground.d.ts.map +0 -1
- package/dist/components/Foreground/classNames.emotion.d.ts.map +0 -1
- package/dist/components/Foreground/components/AlertInner.d.ts.map +0 -1
- package/dist/components/Foreground/components/ConfirmInner.d.ts.map +0 -1
- package/dist/components/Foreground/components/PromptInner.d.ts.map +0 -1
- package/dist/components/Foreground/components/index.d.ts.map +0 -1
- package/dist/components/Foreground/index.d.ts.map +0 -1
- package/dist/components/Presenter/Presenter.d.ts.map +0 -1
- package/dist/components/Presenter/classNames.emotion.d.ts.map +0 -1
- package/dist/components/Presenter/index.d.ts.map +0 -1
- package/dist/core/handle/alert.d.ts.map +0 -1
- package/dist/core/handle/confirm.d.ts.map +0 -1
- package/dist/core/handle/index.d.ts.map +0 -1
- package/dist/core/handle/prompt.d.ts.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/node/ModalNode/AbstractNode.d.ts.map +0 -1
- package/dist/core/node/ModalNode/AlertNode.d.ts.map +0 -1
- package/dist/core/node/ModalNode/ConfirmNode.d.ts.map +0 -1
- package/dist/core/node/ModalNode/PromptNode.d.ts.map +0 -1
- package/dist/core/node/ModalNode/index.d.ts.map +0 -1
- package/dist/core/node/index.d.ts.map +0 -1
- package/dist/core/node/nodeFactory.d.ts.map +0 -1
- package/dist/core/node/type.d.ts.map +0 -1
- package/dist/hooks/useActiveModalCount.d.ts.map +0 -1
- package/dist/hooks/useDefaultPathname.d.ts.map +0 -1
- package/dist/hooks/useDestroyAfter.d.ts.map +0 -1
- package/dist/hooks/useModalAnimation.d.ts.map +0 -1
- package/dist/hooks/useSubscribeModal.d.ts.map +0 -1
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.esm.js +0 -2
- package/dist/index.esm.js.map +0 -1
- package/dist/providers/ConfigurationContext/ConfigurationContext.d.ts.map +0 -1
- package/dist/providers/ConfigurationContext/ConfigurationContextProvider.d.ts.map +0 -1
- package/dist/providers/ConfigurationContext/index.d.ts.map +0 -1
- package/dist/providers/ConfigurationContext/useConfigurationContext.d.ts.map +0 -1
- package/dist/providers/ModalManagerContext/ModalManagerContext.d.ts.map +0 -1
- package/dist/providers/ModalManagerContext/ModalManagerContextProvider.d.ts.map +0 -1
- package/dist/providers/ModalManagerContext/index.d.ts.map +0 -1
- package/dist/providers/ModalManagerContext/useModalManagerContext.d.ts.map +0 -1
- package/dist/providers/UserDefinedContext/UserDefinedContext.d.ts.map +0 -1
- package/dist/providers/UserDefinedContext/UserDefinedContextProvider.d.ts.map +0 -1
- package/dist/providers/UserDefinedContext/index.d.ts.map +0 -1
- package/dist/providers/UserDefinedContext/useUserDefinedContext.d.ts.map +0 -1
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/types/alert.d.ts.map +0 -1
- package/dist/types/background.d.ts.map +0 -1
- package/dist/types/base.d.ts.map +0 -1
- package/dist/types/confirm.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/modal.d.ts.map +0 -1
- package/dist/types/prompt.d.ts.map +0 -1
|
@@ -9,11 +9,14 @@ export interface ConfigurationContextProviderProps {
|
|
|
9
9
|
ContentComponent?: ComponentType<WrapperComponentProps>;
|
|
10
10
|
FooterComponent?: ComponentType<FooterComponentProps>;
|
|
11
11
|
options?: {
|
|
12
|
+
/** Modal transition time(ms, s) */
|
|
12
13
|
duration?: Duration;
|
|
14
|
+
/** Modal backdrop color */
|
|
13
15
|
backdrop?: Color;
|
|
16
|
+
/** Whether to destroy the modal manually */
|
|
14
17
|
manualDestroy?: boolean;
|
|
18
|
+
/** Whether to close the modal when the backdrop is clicked */
|
|
15
19
|
closeOnBackdropClick?: boolean;
|
|
16
20
|
};
|
|
17
21
|
}
|
|
18
22
|
export declare const ConfigurationContextProvider: import("react").MemoExoticComponent<({ ForegroundComponent, BackgroundComponent, TitleComponent, SubtitleComponent, ContentComponent, FooterComponent, options, children, }: PropsWithChildren<ConfigurationContextProviderProps>) => import("react/jsx-runtime").JSX.Element>;
|
|
19
|
-
//# sourceMappingURL=ConfigurationContextProvider.d.ts.map
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { ConfigurationContextProvider, type ConfigurationContextProviderProps, } from './ConfigurationContextProvider';
|
|
2
2
|
export { useConfigurationContext, useConfigurationOptions, useConfigurationDuration, useConfigurationBackdrop, } from './useConfigurationContext';
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -7,4 +7,3 @@ interface ModalManagerContextProviderProps {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const ModalManagerContextProvider: import("react").MemoExoticComponent<({ usePathname, children, }: PropsWithChildren<ModalManagerContextProviderProps>) => import("react/jsx-runtime").JSX.Element>;
|
|
9
9
|
export {};
|
|
10
|
-
//# sourceMappingURL=ModalManagerContextProvider.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { ManagedModal } from '../../types';
|
|
2
2
|
export declare const useModalManagerContext: () => import("./ModalManagerContext").ModalManagerContextProps;
|
|
3
3
|
export declare const useModal: (id: ManagedModal["id"]) => import("../../types").ModalActions;
|
|
4
|
-
//# sourceMappingURL=useModalManagerContext.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import type { Dictionary } from '../../@aileron/declare';
|
|
3
3
|
interface UserDefinedContextProviderProps {
|
|
4
|
+
/** User defined context */
|
|
4
5
|
context?: Dictionary;
|
|
5
6
|
}
|
|
6
7
|
export declare const UserDefinedContextProvider: ({ context, children, }: PropsWithChildren<UserDefinedContextProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
8
|
-
//# sourceMappingURL=UserDefinedContextProvider.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { useModalManagerContext, useModal } from './ModalManagerContext';
|
|
2
2
|
export { useConfigurationContext, useConfigurationOptions, useConfigurationDuration, useConfigurationBackdrop, } from './ConfigurationContext';
|
|
3
3
|
export { useUserDefinedContext } from './UserDefinedContext';
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/types/alert.d.ts
CHANGED
|
@@ -12,4 +12,3 @@ export interface AlertModal<B = any, Context extends Dictionary = object> extend
|
|
|
12
12
|
content?: ReactNode | ComponentType<AlertContentProps<Context>>;
|
|
13
13
|
footer?: AlertFooterRender<Context> | Pick<FooterOptions, 'confirm' | 'hideConfirm'> | false;
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=alert.d.ts.map
|
package/dist/types/base.d.ts
CHANGED
package/dist/types/confirm.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
package/dist/types/modal.d.ts
CHANGED
package/dist/types/prompt.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lerx/promise-modal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/vincent-kk/albatrion.git",
|
|
7
|
-
"directory": "packages/promise-modal"
|
|
7
|
+
"directory": "packages/lerx/promise-modal"
|
|
8
8
|
},
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"author": {
|
|
@@ -15,27 +15,26 @@
|
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
|
+
"source": "./src/index.ts",
|
|
18
19
|
"types": "./dist/index.d.ts",
|
|
19
|
-
"import": "./dist/index.
|
|
20
|
-
"require": "./dist/index.cjs
|
|
20
|
+
"import": "./dist/index.mjs",
|
|
21
|
+
"require": "./dist/index.cjs"
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
|
-
"main": "dist/index.cjs
|
|
24
|
-
"module": "dist/index.
|
|
24
|
+
"main": "dist/index.cjs",
|
|
25
|
+
"module": "dist/index.mjs",
|
|
25
26
|
"types": "dist/index.d.ts",
|
|
26
27
|
"files": [
|
|
27
28
|
"dist",
|
|
28
29
|
"README.md"
|
|
29
30
|
],
|
|
30
31
|
"scripts": {
|
|
31
|
-
"build": "
|
|
32
|
+
"build": "rollup -c && yarn build:types",
|
|
32
33
|
"build-storybook": "storybook build",
|
|
33
|
-
"build:
|
|
34
|
-
"clean": "rm -rf dist",
|
|
34
|
+
"build:types": "tsc -p ./tsconfig.declarations.json && tsc-alias -p ./tsconfig.declarations.json",
|
|
35
35
|
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.tsx\"",
|
|
36
|
-
"lint": "eslint \"src/**/*.{ts,tsx}\"
|
|
36
|
+
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
|
37
37
|
"make-dependency-graph": "npx depcruise src --config .dependency-cruiser.js --output-type dot > dependency-graph.dot && dot -Tpng dependency-graph.dot -o dependency-graph.png",
|
|
38
|
-
"publish:chain": "yarn build:chain && yarn npm publish --access public",
|
|
39
38
|
"publish:npm": "yarn build && yarn npm publish --access public",
|
|
40
39
|
"size-limit": "size-limit",
|
|
41
40
|
"start": "yarn build && yarn storybook",
|
|
@@ -48,18 +47,15 @@
|
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
49
|
"@emotion/css": "^11.0.0",
|
|
51
|
-
"@winglet/common-utils": "^0.
|
|
52
|
-
"@winglet/react-utils": "^0.
|
|
50
|
+
"@winglet/common-utils": "^0.2.0",
|
|
51
|
+
"@winglet/react-utils": "^0.2.0"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
|
-
"@babel/core": "^7.26.0",
|
|
56
54
|
"@chromatic-com/storybook": "^3.2.6",
|
|
57
|
-
"@emotion/babel-plugin": "^11.13.5",
|
|
58
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
59
55
|
"@rollup/plugin-commonjs": "^28.0.1",
|
|
60
56
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
61
|
-
"@rollup/plugin-replace": "^6.0.1",
|
|
62
57
|
"@rollup/plugin-terser": "^0.4.4",
|
|
58
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
63
59
|
"@size-limit/preset-app": "^11.1.6",
|
|
64
60
|
"@size-limit/preset-big-lib": "^11.1.6",
|
|
65
61
|
"@size-limit/preset-small-lib": "^11.1.6",
|
|
@@ -76,30 +72,22 @@
|
|
|
76
72
|
"@types/react": "^19.0.0",
|
|
77
73
|
"@types/react-dom": "^19.0.0",
|
|
78
74
|
"@types/rollup-plugin-peer-deps-external": "^2.2.5",
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "^8.14.0",
|
|
80
|
-
"@typescript-eslint/parser": "^8.14.0",
|
|
81
75
|
"antd": "^5.22.5",
|
|
82
76
|
"dependency-cruiser": "^16.7.0",
|
|
83
|
-
"eslint": "^8.56.0",
|
|
84
|
-
"eslint-plugin-react": "^7.37.2",
|
|
85
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
86
|
-
"eslint-plugin-react-refresh": "^0.4.14",
|
|
87
|
-
"eslint-plugin-storybook": "^0.12.0",
|
|
88
77
|
"jsdom": "^25.0.1",
|
|
89
|
-
"prettier": "^3.
|
|
78
|
+
"prettier": "^3.5.3",
|
|
90
79
|
"react": "^19.0.0",
|
|
91
80
|
"react-dom": "^19.0.0",
|
|
92
|
-
"rollup": "^4.
|
|
81
|
+
"rollup": "^4.42.0",
|
|
93
82
|
"rollup-plugin-copy": "^3.5.0",
|
|
94
83
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
95
|
-
"rollup-plugin-typescript2": "^0.36.0",
|
|
96
84
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
97
|
-
"size-limit": "^11.
|
|
85
|
+
"size-limit": "^11.2.0",
|
|
98
86
|
"storybook": "^8.6.14",
|
|
99
|
-
"tsc-alias": "^1.8.
|
|
87
|
+
"tsc-alias": "^1.8.16",
|
|
100
88
|
"typescript": "^5.7.2",
|
|
101
|
-
"vite": "^
|
|
102
|
-
"vitest": "
|
|
89
|
+
"vite": "^6.3.5",
|
|
90
|
+
"vitest": "2.1.9"
|
|
103
91
|
},
|
|
104
92
|
"peerDependencies": {
|
|
105
93
|
"react": ">=18 <20",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModalManager.d.ts","sourceRoot":"","sources":["../../src/app/ModalManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,qBAAa,YAAY;;IAEvB,MAAM,CAAC,QAAQ;IAMf,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;QACtB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,WAAW,CAAC;KACpB,GAAG,WAAW;IAkBf,MAAM,KAAK,SAAS,YAEnB;IAID,MAAM,KAAK,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,EAGhD;IAED,MAAM,KAAK,UAAU,YAEpB;IAED,MAAM,CAAC,KAAK;IAQZ,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK;CAGzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/app/constant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAExD,eAAO,MAAM,0BAA0B,EAAE,QAAkB,CAAC;AAE5D,eAAO,MAAM,sBAAsB,EAAE,KAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BootstrapProvider.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/BootstrapProvider/BootstrapProvider.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAA0B,MAAM,QAAQ,CAAC;AAE9E,eAAO,MAAM,iBAAiB;;;;;;;;2DAiE7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/BootstrapProvider/helpers/bootstrap.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,gDAAgD,CAAC;AAIxD,UAAU,cAAe,SAAQ,iCAAiC;IAChE,WAAW,EAAE,EAAE,CAAC,EAAE,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,GAAI,4JAWvB,cAAc,gCAkBd,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useInitialize.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/BootstrapProvider/hooks/useInitialize.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;uCAMd,WAAW;CAuBtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/BootstrapProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/BootstrapProvider/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gDAAgD,CAAC;AAExG,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CAC3B,GAAG,iCAAiC,CAAC;AAEtC,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;CAC/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBootstrap.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/BootstrapProvider/useBootstrap.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAErD,eAAO,MAAM,YAAY,GAAI,gLAW1B,sBAAsB,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;CAAO;;0BAgB/C,WAAW;CAsBxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bootstrap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.d.ts","sourceRoot":"","sources":["../../../src/components/Anchor/Anchor.tsx"],"names":[],"mappings":"AA6CA,eAAO,MAAM,MAAM,oIAAuC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classNames.emotion.d.ts","sourceRoot":"","sources":["../../../src/components/Anchor/classNames.emotion.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,QAOjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Anchor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../src/components/Background/Background.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,eAAO,MAAM,eAAe,GAAI,6BAG7B,eAAe,mDAgDjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classNames.emotion.d.ts","sourceRoot":"","sources":["../../../src/components/Background/classNames.emotion.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,QAOrB,CAAC;AACH,eAAO,MAAM,MAAM,QAOjB,CAAC;AACH,eAAO,MAAM,OAAO,QAOlB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Background/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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,GAAI,cAAc,iBAAiB,4CAE9D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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,GAAI,wFAQ5B,oBAAoB,4CActB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,GAAI,cAAc,iBAAiB,4CAE/D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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,GAAI,cAAc,iBAAiB,4CAE5D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classNames.emotion.d.ts","sourceRoot":"","sources":["../../../src/components/FallbackComponents/classNames.emotion.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,QAOnB,CAAC;AACH,eAAO,MAAM,KAAK,QAOhB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Foreground.d.ts","sourceRoot":"","sources":["../../../src/components/Foreground/Foreground.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK7D,eAAO,MAAM,eAAe,GAAI,6BAG7B,eAAe,mDAmDjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classNames.emotion.d.ts","sourceRoot":"","sources":["../../../src/components/Foreground/classNames.emotion.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,QAOrB,CAAC;AACH,eAAO,MAAM,MAAM,QAOjB,CAAC;AACH,eAAO,MAAM,OAAO,QAOlB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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;AAKtD,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,8CA2D7C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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;AAKxD,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,8CAkE/C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PromptInner.d.ts","sourceRoot":"","sources":["../../../../src/components/Foreground/components/PromptInner.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD,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,8CAuHnD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Foreground/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Presenter.d.ts","sourceRoot":"","sources":["../../../src/components/Presenter/Presenter.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,eAAO,MAAM,SAAS,oDAAsB,YAAY,6CAetD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classNames.emotion.d.ts","sourceRoot":"","sources":["../../../src/components/Presenter/classNames.emotion.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,QAOpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Presenter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,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,CAAC,EAAE,SAAS,CAAC;IAClB,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,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I,CAAC,GAAG,GAAG,EAAE,mJAY9B,YAAY,CAAC,CAAC,CAAC,qBAsBjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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;AAGtD,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAE/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,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,yLAehC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,eAyBnB,CAAC"}
|
package/dist/core/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractNode.d.ts","sourceRoot":"","sources":["../../../../src/core/node/ModalNode/AbstractNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,KAAK,EACV,mBAAmB,EACnB,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAE/B,KAAK,iBAAiB,CAAC,CAAC,EAAE,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC;AAE/D,8BAAsB,YAAY,CAAC,CAAC,EAAE,CAAC;;IACrC,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,QAA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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;gBAIpD,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,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,OAAO,EACP,mBAAmB,EACnB,mBAAmB,GACpB,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;IAwBxB,QAAQ,CAAC,KAAK,EAAE,CAAC;IAGjB,SAAS;IAGT,OAAO;CAIR"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,EAAE,OAAO,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,qDAW1D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveModalCount.d.ts","sourceRoot":"","sources":["../../src/hooks/useActiveModalCount.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAKtD,eAAO,MAAM,mBAAmB,GAC9B,WAAU,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,GAAG,SAAS,CAAmB,EACjE,aAAY,MAAM,GAAG,MAAU,WAWhC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDefaultPathname.d.ts","sourceRoot":"","sources":["../../src/hooks/useDefaultPathname.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;CAkBvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDestroyAfter.d.ts","sourceRoot":"","sources":["../../src/hooks/useDestroyAfter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAKtD,eAAO,MAAM,eAAe,GAC1B,SAAS,SAAS,CAAC,IAAI,CAAC,EACxB,UAAU,QAAQ,GAAG,MAAM,SAuB5B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useModalAnimation.d.ts","sourceRoot":"","sources":["../../src/hooks/useModalAnimation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE3C,UAAU,qBAAqB;IAC7B,SAAS,CAAC,EAAE,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,EAAE,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB,GAC5B,SAAS,OAAO,EAChB,SAAS,qBAAqB,SAc/B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSubscribeModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useSubscribeModal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,eAAO,MAAM,iBAAiB,GAAI,QAAQ,SAAS,WAQlD,CAAC"}
|
package/dist/index.cjs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),n=require("react"),o=require("@winglet/common-utils"),t=require("@winglet/react-utils"),r=require("@emotion/css"),i=require("react-dom");class s{static#e=!1;static activate(){return!s.#e&&(s.#e=!0)}static#n=null;static anchor(e){if(s.#n){const e=document.getElementById(s.#n.id);if(e)return e}const{tag:n="div",prefix:t="promise-modal",root:r=document.body}=e||{},i=document.createElement(n);return i.setAttribute("id",`${t}-${o.getRandomString(36)}`),r.appendChild(i),s.#n=i,i}static#o=[];static get prerender(){return s.#o}static#t=e=>s.#o.push(e);static set openHandler(e){s.#t=e,s.#o=[]}static get unanchored(){return!s.#n}static reset(){s.#e=!1,s.#n=null,s.#o=[],s.#t=e=>s.#o.push(e)}static open(e){s.#t(e)}}class a{id;initiator;title;subtitle;background;manualDestroy;closeOnBackdropClick;dimmed;ForegroundComponent;BackgroundComponent;#r;get alive(){return this.#r}#i;get visible(){return this.#i}#s;#a=new Set;constructor({id:e,initiator:n,title:o,subtitle:t,background:r,dimmed:i=!0,manualDestroy:s=!1,closeOnBackdropClick:a=!0,resolve:l,ForegroundComponent:c,BackgroundComponent:u}){this.id=e,this.initiator=n,this.title=o,this.subtitle=t,this.background=r,this.dimmed=i,this.manualDestroy=s,this.closeOnBackdropClick=a,this.ForegroundComponent=c,this.BackgroundComponent=u,this.#r=!0,this.#i=!0,this.#s=l}subscribe(e){return this.#a.add(e),()=>{this.#a.delete(e)}}publish(){for(const e of this.#a)e()}resolve(e){this.#s(e)}onDestroy(){const e=!0===this.#r;this.#r=!1,this.manualDestroy&&e&&this.publish()}onShow(){const e=!1===this.#i;this.#i=!0,e&&this.publish()}onHide(){const e=!0===this.#i;this.#i=!1,e&&this.publish()}}class l extends a{type;subtype;content;footer;constructor({id:e,initiator:n,type:o,subtype:t,title:r,subtitle:i,content:s,footer:a,background:l,dimmed:c,manualDestroy:u,closeOnBackdropClick:d,resolve:m,ForegroundComponent:p,BackgroundComponent:C}){super({id:e,initiator:n,title:r,subtitle:i,background:l,dimmed:c,manualDestroy:u,closeOnBackdropClick:d,resolve:m,ForegroundComponent:p,BackgroundComponent:C}),this.type=o,this.subtype=t,this.content=s,this.footer=a}onClose(){this.resolve(null)}onConfirm(){this.resolve(null)}}class c extends a{type;subtype;content;footer;constructor({id:e,initiator:n,type:o,subtype:t,title:r,subtitle:i,content:s,footer:a,background:l,dimmed:c,manualDestroy:u,closeOnBackdropClick:d,resolve:m,ForegroundComponent:p,BackgroundComponent:C}){super({id:e,initiator:n,title:r,subtitle:i,background:l,dimmed:c,manualDestroy:u,closeOnBackdropClick:d,resolve:m,ForegroundComponent:p,BackgroundComponent:C}),this.type=o,this.subtype=t,this.content=s,this.footer=a}onClose(){this.resolve(!1)}onConfirm(){this.resolve(!0)}}class u extends a{type;content;defaultValue;Input;disabled;returnOnCancel;footer;#l;constructor({id:e,initiator:n,type:o,title:t,subtitle:r,content:i,defaultValue:s,Input:a,disabled:l,returnOnCancel:c,footer:u,background:d,dimmed:m,manualDestroy:p,closeOnBackdropClick:C,resolve:h,ForegroundComponent:f,BackgroundComponent:g}){super({id:e,initiator:n,title:t,subtitle:r,background:d,dimmed:m,manualDestroy:p,closeOnBackdropClick:C,resolve:h,ForegroundComponent:f,BackgroundComponent:g}),this.type=o,this.content=i,this.Input=a,this.defaultValue=s,this.#l=s,this.disabled=l,this.returnOnCancel=c,this.footer=u}onChange(e){this.#l=e}onConfirm(){this.resolve(this.#l??null)}onClose(){this.returnOnCancel?this.resolve(this.#l??null):this.resolve(null)}}const d=e=>{switch(e.type){case"alert":return new l(e);case"confirm":return new c(e);case"prompt":return new u(e)}throw new Error(`Unknown modal: ${e.type}`,{modal:e})},m=n.createContext({}),p=n.memo((({usePathname:r,children:i})=>{const a=n.useRef(new Map),[l,c]=n.useState([]),u=t.useReference(l),{pathname:p}=r(),C=n.useRef(p),h=n.useRef(0),f=S(),g=n.useMemo((()=>o.convertMsFromDuration(f.duration)),[f]);t.useOnMountLayout((()=>{const{manualDestroy:e,closeOnBackdropClick:n}=f;for(const o of s.prerender){const t=d({...o,id:h.current++,initiator:C.current,manualDestroy:void 0!==o.manualDestroy?o.manualDestroy:e,closeOnBackdropClick:void 0!==o.closeOnBackdropClick?o.closeOnBackdropClick:n});a.current.set(t.id,t),c((e=>[...e,t.id]))}return s.openHandler=o=>{const t=d({...o,id:h.current++,initiator:C.current,manualDestroy:void 0!==o.manualDestroy?o.manualDestroy:e,closeOnBackdropClick:void 0!==o.closeOnBackdropClick?o.closeOnBackdropClick:n});a.current.set(t.id,t),c((e=>{const n=[];for(let o=0;o<e.length;o++){const t=e[o];a.current.get(t)?.alive?n.push(t):a.current.delete(t)}return[...n,t.id]}))},()=>{s.reset()}})),n.useLayoutEffect((()=>{for(const e of u.current){const n=a.current.get(e);n?.alive&&(n.initiator===p?n.onShow():n.onHide())}C.current=p}),[p]);const b=n.useCallback((e=>a.current.get(e)),[]),v=n.useCallback((e=>{const n=a.current.get(e);n&&(n.onDestroy(),y.current?.())}),[]),y=n.useRef(void 0),x=n.useCallback((e=>{const n=a.current.get(e);n&&(n.onHide(),y.current?.(),n.manualDestroy||setTimeout((()=>{n.onDestroy()}),g))}),[g]),k=n.useCallback(((e,n)=>{const o=a.current.get(e);o&&"prompt"===o.type&&o.onChange(n)}),[]),j=n.useCallback((e=>{const n=a.current.get(e);n&&(n.onConfirm(),x(e))}),[x]),B=n.useCallback((e=>{const n=a.current.get(e);n&&(n.onClose(),x(e))}),[x]),D=n.useCallback((e=>({modal:b(e),onConfirm:()=>j(e),onClose:()=>B(e),onChange:n=>k(e,n),onDestroy:()=>v(e)})),[b,j,B,k,v]),O=n.useMemo((()=>({modalIds:l,getModalNode:b,onChange:k,onConfirm:j,onClose:B,onDestroy:v,getModal:D,setUpdater:e=>{y.current=e}})),[l,D,b,k,j,B,v]);return e.jsx(m.Provider,{value:O,children:i})})),C=()=>n.useContext(m),h=e=>{const{getModal:o}=C();return n.useMemo((()=>o(e)),[e,o])};function f(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}const g=r.css("production"===process.env.NODE_ENV?{name:"131j9g2",styles:"margin:unset"}:{name:"1w3kbco-fallback",styles:"margin:unset;label:fallback;",toString:f}),b=r.css("production"===process.env.NODE_ENV?{name:"1kuk3a3",styles:"display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:white;padding:20px 80px;gap:10px;border:1px solid black"}:{name:"16dbbea-frame",styles:"display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:white;padding:20px 80px;gap:10px;border:1px solid black;label:frame;",toString:f}),v=({children:n})=>e.jsx("h2",{className:g,children:n}),y=({children:n})=>e.jsx("h3",{className:g,children:n}),x=({children:n})=>e.jsx("div",{className:g,children:n}),k=({confirmLabel:n,hideConfirm:o=!1,cancelLabel:t,hideCancel:r=!1,disabled:i,onConfirm:s,onCancel:a})=>e.jsxs("div",{children:[!o&&e.jsx("button",{onClick:s,disabled:i,children:n||"Confirm"}),!r&&"function"==typeof a&&e.jsx("button",{onClick:a,children:t||"Cancel"})]}),j=e=>e?.visible,B=(e=j,o=0)=>{const{modalIds:t,getModalNode:r}=C();return n.useMemo((()=>{let n=0;for(const o of t)e(r(o))&&n++;return n}),[r,t,o])},D=n.forwardRef((({id:o,onChangeOrder:t,children:r},i)=>{const s=B(),[a,l]=n.useMemo((()=>{const e=s>1;return[e?Math.floor(o/5)%3*100:0,e?o%5*35:0]}),[s,o]);return e.jsx("div",{ref:i,className:b,onClick:t,style:{marginBottom:`calc(25vh + ${a}px)`,marginLeft:`${a}px`,transform:`translate(${l}px, ${l}px)`},children:r})})),O=n.createContext({}),F=n.memo((({ForegroundComponent:o,BackgroundComponent:t,TitleComponent:r,SubtitleComponent:i,ContentComponent:s,FooterComponent:a,options:l,children:c})=>{const u=n.useMemo((()=>({BackgroundComponent:t,ForegroundComponent:o||D,TitleComponent:r||v,SubtitleComponent:i||y,ContentComponent:n.memo(s||x),FooterComponent:n.memo(a||k),options:{duration:"300ms",backdrop:"rgba(0, 0, 0, 0.5)",closeOnBackdropClick:!0,manualDestroy:!1,...l}})),[o,t,s,a,i,r,l]);return e.jsx(O.Provider,{value:u,children:c})})),M=()=>n.useContext(O),S=()=>n.useContext(O).options,w=n.createContext({}),N=({context:o,children:t})=>{const r=n.useMemo((()=>({context:o||{}})),[o]);return e.jsx(w.Provider,{value:r,children:t})},E=()=>n.useContext(w),I=()=>{const[e,o]=n.useState(window.location.pathname);return n.useLayoutEffect((()=>{let n;const t=()=>{n&&cancelAnimationFrame(n),e!==window.location.pathname?o(window.location.pathname):n=requestAnimationFrame(t)};return n=requestAnimationFrame(t),()=>{n&&cancelAnimationFrame(n)}}),[e]),{pathname:e}};function V(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}const P=r.css("production"===process.env.NODE_ENV?{name:"u7uu4v",styles:"display:none;position:fixed;inset:0;z-index:-999;pointer-events:none;>*{pointer-events:none;}"}:{name:"coymdj-background",styles:"display:none;position:fixed;inset:0;z-index:-999;pointer-events:none;>*{pointer-events:none;};label:background;",toString:V}),L=r.css("production"===process.env.NODE_ENV?{name:"n07k1x",styles:"pointer-events:all"}:{name:"1hektcs-active",styles:"pointer-events:all;label:active;",toString:V}),z=r.css("production"===process.env.NODE_ENV?{name:"1wnowod",styles:"display:flex;align-items:center;justify-content:center"}:{name:"xppew7-visible",styles:"display:flex;align-items:center;justify-content:center;label:visible;",toString:V}),H=({modalId:o,onChangeOrder:t})=>{const{BackgroundComponent:i}=M(),{context:s}=E(),{modal:a,onClose:l,onChange:c,onConfirm:u,onDestroy:d}=h(o),m=n.useCallback((e=>{a&&a.closeOnBackdropClick&&a.visible&&l(),e.stopPropagation()}),[a,l]),p=n.useMemo((()=>a?.BackgroundComponent||i),[i,a]);return a?e.jsx("div",{className:r.cx(P,{[z]:a.manualDestroy?a.alive:a.visible,[L]:a.closeOnBackdropClick&&a.visible}),onClick:m,children:p&&e.jsx(p,{id:a.id,type:a.type,alive:a.alive,visible:a.visible,initiator:a.initiator,manualDestroy:a.manualDestroy,closeOnBackdropClick:a.closeOnBackdropClick,background:a.background,onChange:c,onConfirm:u,onClose:l,onDestroy:d,onChangeOrder:t,context:s})}):null};function R(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}const T=r.css("production"===process.env.NODE_ENV?{name:"12g0hx0",styles:"pointer-events:none;display:none;position:fixed;inset:0;z-index:1"}:{name:"1hcczik-foreground",styles:"pointer-events:none;display:none;position:fixed;inset:0;z-index:1;label:foreground;",toString:R}),q=r.css("production"===process.env.NODE_ENV?{name:"1g95xyq",styles:">*{pointer-events:all;}"}:{name:"123csva-active",styles:">*{pointer-events:all;};label:active;",toString:R}),A=r.css("production"===process.env.NODE_ENV?{name:"1fmljv2",styles:"display:flex!important;justify-content:center;align-items:center"}:{name:"1p4unab-visible",styles:"display:flex!important;justify-content:center;align-items:center;label:visible;",toString:R}),_=n.memo((({modal:r,handlers:i})=>{const{title:s,subtitle:a,content:l,footer:c}=n.useMemo((()=>r),[r]),{context:u}=E(),{onConfirm:d}=n.useMemo((()=>i),[i]),m=t.useHandle(d),{TitleComponent:p,SubtitleComponent:C,ContentComponent:h,FooterComponent:f}=M();return e.jsxs(n.Fragment,{children:[s&&(o.isString(s)?e.jsx(p,{context:u,children:s}):s),a&&(o.isString(a)?e.jsx(C,{context:u,children:a}):a),l&&(o.isString(l)?e.jsx(h,{context:u,children:l}):t.renderComponent(l,{onConfirm:m})),!1!==c&&("function"==typeof c?c({onConfirm:m,context:u}):e.jsx(f,{onConfirm:m,confirmLabel:c?.confirm,hideConfirm:c?.hideConfirm,context:u}))]})})),$=n.memo((({modal:r,handlers:i})=>{const{title:s,subtitle:a,content:l,footer:c}=n.useMemo((()=>r),[r]),{context:u}=E(),{onConfirm:d,onClose:m}=n.useMemo((()=>i),[i]),p=t.useHandle(d),C=t.useHandle(m),{TitleComponent:h,SubtitleComponent:f,ContentComponent:g,FooterComponent:b}=M();return e.jsxs(n.Fragment,{children:[s&&(o.isString(s)?e.jsx(h,{context:u,children:s}):s),a&&(o.isString(a)?e.jsx(f,{context:u,children:a}):a),l&&(o.isString(l)?e.jsx(g,{context:u,children:l}):t.renderComponent(l,{onConfirm:p,onCancel:C,context:u})),!1!==c&&("function"==typeof c?c({onConfirm:p,onCancel:C,context:u}):e.jsx(b,{onConfirm:p,onCancel:C,confirmLabel:c?.confirm,cancelLabel:c?.cancel,hideConfirm:c?.hideConfirm,hideCancel:c?.hideCancel,context:u}))]})})),Y=n.memo((({modal:r,handlers:i})=>{const{Input:s,defaultValue:a,disabled:l,title:c,subtitle:u,content:d,footer:m}=n.useMemo((()=>({...r,Input:n.memo(t.withErrorBoundary(r.Input))})),[r]),{context:p}=E(),[C,h]=n.useState(a),{onChange:f,onClose:g,onConfirm:b}=n.useMemo((()=>i),[i]),v=t.useHandle(g),y=t.useHandle((e=>{const n=o.isFunction(e)?e(C):e;h(n),f(n)})),x=n.useCallback((()=>{requestAnimationFrame(b)}),[b]),k=n.useMemo((()=>!!C&&!!l?.(C)),[l,C]),{TitleComponent:j,SubtitleComponent:B,ContentComponent:D,FooterComponent:O}=M();return e.jsxs(n.Fragment,{children:[c&&(o.isString(c)?e.jsx(j,{context:p,children:c}):c),u&&(o.isString(u)?e.jsx(B,{context:p,children:u}):u),d&&(o.isString(d)?e.jsx(D,{context:p,children:d}):t.renderComponent(d,{onConfirm:x,onCancel:v,context:p})),s&&e.jsx(s,{defaultValue:a,value:C,onChange:y,onConfirm:x,onCancel:v,context:p}),!1!==m&&("function"==typeof m?m({value:C,disabled:k,onChange:y,onConfirm:x,onCancel:v,context:p}):e.jsx(O,{disabled:k,onConfirm:x,onCancel:v,confirmLabel:m?.confirm,cancelLabel:m?.cancel,hideConfirm:m?.hideConfirm,hideCancel:m?.hideCancel,context:p}))]})})),U=({modalId:o,onChangeOrder:t})=>{const{ForegroundComponent:i}=M(),{context:s}=E(),{modal:a,onChange:l,onConfirm:c,onClose:u,onDestroy:d}=h(o),m=n.useMemo((()=>a?.ForegroundComponent||i),[i,a]);return a?e.jsx("div",{className:r.cx(T,{[A]:a.manualDestroy?a.alive:a.visible,[q]:a.visible}),children:e.jsxs(m,{id:a.id,type:a.type,alive:a.alive,visible:a.visible,initiator:a.initiator,manualDestroy:a.manualDestroy,closeOnBackdropClick:a.closeOnBackdropClick,background:a.background,onChange:l,onConfirm:c,onClose:u,onDestroy:d,onChangeOrder:t,context:s,children:["alert"===a.type&&e.jsx(_,{modal:a,handlers:{onConfirm:c}}),"confirm"===a.type&&e.jsx($,{modal:a,handlers:{onConfirm:c,onClose:u}}),"prompt"===a.type&&e.jsx(Y,{modal:a,handlers:{onChange:l,onConfirm:c,onClose:u}})]})}):null},G=e=>{const[o,r]=t.useVersion();return n.useEffect((()=>{if(e)return e.subscribe(r)}),[e,r]),o},J=r.css("production"===process.env.NODE_ENV?{name:"13dmkf4",styles:"position:fixed;inset:0;pointer-events:none;overflow:hidden"}:{name:"yjeu12-presenter",styles:"position:fixed;inset:0;pointer-events:none;overflow:hidden;label:presenter;",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}),{increment:K}=o.counterFactory(1),Q=n.memo((({modalId:o})=>{const r=n.useRef(null),{modal:i}=h(o);G(i);const s=t.useHandle((()=>{r.current&&(r.current.style.zIndex=`${K()}`)}));return e.jsxs("div",{ref:r,className:J,children:[e.jsx(H,{modalId:o,onChangeOrder:s}),e.jsx(U,{modalId:o,onChangeOrder:s})]})})),W=r.css("production"===process.env.NODE_ENV?{name:"2hpasy",styles:"display:flex;align-items:center;justify-content:center;position:fixed;inset:0;pointer-events:none;z-index:1000;transition:background-color ease-in-out"}:{name:"lhj8co-anchor",styles:"display:flex;align-items:center;justify-content:center;position:fixed;inset:0;pointer-events:none;z-index:1000;transition:background-color ease-in-out;label:anchor;",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}),X=e=>e?.visible&&e.dimmed,Z=n.memo(t.withErrorBoundary((()=>{const[r,i]=t.useVersion(),{modalIds:s,setUpdater:a}=C();n.useEffect((()=>{a(i)}),[a,i]);const l=S(),c=B(X,r);return e.jsx("div",{className:W,style:{transitionDuration:l.duration,backgroundColor:c?l.backdrop:"transparent"},children:o.map(s,(n=>e.jsx(Q,{modalId:n},n)))})}))),ee=({ForegroundComponent:n,BackgroundComponent:o,TitleComponent:t,SubtitleComponent:r,ContentComponent:s,FooterComponent:a,usePathname:l,options:c,context:u,anchor:d})=>i.createPortal(e.jsx(N,{context:u,children:e.jsx(F,{ForegroundComponent:n,BackgroundComponent:o,TitleComponent:t,SubtitleComponent:r,ContentComponent:s,FooterComponent:a,options:c,children:e.jsx(p,{usePathname:l,children:e.jsx(Z,{})})})}),d),ne=()=>{const e=n.useRef(s.activate()),r=n.useRef(null),[,i]=t.useVersion(),a=n.useCallback((n=>{e.current?(r.current=s.anchor({root:n}),i()):o.printError("ModalProvider is already initialized",["ModalProvider can only be initialized once.","Nesting ModalProvider will be ignored..."],{info:"Something is wrong with the ModalProvider initialization..."})}),[i]);return{anchorRef:r,handleInitialize:a}},oe=n.forwardRef((({usePathname:o,ForegroundComponent:r,BackgroundComponent:i,TitleComponent:s,SubtitleComponent:a,ContentComponent:l,FooterComponent:c,options:u,context:d,children:m},p)=>{const C=n.useMemo((()=>o||I),[o]),{anchorRef:h,handleInitialize:f}=ne();return n.useImperativeHandle(p,(()=>({initialize:f})),[f]),t.useOnMount((()=>(null===p&&f(),()=>{h.current&&h.current.remove()}))),e.jsxs(n.Fragment,{children:[m,h.current&&ee({ForegroundComponent:r,BackgroundComponent:i,TitleComponent:s,SubtitleComponent:a,ContentComponent:l,FooterComponent:c,usePathname:C,options:u,context:d,anchor:h.current})]})}));exports.ModalProvider=oe,exports.alert=({subtype:e,title:n,subtitle:o,content:t,background:r,footer:i,dimmed:a,manualDestroy:l,closeOnBackdropClick:c,ForegroundComponent:u,BackgroundComponent:d})=>new Promise(((m,p)=>{try{s.open({type:"alert",subtype:e,resolve:()=>m(),title:n,subtitle:o,content:t,background:r,footer:i,dimmed:a,manualDestroy:l,closeOnBackdropClick:c,ForegroundComponent:u,BackgroundComponent:d})}catch(e){p(e)}})),exports.confirm=({subtype:e,title:n,subtitle:o,content:t,background:r,footer:i,dimmed:a,manualDestroy:l,closeOnBackdropClick:c,ForegroundComponent:u,BackgroundComponent:d})=>new Promise(((m,p)=>{try{s.open({type:"confirm",subtype:e,resolve:e=>m(e??!1),title:n,subtitle:o,content:t,background:r,footer:i,dimmed:a,manualDestroy:l,closeOnBackdropClick:c,ForegroundComponent:u,BackgroundComponent:d})}catch(e){p(e)}})),exports.prompt=({defaultValue:e,title:n,subtitle:o,content:t,Input:r,disabled:i,returnOnCancel:a,background:l,footer:c,dimmed:u,manualDestroy:d,closeOnBackdropClick:m,ForegroundComponent:p,BackgroundComponent:C})=>new Promise(((h,f)=>{try{s.open({type:"prompt",resolve:e=>h(e),title:n,subtitle:o,content:t,Input:r,defaultValue:e,disabled:i,returnOnCancel:a,background:l,footer:c,dimmed:u,manualDestroy:d,closeOnBackdropClick:m,ForegroundComponent:p,BackgroundComponent:C})}catch(e){f(e)}})),exports.useActiveModalCount=B,exports.useDestroyAfter=(e,t)=>{const{modal:r,onDestroy:i}=h(e),s=G(r),a=n.useRef({modal:r,onDestroy:i,milliseconds:o.isString(t)?o.convertMsFromDuration(t):t});n.useEffect((()=>{const{modal:e,onDestroy:n,milliseconds:o}=a.current;if(!e||e.visible||!e.alive)return;const t=setTimeout((()=>{n()}),o);return()=>{t&&clearTimeout(t)}}),[s])},exports.useInitializeModal=({usePathname:e,ForegroundComponent:o,BackgroundComponent:r,TitleComponent:i,SubtitleComponent:s,ContentComponent:a,FooterComponent:l,options:c,context:u,mode:d="auto"}={})=>{const m=n.useMemo((()=>e||I),[e]),{anchorRef:p,handleInitialize:C}=ne();t.useOnMount((()=>("auto"===d&&C(),()=>{p.current&&p.current.remove()})));const h=n.useCallback((e=>{"manual"===d&&C(e)}),[d,C]);return{portal:p.current&&ee({usePathname:m,ForegroundComponent:o,BackgroundComponent:r,TitleComponent:i,SubtitleComponent:s,ContentComponent:a,FooterComponent:l,options:c,context:u,anchor:p.current}),initialize:h}},exports.useModalAnimation=(e,o)=>{const t=n.useRef(o);t.current=o,n.useLayoutEffect((()=>{if(!t.current)return;let n;return n=e?requestAnimationFrame((()=>t.current.onVisible?.())):requestAnimationFrame((()=>t.current.onHidden?.())),()=>{n&&cancelAnimationFrame(n)}}),[e])},exports.useModalBackdrop=()=>S().backdrop,exports.useModalDuration=()=>{const e=S();return{duration:e.duration,milliseconds:o.convertMsFromDuration(e.duration)}},exports.useModalOptions=S,exports.useSubscribeModal=G;
|
|
2
|
-
//# sourceMappingURL=index.cjs.js.map
|