@ihabdevteam/core 0.153.0 → 0.155.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.
- package/CHANGELOG.md +28 -0
- package/dist/components.cjs.js +178 -173
- package/dist/components.esm.css +3 -3
- package/dist/hooks.cjs.js +3 -3
- package/dist/i18n.cjs.js +3 -3
- package/dist/ihabdevteam-core.cjs.js +186 -181
- package/dist/ihabdevteam-core.d.ts +43 -4
- package/dist/packages/core/src/components/BarChart.d.ts +1 -1
- package/dist/packages/core/src/components/BarChart.js +4 -3
- package/dist/packages/core/src/components/Table.js +41 -15
- package/dist/packages/core/src/components/TableField.css +32 -0
- package/dist/packages/core/src/components/WordTable.css +48 -1
- package/dist/packages/core/src/components/WordTable.d.ts +7 -1
- package/dist/packages/core/src/components/WordTable.js +168 -10
- package/dist/packages/core/src/components/barChartTypes.d.ts +6 -0
- package/dist/packages/core/src/hooks/useTrainingSessionLog.d.ts +16 -2
- package/dist/packages/core/src/hooks/useTrainingSessionLog.js +34 -11
- package/dist/packages/core/src/i18n/locales/en.json +5 -0
- package/dist/packages/core/src/i18n/locales/ko.json +5 -0
- package/dist/packages/core/src/utils/lucideIconSet.js +2 -0
- package/dist/packages/core/src/utils/planFeatures.d.ts +28 -1
- package/dist/packages/core/src/utils/planFeatures.js +38 -8
- package/dist/packages/core/src/utils/wordTrainingPool.js +31 -3
- package/dist/packages/core/src/utils.d.ts +1 -1
- package/dist/packages/core/src/utils.js +1 -1
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +2 -2
- package/package.json +1 -1
|
@@ -5,8 +5,22 @@ import { logTrainingTime } from '../utils/trainingLogger';
|
|
|
5
5
|
* 훈련 팝업을 **보고 있던** 시간을 기록합니다.
|
|
6
6
|
* 보인 시간이 5초 미만(잘못 열었다 닫은 경우)이면 무시합니다.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* 화면이 가려진 동안(탭 전환·앱 백그라운드)의 시간은 빼고 모읍니다 — 전에는 연 채 3시간
|
|
9
|
+
* 잠가 둔 시간이 훈련 시간으로 적혔다.
|
|
10
|
+
*
|
|
11
|
+
* **언제 보내는가**(사용자 결정 2026-09-16):
|
|
12
|
+
* - 떠날 때(팝업을 닫아 훅이 걷힐 때) 또는 페이지가 내려갈 때(pagehide).
|
|
13
|
+
* - **숨길 때도**(visibilitychange → hidden) 아직 안 보냈으면 그때까지 모은 시간을 보낸다.
|
|
14
|
+
* 모바일에서 팝업을 연 채 앱을 스와이프로 닫으면 pagehide 가 안 오는 기기가 있어
|
|
15
|
+
* (visibilitychange 는 온다) 그 판의 시간이 통째로 사라졌다.
|
|
16
|
+
* - 보낸 뒤 돌아와 시간이 더 쌓이면 떠날 때 **더 쌓인 만큼만** 한 줄 더 보낸다(0 이면 안 보냄).
|
|
17
|
+
* 두 줄은 시간이 겹치지 않아 서버가 합산하면 총합이 맞는다.
|
|
18
|
+
*
|
|
19
|
+
* 그래서 **숨기지 않고 그냥 닫는 평범한 흐름은 여전히 한 줄** 이다 — 보이는 구간마다 따로
|
|
20
|
+
* 보내면 서버가 줄 수를 세션 수로 세어(v_user_training_time_stats) 탭을 오갈 때마다 훈련
|
|
21
|
+
* 횟수가 늘었다(0.147 에서 고친 것). 줄이 둘 이상 나오는 건 실제로 앱이 내려갈 뻔한 판뿐이다.
|
|
22
|
+
*
|
|
23
|
+
* 말귀(소비자) 할 일: 서버가 같은 판의 여러 줄을 **합산** 하는지 확인해야 한다.
|
|
10
24
|
*
|
|
11
25
|
* @public
|
|
12
26
|
*/
|
|
@@ -14,13 +28,11 @@ export default function useTrainingSessionLog(trainingType) {
|
|
|
14
28
|
useEffect(() => {
|
|
15
29
|
if (!trainingType)
|
|
16
30
|
return; // 타입 미상이면 기록하지 않음
|
|
17
|
-
/* **한 팝업 = 한 줄.** 보이는 구간마다 따로 보내면 서버가 줄 수를 세션 수로 세어(v_user_training_time_stats) 탭을 오갈 때마다
|
|
18
|
-
문장 훈련 횟수가 늘었다. 보이던 시간만 모아 두었다가 떠날 때(또는 페이지가 내려갈 때) 한 번 보낸다 — 끝 시각은 처음 보인 때 + 보인 시간. */
|
|
19
31
|
const 보임 = () => typeof document === 'undefined' || document.visibilityState !== 'hidden';
|
|
20
32
|
let 처음보임 = null;
|
|
21
33
|
let 구간시작 = null;
|
|
22
34
|
let 모은ms = 0;
|
|
23
|
-
let
|
|
35
|
+
let 보낸ms = 0; // 지금까지 줄로 내보낸 누계 — 다음 줄은 여기서부터 이어 붙인다
|
|
24
36
|
const 구간열기 = () => { const t = Date.now(); if (처음보임 == null)
|
|
25
37
|
처음보임 = t; if (구간시작 == null)
|
|
26
38
|
구간시작 = t; };
|
|
@@ -30,23 +42,34 @@ export default function useTrainingSessionLog(trainingType) {
|
|
|
30
42
|
} };
|
|
31
43
|
if (보임())
|
|
32
44
|
구간열기();
|
|
45
|
+
/* 아직 안 보낸 만큼을 한 줄로. 끝 시각은 처음 보인 때 + 모은 시간, 시작 시각은 앞 줄이
|
|
46
|
+
끝난 자리 — 줄끼리 겹치지 않으니 합산해도 이중으로 세지 않는다.
|
|
47
|
+
전달은 등록된 로거(logTrainingTime)로 간다. 코어는 보낼 주소를 모르므로
|
|
48
|
+
navigator.sendBeacon 을 여기서 직접 쓸 수 없다 — 앱이 등록하는 로거의 몫이다. */
|
|
33
49
|
const 보내기 = () => {
|
|
34
|
-
if (보냄)
|
|
35
|
-
return;
|
|
36
50
|
구간닫기();
|
|
37
|
-
if (처음보임 == null
|
|
51
|
+
if (처음보임 == null)
|
|
52
|
+
return;
|
|
53
|
+
const 남은ms = 모은ms - 보낸ms;
|
|
54
|
+
if (남은ms <= 0)
|
|
55
|
+
return;
|
|
56
|
+
// 첫 줄에만 5초 문턱을 건다(잘못 열었다 닫은 판). 한 번 보낸 판은 이미 실재하는
|
|
57
|
+
// 훈련이라, 돌아와 더 한 시간은 짧아도 버리지 않는다.
|
|
58
|
+
if (보낸ms === 0 && 모은ms < 5000)
|
|
38
59
|
return;
|
|
39
|
-
|
|
60
|
+
const 시작ms = 처음보임 + 보낸ms;
|
|
61
|
+
보낸ms = 모은ms;
|
|
40
62
|
logTrainingTime({
|
|
41
63
|
trainingType,
|
|
42
|
-
startedAt: new Date(
|
|
64
|
+
startedAt: new Date(시작ms).toISOString(),
|
|
43
65
|
endedAt: new Date(처음보임 + 모은ms).toISOString(),
|
|
44
66
|
});
|
|
45
67
|
};
|
|
68
|
+
// 숨으면 보낸다(앱이 그대로 죽을 수 있다). 다시 보이면 이어서 모은다.
|
|
46
69
|
const 보임바뀜 = () => { if (보임())
|
|
47
70
|
구간열기();
|
|
48
71
|
else
|
|
49
|
-
|
|
72
|
+
보내기(); };
|
|
50
73
|
if (typeof document !== 'undefined')
|
|
51
74
|
document.addEventListener('visibilitychange', 보임바뀜);
|
|
52
75
|
// 페이지가 내려가면(탭·앱 닫기) React 정리가 안 돈다 — 그때 보낸다
|
|
@@ -838,6 +838,11 @@
|
|
|
838
838
|
"pronoun": "Pronoun",
|
|
839
839
|
"auxVerb": "Auxiliary verb",
|
|
840
840
|
"auxAdjective": "Auxiliary adjective"
|
|
841
|
+
},
|
|
842
|
+
"reorder": {
|
|
843
|
+
"moved": "Moved to position {{n}} of {{total}}",
|
|
844
|
+
"handle": "Reorder {{word}} (Alt + arrow keys)",
|
|
845
|
+
"hint": "Alt + ← → to reorder"
|
|
841
846
|
}
|
|
842
847
|
},
|
|
843
848
|
"wordSearch": {
|
|
@@ -836,6 +836,11 @@
|
|
|
836
836
|
"pronoun": "대명사",
|
|
837
837
|
"auxVerb": "보조동사",
|
|
838
838
|
"auxAdjective": "보조형용사"
|
|
839
|
+
},
|
|
840
|
+
"reorder": {
|
|
841
|
+
"moved": "{{total}}칸 가운데 {{n}}번째로 옮김",
|
|
842
|
+
"handle": "{{word}} 순서 바꾸기 (Alt + 화살표)",
|
|
843
|
+
"hint": "Alt + ← → 로 순서 바꾸기"
|
|
839
844
|
}
|
|
840
845
|
},
|
|
841
846
|
"wordSearch": {
|
|
@@ -72,6 +72,7 @@ import GamepadIcon from 'lucide-react/dist/esm/icons/gamepad.mjs';
|
|
|
72
72
|
import GavelIcon from 'lucide-react/dist/esm/icons/gavel.mjs';
|
|
73
73
|
import GitMergeIcon from 'lucide-react/dist/esm/icons/git-merge.mjs';
|
|
74
74
|
import GlobeIcon from 'lucide-react/dist/esm/icons/globe.mjs';
|
|
75
|
+
import GripVerticalIcon from 'lucide-react/dist/esm/icons/grip-vertical.mjs';
|
|
75
76
|
import HeadphonesIcon from 'lucide-react/dist/esm/icons/headphones.mjs';
|
|
76
77
|
import HeartIcon from 'lucide-react/dist/esm/icons/heart.mjs';
|
|
77
78
|
import HomeIcon from 'lucide-react/dist/esm/icons/home.mjs';
|
|
@@ -256,6 +257,7 @@ export const STATIC_LUCIDE_ICONS = {
|
|
|
256
257
|
'gavel': GavelIcon,
|
|
257
258
|
'git-merge': GitMergeIcon,
|
|
258
259
|
'globe': GlobeIcon,
|
|
260
|
+
'grip-vertical': GripVerticalIcon,
|
|
259
261
|
'headphones': HeadphonesIcon,
|
|
260
262
|
'heart': HeartIcon,
|
|
261
263
|
'home': HomeIcon,
|
|
@@ -5,6 +5,15 @@ export interface PlanFeatures {
|
|
|
5
5
|
maxCustomers: number;
|
|
6
6
|
visitWord: boolean;
|
|
7
7
|
visitSentence: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* 숙제내주기(쿠폰) — **노출 여부만** 말한다.
|
|
10
|
+
*
|
|
11
|
+
* 하루 몇 번 보낼 수 있는지는 `PLAN_LIMITS[tier].homeworkSendDaily` 가 정본이고,
|
|
12
|
+
* 어드민 요금제 비교표의 '숙제 보내기' 칸도 그 숫자로 그린다. 이 플래그는 그 숫자가
|
|
13
|
+
* 있는 티어에서 켜져 있어야 한다 — 전에는 mgr_free·lite·standard 가 하루 1·10·30회를
|
|
14
|
+
* 받으면서도 false 라, 같은 화면이 한 칸에서는 횟수를 말하고 옆 칸에서는 ✗ 를 말했다
|
|
15
|
+
* (사용자 결정 2026-09-16). 숫자를 고칠 때는 이 플래그도 같이 본다.
|
|
16
|
+
*/
|
|
8
17
|
homework: boolean;
|
|
9
18
|
customerStats: boolean;
|
|
10
19
|
managerCustomerSplit: boolean;
|
|
@@ -32,8 +41,26 @@ export interface PlanFeatures {
|
|
|
32
41
|
sentenceTrainingView: boolean;
|
|
33
42
|
}
|
|
34
43
|
export declare const PLAN_FEATURES: Record<PlanTier, PlanFeatures>;
|
|
35
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* 요금제 티어 순위 — **같은 줄 안에서 견주는 값**이다(클수록 상위 요금제).
|
|
46
|
+
*
|
|
47
|
+
* 줄마다 자리를 갈라 둔다: 개인 줄 0~9, 매니저 줄 10~19. 전에는 한 자리에 섞여 있어
|
|
48
|
+
* (personal_standard 3 < mgr_free 4) 줄이 다른 두 티어의 순위 차가 무슨 뜻인지 읽을 수
|
|
49
|
+
* 없었다(사용자 결정 2026-09-16). 줄이 같은지는 `isManagerTier` 로 본다.
|
|
50
|
+
*
|
|
51
|
+
* 줄 사이의 크기 비교(매니저 줄이 개인 줄보다 큼)는 전과 같은 방향이라, 활성 구독 중
|
|
52
|
+
* 가장 높은 티어를 고르는 코드는 그대로 동작한다 — 다만 그런 비교는 "매니저 줄이
|
|
53
|
+
* 개인 줄보다 상위"라는 뜻이지 기능 수의 많고 적음이 아니다.
|
|
54
|
+
* 레거시 라이트(낱말·문장)는 서로 대등해 같은 자리를 쓴다.
|
|
55
|
+
*/
|
|
36
56
|
export declare const TIER_RANK: Record<PlanTier, number>;
|
|
57
|
+
/**
|
|
58
|
+
* @public 티어가 매니저 줄(말귀매니저)인지. `none` 과 개인 줄(free·personal_standard)은 false.
|
|
59
|
+
*
|
|
60
|
+
* 요금제 비교표처럼 "이 칸은 매니저 플랜에만 있다" 를 그리는 곳이 티어 목록을 손으로
|
|
61
|
+
* 들고 있지 않도록 여기서 내준다 — 티어가 늘면 그 목록만 뒤처진다.
|
|
62
|
+
*/
|
|
63
|
+
export declare function isManagerTier(tier: PlanTier): boolean;
|
|
37
64
|
/**
|
|
38
65
|
* 요금제별 수량/횟수 제한.
|
|
39
66
|
*
|
|
@@ -27,7 +27,7 @@ export const PLAN_FEATURES = {
|
|
|
27
27
|
},
|
|
28
28
|
// ── 매니저 플랜 ─────────────────────────────────────────────────
|
|
29
29
|
mgr_free: {
|
|
30
|
-
maxCustomers: 5, visitWord: true, visitSentence: true, homework:
|
|
30
|
+
maxCustomers: 5, visitWord: true, visitSentence: true, homework: true,
|
|
31
31
|
customerStats: false, managerCustomerSplit: false, managerManagement: false,
|
|
32
32
|
sentenceTrainingSetting: false, wordTrainingSetting: false, myWordList: false,
|
|
33
33
|
wordListShare: false, groupTrainingSetting: false, minimalPairSearch: true,
|
|
@@ -75,7 +75,7 @@ export const PLAN_FEATURES = {
|
|
|
75
75
|
sentenceTrainingView: true,
|
|
76
76
|
},
|
|
77
77
|
lite: {
|
|
78
|
-
maxCustomers: 10, visitWord: true, visitSentence: true, homework:
|
|
78
|
+
maxCustomers: 10, visitWord: true, visitSentence: true, homework: true,
|
|
79
79
|
customerStats: false, managerCustomerSplit: false, managerManagement: false,
|
|
80
80
|
sentenceTrainingSetting: false, wordTrainingSetting: false, myWordList: false,
|
|
81
81
|
wordListShare: false, groupTrainingSetting: false, minimalPairSearch: true,
|
|
@@ -87,7 +87,7 @@ export const PLAN_FEATURES = {
|
|
|
87
87
|
sentenceTrainingView: true,
|
|
88
88
|
},
|
|
89
89
|
standard: {
|
|
90
|
-
maxCustomers: 30, visitWord: true, visitSentence: true, homework:
|
|
90
|
+
maxCustomers: 30, visitWord: true, visitSentence: true, homework: true,
|
|
91
91
|
customerStats: false, managerCustomerSplit: false, managerManagement: false,
|
|
92
92
|
sentenceTrainingSetting: true, wordTrainingSetting: true, myWordList: true,
|
|
93
93
|
wordListShare: true, groupTrainingSetting: false, minimalPairSearch: true,
|
|
@@ -123,14 +123,44 @@ export const PLAN_FEATURES = {
|
|
|
123
123
|
sentenceTrainingView: true,
|
|
124
124
|
},
|
|
125
125
|
};
|
|
126
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* 요금제 티어 순위 — **같은 줄 안에서 견주는 값**이다(클수록 상위 요금제).
|
|
128
|
+
*
|
|
129
|
+
* 줄마다 자리를 갈라 둔다: 개인 줄 0~9, 매니저 줄 10~19. 전에는 한 자리에 섞여 있어
|
|
130
|
+
* (personal_standard 3 < mgr_free 4) 줄이 다른 두 티어의 순위 차가 무슨 뜻인지 읽을 수
|
|
131
|
+
* 없었다(사용자 결정 2026-09-16). 줄이 같은지는 `isManagerTier` 로 본다.
|
|
132
|
+
*
|
|
133
|
+
* 줄 사이의 크기 비교(매니저 줄이 개인 줄보다 큼)는 전과 같은 방향이라, 활성 구독 중
|
|
134
|
+
* 가장 높은 티어를 고르는 코드는 그대로 동작한다 — 다만 그런 비교는 "매니저 줄이
|
|
135
|
+
* 개인 줄보다 상위"라는 뜻이지 기능 수의 많고 적음이 아니다.
|
|
136
|
+
* 레거시 라이트(낱말·문장)는 서로 대등해 같은 자리를 쓴다.
|
|
137
|
+
*/
|
|
127
138
|
export const TIER_RANK = {
|
|
139
|
+
// ── 개인 줄 ──
|
|
128
140
|
none: 0,
|
|
129
|
-
free: 1,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
free: 1,
|
|
142
|
+
personal_standard: 2,
|
|
143
|
+
// ── 매니저 줄 ──
|
|
144
|
+
mgr_free: 10,
|
|
145
|
+
lite_word: 11, lite_sentence: 11,
|
|
146
|
+
lite: 12,
|
|
147
|
+
standard: 13,
|
|
148
|
+
pro: 14,
|
|
149
|
+
enterprise: 15,
|
|
133
150
|
};
|
|
151
|
+
/** 매니저 줄(말귀매니저) 티어들 — TIER_RANK 의 10번대와 같은 집합이다. */
|
|
152
|
+
const MANAGER_TIERS = new Set([
|
|
153
|
+
'mgr_free', 'lite_word', 'lite_sentence', 'lite', 'standard', 'pro', 'enterprise',
|
|
154
|
+
]);
|
|
155
|
+
/**
|
|
156
|
+
* @public 티어가 매니저 줄(말귀매니저)인지. `none` 과 개인 줄(free·personal_standard)은 false.
|
|
157
|
+
*
|
|
158
|
+
* 요금제 비교표처럼 "이 칸은 매니저 플랜에만 있다" 를 그리는 곳이 티어 목록을 손으로
|
|
159
|
+
* 들고 있지 않도록 여기서 내준다 — 티어가 늘면 그 목록만 뒤처진다.
|
|
160
|
+
*/
|
|
161
|
+
export function isManagerTier(tier) {
|
|
162
|
+
return MANAGER_TIERS.has(tier);
|
|
163
|
+
}
|
|
134
164
|
/** @public 요금제 티어별 제한 (표시되지 않는 레거시 티어는 생략) */
|
|
135
165
|
export const PLAN_LIMITS = {
|
|
136
166
|
// ── 개인 ──
|
|
@@ -173,6 +173,25 @@ export function _poolCacheKey(opts) {
|
|
|
173
173
|
// 요청한 보기 수를 무시한다(공개 API 라 앱 밖 호출자가 무엇을 넘길지 알 수 없다).
|
|
174
174
|
return `${opts.difficulty ?? ''}|${chStr}|${compStr}|${opts.excludeNoImage ? '1' : '0'}|${opts.count ?? ''}|x${opts.contrastCount ?? 1}|${opts.fullCount ? 'F' : ''}|s${opts.sameStructureOnly === false ? '0' : '1'}|v${opts.phonemeView === 'pron' ? 'p' : 'c'}|g${gradeStr}|t${opts.targetSyllable ?? ''}|c${opts.choicesPerItem ?? ''}`;
|
|
175
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* 위치 대립 맵 캐시 — 칩 한 번에 **셈(fullCount)과 생성이 같은 맵을 따로** 만들었다.
|
|
178
|
+
*
|
|
179
|
+
* 맵은 재료(이미지 필터를 지난 낱말 전체)와 고른 음소·구조 조건만으로 정해지는 결정적인
|
|
180
|
+
* 값이고, 셈과 생성은 그 둘이 똑같다(fullCount 는 후보 샘플링 캡에만 관여한다). 그래서 둘이
|
|
181
|
+
* 나눠 쓴다 — 23,000 낱말에서 칩 한 번이 256ms → 93ms(사용자 결정 2026-09-16).
|
|
182
|
+
*
|
|
183
|
+
* 열쇠는 풀 캐시 열쇠에서 **맵과 무관한 것**(문제 수·보기 수·fullCount)만 뺀 것이다. 재료를
|
|
184
|
+
* 바꾸는 것(난이도·초성·구성·등급·기준 글자·이미지 제외)은 모두 열쇠에 남아 있어야 한다 —
|
|
185
|
+
* 하나라도 빠지면 다른 설정의 답을 그대로 돌려준다.
|
|
186
|
+
*
|
|
187
|
+
* 이미지 제외를 켠 경우엔 열쇠만으로 모자란다 — '이미지 있음' 캐시는 미리 데우는 동안 풀
|
|
188
|
+
* 참조가 그대로인 채로 자란다(셈과 생성 사이에도 자랄 수 있다). 그래서 맵을 만들 때 쓴
|
|
189
|
+
* 낱말 집합을 함께 들고 있다가, 그 집합이 갈리면 다시 만든다.
|
|
190
|
+
*/
|
|
191
|
+
const _posContrastCache = new Map();
|
|
192
|
+
function _posContrastCacheKey(opts) {
|
|
193
|
+
return _poolCacheKey({ ...opts, count: undefined, choicesPerItem: undefined, fullCount: false });
|
|
194
|
+
}
|
|
176
195
|
/**
|
|
177
196
|
* 기준 글자/난이도/이미지 조건을 모두 통과한 (본 단어 + 유효 distractor) 풀을 만든다.
|
|
178
197
|
* @returns [{ word: 본단어, usable: 이미지 OK + 난이도 매칭 distractor 배열 }]
|
|
@@ -183,6 +202,7 @@ export async function buildUsablePool(opts) {
|
|
|
183
202
|
const idx = getPairIndex();
|
|
184
203
|
if (pool !== _cachePoolRef || idx !== _cacheIdxRef) {
|
|
185
204
|
_poolCache.clear();
|
|
205
|
+
_posContrastCache.clear();
|
|
186
206
|
_cachePoolRef = pool;
|
|
187
207
|
_cacheIdxRef = idx;
|
|
188
208
|
}
|
|
@@ -392,9 +412,17 @@ async function _buildUsablePool(opts) {
|
|
|
392
412
|
const decompOf = createDecompCache(); // 호출당 새 캐시(이 생성 함수 스코프에 한정)
|
|
393
413
|
// 위치 대립: 전체 풀에서 완전 사전계산(마스킹 템플릿 인덱스). 후보당 O(1) 조회.
|
|
394
414
|
// 단일/다중 파트 모두 이 경로로 처리 — pairIndex 는 겹받침 단어(예: 값)를 누락하므로 의존하지 않는다.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
415
|
+
// 셈(fullCount)과 생성이 같은 맵을 쓴다(_posContrastCache) — 읽기만 하므로 공유해도 안전하다.
|
|
416
|
+
let posContrastMap = null;
|
|
417
|
+
if (posContrast) {
|
|
418
|
+
const mapKey = _posContrastCacheKey(opts);
|
|
419
|
+
const 이미지집합 = excludeNoImage ? getImageOkWordSet() : null;
|
|
420
|
+
const 전 = _posContrastCache.get(mapKey);
|
|
421
|
+
posContrastMap = 전 && 전.이미지집합 === 이미지집합
|
|
422
|
+
? 전.map
|
|
423
|
+
: buildMultiPartPosContrast(composition, allOkArr, decompOf, sameStructureOnly, phonemeView, pronOfWord);
|
|
424
|
+
_posContrastCache.set(mapKey, { 이미지집합, map: posContrastMap });
|
|
425
|
+
}
|
|
398
426
|
// candidates 크기 제한 — 이미지 필터 이후이므로 okCandidates 기반
|
|
399
427
|
const RANDOM_CAND_CAP = 500; // random: classifyPairDifficulty 없으나 루프 자체 제한
|
|
400
428
|
const OTHER_CAND_CAP = 1500; // cho/jung/jong: classifyPairDifficulty 호출이 있으므로 더 엄격히
|
|
@@ -53,6 +53,6 @@ export type { WordEntry } from './utils/phonemePairSearch';
|
|
|
53
53
|
export { CAPABILITY, isValidQuestionWord, hasQuestionWordConstraint, isManualOnlyType } from './utils/wordTrainingRuntime';
|
|
54
54
|
export { wordContainsChoseong, wordContainsJungseong, wordContainsJongseong, wordHasNoCoda, wordHasSyllableMatching, syllableLength } from './utils/koreanSyllable';
|
|
55
55
|
export { isSyllablePattern, matchesSyllablePattern, validateSyllableSearchInput, patternToComposition, matchesWordQuery, searchAndRankWords } from './utils/koreanSyllable';
|
|
56
|
-
export { PLAN_FEATURES, PLAN_LIMITS, TIER_RANK, getPlanTier, type PlanTier, type DataLevel, type PlanFeatures, type PlanLimits, } from './utils/planFeatures';
|
|
56
|
+
export { PLAN_FEATURES, PLAN_LIMITS, TIER_RANK, getPlanTier, isManagerTier, type PlanTier, type DataLevel, type PlanFeatures, type PlanLimits, } from './utils/planFeatures';
|
|
57
57
|
export { WORD_SUGGESTION_WEEKLY_QUOTA, WORD_SUGGESTION_ACCOUNT_LIMIT, WORD_SUGGESTION_EXISTING_ERROR, isThisWeekPick, } from './utils/wordSuggestionPolicy';
|
|
58
58
|
export { CORE_VERSION } from './version';
|
|
@@ -39,7 +39,7 @@ export { isSyllablePattern, matchesSyllablePattern, validateSyllableSearchInput,
|
|
|
39
39
|
/* 요금제 정의 — 회원앱과 말귀어드민이 둘 다 본다. 예전에는 회원앱(src/libs) 안에 있었고
|
|
40
40
|
어드민이 '@app/libs/planFeatures' 로 끌어다 썼는데, 그 한 줄 때문에 어드민이 회원앱
|
|
41
41
|
폴더 없이는 빌드되지 않았다. 값과 타입뿐이라 코어에 두는 게 맞다. */
|
|
42
|
-
export { PLAN_FEATURES, PLAN_LIMITS, TIER_RANK, getPlanTier, } from './utils/planFeatures';
|
|
42
|
+
export { PLAN_FEATURES, PLAN_LIMITS, TIER_RANK, getPlanTier, isManagerTier, } from './utils/planFeatures';
|
|
43
43
|
/* 단어 제안 정책 — 요금제와 똑같은 까닭으로 여기 있다. 회원앱(단어 제안)과
|
|
44
44
|
말귀어드민(단어 제안 관리)이 같은 숫자를 봐야 하는데, 한쪽 화면 폴더에 두면
|
|
45
45
|
다른 쪽이 그 폴더 없이는 빌드되지 않는다. 값과 순수 함수뿐이다. */
|