@iyulab/chat-components 0.5.1 → 0.5.2
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 +11 -5
- package/dist/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.128.0}/helpers/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.128.0}/helpers/decorateMetadata.js +1 -1
- package/dist/components/blocks/UCodeBlock.js +4 -3
- package/dist/components/blocks/UFileBlock.js +2 -2
- package/dist/components/blocks/UJsonBlock.js +2 -2
- package/dist/components/blocks/UMarkedBlock.js +3 -27
- package/dist/components/blocks/URefBlock.js +2 -2
- package/dist/components/blocks/UTableBlock.js +4 -3
- package/dist/components/blocks/UTextBlock.js +2 -2
- package/dist/components/blocks/UThinkBlock.js +2 -2
- package/dist/components/blocks/UToolBlock.js +2 -2
- package/dist/components/buttons/UAttachButton.js +2 -2
- package/dist/components/buttons/UCopyButton.js +2 -2
- package/dist/components/buttons/UVoteButton.js +2 -2
- package/dist/components/intents/UQuestionIntent.js +2 -2
- package/dist/components/message/UMessage.js +2 -2
- package/dist/components/prompt/UPrompt.js +4 -3
- package/dist/components/references/URefCard.js +2 -2
- package/dist/components/references/URefCardGroup.js +4 -3
- package/dist/components/references/URefTag.js +2 -2
- package/dist/components/views/UChartView.js +2 -2
- package/dist/components/views/UImagesView.js +2 -2
- package/dist/components/views/UMapView.js +2 -2
- package/dist/components/views/UVideoView.js +2 -2
- package/dist/components/views/UView.js +2 -2
- package/dist/types/Intents.js +1 -1
- package/dist/types/Views.js +1 -1
- package/dist/utilities/HtmlPlaceholder.d.ts +11 -0
- package/dist/utilities/HtmlPlaceholder.js +26 -0
- package/package.json +10 -10
- package/skills/iyulab-chat-components/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.2] - 2026-05-08
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Updated runtime dependencies to newer patch/minor releases, including `@iyulab/components` (`^1.0.3` -> `^1.0.5`) and markdown stack updates (`marked` `^17.0.5` -> `^18.0.3`, `marked-katex-extension` `^5.1.7` -> `^5.1.8`).
|
|
7
|
+
- Refactored markdown HTML placeholder logic by extracting it from `UMarkedBlock` into a dedicated utility (`HtmlPlaceholder`) without changing public API behavior.
|
|
8
|
+
|
|
3
9
|
## [0.5.1] - 2026-04-15
|
|
4
10
|
|
|
5
11
|
### Added
|
|
6
|
-
- `UPrompt`: 0.4.x
|
|
7
|
-
- `SendEventDetail
|
|
8
|
-
- `StopEventDetail
|
|
9
|
-
- `MIGRATION.md`
|
|
12
|
+
- `UPrompt`: restored 0.4.x compatibility by emitting legacy `u-submit`/`u-cancel` events **alongside** `send`/`stop`; scheduled for removal in 0.6.0 (`@deprecated`).
|
|
13
|
+
- Refined `SendEventDetail` to `{ value: string; files?: FileBlockItem[] }`; `UPrompt.submit()` now emits the actual value in `detail`.
|
|
14
|
+
- Added `StopEventDetail` as an interface (currently empty, reserved for future extension).
|
|
15
|
+
- Added `MIGRATION.md` with a 0.4.x -> 0.5.x migration guide and documented breaking-change policy.
|
|
10
16
|
|
|
11
17
|
### Fixed
|
|
12
|
-
- 0.5.0
|
|
18
|
+
- Mitigated silent failures for vanilla DOM consumers in 0.5.0 by introducing aliases for event-name changes (`u-submit`/`u-cancel` -> `send`/`stop`), which had previously been documented only as type renames (`USubmitEvent` -> `SendEvent`).
|
|
13
19
|
|
|
14
20
|
## [0.5.0] - 2026-04-01
|
|
15
21
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/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.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/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,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import "../buttons/UCopyButton.js";
|
|
4
4
|
import { styles } from "./UCodeBlock.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -18,7 +18,8 @@ var UCodeBlock = class UCodeBlock extends UElement {
|
|
|
18
18
|
this.lang = "plaintext";
|
|
19
19
|
this.isCopied = false;
|
|
20
20
|
this.handleSlotChange = (e) => {
|
|
21
|
-
|
|
21
|
+
const nodes = e.target.assignedNodes({ flatten: true });
|
|
22
|
+
this.value = nodes.map((node) => node.textContent).join("\n\n");
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
static {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UFileBlock.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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UJsonBlock.styles.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { customElement, property, state } from "lit/decorators.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import "./UCodeBlock.js";
|
|
4
4
|
import "../references/URefTag.js";
|
|
5
5
|
import { URefCard } from "../references/URefCard.js";
|
|
6
6
|
import "../references/URefCardGroup.js";
|
|
7
7
|
import { UTableBlock } from "./UTableBlock.js";
|
|
8
8
|
import { UView } from "../views/UView.js";
|
|
9
|
+
import { HtmlPlaceholder } from "../../utilities/HtmlPlaceholder.js";
|
|
9
10
|
import { styles } from "./UMarkedBlock.styles.js";
|
|
10
11
|
import { nothing } from "lit";
|
|
11
12
|
import { customElement, property } from "lit/decorators.js";
|
|
@@ -126,30 +127,5 @@ var UMarkedBlock = class UMarkedBlock extends UElement {
|
|
|
126
127
|
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UMarkedBlock.prototype, "value", void 0);
|
|
127
128
|
__decorate([property({ type: Array }), __decorateMetadata("design:type", Array)], UMarkedBlock.prototype, "refs", void 0);
|
|
128
129
|
UMarkedBlock = __decorate([customElement("u-marked-block")], UMarkedBlock);
|
|
129
|
-
/**
|
|
130
|
-
* Marked 파싱 중 HTML이 GFM에 의해 오염되는 것을 방지하기 위해
|
|
131
|
-
* HTML을 주석 플레이스홀더로 치환하고, 나중에 원래 HTML로 복원하는 유틸입니다.
|
|
132
|
-
*/
|
|
133
|
-
var HtmlPlaceholder = class {
|
|
134
|
-
constructor() {
|
|
135
|
-
this.map = {};
|
|
136
|
-
this.idx = 0;
|
|
137
|
-
}
|
|
138
|
-
reset() {
|
|
139
|
-
this.map = {};
|
|
140
|
-
this.idx = 0;
|
|
141
|
-
}
|
|
142
|
-
/** html을 저장하고 대응하는 플레이스홀더 키를 반환합니다. */
|
|
143
|
-
store(html) {
|
|
144
|
-
const key = `<!--ref:${this.idx++}-->`;
|
|
145
|
-
this.map[key] = html;
|
|
146
|
-
return key;
|
|
147
|
-
}
|
|
148
|
-
/** html 안의 등록된 모든 플레이스홀더를 원래 HTML로 복원합니다. */
|
|
149
|
-
restore(html) {
|
|
150
|
-
if (this.idx === 0) return html;
|
|
151
|
-
return html.replace(/<!--ref:\d+-->/g, (key) => this.map[key] ?? "");
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
130
|
//#endregion
|
|
155
131
|
export { UMarkedBlock };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import "../references/URefCard.js";
|
|
4
4
|
import { styles } from "./URefBlock.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UTableBlock.styles.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { customElement, property, state } from "lit/decorators.js";
|
|
@@ -137,7 +137,8 @@ var UTableBlock = class UTableBlock extends UDataElement {
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
handleSearchInput(e) {
|
|
140
|
-
|
|
140
|
+
const input = e.target;
|
|
141
|
+
this.searchCache = input.value || "";
|
|
141
142
|
if (this.searchTimer !== null) window.clearTimeout(this.searchTimer);
|
|
142
143
|
this.loading = true;
|
|
143
144
|
this.searchTimer = window.setTimeout(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import "./UMarkedBlock.js";
|
|
4
4
|
import { styles } from "./UThinkBlock.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import "./UJsonBlock.js";
|
|
4
4
|
import { styles } from "./UToolBlock.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UAttachButton.styles.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { customElement, property, query } from "lit/decorators.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styles } from "./UCopyButton.styles.js";
|
|
2
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
3
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { customElement, property, state } from "lit/decorators.js";
|
|
6
6
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UVoteButton.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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UQuestionIntent.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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import "../blocks/UFileBlock.js";
|
|
4
4
|
import { styles } from "./UPrompt.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -119,7 +119,8 @@ var UPrompt = class UPrompt extends UElement {
|
|
|
119
119
|
}
|
|
120
120
|
handleTextBlockInput(e) {
|
|
121
121
|
e.preventDefault();
|
|
122
|
-
|
|
122
|
+
const target = e.target;
|
|
123
|
+
this.value = target.value;
|
|
123
124
|
}
|
|
124
125
|
handleTextBlockKeydown(e) {
|
|
125
126
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./URefCard.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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { URefCard } from "./URefCard.js";
|
|
4
4
|
import { styles } from "./URefCardGroup.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -59,7 +59,8 @@ var URefCardGroup = class URefCardGroup extends UElement {
|
|
|
59
59
|
}
|
|
60
60
|
/** slot 내용이 변경될 때 호출됩니다. */
|
|
61
61
|
handleSlotChange(e) {
|
|
62
|
-
|
|
62
|
+
const elements = e.target.assignedElements({ flatten: true });
|
|
63
|
+
this.cards = elements.filter((el) => el instanceof URefCard);
|
|
63
64
|
this.switch(0);
|
|
64
65
|
}
|
|
65
66
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UChartView.styles.js";
|
|
4
4
|
import { html, nothing } from "lit";
|
|
5
5
|
import { customElement, property, query, state } from "lit/decorators.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UImagesView.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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UMapView.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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UVideoView.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.
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.128.0/helpers/decorate.js";
|
|
3
3
|
import { styles } from "./UView.styles.js";
|
|
4
4
|
import { html, nothing } from "lit";
|
|
5
5
|
import { customElement, property, state } from "lit/decorators.js";
|
package/dist/types/Intents.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** 프리셋 Intent 비트 플래그 */
|
|
3
3
|
var PresetIntent = /* @__PURE__ */ function(PresetIntent) {
|
|
4
4
|
PresetIntent[PresetIntent["Questions"] = 1] = "Questions";
|
|
5
|
-
PresetIntent[PresetIntent["All"] =
|
|
5
|
+
PresetIntent[PresetIntent["All"] = PresetIntent.Questions] = "All";
|
|
6
6
|
return PresetIntent;
|
|
7
7
|
}({});
|
|
8
8
|
/** 프리셋 Intent 목록 (비트 플래그 순서대로) */
|
package/dist/types/Views.js
CHANGED
|
@@ -11,7 +11,7 @@ var PresetView = /* @__PURE__ */ function(PresetView) {
|
|
|
11
11
|
PresetView[PresetView["Video"] = 2] = "Video";
|
|
12
12
|
PresetView[PresetView["Map"] = 8] = "Map";
|
|
13
13
|
PresetView[PresetView["Chart"] = 16] = "Chart";
|
|
14
|
-
PresetView[PresetView["All"] =
|
|
14
|
+
PresetView[PresetView["All"] = PresetView.Images | PresetView.Video | PresetView.Map | PresetView.Chart] = "All";
|
|
15
15
|
return PresetView;
|
|
16
16
|
}({});
|
|
17
17
|
/**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marked 파싱 중 HTML이 GFM에 의해 오염되는 것을 방지하기 위해
|
|
3
|
+
* HTML을 주석 플레이스홀더로 치환하고, 나중에 원래 HTML로 복원하는 유틸입니다.
|
|
4
|
+
*/
|
|
5
|
+
export declare class HtmlPlaceholder {
|
|
6
|
+
private map;
|
|
7
|
+
private idx;
|
|
8
|
+
reset(): void;
|
|
9
|
+
store(html: string): string;
|
|
10
|
+
restore(html: string): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/utilities/HtmlPlaceholder.ts
|
|
2
|
+
/**
|
|
3
|
+
* Marked 파싱 중 HTML이 GFM에 의해 오염되는 것을 방지하기 위해
|
|
4
|
+
* HTML을 주석 플레이스홀더로 치환하고, 나중에 원래 HTML로 복원하는 유틸입니다.
|
|
5
|
+
*/
|
|
6
|
+
var HtmlPlaceholder = class {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.map = {};
|
|
9
|
+
this.idx = 0;
|
|
10
|
+
}
|
|
11
|
+
reset() {
|
|
12
|
+
this.map = {};
|
|
13
|
+
this.idx = 0;
|
|
14
|
+
}
|
|
15
|
+
store(html) {
|
|
16
|
+
const key = `<!--ref:${this.idx++}-->`;
|
|
17
|
+
this.map[key] = html;
|
|
18
|
+
return key;
|
|
19
|
+
}
|
|
20
|
+
restore(html) {
|
|
21
|
+
if (this.idx === 0) return html;
|
|
22
|
+
return html.replace(/<!--ref:\d+-->/g, (key) => this.map[key] ?? "");
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { HtmlPlaceholder };
|
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.5.
|
|
4
|
+
"version": "0.5.2",
|
|
5
5
|
"author": "iyulab",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"build": "eslint && vite build"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@iyulab/components": "^1.0.
|
|
44
|
+
"@iyulab/components": "^1.0.5",
|
|
45
45
|
"highlight.js": "^11.11.1",
|
|
46
46
|
"html2canvas": "^1.4.1",
|
|
47
47
|
"lit": "^3.3.2",
|
|
48
|
-
"marked": "^
|
|
49
|
-
"marked-katex-extension": "^5.1.
|
|
48
|
+
"marked": "^18.0.3",
|
|
49
|
+
"marked-katex-extension": "^5.1.8"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@lit/react": ">=1.0.8",
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@eslint/js": "^9.39.4",
|
|
69
|
-
"@types/node": "^25.
|
|
69
|
+
"@types/node": "^25.6.2",
|
|
70
70
|
"chart.js": "^4.5.1",
|
|
71
71
|
"eslint": "^9.39.4",
|
|
72
72
|
"eslint-plugin-lit": "^2.2.1",
|
|
73
73
|
"glob": "^13.0.6",
|
|
74
|
-
"globals": "^17.
|
|
75
|
-
"openai": "^6.
|
|
74
|
+
"globals": "^17.6.0",
|
|
75
|
+
"openai": "^6.37.0",
|
|
76
76
|
"typescript": "^5.9.3",
|
|
77
|
-
"typescript-eslint": "^8.
|
|
78
|
-
"vite": "^8.0.
|
|
79
|
-
"vite-plugin-dts": "^
|
|
77
|
+
"typescript-eslint": "^8.59.2",
|
|
78
|
+
"vite": "^8.0.11",
|
|
79
|
+
"vite-plugin-dts": "^5.0.0"
|
|
80
80
|
}
|
|
81
81
|
}
|