@solapi/ui-kit 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -9,6 +9,15 @@ Solapi 공용 UI 컴포넌트 라이브러리.
9
9
  npm install @solapi/ui-kit
10
10
  ```
11
11
 
12
+ ## Module Federation Exposes
13
+
14
+ | 모듈 | 경로 | 설명 |
15
+ |------|------|------|
16
+ | `./ui` | `src/export/index.ts` | 전체 export (컴포넌트, 훅, Provider, 테마) |
17
+ | `./provider` | `src/export/provider.ts` | GlobalUIProvider, ThemeProvider |
18
+ | `./hooks` | `src/export/hooks.ts` | useSnackbar, useModal, useConfirm, useEnhancedMutation |
19
+ | `./createMutationConfig` | `src/lib/createMutationConfig.ts` | MFA 처리 포함 Mutation 설정 유틸 |
20
+
12
21
  ## Quick Start (Federation + npm Fallback)
13
22
 
14
23
  ### 1. Remote 등록
@@ -23,7 +32,7 @@ const remoteApps = {
23
32
  ### 2. GlobalUIProvider 감싸기
24
33
 
25
34
  ```tsx
26
- // src/RemoteEntry.tsx
35
+ // src/uiKit/safeProviderLoader.tsx
27
36
  import { createSafeProviderLoader } from '@solapi/ui-kit/federation'
28
37
 
29
38
  const UI_KIT_PROVIDER = async () => {
@@ -60,7 +69,7 @@ import { createSafeComponentLoader } from '@solapi/ui-kit/federation'
60
69
 
61
70
  const UI_KIT_COMP = async () => {
62
71
  try {
63
- return await import('@solapi-frontend/ui-kit/components')
72
+ return await import('@solapi-frontend/ui-kit/ui')
64
73
  } catch {
65
74
  return await import('@solapi/ui-kit')
66
75
  }
@@ -109,7 +118,30 @@ export const useConfirm = createSafeHookLoader(UI_KIT_HOOKS, 'useConfirm', {
109
118
  })
110
119
  ```
111
120
 
112
- ### 5. 사용
121
+ ### 5. MFA Mutation 설정
122
+
123
+ ```ts
124
+ // src/uiKit/safeFunctionLoader.ts
125
+ const loadModule = async () => {
126
+ try {
127
+ return await import('@solapi-frontend/ui-kit/createMutationConfig')
128
+ } catch {
129
+ return await import('@solapi/ui-kit/createMutationConfig')
130
+ }
131
+ }
132
+
133
+ export const loadCreateMutationConfig = async () => {
134
+ const mod = await loadModule()
135
+ return mod?.createMutationConfig ?? null
136
+ }
137
+
138
+ export const loadConfigureMfa = async () => {
139
+ const mod = await loadModule()
140
+ return mod?.configureMfa ?? null
141
+ }
142
+ ```
143
+
144
+ ### 6. 사용
113
145
 
114
146
  ```tsx
115
147
  import { Tabs, TextInput, Button, Box } from 'uiKit/safeCompLoader'
@@ -149,5 +181,6 @@ function MyPage() {
149
181
  | [사용 가이드](docs/usage-guide.md) | Federation + npm Fallback 상세 가이드, 마이그레이션 |
150
182
  | [Federation API](docs/federation-api.md) | createSafeProviderLoader, createSafeComponentLoader, createSafeHookLoader |
151
183
  | [GlobalUIProvider](docs/global-ui-provider.md) | Props, Portal, MFA, 로컬 개발 설정 |
184
+ | [createMutationConfig](docs/create-mutation-config.md) | MFA 처리, Snackbar 연동, Federation 환경 사용법 |
152
185
  | [컴포넌트 추가](docs/contributing.md) | 새 UI 컴포넌트/Hook 추가 가이드 |
153
186
  | [안티패턴](docs/anti-patterns.md) | 흔한 실수와 올바른 대안 |
@@ -1,6 +1,7 @@
1
1
  import { jsx as e, jsxs as i, Fragment as te } from "react/jsx-runtime";
2
2
  import cn, { useState as I, useRef as fe, useMemo as re, useEffect as F, useCallback as U } from "react";
3
- import { G as y, T, M as on, p as an, i as Fe, S as V, B as x, D as xe, a as ee, C as De, b as ie, c as Q, d as he, e as ln, f as vn, g as Je, h as Ue, u as He, j as je, k as Re, l as dn, m as un, H as Pn, n as An, o as ue, q as Ze, r as We, s as hn, t as Qe, v as pn, w as wn, x as mn } from "./index-DV20NPKR.js";
3
+ import { useRequestQueueStore as ue } from "./createMutationConfig.js";
4
+ import { G as y, T, M as on, p as an, i as Fe, S as V, B as x, D as xe, a as ee, C as De, b as ie, c as Q, d as he, e as ln, f as vn, g as Je, h as Ue, u as He, j as je, k as Re, l as dn, m as un, H as Pn, n as An, o as Ze, q as We, r as hn, s as Qe, t as pn, v as wn, w as mn } from "./index-B2Ik6wwn.js";
4
5
  import "react-dom";
5
6
  import de from "axios";
6
7
  const gn = "_root_gcepv_1 _base_1tubv_6", zn = "_infoIcon_gcepv_11", xn = "_listDash_gcepv_16", ye = {
@@ -2135,7 +2136,7 @@ const St = "_root_193lu_1", It = "_iconWrap_193lu_15", Rt = "_icon_193lu_15", Ct
2135
2136
  })()
2136
2137
  ] })
2137
2138
  ] }) }) });
2138
- }, sr = () => {
2139
+ }, cr = () => {
2139
2140
  const { confirm: n } = He(), t = mn(), { openModal: r, closeModal: a } = Qe(), { mfaConfig: s } = je(), h = ue((c) => c.queue), v = ue((c) => c.dequeue), d = fe(/* @__PURE__ */ new Map()), m = U(
2140
2141
  (c) => {
2141
2142
  const f = c?.id;
@@ -2172,5 +2173,5 @@ const St = "_root_193lu_1", It = "_iconWrap_193lu_15", Rt = "_icon_193lu_15", Ct
2172
2173
  }, [h, a]), null;
2173
2174
  };
2174
2175
  export {
2175
- sr as default
2176
+ cr as default
2176
2177
  };