@wipco/sdui 0.50.3 → 0.50.5
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/index.js +4 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -2846,6 +2846,7 @@ function SduiRenderer({
|
|
|
2846
2846
|
const [state, setState] = useState(() => ({ ...initialState ?? {} }));
|
|
2847
2847
|
const urlSeeded = useRef(false);
|
|
2848
2848
|
const urlSeedPending = useRef(null);
|
|
2849
|
+
const urlHomePath = useRef(typeof window !== "undefined" ? window.location.pathname : "");
|
|
2849
2850
|
const [toasts, setToasts] = useState([]);
|
|
2850
2851
|
const toastSeq = useRef(0);
|
|
2851
2852
|
const toastTimers = useRef([]);
|
|
@@ -2887,8 +2888,10 @@ function SduiRenderer({
|
|
|
2887
2888
|
}, [page.urlState, setEntries, syncUrlState]);
|
|
2888
2889
|
useEffect(() => {
|
|
2889
2890
|
if (!syncUrlState || !page.urlState?.length || !urlSeeded.current || typeof window === "undefined") return;
|
|
2891
|
+
if (window.location.pathname !== urlHomePath.current) return;
|
|
2890
2892
|
if (urlSeedPending.current) {
|
|
2891
|
-
|
|
2893
|
+
const seeded = urlSeedPending.current;
|
|
2894
|
+
if (!Object.keys(seeded).every((key) => Object.is(state[key], seeded[key]))) return;
|
|
2892
2895
|
urlSeedPending.current = null;
|
|
2893
2896
|
}
|
|
2894
2897
|
const params = new URLSearchParams(window.location.search);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wipco/sdui",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.5",
|
|
4
4
|
"description": "WIPCO 서버 주도 UI(SDUI) 렌더러 — JSON 페이지 스펙을 React 컴포넌트로 렌더링",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sdui",
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"dev": "tsup --watch",
|
|
209
209
|
"typecheck": "tsc --noEmit",
|
|
210
210
|
"check:meta": "node scripts/check-meta.mjs",
|
|
211
|
-
"test": "tsx --test test/*.test.ts",
|
|
211
|
+
"test": "tsx --test test/*.test.ts test/*.test.tsx",
|
|
212
212
|
"prepack": "pnpm run build"
|
|
213
213
|
},
|
|
214
214
|
"peerDependencies": {
|
|
@@ -232,6 +232,9 @@
|
|
|
232
232
|
"devDependencies": {
|
|
233
233
|
"@types/react": "^19.0.0",
|
|
234
234
|
"@types/react-dom": "^19.0.0",
|
|
235
|
+
"jsdom": "^26.1.0",
|
|
236
|
+
"react": "^19.2.8",
|
|
237
|
+
"react-dom": "^19.2.8",
|
|
235
238
|
"tsup": "^8.5.0",
|
|
236
239
|
"tsx": "^4.20.0",
|
|
237
240
|
"typescript": "^5.7.0"
|