@ihabdevteam/core 0.380.0 → 0.382.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 +142 -1
- package/dist/components.cjs.js +172 -172
- package/dist/components.esm.css +1 -1
- package/dist/hooks.cjs.js +3 -3
- package/dist/i18n.cjs.js +3 -3
- package/dist/ihabdevteam-core.cjs.js +177 -177
- package/dist/ihabdevteam-core.d.ts +20 -3
- package/dist/packages/core/src/components/Word/TableFilterPanel.d.ts +2 -0
- package/dist/packages/core/src/components/Word/TableFilterPanel.js +2 -2
- package/dist/packages/core/src/components/Word/WordTableBlock.d.ts +1 -1
- package/dist/packages/core/src/components/Word/WordTableBlock.js +43 -9
- package/dist/packages/core/src/components/Word/wordTableBlockTypes.d.ts +15 -0
- package/dist/packages/core/src/components/Word/wordTableSettings.d.ts +23 -5
- package/dist/packages/core/src/components/Word/wordTableSettings.js +29 -7
- package/dist/packages/core/src/components/WordTable.css +33 -8
- package/dist/packages/core/src/components/WordTable.js +44 -6
- package/dist/packages/core/src/components/wordTableLayout.d.ts +1 -1
- package/dist/packages/core/src/i18n/locales/en.json +1 -0
- package/dist/packages/core/src/i18n/locales/ko.json +1 -0
- package/dist/packages/core/src/utils/headProbeStatus.d.ts +21 -0
- package/dist/packages/core/src/utils/headProbeStatus.js +23 -0
- package/dist/packages/core/src/utils/imageConfig.js +3 -2
- package/dist/packages/core/src/utils/ttsConfig.js +3 -2
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +160 -160
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { timeoutSignal } from './timeoutSignal';
|
|
2
|
+
import { isDefiniteAbsence } from './headProbeStatus';
|
|
2
3
|
const GLOBAL_KEY = '__ihab_core_image_config__';
|
|
3
4
|
/** @public */
|
|
4
5
|
export function configureImageResolver(resolver) {
|
|
@@ -95,7 +96,7 @@ async function probeImageExists(word, homonum, force = false) {
|
|
|
95
96
|
// 타임아웃 없으면 HEAD 요청 하나가 응답 없이 걸릴 때 이 확인을 기다리는
|
|
96
97
|
// 검색 버튼(이미지 있음 필터)이 영구 비활성화된다
|
|
97
98
|
/* **확인이 안 된 것은 캐시하지 않는다.** 망 끊김·타임아웃·권한 오류·5xx 는 이미지가 없다는 증거가 아니다.
|
|
98
|
-
있음(2xx)과 명시적 없음(
|
|
99
|
+
있음(2xx)과 명시적 없음(`isDefiniteAbsence`)만 담는다 — 어느 상태가 '없음' 인지는 그 함수의 머리말에 적었다. */
|
|
99
100
|
let request;
|
|
100
101
|
try {
|
|
101
102
|
request = fetch(url, { method: 'HEAD', signal: timeoutSignal(8000) });
|
|
@@ -104,7 +105,7 @@ async function probeImageExists(word, homonum, force = false) {
|
|
|
104
105
|
return false;
|
|
105
106
|
}
|
|
106
107
|
const p = request
|
|
107
|
-
.then(res => (res.ok ? true : res.status
|
|
108
|
+
.then(res => (res.ok ? true : isDefiniteAbsence(res.status) ? false : null), () => null)
|
|
108
109
|
.then(ok => {
|
|
109
110
|
// 강제 재확인이 앞 요청을 대체했거나 캐시를 비웠다면 늦은 응답으로 새 값을 덮지 않는다.
|
|
110
111
|
if (inflight.get(k) !== p)
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* @public
|
|
22
22
|
*/
|
|
23
23
|
import { timeoutSignal } from './timeoutSignal';
|
|
24
|
+
import { isDefiniteAbsence } from './headProbeStatus';
|
|
24
25
|
const GLOBAL_KEY = '__ihab_core_tts_config__';
|
|
25
26
|
/**
|
|
26
27
|
* TTS URL 리졸버를 전역으로 설정합니다.
|
|
@@ -76,7 +77,7 @@ export async function checkAudioExists(word) {
|
|
|
76
77
|
return audioExistsCache.get(url);
|
|
77
78
|
// 타임아웃 없으면 HEAD 요청 하나가 응답 없이 걸릴 때 이 확인을 기다리는
|
|
78
79
|
// 검색 버튼(음성 있음 필터)이 영구 비활성화된다
|
|
79
|
-
// 성공(2xx)과 명시적 부재(
|
|
80
|
+
// 성공(2xx)과 명시적 부재(`isDefiniteAbsence`)만 캐시에 남긴다. 권한 오류·네트워크 실패·타임아웃·5xx 까지 캐시하면
|
|
80
81
|
// 한 번의 통신 끊김·서버 장애가 그 단어를 세션 내내 '음성 없음'으로 고정해, '음성 있음' 필터에서
|
|
81
82
|
// 통째로 빠진다. 실패는 지워서 다음 호출이 다시 물어보게 한다 — 단 **이 요청이 담은 칸일 때만**:
|
|
82
83
|
// clearAudioExistsCache() 뒤 새로 담긴 확인을 늦게 끝난 옛 요청이 지우면 같은 주소를 또 묻는다.
|
|
@@ -93,7 +94,7 @@ export async function checkAudioExists(word) {
|
|
|
93
94
|
return false;
|
|
94
95
|
}
|
|
95
96
|
const promise = request
|
|
96
|
-
.then(res => (res.ok ? true : res.status
|
|
97
|
+
.then(res => (res.ok ? true : isDefiniteAbsence(res.status) ? false : onUnconfirmed()), onUnconfirmed);
|
|
97
98
|
audioExistsCache.set(url, promise);
|
|
98
99
|
return promise;
|
|
99
100
|
}
|