@wipco/sdui 0.50.0 → 0.50.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/dist/index.d.ts CHANGED
@@ -1625,6 +1625,26 @@ declare const defaultRegistry: {
1625
1625
  *
1626
1626
  * `@wipco/sdui/rich`의 무거운 위젯도 이 함수로 얹는다 —
1627
1627
  * `createRegistry(richComponents)`가 곧 Chart/MapPreview를 켜는 스위치다.
1628
+ *
1629
+ * ## 여기 넣어야 하는 것 — 프로젝트 고유 어휘
1630
+ *
1631
+ * **브랜드가 대표적인 예다.** 로고는 프로젝트마다 다르고, 다른 것이 정상이다.
1632
+ * 라이브러리에 `Logo` 를 두면 남의 회사 클래스 이름·상호·아트워크 경로를 **기본값으로
1633
+ * 싣게 되는데, 그것은 라이브러리가 보증할 수 없는 값이다.** 그래서 어휘에 넣지 않았다 —
1634
+ * 빠뜨린 것이 아니라 이 통로가 그 자리다.
1635
+ *
1636
+ * ```tsx
1637
+ * const registry = createRegistry({ Logo: MyBrandLogo });
1638
+ * ```
1639
+ *
1640
+ * 시각 빌더까지 쓰려면 메타데이터도 같이 얹는다 — `catalog` 프롭에
1641
+ * `{ ...allComponentMeta, ...myComponentMeta }` 를 넘기면 팔레트·속성 패널·드롭 판정이
1642
+ * 그 이름을 알게 된다(`@wipco/sdui/meta`).
1643
+ *
1644
+ * 반대로, **업무 로직이 든 위젯을 여기 얹기 전에 한 번 더 생각할 것.** 소비 프로젝트에서
1645
+ * 위젯 25종을 이 통로로 얹었다가 그중 24종이 "어휘가 부족해서 만든 우회"였음이 드러나
1646
+ * 전부 사라졌다. 막힌 자리가 값 계산(`$calc`)이나 상태 쓰기(액션)라면 그것은 어휘의
1647
+ * 빈칸이지 컴포넌트가 필요하다는 뜻이 아니다.
1628
1648
  */
1629
1649
  declare function createRegistry(extensions: SduiRegistry): SduiRegistry;
1630
1650
 
package/dist/index.js CHANGED
@@ -2845,6 +2845,7 @@ function SduiRenderer({
2845
2845
  hostRef.current = host;
2846
2846
  const [state, setState] = useState(() => ({ ...initialState ?? {} }));
2847
2847
  const urlSeeded = useRef(false);
2848
+ const urlSeedPending = useRef(false);
2848
2849
  const [toasts, setToasts] = useState([]);
2849
2850
  const toastSeq = useRef(0);
2850
2851
  const toastTimers = useRef([]);
@@ -2879,10 +2880,17 @@ function SduiRenderer({
2879
2880
  }
2880
2881
  }
2881
2882
  }
2882
- if (Object.keys(seeded).length > 0) setEntries(seeded);
2883
+ if (Object.keys(seeded).length > 0) {
2884
+ urlSeedPending.current = true;
2885
+ setEntries(seeded);
2886
+ }
2883
2887
  }, [page.urlState, setEntries, syncUrlState]);
2884
2888
  useEffect(() => {
2885
2889
  if (!syncUrlState || !page.urlState?.length || !urlSeeded.current || typeof window === "undefined") return;
2890
+ if (urlSeedPending.current) {
2891
+ urlSeedPending.current = false;
2892
+ return;
2893
+ }
2886
2894
  const params = new URLSearchParams(window.location.search);
2887
2895
  let changed = false;
2888
2896
  for (const key of page.urlState) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipco/sdui",
3
- "version": "0.50.0",
3
+ "version": "0.50.2",
4
4
  "description": "WIPCO 서버 주도 UI(SDUI) 렌더러 — JSON 페이지 스펙을 React 컴포넌트로 렌더링",
5
5
  "keywords": [
6
6
  "sdui",