@iyulab/chat-components 0.10.0 → 0.11.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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.11.0] - 2026-08-04
4
+
5
+ ### Changed
6
+
7
+ - **로딩 자리표시자를 `u-skeleton[lines]` 로 회수했다** (표 블록 · 엘리먼트 블록).
8
+ 폭만 다른 막대 **9줄을 손으로 반복**하던 자리이며, 렌더 결과는 같다(마지막 줄이 짧아지는
9
+ 것은 종전 마크업도 그렇게 적고 있었다). `@iyulab/components >= 1.23.0` 이 필요하다.
10
+
11
+ - ⚠**차트 오류 문구가 «영어 기본 + 로케일 레지스트리»로 이주했다.** `Canvas 2D context` 실패
12
+ 안내가 한국어 리터럴이었다 — 화면에 그대로 뜨는 문자열이다.
13
+
14
+ ```ts
15
+ import { Locale } from '@iyulab/components';
16
+ import { messages } from '@iyulab/chat-components';
17
+
18
+ Locale.set('ko'); // 한국어 환경은 종전 문구를 본다
19
+ messages.register('ja', { canvasUnavailable: '…' });
20
+ ```
21
+
22
+ ⚠**한 키뿐인데 레지스트리를 둔 이유**: 영어 리터럴만으로는 한국어 앱이 그 문구를 되돌릴
23
+ 방법이 없다. 표준은 *"영어 기본 **+ 레지스트리**"* 다.
24
+
25
+ ### Requires
26
+
27
+ - `@iyulab/components >= 1.23.0` (`Locale.namespace`) — 의존 하한을 올렸다.
28
+
3
29
  ## [0.10.0] - 2026-08-03
4
30
 
5
31
  ### Fixed
@@ -39,11 +39,7 @@ var UElementBlock = class UElementBlock extends UDataElement {
39
39
  <u-skeleton effect="shimmer" width="40%" height="0.75em" shape="rounded"></u-skeleton>
40
40
  </div>
41
41
  <div class="sk-doc">
42
- <u-skeleton effect="shimmer" width="40%" height="0.75em" shape="rounded"></u-skeleton>
43
- <u-skeleton effect="shimmer" width="80%" height="0.75em" shape="rounded"></u-skeleton>
44
- <u-skeleton effect="shimmer" width="60%" height="0.8em" shape="rounded"></u-skeleton>
45
- <u-skeleton effect="shimmer" width="100%" height="0.8em" shape="rounded"></u-skeleton>
46
- <u-skeleton effect="shimmer" width="80%" height="0.8em" shape="rounded"></u-skeleton>
42
+ <u-skeleton effect="shimmer" lines="5" height="0.8em" shape="rounded"></u-skeleton>
47
43
  </div>
48
44
  </div>`;
49
45
  if (this.element != null) return this.element;
@@ -83,10 +83,7 @@ var UTableBlock = class UTableBlock extends UDataElement {
83
83
  ${this.loading ? html`
84
84
  <tr>
85
85
  <td colspan=${this.headers.length || 1}>
86
- <u-skeleton width="80%" height="1.2em"></u-skeleton>
87
- <u-skeleton width="60%" height="1.2em"></u-skeleton>
88
- <u-skeleton width="70%" height="1.2em"></u-skeleton>
89
- <u-skeleton width="50%" height="1.2em"></u-skeleton>
86
+ <u-skeleton lines="4" height="1.2em"></u-skeleton>
90
87
  </td>
91
88
  </tr>
92
89
  ` : repeat(rows, (_, i) => i, (row) => html`
@@ -1,6 +1,7 @@
1
1
  import "../utilities/icons.js";
2
2
  import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
3
3
  import __decorate from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
4
+ import { messages } from "../utilities/messages.js";
4
5
  import { styles } from "./UChartBlock.styles.js";
5
6
  import { html, nothing } from "lit";
6
7
  import { customElement, property, query, state } from "lit/decorators.js";
@@ -77,7 +78,7 @@ var UChartBlock = class UChartBlock extends UElement {
77
78
  this.error = null;
78
79
  const ctx = this.canvas.getContext("2d");
79
80
  if (!ctx) {
80
- this.error = "Canvas 2D context를 가져올 수 없습니다.";
81
+ this.error = messages.text("canvasUnavailable");
81
82
  return;
82
83
  }
83
84
  try {
@@ -0,0 +1,9 @@
1
+ /**
2
+ * `@iyulab/chat-components` 의 화면 문자열 — **영어 기본 + 로케일 레지스트리**.
3
+ *
4
+ * ⚠**지금 한 키뿐이다.** 그래도 리터럴을 영어로 바꾸는 대신 레지스트리를 두는 이유는,
5
+ * 이 리포가 채택한 표준이 *"영어 기본 **+ 레지스트리**"* 이기 때문이다 — 영어 리터럴만으로는
6
+ * 한국어 앱이 그 문구를 되돌릴 방법이 없다. 다음 문자열은 여기로 온다.
7
+ */
8
+ export type ChatMessageKey = 'canvasUnavailable';
9
+ export declare const messages: import('@iyulab/components/dist/utilities/Locale.js').LocaleNamespace<"canvasUnavailable">;
@@ -0,0 +1,7 @@
1
+ import { Locale } from "@iyulab/components/dist/utilities/Locale.js";
2
+ //#region src/utilities/messages.ts
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를 가져올 수 없습니다." });
6
+ //#endregion
7
+ 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.10.0",
4
+ "version": "0.11.0",
5
5
  "author": "iyulab",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -45,7 +45,7 @@
45
45
  "lint:fix": "eslint src/ --fix"
46
46
  },
47
47
  "dependencies": {
48
- "@iyulab/components": "^1.8.0",
48
+ "@iyulab/components": "^1.23.0",
49
49
  "highlight.js": "^11.11.1",
50
50
  "katex": "^0.17.0",
51
51
  "lit": "^3.3.3",