@readerseye2/cr_type 1.0.128 → 1.0.132
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/book/book-api.type.d.ts +15 -15
- package/dist/book/book-api.type.js +2 -2
- package/dist/book/book-log.type.d.ts +14 -14
- package/dist/book/book-log.type.js +2 -2
- package/dist/book/book-sections.type.d.ts +2 -0
- package/dist/book/book.const.d.ts +274 -274
- package/dist/book/book.const.js +119 -119
- package/dist/book/book.type.d.ts +85 -0
- package/dist/book/book.type.js +15 -1
- package/dist/book/legacy.book.type.d.ts +164 -164
- package/dist/book/legacy.book.type.js +41 -41
- package/package.json +27 -27
package/dist/book/book.const.js
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// ========== 리터럴 유니온 타입 ==========
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getAgeOptions = exports.getAgeRatingOptions = exports.getEnLevelOptions = exports.getGenreOptions = exports.getLengthOptions = exports.getLanguageOptions = exports.calcSoundMinutes = exports.getLexileDescription = exports.getARDescription = exports.LEXILE_INDEX_RANGES = exports.AR_INDEX_RANGES = exports.DEFAULT_BOOK_META = exports.BOOK_AGE_MAX = exports.BOOK_AGE_MIN = exports.PublishAgeRatingLabel = exports.BookEnLevelLabel = exports.BookGenreLabel = exports.BookLengthLabel = exports.BookLanguageLabel = void 0;
|
|
5
|
-
// ========== 라벨 (UI 표시용) ==========
|
|
6
|
-
exports.BookLanguageLabel = {
|
|
7
|
-
ko: '한국어',
|
|
8
|
-
en: 'English',
|
|
9
|
-
};
|
|
10
|
-
exports.BookLengthLabel = {
|
|
11
|
-
short: '단편',
|
|
12
|
-
medium: '중편',
|
|
13
|
-
long: '장편',
|
|
14
|
-
};
|
|
15
|
-
exports.BookGenreLabel = {
|
|
16
|
-
fiction: '문학',
|
|
17
|
-
'non-fiction': '비문학',
|
|
18
|
-
other: '기타',
|
|
19
|
-
};
|
|
20
|
-
exports.BookEnLevelLabel = {
|
|
21
|
-
story: '스토리',
|
|
22
|
-
readers: '리더스',
|
|
23
|
-
'early-chapter': '얼리챕터',
|
|
24
|
-
'middle-chapter': '미들챕터',
|
|
25
|
-
chapter: '챕터',
|
|
26
|
-
novel: '노블',
|
|
27
|
-
};
|
|
28
|
-
exports.PublishAgeRatingLabel = {
|
|
29
|
-
all: '전체이용가',
|
|
30
|
-
'12': '12세 이용가',
|
|
31
|
-
'15': '15세 이용가',
|
|
32
|
-
'19': '19세 이용가',
|
|
33
|
-
};
|
|
34
|
-
// ========== 상수 ==========
|
|
35
|
-
/** 권장 연령 범위 (5~19세) */
|
|
36
|
-
exports.BOOK_AGE_MIN = 5;
|
|
37
|
-
exports.BOOK_AGE_MAX = 19;
|
|
38
|
-
/** 새 책 생성 시 기본값 */
|
|
39
|
-
exports.DEFAULT_BOOK_META = {
|
|
40
|
-
title: '나의 책',
|
|
41
|
-
language: 'en',
|
|
42
|
-
age: 5,
|
|
43
|
-
length: 'short',
|
|
44
|
-
genre: 'fiction',
|
|
45
|
-
quiz_retry_allowed: true,
|
|
46
|
-
ar_index: 3.0,
|
|
47
|
-
lexile_index: 600,
|
|
48
|
-
};
|
|
49
|
-
// ========== AR / Lexile 지수 ==========
|
|
50
|
-
/** AR 지수 범위별 설명 (소수점 1자리 기준) */
|
|
51
|
-
exports.AR_INDEX_RANGES = [
|
|
52
|
-
{ min: 0.0, max: 1.9, level: '유아 ~ 초1', description: '그림책, 아주 짧은 문장' },
|
|
53
|
-
{ min: 2.0, max: 2.9, level: '초2', description: '기초 리더북' },
|
|
54
|
-
{ min: 3.0, max: 3.9, level: '초3', description: '챕터북 시작' },
|
|
55
|
-
{ min: 4.0, max: 4.9, level: '초4', description: '본격적인 이야기 구조' },
|
|
56
|
-
{ min: 5.0, max: 5.9, level: '초5', description: '어휘·문장 길이 증가' },
|
|
57
|
-
{ min: 6.0, max: 6.9, level: '초6', description: '논픽션 비중 증가' },
|
|
58
|
-
{ min: 7.0, max: 8.9, level: '중학생', description: '복합 문장, 추론 필요' },
|
|
59
|
-
{ min: 9.0, max: 10.9, level: '고등학생', description: '문학 작품, 추상 개념' },
|
|
60
|
-
{ min: 11.0, max: 12.0, level: '고급', description: '성인 소설·고전' },
|
|
61
|
-
];
|
|
62
|
-
/** Lexile 지수 범위별 설명 */
|
|
63
|
-
exports.LEXILE_INDEX_RANGES = [
|
|
64
|
-
{ min: 0, max: 200, level: '유아', description: '알파벳·기초 단어' },
|
|
65
|
-
{ min: 200, max: 400, level: '초1', description: '아주 쉬운 문장' },
|
|
66
|
-
{ min: 400, max: 600, level: '초2', description: '간단한 스토리' },
|
|
67
|
-
{ min: 600, max: 800, level: '초3', description: '챕터북' },
|
|
68
|
-
{ min: 800, max: 1000, level: '초4', description: '정보량 증가' },
|
|
69
|
-
{ min: 1000, max: 1200, level: '초5~6', description: '교과서 수준' },
|
|
70
|
-
{ min: 1200, max: 1400, level: '중학생', description: '추론·비판적 읽기' },
|
|
71
|
-
{ min: 1400, max: 1600, level: '고등학생', description: '문학·비문학 혼합' },
|
|
72
|
-
{ min: 1600, max: 2000, level: '성인', description: '학술·고전 문학' },
|
|
73
|
-
];
|
|
74
|
-
/** AR 지수로 해당 범위 설명 조회 */
|
|
75
|
-
const getARDescription = (ar) => exports.AR_INDEX_RANGES.find(r => ar >= r.min && ar <= r.max);
|
|
76
|
-
exports.getARDescription = getARDescription;
|
|
77
|
-
/** Lexile 지수로 해당 범위 설명 조회 */
|
|
78
|
-
const getLexileDescription = (lexile) => exports.LEXILE_INDEX_RANGES.find(r => lexile >= r.min && lexile <= r.max);
|
|
79
|
-
exports.getLexileDescription = getLexileDescription;
|
|
80
|
-
// ========== 헬퍼 함수 ==========
|
|
81
|
-
/** 어절 수 → 재생 분수 계산 (200 WPM 기준) */
|
|
82
|
-
const calcSoundMinutes = (wordCount) => Math.ceil(wordCount / 200);
|
|
83
|
-
exports.calcSoundMinutes = calcSoundMinutes;
|
|
84
|
-
/** 언어 옵션 (UI Select용) */
|
|
85
|
-
const getLanguageOptions = () => Object.entries(exports.BookLanguageLabel).map(([value, label]) => ({
|
|
86
|
-
value: value,
|
|
87
|
-
label,
|
|
88
|
-
}));
|
|
89
|
-
exports.getLanguageOptions = getLanguageOptions;
|
|
90
|
-
/** 길이 옵션 (UI Select용) */
|
|
91
|
-
const getLengthOptions = () => Object.entries(exports.BookLengthLabel).map(([value, label]) => ({
|
|
92
|
-
value: value,
|
|
93
|
-
label,
|
|
94
|
-
}));
|
|
95
|
-
exports.getLengthOptions = getLengthOptions;
|
|
96
|
-
/** 장르 옵션 (UI Select용) */
|
|
97
|
-
const getGenreOptions = () => Object.entries(exports.BookGenreLabel).map(([value, label]) => ({
|
|
98
|
-
value: value,
|
|
99
|
-
label,
|
|
100
|
-
}));
|
|
101
|
-
exports.getGenreOptions = getGenreOptions;
|
|
102
|
-
/** 영어레벨 옵션 (UI Select용) */
|
|
103
|
-
const getEnLevelOptions = () => Object.entries(exports.BookEnLevelLabel).map(([value, label]) => ({
|
|
104
|
-
value: value,
|
|
105
|
-
label,
|
|
106
|
-
}));
|
|
107
|
-
exports.getEnLevelOptions = getEnLevelOptions;
|
|
108
|
-
/** 출판 연령등급 옵션 (UI Select용) */
|
|
109
|
-
const getAgeRatingOptions = () => Object.entries(exports.PublishAgeRatingLabel).map(([value, label]) => ({
|
|
110
|
-
value: value,
|
|
111
|
-
label,
|
|
112
|
-
}));
|
|
113
|
-
exports.getAgeRatingOptions = getAgeRatingOptions;
|
|
114
|
-
/** 권장 연령 옵션 (5~19세) */
|
|
115
|
-
const getAgeOptions = () => Array.from({ length: exports.BOOK_AGE_MAX - exports.BOOK_AGE_MIN + 1 }, (_, i) => ({
|
|
116
|
-
value: exports.BOOK_AGE_MIN + i,
|
|
117
|
-
label: `만 ${exports.BOOK_AGE_MIN + i}세`,
|
|
118
|
-
}));
|
|
119
|
-
exports.getAgeOptions = getAgeOptions;
|
|
1
|
+
"use strict";
|
|
2
|
+
// ========== 리터럴 유니온 타입 ==========
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getAgeOptions = exports.getAgeRatingOptions = exports.getEnLevelOptions = exports.getGenreOptions = exports.getLengthOptions = exports.getLanguageOptions = exports.calcSoundMinutes = exports.getLexileDescription = exports.getARDescription = exports.LEXILE_INDEX_RANGES = exports.AR_INDEX_RANGES = exports.DEFAULT_BOOK_META = exports.BOOK_AGE_MAX = exports.BOOK_AGE_MIN = exports.PublishAgeRatingLabel = exports.BookEnLevelLabel = exports.BookGenreLabel = exports.BookLengthLabel = exports.BookLanguageLabel = void 0;
|
|
5
|
+
// ========== 라벨 (UI 표시용) ==========
|
|
6
|
+
exports.BookLanguageLabel = {
|
|
7
|
+
ko: '한국어',
|
|
8
|
+
en: 'English',
|
|
9
|
+
};
|
|
10
|
+
exports.BookLengthLabel = {
|
|
11
|
+
short: '단편',
|
|
12
|
+
medium: '중편',
|
|
13
|
+
long: '장편',
|
|
14
|
+
};
|
|
15
|
+
exports.BookGenreLabel = {
|
|
16
|
+
fiction: '문학',
|
|
17
|
+
'non-fiction': '비문학',
|
|
18
|
+
other: '기타',
|
|
19
|
+
};
|
|
20
|
+
exports.BookEnLevelLabel = {
|
|
21
|
+
story: '스토리',
|
|
22
|
+
readers: '리더스',
|
|
23
|
+
'early-chapter': '얼리챕터',
|
|
24
|
+
'middle-chapter': '미들챕터',
|
|
25
|
+
chapter: '챕터',
|
|
26
|
+
novel: '노블',
|
|
27
|
+
};
|
|
28
|
+
exports.PublishAgeRatingLabel = {
|
|
29
|
+
all: '전체이용가',
|
|
30
|
+
'12': '12세 이용가',
|
|
31
|
+
'15': '15세 이용가',
|
|
32
|
+
'19': '19세 이용가',
|
|
33
|
+
};
|
|
34
|
+
// ========== 상수 ==========
|
|
35
|
+
/** 권장 연령 범위 (5~19세) */
|
|
36
|
+
exports.BOOK_AGE_MIN = 5;
|
|
37
|
+
exports.BOOK_AGE_MAX = 19;
|
|
38
|
+
/** 새 책 생성 시 기본값 */
|
|
39
|
+
exports.DEFAULT_BOOK_META = {
|
|
40
|
+
title: '나의 책',
|
|
41
|
+
language: 'en',
|
|
42
|
+
age: 5,
|
|
43
|
+
length: 'short',
|
|
44
|
+
genre: 'fiction',
|
|
45
|
+
quiz_retry_allowed: true,
|
|
46
|
+
ar_index: 3.0,
|
|
47
|
+
lexile_index: 600,
|
|
48
|
+
};
|
|
49
|
+
// ========== AR / Lexile 지수 ==========
|
|
50
|
+
/** AR 지수 범위별 설명 (소수점 1자리 기준) */
|
|
51
|
+
exports.AR_INDEX_RANGES = [
|
|
52
|
+
{ min: 0.0, max: 1.9, level: '유아 ~ 초1', description: '그림책, 아주 짧은 문장' },
|
|
53
|
+
{ min: 2.0, max: 2.9, level: '초2', description: '기초 리더북' },
|
|
54
|
+
{ min: 3.0, max: 3.9, level: '초3', description: '챕터북 시작' },
|
|
55
|
+
{ min: 4.0, max: 4.9, level: '초4', description: '본격적인 이야기 구조' },
|
|
56
|
+
{ min: 5.0, max: 5.9, level: '초5', description: '어휘·문장 길이 증가' },
|
|
57
|
+
{ min: 6.0, max: 6.9, level: '초6', description: '논픽션 비중 증가' },
|
|
58
|
+
{ min: 7.0, max: 8.9, level: '중학생', description: '복합 문장, 추론 필요' },
|
|
59
|
+
{ min: 9.0, max: 10.9, level: '고등학생', description: '문학 작품, 추상 개념' },
|
|
60
|
+
{ min: 11.0, max: 12.0, level: '고급', description: '성인 소설·고전' },
|
|
61
|
+
];
|
|
62
|
+
/** Lexile 지수 범위별 설명 */
|
|
63
|
+
exports.LEXILE_INDEX_RANGES = [
|
|
64
|
+
{ min: 0, max: 200, level: '유아', description: '알파벳·기초 단어' },
|
|
65
|
+
{ min: 200, max: 400, level: '초1', description: '아주 쉬운 문장' },
|
|
66
|
+
{ min: 400, max: 600, level: '초2', description: '간단한 스토리' },
|
|
67
|
+
{ min: 600, max: 800, level: '초3', description: '챕터북' },
|
|
68
|
+
{ min: 800, max: 1000, level: '초4', description: '정보량 증가' },
|
|
69
|
+
{ min: 1000, max: 1200, level: '초5~6', description: '교과서 수준' },
|
|
70
|
+
{ min: 1200, max: 1400, level: '중학생', description: '추론·비판적 읽기' },
|
|
71
|
+
{ min: 1400, max: 1600, level: '고등학생', description: '문학·비문학 혼합' },
|
|
72
|
+
{ min: 1600, max: 2000, level: '성인', description: '학술·고전 문학' },
|
|
73
|
+
];
|
|
74
|
+
/** AR 지수로 해당 범위 설명 조회 */
|
|
75
|
+
const getARDescription = (ar) => exports.AR_INDEX_RANGES.find(r => ar >= r.min && ar <= r.max);
|
|
76
|
+
exports.getARDescription = getARDescription;
|
|
77
|
+
/** Lexile 지수로 해당 범위 설명 조회 */
|
|
78
|
+
const getLexileDescription = (lexile) => exports.LEXILE_INDEX_RANGES.find(r => lexile >= r.min && lexile <= r.max);
|
|
79
|
+
exports.getLexileDescription = getLexileDescription;
|
|
80
|
+
// ========== 헬퍼 함수 ==========
|
|
81
|
+
/** 어절 수 → 재생 분수 계산 (200 WPM 기준) */
|
|
82
|
+
const calcSoundMinutes = (wordCount) => Math.ceil(wordCount / 200);
|
|
83
|
+
exports.calcSoundMinutes = calcSoundMinutes;
|
|
84
|
+
/** 언어 옵션 (UI Select용) */
|
|
85
|
+
const getLanguageOptions = () => Object.entries(exports.BookLanguageLabel).map(([value, label]) => ({
|
|
86
|
+
value: value,
|
|
87
|
+
label,
|
|
88
|
+
}));
|
|
89
|
+
exports.getLanguageOptions = getLanguageOptions;
|
|
90
|
+
/** 길이 옵션 (UI Select용) */
|
|
91
|
+
const getLengthOptions = () => Object.entries(exports.BookLengthLabel).map(([value, label]) => ({
|
|
92
|
+
value: value,
|
|
93
|
+
label,
|
|
94
|
+
}));
|
|
95
|
+
exports.getLengthOptions = getLengthOptions;
|
|
96
|
+
/** 장르 옵션 (UI Select용) */
|
|
97
|
+
const getGenreOptions = () => Object.entries(exports.BookGenreLabel).map(([value, label]) => ({
|
|
98
|
+
value: value,
|
|
99
|
+
label,
|
|
100
|
+
}));
|
|
101
|
+
exports.getGenreOptions = getGenreOptions;
|
|
102
|
+
/** 영어레벨 옵션 (UI Select용) */
|
|
103
|
+
const getEnLevelOptions = () => Object.entries(exports.BookEnLevelLabel).map(([value, label]) => ({
|
|
104
|
+
value: value,
|
|
105
|
+
label,
|
|
106
|
+
}));
|
|
107
|
+
exports.getEnLevelOptions = getEnLevelOptions;
|
|
108
|
+
/** 출판 연령등급 옵션 (UI Select용) */
|
|
109
|
+
const getAgeRatingOptions = () => Object.entries(exports.PublishAgeRatingLabel).map(([value, label]) => ({
|
|
110
|
+
value: value,
|
|
111
|
+
label,
|
|
112
|
+
}));
|
|
113
|
+
exports.getAgeRatingOptions = getAgeRatingOptions;
|
|
114
|
+
/** 권장 연령 옵션 (5~19세) */
|
|
115
|
+
const getAgeOptions = () => Array.from({ length: exports.BOOK_AGE_MAX - exports.BOOK_AGE_MIN + 1 }, (_, i) => ({
|
|
116
|
+
value: exports.BOOK_AGE_MIN + i,
|
|
117
|
+
label: `만 ${exports.BOOK_AGE_MIN + i}세`,
|
|
118
|
+
}));
|
|
119
|
+
exports.getAgeOptions = getAgeOptions;
|
package/dist/book/book.type.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export interface Book {
|
|
|
24
24
|
en_level: BookEnLevel | null;
|
|
25
25
|
ar_index: number | null;
|
|
26
26
|
lexile_index: number | null;
|
|
27
|
+
fk_index: number | null;
|
|
27
28
|
series: string | null;
|
|
28
29
|
original_author: string | null;
|
|
29
30
|
description: string | null;
|
|
@@ -278,6 +279,90 @@ export declare const getLexileDescription: (lexile: number) => {
|
|
|
278
279
|
readonly level: "성인";
|
|
279
280
|
readonly description: "학술·고전 문학";
|
|
280
281
|
} | undefined;
|
|
282
|
+
/** Flesch-Kincaid Grade Level 범위별 설명 (정수 1~17) */
|
|
283
|
+
export declare const FK_INDEX_RANGES: readonly [{
|
|
284
|
+
readonly min: 1;
|
|
285
|
+
readonly max: 2;
|
|
286
|
+
readonly level: "유아 ~ 초1";
|
|
287
|
+
readonly description: "그림책, 기초 문장";
|
|
288
|
+
}, {
|
|
289
|
+
readonly min: 3;
|
|
290
|
+
readonly max: 4;
|
|
291
|
+
readonly level: "초2~3";
|
|
292
|
+
readonly description: "짧은 이야기, 기초 리더";
|
|
293
|
+
}, {
|
|
294
|
+
readonly min: 5;
|
|
295
|
+
readonly max: 6;
|
|
296
|
+
readonly level: "초4~5";
|
|
297
|
+
readonly description: "챕터북, 어휘 확장";
|
|
298
|
+
}, {
|
|
299
|
+
readonly min: 7;
|
|
300
|
+
readonly max: 8;
|
|
301
|
+
readonly level: "초6~중1";
|
|
302
|
+
readonly description: "복합 문장, 논픽션";
|
|
303
|
+
}, {
|
|
304
|
+
readonly min: 9;
|
|
305
|
+
readonly max: 10;
|
|
306
|
+
readonly level: "중2~3";
|
|
307
|
+
readonly description: "추론·비판적 읽기";
|
|
308
|
+
}, {
|
|
309
|
+
readonly min: 11;
|
|
310
|
+
readonly max: 12;
|
|
311
|
+
readonly level: "고등학생";
|
|
312
|
+
readonly description: "문학 작품, 추상 개념";
|
|
313
|
+
}, {
|
|
314
|
+
readonly min: 13;
|
|
315
|
+
readonly max: 14;
|
|
316
|
+
readonly level: "대학 초급";
|
|
317
|
+
readonly description: "학술 텍스트 입문";
|
|
318
|
+
}, {
|
|
319
|
+
readonly min: 15;
|
|
320
|
+
readonly max: 17;
|
|
321
|
+
readonly level: "대학~전문";
|
|
322
|
+
readonly description: "전문 논문, 고급 텍스트";
|
|
323
|
+
}];
|
|
324
|
+
/** FK 지수로 해당 범위 설명 조회 */
|
|
325
|
+
export declare const getFKDescription: (fk: number) => {
|
|
326
|
+
readonly min: 1;
|
|
327
|
+
readonly max: 2;
|
|
328
|
+
readonly level: "유아 ~ 초1";
|
|
329
|
+
readonly description: "그림책, 기초 문장";
|
|
330
|
+
} | {
|
|
331
|
+
readonly min: 3;
|
|
332
|
+
readonly max: 4;
|
|
333
|
+
readonly level: "초2~3";
|
|
334
|
+
readonly description: "짧은 이야기, 기초 리더";
|
|
335
|
+
} | {
|
|
336
|
+
readonly min: 5;
|
|
337
|
+
readonly max: 6;
|
|
338
|
+
readonly level: "초4~5";
|
|
339
|
+
readonly description: "챕터북, 어휘 확장";
|
|
340
|
+
} | {
|
|
341
|
+
readonly min: 7;
|
|
342
|
+
readonly max: 8;
|
|
343
|
+
readonly level: "초6~중1";
|
|
344
|
+
readonly description: "복합 문장, 논픽션";
|
|
345
|
+
} | {
|
|
346
|
+
readonly min: 9;
|
|
347
|
+
readonly max: 10;
|
|
348
|
+
readonly level: "중2~3";
|
|
349
|
+
readonly description: "추론·비판적 읽기";
|
|
350
|
+
} | {
|
|
351
|
+
readonly min: 11;
|
|
352
|
+
readonly max: 12;
|
|
353
|
+
readonly level: "고등학생";
|
|
354
|
+
readonly description: "문학 작품, 추상 개념";
|
|
355
|
+
} | {
|
|
356
|
+
readonly min: 13;
|
|
357
|
+
readonly max: 14;
|
|
358
|
+
readonly level: "대학 초급";
|
|
359
|
+
readonly description: "학술 텍스트 입문";
|
|
360
|
+
} | {
|
|
361
|
+
readonly min: 15;
|
|
362
|
+
readonly max: 17;
|
|
363
|
+
readonly level: "대학~전문";
|
|
364
|
+
readonly description: "전문 논문, 고급 텍스트";
|
|
365
|
+
} | undefined;
|
|
281
366
|
/** 어절 수 → 재생 분수 계산 (200 WPM 기준) */
|
|
282
367
|
export declare const calcSoundMinutes: (wordCount: number) => number;
|
|
283
368
|
/** 언어 옵션 (UI Select용) */
|
package/dist/book/book.type.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ========== 리터럴 유니온 타입 ==========
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getAgeOptions = exports.getEnLevelOptions = exports.getGenreOptions = exports.getLengthOptions = exports.getLanguageOptions = exports.calcSoundMinutes = exports.getLexileDescription = exports.getARDescription = exports.LEXILE_INDEX_RANGES = exports.AR_INDEX_RANGES = exports.DEFAULT_BOOK_META = exports.BOOK_AGE_MAX = exports.BOOK_AGE_MIN = exports.BookEnLevelLabel = exports.BookGenreLabel = exports.BookLengthLabel = exports.BookLanguageLabel = void 0;
|
|
4
|
+
exports.getAgeOptions = exports.getEnLevelOptions = exports.getGenreOptions = exports.getLengthOptions = exports.getLanguageOptions = exports.calcSoundMinutes = exports.getFKDescription = exports.FK_INDEX_RANGES = exports.getLexileDescription = exports.getARDescription = exports.LEXILE_INDEX_RANGES = exports.AR_INDEX_RANGES = exports.DEFAULT_BOOK_META = exports.BOOK_AGE_MAX = exports.BOOK_AGE_MIN = exports.BookEnLevelLabel = exports.BookGenreLabel = exports.BookLengthLabel = exports.BookLanguageLabel = void 0;
|
|
5
5
|
// ========== 라벨 (UI 표시용) ==========
|
|
6
6
|
exports.BookLanguageLabel = {
|
|
7
7
|
ko: "한국어",
|
|
@@ -81,6 +81,20 @@ exports.getARDescription = getARDescription;
|
|
|
81
81
|
/** Lexile 지수로 해당 범위 설명 조회 */
|
|
82
82
|
const getLexileDescription = (lexile) => exports.LEXILE_INDEX_RANGES.find((r) => lexile >= r.min && lexile <= r.max);
|
|
83
83
|
exports.getLexileDescription = getLexileDescription;
|
|
84
|
+
/** Flesch-Kincaid Grade Level 범위별 설명 (정수 1~17) */
|
|
85
|
+
exports.FK_INDEX_RANGES = [
|
|
86
|
+
{ min: 1, max: 2, level: "유아 ~ 초1", description: "그림책, 기초 문장" },
|
|
87
|
+
{ min: 3, max: 4, level: "초2~3", description: "짧은 이야기, 기초 리더" },
|
|
88
|
+
{ min: 5, max: 6, level: "초4~5", description: "챕터북, 어휘 확장" },
|
|
89
|
+
{ min: 7, max: 8, level: "초6~중1", description: "복합 문장, 논픽션" },
|
|
90
|
+
{ min: 9, max: 10, level: "중2~3", description: "추론·비판적 읽기" },
|
|
91
|
+
{ min: 11, max: 12, level: "고등학생", description: "문학 작품, 추상 개념" },
|
|
92
|
+
{ min: 13, max: 14, level: "대학 초급", description: "학술 텍스트 입문" },
|
|
93
|
+
{ min: 15, max: 17, level: "대학~전문", description: "전문 논문, 고급 텍스트" },
|
|
94
|
+
];
|
|
95
|
+
/** FK 지수로 해당 범위 설명 조회 */
|
|
96
|
+
const getFKDescription = (fk) => exports.FK_INDEX_RANGES.find((r) => fk >= r.min && fk <= r.max);
|
|
97
|
+
exports.getFKDescription = getFKDescription;
|
|
84
98
|
// ========== 헬퍼 함수 ==========
|
|
85
99
|
/** 어절 수 → 재생 분수 계산 (200 WPM 기준) */
|
|
86
100
|
const calcSoundMinutes = (wordCount) => Math.ceil(wordCount / 200);
|