@lerx/promise-modal 0.1.1 → 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 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +953 -2
- 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 +14 -26
- 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.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.mjs.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
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/app/ModalManager.ts","../src/core/node/ModalNode/AbstractNode.ts","../src/core/node/ModalNode/AlertNode.ts","../src/core/node/ModalNode/ConfirmNode.ts","../src/core/node/ModalNode/PromptNode.ts","../src/core/node/nodeFactory.ts","../src/providers/ModalManagerContext/ModalManagerContext.ts","../src/providers/ModalManagerContext/ModalManagerContextProvider.tsx","../src/providers/ModalManagerContext/useModalManagerContext.ts","../src/components/FallbackComponents/classNames.emotion.ts","../src/components/FallbackComponents/FallbackTitle.tsx","../src/components/FallbackComponents/FallbackSubtitle.tsx","../src/components/FallbackComponents/FallbackContent.tsx","../src/components/FallbackComponents/FallbackFooter.tsx","../src/hooks/useActiveModalCount.ts","../src/components/FallbackComponents/FallbackForegroundFrame.tsx","../src/providers/ConfigurationContext/ConfigurationContext.ts","../src/providers/ConfigurationContext/ConfigurationContextProvider.tsx","../src/app/constant.ts","../src/providers/ConfigurationContext/useConfigurationContext.ts","../src/providers/UserDefinedContext/UserDefinedContext.ts","../src/providers/UserDefinedContext/UserDefinedContextProvider.tsx","../src/providers/UserDefinedContext/useUserDefinedContext.ts","../src/hooks/useDefaultPathname.ts","../src/components/Background/classNames.emotion.ts","../src/components/Background/Background.tsx","../src/components/Foreground/classNames.emotion.ts","../src/components/Foreground/components/AlertInner.tsx","../src/components/Foreground/components/ConfirmInner.tsx","../src/components/Foreground/components/PromptInner.tsx","../src/components/Foreground/Foreground.tsx","../src/hooks/useSubscribeModal.ts","../src/components/Presenter/classNames.emotion.ts","../src/components/Presenter/Presenter.tsx","../src/components/Anchor/classNames.emotion.ts","../src/components/Anchor/Anchor.tsx","../src/bootstrap/BootstrapProvider/helpers/bootstrap.tsx","../src/bootstrap/BootstrapProvider/hooks/useInitialize.ts","../src/bootstrap/BootstrapProvider/BootstrapProvider.tsx","../src/core/handle/alert.ts","../src/core/handle/confirm.ts","../src/core/handle/prompt.ts","../src/hooks/useDestroyAfter.ts","../src/bootstrap/BootstrapProvider/useBootstrap.tsx","../src/hooks/useModalAnimation.ts"],"sourcesContent":["import { getRandomString } from '@winglet/common-utils/lib';\n\nimport type { Fn } from '@aileron/declare';\n\nimport type { Modal } from '@/promise-modal/types';\n\nexport class ModalManager {\n static #active = false;\n static activate() {\n if (ModalManager.#active) return false;\n return (ModalManager.#active = true);\n }\n\n static #anchor: HTMLElement | null = null;\n static anchor(options?: {\n tag?: string;\n prefix?: string;\n root?: HTMLElement;\n }): HTMLElement {\n if (ModalManager.#anchor) {\n const anchor = document.getElementById(ModalManager.#anchor.id);\n if (anchor) return anchor;\n }\n const {\n tag = 'div',\n prefix = 'promise-modal',\n root = document.body,\n } = options || {};\n const node = document.createElement(tag);\n node.setAttribute('id', `${prefix}-${getRandomString(36)}`);\n root.appendChild(node);\n ModalManager.#anchor = node;\n return node;\n }\n\n static #prerenderList: Modal[] = [];\n static get prerender() {\n return ModalManager.#prerenderList;\n }\n\n static #openHandler: Fn<[Modal], void> = (modal: Modal) =>\n ModalManager.#prerenderList.push(modal);\n static set openHandler(handler: Fn<[Modal], void>) {\n ModalManager.#openHandler = handler;\n ModalManager.#prerenderList = [];\n }\n\n static get unanchored() {\n return !ModalManager.#anchor;\n }\n\n static reset() {\n ModalManager.#active = false;\n ModalManager.#anchor = null;\n ModalManager.#prerenderList = [];\n ModalManager.#openHandler = (modal: Modal) =>\n ModalManager.#prerenderList.push(modal);\n }\n\n static open(modal: Modal) {\n ModalManager.#openHandler(modal);\n }\n}\n","import type { ReactNode } from 'react';\n\nimport type { Fn } from '@aileron/declare';\n\nimport type {\n BackgroundComponent,\n BaseModal,\n ForegroundComponent,\n ManagedEntity,\n ModalBackground,\n} from '@/promise-modal/types';\n\ntype AbstractNodeProps<T, B> = BaseModal<T, B> & ManagedEntity;\n\nexport abstract class AbstractNode<T, B> {\n readonly id: number;\n readonly initiator: string;\n\n readonly title?: ReactNode;\n readonly subtitle?: ReactNode;\n readonly background?: ModalBackground<B>;\n\n readonly manualDestroy: boolean;\n readonly closeOnBackdropClick: boolean;\n readonly dimmed: boolean;\n\n readonly ForegroundComponent?: ForegroundComponent;\n readonly BackgroundComponent?: BackgroundComponent;\n\n #alive: boolean;\n get alive() {\n return this.#alive;\n }\n #visible: boolean;\n get visible() {\n return this.#visible;\n }\n\n #resolve: (result: T | null) => void;\n #listeners: Set<Fn> = new Set();\n\n constructor({\n id,\n initiator,\n title,\n subtitle,\n background,\n dimmed = true,\n manualDestroy = false,\n closeOnBackdropClick = true,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n }: AbstractNodeProps<T, B>) {\n this.id = id;\n this.initiator = initiator;\n this.title = title;\n this.subtitle = subtitle;\n this.background = background;\n\n this.dimmed = dimmed;\n this.manualDestroy = manualDestroy;\n this.closeOnBackdropClick = closeOnBackdropClick;\n\n this.ForegroundComponent = ForegroundComponent;\n this.BackgroundComponent = BackgroundComponent;\n\n this.#alive = true;\n this.#visible = true;\n this.#resolve = resolve;\n }\n\n subscribe(listener: Fn) {\n this.#listeners.add(listener);\n return () => {\n this.#listeners.delete(listener);\n };\n }\n publish() {\n for (const listener of this.#listeners) listener();\n }\n protected resolve(result: T | null) {\n this.#resolve(result);\n }\n onDestroy() {\n const needPublish = this.#alive === true;\n this.#alive = false;\n if (this.manualDestroy && needPublish) this.publish();\n }\n onShow() {\n const needPublish = this.#visible === false;\n this.#visible = true;\n if (needPublish) this.publish();\n }\n onHide() {\n const needPublish = this.#visible === true;\n this.#visible = false;\n if (needPublish) this.publish();\n }\n abstract onClose(): void;\n abstract onConfirm(): void;\n}\n","import type { ComponentType, ReactNode } from 'react';\n\nimport type {\n AlertContentProps,\n AlertFooterRender,\n AlertModal,\n FooterOptions,\n ManagedEntity,\n} from '@/promise-modal/types';\n\nimport { AbstractNode } from './AbstractNode';\n\ntype AlertNodeProps<B> = AlertModal<B> & ManagedEntity;\n\nexport class AlertNode<B> extends AbstractNode<null, B> {\n readonly type: 'alert';\n readonly subtype?: 'info' | 'success' | 'warning' | 'error';\n readonly content?: ReactNode | ComponentType<AlertContentProps>;\n readonly footer?:\n | AlertFooterRender\n | Pick<FooterOptions, 'confirm' | 'hideConfirm'>\n | false;\n\n constructor({\n id,\n initiator,\n type,\n subtype,\n title,\n subtitle,\n content,\n footer,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n }: AlertNodeProps<B>) {\n super({\n id,\n initiator,\n title,\n subtitle,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n });\n this.type = type;\n this.subtype = subtype;\n this.content = content;\n this.footer = footer;\n }\n onClose() {\n this.resolve(null);\n }\n onConfirm() {\n this.resolve(null);\n }\n}\n","import type { ComponentType, ReactNode } from 'react';\n\nimport type {\n ConfirmContentProps,\n ConfirmFooterRender,\n ConfirmModal,\n FooterOptions,\n ManagedEntity,\n} from '@/promise-modal/types';\n\nimport { AbstractNode } from './AbstractNode';\n\ntype ConfirmNodeProps<B> = ConfirmModal<B> & ManagedEntity;\n\nexport class ConfirmNode<B> extends AbstractNode<boolean, B> {\n readonly type: 'confirm';\n readonly subtype?: 'info' | 'success' | 'warning' | 'error';\n readonly content?: ReactNode | ComponentType<ConfirmContentProps>;\n readonly footer?: ConfirmFooterRender | FooterOptions | false;\n\n constructor({\n id,\n initiator,\n type,\n subtype,\n title,\n subtitle,\n content,\n footer,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n }: ConfirmNodeProps<B>) {\n super({\n id,\n initiator,\n title,\n subtitle,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n });\n this.type = type;\n this.subtype = subtype;\n this.content = content;\n this.footer = footer;\n }\n onClose() {\n this.resolve(false);\n }\n onConfirm() {\n this.resolve(true);\n }\n}\n","import type { ComponentType, ReactNode } from 'react';\n\nimport type {\n FooterOptions,\n ManagedEntity,\n PromptContentProps,\n PromptFooterRender,\n PromptInputProps,\n PromptModal,\n} from '@/promise-modal/types';\n\nimport { AbstractNode } from './AbstractNode';\n\ntype PromptNodeProps<T, B> = PromptModal<T, B> & ManagedEntity;\n\nexport class PromptNode<T, B> extends AbstractNode<T, B> {\n readonly type: 'prompt';\n readonly content?: ReactNode | ComponentType<PromptContentProps>;\n readonly defaultValue: T | undefined;\n readonly Input: (props: PromptInputProps<T>) => ReactNode;\n readonly disabled?: (value: T) => boolean;\n readonly returnOnCancel?: boolean;\n readonly footer?: PromptFooterRender<T> | FooterOptions | false;\n\n #value: T | undefined;\n\n constructor({\n id,\n initiator,\n type,\n title,\n subtitle,\n content,\n defaultValue,\n Input,\n disabled,\n returnOnCancel,\n footer,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n }: PromptNodeProps<T, B>) {\n super({\n id,\n initiator,\n title,\n subtitle,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n });\n this.type = type;\n this.content = content;\n this.Input = Input;\n this.defaultValue = defaultValue;\n this.#value = defaultValue;\n this.disabled = disabled;\n this.returnOnCancel = returnOnCancel;\n this.footer = footer;\n }\n\n onChange(value: T) {\n this.#value = value;\n }\n onConfirm() {\n this.resolve(this.#value ?? null);\n }\n onClose() {\n if (this.returnOnCancel) this.resolve(this.#value ?? null);\n else this.resolve(null);\n }\n}\n","import type { ManagedModal } from '@/promise-modal/types';\n\nimport { AlertNode, ConfirmNode, PromptNode } from './ModalNode';\n\nexport const nodeFactory = <T, B>(modal: ManagedModal<T, B>) => {\n switch (modal.type) {\n case 'alert':\n return new AlertNode<B>(modal);\n case 'confirm':\n return new ConfirmNode<B>(modal);\n case 'prompt':\n return new PromptNode<T, B>(modal);\n }\n // @ts-expect-error: This state is unreachable by design and should NEVER occur.\n throw new Error(`Unknown modal: ${modal.type}`, { modal });\n};\n","import { createContext } from 'react';\n\nimport type { Fn } from '@aileron/declare';\n\nimport type { ModalNode } from '@/promise-modal/core';\nimport type { ModalActions, ModalHandlersWithId } from '@/promise-modal/types';\n\nexport interface ModalManagerContextProps extends ModalHandlersWithId {\n modalIds: ModalNode['id'][];\n getModal: Fn<[id: ModalNode['id']], ModalActions>;\n getModalNode: Fn<[id: ModalNode['id']], ModalNode | undefined>;\n setUpdater: Fn<[updater: Fn]>;\n}\n\nexport const ModalManagerContext = createContext<ModalManagerContextProps>(\n {} as ModalManagerContextProps,\n);\n","import {\n type PropsWithChildren,\n memo,\n useCallback,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { convertMsFromDuration } from '@winglet/common-utils/convert';\nimport { useOnMountLayout, useReference } from '@winglet/react-utils/hook';\n\nimport type { Fn } from '@aileron/declare';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\nimport { type ModalNode, nodeFactory } from '@/promise-modal/core';\nimport { useConfigurationOptions } from '@/promise-modal/providers';\nimport type { Modal } from '@/promise-modal/types';\n\nimport { ModalManagerContext } from './ModalManagerContext';\n\ninterface ModalManagerContextProviderProps {\n usePathname: Fn<[], { pathname: string }>;\n}\n\nexport const ModalManagerContextProvider = memo(\n ({\n usePathname,\n children,\n }: PropsWithChildren<ModalManagerContextProviderProps>) => {\n const modalDictionary = useRef<Map<ModalNode['id'], ModalNode>>(new Map());\n\n const [modalIds, setModalIds] = useState<ModalNode['id'][]>([]);\n const modalIdsRef = useReference(modalIds);\n const { pathname } = usePathname();\n\n const initiator = useRef(pathname);\n const modalIdSequence = useRef(0);\n\n const options = useConfigurationOptions();\n\n const duration = useMemo(\n () => convertMsFromDuration(options.duration),\n [options],\n );\n\n useOnMountLayout(() => {\n const { manualDestroy, closeOnBackdropClick } = options;\n\n for (const data of ModalManager.prerender) {\n const modal = nodeFactory({\n ...data,\n id: modalIdSequence.current++,\n initiator: initiator.current,\n manualDestroy:\n data.manualDestroy !== undefined\n ? data.manualDestroy\n : manualDestroy,\n closeOnBackdropClick:\n data.closeOnBackdropClick !== undefined\n ? data.closeOnBackdropClick\n : closeOnBackdropClick,\n });\n modalDictionary.current.set(modal.id, modal);\n setModalIds((ids) => [...ids, modal.id]);\n }\n\n ModalManager.openHandler = (data: Modal) => {\n const modal = nodeFactory({\n ...data,\n id: modalIdSequence.current++,\n initiator: initiator.current,\n manualDestroy:\n data.manualDestroy !== undefined\n ? data.manualDestroy\n : manualDestroy,\n closeOnBackdropClick:\n data.closeOnBackdropClick !== undefined\n ? data.closeOnBackdropClick\n : closeOnBackdropClick,\n });\n modalDictionary.current.set(modal.id, modal);\n setModalIds((ids) => {\n const aliveIds: number[] = [];\n for (let index = 0; index < ids.length; index++) {\n const id = ids[index];\n const destroyed = !modalDictionary.current.get(id)?.alive;\n if (destroyed) modalDictionary.current.delete(id);\n else aliveIds.push(id);\n }\n return [...aliveIds, modal.id];\n });\n };\n return () => {\n ModalManager.reset();\n };\n });\n\n useLayoutEffect(() => {\n for (const id of modalIdsRef.current) {\n const modal = modalDictionary.current.get(id);\n if (!modal?.alive) continue;\n if (modal.initiator === pathname) modal.onShow();\n else modal.onHide();\n }\n initiator.current = pathname;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pathname]);\n\n const getModalNode = useCallback((modalId: ModalNode['id']) => {\n return modalDictionary.current.get(modalId);\n }, []);\n\n const onDestroy = useCallback((modalId: ModalNode['id']) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n modal.onDestroy();\n updaterRef.current?.();\n }, []);\n\n const updaterRef = useRef<Fn>(undefined);\n const hideModal = useCallback(\n (modalId: ModalNode['id']) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n modal.onHide();\n updaterRef.current?.();\n if (!modal.manualDestroy)\n setTimeout(() => {\n modal.onDestroy();\n }, duration);\n },\n [duration],\n );\n\n const onChange = useCallback((modalId: ModalNode['id'], value: any) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n if (modal.type === 'prompt') modal.onChange(value);\n }, []);\n\n const onConfirm = useCallback(\n (modalId: ModalNode['id']) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n modal.onConfirm();\n hideModal(modalId);\n },\n [hideModal],\n );\n\n const onClose = useCallback(\n (modalId: ModalNode['id']) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n modal.onClose();\n hideModal(modalId);\n },\n [hideModal],\n );\n\n const getModal = useCallback(\n (modalId: ModalNode['id']) => ({\n modal: getModalNode(modalId),\n onConfirm: () => onConfirm(modalId),\n onClose: () => onClose(modalId),\n onChange: (value: any) => onChange(modalId, value),\n onDestroy: () => onDestroy(modalId),\n }),\n [getModalNode, onConfirm, onClose, onChange, onDestroy],\n );\n\n const value = useMemo(() => {\n return {\n modalIds,\n getModalNode,\n onChange,\n onConfirm,\n onClose,\n onDestroy,\n getModal,\n setUpdater: (updater: Fn) => {\n updaterRef.current = updater;\n },\n };\n }, [\n modalIds,\n getModal,\n getModalNode,\n onChange,\n onConfirm,\n onClose,\n onDestroy,\n ]);\n\n return (\n <ModalManagerContext.Provider value={value}>\n {children}\n </ModalManagerContext.Provider>\n );\n },\n);\n","import { useContext, useMemo } from 'react';\n\nimport type { ManagedModal } from '@/promise-modal/types';\n\nimport { ModalManagerContext } from './ModalManagerContext';\n\nexport const useModalManagerContext = () => useContext(ModalManagerContext);\n\nexport const useModal = (id: ManagedModal['id']) => {\n const { getModal } = useModalManagerContext();\n return useMemo(() => getModal(id), [id, getModal]);\n};\n","import { css } from '@emotion/css';\n\nexport const fallback = css`\n margin: unset;\n`;\n\nexport const frame = css`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background-color: white;\n padding: 20px 80px;\n gap: 10px;\n border: 1px solid black;\n`;\n","import type { PropsWithChildren } from 'react';\n\nimport { fallback } from './classNames.emotion';\n\nexport const FallbackTitle = ({ children }: PropsWithChildren) => {\n return <h2 className={fallback}>{children}</h2>;\n};\n","import type { PropsWithChildren } from 'react';\n\nimport { fallback } from './classNames.emotion';\n\nexport const FallbackSubtitle = ({ children }: PropsWithChildren) => {\n return <h3 className={fallback}>{children}</h3>;\n};\n","import type { PropsWithChildren } from 'react';\n\nimport { fallback } from './classNames.emotion';\n\nexport const FallbackContent = ({ children }: PropsWithChildren) => {\n return <div className={fallback}>{children}</div>;\n};\n","import type { FooterComponentProps } from '@/promise-modal/types';\n\nexport const FallbackFooter = ({\n confirmLabel,\n hideConfirm = false,\n cancelLabel,\n hideCancel = false,\n disabled,\n onConfirm,\n onCancel,\n}: FooterComponentProps) => {\n return (\n <div>\n {!hideConfirm && (\n <button onClick={onConfirm} disabled={disabled}>\n {confirmLabel || 'Confirm'}\n </button>\n )}\n\n {!hideCancel && typeof onCancel === 'function' && (\n <button onClick={onCancel}>{cancelLabel || 'Cancel'}</button>\n )}\n </div>\n );\n};\n","import { useMemo } from 'react';\n\nimport type { Fn } from '@aileron/declare';\n\nimport type { ModalNode } from '@/promise-modal/core';\nimport { useModalManagerContext } from '@/promise-modal/providers';\n\nconst defaultValidate = (modal?: ModalNode) => modal?.visible;\n\nexport const useActiveModalCount = (\n validate: Fn<[ModalNode?], boolean | undefined> = defaultValidate,\n refreshKey: string | number = 0,\n) => {\n const { modalIds, getModalNode } = useModalManagerContext();\n return useMemo(() => {\n let count = 0;\n for (const id of modalIds) {\n if (validate(getModalNode(id))) count++;\n }\n return count;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [getModalNode, modalIds, refreshKey]);\n};\n","import {\n type ForwardedRef,\n type PropsWithChildren,\n forwardRef,\n useMemo,\n} from 'react';\n\nimport { useActiveModalCount } from '@/promise-modal/hooks/useActiveModalCount';\nimport type { ModalFrameProps } from '@/promise-modal/types';\n\nimport { frame } from './classNames.emotion';\n\nconst MAX_MODAL_COUNT = 5;\nconst MAX_MODAL_LEVEL = 3;\n\nexport const FallbackForegroundFrame = forwardRef(\n (\n { id, onChangeOrder, children }: PropsWithChildren<ModalFrameProps>,\n ref: ForwardedRef<HTMLDivElement>,\n ) => {\n const activeCount = useActiveModalCount();\n const [level, offset] = useMemo(() => {\n const stacked = activeCount > 1;\n const level = stacked\n ? (Math.floor(id / MAX_MODAL_COUNT) % MAX_MODAL_LEVEL) * 100\n : 0;\n const offset = stacked ? (id % MAX_MODAL_COUNT) * 35 : 0;\n return [level, offset];\n }, [activeCount, id]);\n\n return (\n <div\n ref={ref}\n className={frame}\n onClick={onChangeOrder}\n style={{\n marginBottom: `calc(25vh + ${level}px)`,\n marginLeft: `${level}px`,\n transform: `translate(${offset}px, ${offset}px)`,\n }}\n >\n {children}\n </div>\n );\n },\n);\n","import { type ComponentType, createContext } from 'react';\n\nimport type { Color, Duration } from '@aileron/declare';\n\nimport type {\n BackgroundComponent,\n FooterComponentProps,\n ForegroundComponent,\n WrapperComponentProps,\n} from '@/promise-modal/types';\n\nexport interface ConfigurationContextProps {\n ForegroundComponent: ForegroundComponent;\n BackgroundComponent?: BackgroundComponent;\n TitleComponent: ComponentType<WrapperComponentProps>;\n SubtitleComponent: ComponentType<WrapperComponentProps>;\n ContentComponent: ComponentType<WrapperComponentProps>;\n FooterComponent: ComponentType<FooterComponentProps>;\n options: {\n duration: Duration;\n backdrop: Color;\n manualDestroy: boolean;\n closeOnBackdropClick: boolean;\n };\n}\n\nexport const ConfigurationContext = createContext<ConfigurationContextProps>(\n {} as ConfigurationContextProps,\n);\n","import {\n type ComponentType,\n type PropsWithChildren,\n memo,\n useMemo,\n} from 'react';\n\nimport type { Color, Duration } from '@aileron/declare';\n\nimport {\n DEFAULT_ANIMATION_DURATION,\n DEFAULT_BACKDROP_COLOR,\n} from '@/promise-modal/app/constant';\nimport {\n FallbackContent,\n FallbackFooter,\n FallbackForegroundFrame,\n FallbackSubtitle,\n FallbackTitle,\n} from '@/promise-modal/components/FallbackComponents';\nimport type {\n FooterComponentProps,\n ModalFrameProps,\n WrapperComponentProps,\n} from '@/promise-modal/types';\n\nimport { ConfigurationContext } from './ConfigurationContext';\n\nexport interface ConfigurationContextProviderProps {\n BackgroundComponent?: ComponentType<ModalFrameProps>;\n ForegroundComponent?: ComponentType<ModalFrameProps>;\n TitleComponent?: ComponentType<WrapperComponentProps>;\n SubtitleComponent?: ComponentType<WrapperComponentProps>;\n ContentComponent?: ComponentType<WrapperComponentProps>;\n FooterComponent?: ComponentType<FooterComponentProps>;\n options?: {\n /** Modal transition time(ms, s) */\n duration?: Duration;\n /** Modal backdrop color */\n backdrop?: Color;\n /** Whether to destroy the modal manually */\n manualDestroy?: boolean;\n /** Whether to close the modal when the backdrop is clicked */\n closeOnBackdropClick?: boolean;\n };\n}\n\nexport const ConfigurationContextProvider = memo(\n ({\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n options,\n children,\n }: PropsWithChildren<ConfigurationContextProviderProps>) => {\n const value = useMemo(\n () => ({\n BackgroundComponent,\n ForegroundComponent: ForegroundComponent || FallbackForegroundFrame,\n TitleComponent: TitleComponent || FallbackTitle,\n SubtitleComponent: SubtitleComponent || FallbackSubtitle,\n ContentComponent: memo(ContentComponent || FallbackContent),\n FooterComponent: memo(FooterComponent || FallbackFooter),\n options: {\n duration: DEFAULT_ANIMATION_DURATION,\n backdrop: DEFAULT_BACKDROP_COLOR,\n closeOnBackdropClick: true,\n manualDestroy: false,\n ...options,\n } satisfies ConfigurationContextProviderProps['options'],\n }),\n [\n ForegroundComponent,\n BackgroundComponent,\n ContentComponent,\n FooterComponent,\n SubtitleComponent,\n TitleComponent,\n options,\n ],\n );\n return (\n <ConfigurationContext.Provider value={value}>\n {children}\n </ConfigurationContext.Provider>\n );\n },\n);\n","import type { Color, Duration } from '@aileron/declare';\n\nexport const DEFAULT_ANIMATION_DURATION: Duration = '300ms';\n\nexport const DEFAULT_BACKDROP_COLOR: Color = 'rgba(0, 0, 0, 0.5)';\n","import { useContext } from 'react';\n\nimport { convertMsFromDuration } from '@winglet/common-utils/convert';\n\nimport { ConfigurationContext } from './ConfigurationContext';\n\nexport const useConfigurationContext = () => useContext(ConfigurationContext);\n\nexport const useConfigurationOptions = () => {\n const context = useContext(ConfigurationContext);\n return context.options;\n};\n\nexport const useConfigurationDuration = () => {\n const context = useConfigurationOptions();\n return {\n duration: context.duration,\n milliseconds: convertMsFromDuration(context.duration),\n };\n};\n\nexport const useConfigurationBackdrop = () => {\n const context = useConfigurationOptions();\n return context.backdrop;\n};\n","import { createContext } from 'react';\n\nimport type { Dictionary } from '@aileron/declare';\n\nexport interface UserDefinedContext {\n context: Dictionary;\n}\n\nexport const UserDefinedContext = createContext<UserDefinedContext>(\n {} as UserDefinedContext,\n);\n","import { PropsWithChildren, useMemo } from 'react';\n\nimport type { Dictionary } from '@aileron/declare';\n\nimport { UserDefinedContext } from './UserDefinedContext';\n\ninterface UserDefinedContextProviderProps {\n /** User defined context */\n context?: Dictionary;\n}\n\nexport const UserDefinedContextProvider = ({\n context,\n children,\n}: PropsWithChildren<UserDefinedContextProviderProps>) => {\n const contextValue = useMemo(() => ({ context: context || {} }), [context]);\n return (\n <UserDefinedContext.Provider value={contextValue}>\n {children}\n </UserDefinedContext.Provider>\n );\n};\n","import { useContext } from 'react';\n\nimport { UserDefinedContext } from './UserDefinedContext';\n\nexport const useUserDefinedContext = () => {\n return useContext(UserDefinedContext);\n};\n","import { useLayoutEffect, useState } from 'react';\n\nexport const usePathname = () => {\n const [pathname, setPathname] = useState(window.location.pathname);\n useLayoutEffect(() => {\n let requestId: number;\n const checkPathname = () => {\n if (requestId) cancelAnimationFrame(requestId);\n if (pathname !== window.location.pathname) {\n setPathname(window.location.pathname);\n } else {\n requestId = requestAnimationFrame(checkPathname);\n }\n };\n requestId = requestAnimationFrame(checkPathname);\n return () => {\n if (requestId) cancelAnimationFrame(requestId);\n };\n }, [pathname]);\n return { pathname };\n};\n","import { css } from '@emotion/css';\n\nexport const background = css`\n display: none;\n position: fixed;\n inset: 0;\n z-index: -999;\n pointer-events: none;\n > * {\n pointer-events: none;\n }\n`;\n\nexport const active = css`\n pointer-events: all;\n`;\n\nexport const visible = css`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","import { type MouseEvent, useCallback, useMemo } from 'react';\n\nimport { cx } from '@emotion/css';\n\nimport {\n useConfigurationContext,\n useModal,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalLayerProps } from '@/promise-modal/types';\n\nimport { active, background, visible } from './classNames.emotion';\n\nexport const BackgroundFrame = ({\n modalId,\n onChangeOrder,\n}: ModalLayerProps) => {\n const { BackgroundComponent } = useConfigurationContext();\n const { context: userDefinedContext } = useUserDefinedContext();\n const { modal, onClose, onChange, onConfirm, onDestroy } = useModal(modalId);\n\n const handleClose = useCallback(\n (event: MouseEvent) => {\n if (modal && modal.closeOnBackdropClick && modal.visible) onClose();\n event.stopPropagation();\n },\n [modal, onClose],\n );\n\n const Background = useMemo(\n () => modal?.BackgroundComponent || BackgroundComponent,\n [BackgroundComponent, modal],\n );\n\n if (!modal) return null;\n\n return (\n <div\n className={cx(background, {\n [visible]: modal.manualDestroy ? modal.alive : modal.visible,\n [active]: modal.closeOnBackdropClick && modal.visible,\n })}\n onClick={handleClose}\n >\n {Background && (\n <Background\n id={modal.id}\n type={modal.type}\n alive={modal.alive}\n visible={modal.visible}\n initiator={modal.initiator}\n manualDestroy={modal.manualDestroy}\n closeOnBackdropClick={modal.closeOnBackdropClick}\n background={modal.background}\n onChange={onChange}\n onConfirm={onConfirm}\n onClose={onClose}\n onDestroy={onDestroy}\n onChangeOrder={onChangeOrder}\n context={userDefinedContext}\n />\n )}\n </div>\n );\n};\n","import { css } from '@emotion/css';\n\nexport const foreground = css`\n pointer-events: none;\n display: none;\n position: fixed;\n inset: 0;\n z-index: 1;\n`;\n\nexport const active = css`\n > * {\n pointer-events: all;\n }\n`;\n\nexport const visible = css`\n display: flex !important;\n justify-content: center;\n align-items: center;\n`;\n","import { Fragment, memo, useMemo } from 'react';\n\nimport { isString } from '@winglet/common-utils/filter';\nimport { useHandle } from '@winglet/react-utils/hook';\nimport { renderComponent } from '@winglet/react-utils/render';\n\nimport type { AlertNode } from '@/promise-modal/core';\nimport {\n useConfigurationContext,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalActions } from '@/promise-modal/types';\n\ninterface AlertInnerProps<B> {\n modal: AlertNode<B>;\n handlers: Pick<ModalActions, 'onConfirm'>;\n}\n\nexport const AlertInner = memo(\n <B,>({ modal, handlers }: AlertInnerProps<B>) => {\n const { title, subtitle, content, footer } = useMemo(() => modal, [modal]);\n const { context: userDefinedContext } = useUserDefinedContext();\n const { onConfirm } = useMemo(() => handlers, [handlers]);\n\n const handleConfirm = useHandle(onConfirm);\n\n const {\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n } = useConfigurationContext();\n\n return (\n <Fragment>\n {title &&\n (isString(title) ? (\n <TitleComponent context={userDefinedContext}>\n {title}\n </TitleComponent>\n ) : (\n title\n ))}\n {subtitle &&\n (isString(subtitle) ? (\n <SubtitleComponent context={userDefinedContext}>\n {subtitle}\n </SubtitleComponent>\n ) : (\n subtitle\n ))}\n {content &&\n (isString(content) ? (\n <ContentComponent context={userDefinedContext}>\n {content}\n </ContentComponent>\n ) : (\n renderComponent(content, {\n onConfirm: handleConfirm,\n })\n ))}\n {footer !== false &&\n (typeof footer === 'function' ? (\n footer({\n onConfirm: handleConfirm,\n context: userDefinedContext,\n })\n ) : (\n <FooterComponent\n onConfirm={handleConfirm}\n confirmLabel={footer?.confirm}\n hideConfirm={footer?.hideConfirm}\n context={userDefinedContext}\n />\n ))}\n </Fragment>\n );\n },\n);\n","import { Fragment, memo, useMemo } from 'react';\n\nimport { isString } from '@winglet/common-utils/filter';\nimport { useHandle } from '@winglet/react-utils/hook';\nimport { renderComponent } from '@winglet/react-utils/render';\n\nimport type { ConfirmNode } from '@/promise-modal/core';\nimport {\n useConfigurationContext,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalActions } from '@/promise-modal/types';\n\ninterface ConfirmInnerProps<B> {\n modal: ConfirmNode<B>;\n handlers: Pick<ModalActions, 'onConfirm' | 'onClose'>;\n}\n\nexport const ConfirmInner = memo(\n <B,>({ modal, handlers }: ConfirmInnerProps<B>) => {\n const { title, subtitle, content, footer } = useMemo(() => modal, [modal]);\n const { context: userDefinedContext } = useUserDefinedContext();\n const { onConfirm, onClose } = useMemo(() => handlers, [handlers]);\n\n const handleConfirm = useHandle(onConfirm);\n const handleClose = useHandle(onClose);\n\n const {\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n } = useConfigurationContext();\n\n return (\n <Fragment>\n {title &&\n (isString(title) ? (\n <TitleComponent context={userDefinedContext}>\n {title}\n </TitleComponent>\n ) : (\n title\n ))}\n {subtitle &&\n (isString(subtitle) ? (\n <SubtitleComponent context={userDefinedContext}>\n {subtitle}\n </SubtitleComponent>\n ) : (\n subtitle\n ))}\n {content &&\n (isString(content) ? (\n <ContentComponent context={userDefinedContext}>\n {content}\n </ContentComponent>\n ) : (\n renderComponent(content, {\n onConfirm: handleConfirm,\n onCancel: handleClose,\n context: userDefinedContext,\n })\n ))}\n {footer !== false &&\n (typeof footer === 'function' ? (\n footer({\n onConfirm: handleConfirm,\n onCancel: handleClose,\n context: userDefinedContext,\n })\n ) : (\n <FooterComponent\n onConfirm={handleConfirm}\n onCancel={handleClose}\n confirmLabel={footer?.confirm}\n cancelLabel={footer?.cancel}\n hideConfirm={footer?.hideConfirm}\n hideCancel={footer?.hideCancel}\n context={userDefinedContext}\n />\n ))}\n </Fragment>\n );\n },\n);\n","import { Fragment, memo, useCallback, useMemo, useState } from 'react';\n\nimport { isFunction, isString } from '@winglet/common-utils/filter';\nimport { withErrorBoundary } from '@winglet/react-utils/hoc';\nimport { useHandle } from '@winglet/react-utils/hook';\nimport { renderComponent } from '@winglet/react-utils/render';\n\nimport type { PromptNode } from '@/promise-modal/core';\nimport {\n useConfigurationContext,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalActions } from '@/promise-modal/types';\n\ninterface PromptInnerProps<T, B> {\n modal: PromptNode<T, B>;\n handlers: Pick<ModalActions, 'onChange' | 'onClose' | 'onConfirm'>;\n}\n\nexport const PromptInner = memo(\n <T, B>({ modal, handlers }: PromptInnerProps<T, B>) => {\n const {\n Input,\n defaultValue,\n disabled: checkDisabled,\n title,\n subtitle,\n content,\n footer,\n } = useMemo(\n () => ({\n ...modal,\n Input: memo(withErrorBoundary(modal.Input)),\n }),\n [modal],\n );\n\n const { context: userDefinedContext } = useUserDefinedContext();\n\n const [value, setValue] = useState<T | undefined>(defaultValue);\n\n const { onChange, onClose, onConfirm } = useMemo(\n () => handlers,\n [handlers],\n );\n\n const handleClose = useHandle(onClose);\n const handleChange = useHandle(\n (inputValue?: T | ((prevState: T | undefined) => T | undefined)) => {\n const input = isFunction(inputValue) ? inputValue(value) : inputValue;\n setValue(input);\n onChange(input);\n },\n );\n\n const handleConfirm = useCallback(() => {\n // NOTE: wait for the next tick to ensure the value is updated\n requestAnimationFrame(onConfirm);\n }, [onConfirm]);\n\n const disabled = useMemo(\n () => (value ? !!checkDisabled?.(value) : false),\n [checkDisabled, value],\n );\n\n const {\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n } = useConfigurationContext();\n\n return (\n <Fragment>\n {title &&\n (isString(title) ? (\n <TitleComponent context={userDefinedContext}>\n {title}\n </TitleComponent>\n ) : (\n title\n ))}\n {subtitle &&\n (isString(subtitle) ? (\n <SubtitleComponent context={userDefinedContext}>\n {subtitle}\n </SubtitleComponent>\n ) : (\n subtitle\n ))}\n {content &&\n (isString(content) ? (\n <ContentComponent context={userDefinedContext}>\n {content}\n </ContentComponent>\n ) : (\n renderComponent(content, {\n onConfirm: handleConfirm,\n onCancel: handleClose,\n context: userDefinedContext,\n })\n ))}\n\n {Input && (\n <Input\n defaultValue={defaultValue}\n value={value}\n onChange={handleChange}\n onConfirm={handleConfirm}\n onCancel={handleClose}\n context={userDefinedContext}\n />\n )}\n\n {footer !== false &&\n (typeof footer === 'function' ? (\n footer({\n value,\n disabled,\n onChange: handleChange,\n onConfirm: handleConfirm,\n onCancel: handleClose,\n context: userDefinedContext,\n })\n ) : (\n <FooterComponent\n disabled={disabled}\n onConfirm={handleConfirm}\n onCancel={handleClose}\n confirmLabel={footer?.confirm}\n cancelLabel={footer?.cancel}\n hideConfirm={footer?.hideConfirm}\n hideCancel={footer?.hideCancel}\n context={userDefinedContext}\n />\n ))}\n </Fragment>\n );\n },\n);\n","import { useMemo } from 'react';\n\nimport { cx } from '@emotion/css';\n\nimport {\n useConfigurationContext,\n useModal,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalLayerProps } from '@/promise-modal/types';\n\nimport { active, foreground, visible } from './classNames.emotion';\nimport { AlertInner, ConfirmInner, PromptInner } from './components';\n\nexport const ForegroundFrame = ({\n modalId,\n onChangeOrder,\n}: ModalLayerProps) => {\n const { ForegroundComponent } = useConfigurationContext();\n const { context: userDefinedContext } = useUserDefinedContext();\n\n const { modal, onChange, onConfirm, onClose, onDestroy } = useModal(modalId);\n\n const Foreground = useMemo(\n () => modal?.ForegroundComponent || ForegroundComponent,\n [ForegroundComponent, modal],\n );\n\n if (!modal) return null;\n\n return (\n <div\n className={cx(foreground, {\n [visible]: modal.manualDestroy ? modal.alive : modal.visible,\n [active]: modal.visible,\n })}\n >\n <Foreground\n id={modal.id}\n type={modal.type}\n alive={modal.alive}\n visible={modal.visible}\n initiator={modal.initiator}\n manualDestroy={modal.manualDestroy}\n closeOnBackdropClick={modal.closeOnBackdropClick}\n background={modal.background}\n onChange={onChange}\n onConfirm={onConfirm}\n onClose={onClose}\n onDestroy={onDestroy}\n onChangeOrder={onChangeOrder}\n context={userDefinedContext}\n >\n {modal.type === 'alert' && (\n <AlertInner modal={modal} handlers={{ onConfirm }} />\n )}\n {modal.type === 'confirm' && (\n <ConfirmInner modal={modal} handlers={{ onConfirm, onClose }} />\n )}\n {modal.type === 'prompt' && (\n <PromptInner\n modal={modal}\n handlers={{ onChange, onConfirm, onClose }}\n />\n )}\n </Foreground>\n </div>\n );\n};\n","import { useEffect } from 'react';\n\nimport { useVersion } from '@winglet/react-utils/hook';\n\nimport type { ModalNode } from '@/promise-modal/core';\n\nexport const useSubscribeModal = (modal?: ModalNode) => {\n const [version, update] = useVersion();\n useEffect(() => {\n if (!modal) return;\n const unsubscribe = modal.subscribe(update);\n return unsubscribe;\n }, [modal, update]);\n return version;\n};\n","import { css } from '@emotion/css';\n\nexport const presenter = css`\n position: fixed;\n inset: 0;\n pointer-events: none;\n overflow: hidden;\n`;\n","import { memo, useRef } from 'react';\n\nimport { counterFactory } from '@winglet/common-utils/lib';\nimport { useHandle } from '@winglet/react-utils/hook';\n\nimport { Background } from '@/promise-modal/components/Background';\nimport { Foreground } from '@/promise-modal/components/Foreground';\nimport { useSubscribeModal } from '@/promise-modal/hooks/useSubscribeModal';\nimport { useModal } from '@/promise-modal/providers';\nimport type { ModalIdProps } from '@/promise-modal/types';\n\nimport { presenter } from './classNames.emotion';\n\nconst { increment } = counterFactory(1);\n\nexport const Presenter = memo(({ modalId }: ModalIdProps) => {\n const ref = useRef<HTMLDivElement>(null);\n const { modal } = useModal(modalId);\n useSubscribeModal(modal);\n const handleChangeOrder = useHandle(() => {\n if (ref.current) {\n ref.current.style.zIndex = `${increment()}`;\n }\n });\n return (\n <div ref={ref} className={presenter}>\n <Background modalId={modalId} onChangeOrder={handleChangeOrder} />\n <Foreground modalId={modalId} onChangeOrder={handleChangeOrder} />\n </div>\n );\n});\n","import { css } from '@emotion/css';\n\nexport const anchor = css`\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 1000;\n transition: background-color ease-in-out;\n`;\n","import { memo, useEffect } from 'react';\n\nimport { map } from '@winglet/common-utils/array';\nimport { withErrorBoundary } from '@winglet/react-utils/hoc';\nimport { useVersion } from '@winglet/react-utils/hook';\n\nimport { Presenter } from '@/promise-modal/components/Presenter';\nimport type { ModalNode } from '@/promise-modal/core';\nimport { useActiveModalCount } from '@/promise-modal/hooks/useActiveModalCount';\nimport {\n useConfigurationOptions,\n useModalManagerContext,\n} from '@/promise-modal/providers';\n\nimport { anchor } from './classNames.emotion';\n\nconst AnchorInner = () => {\n const [version, update] = useVersion();\n\n const { modalIds, setUpdater } = useModalManagerContext();\n\n useEffect(() => {\n setUpdater(update);\n }, [setUpdater, update]);\n\n const options = useConfigurationOptions();\n\n const dimmed = useActiveModalCount(validateDimmable, version);\n\n return (\n <div\n className={anchor}\n style={{\n transitionDuration: options.duration,\n backgroundColor: dimmed ? options.backdrop : 'transparent',\n }}\n >\n {map(modalIds, (id) => (\n <Presenter key={id} modalId={id} />\n ))}\n </div>\n );\n};\n\nconst validateDimmable = (modal?: ModalNode) => modal?.visible && modal.dimmed;\n\nexport const Anchor = memo(withErrorBoundary(AnchorInner));\n","import { createPortal } from 'react-dom';\n\nimport type { Dictionary, Fn } from '@aileron/declare';\n\nimport { Anchor } from '@/promise-modal/components/Anchor';\nimport {\n ConfigurationContextProvider,\n type ConfigurationContextProviderProps,\n} from '@/promise-modal/providers/ConfigurationContext';\nimport { ModalManagerContextProvider } from '@/promise-modal/providers/ModalManagerContext';\nimport { UserDefinedContextProvider } from '@/promise-modal/providers/UserDefinedContext';\n\ninterface BootstrapProps extends ConfigurationContextProviderProps {\n usePathname: Fn<[], { pathname: string }>;\n context?: Dictionary;\n anchor: HTMLElement;\n}\n\nexport const bootstrap = ({\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n usePathname,\n options,\n context,\n anchor,\n}: BootstrapProps) =>\n createPortal(\n <UserDefinedContextProvider context={context}>\n <ConfigurationContextProvider\n ForegroundComponent={ForegroundComponent}\n BackgroundComponent={BackgroundComponent}\n TitleComponent={TitleComponent}\n SubtitleComponent={SubtitleComponent}\n ContentComponent={ContentComponent}\n FooterComponent={FooterComponent}\n options={options}\n >\n <ModalManagerContextProvider usePathname={usePathname}>\n <Anchor />\n </ModalManagerContextProvider>\n </ConfigurationContextProvider>\n </UserDefinedContextProvider>,\n anchor,\n );\n","import { useCallback, useRef } from 'react';\n\nimport { printError } from '@winglet/common-utils/console';\nimport { useVersion } from '@winglet/react-utils/hook';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\n\nexport const useInitialize = () => {\n const permitted = useRef(ModalManager.activate());\n const anchorRef = useRef<HTMLElement | null>(null);\n const [, update] = useVersion();\n\n const handleInitialize = useCallback(\n (root?: HTMLElement) => {\n if (permitted.current) {\n anchorRef.current = ModalManager.anchor({ root });\n update();\n } else\n printError(\n 'ModalProvider is already initialized',\n [\n 'ModalProvider can only be initialized once.',\n 'Nesting ModalProvider will be ignored...',\n ],\n {\n info: 'Something is wrong with the ModalProvider initialization...',\n },\n );\n },\n [update],\n );\n\n return {\n anchorRef,\n handleInitialize,\n } as const;\n};\n","import {\n Fragment,\n type PropsWithChildren,\n forwardRef,\n useImperativeHandle,\n useMemo,\n} from 'react';\n\nimport { useOnMount } from '@winglet/react-utils/hook';\n\nimport { usePathname as useDefaultPathname } from '@/promise-modal/hooks/useDefaultPathname';\n\nimport { bootstrap } from './helpers/bootstrap';\nimport { useInitialize } from './hooks/useInitialize';\nimport type { BootstrapProviderHandle, BootstrapProviderProps } from './type';\n\nexport const BootstrapProvider = forwardRef<\n BootstrapProviderHandle,\n PropsWithChildren<BootstrapProviderProps>\n>(\n (\n {\n usePathname: useExternalPathname,\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n options,\n context,\n children,\n },\n handleRef,\n ) => {\n const usePathname = useMemo(\n () => useExternalPathname || useDefaultPathname,\n [useExternalPathname],\n );\n\n const { anchorRef, handleInitialize } = useInitialize();\n\n useImperativeHandle(\n handleRef,\n () => ({\n initialize: handleInitialize,\n }),\n [handleInitialize],\n );\n\n useOnMount(() => {\n /**\n * NOTE: `handleRef` being null indicates that no `ref` was provided.\n * In this case, the `ModalProvider`(=`BootstrapProvider`) is not receiving the `ref`,\n * so it should be initialized automatically.\n */\n if (handleRef === null) handleInitialize();\n return () => {\n if (anchorRef.current) anchorRef.current.remove();\n };\n });\n\n return (\n <Fragment>\n {children}\n {anchorRef.current &&\n bootstrap({\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n usePathname,\n options,\n context,\n anchor: anchorRef.current,\n })}\n </Fragment>\n );\n },\n);\n","import type { ComponentType, ReactNode } from 'react';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\nimport type {\n AlertContentProps,\n AlertFooterRender,\n BackgroundComponent,\n FooterOptions,\n ForegroundComponent,\n ModalBackground,\n} from '@/promise-modal/types';\n\ninterface AlertProps<B> {\n subtype?: 'info' | 'success' | 'warning' | 'error';\n title?: ReactNode;\n subtitle?: ReactNode;\n content?: ReactNode | ComponentType<AlertContentProps>;\n background?: ModalBackground<B>;\n footer?:\n | AlertFooterRender\n | Pick<FooterOptions, 'confirm' | 'hideConfirm'>\n | false;\n dimmed?: boolean;\n manualDestroy?: boolean;\n closeOnBackdropClick?: boolean;\n ForegroundComponent?: ForegroundComponent;\n BackgroundComponent?: BackgroundComponent;\n}\n\nexport const alert = <B = any>({\n subtype,\n title,\n subtitle,\n content,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n}: AlertProps<B>) => {\n return new Promise<void>((resolve, reject) => {\n try {\n ModalManager.open({\n type: 'alert',\n subtype,\n resolve: () => resolve(),\n title,\n subtitle,\n content,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n });\n } catch (error) {\n reject(error);\n }\n });\n};\n","import type { ComponentType, ReactNode } from 'react';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\nimport type {\n BackgroundComponent,\n ConfirmContentProps,\n ConfirmFooterRender,\n FooterOptions,\n ForegroundComponent,\n ModalBackground,\n} from '@/promise-modal/types';\n\ninterface ConfirmProps<B> {\n subtype?: 'info' | 'success' | 'warning' | 'error';\n title?: ReactNode;\n subtitle?: ReactNode;\n content?: ReactNode | ComponentType<ConfirmContentProps>;\n background?: ModalBackground<B>;\n footer?: ConfirmFooterRender | FooterOptions | false;\n dimmed?: boolean;\n manualDestroy?: boolean;\n closeOnBackdropClick?: boolean;\n ForegroundComponent?: ForegroundComponent;\n BackgroundComponent?: BackgroundComponent;\n}\n\nexport const confirm = <B = any>({\n subtype,\n title,\n subtitle,\n content,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n}: ConfirmProps<B>) => {\n return new Promise<boolean>((resolve, reject) => {\n try {\n ModalManager.open({\n type: 'confirm',\n subtype,\n resolve: (result) => resolve(result ?? false),\n title,\n subtitle,\n content,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n });\n } catch (error) {\n reject(error);\n }\n });\n};\n","import type { ComponentType, ReactNode } from 'react';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\nimport type {\n BackgroundComponent,\n FooterOptions,\n ForegroundComponent,\n ModalBackground,\n PromptContentProps,\n PromptFooterRender,\n PromptInputProps,\n} from '@/promise-modal/types';\n\ninterface PromptProps<T, B = any> {\n title?: ReactNode;\n subtitle?: ReactNode;\n content?: ReactNode | ComponentType<PromptContentProps>;\n Input: (props: PromptInputProps<T>) => ReactNode;\n defaultValue?: T;\n disabled?: (value: T) => boolean;\n returnOnCancel?: boolean;\n background?: ModalBackground<B>;\n footer?: PromptFooterRender<T> | FooterOptions | false;\n dimmed?: boolean;\n manualDestroy?: boolean;\n closeOnBackdropClick?: boolean;\n ForegroundComponent?: ForegroundComponent;\n BackgroundComponent?: BackgroundComponent;\n}\n\nexport const prompt = <T, B = any>({\n defaultValue,\n title,\n subtitle,\n content,\n Input,\n disabled,\n returnOnCancel,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n}: PromptProps<T, B>) => {\n return new Promise<T>((resolve, reject) => {\n try {\n ModalManager.open({\n type: 'prompt',\n resolve: (result) => resolve(result as T),\n title,\n subtitle,\n content,\n Input,\n defaultValue,\n disabled,\n returnOnCancel,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n });\n } catch (error) {\n reject(error);\n }\n });\n};\n","import { useEffect, useRef } from 'react';\n\nimport { convertMsFromDuration } from '@winglet/common-utils/convert';\nimport { isString } from '@winglet/common-utils/filter';\n\nimport type { Duration } from '@aileron/declare';\n\nimport type { ModalNode } from '@/promise-modal/core';\nimport { useModal } from '@/promise-modal/providers';\n\nimport { useSubscribeModal } from './useSubscribeModal';\n\nexport const useDestroyAfter = (\n modalId: ModalNode['id'],\n duration: Duration | number,\n) => {\n const { modal, onDestroy } = useModal(modalId);\n const tick = useSubscribeModal(modal);\n\n const reference = useRef({\n modal,\n onDestroy,\n milliseconds: isString(duration)\n ? convertMsFromDuration(duration)\n : duration,\n });\n\n useEffect(() => {\n const { modal, onDestroy, milliseconds } = reference.current;\n if (!modal || modal.visible || !modal.alive) return;\n const timer = setTimeout(() => {\n onDestroy();\n }, milliseconds);\n return () => {\n if (timer) clearTimeout(timer);\n };\n }, [tick]);\n};\n","import { useCallback, useMemo } from 'react';\n\nimport { useOnMount } from '@winglet/react-utils/hook';\n\nimport { usePathname as useDefaultPathname } from '@/promise-modal/hooks/useDefaultPathname';\n\nimport { bootstrap } from './helpers/bootstrap';\nimport { useInitialize } from './hooks/useInitialize';\nimport type { BootstrapProviderProps } from './type';\n\nexport const useBootstrap = ({\n usePathname: useExternalPathname,\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n options,\n context,\n mode = 'auto',\n}: BootstrapProviderProps & { mode?: 'manual' | 'auto' } = {}) => {\n const usePathname = useMemo(\n () => useExternalPathname || useDefaultPathname,\n [useExternalPathname],\n );\n\n const { anchorRef, handleInitialize } = useInitialize();\n\n useOnMount(() => {\n if (mode === 'auto') handleInitialize();\n return () => {\n if (anchorRef.current) anchorRef.current.remove();\n };\n });\n\n const initialize = useCallback(\n (element: HTMLElement) => {\n if (mode === 'manual') handleInitialize(element);\n },\n [mode, handleInitialize],\n );\n\n const portal =\n anchorRef.current &&\n bootstrap({\n usePathname,\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n options,\n context,\n anchor: anchorRef.current,\n });\n\n return { portal, initialize };\n};\n","import { useLayoutEffect, useRef } from 'react';\n\nimport type { Fn } from '@aileron/declare';\n\ninterface ModalAnimationHandler {\n onVisible?: Fn;\n onHidden?: Fn;\n}\n\nexport const useModalAnimation = (\n visible: boolean,\n handler: ModalAnimationHandler,\n) => {\n const handlerRef = useRef(handler);\n handlerRef.current = handler;\n useLayoutEffect(() => {\n if (!handlerRef.current) return;\n let frame: ReturnType<typeof requestAnimationFrame>;\n if (visible)\n frame = requestAnimationFrame(() => handlerRef.current.onVisible?.());\n else frame = requestAnimationFrame(() => handlerRef.current.onHidden?.());\n return () => {\n if (frame) cancelAnimationFrame(frame);\n };\n }, [visible]);\n};\n"],"names":["ModalManager","static","activate","active","anchor","options","document","getElementById","id","tag","prefix","root","body","node","createElement","setAttribute","getRandomString","appendChild","prerender","prerenderList","modal","push","openHandler","handler","unanchored","reset","open","AbstractNode","initiator","title","subtitle","background","manualDestroy","closeOnBackdropClick","dimmed","ForegroundComponent","BackgroundComponent","alive","this","visible","resolve","listeners","Set","constructor","subscribe","listener","add","delete","publish","result","onDestroy","needPublish","onShow","onHide","AlertNode","type","subtype","content","footer","super","onClose","onConfirm","ConfirmNode","PromptNode","defaultValue","Input","disabled","returnOnCancel","value","onChange","nodeFactory","Error","ModalManagerContext","createContext","ModalManagerContextProvider","memo","usePathname","children","modalDictionary","useRef","Map","modalIds","setModalIds","useState","modalIdsRef","useReference","pathname","modalIdSequence","useConfigurationOptions","duration","useMemo","convertMsFromDuration","useOnMountLayout","data","current","undefined","set","ids","aliveIds","index","length","get","useLayoutEffect","getModalNode","useCallback","modalId","updaterRef","hideModal","setTimeout","getModal","setUpdater","updater","_jsx","jsx","Provider","useModalManagerContext","useContext","useModal","fallback","css","process","env","NODE_ENV","name","styles","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","frame","FallbackTitle","className","FallbackSubtitle","FallbackContent","FallbackFooter","confirmLabel","hideConfirm","cancelLabel","hideCancel","onCancel","_jsxs","onClick","defaultValidate","useActiveModalCount","validate","refreshKey","count","FallbackForegroundFrame","forwardRef","onChangeOrder","ref","activeCount","level","offset","stacked","Math","floor","style","marginBottom","marginLeft","transform","ConfigurationContext","ConfigurationContextProvider","TitleComponent","SubtitleComponent","ContentComponent","FooterComponent","backdrop","useConfigurationContext","UserDefinedContext","UserDefinedContextProvider","context","contextValue","useUserDefinedContext","setPathname","window","location","requestId","checkPathname","cancelAnimationFrame","requestAnimationFrame","BackgroundFrame","userDefinedContext","handleClose","event","stopPropagation","Background","cx","visible$1","active$1","foreground","AlertInner","handlers","handleConfirm","useHandle","Fragment","isString","renderComponent","confirm","ConfirmInner","cancel","PromptInner","checkDisabled","withErrorBoundary","setValue","handleChange","inputValue","input","isFunction","ForegroundFrame","Foreground","useSubscribeModal","version","update","useVersion","useEffect","presenter","increment","counterFactory","Presenter","handleChangeOrder","zIndex","validateDimmable","Anchor","transitionDuration","backgroundColor","map","bootstrap","createPortal","useInitialize","permitted","anchorRef","handleInitialize","printError","info","BootstrapProvider","useExternalPathname","handleRef","useDefaultPathname","useImperativeHandle","initialize","useOnMount","remove","Promise","reject","error","tick","reference","milliseconds","timer","clearTimeout","mode","element","portal","handlerRef","onVisible","onHidden"],"mappings":"qvCAMaA,aACXC,SAAiB,EACjB,eAAOC,GACL,OAAIF,cAAaG,EAAgB,EACzBH,cAAaG,EAAU,EAGjCF,SAAqC,KACrC,aAAOG,CAAOC,GAKZ,GAAIL,cAAaI,EAAS,CACxB,MAAMA,EAASE,SAASC,eAAeP,cAAaI,EAAQI,IAC5D,GAAIJ,EAAQ,OAAOA,EAErB,MAAMK,IACJA,EAAM,MAAKC,OACXA,EAAS,gBAAeC,KACxBA,EAAOL,SAASM,MACdP,GAAW,CAAE,EACXQ,EAAOP,SAASQ,cAAcL,GAIpC,OAHAI,EAAKE,aAAa,KAAM,GAAGL,KAAUM,EAAeA,gBAAC,OACrDL,EAAKM,YAAYJ,GACjBb,cAAaI,EAAUS,EAChBA,EAGTZ,SAAiC,GACjC,oBAAWiB,GACT,OAAOlB,cAAamB,EAGtBlB,SAA0CmB,GACxCpB,cAAamB,EAAeE,KAAKD,GACnC,sBAAWE,CAAYC,GACrBvB,cAAasB,EAAeC,EAC5BvB,cAAamB,EAAiB,GAGhC,qBAAWK,GACT,OAAQxB,cAAaI,EAGvB,YAAOqB,GACLzB,cAAaG,EAAU,EACvBH,cAAaI,EAAU,KACvBJ,cAAamB,EAAiB,GAC9BnB,c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H,gBAExCY,EAAAA,YAAW,KACI,SAATU,GAAiBnB,IACd,KACDD,EAAUvI,SAASuI,EAAUvI,QAAQkJ,QAAQ,KAIrD,MAAMF,EAAatI,eAChBkJ,IACc,WAATD,GAAmBnB,EAAiBoB,EAAQ,GAElD,CAACD,EAAMnB,IAkBT,MAAO,CAAEqB,OAdPtB,EAAUvI,SACVmI,UAAU,aACRrJ,EACAzC,sBACAC,sBACA6H,iBACAC,oBACAC,mBACAC,kBACA/J,UACAoK,UACArK,OAAQiO,EAAUvI,UAGLgJ,aAAY,4BCjDE,CAC/BvM,EACAhB,KAEA,MAAMqO,EAAa7K,EAAMA,OAACxD,GAC1BqO,EAAW9J,QAAUvE,EACrB+E,EAAAA,iBAAgB,KACd,IAAKsJ,EAAW9J,QAAS,OACzB,IAAIiC,EAIJ,OAFEA,EADExF,EACM2I,uBAAsB,IAAM0E,EAAW9J,QAAQ+J,gBAC5C3E,uBAAsB,IAAM0E,EAAW9J,QAAQgK,eACrD,KACD/H,GAAOkD,qBAAqBlD,EAAM,CACvC,GACA,CAACxF,GAAS,2BzBHyB,IACtBiD,0BACD6E,kCAVuB,KACtC,MAAMI,EAAUjF,0BAChB,MAAO,CACLC,SAAUgF,EAAQhF,SAClB6J,aAAc3J,EAAAA,sBAAsB8E,EAAQhF,UAC7C"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,IAAI,eAAe,EAC1C,wBAAwB,IAAI,gBAAgB,EAC5C,wBAAwB,IAAI,gBAAgB,GAC7C,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,YAAY,IAAI,kBAAkB,EAClC,iBAAiB,IAAI,aAAa,EAClC,KAAK,uBAAuB,IAAI,mBAAmB,EACnD,KAAK,sBAAsB,IAAI,kBAAkB,GAClD,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhD,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/app/ModalManager.ts","../src/core/handle/alert.ts","../src/core/handle/confirm.ts","../src/core/handle/prompt.ts","../src/core/node/ModalNode/AbstractNode.ts","../src/core/node/ModalNode/AlertNode.ts","../src/core/node/ModalNode/ConfirmNode.ts","../src/core/node/ModalNode/PromptNode.ts","../src/core/node/nodeFactory.ts","../src/providers/ModalManagerContext/ModalManagerContext.ts","../src/providers/ModalManagerContext/ModalManagerContextProvider.tsx","../src/providers/ModalManagerContext/useModalManagerContext.ts","../src/components/FallbackComponents/classNames.emotion.ts","../src/components/FallbackComponents/FallbackTitle.tsx","../src/components/FallbackComponents/FallbackSubtitle.tsx","../src/components/FallbackComponents/FallbackContent.tsx","../src/components/FallbackComponents/FallbackFooter.tsx","../src/hooks/useActiveModalCount.ts","../src/components/FallbackComponents/FallbackForegroundFrame.tsx","../src/providers/ConfigurationContext/ConfigurationContext.ts","../src/providers/ConfigurationContext/ConfigurationContextProvider.tsx","../src/app/constant.ts","../src/providers/ConfigurationContext/useConfigurationContext.ts","../src/providers/UserDefinedContext/UserDefinedContext.ts","../src/providers/UserDefinedContext/UserDefinedContextProvider.tsx","../src/providers/UserDefinedContext/useUserDefinedContext.ts","../src/hooks/useDefaultPathname.ts","../src/components/Background/classNames.emotion.ts","../src/components/Background/Background.tsx","../src/components/Foreground/classNames.emotion.ts","../src/components/Foreground/components/AlertInner.tsx","../src/components/Foreground/components/ConfirmInner.tsx","../src/components/Foreground/components/PromptInner.tsx","../src/components/Foreground/Foreground.tsx","../src/hooks/useSubscribeModal.ts","../src/components/Presenter/classNames.emotion.ts","../src/components/Presenter/Presenter.tsx","../src/components/Anchor/classNames.emotion.ts","../src/components/Anchor/Anchor.tsx","../src/bootstrap/BootstrapProvider/helpers/bootstrap.tsx","../src/bootstrap/BootstrapProvider/hooks/useInitialize.ts","../src/bootstrap/BootstrapProvider/BootstrapProvider.tsx","../src/bootstrap/BootstrapProvider/useBootstrap.tsx","../src/hooks/useDestroyAfter.ts","../src/hooks/useModalAnimation.ts"],"sourcesContent":["import { getRandomString } from '@winglet/common-utils/lib';\n\nimport type { Fn } from '@aileron/declare';\n\nimport type { Modal } from '@/promise-modal/types';\n\nexport class ModalManager {\n static #active = false;\n static activate() {\n if (ModalManager.#active) return false;\n return (ModalManager.#active = true);\n }\n\n static #anchor: HTMLElement | null = null;\n static anchor(options?: {\n tag?: string;\n prefix?: string;\n root?: HTMLElement;\n }): HTMLElement {\n if (ModalManager.#anchor) {\n const anchor = document.getElementById(ModalManager.#anchor.id);\n if (anchor) return anchor;\n }\n const {\n tag = 'div',\n prefix = 'promise-modal',\n root = document.body,\n } = options || {};\n const node = document.createElement(tag);\n node.setAttribute('id', `${prefix}-${getRandomString(36)}`);\n root.appendChild(node);\n ModalManager.#anchor = node;\n return node;\n }\n\n static #prerenderList: Modal[] = [];\n static get prerender() {\n return ModalManager.#prerenderList;\n }\n\n static #openHandler: Fn<[Modal], void> = (modal: Modal) =>\n ModalManager.#prerenderList.push(modal);\n static set openHandler(handler: Fn<[Modal], void>) {\n ModalManager.#openHandler = handler;\n ModalManager.#prerenderList = [];\n }\n\n static get unanchored() {\n return !ModalManager.#anchor;\n }\n\n static reset() {\n ModalManager.#active = false;\n ModalManager.#anchor = null;\n ModalManager.#prerenderList = [];\n ModalManager.#openHandler = (modal: Modal) =>\n ModalManager.#prerenderList.push(modal);\n }\n\n static open(modal: Modal) {\n ModalManager.#openHandler(modal);\n }\n}\n","import type { ComponentType, ReactNode } from 'react';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\nimport type {\n AlertContentProps,\n AlertFooterRender,\n BackgroundComponent,\n FooterOptions,\n ForegroundComponent,\n ModalBackground,\n} from '@/promise-modal/types';\n\ninterface AlertProps<B> {\n subtype?: 'info' | 'success' | 'warning' | 'error';\n title?: ReactNode;\n subtitle?: ReactNode;\n content?: ReactNode | ComponentType<AlertContentProps>;\n background?: ModalBackground<B>;\n footer?:\n | AlertFooterRender\n | Pick<FooterOptions, 'confirm' | 'hideConfirm'>\n | false;\n dimmed?: boolean;\n manualDestroy?: boolean;\n closeOnBackdropClick?: boolean;\n ForegroundComponent?: ForegroundComponent;\n BackgroundComponent?: BackgroundComponent;\n}\n\nexport const alert = <B = any>({\n subtype,\n title,\n subtitle,\n content,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n}: AlertProps<B>) => {\n return new Promise<void>((resolve, reject) => {\n try {\n ModalManager.open({\n type: 'alert',\n subtype,\n resolve: () => resolve(),\n title,\n subtitle,\n content,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n });\n } catch (error) {\n reject(error);\n }\n });\n};\n","import type { ComponentType, ReactNode } from 'react';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\nimport type {\n BackgroundComponent,\n ConfirmContentProps,\n ConfirmFooterRender,\n FooterOptions,\n ForegroundComponent,\n ModalBackground,\n} from '@/promise-modal/types';\n\ninterface ConfirmProps<B> {\n subtype?: 'info' | 'success' | 'warning' | 'error';\n title?: ReactNode;\n subtitle?: ReactNode;\n content?: ReactNode | ComponentType<ConfirmContentProps>;\n background?: ModalBackground<B>;\n footer?: ConfirmFooterRender | FooterOptions | false;\n dimmed?: boolean;\n manualDestroy?: boolean;\n closeOnBackdropClick?: boolean;\n ForegroundComponent?: ForegroundComponent;\n BackgroundComponent?: BackgroundComponent;\n}\n\nexport const confirm = <B = any>({\n subtype,\n title,\n subtitle,\n content,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n}: ConfirmProps<B>) => {\n return new Promise<boolean>((resolve, reject) => {\n try {\n ModalManager.open({\n type: 'confirm',\n subtype,\n resolve: (result) => resolve(result ?? false),\n title,\n subtitle,\n content,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n });\n } catch (error) {\n reject(error);\n }\n });\n};\n","import type { ComponentType, ReactNode } from 'react';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\nimport type {\n BackgroundComponent,\n FooterOptions,\n ForegroundComponent,\n ModalBackground,\n PromptContentProps,\n PromptFooterRender,\n PromptInputProps,\n} from '@/promise-modal/types';\n\ninterface PromptProps<T, B = any> {\n title?: ReactNode;\n subtitle?: ReactNode;\n content?: ReactNode | ComponentType<PromptContentProps>;\n Input: (props: PromptInputProps<T>) => ReactNode;\n defaultValue?: T;\n disabled?: (value: T) => boolean;\n returnOnCancel?: boolean;\n background?: ModalBackground<B>;\n footer?: PromptFooterRender<T> | FooterOptions | false;\n dimmed?: boolean;\n manualDestroy?: boolean;\n closeOnBackdropClick?: boolean;\n ForegroundComponent?: ForegroundComponent;\n BackgroundComponent?: BackgroundComponent;\n}\n\nexport const prompt = <T, B = any>({\n defaultValue,\n title,\n subtitle,\n content,\n Input,\n disabled,\n returnOnCancel,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n}: PromptProps<T, B>) => {\n return new Promise<T>((resolve, reject) => {\n try {\n ModalManager.open({\n type: 'prompt',\n resolve: (result) => resolve(result as T),\n title,\n subtitle,\n content,\n Input,\n defaultValue,\n disabled,\n returnOnCancel,\n background,\n footer,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n ForegroundComponent,\n BackgroundComponent,\n });\n } catch (error) {\n reject(error);\n }\n });\n};\n","import type { ReactNode } from 'react';\n\nimport type { Fn } from '@aileron/declare';\n\nimport type {\n BackgroundComponent,\n BaseModal,\n ForegroundComponent,\n ManagedEntity,\n ModalBackground,\n} from '@/promise-modal/types';\n\ntype AbstractNodeProps<T, B> = BaseModal<T, B> & ManagedEntity;\n\nexport abstract class AbstractNode<T, B> {\n readonly id: number;\n readonly initiator: string;\n\n readonly title?: ReactNode;\n readonly subtitle?: ReactNode;\n readonly background?: ModalBackground<B>;\n\n readonly manualDestroy: boolean;\n readonly closeOnBackdropClick: boolean;\n readonly dimmed: boolean;\n\n readonly ForegroundComponent?: ForegroundComponent;\n readonly BackgroundComponent?: BackgroundComponent;\n\n #alive: boolean;\n get alive() {\n return this.#alive;\n }\n #visible: boolean;\n get visible() {\n return this.#visible;\n }\n\n #resolve: (result: T | null) => void;\n #listeners: Set<Fn> = new Set();\n\n constructor({\n id,\n initiator,\n title,\n subtitle,\n background,\n dimmed = true,\n manualDestroy = false,\n closeOnBackdropClick = true,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n }: AbstractNodeProps<T, B>) {\n this.id = id;\n this.initiator = initiator;\n this.title = title;\n this.subtitle = subtitle;\n this.background = background;\n\n this.dimmed = dimmed;\n this.manualDestroy = manualDestroy;\n this.closeOnBackdropClick = closeOnBackdropClick;\n\n this.ForegroundComponent = ForegroundComponent;\n this.BackgroundComponent = BackgroundComponent;\n\n this.#alive = true;\n this.#visible = true;\n this.#resolve = resolve;\n }\n\n subscribe(listener: Fn) {\n this.#listeners.add(listener);\n return () => {\n this.#listeners.delete(listener);\n };\n }\n publish() {\n for (const listener of this.#listeners) listener();\n }\n protected resolve(result: T | null) {\n this.#resolve(result);\n }\n onDestroy() {\n const needPublish = this.#alive === true;\n this.#alive = false;\n if (this.manualDestroy && needPublish) this.publish();\n }\n onShow() {\n const needPublish = this.#visible === false;\n this.#visible = true;\n if (needPublish) this.publish();\n }\n onHide() {\n const needPublish = this.#visible === true;\n this.#visible = false;\n if (needPublish) this.publish();\n }\n abstract onClose(): void;\n abstract onConfirm(): void;\n}\n","import type { ComponentType, ReactNode } from 'react';\n\nimport type {\n AlertContentProps,\n AlertFooterRender,\n AlertModal,\n FooterOptions,\n ManagedEntity,\n} from '@/promise-modal/types';\n\nimport { AbstractNode } from './AbstractNode';\n\ntype AlertNodeProps<B> = AlertModal<B> & ManagedEntity;\n\nexport class AlertNode<B> extends AbstractNode<null, B> {\n readonly type: 'alert';\n readonly subtype?: 'info' | 'success' | 'warning' | 'error';\n readonly content?: ReactNode | ComponentType<AlertContentProps>;\n readonly footer?:\n | AlertFooterRender\n | Pick<FooterOptions, 'confirm' | 'hideConfirm'>\n | false;\n\n constructor({\n id,\n initiator,\n type,\n subtype,\n title,\n subtitle,\n content,\n footer,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n }: AlertNodeProps<B>) {\n super({\n id,\n initiator,\n title,\n subtitle,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n });\n this.type = type;\n this.subtype = subtype;\n this.content = content;\n this.footer = footer;\n }\n onClose() {\n this.resolve(null);\n }\n onConfirm() {\n this.resolve(null);\n }\n}\n","import type { ComponentType, ReactNode } from 'react';\n\nimport type {\n ConfirmContentProps,\n ConfirmFooterRender,\n ConfirmModal,\n FooterOptions,\n ManagedEntity,\n} from '@/promise-modal/types';\n\nimport { AbstractNode } from './AbstractNode';\n\ntype ConfirmNodeProps<B> = ConfirmModal<B> & ManagedEntity;\n\nexport class ConfirmNode<B> extends AbstractNode<boolean, B> {\n readonly type: 'confirm';\n readonly subtype?: 'info' | 'success' | 'warning' | 'error';\n readonly content?: ReactNode | ComponentType<ConfirmContentProps>;\n readonly footer?: ConfirmFooterRender | FooterOptions | false;\n\n constructor({\n id,\n initiator,\n type,\n subtype,\n title,\n subtitle,\n content,\n footer,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n }: ConfirmNodeProps<B>) {\n super({\n id,\n initiator,\n title,\n subtitle,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n });\n this.type = type;\n this.subtype = subtype;\n this.content = content;\n this.footer = footer;\n }\n onClose() {\n this.resolve(false);\n }\n onConfirm() {\n this.resolve(true);\n }\n}\n","import type { ComponentType, ReactNode } from 'react';\n\nimport type {\n FooterOptions,\n ManagedEntity,\n PromptContentProps,\n PromptFooterRender,\n PromptInputProps,\n PromptModal,\n} from '@/promise-modal/types';\n\nimport { AbstractNode } from './AbstractNode';\n\ntype PromptNodeProps<T, B> = PromptModal<T, B> & ManagedEntity;\n\nexport class PromptNode<T, B> extends AbstractNode<T, B> {\n readonly type: 'prompt';\n readonly content?: ReactNode | ComponentType<PromptContentProps>;\n readonly defaultValue: T | undefined;\n readonly Input: (props: PromptInputProps<T>) => ReactNode;\n readonly disabled?: (value: T) => boolean;\n readonly returnOnCancel?: boolean;\n readonly footer?: PromptFooterRender<T> | FooterOptions | false;\n\n #value: T | undefined;\n\n constructor({\n id,\n initiator,\n type,\n title,\n subtitle,\n content,\n defaultValue,\n Input,\n disabled,\n returnOnCancel,\n footer,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n }: PromptNodeProps<T, B>) {\n super({\n id,\n initiator,\n title,\n subtitle,\n background,\n dimmed,\n manualDestroy,\n closeOnBackdropClick,\n resolve,\n ForegroundComponent,\n BackgroundComponent,\n });\n this.type = type;\n this.content = content;\n this.Input = Input;\n this.defaultValue = defaultValue;\n this.#value = defaultValue;\n this.disabled = disabled;\n this.returnOnCancel = returnOnCancel;\n this.footer = footer;\n }\n\n onChange(value: T) {\n this.#value = value;\n }\n onConfirm() {\n this.resolve(this.#value ?? null);\n }\n onClose() {\n if (this.returnOnCancel) this.resolve(this.#value ?? null);\n else this.resolve(null);\n }\n}\n","import type { ManagedModal } from '@/promise-modal/types';\n\nimport { AlertNode, ConfirmNode, PromptNode } from './ModalNode';\n\nexport const nodeFactory = <T, B>(modal: ManagedModal<T, B>) => {\n switch (modal.type) {\n case 'alert':\n return new AlertNode<B>(modal);\n case 'confirm':\n return new ConfirmNode<B>(modal);\n case 'prompt':\n return new PromptNode<T, B>(modal);\n }\n // @ts-expect-error: This state is unreachable by design and should NEVER occur.\n throw new Error(`Unknown modal: ${modal.type}`, { modal });\n};\n","import { createContext } from 'react';\n\nimport type { Fn } from '@aileron/declare';\n\nimport type { ModalNode } from '@/promise-modal/core';\nimport type { ModalActions, ModalHandlersWithId } from '@/promise-modal/types';\n\nexport interface ModalManagerContextProps extends ModalHandlersWithId {\n modalIds: ModalNode['id'][];\n getModal: Fn<[id: ModalNode['id']], ModalActions>;\n getModalNode: Fn<[id: ModalNode['id']], ModalNode | undefined>;\n setUpdater: Fn<[updater: Fn]>;\n}\n\nexport const ModalManagerContext = createContext<ModalManagerContextProps>(\n {} as ModalManagerContextProps,\n);\n","import {\n type PropsWithChildren,\n memo,\n useCallback,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { convertMsFromDuration } from '@winglet/common-utils/convert';\nimport { useOnMountLayout, useReference } from '@winglet/react-utils/hook';\n\nimport type { Fn } from '@aileron/declare';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\nimport { type ModalNode, nodeFactory } from '@/promise-modal/core';\nimport { useConfigurationOptions } from '@/promise-modal/providers';\nimport type { Modal } from '@/promise-modal/types';\n\nimport { ModalManagerContext } from './ModalManagerContext';\n\ninterface ModalManagerContextProviderProps {\n usePathname: Fn<[], { pathname: string }>;\n}\n\nexport const ModalManagerContextProvider = memo(\n ({\n usePathname,\n children,\n }: PropsWithChildren<ModalManagerContextProviderProps>) => {\n const modalDictionary = useRef<Map<ModalNode['id'], ModalNode>>(new Map());\n\n const [modalIds, setModalIds] = useState<ModalNode['id'][]>([]);\n const modalIdsRef = useReference(modalIds);\n const { pathname } = usePathname();\n\n const initiator = useRef(pathname);\n const modalIdSequence = useRef(0);\n\n const options = useConfigurationOptions();\n\n const duration = useMemo(\n () => convertMsFromDuration(options.duration),\n [options],\n );\n\n useOnMountLayout(() => {\n const { manualDestroy, closeOnBackdropClick } = options;\n\n for (const data of ModalManager.prerender) {\n const modal = nodeFactory({\n ...data,\n id: modalIdSequence.current++,\n initiator: initiator.current,\n manualDestroy:\n data.manualDestroy !== undefined\n ? data.manualDestroy\n : manualDestroy,\n closeOnBackdropClick:\n data.closeOnBackdropClick !== undefined\n ? data.closeOnBackdropClick\n : closeOnBackdropClick,\n });\n modalDictionary.current.set(modal.id, modal);\n setModalIds((ids) => [...ids, modal.id]);\n }\n\n ModalManager.openHandler = (data: Modal) => {\n const modal = nodeFactory({\n ...data,\n id: modalIdSequence.current++,\n initiator: initiator.current,\n manualDestroy:\n data.manualDestroy !== undefined\n ? data.manualDestroy\n : manualDestroy,\n closeOnBackdropClick:\n data.closeOnBackdropClick !== undefined\n ? data.closeOnBackdropClick\n : closeOnBackdropClick,\n });\n modalDictionary.current.set(modal.id, modal);\n setModalIds((ids) => {\n const aliveIds: number[] = [];\n for (let index = 0; index < ids.length; index++) {\n const id = ids[index];\n const destroyed = !modalDictionary.current.get(id)?.alive;\n if (destroyed) modalDictionary.current.delete(id);\n else aliveIds.push(id);\n }\n return [...aliveIds, modal.id];\n });\n };\n return () => {\n ModalManager.reset();\n };\n });\n\n useLayoutEffect(() => {\n for (const id of modalIdsRef.current) {\n const modal = modalDictionary.current.get(id);\n if (!modal?.alive) continue;\n if (modal.initiator === pathname) modal.onShow();\n else modal.onHide();\n }\n initiator.current = pathname;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pathname]);\n\n const getModalNode = useCallback((modalId: ModalNode['id']) => {\n return modalDictionary.current.get(modalId);\n }, []);\n\n const onDestroy = useCallback((modalId: ModalNode['id']) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n modal.onDestroy();\n updaterRef.current?.();\n }, []);\n\n const updaterRef = useRef<Fn>(undefined);\n const hideModal = useCallback(\n (modalId: ModalNode['id']) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n modal.onHide();\n updaterRef.current?.();\n if (!modal.manualDestroy)\n setTimeout(() => {\n modal.onDestroy();\n }, duration);\n },\n [duration],\n );\n\n const onChange = useCallback((modalId: ModalNode['id'], value: any) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n if (modal.type === 'prompt') modal.onChange(value);\n }, []);\n\n const onConfirm = useCallback(\n (modalId: ModalNode['id']) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n modal.onConfirm();\n hideModal(modalId);\n },\n [hideModal],\n );\n\n const onClose = useCallback(\n (modalId: ModalNode['id']) => {\n const modal = modalDictionary.current.get(modalId);\n if (!modal) return;\n modal.onClose();\n hideModal(modalId);\n },\n [hideModal],\n );\n\n const getModal = useCallback(\n (modalId: ModalNode['id']) => ({\n modal: getModalNode(modalId),\n onConfirm: () => onConfirm(modalId),\n onClose: () => onClose(modalId),\n onChange: (value: any) => onChange(modalId, value),\n onDestroy: () => onDestroy(modalId),\n }),\n [getModalNode, onConfirm, onClose, onChange, onDestroy],\n );\n\n const value = useMemo(() => {\n return {\n modalIds,\n getModalNode,\n onChange,\n onConfirm,\n onClose,\n onDestroy,\n getModal,\n setUpdater: (updater: Fn) => {\n updaterRef.current = updater;\n },\n };\n }, [\n modalIds,\n getModal,\n getModalNode,\n onChange,\n onConfirm,\n onClose,\n onDestroy,\n ]);\n\n return (\n <ModalManagerContext.Provider value={value}>\n {children}\n </ModalManagerContext.Provider>\n );\n },\n);\n","import { useContext, useMemo } from 'react';\n\nimport type { ManagedModal } from '@/promise-modal/types';\n\nimport { ModalManagerContext } from './ModalManagerContext';\n\nexport const useModalManagerContext = () => useContext(ModalManagerContext);\n\nexport const useModal = (id: ManagedModal['id']) => {\n const { getModal } = useModalManagerContext();\n return useMemo(() => getModal(id), [id, getModal]);\n};\n","import { css } from '@emotion/css';\n\nexport const fallback = css`\n margin: unset;\n`;\n\nexport const frame = css`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background-color: white;\n padding: 20px 80px;\n gap: 10px;\n border: 1px solid black;\n`;\n","import type { PropsWithChildren } from 'react';\n\nimport { fallback } from './classNames.emotion';\n\nexport const FallbackTitle = ({ children }: PropsWithChildren) => {\n return <h2 className={fallback}>{children}</h2>;\n};\n","import type { PropsWithChildren } from 'react';\n\nimport { fallback } from './classNames.emotion';\n\nexport const FallbackSubtitle = ({ children }: PropsWithChildren) => {\n return <h3 className={fallback}>{children}</h3>;\n};\n","import type { PropsWithChildren } from 'react';\n\nimport { fallback } from './classNames.emotion';\n\nexport const FallbackContent = ({ children }: PropsWithChildren) => {\n return <div className={fallback}>{children}</div>;\n};\n","import type { FooterComponentProps } from '@/promise-modal/types';\n\nexport const FallbackFooter = ({\n confirmLabel,\n hideConfirm = false,\n cancelLabel,\n hideCancel = false,\n disabled,\n onConfirm,\n onCancel,\n}: FooterComponentProps) => {\n return (\n <div>\n {!hideConfirm && (\n <button onClick={onConfirm} disabled={disabled}>\n {confirmLabel || 'Confirm'}\n </button>\n )}\n\n {!hideCancel && typeof onCancel === 'function' && (\n <button onClick={onCancel}>{cancelLabel || 'Cancel'}</button>\n )}\n </div>\n );\n};\n","import { useMemo } from 'react';\n\nimport type { Fn } from '@aileron/declare';\n\nimport type { ModalNode } from '@/promise-modal/core';\nimport { useModalManagerContext } from '@/promise-modal/providers';\n\nconst defaultValidate = (modal?: ModalNode) => modal?.visible;\n\nexport const useActiveModalCount = (\n validate: Fn<[ModalNode?], boolean | undefined> = defaultValidate,\n refreshKey: string | number = 0,\n) => {\n const { modalIds, getModalNode } = useModalManagerContext();\n return useMemo(() => {\n let count = 0;\n for (const id of modalIds) {\n if (validate(getModalNode(id))) count++;\n }\n return count;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [getModalNode, modalIds, refreshKey]);\n};\n","import {\n type ForwardedRef,\n type PropsWithChildren,\n forwardRef,\n useMemo,\n} from 'react';\n\nimport { useActiveModalCount } from '@/promise-modal/hooks/useActiveModalCount';\nimport type { ModalFrameProps } from '@/promise-modal/types';\n\nimport { frame } from './classNames.emotion';\n\nconst MAX_MODAL_COUNT = 5;\nconst MAX_MODAL_LEVEL = 3;\n\nexport const FallbackForegroundFrame = forwardRef(\n (\n { id, onChangeOrder, children }: PropsWithChildren<ModalFrameProps>,\n ref: ForwardedRef<HTMLDivElement>,\n ) => {\n const activeCount = useActiveModalCount();\n const [level, offset] = useMemo(() => {\n const stacked = activeCount > 1;\n const level = stacked\n ? (Math.floor(id / MAX_MODAL_COUNT) % MAX_MODAL_LEVEL) * 100\n : 0;\n const offset = stacked ? (id % MAX_MODAL_COUNT) * 35 : 0;\n return [level, offset];\n }, [activeCount, id]);\n\n return (\n <div\n ref={ref}\n className={frame}\n onClick={onChangeOrder}\n style={{\n marginBottom: `calc(25vh + ${level}px)`,\n marginLeft: `${level}px`,\n transform: `translate(${offset}px, ${offset}px)`,\n }}\n >\n {children}\n </div>\n );\n },\n);\n","import { type ComponentType, createContext } from 'react';\n\nimport type { Color, Duration } from '@aileron/declare';\n\nimport type {\n BackgroundComponent,\n FooterComponentProps,\n ForegroundComponent,\n WrapperComponentProps,\n} from '@/promise-modal/types';\n\nexport interface ConfigurationContextProps {\n ForegroundComponent: ForegroundComponent;\n BackgroundComponent?: BackgroundComponent;\n TitleComponent: ComponentType<WrapperComponentProps>;\n SubtitleComponent: ComponentType<WrapperComponentProps>;\n ContentComponent: ComponentType<WrapperComponentProps>;\n FooterComponent: ComponentType<FooterComponentProps>;\n options: {\n duration: Duration;\n backdrop: Color;\n manualDestroy: boolean;\n closeOnBackdropClick: boolean;\n };\n}\n\nexport const ConfigurationContext = createContext<ConfigurationContextProps>(\n {} as ConfigurationContextProps,\n);\n","import {\n type ComponentType,\n type PropsWithChildren,\n memo,\n useMemo,\n} from 'react';\n\nimport type { Color, Duration } from '@aileron/declare';\n\nimport {\n DEFAULT_ANIMATION_DURATION,\n DEFAULT_BACKDROP_COLOR,\n} from '@/promise-modal/app/constant';\nimport {\n FallbackContent,\n FallbackFooter,\n FallbackForegroundFrame,\n FallbackSubtitle,\n FallbackTitle,\n} from '@/promise-modal/components/FallbackComponents';\nimport type {\n FooterComponentProps,\n ModalFrameProps,\n WrapperComponentProps,\n} from '@/promise-modal/types';\n\nimport { ConfigurationContext } from './ConfigurationContext';\n\nexport interface ConfigurationContextProviderProps {\n BackgroundComponent?: ComponentType<ModalFrameProps>;\n ForegroundComponent?: ComponentType<ModalFrameProps>;\n TitleComponent?: ComponentType<WrapperComponentProps>;\n SubtitleComponent?: ComponentType<WrapperComponentProps>;\n ContentComponent?: ComponentType<WrapperComponentProps>;\n FooterComponent?: ComponentType<FooterComponentProps>;\n options?: {\n /** Modal transition time(ms, s) */\n duration?: Duration;\n /** Modal backdrop color */\n backdrop?: Color;\n /** Whether to destroy the modal manually */\n manualDestroy?: boolean;\n /** Whether to close the modal when the backdrop is clicked */\n closeOnBackdropClick?: boolean;\n };\n}\n\nexport const ConfigurationContextProvider = memo(\n ({\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n options,\n children,\n }: PropsWithChildren<ConfigurationContextProviderProps>) => {\n const value = useMemo(\n () => ({\n BackgroundComponent,\n ForegroundComponent: ForegroundComponent || FallbackForegroundFrame,\n TitleComponent: TitleComponent || FallbackTitle,\n SubtitleComponent: SubtitleComponent || FallbackSubtitle,\n ContentComponent: memo(ContentComponent || FallbackContent),\n FooterComponent: memo(FooterComponent || FallbackFooter),\n options: {\n duration: DEFAULT_ANIMATION_DURATION,\n backdrop: DEFAULT_BACKDROP_COLOR,\n closeOnBackdropClick: true,\n manualDestroy: false,\n ...options,\n } satisfies ConfigurationContextProviderProps['options'],\n }),\n [\n ForegroundComponent,\n BackgroundComponent,\n ContentComponent,\n FooterComponent,\n SubtitleComponent,\n TitleComponent,\n options,\n ],\n );\n return (\n <ConfigurationContext.Provider value={value}>\n {children}\n </ConfigurationContext.Provider>\n );\n },\n);\n","import type { Color, Duration } from '@aileron/declare';\n\nexport const DEFAULT_ANIMATION_DURATION: Duration = '300ms';\n\nexport const DEFAULT_BACKDROP_COLOR: Color = 'rgba(0, 0, 0, 0.5)';\n","import { useContext } from 'react';\n\nimport { convertMsFromDuration } from '@winglet/common-utils/convert';\n\nimport { ConfigurationContext } from './ConfigurationContext';\n\nexport const useConfigurationContext = () => useContext(ConfigurationContext);\n\nexport const useConfigurationOptions = () => {\n const context = useContext(ConfigurationContext);\n return context.options;\n};\n\nexport const useConfigurationDuration = () => {\n const context = useConfigurationOptions();\n return {\n duration: context.duration,\n milliseconds: convertMsFromDuration(context.duration),\n };\n};\n\nexport const useConfigurationBackdrop = () => {\n const context = useConfigurationOptions();\n return context.backdrop;\n};\n","import { createContext } from 'react';\n\nimport type { Dictionary } from '@aileron/declare';\n\nexport interface UserDefinedContext {\n context: Dictionary;\n}\n\nexport const UserDefinedContext = createContext<UserDefinedContext>(\n {} as UserDefinedContext,\n);\n","import { PropsWithChildren, useMemo } from 'react';\n\nimport type { Dictionary } from '@aileron/declare';\n\nimport { UserDefinedContext } from './UserDefinedContext';\n\ninterface UserDefinedContextProviderProps {\n /** User defined context */\n context?: Dictionary;\n}\n\nexport const UserDefinedContextProvider = ({\n context,\n children,\n}: PropsWithChildren<UserDefinedContextProviderProps>) => {\n const contextValue = useMemo(() => ({ context: context || {} }), [context]);\n return (\n <UserDefinedContext.Provider value={contextValue}>\n {children}\n </UserDefinedContext.Provider>\n );\n};\n","import { useContext } from 'react';\n\nimport { UserDefinedContext } from './UserDefinedContext';\n\nexport const useUserDefinedContext = () => {\n return useContext(UserDefinedContext);\n};\n","import { useLayoutEffect, useState } from 'react';\n\nexport const usePathname = () => {\n const [pathname, setPathname] = useState(window.location.pathname);\n useLayoutEffect(() => {\n let requestId: number;\n const checkPathname = () => {\n if (requestId) cancelAnimationFrame(requestId);\n if (pathname !== window.location.pathname) {\n setPathname(window.location.pathname);\n } else {\n requestId = requestAnimationFrame(checkPathname);\n }\n };\n requestId = requestAnimationFrame(checkPathname);\n return () => {\n if (requestId) cancelAnimationFrame(requestId);\n };\n }, [pathname]);\n return { pathname };\n};\n","import { css } from '@emotion/css';\n\nexport const background = css`\n display: none;\n position: fixed;\n inset: 0;\n z-index: -999;\n pointer-events: none;\n > * {\n pointer-events: none;\n }\n`;\n\nexport const active = css`\n pointer-events: all;\n`;\n\nexport const visible = css`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","import { type MouseEvent, useCallback, useMemo } from 'react';\n\nimport { cx } from '@emotion/css';\n\nimport {\n useConfigurationContext,\n useModal,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalLayerProps } from '@/promise-modal/types';\n\nimport { active, background, visible } from './classNames.emotion';\n\nexport const BackgroundFrame = ({\n modalId,\n onChangeOrder,\n}: ModalLayerProps) => {\n const { BackgroundComponent } = useConfigurationContext();\n const { context: userDefinedContext } = useUserDefinedContext();\n const { modal, onClose, onChange, onConfirm, onDestroy } = useModal(modalId);\n\n const handleClose = useCallback(\n (event: MouseEvent) => {\n if (modal && modal.closeOnBackdropClick && modal.visible) onClose();\n event.stopPropagation();\n },\n [modal, onClose],\n );\n\n const Background = useMemo(\n () => modal?.BackgroundComponent || BackgroundComponent,\n [BackgroundComponent, modal],\n );\n\n if (!modal) return null;\n\n return (\n <div\n className={cx(background, {\n [visible]: modal.manualDestroy ? modal.alive : modal.visible,\n [active]: modal.closeOnBackdropClick && modal.visible,\n })}\n onClick={handleClose}\n >\n {Background && (\n <Background\n id={modal.id}\n type={modal.type}\n alive={modal.alive}\n visible={modal.visible}\n initiator={modal.initiator}\n manualDestroy={modal.manualDestroy}\n closeOnBackdropClick={modal.closeOnBackdropClick}\n background={modal.background}\n onChange={onChange}\n onConfirm={onConfirm}\n onClose={onClose}\n onDestroy={onDestroy}\n onChangeOrder={onChangeOrder}\n context={userDefinedContext}\n />\n )}\n </div>\n );\n};\n","import { css } from '@emotion/css';\n\nexport const foreground = css`\n pointer-events: none;\n display: none;\n position: fixed;\n inset: 0;\n z-index: 1;\n`;\n\nexport const active = css`\n > * {\n pointer-events: all;\n }\n`;\n\nexport const visible = css`\n display: flex !important;\n justify-content: center;\n align-items: center;\n`;\n","import { Fragment, memo, useMemo } from 'react';\n\nimport { isString } from '@winglet/common-utils/filter';\nimport { useHandle } from '@winglet/react-utils/hook';\nimport { renderComponent } from '@winglet/react-utils/render';\n\nimport type { AlertNode } from '@/promise-modal/core';\nimport {\n useConfigurationContext,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalActions } from '@/promise-modal/types';\n\ninterface AlertInnerProps<B> {\n modal: AlertNode<B>;\n handlers: Pick<ModalActions, 'onConfirm'>;\n}\n\nexport const AlertInner = memo(\n <B,>({ modal, handlers }: AlertInnerProps<B>) => {\n const { title, subtitle, content, footer } = useMemo(() => modal, [modal]);\n const { context: userDefinedContext } = useUserDefinedContext();\n const { onConfirm } = useMemo(() => handlers, [handlers]);\n\n const handleConfirm = useHandle(onConfirm);\n\n const {\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n } = useConfigurationContext();\n\n return (\n <Fragment>\n {title &&\n (isString(title) ? (\n <TitleComponent context={userDefinedContext}>\n {title}\n </TitleComponent>\n ) : (\n title\n ))}\n {subtitle &&\n (isString(subtitle) ? (\n <SubtitleComponent context={userDefinedContext}>\n {subtitle}\n </SubtitleComponent>\n ) : (\n subtitle\n ))}\n {content &&\n (isString(content) ? (\n <ContentComponent context={userDefinedContext}>\n {content}\n </ContentComponent>\n ) : (\n renderComponent(content, {\n onConfirm: handleConfirm,\n })\n ))}\n {footer !== false &&\n (typeof footer === 'function' ? (\n footer({\n onConfirm: handleConfirm,\n context: userDefinedContext,\n })\n ) : (\n <FooterComponent\n onConfirm={handleConfirm}\n confirmLabel={footer?.confirm}\n hideConfirm={footer?.hideConfirm}\n context={userDefinedContext}\n />\n ))}\n </Fragment>\n );\n },\n);\n","import { Fragment, memo, useMemo } from 'react';\n\nimport { isString } from '@winglet/common-utils/filter';\nimport { useHandle } from '@winglet/react-utils/hook';\nimport { renderComponent } from '@winglet/react-utils/render';\n\nimport type { ConfirmNode } from '@/promise-modal/core';\nimport {\n useConfigurationContext,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalActions } from '@/promise-modal/types';\n\ninterface ConfirmInnerProps<B> {\n modal: ConfirmNode<B>;\n handlers: Pick<ModalActions, 'onConfirm' | 'onClose'>;\n}\n\nexport const ConfirmInner = memo(\n <B,>({ modal, handlers }: ConfirmInnerProps<B>) => {\n const { title, subtitle, content, footer } = useMemo(() => modal, [modal]);\n const { context: userDefinedContext } = useUserDefinedContext();\n const { onConfirm, onClose } = useMemo(() => handlers, [handlers]);\n\n const handleConfirm = useHandle(onConfirm);\n const handleClose = useHandle(onClose);\n\n const {\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n } = useConfigurationContext();\n\n return (\n <Fragment>\n {title &&\n (isString(title) ? (\n <TitleComponent context={userDefinedContext}>\n {title}\n </TitleComponent>\n ) : (\n title\n ))}\n {subtitle &&\n (isString(subtitle) ? (\n <SubtitleComponent context={userDefinedContext}>\n {subtitle}\n </SubtitleComponent>\n ) : (\n subtitle\n ))}\n {content &&\n (isString(content) ? (\n <ContentComponent context={userDefinedContext}>\n {content}\n </ContentComponent>\n ) : (\n renderComponent(content, {\n onConfirm: handleConfirm,\n onCancel: handleClose,\n context: userDefinedContext,\n })\n ))}\n {footer !== false &&\n (typeof footer === 'function' ? (\n footer({\n onConfirm: handleConfirm,\n onCancel: handleClose,\n context: userDefinedContext,\n })\n ) : (\n <FooterComponent\n onConfirm={handleConfirm}\n onCancel={handleClose}\n confirmLabel={footer?.confirm}\n cancelLabel={footer?.cancel}\n hideConfirm={footer?.hideConfirm}\n hideCancel={footer?.hideCancel}\n context={userDefinedContext}\n />\n ))}\n </Fragment>\n );\n },\n);\n","import { Fragment, memo, useCallback, useMemo, useState } from 'react';\n\nimport { isFunction, isString } from '@winglet/common-utils/filter';\nimport { withErrorBoundary } from '@winglet/react-utils/hoc';\nimport { useHandle } from '@winglet/react-utils/hook';\nimport { renderComponent } from '@winglet/react-utils/render';\n\nimport type { PromptNode } from '@/promise-modal/core';\nimport {\n useConfigurationContext,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalActions } from '@/promise-modal/types';\n\ninterface PromptInnerProps<T, B> {\n modal: PromptNode<T, B>;\n handlers: Pick<ModalActions, 'onChange' | 'onClose' | 'onConfirm'>;\n}\n\nexport const PromptInner = memo(\n <T, B>({ modal, handlers }: PromptInnerProps<T, B>) => {\n const {\n Input,\n defaultValue,\n disabled: checkDisabled,\n title,\n subtitle,\n content,\n footer,\n } = useMemo(\n () => ({\n ...modal,\n Input: memo(withErrorBoundary(modal.Input)),\n }),\n [modal],\n );\n\n const { context: userDefinedContext } = useUserDefinedContext();\n\n const [value, setValue] = useState<T | undefined>(defaultValue);\n\n const { onChange, onClose, onConfirm } = useMemo(\n () => handlers,\n [handlers],\n );\n\n const handleClose = useHandle(onClose);\n const handleChange = useHandle(\n (inputValue?: T | ((prevState: T | undefined) => T | undefined)) => {\n const input = isFunction(inputValue) ? inputValue(value) : inputValue;\n setValue(input);\n onChange(input);\n },\n );\n\n const handleConfirm = useCallback(() => {\n // NOTE: wait for the next tick to ensure the value is updated\n requestAnimationFrame(onConfirm);\n }, [onConfirm]);\n\n const disabled = useMemo(\n () => (value ? !!checkDisabled?.(value) : false),\n [checkDisabled, value],\n );\n\n const {\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n } = useConfigurationContext();\n\n return (\n <Fragment>\n {title &&\n (isString(title) ? (\n <TitleComponent context={userDefinedContext}>\n {title}\n </TitleComponent>\n ) : (\n title\n ))}\n {subtitle &&\n (isString(subtitle) ? (\n <SubtitleComponent context={userDefinedContext}>\n {subtitle}\n </SubtitleComponent>\n ) : (\n subtitle\n ))}\n {content &&\n (isString(content) ? (\n <ContentComponent context={userDefinedContext}>\n {content}\n </ContentComponent>\n ) : (\n renderComponent(content, {\n onConfirm: handleConfirm,\n onCancel: handleClose,\n context: userDefinedContext,\n })\n ))}\n\n {Input && (\n <Input\n defaultValue={defaultValue}\n value={value}\n onChange={handleChange}\n onConfirm={handleConfirm}\n onCancel={handleClose}\n context={userDefinedContext}\n />\n )}\n\n {footer !== false &&\n (typeof footer === 'function' ? (\n footer({\n value,\n disabled,\n onChange: handleChange,\n onConfirm: handleConfirm,\n onCancel: handleClose,\n context: userDefinedContext,\n })\n ) : (\n <FooterComponent\n disabled={disabled}\n onConfirm={handleConfirm}\n onCancel={handleClose}\n confirmLabel={footer?.confirm}\n cancelLabel={footer?.cancel}\n hideConfirm={footer?.hideConfirm}\n hideCancel={footer?.hideCancel}\n context={userDefinedContext}\n />\n ))}\n </Fragment>\n );\n },\n);\n","import { useMemo } from 'react';\n\nimport { cx } from '@emotion/css';\n\nimport {\n useConfigurationContext,\n useModal,\n useUserDefinedContext,\n} from '@/promise-modal/providers';\nimport type { ModalLayerProps } from '@/promise-modal/types';\n\nimport { active, foreground, visible } from './classNames.emotion';\nimport { AlertInner, ConfirmInner, PromptInner } from './components';\n\nexport const ForegroundFrame = ({\n modalId,\n onChangeOrder,\n}: ModalLayerProps) => {\n const { ForegroundComponent } = useConfigurationContext();\n const { context: userDefinedContext } = useUserDefinedContext();\n\n const { modal, onChange, onConfirm, onClose, onDestroy } = useModal(modalId);\n\n const Foreground = useMemo(\n () => modal?.ForegroundComponent || ForegroundComponent,\n [ForegroundComponent, modal],\n );\n\n if (!modal) return null;\n\n return (\n <div\n className={cx(foreground, {\n [visible]: modal.manualDestroy ? modal.alive : modal.visible,\n [active]: modal.visible,\n })}\n >\n <Foreground\n id={modal.id}\n type={modal.type}\n alive={modal.alive}\n visible={modal.visible}\n initiator={modal.initiator}\n manualDestroy={modal.manualDestroy}\n closeOnBackdropClick={modal.closeOnBackdropClick}\n background={modal.background}\n onChange={onChange}\n onConfirm={onConfirm}\n onClose={onClose}\n onDestroy={onDestroy}\n onChangeOrder={onChangeOrder}\n context={userDefinedContext}\n >\n {modal.type === 'alert' && (\n <AlertInner modal={modal} handlers={{ onConfirm }} />\n )}\n {modal.type === 'confirm' && (\n <ConfirmInner modal={modal} handlers={{ onConfirm, onClose }} />\n )}\n {modal.type === 'prompt' && (\n <PromptInner\n modal={modal}\n handlers={{ onChange, onConfirm, onClose }}\n />\n )}\n </Foreground>\n </div>\n );\n};\n","import { useEffect } from 'react';\n\nimport { useVersion } from '@winglet/react-utils/hook';\n\nimport type { ModalNode } from '@/promise-modal/core';\n\nexport const useSubscribeModal = (modal?: ModalNode) => {\n const [version, update] = useVersion();\n useEffect(() => {\n if (!modal) return;\n const unsubscribe = modal.subscribe(update);\n return unsubscribe;\n }, [modal, update]);\n return version;\n};\n","import { css } from '@emotion/css';\n\nexport const presenter = css`\n position: fixed;\n inset: 0;\n pointer-events: none;\n overflow: hidden;\n`;\n","import { memo, useRef } from 'react';\n\nimport { counterFactory } from '@winglet/common-utils/lib';\nimport { useHandle } from '@winglet/react-utils/hook';\n\nimport { Background } from '@/promise-modal/components/Background';\nimport { Foreground } from '@/promise-modal/components/Foreground';\nimport { useSubscribeModal } from '@/promise-modal/hooks/useSubscribeModal';\nimport { useModal } from '@/promise-modal/providers';\nimport type { ModalIdProps } from '@/promise-modal/types';\n\nimport { presenter } from './classNames.emotion';\n\nconst { increment } = counterFactory(1);\n\nexport const Presenter = memo(({ modalId }: ModalIdProps) => {\n const ref = useRef<HTMLDivElement>(null);\n const { modal } = useModal(modalId);\n useSubscribeModal(modal);\n const handleChangeOrder = useHandle(() => {\n if (ref.current) {\n ref.current.style.zIndex = `${increment()}`;\n }\n });\n return (\n <div ref={ref} className={presenter}>\n <Background modalId={modalId} onChangeOrder={handleChangeOrder} />\n <Foreground modalId={modalId} onChangeOrder={handleChangeOrder} />\n </div>\n );\n});\n","import { css } from '@emotion/css';\n\nexport const anchor = css`\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 1000;\n transition: background-color ease-in-out;\n`;\n","import { memo, useEffect } from 'react';\n\nimport { map } from '@winglet/common-utils/array';\nimport { withErrorBoundary } from '@winglet/react-utils/hoc';\nimport { useVersion } from '@winglet/react-utils/hook';\n\nimport { Presenter } from '@/promise-modal/components/Presenter';\nimport type { ModalNode } from '@/promise-modal/core';\nimport { useActiveModalCount } from '@/promise-modal/hooks/useActiveModalCount';\nimport {\n useConfigurationOptions,\n useModalManagerContext,\n} from '@/promise-modal/providers';\n\nimport { anchor } from './classNames.emotion';\n\nconst AnchorInner = () => {\n const [version, update] = useVersion();\n\n const { modalIds, setUpdater } = useModalManagerContext();\n\n useEffect(() => {\n setUpdater(update);\n }, [setUpdater, update]);\n\n const options = useConfigurationOptions();\n\n const dimmed = useActiveModalCount(validateDimmable, version);\n\n return (\n <div\n className={anchor}\n style={{\n transitionDuration: options.duration,\n backgroundColor: dimmed ? options.backdrop : 'transparent',\n }}\n >\n {map(modalIds, (id) => (\n <Presenter key={id} modalId={id} />\n ))}\n </div>\n );\n};\n\nconst validateDimmable = (modal?: ModalNode) => modal?.visible && modal.dimmed;\n\nexport const Anchor = memo(withErrorBoundary(AnchorInner));\n","import { createPortal } from 'react-dom';\n\nimport type { Dictionary, Fn } from '@aileron/declare';\n\nimport { Anchor } from '@/promise-modal/components/Anchor';\nimport {\n ConfigurationContextProvider,\n type ConfigurationContextProviderProps,\n} from '@/promise-modal/providers/ConfigurationContext';\nimport { ModalManagerContextProvider } from '@/promise-modal/providers/ModalManagerContext';\nimport { UserDefinedContextProvider } from '@/promise-modal/providers/UserDefinedContext';\n\ninterface BootstrapProps extends ConfigurationContextProviderProps {\n usePathname: Fn<[], { pathname: string }>;\n context?: Dictionary;\n anchor: HTMLElement;\n}\n\nexport const bootstrap = ({\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n usePathname,\n options,\n context,\n anchor,\n}: BootstrapProps) =>\n createPortal(\n <UserDefinedContextProvider context={context}>\n <ConfigurationContextProvider\n ForegroundComponent={ForegroundComponent}\n BackgroundComponent={BackgroundComponent}\n TitleComponent={TitleComponent}\n SubtitleComponent={SubtitleComponent}\n ContentComponent={ContentComponent}\n FooterComponent={FooterComponent}\n options={options}\n >\n <ModalManagerContextProvider usePathname={usePathname}>\n <Anchor />\n </ModalManagerContextProvider>\n </ConfigurationContextProvider>\n </UserDefinedContextProvider>,\n anchor,\n );\n","import { useCallback, useRef } from 'react';\n\nimport { printError } from '@winglet/common-utils/console';\nimport { useVersion } from '@winglet/react-utils/hook';\n\nimport { ModalManager } from '@/promise-modal/app/ModalManager';\n\nexport const useInitialize = () => {\n const permitted = useRef(ModalManager.activate());\n const anchorRef = useRef<HTMLElement | null>(null);\n const [, update] = useVersion();\n\n const handleInitialize = useCallback(\n (root?: HTMLElement) => {\n if (permitted.current) {\n anchorRef.current = ModalManager.anchor({ root });\n update();\n } else\n printError(\n 'ModalProvider is already initialized',\n [\n 'ModalProvider can only be initialized once.',\n 'Nesting ModalProvider will be ignored...',\n ],\n {\n info: 'Something is wrong with the ModalProvider initialization...',\n },\n );\n },\n [update],\n );\n\n return {\n anchorRef,\n handleInitialize,\n } as const;\n};\n","import {\n Fragment,\n type PropsWithChildren,\n forwardRef,\n useImperativeHandle,\n useMemo,\n} from 'react';\n\nimport { useOnMount } from '@winglet/react-utils/hook';\n\nimport { usePathname as useDefaultPathname } from '@/promise-modal/hooks/useDefaultPathname';\n\nimport { bootstrap } from './helpers/bootstrap';\nimport { useInitialize } from './hooks/useInitialize';\nimport type { BootstrapProviderHandle, BootstrapProviderProps } from './type';\n\nexport const BootstrapProvider = forwardRef<\n BootstrapProviderHandle,\n PropsWithChildren<BootstrapProviderProps>\n>(\n (\n {\n usePathname: useExternalPathname,\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n options,\n context,\n children,\n },\n handleRef,\n ) => {\n const usePathname = useMemo(\n () => useExternalPathname || useDefaultPathname,\n [useExternalPathname],\n );\n\n const { anchorRef, handleInitialize } = useInitialize();\n\n useImperativeHandle(\n handleRef,\n () => ({\n initialize: handleInitialize,\n }),\n [handleInitialize],\n );\n\n useOnMount(() => {\n /**\n * NOTE: `handleRef` being null indicates that no `ref` was provided.\n * In this case, the `ModalProvider`(=`BootstrapProvider`) is not receiving the `ref`,\n * so it should be initialized automatically.\n */\n if (handleRef === null) handleInitialize();\n return () => {\n if (anchorRef.current) anchorRef.current.remove();\n };\n });\n\n return (\n <Fragment>\n {children}\n {anchorRef.current &&\n bootstrap({\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n usePathname,\n options,\n context,\n anchor: anchorRef.current,\n })}\n </Fragment>\n );\n },\n);\n","import { useCallback, useMemo } from 'react';\n\nimport { useOnMount } from '@winglet/react-utils/hook';\n\nimport { usePathname as useDefaultPathname } from '@/promise-modal/hooks/useDefaultPathname';\n\nimport { bootstrap } from './helpers/bootstrap';\nimport { useInitialize } from './hooks/useInitialize';\nimport type { BootstrapProviderProps } from './type';\n\nexport const useBootstrap = ({\n usePathname: useExternalPathname,\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n options,\n context,\n mode = 'auto',\n}: BootstrapProviderProps & { mode?: 'manual' | 'auto' } = {}) => {\n const usePathname = useMemo(\n () => useExternalPathname || useDefaultPathname,\n [useExternalPathname],\n );\n\n const { anchorRef, handleInitialize } = useInitialize();\n\n useOnMount(() => {\n if (mode === 'auto') handleInitialize();\n return () => {\n if (anchorRef.current) anchorRef.current.remove();\n };\n });\n\n const initialize = useCallback(\n (element: HTMLElement) => {\n if (mode === 'manual') handleInitialize(element);\n },\n [mode, handleInitialize],\n );\n\n const portal =\n anchorRef.current &&\n bootstrap({\n usePathname,\n ForegroundComponent,\n BackgroundComponent,\n TitleComponent,\n SubtitleComponent,\n ContentComponent,\n FooterComponent,\n options,\n context,\n anchor: anchorRef.current,\n });\n\n return { portal, initialize };\n};\n","import { useEffect, useRef } from 'react';\n\nimport { convertMsFromDuration } from '@winglet/common-utils/convert';\nimport { isString } from '@winglet/common-utils/filter';\n\nimport type { Duration } from '@aileron/declare';\n\nimport type { ModalNode } from '@/promise-modal/core';\nimport { useModal } from '@/promise-modal/providers';\n\nimport { useSubscribeModal } from './useSubscribeModal';\n\nexport const useDestroyAfter = (\n modalId: ModalNode['id'],\n duration: Duration | number,\n) => {\n const { modal, onDestroy } = useModal(modalId);\n const tick = useSubscribeModal(modal);\n\n const reference = useRef({\n modal,\n onDestroy,\n milliseconds: isString(duration)\n ? convertMsFromDuration(duration)\n : duration,\n });\n\n useEffect(() => {\n const { modal, onDestroy, milliseconds } = reference.current;\n if (!modal || modal.visible || !modal.alive) return;\n const timer = setTimeout(() => {\n onDestroy();\n }, milliseconds);\n return () => {\n if (timer) clearTimeout(timer);\n };\n }, [tick]);\n};\n","import { useLayoutEffect, useRef } from 'react';\n\nimport type { Fn } from '@aileron/declare';\n\ninterface ModalAnimationHandler {\n onVisible?: Fn;\n onHidden?: Fn;\n}\n\nexport const useModalAnimation = (\n visible: boolean,\n handler: ModalAnimationHandler,\n) => {\n const handlerRef = useRef(handler);\n handlerRef.current = handler;\n useLayoutEffect(() => {\n if (!handlerRef.current) return;\n let frame: ReturnType<typeof requestAnimationFrame>;\n if (visible)\n frame = requestAnimationFrame(() => handlerRef.current.onVisible?.());\n else frame = requestAnimationFrame(() => handlerRef.current.onHidden?.());\n return () => {\n if (frame) cancelAnimationFrame(frame);\n };\n }, [visible]);\n};\n"],"names":["ModalManager","static","activate","active","anchor","options","document","getElementById","id","tag","prefix","root","body","node","createElement","setAttribute","getRandomString","appendChild","prerender","prerenderList","modal","push","openHandler","handler","unanchored","reset","open","alert","subtype","title","subtitle","content","background","footer","dimmed","manualDestroy","closeOnBackdropClick","ForegroundComponent","BackgroundComponent","Promise","resolve","reject","type","error","confirm","result","prompt","defaultValue","Input","disabled","returnOnCancel","AbstractNode","initiator","alive","this","visible","listeners","Set","constructor","subscribe","listener","add","delete","publish","onDestroy","needPublish","onShow","onHide","AlertNode","super","onClose","onConfirm","ConfirmNode","PromptNode","value","onChange","nodeFactory","Error","ModalManagerContext","createContext","ModalManagerContextProvider","memo","usePathname","children","modalDictionary","useRef","Map","modalIds","setModalIds","useState","modalIdsRef","useReference","pathname","modalIdSequence","useConfigurationOptions","duration","useMemo","convertMsFromDuration","useOnMountLayout","data","current","undefined","set","ids","aliveIds","index","length","get","useLayoutEffect","getModalNode","useCallback","modalId","updaterRef","hideModal","setTimeout","getModal","setUpdater","updater","_jsx","Provider","useModalManagerContext","useContext","useModal","fallback","css","process","env","NODE_ENV","name","styles","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","frame","FallbackTitle","className","FallbackSubtitle","FallbackContent","FallbackFooter","confirmLabel","hideConfirm","cancelLabel","hideCancel","onCancel","_jsxs","onClick","defaultValidate","useActiveModalCount","validate","refreshKey","count","FallbackForegroundFrame","forwardRef","onChangeOrder","ref","activeCount","level","offset","stacked","Math","floor","style","marginBottom","marginLeft","transform","ConfigurationContext","ConfigurationContextProvider","TitleComponent","SubtitleComponent","ContentComponent","FooterComponent","backdrop","useConfigurationContext","useConfigurationDuration","context","milliseconds","useConfigurationBackdrop","UserDefinedContext","UserDefinedContextProvider","contextValue","useUserDefinedContext","setPathname","window","location","requestId","checkPathname","cancelAnimationFrame","requestAnimationFrame","BackgroundFrame","userDefinedContext","handleClose","event","stopPropagation","Background","cx","visible$1","active$1","foreground","AlertInner","handlers","handleConfirm","useHandle","Fragment","isString","renderComponent","ConfirmInner","cancel","PromptInner","checkDisabled","withErrorBoundary","setValue","handleChange","inputValue","input","isFunction","ForegroundFrame","Foreground","useSubscribeModal","version","update","useVersion","useEffect","presenter","increment","counterFactory","Presenter","handleChangeOrder","zIndex","validateDimmable","Anchor","transitionDuration","backgroundColor","map","bootstrap","createPortal","useInitialize","permitted","anchorRef","handleInitialize","printError","info","BootstrapProvider","useExternalPathname","handleRef","useDefaultPathname","useImperativeHandle","initialize","useOnMount","remove","useBootstrap","mode","element","portal","useDestroyAfter","tick","reference","timer","clearTimeout","useModalAnimation","handlerRef","onVisible","onHidden"],"mappings":"2tDAMaA,aACXC,SAAiB,EACjB,eAAOC,GACL,OAAIF,cAAaG,EAAgB,EACzBH,cAAaG,EAAU,EAGjCF,SAAqC,KACrC,aAAOG,CAAOC,GAKZ,GAAIL,cAAaI,EAAS,CACxB,MAAMA,EAASE,SAASC,eAAeP,cAAaI,EAAQI,IAC5D,GAAIJ,EAAQ,OAAOA,EAErB,MAAMK,IACJA,EAAM,MAAKC,OACXA,EAAS,gBAAeC,KACxBA,EAAOL,SAASM,MACdP,GAAW,CAAE,EACXQ,EAAOP,SAASQ,cAAcL,GAIpC,OAHAI,EAAKE,aAAa,KAAM,GAAGL,KAAUM,EAAgB,OACrDL,EAAKM,YAAYJ,GACjBb,cAAaI,EAAUS,EAChBA,EAGTZ,SAAiC,GACjC,oBAAWiB,GACT,OAAOlB,cAAamB,EAGtBlB,SAA0CmB,GACxCpB,cAAamB,EAAeE,KAAKD,GACnC,sBAAWE,CAAYC,GACrBvB,cAAasB,EAAeC,EAC5BvB,cAAamB,EAAiB,GAGhC,qBAAWK,GACT,OAAQxB,cAAaI,EAGvB,YAAOqB,GACLzB,cAAaG,EAAU,EACvBH,cAAaI,EAAU,KACvBJ,cAAamB,EAAiB,GAC9BnB,cAAasB,EAAgBF,GAC3BpB,cAAamB,EAAeE,KAAKD,GAGrC,WAAOM,CAAKN,GACVpB,cAAasB,EAAaF,IC/BvB,MAAMO,MAAQ,EACnBC,UACAC,QACAC,WACAC,UACAC,aACAC,SACAC,SACAC,gBACAC,uBACAC,sBACAC,yBAEO,IAAIC,SAAc,CAACC,EAASC,KACjC,IACEzC,aAAa0B,KAAK,CAChBgB,KAAM,QACNd,UACAY,QAAS,IAAMA,IACfX,QACAC,WACAC,UACAC,aACAC,SACAC,SACAC,gBACAC,uBACAC,sBACAC,wBAEF,MAAOK,GACPF,EAAOE,OClCAC,QAAU,EACrBhB,UACAC,QACAC,WACAC,UACAC,aACAC,SACAC,SACAC,gBACAC,uBACAC,sBACAC,yBAEO,IAAIC,SAAiB,CAACC,EAASC,KACpC,IACEzC,aAAa0B,KAAK,CAChBgB,KAAM,UACNd,UACAY,QAAUK,GAAWL,EAAQK,GAAU,GACvChB,QACAC,WACAC,UACAC,aACAC,SACAC,SACAC,gBACAC,uBACAC,sBACAC,wBAEF,MAAOK,GACPF,EAAOE,OC3BAG,OAAS,EACpBC,eACAlB,QACAC,WACAC,UACAiB,QACAC,WACAC,iBACAlB,aACAC,SACAC,SACAC,gBACAC,uBACAC,sBACAC,yBAEO,IAAIC,SAAW,CAACC,EAASC,KAC9B,IACEzC,aAAa0B,KAAK,CAChBgB,KAAM,SACNF,QAAUK,GAAWL,EAAQK,GAC7BhB,QACAC,WACAC,UACAiB,QACAD,eACAE,WACAC,iBACAlB,aACAC,SACAC,SACAC,gBACAC,uBACAC,sBACAC,wBAEF,MAAOK,GACPF,EAAOE,aCrDSQ,aACX3C,GACA4C,UAEAvB,MACAC,SACAE,WAEAG,cACAC,qBACAF,OAEAG,oBACAC,oBAETe,GACA,SAAIA,GACF,OAAOC,MAAKD,EAEdE,GACA,WAAIA,GACF,OAAOD,MAAKC,EAGdf,GACAgB,GAAsB,IAAIC,IAE1B,WAAAC,EAAYlD,GACVA,EAAE4C,UACFA,EAASvB,MACTA,EAAKC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iBAAEA,GAAqBH,gBAExCY,GAAW,KACI,SAATG,GAAiBZ,IACd,KACDD,EAAUxI,SAASwI,EAAUxI,QAAQmJ,QAAQ,KAIrD,MAAMF,EAAavI,GAChB4I,IACc,WAATD,GAAmBZ,EAAiBa,EAAQ,GAElD,CAACD,EAAMZ,IAkBT,MAAO,CAAEc,OAdPf,EAAUxI,SACVoI,UAAU,aACRtJ,EACA7C,sBACAC,sBACAgI,iBACAC,oBACAC,mBACAC,kBACApK,UACAwK,UACAzK,OAAQwO,EAAUxI,UAGLiJ,aAAY,EC9ClBO,gBAAkB,CAC7B7I,EACAhB,KAEA,MAAM3E,MAAEA,EAAK4C,UAAEA,GAAc0D,SAASX,GAChC8I,EAAOrC,kBAAkBpM,GAEzB0O,EAAYzK,EAAO,CACvBjE,QACA4C,YACA8G,aAAc4B,EAAS3G,GACnBE,EAAsBF,GACtBA,IAGN6H,WAAU,KACR,MAAMxM,MAAEA,EAAK4C,UAAEA,EAAS8G,aAAEA,GAAiBgF,EAAU1J,QACrD,IAAKhF,GAASA,EAAMmC,UAAYnC,EAAMiC,MAAO,OAC7C,MAAM0M,EAAQ7I,YAAW,KACvBlD,GAAW,GACV8G,GACH,MAAO,KACDiF,GAAOC,aAAaD,EAAM,CAC/B,GACA,CAACF,GAAM,EC3BCI,kBAAoB,CAC/B1M,EACAhC,KAEA,MAAM2O,EAAa7K,EAAO9D,GAC1B2O,EAAW9J,QAAU7E,EACrBqF,GAAgB,KACd,IAAKsJ,EAAW9J,QAAS,OACzB,IAAIgC,EAIJ,OAFEA,EADE7E,EACMmI,uBAAsB,IAAMwE,EAAW9J,QAAQ+J,gBAC5CzE,uBAAsB,IAAMwE,EAAW9J,QAAQgK,eACrD,KACDhI,GAAOqD,qBAAqBrD,EAAM,CACvC,GACA,CAAC7E,GAAS"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurationContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ConfigurationContext/ConfigurationContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,OAAO,CAAC;AAE1D,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,yBAAyB;IACxC,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACrD,iBAAiB,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACxD,gBAAgB,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACvD,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACrD,OAAO,EAAE;QACP,QAAQ,EAAE,QAAQ,CAAC;QACnB,QAAQ,EAAE,KAAK,CAAC;QAChB,aAAa,EAAE,OAAO,CAAC;QACvB,oBAAoB,EAAE,OAAO,CAAC;KAC/B,CAAC;CACH;AAED,eAAO,MAAM,oBAAoB,oDAEhC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurationContextProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/ConfigurationContext/ConfigurationContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAGvB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAaxD,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAI/B,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IACrD,mBAAmB,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IACrD,cAAc,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACtD,iBAAiB,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACzD,gBAAgB,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACxD,eAAe,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACtD,OAAO,CAAC,EAAE;QAER,QAAQ,CAAC,EAAE,QAAQ,CAAC;QAEpB,QAAQ,CAAC,EAAE,KAAK,CAAC;QAEjB,aAAa,CAAC,EAAE,OAAO,CAAC;QAExB,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,CAAC;CACH;AAED,eAAO,MAAM,4BAA4B,+KAUpC,iBAAiB,CAAC,iCAAiC,CAAC,6CAiCxD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/ConfigurationContext/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,KAAK,iCAAiC,GACvC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useConfigurationContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ConfigurationContext/useConfigurationContext.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB,kEAAyC,CAAC;AAE9E,eAAO,MAAM,uBAAuB;;;;;CAGnC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAMpC,CAAC;AAEF,eAAO,MAAM,wBAAwB,wCAGpC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModalManagerContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ModalManagerContext/ModalManagerContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;IAC5B,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAClD,YAAY,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;IAC/D,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,mBAAmB,mDAE/B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModalManagerContextProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/ModalManagerContext/ModalManagerContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAS3C,UAAU,gCAAgC;IACxC,WAAW,EAAE,EAAE,CAAC,EAAE,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3C;AAED,eAAO,MAAM,2BAA2B,mEAInC,iBAAiB,CAAC,gCAAgC,CAAC,6CA4KvD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/ModalManagerContext/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useModalManagerContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ModalManagerContext/useModalManagerContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,eAAO,MAAM,sBAAsB,gEAAwC,CAAC;AAE5E,eAAO,MAAM,QAAQ,GAAI,IAAI,YAAY,CAAC,IAAI,CAAC,iDAG9C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserDefinedContext.d.ts","sourceRoot":"","sources":["../../../src/providers/UserDefinedContext/UserDefinedContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,UAAU,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,6CAE9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserDefinedContextProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/UserDefinedContext/UserDefinedContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,UAAU,+BAA+B;IAEvC,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,eAAO,MAAM,0BAA0B,GAAI,wBAGxC,iBAAiB,CAAC,+BAA+B,CAAC,4CAOpD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/UserDefinedContext/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUserDefinedContext.d.ts","sourceRoot":"","sources":["../../../src/providers/UserDefinedContext/useUserDefinedContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,qBAAqB,0BAEjC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/types/alert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE9E,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,UAAU,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;IAC3E,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB,KAAK,SAAS,CAAC;AAEhB,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,UAAU,GAAG,MAAM,IAAI,IAAI,CACvE,qBAAqB,CAAC,OAAO,CAAC,EAC9B,WAAW,CACZ,CAAC;AAEF,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,SAAS,UAAU,GAAG,MAAM,CACtE,SAAQ,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACnD,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,MAAM,CAAC,EACH,iBAAiB,CAAC,OAAO,CAAC,GAC1B,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,aAAa,CAAC,GAC9C,KAAK,CAAC;CACX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../src/types/background.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,CAAC,CAAC;CACV"}
|
package/dist/types/base.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/types/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,WAAW,SAAS,CAAC,CAAC,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,CAAC,E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@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confirm.d.ts","sourceRoot":"","sources":["../../src/types/confirm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE9E,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,UAAU,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;IAC7E,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CAClB,KAAK,SAAS,CAAC;AAEhB,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,UAAU,GAAG,MAAM,IACjE,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAEjC,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,SAAS,UAAU,GAAG,MAAM,CACxE,SAAQ,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACnD,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;IAClE,MAAM,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,aAAa,GAAG,KAAK,CAAC;CAC/D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB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