@ihabdevteam/core 0.443.0 → 0.444.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components.cjs.js +186 -181
  3. package/dist/components.esm.css +1 -1
  4. package/dist/hooks.cjs.js +5 -5
  5. package/dist/i18n.cjs.js +3 -3
  6. package/dist/ihabdevteam-core.cjs.js +191 -186
  7. package/dist/ihabdevteam-core.d.ts +101 -2
  8. package/dist/packages/core/src/components/DatePicker.css +8 -0
  9. package/dist/packages/core/src/components/DatePicker.js +13 -1
  10. package/dist/packages/core/src/components/FolderAddPopup.d.ts +25 -0
  11. package/dist/packages/core/src/components/FolderAddPopup.js +21 -0
  12. package/dist/packages/core/src/components/FolderList.css +18 -0
  13. package/dist/packages/core/src/components/FolderList.d.ts +28 -0
  14. package/dist/packages/core/src/components/FolderList.js +23 -0
  15. package/dist/packages/core/src/components/PagePopup.d.ts +10 -1
  16. package/dist/packages/core/src/components/PagePopup.js +7 -1
  17. package/dist/packages/core/src/components/Popup/Popup.css +14 -0
  18. package/dist/packages/core/src/components/Popup/Popup.d.ts +9 -0
  19. package/dist/packages/core/src/components/Popup/Popup.js +21 -3
  20. package/dist/packages/core/src/components/TextField.css +20 -0
  21. package/dist/packages/core/src/components/TextField.d.ts +17 -0
  22. package/dist/packages/core/src/components/TextField.js +19 -4
  23. package/dist/packages/core/src/components/Training/TrainingBlockGrid.js +25 -1
  24. package/dist/packages/core/src/components.d.ts +4 -0
  25. package/dist/packages/core/src/components.js +2 -0
  26. package/dist/packages/core/src/hooks/useBackClosable.d.ts +8 -0
  27. package/dist/packages/core/src/hooks/useBackClosable.js +97 -0
  28. package/dist/packages/core/src/hooks.d.ts +1 -0
  29. package/dist/packages/core/src/hooks.js +1 -0
  30. package/dist/packages/core/src/i18n/locales/en.json +10 -3
  31. package/dist/packages/core/src/i18n/locales/ko.json +10 -3
  32. package/dist/packages/core/src/utils/jamoSpeech.d.ts +19 -0
  33. package/dist/packages/core/src/utils/jamoSpeech.js +53 -0
  34. package/dist/packages/core/src/utils/lucideIconSet.js +2 -0
  35. package/dist/packages/core/src/utils/wordTrainingGenerators.d.ts +1 -6
  36. package/dist/packages/core/src/utils/wordTrainingGenerators.js +3 -45
  37. package/dist/packages/core/src/version.d.ts +1 -1
  38. package/dist/packages/core/src/version.js +1 -1
  39. package/dist/utils.cjs.js +136 -131
  40. package/package.json +1 -1
@@ -107,6 +107,10 @@ export { default as FolderHead } from './components/FolderHead';
107
107
  export type { FolderHeadProps } from './components/FolderHead';
108
108
  export { default as FolderGrid } from './components/FolderGrid';
109
109
  export type { FolderGridProps, FolderEntry } from './components/FolderGrid';
110
+ export { default as FolderList } from './components/FolderList';
111
+ export type { FolderListProps } from './components/FolderList';
112
+ export { default as FolderAddPopup } from './components/FolderAddPopup';
113
+ export type { FolderAddPopupProps } from './components/FolderAddPopup';
110
114
  export { default as CardSection } from './components/CardSection';
111
115
  export type { CardSectionProps } from './components/CardSection';
112
116
  export { default as FolderSearchSections } from './components/FolderSearchSections';
@@ -74,6 +74,8 @@ export { default as Breadcrumb } from './components/Breadcrumb';
74
74
  /* 폴더로 보는 화면 — 구조 단추 · 길 · 폴더 칸(말귀 청 (435), 2026-11-13). 길 셈은 `utils` 의 `folder*` 다 */
75
75
  export { default as FolderHead } from './components/FolderHead';
76
76
  export { default as FolderGrid } from './components/FolderGrid';
77
+ export { default as FolderList } from './components/FolderList';
78
+ export { default as FolderAddPopup } from './components/FolderAddPopup';
77
79
  /* 폴더 화면의 남은 조각(말귀 청 (437) ㉮, 2026-11-13) — 카드가 서는 자리 · 찾는 중 폴더마다 나눠 세우기 */
78
80
  export { default as CardSection } from './components/CardSection';
79
81
  export { default as FolderSearchSections } from './components/FolderSearchSections';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 열려 있는 동안 폰 '뒤로' 로 닫히게 한다.
3
+ *
4
+ * @param open 열려 있는가. 거짓이면 아무것도 안 한다.
5
+ * @param onBack 뒤로가 왔을 때 부른다 — 닫는다. **`false` 를 돌려주면 안 닫은 것**으로 보고 칸을 도로 쌓는다.
6
+ * @public
7
+ */
8
+ export declare function useBackClosable(open: boolean, onBack: () => boolean | void): void;
@@ -0,0 +1,97 @@
1
+ 'use client';
2
+ import { useEffect, useRef } from 'react';
3
+ const STATE_KEY = '__ihabBackClosable';
4
+ const stack = [];
5
+ let ignorePops = 0;
6
+ let listening = false;
7
+ let nextId = 1;
8
+ function topState() {
9
+ try {
10
+ const s = window.history.state;
11
+ const v = s?.[STATE_KEY];
12
+ return typeof v === 'number' ? v : undefined;
13
+ }
14
+ catch {
15
+ return undefined;
16
+ }
17
+ }
18
+ function pushMark(id) {
19
+ try {
20
+ /* 라우터가 쓰는 표(react-router 의 `idx` · `key`, Next 의 `__NA` 등)를 지우지 않게 지금 표에 얹는다 */
21
+ const prev = (window.history.state ?? {});
22
+ window.history.pushState({ ...prev, [STATE_KEY]: id }, '');
23
+ }
24
+ catch { /* 못 쌓으면 뒤로가 창을 못 닫을 뿐이다 */ }
25
+ }
26
+ function onPop() {
27
+ if (ignorePops > 0) {
28
+ ignorePops--;
29
+ return;
30
+ }
31
+ const top = stack[stack.length - 1];
32
+ if (!top)
33
+ return;
34
+ /* 앞으로(forward)로 우리 칸에 되돌아온 것 — 닫을 일이 아니다 */
35
+ if (topState() === top.id)
36
+ return;
37
+ if (top.onBack() === false) {
38
+ pushMark(top.id);
39
+ return;
40
+ }
41
+ /* 닫혔다 — 칸은 이미 걷혔으니 떠날 때 되돌리지 않게 스택에서 먼저 뺀다 */
42
+ stack.pop();
43
+ }
44
+ function listen() {
45
+ if (listening || typeof window === 'undefined')
46
+ return;
47
+ window.addEventListener('popstate', onPop);
48
+ listening = true;
49
+ }
50
+ /**
51
+ * 열려 있는 동안 폰 '뒤로' 로 닫히게 한다.
52
+ *
53
+ * @param open 열려 있는가. 거짓이면 아무것도 안 한다.
54
+ * @param onBack 뒤로가 왔을 때 부른다 — 닫는다. **`false` 를 돌려주면 안 닫은 것**으로 보고 칸을 도로 쌓는다.
55
+ * @public
56
+ */
57
+ export function useBackClosable(open, onBack) {
58
+ const onBackRef = useRef(onBack);
59
+ useEffect(() => { onBackRef.current = onBack; });
60
+ const idRef = useRef(null);
61
+ useEffect(() => {
62
+ if (!open || typeof window === 'undefined')
63
+ return;
64
+ listen();
65
+ /* 엄격 모드로 다시 걸릴 때는 같은 번호를 쓰고, 칸이 아직 맨 위면 또 쌓지 않는다 */
66
+ const id = idRef.current ?? (idRef.current = nextId++);
67
+ const entry = { id, onBack: () => onBackRef.current() };
68
+ stack.push(entry);
69
+ if (topState() !== id)
70
+ pushMark(id);
71
+ return () => {
72
+ const i = stack.indexOf(entry);
73
+ /* 뒤로로 닫혔으면 onPop 이 이미 뺐다 — 칸도 걷혀 있다 */
74
+ if (i < 0) {
75
+ idRef.current = null;
76
+ return;
77
+ }
78
+ stack.splice(i, 1);
79
+ setTimeout(() => {
80
+ /* 다시 걸렸으면(엄격 모드) 그대로 둔다 */
81
+ if (stack.some(e => e.id === id))
82
+ return;
83
+ if (idRef.current === id)
84
+ idRef.current = null;
85
+ if (topState() !== id)
86
+ return;
87
+ ignorePops++;
88
+ try {
89
+ window.history.back();
90
+ }
91
+ catch {
92
+ ignorePops--;
93
+ }
94
+ }, 0);
95
+ };
96
+ }, [open]);
97
+ }
@@ -40,4 +40,5 @@ export * from './hooks/useSaveOnHide';
40
40
  export * from './hooks/useScreenWakeLock';
41
41
  export * from './hooks/useOnline';
42
42
  export * from './hooks/useOutsideClose';
43
+ export { useBackClosable } from './hooks/useBackClosable';
43
44
  export * from './hooks/useClosingDelay';
@@ -46,4 +46,5 @@ export * from './hooks/useSaveOnHide';
46
46
  export * from './hooks/useScreenWakeLock';
47
47
  export * from './hooks/useOnline';
48
48
  export * from './hooks/useOutsideClose';
49
+ export { useBackClosable } from './hooks/useBackClosable';
49
50
  export * from './hooks/useClosingDelay';
@@ -102,7 +102,8 @@
102
102
  }
103
103
  },
104
104
  "unknownError": "Unknown error",
105
- "networkError": "The network connection is unstable. Check your connection and try again."
105
+ "networkError": "The network connection is unstable. Check your connection and try again.",
106
+ "add": "Add"
106
107
  },
107
108
  "calendar": {
108
109
  "rangeSelect": "Select period",
@@ -987,7 +988,8 @@
987
988
  "imageCount": "{{done}} / {{total}} items"
988
989
  },
989
990
  "textField": {
990
- "clearAriaLabel": "Clear input"
991
+ "clearAriaLabel": "Clear input",
992
+ "showPassword": "Show password"
991
993
  },
992
994
  "segmentedControl": {
993
995
  "ariaLabel": "Select tab"
@@ -1119,7 +1121,12 @@
1119
1121
  "placeMenu": "{{name}} menu",
1120
1122
  "tree": "Show folder structure",
1121
1123
  "fold": "Collapse {{name}}",
1122
- "unfold": "Expand {{name}}"
1124
+ "unfold": "Expand {{name}}",
1125
+ "add": {
1126
+ "title": "Add Folder",
1127
+ "sub": "Enter a name for the new folder.",
1128
+ "placeholder": "Folder name"
1129
+ }
1123
1130
  },
1124
1131
  "board": {
1125
1132
  "empty": "No items yet."
@@ -98,7 +98,8 @@
98
98
  }
99
99
  },
100
100
  "unknownError": "알 수 없는 오류",
101
- "networkError": "네트워크 연결이 불안정합니다. 연결 상태를 확인한 뒤 다시 시도해 주세요."
101
+ "networkError": "네트워크 연결이 불안정합니다. 연결 상태를 확인한 뒤 다시 시도해 주세요.",
102
+ "add": "추가"
102
103
  },
103
104
  "calendar": {
104
105
  "rangeSelect": "기간 선택",
@@ -972,7 +973,8 @@
972
973
  "imageCount": "{{done}} / {{total}}개"
973
974
  },
974
975
  "textField": {
975
- "clearAriaLabel": "입력값 지우기"
976
+ "clearAriaLabel": "입력값 지우기",
977
+ "showPassword": "비밀번호 보기"
976
978
  },
977
979
  "segmentedControl": {
978
980
  "ariaLabel": "선택 탭"
@@ -1101,7 +1103,12 @@
1101
1103
  "placeMenu": "{{name}} 메뉴",
1102
1104
  "tree": "폴더 구조 보기",
1103
1105
  "fold": "{{name}} 접기",
1104
- "unfold": "{{name}} 펼치기"
1106
+ "unfold": "{{name}} 펼치기",
1107
+ "add": {
1108
+ "title": "폴더 추가",
1109
+ "sub": "새 폴더 이름을 입력하세요.",
1110
+ "placeholder": "폴더 이름"
1111
+ }
1105
1112
  },
1106
1113
  "board": {
1107
1114
  "empty": "등록된 항목이 없습니다."
@@ -0,0 +1,19 @@
1
+ /**
2
+ * **자모를 소리 내어 읽을 이름으로** — 작은 파일(말귀 청 (438) ㉳ⓑ, 2026-11-14).
3
+ *
4
+ * `wordTrainingGenerators`(25kB 남짓)에 있었는데, 말귀 앱의 첫 조각이 이 함수 하나만 쓰면서 그 파일을 통째로
5
+ * 끌고 왔다. 읽기 셈에 드는 것(낱자 이름 표 · 조사 맞추기)만 여기 둔다. `@ihabdevteam/core/utils/jamoSpeech` 로
6
+ * 바로 받거나, 예전처럼 `@ihabdevteam/core/utils` 에서 받는다.
7
+ */
8
+ /**
9
+ * 자모 → 낱자 이름(TTS가 음소를 정확히 읽도록). 자음은 명칭(ㄱ→기역), 모음은 소릿값(ㅏ→아).
10
+ * bare 자모('ㄱ')를 그대로 TTS에 넣으면 엔진이 '그/가'처럼 잘못 읽어, 음소 합치기 문장에서 이름으로 치환한다.
11
+ */
12
+ /** @internal 낱자 이름 표 — `wordTrainingGenerators` 의 합치기 문장도 이 표를 쓴다 */
13
+ export declare const JAMO_NAME: Record<string, string>;
14
+ /**
15
+ * @public TTS 전용 변환 — 문장 속 따옴표로 감싼 낱개 자모("ㄱ")를 낱자 이름("기역")으로 치환하고 뒤 조사를 맞춘다.
16
+ * 표시 텍스트는 자모 그대로 두고(교육용 표기), 합성·캐시 키에만 이 변환을 적용한다. 자음은 명칭(ㄱ→기역),
17
+ * 모음은 소릿값(ㅏ→아). 음소 합치기뿐 아니라 음소 바꾸기·자음 탈락 등 자모가 든 모든 문장에 공통 적용된다.
18
+ */
19
+ export declare function jamoToNamesForSpeech(text: string): string;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * **자모를 소리 내어 읽을 이름으로** — 작은 파일(말귀 청 (438) ㉳ⓑ, 2026-11-14).
3
+ *
4
+ * `wordTrainingGenerators`(25kB 남짓)에 있었는데, 말귀 앱의 첫 조각이 이 함수 하나만 쓰면서 그 파일을 통째로
5
+ * 끌고 왔다. 읽기 셈에 드는 것(낱자 이름 표 · 조사 맞추기)만 여기 둔다. `@ihabdevteam/core/utils/jamoSpeech` 로
6
+ * 바로 받거나, 예전처럼 `@ihabdevteam/core/utils` 에서 받는다.
7
+ */
8
+ /**
9
+ * 자모 → 낱자 이름(TTS가 음소를 정확히 읽도록). 자음은 명칭(ㄱ→기역), 모음은 소릿값(ㅏ→아).
10
+ * bare 자모('ㄱ')를 그대로 TTS에 넣으면 엔진이 '그/가'처럼 잘못 읽어, 음소 합치기 문장에서 이름으로 치환한다.
11
+ */
12
+ /** @internal 낱자 이름 표 — `wordTrainingGenerators` 의 합치기 문장도 이 표를 쓴다 */
13
+ export const JAMO_NAME = {
14
+ // 자음(초성·종성 공용 낱자 이름)
15
+ 'ㄱ': '기역', 'ㄲ': '쌍기역', 'ㄴ': '니은', 'ㄷ': '디귿', 'ㄸ': '쌍디귿', 'ㄹ': '리을',
16
+ 'ㅁ': '미음', 'ㅂ': '비읍', 'ㅃ': '쌍비읍', 'ㅅ': '시옷', 'ㅆ': '쌍시옷', 'ㅇ': '이응',
17
+ 'ㅈ': '지읒', 'ㅉ': '쌍지읒', 'ㅊ': '치읓', 'ㅋ': '키읔', 'ㅌ': '티읕', 'ㅍ': '피읖', 'ㅎ': '히읗',
18
+ // 겹받침(홑받침만 쓰지만 방어적으로 포함)
19
+ 'ㄳ': '기역시옷', 'ㄵ': '니은지읒', 'ㄶ': '니은히읗', 'ㄺ': '리을기역', 'ㄻ': '리을미음',
20
+ 'ㄼ': '리을비읍', 'ㄽ': '리을시옷', 'ㄾ': '리을티읕', 'ㄿ': '리을피읖', 'ㅀ': '리을히읗', 'ㅄ': '비읍시옷',
21
+ // 모음(소릿값 = 낱자 이름)
22
+ 'ㅏ': '아', 'ㅐ': '애', 'ㅑ': '야', 'ㅒ': '얘', 'ㅓ': '어', 'ㅔ': '에', 'ㅕ': '여', 'ㅖ': '예',
23
+ 'ㅗ': '오', 'ㅘ': '와', 'ㅙ': '왜', 'ㅚ': '외', 'ㅛ': '요', 'ㅜ': '우', 'ㅝ': '워', 'ㅞ': '웨',
24
+ 'ㅟ': '위', 'ㅠ': '유', 'ㅡ': '으', 'ㅢ': '의', 'ㅣ': '이',
25
+ };
26
+ /**
27
+ * @public TTS 전용 변환 — 문장 속 따옴표로 감싼 낱개 자모("ㄱ")를 낱자 이름("기역")으로 치환하고 뒤 조사를 맞춘다.
28
+ * 표시 텍스트는 자모 그대로 두고(교육용 표기), 합성·캐시 키에만 이 변환을 적용한다. 자음은 명칭(ㄱ→기역),
29
+ * 모음은 소릿값(ㅏ→아). 음소 합치기뿐 아니라 음소 바꾸기·자음 탈락 등 자모가 든 모든 문장에 공통 적용된다.
30
+ */
31
+ export function jamoToNamesForSpeech(text) {
32
+ return text.replace(/"([ㄱ-ㅣ])"(으로|와|과|을|를|이|가|은|는|로)?/g, (m, jamo, josa) => {
33
+ const name = JAMO_NAME[jamo];
34
+ if (!name)
35
+ return m;
36
+ if (!josa)
37
+ return `"${name}"`;
38
+ const jong = (name.charCodeAt(name.length - 1) - 0xAC00) % 28;
39
+ const hasJong = jong !== 0;
40
+ let j = josa;
41
+ if (josa === '와' || josa === '과')
42
+ j = hasJong ? '과' : '와';
43
+ else if (josa === '을' || josa === '를')
44
+ j = hasJong ? '을' : '를';
45
+ else if (josa === '이' || josa === '가')
46
+ j = hasJong ? '이' : '가';
47
+ else if (josa === '은' || josa === '는')
48
+ j = hasJong ? '은' : '는';
49
+ else if (josa === '으로' || josa === '로')
50
+ j = (jong === 0 || jong === 8) ? '로' : '으로';
51
+ return `"${name}"${j}`;
52
+ });
53
+ }
@@ -64,6 +64,7 @@ import EllipsisIcon from 'lucide-react/dist/esm/icons/ellipsis.mjs';
64
64
  import EraserIcon from 'lucide-react/dist/esm/icons/eraser.mjs';
65
65
  import ExternalLinkIcon from 'lucide-react/dist/esm/icons/external-link.mjs';
66
66
  import EyeIcon from 'lucide-react/dist/esm/icons/eye.mjs';
67
+ import EyeOffIcon from 'lucide-react/dist/esm/icons/eye-off.mjs';
67
68
  import FileTextIcon from 'lucide-react/dist/esm/icons/file-text.mjs';
68
69
  import FlipHorizontalIcon from 'lucide-react/dist/esm/icons/flip-horizontal.mjs';
69
70
  import FolderIcon from 'lucide-react/dist/esm/icons/folder.mjs';
@@ -250,6 +251,7 @@ export const STATIC_LUCIDE_ICONS = {
250
251
  'eraser': EraserIcon,
251
252
  'external-link': ExternalLinkIcon,
252
253
  'eye': EyeIcon,
254
+ 'eye-off': EyeOffIcon,
253
255
  'file-text': FileTextIcon,
254
256
  'flip-horizontal': FlipHorizontalIcon,
255
257
  'folder': FolderIcon,
@@ -40,12 +40,7 @@ export declare function getDropCardTitle(typeKey: string | undefined, item: Reco
40
40
  * 문장 문구를 한 곳에 모아, 프리워밍이 만든 문장과 러너가 재생하는 문장이 항상 문자 단위로 일치하게 한다.
41
41
  */
42
42
  export declare function cardQuestionTitle(typeKey: string | undefined, item: Record<string, unknown>, parts: string[]): string;
43
- /**
44
- * @public TTS 전용 변환 — 문장 속 따옴표로 감싼 낱개 자모("ㄱ")를 낱자 이름("기역")으로 치환하고 뒤 조사를 맞춘다.
45
- * 표시 텍스트는 자모 그대로 두고(교육용 표기), 합성·캐시 키에만 이 변환을 적용한다. 자음은 명칭(ㄱ→기역),
46
- * 모음은 소릿값(ㅏ→아). 음소 합치기뿐 아니라 음소 바꾸기·자음 탈락 등 자모가 든 모든 문장에 공통 적용된다.
47
- */
48
- export declare function jamoToNamesForSpeech(text: string): string;
43
+ export { jamoToNamesForSpeech } from './jamoSpeech';
49
44
  /** 표준발음 조회 — 없으면 단어 자체(발음 데이터 없는 경우의 안전한 폴백). */
50
45
  declare function pronOf(word: string, pronMap: Map<string, string>): string;
51
46
  /**
@@ -11,6 +11,7 @@ import { finalToPhoneme } from './phonemeConvert';
11
11
  import { shuffle as shuffled } from './array';
12
12
  import { hasSel } from './wordContrast';
13
13
  import { cardGroupOf } from './wordTrainingRuntimeTypes';
14
+ import { JAMO_NAME } from './jamoSpeech';
14
15
  /** 받침 유무로 '와/과' 조사. 한글 아니면 '와'. */
15
16
  function josaWaGwa(w) {
16
17
  const code = (w.charCodeAt((w.length || 1) - 1)) || 0;
@@ -41,23 +42,6 @@ function josaIga(w) {
41
42
  return (code - 0xAC00) % 28 === 0 ? '가' : '이';
42
43
  return /[ㄱ-ㅎ]/.test(ch) ? '이' : '가';
43
44
  }
44
- /**
45
- * 자모 → 낱자 이름(TTS가 음소를 정확히 읽도록). 자음은 명칭(ㄱ→기역), 모음은 소릿값(ㅏ→아).
46
- * bare 자모('ㄱ')를 그대로 TTS에 넣으면 엔진이 '그/가'처럼 잘못 읽어, 음소 합치기 문장에서 이름으로 치환한다.
47
- */
48
- const JAMO_NAME = {
49
- // 자음(초성·종성 공용 낱자 이름)
50
- 'ㄱ': '기역', 'ㄲ': '쌍기역', 'ㄴ': '니은', 'ㄷ': '디귿', 'ㄸ': '쌍디귿', 'ㄹ': '리을',
51
- 'ㅁ': '미음', 'ㅂ': '비읍', 'ㅃ': '쌍비읍', 'ㅅ': '시옷', 'ㅆ': '쌍시옷', 'ㅇ': '이응',
52
- 'ㅈ': '지읒', 'ㅉ': '쌍지읒', 'ㅊ': '치읓', 'ㅋ': '키읔', 'ㅌ': '티읕', 'ㅍ': '피읖', 'ㅎ': '히읗',
53
- // 겹받침(홑받침만 쓰지만 방어적으로 포함)
54
- 'ㄳ': '기역시옷', 'ㄵ': '니은지읒', 'ㄶ': '니은히읗', 'ㄺ': '리을기역', 'ㄻ': '리을미음',
55
- 'ㄼ': '리을비읍', 'ㄽ': '리을시옷', 'ㄾ': '리을티읕', 'ㄿ': '리을피읖', 'ㅀ': '리을히읗', 'ㅄ': '비읍시옷',
56
- // 모음(소릿값 = 낱자 이름)
57
- 'ㅏ': '아', 'ㅐ': '애', 'ㅑ': '야', 'ㅒ': '얘', 'ㅓ': '어', 'ㅔ': '에', 'ㅕ': '여', 'ㅖ': '예',
58
- 'ㅗ': '오', 'ㅘ': '와', 'ㅙ': '왜', 'ㅚ': '외', 'ㅛ': '요', 'ㅜ': '우', 'ㅝ': '워', 'ㅞ': '웨',
59
- 'ㅟ': '위', 'ㅠ': '유', 'ㅡ': '으', 'ㅢ': '의', 'ㅣ': '이',
60
- };
61
45
  /**
62
46
  * @public 1음절 단어를 합치기용 음소(초성 자음 + 중성 모음 [+ 종성])로 분해. 음소 합치기 문제용.
63
47
  * 예: '가' → ['ㄱ','ㅏ'], '강' → ['ㄱ','ㅏ','ㅇ']. 파싱 실패 시 [word].
@@ -185,34 +169,8 @@ export function cardQuestionTitle(typeKey, item, parts) {
185
169
  default: return '';
186
170
  }
187
171
  }
188
- /**
189
- * @public TTS 전용 변환 — 문장 속 따옴표로 감싼 낱개 자모("ㄱ")를 낱자 이름("기역")으로 치환하고 뒤 조사를 맞춘다.
190
- * 표시 텍스트는 자모 그대로 두고(교육용 표기), 합성·캐시 키에만 이 변환을 적용한다. 자음은 명칭(ㄱ→기역),
191
- * 모음은 소릿값(ㅏ→아). 음소 합치기뿐 아니라 음소 바꾸기·자음 탈락 등 자모가 든 모든 문장에 공통 적용된다.
192
- */
193
- export function jamoToNamesForSpeech(text) {
194
- return text.replace(/"([ㄱ-ㅣ])"(으로|와|과|을|를|이|가|은|는|로)?/g, (m, jamo, josa) => {
195
- const name = JAMO_NAME[jamo];
196
- if (!name)
197
- return m;
198
- if (!josa)
199
- return `"${name}"`;
200
- const jong = (name.charCodeAt(name.length - 1) - 0xAC00) % 28;
201
- const hasJong = jong !== 0;
202
- let j = josa;
203
- if (josa === '와' || josa === '과')
204
- j = hasJong ? '과' : '와';
205
- else if (josa === '을' || josa === '를')
206
- j = hasJong ? '을' : '를';
207
- else if (josa === '이' || josa === '가')
208
- j = hasJong ? '이' : '가';
209
- else if (josa === '은' || josa === '는')
210
- j = hasJong ? '은' : '는';
211
- else if (josa === '으로' || josa === '로')
212
- j = (jong === 0 || jong === 8) ? '로' : '으로';
213
- return `"${name}"${j}`;
214
- });
215
- }
172
+ /* `jamoToNamesForSpeech` 는 `./jamoSpeech` 로 옮겼다(말귀 청 (438) ㉳ⓑ) — 이 파일을 통째로 안 끌고 오게. 예전 이름으로도 그대로 나간다 */
173
+ export { jamoToNamesForSpeech } from './jamoSpeech';
216
174
  /** 표준발음 조회 — 없으면 단어 자체(발음 데이터 없는 경우의 안전한 폴백). */
217
175
  function pronOf(word, pronMap) {
218
176
  return pronMap.get(word) || word;
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export declare const CORE_VERSION = "0.443.0";
49
+ export declare const CORE_VERSION = "0.444.0";
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export const CORE_VERSION = '0.443.0';
49
+ export const CORE_VERSION = '0.444.0';