@iyulab/chat-components 0.11.2 → 0.11.5

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 (26) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/_virtual/{_@oxc-project_runtime@0.143.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/decorate.js +1 -1
  3. package/dist/_virtual/{_@oxc-project_runtime@0.143.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/decorateMetadata.js +1 -1
  4. package/dist/components/blocks/UCodeBlock.js +2 -2
  5. package/dist/components/blocks/UElementBlock.js +2 -2
  6. package/dist/components/blocks/UFileBlock.js +4 -3
  7. package/dist/components/blocks/UMarkedBlock.d.ts +28 -0
  8. package/dist/components/blocks/UMarkedBlock.js +42 -7
  9. package/dist/components/blocks/URefBlock.js +2 -2
  10. package/dist/components/blocks/UTableBlock.d.ts +10 -2
  11. package/dist/components/blocks/UTableBlock.js +2 -2
  12. package/dist/components/blocks/UTextBlock.js +2 -2
  13. package/dist/components/message/UMessage.js +2 -2
  14. package/dist/components/prompt/UPrompt.js +2 -2
  15. package/dist/components/references/URefCard.js +2 -2
  16. package/dist/components/references/URefCardGroup.js +7 -4
  17. package/dist/components/references/URefTag.js +2 -2
  18. package/dist/components-extra/UChartBlock.js +2 -2
  19. package/dist/components-extra/UImagesBlock.js +2 -2
  20. package/dist/components-extra/UMapBlock.js +2 -2
  21. package/dist/components-extra/UVideoBlock.js +2 -2
  22. package/dist/utilities/messages.d.ts +2 -2
  23. package/dist/utilities/messages.js +12 -2
  24. package/package.json +3 -2
  25. package/skills/iyulab-chat-components/references/components/code-block.md +20 -0
  26. package/skills/iyulab-chat-components/references/components/marked-block.md +15 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.11.5] - 2026-08-31
4
+
5
+ ### Security
6
+
7
+ - **`UMarkedBlock` rendered unsanitized markdown output.** `marked` dropped
8
+ its built-in `sanitize` option in v5 and leaves that entirely to the
9
+ consumer; this component piped `marked`'s output straight into
10
+ `unsafeHTML()` without ever making that call. Raw HTML embedded in
11
+ markdown source (`<img onerror>`, `<script>`) ran verbatim, and
12
+ `javascript:`/`data:`/`vbscript:` hrefs in ordinary links, images, and
13
+ autolinks passed through untouched. Table cells hit the same gap
14
+ through a second path (`renderTable`'s inline parser call was missing
15
+ its options, silently falling back to `marked`'s unconfigured default
16
+ renderer). Fenced-code-block content had the same problem one layer
17
+ down — it reached `unsafeHTML()` unescaped even though a comment
18
+ already claimed otherwise.
19
+ Fixed by adding renderer overrides built on this package's existing
20
+ HTML/href sanitizers (no new dependency) and closing both bypass
21
+ paths.
22
+
23
+ ## [0.11.4] - 2026-08-27
24
+
25
+ ### Fixed
26
+
27
+ - **`u-ref-card-group`'s previous/next buttons and `u-file-block`'s preview
28
+ close button had no accessible name.** All three are icon-only controls;
29
+ without an explicit label a screen reader announced them as unnamed
30
+ buttons. They now carry a localized `aria-label` (English and Korean).
31
+
32
+ ## [0.11.3] - 2026-08-25
33
+
34
+ ### Fixed
35
+
36
+ - **Pin `marked-katex-extension` to `5.1.10`.** Versions `5.1.11`/`5.1.12` publish their `types`
37
+ field pointing at raw TypeScript source instead of compiled declarations (`./src/index.ts`
38
+ instead of `./src/index.d.ts`). Under a strict `tsconfig.json` (`noImplicitReturns`,
39
+ `noUnusedParameters`) with `moduleResolution: "bundler"`, that source file itself fails
40
+ typecheck — for this package's own CI, and for any downstream project that installs it fresh
41
+ and typechecks with similarly strict settings. No newer patched release exists yet, so the
42
+ range is pinned exact instead of `^5.1.10`; it will widen again once upstream fixes the
43
+ regression.
44
+
3
45
  ## [0.11.2] - 2026-08-07
4
46
 
5
47
  ### Fixed
@@ -1,4 +1,4 @@
1
- //#region \0@oxc-project+runtime@0.143.0/helpers/esm/decorate.js
1
+ //#region \0@oxc-project+runtime@0.147.0/helpers/esm/decorate.js
2
2
  function __decorate(decorators, target, key, desc) {
3
3
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
4
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -1,4 +1,4 @@
1
- //#region \0@oxc-project+runtime@0.143.0/helpers/esm/decorateMetadata.js
1
+ //#region \0@oxc-project+runtime@0.147.0/helpers/esm/decorateMetadata.js
2
2
  function __decorateMetadata(k, v) {
3
3
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import { styles } from "./UCodeBlock.styles.js";
2
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
3
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
2
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
3
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
4
  import { html } from "lit";
5
5
  import { customElement, property } from "lit/decorators.js";
6
6
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { UDataElement } from "../UDataElement.js";
4
4
  import { styles } from "./UElementBlock.styles.js";
5
5
  import { html, nothing } from "lit";
@@ -1,5 +1,6 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
+ import { messages } from "../../utilities/messages.js";
3
4
  import { styles } from "./UFileBlock.styles.js";
4
5
  import { html, nothing } from "lit";
5
6
  import { customElement, property, state } from "lit/decorators.js";
@@ -80,7 +81,7 @@ var UFileBlock = class UFileBlock extends UElement {
80
81
  <div class="preview-overlay" @click=${this.closePreview}>
81
82
  <header class="preview-header">
82
83
  <span class="preview-name">${this.name}</span>
83
- <button class="preview-close" @click=${this.closePreview}>
84
+ <button class="preview-close" aria-label=${messages.text("closePreview")} @click=${this.closePreview}>
84
85
  <u-icon lib="internal" name="x"></u-icon>
85
86
  </button>
86
87
  </header>
@@ -7,6 +7,15 @@ import { ReferenceCitation } from '../../types/References.js';
7
7
  * 주의:
8
8
  * - refs로 삽입되는 커스텀 태그(u-ref-*)는 속성/내용을 모두 escape하여 XSS를 방지합니다.
9
9
  * - 코드블록 내부는 HTML을 전부 텍스트로 취급(escape)하며, refs 태그는 통째 제거합니다.
10
+ * - 마크다운 소스에 섞인 원시 HTML(html 토큰, 블록/인라인 공통)은 렌더하지 않고
11
+ * 텍스트로 escape합니다 — marked는 v5부터 sanitize 옵션을 제거했고 그 판단을
12
+ * 소비자에게 위임하므로, 이 컴포넌트가 직접 책임집니다.
13
+ * - 마크다운 링크/이미지(`[..](href)`, `![..](src)`, autolink)의 href/src는
14
+ * `escapeHtmlHref`로 protocol을 검사합니다(javascript:/data:/vbscript: 차단) —
15
+ * marked 자신은 URL을 encodeURI할 뿐 protocol을 걸러내지 않습니다.
16
+ * - 테이블 셀 인라인 콘텐츠(renderTable)도 위 두 규칙과 같은 렌더러 설정을 공유합니다
17
+ * — `Parser.parseInline`을 옵션 없이 호출하면 기본(비-sanitize) 렌더러로 되돌아가므로
18
+ * 반드시 `this.parser.defaults`를 함께 넘겨야 합니다.
10
19
  * - 인덱스 기반 삽입(ref.endIndex)이 깨지지 않도록 "normalize(제로폭 제거)"를 insertRefs 전에 1회 수행합니다.
11
20
  */
12
21
  export declare class UMarkedBlock extends UElement {
@@ -32,8 +41,27 @@ export declare class UMarkedBlock extends UElement {
32
41
  /**
33
42
  * 테이블은 JSON 데이터로 변환하여 별도의 컴포넌트로 렌더링합니다.
34
43
  * 셀 내부의 인라인 마크다운(볼드, 코드, br 등)도 HTML로 변환합니다.
44
+ *
45
+ * `Parser.parseInline`은 옵션을 생략하면 marked 기본(비-sanitize) 렌더러로
46
+ * 돌아가 이 컴포넌트의 `html`/`link`/`image` 오버라이드를 건너뛴다 — 셀 안의
47
+ * 원시 HTML이나 `javascript:` 링크가 그대로 통과하는 별도 XSS 경로가 되므로,
48
+ * 반드시 `this.parser.defaults`(우리 렌더러가 병합된 설정)를 함께 넘긴다.
35
49
  */
36
50
  private renderTable;
51
+ /**
52
+ * 마크다운 소스에 섞인 원시 HTML(블록/인라인 공통 — marked는 두 경우 모두
53
+ * 같은 `html` 렌더러 훅을 쓴다)을 렌더하지 않고 텍스트로 escape합니다.
54
+ * marked v5+는 sanitize 옵션을 제거하고 이 판단을 소비자에게 위임했다.
55
+ */
56
+ private renderHtml;
57
+ /**
58
+ * 마크다운 링크의 href는 `escapeHtmlHref`로 protocol을 검사합니다
59
+ * (javascript:/data:/vbscript: 등은 `#`로 무력화). marked 기본 렌더러는
60
+ * URL을 encodeURI할 뿐 protocol을 걸러내지 않는다.
61
+ */
62
+ private renderLink;
63
+ /** 마크다운 이미지의 src도 `renderLink`와 동일하게 protocol을 검사합니다. */
64
+ private renderImage;
37
65
  /**
38
66
  * 인용/출처 참조객체가 있을때 ref 태그 HTML을 this.placeholder에 보관하고
39
67
  * 마크다운 문자열의 해당 위치에 주석 플레이스홀더를 삽입합니다.
@@ -1,7 +1,7 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import "./UCodeBlock.js";
4
- import { escapeHtmlText, stripZeroWidth } from "../../utilities/sanitizers.js";
4
+ import { escapeHtmlAttr, escapeHtmlHref, escapeHtmlText, stripZeroWidth } from "../../utilities/sanitizers.js";
5
5
  import { HtmlBuilder } from "../../utilities/HtmlBuilder.js";
6
6
  import { UElementBlock } from "./UElementBlock.js";
7
7
  import "../references/URefTag.js";
@@ -27,7 +27,10 @@ var UMarkedBlock = class UMarkedBlock extends UElement {
27
27
  silent: true,
28
28
  renderer: {
29
29
  code: (token) => this.renderCode(token),
30
- table: (token) => this.renderTable(token)
30
+ table: (token) => this.renderTable(token),
31
+ html: (token) => this.renderHtml(token),
32
+ link: (token) => this.renderLink(token),
33
+ image: (token) => this.renderImage(token)
31
34
  }
32
35
  }).use(markedKatex({ output: "mathml" }));
33
36
  this.placeholder = new HtmlPlaceholder();
@@ -77,20 +80,25 @@ var UMarkedBlock = class UMarkedBlock extends UElement {
77
80
  renderCode(token) {
78
81
  const lang = token.lang ?? "plaintext";
79
82
  if (lang === "block-json") return UElementBlock.buildHTML(token.text, { loading: this.streaming });
80
- const safeText = this.removeRefs(token.text);
83
+ const safeText = escapeHtmlText(this.removeRefs(token.text));
81
84
  return HtmlBuilder.build("u-code-block", { lang }, safeText);
82
85
  }
83
86
  /**
84
87
  * 테이블은 JSON 데이터로 변환하여 별도의 컴포넌트로 렌더링합니다.
85
88
  * 셀 내부의 인라인 마크다운(볼드, 코드, br 등)도 HTML로 변환합니다.
89
+ *
90
+ * `Parser.parseInline`은 옵션을 생략하면 marked 기본(비-sanitize) 렌더러로
91
+ * 돌아가 이 컴포넌트의 `html`/`link`/`image` 오버라이드를 건너뛴다 — 셀 안의
92
+ * 원시 HTML이나 `javascript:` 링크가 그대로 통과하는 별도 XSS 경로가 되므로,
93
+ * 반드시 `this.parser.defaults`(우리 렌더러가 병합된 설정)를 함께 넘긴다.
86
94
  */
87
95
  renderTable(token) {
88
96
  const headers = token.header.map((h) => ({
89
- text: h.tokens ? Parser.parseInline(h.tokens) : h.text,
97
+ text: h.tokens ? Parser.parseInline(h.tokens, this.parser.defaults) : h.text,
90
98
  align: h.align
91
99
  }));
92
100
  const rows = token.rows.map((row) => row.map((cell) => ({
93
- text: cell.tokens ? Parser.parseInline(cell.tokens) : cell.text,
101
+ text: cell.tokens ? Parser.parseInline(cell.tokens, this.parser.defaults) : cell.text,
94
102
  align: cell.align
95
103
  })));
96
104
  return UTableBlock.buildHTML({
@@ -99,6 +107,33 @@ var UMarkedBlock = class UMarkedBlock extends UElement {
99
107
  });
100
108
  }
101
109
  /**
110
+ * 마크다운 소스에 섞인 원시 HTML(블록/인라인 공통 — marked는 두 경우 모두
111
+ * 같은 `html` 렌더러 훅을 쓴다)을 렌더하지 않고 텍스트로 escape합니다.
112
+ * marked v5+는 sanitize 옵션을 제거하고 이 판단을 소비자에게 위임했다.
113
+ */
114
+ renderHtml(token) {
115
+ return escapeHtmlText(token.text);
116
+ }
117
+ /**
118
+ * 마크다운 링크의 href는 `escapeHtmlHref`로 protocol을 검사합니다
119
+ * (javascript:/data:/vbscript: 등은 `#`로 무력화). marked 기본 렌더러는
120
+ * URL을 encodeURI할 뿐 protocol을 걸러내지 않는다.
121
+ */
122
+ renderLink(token) {
123
+ const text = token.tokens ? Parser.parseInline(token.tokens, this.parser.defaults) : token.text;
124
+ let out = `<a href="${escapeHtmlHref(token.href)}"`;
125
+ if (token.title) out += ` title="${escapeHtmlAttr(token.title)}"`;
126
+ out += `>${text}</a>`;
127
+ return out;
128
+ }
129
+ /** 마크다운 이미지의 src도 `renderLink`와 동일하게 protocol을 검사합니다. */
130
+ renderImage(token) {
131
+ let out = `<img src="${escapeHtmlHref(token.href)}" alt="${escapeHtmlAttr(token.text)}"`;
132
+ if (token.title) out += ` title="${escapeHtmlAttr(token.title)}"`;
133
+ out += `>`;
134
+ return out;
135
+ }
136
+ /**
102
137
  * 인용/출처 참조객체가 있을때 ref 태그 HTML을 this.placeholder에 보관하고
103
138
  * 마크다운 문자열의 해당 위치에 주석 플레이스홀더를 삽입합니다.
104
139
  */
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import "../references/URefCard.js";
4
4
  import { styles } from "./URefBlock.styles.js";
5
5
  import { html } from "lit";
@@ -1,7 +1,15 @@
1
1
  import { UDataElement } from '../UDataElement.js';
2
- /** 테이블 셀 데이터 타입 */
2
+ /**
3
+ * 테이블 셀 데이터 타입
4
+ *
5
+ * ⚠`text`는 렌더링 시 `unsafeHTML()`로 그대로 주입되는 **신뢰된 HTML 마크업**입니다
6
+ * (일반 텍스트가 아닙니다) — `UMarkedBlock`이 마크다운 인라인 렌더러(자체 XSS 방어
7
+ * 포함: 원시 HTML escape, `javascript:`/`data:` 링크 차단)를 거쳐 채우는 것을
8
+ * 전제로 합니다. 이 컴포넌트를 직접 구동하는 소비자가 정화되지 않은 외부 문자열을
9
+ * `text`에 넣으면 XSS로 이어질 수 있습니다 — 반드시 사전에 sanitize할 것.
10
+ */
3
11
  export interface TableCell {
4
- /** 셀에 표시할 텍스트 내용 */
12
+ /** 셀에 표시할 (이미 안전 처리된) HTML 마크업 */
5
13
  text: string;
6
14
  /** 셀 내용의 정렬 방식. 기본값은 "left" */
7
15
  align: "left" | "center" | "right" | null;
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { UDataElement } from "../UDataElement.js";
4
4
  import { styles } from "./UTableBlock.styles.js";
5
5
  import { html } from "lit";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { styles } from "./UTextBlock.styles.js";
4
4
  import { html } from "lit";
5
5
  import { customElement, property, query } from "lit/decorators.js";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { styles } from "./UMessage.styles.js";
4
4
  import { html } from "lit";
5
5
  import { customElement, property } from "lit/decorators.js";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import "../blocks/UFileBlock.js";
4
4
  import { styles } from "./UPrompt.styles.js";
5
5
  import { html } from "lit";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { UDataElement } from "../UDataElement.js";
4
4
  import { styles } from "./URefCard.styles.js";
5
5
  import { html } from "lit";
@@ -1,5 +1,6 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
+ import { messages } from "../../utilities/messages.js";
3
4
  import { URefCard } from "./URefCard.js";
4
5
  import { styles } from "./URefCardGroup.styles.js";
5
6
  import { html } from "lit";
@@ -20,15 +21,17 @@ var URefCardGroup = class URefCardGroup extends UElement {
20
21
  return html`
21
22
  <div class="header" ?hidden=${this.cards.length <= 1}>
22
23
  <button class="nav-button"
24
+ aria-label=${messages.text("previousReference")}
23
25
  @click=${this.handlePreviousButtonClick}>
24
26
  <u-icon lib="internal" name="chevron-left"></u-icon>
25
27
  </button>
26
-
28
+
27
29
  <span class="page-indicator">
28
30
  ${this.currentIndex + 1} / ${this.cards.length}
29
31
  </span>
30
-
32
+
31
33
  <button class="nav-button"
34
+ aria-label=${messages.text("nextReference")}
32
35
  @click=${this.handleNextButtonClick}>
33
36
  <u-icon lib="internal" name="chevron-right"></u-icon>
34
37
  </button>
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { styles } from "./URefTag.styles.js";
4
4
  import { html } from "lit";
5
5
  import { customElement, property } from "lit/decorators.js";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { messages } from "../utilities/messages.js";
4
4
  import { styles } from "./UChartBlock.styles.js";
5
5
  import { html, nothing } from "lit";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { styles } from "./UImagesBlock.styles.js";
4
4
  import { html, nothing } from "lit";
5
5
  import { customElement, property, state } from "lit/decorators.js";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { styles } from "./UMapBlock.styles.js";
4
4
  import { html, nothing } from "lit";
5
5
  import { customElement, property } from "lit/decorators.js";
@@ -1,5 +1,5 @@
1
- import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorateMetadata.js";
2
- import __decorate from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
1
+ import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorateMetadata.js";
2
+ import __decorate from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
3
3
  import { styles } from "./UVideoBlock.styles.js";
4
4
  import { html, nothing } from "lit";
5
5
  import { customElement, property } from "lit/decorators.js";
@@ -5,5 +5,5 @@
5
5
  * 이 리포가 채택한 표준이 *"영어 기본 **+ 레지스트리**"* 이기 때문이다 — 영어 리터럴만으로는
6
6
  * 한국어 앱이 그 문구를 되돌릴 방법이 없다. 다음 문자열은 여기로 온다.
7
7
  */
8
- export type ChatMessageKey = 'canvasUnavailable';
9
- export declare const messages: import('@iyulab/components/dist/utilities/Locale.js').LocaleNamespace<"canvasUnavailable">;
8
+ export type ChatMessageKey = 'canvasUnavailable' | 'previousReference' | 'nextReference' | 'closePreview';
9
+ export declare const messages: import('@iyulab/components/dist/utilities/Locale.js').LocaleNamespace<ChatMessageKey>;
@@ -1,7 +1,17 @@
1
1
  import { Locale } from "@iyulab/components/dist/utilities/Locale.js";
2
2
  //#region src/utilities/messages.ts
3
3
  var messages = Locale.namespace("@iyulab/chat-components");
4
- messages.register("en", { canvasUnavailable: "Canvas 2D context is unavailable." });
5
- messages.register("ko", { canvasUnavailable: "Canvas 2D context를 가져올 수 없습니다." });
4
+ messages.register("en", {
5
+ canvasUnavailable: "Canvas 2D context is unavailable.",
6
+ previousReference: "Previous reference",
7
+ nextReference: "Next reference",
8
+ closePreview: "Close preview"
9
+ });
10
+ messages.register("ko", {
11
+ canvasUnavailable: "Canvas 2D context를 가져올 수 없습니다.",
12
+ previousReference: "이전 참조",
13
+ nextReference: "다음 참조",
14
+ closePreview: "미리보기 닫기"
15
+ });
6
16
  //#endregion
7
17
  export { messages };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/chat-components",
3
3
  "description": "llm chat components for building chat interfaces",
4
- "version": "0.11.2",
4
+ "version": "0.11.5",
5
5
  "author": "iyulab",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -51,6 +51,7 @@
51
51
  "./react/*": "./dist/react/*"
52
52
  },
53
53
  "scripts": {
54
+ "preversion": "node ../../scripts/preversion-check.mjs",
54
55
  "start": "vite",
55
56
  "build": "npm run typecheck && eslint && vite build",
56
57
  "test": "vitest run",
@@ -65,7 +66,7 @@
65
66
  "katex": "^0.17.0",
66
67
  "lit": "^3.3.3",
67
68
  "marked": "^18.0.6",
68
- "marked-katex-extension": "^5.1.10"
69
+ "marked-katex-extension": "5.1.10"
69
70
  },
70
71
  "peerDependencies": {
71
72
  "@lit/react": ">=1.0.8",
@@ -36,3 +36,23 @@ Syntax-highlighted code block powered by Highlight.js. Shows a language label an
36
36
  | Name | Description |
37
37
  |------|-------------|
38
38
  | *(default, hidden)* | Code text injected directly as content; updates `value` on `slotchange` |
39
+
40
+ ## CSS Custom Properties
41
+
42
+ Highlight.js syntax theme — light values shown, dark auto-applies via `light-dark()`.
43
+
44
+ | Property | Description |
45
+ |----------|-------------|
46
+ | `--hljs-background-color` | Code block background |
47
+ | `--hljs-text-color` | Default text color |
48
+ | `--hljs-keyword-color` | Keywords |
49
+ | `--hljs-string-color` | Strings |
50
+ | `--hljs-comment-color` | Comments |
51
+ | `--hljs-entity-color` | Function/class names |
52
+ | `--hljs-entity-tag-color` | HTML/XML tag names |
53
+ | `--hljs-constant-color` | Constants and numbers |
54
+ | `--hljs-variable-color` | Variables and template literals |
55
+ | `--hljs-markup-heading-color` | Markdown headings |
56
+ | `--hljs-markup-list-color` | Markdown list bullets |
57
+ | `--hljs-addition-color` / `--hljs-addition-bg-color` | Diff addition text / background |
58
+ | `--hljs-deletion-color` / `--hljs-deletion-bg-color` | Diff deletion text / background |
@@ -42,6 +42,21 @@ Tracks a `streaming` state internally (resets a 1500ms idle timer on every `valu
42
42
  | `value` | `string` | `undefined` | Markdown text to render |
43
43
  | `refs` | `ReferenceCitation[]` | `undefined` | Citation list. `u-ref-tag` elements are automatically inserted at `startIndex`/`endIndex` positions |
44
44
 
45
+ ## CSS Custom Properties
46
+
47
+ Vendored from GitHub's markdown theme — light values shown, dark auto-applies via
48
+ `light-dark()`.
49
+
50
+ | Property | Description |
51
+ |----------|-------------|
52
+ | `--fgColor-default` / `--fgColor-muted` / `--fgColor-accent` | Body text / secondary text / link color |
53
+ | `--bgColor-default` / `--bgColor-muted` / `--bgColor-neutral-muted` / `--bgColor-attention-muted` | Body / code+table-stripe / hr+badge / warning-callout background |
54
+ | `--borderColor-default` / `--borderColor-muted` / `--borderColor-neutral-muted` | Table and blockquote border weights |
55
+ | `--focus-outlineColor` | Link focus outline |
56
+ | `--fontStack-monospace` | Inline code and code-fence font stack |
57
+ | `--base-size-4` / `-8` / `-16` / `-24` / `-40` | Spacing scale used throughout (margins, padding, gaps) |
58
+ | `--base-text-weight-normal` / `-medium` / `-semibold` | Font-weight scale (body / table header / heading) |
59
+
45
60
  ## ReferenceCitation Type
46
61
 
47
62
  ```ts