vdc-editor 0.1.304 → 0.1.306
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/lib/BulkSpellChecker-Cx2bqUWx.mjs +5 -0
- package/lib/BulkSpellChecker-Cx2bqUWx.mjs.map +1 -0
- package/lib/{index-g8ZGJ2rd.mjs → index-BHPFBYZn.mjs} +10349 -10235
- package/lib/{index-g8ZGJ2rd.mjs.map → index-BHPFBYZn.mjs.map} +1 -1
- package/lib/src/utils/dark-color-transform.d.ts +15 -8
- package/lib/vdc-editor.mjs +1 -1
- package/lib/vdc-editor.umd.js +78 -76
- package/lib/vdc-editor.umd.js.map +1 -1
- package/package.json +1 -1
- package/lib/BulkSpellChecker-BCrcDE9R.mjs +0 -5
- package/lib/BulkSpellChecker-BCrcDE9R.mjs.map +0 -1
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 다크모드에서 어두운 인라인 텍스트 색상을 밝게 변환하는 유틸리티
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
* CSS 색상 문자열을 RGB로 파싱
|
|
6
|
-
* 지원 형식: #RGB, #RRGGBB, #RRGGBBAA, rgb(), rgba(), named colors
|
|
7
|
-
*/
|
|
8
|
-
export declare function parseCssColor(color: string): {
|
|
4
|
+
export interface ParsedColor {
|
|
9
5
|
r: number;
|
|
10
6
|
g: number;
|
|
11
7
|
b: number;
|
|
12
|
-
|
|
8
|
+
a: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* CSS 색상 문자열을 RGBA로 파싱
|
|
12
|
+
* 지원 형식: #RGB, #RRGGBB, #RRGGBBAA, rgb(), rgba(), 네임드 컬러(브라우저 기반 fallback 포함)
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseCssColor(color: string): ParsedColor | null;
|
|
13
15
|
/**
|
|
14
16
|
* WCAG 2.0 상대 휘도 계산 (0 = 검정, 1 = 흰색)
|
|
15
17
|
*/
|
|
@@ -18,13 +20,18 @@ export declare function getRelativeLuminance(r: number, g: number, b: number): n
|
|
|
18
20
|
* CSS 색상이 어두운지 판별
|
|
19
21
|
*/
|
|
20
22
|
export declare function isColorDark(color: string, threshold?: number): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* CSS 색상이 밝은지 판별 (배경색 반전용)
|
|
25
|
+
*/
|
|
26
|
+
export declare function isColorLight(color: string, threshold?: number): boolean;
|
|
21
27
|
/**
|
|
22
28
|
* 어두운 색상을 다크모드용 밝은 색상으로 변환
|
|
23
|
-
* HSL 변환 후 L < 0.5이면 L = 1 - L 로
|
|
29
|
+
* HSL 변환 후 L < 0.5이면 L = 1 - L 로 반전. 알파 보존.
|
|
24
30
|
*/
|
|
25
31
|
export declare function lightenDarkColor(color: string): string;
|
|
32
|
+
export declare function darkenLightBgColor(color: string): string;
|
|
26
33
|
/**
|
|
27
|
-
* HTML 문자열 내 인라인 color
|
|
34
|
+
* HTML 문자열 내 인라인 color / background-color 스타일을 다크모드용으로 변환
|
|
28
35
|
* DOMParser 패턴 사용 (time-highlight-html.ts 패턴과 동일)
|
|
29
36
|
*/
|
|
30
37
|
export declare function transformDarkColorsInHtml(html: string): string;
|
package/lib/vdc-editor.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as i, b as o, a as t, D as r, c as E, E as d, R as p, S, g as u, d as n, S as C, j as H, i as L, k as l, n as T, u as _, e as f, h as g, f as m } from "./index-
|
|
1
|
+
import { A as i, b as o, a as t, D as r, c as E, E as d, R as p, S, g as u, d as n, S as C, j as H, i as L, k as l, n as T, u as _, e as f, h as g, f as m } from "./index-BHPFBYZn.mjs";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
export {
|
|
4
4
|
i as ArticleCompareEditor,
|