UNPKG

@ehfuse/forma

Version:

Advanced React state management library with individual field subscriptions - supports both forms and general state management with useFormaState

65 lines 2.82 kB
/** * GlobalFormaContext.tsx * * Forma - 글로벌 Forma 상태 관리 컨텍스트 | Global Forma state management context * 여러 컴포넌트 간 폼 상태 공유를 위한 React Context | React Context for sharing form state across multiple components * * @license MIT License * @copyright 2025 KIM YOUNG JIN (ehfuse@gmail.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import { ReactNode } from "react"; import { GlobalFormaContextType } from "../types/globalForm"; /** * 글로벌 폼 상태 관리를 위한 React Context | React Context for global form state management */ export declare const GlobalFormaContext: import("react").Context<GlobalFormaContextType>; /** * 글로벌 Forma 상태 관리 Provider | Global Forma state management provider * * 애플리케이션 최상단에 배치하여 전역 Forma 상태 관리를 활성화합니다. | Place at the top of your application to enable global Forma state management. * 각 stateId/formId별로 독립적인 FieldStore 인스턴스를 관리합니다. | Manages independent FieldStore instances for each stateId/formId. * * @param props Provider props * @returns 글로벌 폼 컨텍스트 Provider * * @example * ```typescript * // App.tsx * import { GlobalFormaProvider } from '@/forma'; * * function App() { * return ( * <GlobalFormaProvider> * <Router> * <Routes> * <Route path="/" element={<HomePage />} /> * <Route path="/customer" element={<CustomerPage />} /> * </Routes> * </Router> * </GlobalFormaProvider> * ); * } * ``` */ export declare function GlobalFormaProvider({ children }: { children: ReactNode; }): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=GlobalFormaContext.d.ts.map