@ihabdevteam/core 0.361.0 → 0.363.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.
@@ -994,6 +994,22 @@ export declare interface ButtonProps {
994
994
  useDisabledCovered?: boolean;
995
995
  /** disabled 시 버튼을 완전히 투명하게 하는 스타일 */
996
996
  useDisabledInvisible?: boolean;
997
+ /**
998
+ * 막혔을 때도 **바탕을 가진 꼴** — 말귀 청 (404), 2026-10-25.
999
+ *
1000
+ * 기본 막힌 꼴(`button--variant-disabled`)은 `background-color: transparent` 다. 글 흐름
1001
+ * 안에서는 뒤에 지면밖에 없어 괜찮지만, **떠 있는 단추**(`position: fixed`)에서는 뒤의
1002
+ * 판과 글자가 **단추를 뚫고 보인다.** 말귀 어드민 '정책 관리' 의 저장 단추가 그 자리다
1003
+ * (판이 2,600px 넘어 떠 있지 않으면 끝까지 내려가야 저장할 수 있다).
1004
+ *
1005
+ * **막힌 꼴은 변종을 통째로 갈아 끼운다** — `variant="main"` 을 줘도 막히면
1006
+ * `button--variant-disabled` 가 선다. 그래서 앱이 `variant` 로는 이 자리를 못 푼다.
1007
+ *
1008
+ * 가리는 것(`useDisabledCovered`, 글자까지 투명)과 **다르다** — 이쪽은 글이 그대로
1009
+ * 보이고 바탕만 생긴다. 바탕색은 가리는 꼴이 이미 쓰는 `--color-darkWhite` 다(새 색을
1010
+ * 고르지 않는다 — 색은 사장님 자리다).
1011
+ */
1012
+ useDisabledFilled?: boolean;
997
1013
  width?: number | string;
998
1014
  minWidth?: number | string;
999
1015
  onClick?: (e: MouseEvent_2<HTMLButtonElement>) => void;
@@ -1754,7 +1770,7 @@ export declare function copyText(text: string): Promise<boolean>;
1754
1770
  *
1755
1771
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
1756
1772
  */
1757
- export declare const CORE_VERSION = "0.361.0";
1773
+ export declare const CORE_VERSION = "0.363.0";
1758
1774
 
1759
1775
  /** @public */
1760
1776
  declare const coreDefault: Record<string, unknown>;
@@ -3211,6 +3227,39 @@ export declare function installSkewRecovery(): () => void;
3211
3227
  /** @public 검색어가 초성으로만 이루어졌는지 (예: 'ㅎㅈ' → true, '한' → false) */
3212
3228
  export declare function isAllChoseong(search: string): boolean;
3213
3229
 
3230
+ /**
3231
+ * **낡은 묶음을 못 받은 오류인가** — 말귀 청 (402), 2026-10-25.
3232
+ *
3233
+ * 배포 직후 옛 `index.html` 을 들고 있던 창이 새 조각을 찾다 실패하면 나는 오류들이다.
3234
+ * **브라우저마다 말이 다르다:**
3235
+ *
3236
+ * Chrome Failed to fetch dynamically imported module: …/assets/App-xxxx.js
3237
+ * Firefox error loading dynamically imported module
3238
+ * Safari Importing a module script failed
3239
+ * CSS Unable to preload CSS for /assets/App-xxxx.css (Vite)
3240
+ *
3241
+ * **이 오류는 '다시 시도' 로 안 풀린다.** React 의 `lazy` 는 한 번 거절되면 그 상태로
3242
+ * 굳는다(`_status = 2`) — 경계가 다시 그려도 **같은 거절이 그대로 다시 던져진다.**
3243
+ * 풀리는 길은 새로고침뿐이다(새 `index.html` 을 받아야 새 조각 이름을 안다). 그래서 이
3244
+ * 가름이 맞느냐가 *"사람에게 새로고침을 내미느냐 '다시 시도' 를 내미느냐"* 를 가른다.
3245
+ *
3246
+ * ## 왜 코어가 드나
3247
+ *
3248
+ * 이 셈이 **말귀 회원앱과 어드민에 한 벌씩** 있었다(어드민 쪽은 2026-10-24 에 생겼다 —
3249
+ * 어드민 오류 경계에 이 가지가 없어 낡은 묶음에 사람이 갇히고 있었다). 두 앱은 번들이
3250
+ * 갈려 서로의 `src/` 를 못 끌어 쓴다.
3251
+ *
3252
+ * **사본이 갈라지면 조용히 아프다** — 새 브라우저가 새 말투를 내서 한쪽만 더하면, 다른
3253
+ * 앱은 그 오류를 낡은 묶음으로 **못 알아보고 '다시 시도' 만 내밀어** 사람을 가둔다.
3254
+ * 굳은 `lazy` 는 다시 그려도 같은 거절을 던지니까.
3255
+ *
3256
+ * **`recoverFromSkew` 와 한 몸이다** — 복구하는 자는 이미 여기 있는데 *"이게 그 오류인가"*
3257
+ * 를 가리는 자만 밖에 있었다. 새 말투가 생기면 **한 곳만** 고친다.
3258
+ *
3259
+ * @public
3260
+ */
3261
+ export declare function isChunkLoadError(error: unknown): boolean;
3262
+
3214
3263
  /**
3215
3264
  * @public 티어가 매니저 줄(말귀매니저)인지. `none` 과 개인 줄(free·personal_standard)은 false.
3216
3265
  *
@@ -3802,6 +3851,25 @@ export declare const LONG_STORIES: unknown[];
3802
3851
 
3803
3852
  export declare function lsBytes(keys: string[]): number;
3804
3853
 
3854
+ /**
3855
+ * **목록에 든 이름들** — 말귀 청 (406), 2026-10-26.
3856
+ *
3857
+ * 앱이 *"내가 쓰는 이름이 전부 코어 목록에 있나"* 를 세려면 이 목록이 필요한데, 지금까지는
3858
+ * **앱이 `lucideIconSet.ts` 를 정규식으로 훑어야** 했다. 그러다 말귀에서 한 번 샜다 —
3859
+ * 따옴표 있는 열쇠만 세는 자로 훑어 맨 열쇠 `search` 하나를 빠뜨렸고, *"`search` 가 목록에
3860
+ * 없다 → 운영에 빈칸이 있다"* 로 적힐 뻔했다. **소스를 글자로 훑는 자는 늘 이렇게 샌다.**
3861
+ *
3862
+ * 코드로 내주면 그 자가 아예 필요 없다:
3863
+ *
3864
+ * ```ts
3865
+ * import { LUCIDE_ICON_NAMES } from '@ihabdevteam/core/utils'
3866
+ * const missing = myIconNames.filter(n => !LUCIDE_ICON_NAMES.includes(n))
3867
+ * ```
3868
+ *
3869
+ * @public
3870
+ */
3871
+ export declare const LUCIDE_ICON_NAMES: readonly string[];
3872
+
3805
3873
  /** 표시마다 쓰는 아이콘 이름(lucide). 저장소가 쓰는 아이콘 체계를 그대로 따른다. */
3806
3874
  export declare const MARK_ICON: Record<ScoreMark, string>;
3807
3875
 
@@ -4536,11 +4604,29 @@ export declare function PanelRow(props: PanelRowProps): JSX.Element;
4536
4604
 
4537
4605
  declare type PanelRowButton = Base & {
4538
4606
  variant: 'button';
4607
+ /**
4608
+ * @deprecated `buttons={[{ label, onClick }]}` 를 쓴다 — 같은 일을 **두 벌로** 말하던
4609
+ * 자리다(2026-10-26 전수: `buttons` 11곳 · 단일 꼴 6곳). 다음 판에서 걷는다.
4610
+ */
4539
4611
  buttonLabel?: ReactNode;
4612
+ /**
4613
+ * @deprecated `buttons[].btnVariant` 를 쓴다. 이 자리는 **자유 글귀**라 오타가 조용히
4614
+ * 무시된다 — `Button` 의 변종 이름이 아니어도 타입이 안 막는다.
4615
+ */
4540
4616
  btnVariant?: string;
4617
+ /** @deprecated `buttons[].btnSize` 를 쓴다 */
4541
4618
  btnSize?: number;
4619
+ /** @deprecated `buttons[].disabled` 를 쓴다 */
4542
4620
  disabled?: boolean;
4621
+ /**
4622
+ * @deprecated `buttons[].onClick` 를 쓴다.
4623
+ *
4624
+ * **이름이 겹친다** — `Base.onClick` 은 *줄 전체를 누름*이고 이것은 *단추를 누름*이다.
4625
+ * 한 props 에 같은 이름으로 둘이 있어 읽는 사람이 어느 쪽인지 모른다(코드는
4626
+ * `variant === 'button'` 이면 줄 누름을 버려서 가려 두었다).
4627
+ */
4543
4628
  onClick?: () => void;
4629
+ /** 단추 목록 — **이 꼴 하나로 적는다.** 하나짜리도 목록으로 적는다 */
4544
4630
  buttons?: ButtonItem[];
4545
4631
  };
4546
4632
 
@@ -4617,8 +4703,6 @@ declare type PanelRowInput = Base & {
4617
4703
  placeholder?: string;
4618
4704
  /** 비추기만 하는 추천값 — Tab(앞으로)·Space 로 받는다. 자세한 것은 `TextField` 의 `ghostText`. */
4619
4705
  ghostText?: string;
4620
- /** 추천값 뒤 꼬리말 — 안 주면 코어 사전의 것 */
4621
- ghostHint?: string;
4622
4706
  inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
4623
4707
  readOnly?: boolean;
4624
4708
  disabled?: boolean;
@@ -6090,36 +6174,6 @@ export declare interface Recommendation {
6090
6174
  */
6091
6175
  export declare function recommendTables(tables: readonly TableCandidate[], weakLabels: readonly string[], limit?: number): Recommendation[];
6092
6176
 
6093
- /**
6094
- * 배포 skew 복구 — 그리고 그 복구가 내던 오류 화면.
6095
- *
6096
- * ── 무엇이 문제였나 ──
6097
- * 새 배포로 청크 해시가 바뀌면 캐시된 옛 index.html 이 사라진 청크를 부른다. Vite 는
6098
- * `vite:preloadError` 를 던지고, 우리는 그때 한 번 새로고침해 새 index.html 을 받는다.
6099
- * 여기까지는 뜻대로 돈다.
6100
- *
6101
- * 그런데 그 이벤트를 `preventDefault()` 하면 Vite 헬퍼가 이렇게 한다(vite 소스 그대로):
6102
- *
6103
- * function handlePreloadError(err) {
6104
- * const e = new Event('vite:preloadError', { cancelable: true })
6105
- * window.dispatchEvent(e)
6106
- * if (!e.defaultPrevented) throw err // ← 막으면 안 던진다
6107
- * }
6108
- * return baseModule().catch(handlePreloadError) // ← 안 던지니 undefined 로 resolve
6109
- *
6110
- * **`location.reload()` 는 곧바로 멈추지 않는다.** 새 판이 뜨기 전까지 React 는 계속
6111
- * 그리고, `React.lazy` 는 resolve 된 `undefined` 의 `.default` 를 읽는다 —
6112
- * `Cannot read properties of undefined (reading 'default')`. 운영에서 이 오류가
6113
- * 07-09 ~ 08-28 동안 **아홉 사람에게 열세 번** 났다(/today·/customers·/my-word-table·
6114
- * /word-pairs·/word-management·/training-store — 스택은 전부 vendor-react 의 lazy 초기화).
6115
- *
6116
- * 즉 복구는 되는데 그 길목에서 **오류 화면을 한 번 띄우고 가짜 보고를 남기고** 있었다.
6117
- *
6118
- * ── 어떻게 고치나 ──
6119
- * 새로고침을 걸어 둔 동안에는 `lazy` 가 아무것도 결정하지 않게 한다(`lazyPage` 가
6120
- * 영영 resolve 하지 않는 약속을 돌려 Suspense 를 그대로 둔다). 그러려면 "지금 새로고침이
6121
- * 예약돼 있나"를 물을 수 있어야 해서, 그 판단을 여기 한 곳에 둔다.
6122
- */
6123
6177
  /**
6124
6178
  * 배포 skew 로 판단되면 1회만 새로고침해 새 index.html 을 받는다.
6125
6179
  * 앱이 `vite:preloadError`(또는 청크 로드 실패)를 받았을 때 부른다.
@@ -400,6 +400,25 @@
400
400
  color: var(--color-disabled);
401
401
  }
402
402
 
403
+ /* **떠 있는 단추의 막힌 꼴**(말귀 청 (404), 2026-10-25) — 위 기본 막힌 꼴은 바탕이
404
+ `transparent` 라 `position: fixed` 자리에서 **뒤의 판·글자가 단추를 뚫고 보인다.**
405
+ 글은 그대로 두고 바탕만 깐다. 색은 가리는 꼴(`disabled-covered`)이 이미 쓰는 것을
406
+ 그대로 쓴다 — 새 색을 고르지 않는다. */
407
+ .button--variant-disabled-filled
408
+ {
409
+ border: var(--button-border, 1px solid var(--color-whiteLine));
410
+ color: var(--color-disabled);
411
+ --button-subLabel-color: var(--color-disabled);
412
+ background-color: var(--color-darkWhite);
413
+ }
414
+
415
+ .button--variant-disabled-filled .button__icon,
416
+ .button--variant-disabled-filled .button__left,
417
+ .button--variant-disabled-filled .button__right
418
+ {
419
+ color: var(--color-disabled);
420
+ }
421
+
403
422
 
404
423
 
405
424
  /* **가려진 단추에는 테두리 선이 안 보인다**(말귀 요청 (88), 사용자 결정 2026-10-06 —
@@ -11,7 +11,7 @@ import { isTouchPointer, recentlyTouched, useTouchToggle } from '../hooks/touchT
11
11
  /* **ref 는 forwardRef 로 받는다** — React 19 는 ref 를 props 로 넘기지만 peer 는 16.8~ 라, React 18(kscan) 에서는 함수 컴포넌트에 준
12
12
  ref 가 버려진다. 게다가 전에는 안쪽 ref(`btnRef`)가 props 에서 온 ref 를 덮어써 19 에서도 부르는 쪽 ref 가 비었다. 두 ref 를 잇는다. */
13
13
  function ButtonInner(props, forwardedRef) {
14
- const { size = 48, type: explicitType, htmlType, href, target, rel, icon, rightIcon, label: labelProp, count, subLabel, children, ariaLabel, variant = 'default', align = 'center', nowrap = false, selected, toggleable = false, ariaExpanded, ariaControls, disabled = false, useLabel = true, useBorder = true, useBG = true, useDisabledCovered = false, useDisabledInvisible = false, width, minWidth, onClick, onDisabledClick, showTooltipInfo = false, tooltipInfoText = null, tooltipDescription = null, tooltipOnly = false, iconSize = 'medium', iconColor, shape = 'rounded', color, className, ...rest } = props;
14
+ const { size = 48, type: explicitType, htmlType, href, target, rel, icon, rightIcon, label: labelProp, count, subLabel, children, ariaLabel, variant = 'default', align = 'center', nowrap = false, selected, toggleable = false, ariaExpanded, ariaControls, disabled = false, useLabel = true, useBorder = true, useBG = true, useDisabledCovered = false, useDisabledInvisible = false, useDisabledFilled = false, width, minWidth, onClick, onDisabledClick, showTooltipInfo = false, tooltipInfoText = null, tooltipDescription = null, tooltipOnly = false, iconSize = 'medium', iconColor, shape = 'rounded', color, className, ...rest } = props;
15
15
  const sizeKey = typeof size === 'string' && isNaN(Number(size))
16
16
  ? size.toLowerCase()
17
17
  : String(Number(size) || 48);
@@ -22,10 +22,13 @@ function ButtonInner(props, forwardedRef) {
22
22
  // label prop 우선, 없으면 children으로 fallback
23
23
  const label = labelProp ?? children;
24
24
  const disabledProp = disabled || Boolean(rest.disabled);
25
+ /* 막힌 꼴 넷 — **가리기·안 보이기가 먼저**다(둘은 단추를 아예 안 보이게 하므로
26
+ 바탕을 깔라는 말과 함께 오면 안 보이게 하는 쪽이 뜻이 세다). (404) */
25
27
  const effectiveVariant = disabledProp
26
28
  ? useDisabledCovered ? 'disabled-covered'
27
29
  : useDisabledInvisible ? 'disabled-invisibled'
28
- : 'disabled'
30
+ : useDisabledFilled ? 'disabled-filled'
31
+ : 'disabled'
29
32
  : variant;
30
33
  const variantClass = effectiveVariant ? `button--variant-${effectiveVariant}` : '';
31
34
  const alignClass = align ? `button--align-${align}` : '';
@@ -70,11 +70,29 @@ export type ButtonItem = {
70
70
  };
71
71
  export type PanelRowButton = Base & {
72
72
  variant: 'button';
73
+ /**
74
+ * @deprecated `buttons={[{ label, onClick }]}` 를 쓴다 — 같은 일을 **두 벌로** 말하던
75
+ * 자리다(2026-10-26 전수: `buttons` 11곳 · 단일 꼴 6곳). 다음 판에서 걷는다.
76
+ */
73
77
  buttonLabel?: ReactNode;
78
+ /**
79
+ * @deprecated `buttons[].btnVariant` 를 쓴다. 이 자리는 **자유 글귀**라 오타가 조용히
80
+ * 무시된다 — `Button` 의 변종 이름이 아니어도 타입이 안 막는다.
81
+ */
74
82
  btnVariant?: string;
83
+ /** @deprecated `buttons[].btnSize` 를 쓴다 */
75
84
  btnSize?: number;
85
+ /** @deprecated `buttons[].disabled` 를 쓴다 */
76
86
  disabled?: boolean;
87
+ /**
88
+ * @deprecated `buttons[].onClick` 를 쓴다.
89
+ *
90
+ * **이름이 겹친다** — `Base.onClick` 은 *줄 전체를 누름*이고 이것은 *단추를 누름*이다.
91
+ * 한 props 에 같은 이름으로 둘이 있어 읽는 사람이 어느 쪽인지 모른다(코드는
92
+ * `variant === 'button'` 이면 줄 누름을 버려서 가려 두었다).
93
+ */
77
94
  onClick?: () => void;
95
+ /** 단추 목록 — **이 꼴 하나로 적는다.** 하나짜리도 목록으로 적는다 */
78
96
  buttons?: ButtonItem[];
79
97
  };
80
98
  export type PanelRowText = Base & {
@@ -103,8 +121,6 @@ export type PanelRowInput = Base & {
103
121
  placeholder?: string;
104
122
  /** 비추기만 하는 추천값 — Tab(앞으로)·Space 로 받는다. 자세한 것은 `TextField` 의 `ghostText`. */
105
123
  ghostText?: string;
106
- /** 추천값 뒤 꼬리말 — 안 주면 코어 사전의 것 */
107
- ghostHint?: string;
108
124
  inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
109
125
  readOnly?: boolean;
110
126
  disabled?: boolean;
@@ -106,7 +106,7 @@ export function PanelRow(props) {
106
106
  }
107
107
  else if (variant === 'input') {
108
108
  const p = props;
109
- right = (_jsxs("div", { className: `panel-row__input-wrap${useFullWidth ? ' panel-row__input-wrap--full' : ''}`, children: [_jsx(TextField, { value: p.value, onChange: p.onChange ?? noop, onKeyDown: p.onKeyDown, onEnter: p.onEnter, placeholder: p.placeholder, ghostText: p.ghostText, ghostHint: p.ghostHint, inputMode: p.inputMode, readOnly: p.readOnly, disabled: p.disabled, type: p.type, autoComplete: p.autoComplete, maxLength: p.maxLength, showCount: p.showCount, multiline: p.multiline, rows: p.rows, fullWidth: useFullWidth, error: error, ariaLabel: label, required: required, ariaDescribedBy: p.helperText ? helperId : undefined }), p.helperText && _jsx("div", { id: helperId, className: "panel-row__helper caption-1", children: p.helperText })] }));
109
+ right = (_jsxs("div", { className: `panel-row__input-wrap${useFullWidth ? ' panel-row__input-wrap--full' : ''}`, children: [_jsx(TextField, { value: p.value, onChange: p.onChange ?? noop, onKeyDown: p.onKeyDown, onEnter: p.onEnter, placeholder: p.placeholder, ghostText: p.ghostText, inputMode: p.inputMode, readOnly: p.readOnly, disabled: p.disabled, type: p.type, autoComplete: p.autoComplete, maxLength: p.maxLength, showCount: p.showCount, multiline: p.multiline, rows: p.rows, fullWidth: useFullWidth, error: error, ariaLabel: label, required: required, ariaDescribedBy: p.helperText ? helperId : undefined }), p.helperText && _jsx("div", { id: helperId, className: "panel-row__helper caption-1", children: p.helperText })] }));
110
110
  }
111
111
  else if (variant === 'custom') {
112
112
  const p = props;
@@ -13,7 +13,12 @@ import { useIsoLayoutEffect } from '../hooks/useIsoLayoutEffect';
13
13
  import './TextField.css';
14
14
  /** @public */
15
15
  export default function TextField(props) {
16
- const { value, defaultValue, name, inputRef, onChange, label, ariaLabel, ariaDescribedBy, required, placeholder, ghostText, ghostHint, type = 'text', disabled = false, readOnly = false, error, helperText, maxLength, size = 48, variant = 'input', fullWidth = false, newline = false, multiline = false, rows = 3, leftIcon, rightIcon, clearable = false, list, showCount = true, className = '', onFocus, onBlur, onKeyDown, onEnter, inputMode, autoComplete, autoFocus, suggestions: suggestionsProp, filterSuggestions, onSelectSuggestion, autoActiveFirst, openOnFocus = false, } = props;
16
+ const { value, defaultValue, name, inputRef, onChange, label, ariaLabel, ariaDescribedBy, required, placeholder, ghostText, ghostHint, type = 'text', disabled = false, readOnly = false, error, helperText, maxLength,
17
+ /* **기본은 40이다**(사장님 지시 2026-10-25, 말귀 청 (405)) — 같은 줄에 서는 다른
18
+ 조작기가 40이다(세그먼트 단추·줄 옆 `Button`). 글자 칸만 48이라 수를 받는 줄이
19
+ 토글 줄보다 눈에 띄게 깊었다(실측: 그 줄 80px ↔ 토글 줄 56px → 72px 로 좁혀짐).
20
+ 48이 맞는 자리는 그 자리에 `size={48}` 을 적는다. */
21
+ size = 40, variant = 'input', fullWidth = false, newline = false, multiline = false, rows = 3, leftIcon, rightIcon, clearable = false, list, showCount = true, className = '', onFocus, onBlur, onKeyDown, onEnter, inputMode, autoComplete, autoFocus, suggestions: suggestionsProp, filterSuggestions, onSelectSuggestion, autoActiveFirst, openOnFocus = false, } = props;
17
22
  // 읽기 전용·꺼진 칸은 후보로 값을 바꾸지 못한다 — 전에는 ↓·Enter·후보 누름으로 onChange 가 나갔다
18
23
  const suggestions = readOnly || disabled ? undefined : suggestionsProp;
19
24
  const { t } = useTranslation();
@@ -98,6 +98,22 @@ export interface ButtonProps {
98
98
  useDisabledCovered?: boolean;
99
99
  /** disabled 시 버튼을 완전히 투명하게 하는 스타일 */
100
100
  useDisabledInvisible?: boolean;
101
+ /**
102
+ * 막혔을 때도 **바탕을 가진 꼴** — 말귀 청 (404), 2026-10-25.
103
+ *
104
+ * 기본 막힌 꼴(`button--variant-disabled`)은 `background-color: transparent` 다. 글 흐름
105
+ * 안에서는 뒤에 지면밖에 없어 괜찮지만, **떠 있는 단추**(`position: fixed`)에서는 뒤의
106
+ * 판과 글자가 **단추를 뚫고 보인다.** 말귀 어드민 '정책 관리' 의 저장 단추가 그 자리다
107
+ * (판이 2,600px 넘어 떠 있지 않으면 끝까지 내려가야 저장할 수 있다).
108
+ *
109
+ * **막힌 꼴은 변종을 통째로 갈아 끼운다** — `variant="main"` 을 줘도 막히면
110
+ * `button--variant-disabled` 가 선다. 그래서 앱이 `variant` 로는 이 자리를 못 푼다.
111
+ *
112
+ * 가리는 것(`useDisabledCovered`, 글자까지 투명)과 **다르다** — 이쪽은 글이 그대로
113
+ * 보이고 바탕만 생긴다. 바탕색은 가리는 꼴이 이미 쓰는 `--color-darkWhite` 다(새 색을
114
+ * 고르지 않는다 — 색은 사장님 자리다).
115
+ */
116
+ useDisabledFilled?: boolean;
101
117
  width?: number | string;
102
118
  minWidth?: number | string;
103
119
  onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
@@ -1,33 +1,3 @@
1
- /**
2
- * 배포 skew 복구 — 그리고 그 복구가 내던 오류 화면.
3
- *
4
- * ── 무엇이 문제였나 ──
5
- * 새 배포로 청크 해시가 바뀌면 캐시된 옛 index.html 이 사라진 청크를 부른다. Vite 는
6
- * `vite:preloadError` 를 던지고, 우리는 그때 한 번 새로고침해 새 index.html 을 받는다.
7
- * 여기까지는 뜻대로 돈다.
8
- *
9
- * 그런데 그 이벤트를 `preventDefault()` 하면 Vite 헬퍼가 이렇게 한다(vite 소스 그대로):
10
- *
11
- * function handlePreloadError(err) {
12
- * const e = new Event('vite:preloadError', { cancelable: true })
13
- * window.dispatchEvent(e)
14
- * if (!e.defaultPrevented) throw err // ← 막으면 안 던진다
15
- * }
16
- * return baseModule().catch(handlePreloadError) // ← 안 던지니 undefined 로 resolve
17
- *
18
- * **`location.reload()` 는 곧바로 멈추지 않는다.** 새 판이 뜨기 전까지 React 는 계속
19
- * 그리고, `React.lazy` 는 resolve 된 `undefined` 의 `.default` 를 읽는다 —
20
- * `Cannot read properties of undefined (reading 'default')`. 운영에서 이 오류가
21
- * 07-09 ~ 08-28 동안 **아홉 사람에게 열세 번** 났다(/today·/customers·/my-word-table·
22
- * /word-pairs·/word-management·/training-store — 스택은 전부 vendor-react 의 lazy 초기화).
23
- *
24
- * 즉 복구는 되는데 그 길목에서 **오류 화면을 한 번 띄우고 가짜 보고를 남기고** 있었다.
25
- *
26
- * ── 어떻게 고치나 ──
27
- * 새로고침을 걸어 둔 동안에는 `lazy` 가 아무것도 결정하지 않게 한다(`lazyPage` 가
28
- * 영영 resolve 하지 않는 약속을 돌려 Suspense 를 그대로 둔다). 그러려면 "지금 새로고침이
29
- * 예약돼 있나"를 물을 수 있어야 해서, 그 판단을 여기 한 곳에 둔다.
30
- */
31
1
  /**
32
2
  * 배포 skew 로 판단되면 1회만 새로고침해 새 index.html 을 받는다.
33
3
  * 앱이 `vite:preloadError`(또는 청크 로드 실패)를 받았을 때 부른다.
@@ -70,3 +40,35 @@ export declare function skewReloadPending(now?: number): boolean;
70
40
  * @public
71
41
  */
72
42
  export declare function installSkewRecovery(): () => void;
43
+ /**
44
+ * **낡은 묶음을 못 받은 오류인가** — 말귀 청 (402), 2026-10-25.
45
+ *
46
+ * 배포 직후 옛 `index.html` 을 들고 있던 창이 새 조각을 찾다 실패하면 나는 오류들이다.
47
+ * **브라우저마다 말이 다르다:**
48
+ *
49
+ * Chrome Failed to fetch dynamically imported module: …/assets/App-xxxx.js
50
+ * Firefox error loading dynamically imported module
51
+ * Safari Importing a module script failed
52
+ * CSS Unable to preload CSS for /assets/App-xxxx.css (Vite)
53
+ *
54
+ * **이 오류는 '다시 시도' 로 안 풀린다.** React 의 `lazy` 는 한 번 거절되면 그 상태로
55
+ * 굳는다(`_status = 2`) — 경계가 다시 그려도 **같은 거절이 그대로 다시 던져진다.**
56
+ * 풀리는 길은 새로고침뿐이다(새 `index.html` 을 받아야 새 조각 이름을 안다). 그래서 이
57
+ * 가름이 맞느냐가 *"사람에게 새로고침을 내미느냐 '다시 시도' 를 내미느냐"* 를 가른다.
58
+ *
59
+ * ## 왜 코어가 드나
60
+ *
61
+ * 이 셈이 **말귀 회원앱과 어드민에 한 벌씩** 있었다(어드민 쪽은 2026-10-24 에 생겼다 —
62
+ * 어드민 오류 경계에 이 가지가 없어 낡은 묶음에 사람이 갇히고 있었다). 두 앱은 번들이
63
+ * 갈려 서로의 `src/` 를 못 끌어 쓴다.
64
+ *
65
+ * **사본이 갈라지면 조용히 아프다** — 새 브라우저가 새 말투를 내서 한쪽만 더하면, 다른
66
+ * 앱은 그 오류를 낡은 묶음으로 **못 알아보고 '다시 시도' 만 내밀어** 사람을 가둔다.
67
+ * 굳은 `lazy` 는 다시 그려도 같은 거절을 던지니까.
68
+ *
69
+ * **`recoverFromSkew` 와 한 몸이다** — 복구하는 자는 이미 여기 있는데 *"이게 그 오류인가"*
70
+ * 를 가리는 자만 밖에 있었다. 새 말투가 생기면 **한 곳만** 고친다.
71
+ *
72
+ * @public
73
+ */
74
+ export declare function isChunkLoadError(error: unknown): boolean;
@@ -1,3 +1,4 @@
1
+ import { getErrorMessage } from './errorMessage';
1
2
  /**
2
3
  * 배포 skew 복구 — 그리고 그 복구가 내던 오류 화면.
3
4
  *
@@ -97,13 +98,35 @@ export function skewReloadPending(now = Date.now()) {
97
98
  export function installSkewRecovery() {
98
99
  if (typeof window === 'undefined')
99
100
  return () => { };
100
- const onChunkError = (e) => { if (recoverFromSkew())
101
+ /**
102
+ * **이 판에서 새로고침을 이미 걸었나** — 말귀 청 (401), 2026-10-25.
103
+ *
104
+ * 듣는 이가 **둘인데 10초 막이는 하나**다. CSS 청크가 깨지면 `link` 의 `error` 가
105
+ * **캡처 단계**라 `onStyleError` 가 먼저 돌아 `recoverFromSkew()` 를 **써 버리고**,
106
+ * 뒤이은 `onChunkError` 는 `false` 를 받아 `preventDefault()` 를 못 했다. 그러면
107
+ * Vite 헬퍼가 오류를 다시 던져 → `lazy` → 오류 경계 → **가짜 보고가 하나** 남는다.
108
+ * 사람은 복구되는데(새로고침은 걸린다) **보고 쪽만 샜다** — 운영 보고에 `Unable to
109
+ * preload CSS for …` 가 그대로 쌓여 있었다(말귀 실측 2026-10-24).
110
+ *
111
+ * **`skewReloadPending()` 을 쓰면 안 된다.** 그것은 `sessionStorage` 를 보므로
112
+ * **새로고침 뒤에도 10초 동안 참**이다 — *"새로고침했는데 새 조각도 아직 CDN 에 안
113
+ * 퍼져 8초 뒤 또 실패"* 하는 참 오류까지 삼켜 사람이 빈 화면에 갇힌다. 이 깃발은
114
+ * **판마다 새로 나므로** 그 건은 그대로 던진다(새 판 = 새 `install` = 깃발 거짓).
115
+ */
116
+ let reloadedThisPage = false;
117
+ const markReload = () => {
118
+ const ok = recoverFromSkew();
119
+ if (ok)
120
+ reloadedThisPage = true;
121
+ return ok;
122
+ };
123
+ const onChunkError = (e) => { if (markReload() || reloadedThisPage)
101
124
  e.preventDefault(); };
102
125
  /* 스타일시트만 본다 — 그림 하나가 깨졌다고 판을 새로 받으면 안 된다 */
103
126
  const onStyleError = (e) => {
104
127
  const el = e.target;
105
128
  if (el instanceof HTMLLinkElement && el.rel === 'stylesheet')
106
- recoverFromSkew();
129
+ markReload();
107
130
  };
108
131
  window.addEventListener('vite:preloadError', onChunkError);
109
132
  window.addEventListener('error', onStyleError, true);
@@ -112,3 +135,46 @@ export function installSkewRecovery() {
112
135
  window.removeEventListener('error', onStyleError, true);
113
136
  };
114
137
  }
138
+ /**
139
+ * **낡은 묶음을 못 받은 오류인가** — 말귀 청 (402), 2026-10-25.
140
+ *
141
+ * 배포 직후 옛 `index.html` 을 들고 있던 창이 새 조각을 찾다 실패하면 나는 오류들이다.
142
+ * **브라우저마다 말이 다르다:**
143
+ *
144
+ * Chrome Failed to fetch dynamically imported module: …/assets/App-xxxx.js
145
+ * Firefox error loading dynamically imported module
146
+ * Safari Importing a module script failed
147
+ * CSS Unable to preload CSS for /assets/App-xxxx.css (Vite)
148
+ *
149
+ * **이 오류는 '다시 시도' 로 안 풀린다.** React 의 `lazy` 는 한 번 거절되면 그 상태로
150
+ * 굳는다(`_status = 2`) — 경계가 다시 그려도 **같은 거절이 그대로 다시 던져진다.**
151
+ * 풀리는 길은 새로고침뿐이다(새 `index.html` 을 받아야 새 조각 이름을 안다). 그래서 이
152
+ * 가름이 맞느냐가 *"사람에게 새로고침을 내미느냐 '다시 시도' 를 내미느냐"* 를 가른다.
153
+ *
154
+ * ## 왜 코어가 드나
155
+ *
156
+ * 이 셈이 **말귀 회원앱과 어드민에 한 벌씩** 있었다(어드민 쪽은 2026-10-24 에 생겼다 —
157
+ * 어드민 오류 경계에 이 가지가 없어 낡은 묶음에 사람이 갇히고 있었다). 두 앱은 번들이
158
+ * 갈려 서로의 `src/` 를 못 끌어 쓴다.
159
+ *
160
+ * **사본이 갈라지면 조용히 아프다** — 새 브라우저가 새 말투를 내서 한쪽만 더하면, 다른
161
+ * 앱은 그 오류를 낡은 묶음으로 **못 알아보고 '다시 시도' 만 내밀어** 사람을 가둔다.
162
+ * 굳은 `lazy` 는 다시 그려도 같은 거절을 던지니까.
163
+ *
164
+ * **`recoverFromSkew` 와 한 몸이다** — 복구하는 자는 이미 여기 있는데 *"이게 그 오류인가"*
165
+ * 를 가리는 자만 밖에 있었다. 새 말투가 생기면 **한 곳만** 고친다.
166
+ *
167
+ * @public
168
+ */
169
+ export function isChunkLoadError(error) {
170
+ /* 원인 꺼내기는 한 벌(`getErrorMessage`) — `instanceof Error` 로 가르면 평범한 객체로
171
+ 오는 원인이 사라진다(`errorCauseSingleSource` 못이 그것을 센다). */
172
+ if (error == null)
173
+ return false;
174
+ return CHUNK_LOAD_PATTERNS.test(getErrorMessage(error));
175
+ }
176
+ /**
177
+ * 위가 보는 말투들. **하나로 두는 까닭** — 새 브라우저가 새 말투를 내면 고칠 자리가
178
+ * 여기 하나다. `g` 를 안 붙인다(`lastIndex` 가 남아 **두 번째 부름이 거짓이 된다**).
179
+ */
180
+ const CHUNK_LOAD_PATTERNS = /Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;
@@ -15,3 +15,21 @@ import type { ComponentType } from 'react';
15
15
  * tree-shaking 이 동작합니다.
16
16
  */
17
17
  export declare const STATIC_LUCIDE_ICONS: Record<string, ComponentType<Record<string, unknown>>>;
18
+ /**
19
+ * **목록에 든 이름들** — 말귀 청 (406), 2026-10-26.
20
+ *
21
+ * 앱이 *"내가 쓰는 이름이 전부 코어 목록에 있나"* 를 세려면 이 목록이 필요한데, 지금까지는
22
+ * **앱이 `lucideIconSet.ts` 를 정규식으로 훑어야** 했다. 그러다 말귀에서 한 번 샜다 —
23
+ * 따옴표 있는 열쇠만 세는 자로 훑어 맨 열쇠 `search` 하나를 빠뜨렸고, *"`search` 가 목록에
24
+ * 없다 → 운영에 빈칸이 있다"* 로 적힐 뻔했다. **소스를 글자로 훑는 자는 늘 이렇게 샌다.**
25
+ *
26
+ * 코드로 내주면 그 자가 아예 필요 없다:
27
+ *
28
+ * ```ts
29
+ * import { LUCIDE_ICON_NAMES } from '@ihabdevteam/core/utils'
30
+ * const missing = myIconNames.filter(n => !LUCIDE_ICON_NAMES.includes(n))
31
+ * ```
32
+ *
33
+ * @public
34
+ */
35
+ export declare const LUCIDE_ICON_NAMES: readonly string[];
@@ -31,7 +31,6 @@ import ArrowLeftIcon from 'lucide-react/dist/esm/icons/arrow-left.mjs';
31
31
  import ArrowRightIcon from 'lucide-react/dist/esm/icons/arrow-right.mjs';
32
32
  import ArrowRightLeftIcon from 'lucide-react/dist/esm/icons/arrow-right-left.mjs';
33
33
  import AudioLinesIcon from 'lucide-react/dist/esm/icons/audio-lines.mjs';
34
- import BabyIcon from 'lucide-react/dist/esm/icons/baby.mjs';
35
34
  import BanIcon from 'lucide-react/dist/esm/icons/ban.mjs';
36
35
  import BellIcon from 'lucide-react/dist/esm/icons/bell.mjs';
37
36
  import BookMarkedIcon from 'lucide-react/dist/esm/icons/book-marked.mjs';
@@ -101,7 +100,6 @@ import MessageSquareTextIcon from 'lucide-react/dist/esm/icons/message-square-te
101
100
  import MinusCircleIcon from 'lucide-react/dist/esm/icons/minus-circle.mjs';
102
101
  import MoreHorizontalIcon from 'lucide-react/dist/esm/icons/more-horizontal.mjs';
103
102
  import PackageIcon from 'lucide-react/dist/esm/icons/package.mjs';
104
- import PaletteIcon from 'lucide-react/dist/esm/icons/palette.mjs';
105
103
  import PartyPopperIcon from 'lucide-react/dist/esm/icons/party-popper.mjs';
106
104
  import PauseIcon from 'lucide-react/dist/esm/icons/pause.mjs';
107
105
  import PencilIcon from 'lucide-react/dist/esm/icons/pencil.mjs';
@@ -126,6 +124,7 @@ import ScissorsIcon from 'lucide-react/dist/esm/icons/scissors.mjs';
126
124
  import SearchXIcon from 'lucide-react/dist/esm/icons/search-x.mjs';
127
125
  import SendIcon from 'lucide-react/dist/esm/icons/send.mjs';
128
126
  import SettingsIcon from 'lucide-react/dist/esm/icons/settings.mjs';
127
+ import Share2Icon from 'lucide-react/dist/esm/icons/share-2.mjs';
129
128
  import ShieldCheckIcon from 'lucide-react/dist/esm/icons/shield-check.mjs';
130
129
  import ShoppingCartIcon from 'lucide-react/dist/esm/icons/shopping-cart.mjs';
131
130
  import ShuffleIcon from 'lucide-react/dist/esm/icons/shuffle.mjs';
@@ -158,11 +157,8 @@ import UsersRoundIcon from 'lucide-react/dist/esm/icons/users-round.mjs';
158
157
  import Volume2Icon from 'lucide-react/dist/esm/icons/volume-2.mjs';
159
158
  import WrenchIcon from 'lucide-react/dist/esm/icons/wrench.mjs';
160
159
  import XIcon from 'lucide-react/dist/esm/icons/x.mjs';
161
- import ZapIcon from 'lucide-react/dist/esm/icons/zap.mjs';
162
160
  import AnchorIcon from 'lucide-react/dist/esm/icons/anchor.mjs';
163
161
  import ArmchairIcon from 'lucide-react/dist/esm/icons/armchair.mjs';
164
- import ArrowUpAZIcon from 'lucide-react/dist/esm/icons/arrow-up-a-z.mjs';
165
- import BarChart2Icon from 'lucide-react/dist/esm/icons/bar-chart-2.mjs';
166
162
  import CalendarIcon from 'lucide-react/dist/esm/icons/calendar.mjs';
167
163
  import CarIcon from 'lucide-react/dist/esm/icons/car.mjs';
168
164
  import CoffeeIcon from 'lucide-react/dist/esm/icons/coffee.mjs';
@@ -171,10 +167,8 @@ import ClockIcon from 'lucide-react/dist/esm/icons/clock.mjs';
171
167
  import TargetIcon from 'lucide-react/dist/esm/icons/target.mjs';
172
168
  import PercentIcon from 'lucide-react/dist/esm/icons/percent.mjs';
173
169
  import InboxIcon from 'lucide-react/dist/esm/icons/inbox.mjs';
174
- import ListTreeIcon from 'lucide-react/dist/esm/icons/list-tree.mjs';
175
170
  import MessageSquareMoreIcon from 'lucide-react/dist/esm/icons/message-square-more.mjs';
176
171
  import MinusIcon from 'lucide-react/dist/esm/icons/minus.mjs';
177
- import Share2Icon from 'lucide-react/dist/esm/icons/share-2.mjs';
178
172
  import SparklesIcon from 'lucide-react/dist/esm/icons/sparkles.mjs';
179
173
  import TypeIcon from 'lucide-react/dist/esm/icons/type.mjs';
180
174
  import VolumeIcon from 'lucide-react/dist/esm/icons/volume.mjs';
@@ -209,11 +203,8 @@ export const STATIC_LUCIDE_ICONS = {
209
203
  'arrow-left': ArrowLeftIcon,
210
204
  'arrow-right': ArrowRightIcon,
211
205
  'arrow-right-left': ArrowRightLeftIcon,
212
- 'arrow-up-a-z': ArrowUpAZIcon,
213
206
  'audio-lines': AudioLinesIcon,
214
- 'baby': BabyIcon,
215
207
  'ban': BanIcon,
216
- 'bar-chart-2': BarChart2Icon,
217
208
  'bell': BellIcon,
218
209
  'book-marked': BookMarkedIcon,
219
210
  'book-open': BookOpenIcon,
@@ -260,6 +251,10 @@ export const STATIC_LUCIDE_ICONS = {
260
251
  /* 시각·시간을 뜻하는 이름이 하나도 없었다(말귀 '⋯' 메뉴의 '시간' 항목) */
261
252
  'clock': ClockIcon,
262
253
  /* 정답률·목표 — target 과 percent 를 함께 둔다(쓰는 쪽이 뜻에 맞는 것을 고른다) */
254
+ 'lock': LockIcon,
255
+ 'search-x': SearchXIcon,
256
+ 'share-2': Share2Icon,
257
+ 'tag': TagIcon,
263
258
  'target': TargetIcon,
264
259
  'percent': PercentIcon,
265
260
  'gavel': GavelIcon,
@@ -283,9 +278,7 @@ export const STATIC_LUCIDE_ICONS = {
283
278
  'list': ListIcon,
284
279
  'list-checks': ListChecksIcon,
285
280
  'list-ordered': ListOrderedIcon,
286
- 'list-tree': ListTreeIcon,
287
281
  'loader': LoaderIcon,
288
- 'lock': LockIcon,
289
282
  'log-out': LogOutIcon,
290
283
  'mail': MailIcon,
291
284
  'map-pin': MapPinIcon,
@@ -300,7 +293,6 @@ export const STATIC_LUCIDE_ICONS = {
300
293
  'moon': MoonIcon,
301
294
  'more-horizontal': MoreHorizontalIcon,
302
295
  'package': PackageIcon,
303
- 'palette': PaletteIcon,
304
296
  'party-popper': PartyPopperIcon,
305
297
  'pause': PauseIcon,
306
298
  'pencil': PencilIcon,
@@ -326,10 +318,8 @@ export const STATIC_LUCIDE_ICONS = {
326
318
  'alert-circle': AlertCircleIcon,
327
319
  'check-circle': CheckCircleIcon,
328
320
  'scissors': ScissorsIcon,
329
- 'search-x': SearchXIcon,
330
321
  'send': SendIcon,
331
322
  'settings': SettingsIcon,
332
- 'share-2': Share2Icon,
333
323
  'shield-check': ShieldCheckIcon,
334
324
  'shopping-cart': ShoppingCartIcon,
335
325
  'shuffle': ShuffleIcon,
@@ -342,7 +332,6 @@ export const STATIC_LUCIDE_ICONS = {
342
332
  'sun-medium': SunMediumIcon,
343
333
  'table': TableIcon,
344
334
  'table-2': Table2Icon,
345
- 'tag': TagIcon,
346
335
  'terminal': TerminalIcon,
347
336
  'text-cursor-input': TextCursorInputIcon,
348
337
  'text-initial': TextInitialIcon,
@@ -366,6 +355,23 @@ export const STATIC_LUCIDE_ICONS = {
366
355
  'volume': VolumeIcon,
367
356
  'volume-2': Volume2Icon,
368
357
  'wrench': WrenchIcon,
369
- 'x': XIcon,
370
- 'zap': ZapIcon
358
+ 'x': XIcon
371
359
  };
360
+ /**
361
+ * **목록에 든 이름들** — 말귀 청 (406), 2026-10-26.
362
+ *
363
+ * 앱이 *"내가 쓰는 이름이 전부 코어 목록에 있나"* 를 세려면 이 목록이 필요한데, 지금까지는
364
+ * **앱이 `lucideIconSet.ts` 를 정규식으로 훑어야** 했다. 그러다 말귀에서 한 번 샜다 —
365
+ * 따옴표 있는 열쇠만 세는 자로 훑어 맨 열쇠 `search` 하나를 빠뜨렸고, *"`search` 가 목록에
366
+ * 없다 → 운영에 빈칸이 있다"* 로 적힐 뻔했다. **소스를 글자로 훑는 자는 늘 이렇게 샌다.**
367
+ *
368
+ * 코드로 내주면 그 자가 아예 필요 없다:
369
+ *
370
+ * ```ts
371
+ * import { LUCIDE_ICON_NAMES } from '@ihabdevteam/core/utils'
372
+ * const missing = myIconNames.filter(n => !LUCIDE_ICON_NAMES.includes(n))
373
+ * ```
374
+ *
375
+ * @public
376
+ */
377
+ export const LUCIDE_ICON_NAMES = Object.freeze(Object.keys(STATIC_LUCIDE_ICONS));
@@ -58,7 +58,8 @@ export { wordContainsChoseong, wordContainsJungseong, wordContainsJongseong, wor
58
58
  export { isSyllablePattern, matchesSyllablePattern, validateSyllableSearchInput, patternToComposition, matchesWordQuery, searchAndRankWords } from './utils/koreanSyllable';
59
59
  export { PLAN_FEATURES, PLAN_LIMITS, TIER_RANK, getPlanTier, isManagerTier, type PlanTier, type DataLevel, type PlanFeatures, type PlanLimits, } from './utils/planFeatures';
60
60
  export { WORD_SUGGESTION_WEEKLY_QUOTA, WORD_SUGGESTION_ACCOUNT_LIMIT, WORD_SUGGESTION_EXISTING_ERROR, isThisWeekPick, } from './utils/wordSuggestionPolicy';
61
- export { recoverFromSkew, skewReloadPending, installSkewRecovery } from './utils/chunkSkew';
61
+ export { recoverFromSkew, skewReloadPending, installSkewRecovery, isChunkLoadError } from './utils/chunkSkew';
62
+ export { LUCIDE_ICON_NAMES } from './utils/lucideIconSet';
62
63
  export { isSessionForThisTab } from './utils/sessionTab';
63
64
  export type { TabSessionLike } from './utils/sessionTab';
64
65
  export { lazyPage } from './utils/lazyPage';