@iyulab/chat-components 0.5.0 → 0.5.1
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 +73 -145
- package/dist/_virtual/{_@oxc-project_runtime@0.122.0 → _@oxc-project_runtime@0.124.0}/helpers/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.122.0 → _@oxc-project_runtime@0.124.0}/helpers/decorateMetadata.js +1 -1
- package/dist/components/blocks/UCodeBlock.js +2 -2
- package/dist/components/blocks/UFileBlock.js +2 -2
- package/dist/components/blocks/UJsonBlock.js +2 -2
- package/dist/components/blocks/UMarkedBlock.js +2 -2
- package/dist/components/blocks/URefBlock.js +2 -2
- package/dist/components/blocks/UTableBlock.js +2 -2
- 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.d.ts +5 -0
- package/dist/components/prompt/UPrompt.js +25 -4
- package/dist/components/references/URefCard.js +2 -2
- package/dist/components/references/URefCardGroup.js +2 -2
- 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/events/SendEvent.d.ts +15 -1
- package/dist/events/StopEvent.d.ts +11 -1
- package/package.json +4 -3
- package/skills/iyulab-chat-components/SKILL.md +107 -0
- package/skills/iyulab-chat-components/references/components/attach-button.md +69 -0
- package/skills/iyulab-chat-components/references/components/chart-view.md +65 -0
- package/skills/iyulab-chat-components/references/components/code-block.md +42 -0
- package/skills/iyulab-chat-components/references/components/copy-button.md +46 -0
- package/skills/iyulab-chat-components/references/components/file-block.md +64 -0
- package/skills/iyulab-chat-components/references/components/images-view.md +63 -0
- package/skills/iyulab-chat-components/references/components/json-block.md +41 -0
- package/skills/iyulab-chat-components/references/components/map-view.md +54 -0
- package/skills/iyulab-chat-components/references/components/marked-block.md +53 -0
- package/skills/iyulab-chat-components/references/components/message.md +60 -0
- package/skills/iyulab-chat-components/references/components/prompt.md +102 -0
- package/skills/iyulab-chat-components/references/components/question-intent.md +75 -0
- package/skills/iyulab-chat-components/references/components/ref-block.md +45 -0
- package/skills/iyulab-chat-components/references/components/ref-card-group.md +41 -0
- package/skills/iyulab-chat-components/references/components/ref-card.md +48 -0
- package/skills/iyulab-chat-components/references/components/ref-tag.md +40 -0
- package/skills/iyulab-chat-components/references/components/table-block.md +63 -0
- package/skills/iyulab-chat-components/references/components/text-block.md +59 -0
- package/skills/iyulab-chat-components/references/components/think-block.md +48 -0
- package/skills/iyulab-chat-components/references/components/tool-block.md +57 -0
- package/skills/iyulab-chat-components/references/components/video-view.md +55 -0
- package/skills/iyulab-chat-components/references/components/view.md +51 -0
- package/skills/iyulab-chat-components/references/components/vote-button.md +60 -0
- package/skills/iyulab-chat-components/references/types.md +115 -0
- package/skills/iyulab-chat-components/references/usage.md +254 -0
- package/skills/iyulab-chat-components/references/utilities/intent-prompt-builder.md +123 -0
- package/skills/iyulab-chat-components/references/utilities/view-prompt-builder.md +112 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,183 +1,111 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.5.
|
|
4
|
-
|
|
5
|
-
### Breaking Changes
|
|
6
|
-
|
|
7
|
-
#### Full rename: Widget → View, Action → Intent
|
|
8
|
-
- **Widget System → View System**: All widget components renamed to views
|
|
9
|
-
- `UImagesWidget` → `UImagesView`
|
|
10
|
-
- `UVideoWidget` → `UVideoView`
|
|
11
|
-
- `UMapWidget` → `UMapView`
|
|
12
|
-
- `UChartWidget` → `UChartView`
|
|
13
|
-
- `UWidget` → `UView`
|
|
14
|
-
- `types/Widgets.ts` → `types/Views.ts` (`WidgetDefinition`, `PresetWidget` → `ViewDefinition`, `PresetView`)
|
|
15
|
-
- `WidgetPromptBuilder` → `ViewPromptBuilder`
|
|
16
|
-
- **Action System → Intent System**
|
|
17
|
-
- `UQuestionAction` → `UQuestionIntent`
|
|
18
|
-
- `types/Actions.ts` → `types/Intents.ts` (`ActionDefinition` → `IntentDefinition`)
|
|
19
|
-
- `ActionPromptBuilder` → `IntentPromptBuilder`
|
|
20
|
-
|
|
21
|
-
#### Event type renames
|
|
22
|
-
- `UCancelEvent` → `StopEvent`
|
|
23
|
-
- `USubmitEvent` → `SendEvent`
|
|
24
|
-
- Importing the old names will cause compile errors
|
|
25
|
-
|
|
26
|
-
#### Block rename
|
|
27
|
-
- `UFilesBlock` → `UFileBlock` (plural → singular)
|
|
28
|
-
- `FilesBlockItem` + `FileItem` → `FileBlockItem` (simplified structure)
|
|
29
|
-
- `FileUploadStatus` type removed — replaced by `status?: "idle" | "uploading" | "error"` field
|
|
30
|
-
|
|
31
|
-
#### Removed components
|
|
32
|
-
- `UReportButton`, `URetryButton`, `UShareButton` removed
|
|
33
|
-
|
|
34
|
-
#### `UToolBlock` property rename
|
|
35
|
-
- `heading` → `title`
|
|
36
|
-
|
|
37
|
-
#### `package.json` exports change
|
|
38
|
-
- `./dist/*` mapping simplified to a direct `./src/*` mapping
|
|
39
|
-
- `chart.js` moved from `dependencies` to optional `peerDependencies`
|
|
3
|
+
## [0.5.1] - 2026-04-15
|
|
40
4
|
|
|
41
5
|
### Added
|
|
6
|
+
- `UPrompt`: 0.4.x 호환을 위해 `u-submit`/`u-cancel` legacy 이벤트가 `send`/`stop`과 **동시에** 발사됩니다. 0.6.0에서 제거 예정 (`@deprecated`).
|
|
7
|
+
- `SendEventDetail`을 `{ value: string; files?: FileBlockItem[] }`로 타입 구체화. `UPrompt.submit()`이 detail에 실제 값을 채워 발행합니다.
|
|
8
|
+
- `StopEventDetail`을 interface로 정의 (현재 빈 객체, 향후 확장 대비).
|
|
9
|
+
- `MIGRATION.md` 추가: 0.4.x → 0.5.x 전환 가이드 및 Breaking Change 정책 문서화.
|
|
42
10
|
|
|
43
|
-
|
|
44
|
-
- `
|
|
45
|
-
- `ChoiceEvent` (`choice`) — choice selection event (`detail.value: string`)
|
|
46
|
-
|
|
47
|
-
#### DOM Agent utilities (`src/utilities/dom-agent/`) — Experimental
|
|
48
|
-
A utility suite enabling LLMs to autonomously interact with web pages (currently disabled in the main index export)
|
|
49
|
-
- `DOMScanner` — scans the DOM and extracts interactive elements (includes Shadow DOM, supports filter strategies)
|
|
50
|
-
- `DOMController` — executes LLM commands (`click`, `input`, `select`, `scroll`, etc.) against the live DOM
|
|
51
|
-
- `DOMAgent` — orchestrates Scanner and Controller into an automation agent (event-driven, execution history)
|
|
52
|
-
- `DOMPromptBuilder` — builds LLM prompts and formats multimodal messages (Anthropic / OpenAI)
|
|
53
|
-
|
|
54
|
-
#### React bindings
|
|
55
|
-
- Added `./react` package export entry point
|
|
56
|
-
- `@lit/react` and `react` added as optional peerDependencies
|
|
11
|
+
### Fixed
|
|
12
|
+
- 0.5.0에서 DOM 이벤트 문자열 (`u-submit`/`u-cancel` → `send`/`stop`)이 CHANGELOG에 타입 rename (`USubmitEvent` → `SendEvent`)으로만 표기되어 vanilla DOM 소비자가 silent failure로 깨지던 문제를 alias 도입으로 완화.
|
|
57
13
|
|
|
58
|
-
|
|
59
|
-
- Added `html2canvas` for screenshot capture support
|
|
14
|
+
## [0.5.0] - 2026-04-01
|
|
60
15
|
|
|
61
|
-
|
|
62
|
-
- `
|
|
63
|
-
- `
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- `
|
|
16
|
+
### Added
|
|
17
|
+
- `AttachEvent` (`attach`) — file attach event (`detail.files: File[]`)
|
|
18
|
+
- `ChoiceEvent` (`choice`) — choice selection event (`detail.value: string`)
|
|
19
|
+
- DOM Agent utilities (`src/utilities/dom-agent/`) — experimental LLM web automation suite: `DOMScanner`, `DOMController`, `DOMAgent`, `DOMPromptBuilder` (currently excluded from main index export)
|
|
20
|
+
- `./react` package export entry point; `@lit/react` and `react` added as optional `peerDependencies`
|
|
21
|
+
- `html2canvas` dependency for screenshot capture support
|
|
22
|
+
- `ThinkingBlockItem.loading?: boolean` and `ToolBlockItem.loading?: boolean` fields
|
|
23
|
+
- `skills/iyulab-chat-components/` — full component reference and utility documentation
|
|
67
24
|
|
|
68
25
|
### Changed
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
#### Dependency updates
|
|
83
|
-
- `@iyulab/components`: `^0.4.0` → `^1.0.1`
|
|
84
|
-
- `marked`: `^17.0.3` → `^17.0.5`
|
|
85
|
-
- `vite`: `^7.3.1` → `^8.0.3`
|
|
86
|
-
- `openai` (dev): `^6.25.0` → `^6.33.0`
|
|
87
|
-
|
|
88
|
-
#### Documentation overhaul
|
|
89
|
-
- `README.md` fully rewritten with detailed API documentation
|
|
90
|
-
- New `docs/` pages: architecture, block system, events, intent system, view system
|
|
91
|
-
- Old `docs/components/` files removed
|
|
26
|
+
- **Breaking:** Widget System renamed to View System: `UWidget` → `UView`, `UImagesWidget` → `UImagesView`, `UVideoWidget` → `UVideoView`, `UMapWidget` → `UMapView`, `UChartWidget` → `UChartView`; `WidgetDefinition` / `PresetWidget` → `ViewDefinition` / `PresetView`; `WidgetPromptBuilder` → `ViewPromptBuilder`
|
|
27
|
+
- **Breaking:** Action System renamed to Intent System: `UQuestionAction` → `UQuestionIntent`; `ActionDefinition` → `IntentDefinition`; `ActionPromptBuilder` → `IntentPromptBuilder`; `types/Actions.ts` → `types/Intents.ts`; `types/Widgets.ts` → `types/Views.ts`
|
|
28
|
+
- **Breaking:** `UCancelEvent` → `StopEvent`; `USubmitEvent` → `SendEvent`
|
|
29
|
+
- **Breaking:** `UFilesBlock` → `UFileBlock`; `FilesBlockItem` + `FileItem` → `FileBlockItem`; `FileUploadStatus` type removed — replaced by inline `status?: "idle" | "uploading" | "error"` field
|
|
30
|
+
- **Breaking:** `UToolBlock.heading` property renamed to `title`
|
|
31
|
+
- **Breaking:** `package.json` exports simplified from `./dist/*` to direct `./src/*` mapping; `chart.js` moved from `dependencies` to optional `peerDependencies`
|
|
32
|
+
- Component file structure consolidated: `.component.ts` + `.ts` split merged into single `.ts` file; registration switched to `@customElement()` decorator
|
|
33
|
+
- `UThinkBlock`: added `auto-scroll` attribute, public `scrollToBottom()` method, wheel/touch scroll interruption
|
|
34
|
+
- Updated dependencies: `@iyulab/components` ^0.4.0 → ^1.0.1, `marked` ^17.0.3 → ^17.0.5, `vite` ^7.3.1 → ^8.0.3, `openai` (dev) ^6.25.0 → ^6.33.0
|
|
35
|
+
- `README.md` fully rewritten; new `docs/` pages added (architecture, block system, events, intent system, view system)
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
- `UTableBlock`: inline markdown (`**bold**`, `` `code` ``, `<br>`, etc.) inside table cells now renders correctly using `Parser.parseInline()` instead of displaying as raw text
|
|
92
39
|
|
|
93
40
|
### Removed
|
|
94
41
|
- `UReportButton`, `URetryButton`, `UShareButton`
|
|
95
|
-
- `UCancelEvent`, `USubmitEvent` (
|
|
96
|
-
- `UQuestionAction` (
|
|
97
|
-
- `UWidget`, `UImagesWidget`, `UVideoWidget`, `UMapWidget`, `UChartWidget` (
|
|
98
|
-
- `ActionPromptBuilder`, `WidgetPromptBuilder` (
|
|
99
|
-
- `types/Actions.ts`, `types/Widgets.ts` (
|
|
42
|
+
- `UCancelEvent`, `USubmitEvent` (replaced by `StopEvent`, `SendEvent`)
|
|
43
|
+
- `UQuestionAction` (replaced by `UQuestionIntent`)
|
|
44
|
+
- `UWidget`, `UImagesWidget`, `UVideoWidget`, `UMapWidget`, `UChartWidget` (replaced by View equivalents)
|
|
45
|
+
- `ActionPromptBuilder`, `WidgetPromptBuilder` (replaced by `IntentPromptBuilder`, `ViewPromptBuilder`)
|
|
46
|
+
- `types/Actions.ts`, `types/Widgets.ts` (replaced by `types/Intents.ts`, `types/Views.ts`)
|
|
100
47
|
- `utilities/converters.ts` (moved to `@iyulab/components`)
|
|
101
|
-
- `TODO.md`
|
|
102
48
|
- All `.component.ts` split files
|
|
103
49
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
## 0.4.0 (2026-03-03)
|
|
107
|
-
|
|
108
|
-
### Breaking Changes
|
|
109
|
-
- `UMessage`: `items` prop removed — block components must now be inserted directly via slots
|
|
110
|
-
- `UMessage`: base class changed from `BaseElement` to `UElement`
|
|
50
|
+
## [0.4.0] - 2026-03-03
|
|
111
51
|
|
|
112
52
|
### Added
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
- `
|
|
117
|
-
- `
|
|
118
|
-
- `
|
|
119
|
-
- `
|
|
120
|
-
|
|
121
|
-
#### Action System
|
|
122
|
-
- `UQuestionAction` — clickable question choices component (rendered from `action-json` block)
|
|
123
|
-
|
|
124
|
-
#### New Block Types
|
|
125
|
-
- `UFilesBlock` — file attachment list block (filename, size, MIME type, download URL, optional delete button)
|
|
126
|
-
- `UTableBlock` — table display block
|
|
127
|
-
|
|
128
|
-
#### New Types
|
|
129
|
-
- `JsonSchema` — JSON Schema types for LLM use (`BooleanJsonSchema`, `StringJsonSchema`, `NumberJsonSchema`, `ArrayJsonSchema`, `ObjectJsonSchema`)
|
|
130
|
-
- `ActionDefinition`, `ActionSchema`, `PresetAction` — action definition and preset types
|
|
131
|
-
- `WidgetDefinition`, `PresetWidget` — widget definition and preset types (`Images`, `Video`, `Map`, `Chart`)
|
|
132
|
-
- `FilesBlockItem`, `FileItem` — file block types
|
|
133
|
-
- `MessageFit` — message width setting type (`full` | `auto`)
|
|
134
|
-
|
|
135
|
-
#### New Utilities
|
|
136
|
-
- `ActionPromptBuilder` — utility for auto-generating LLM action prompts
|
|
137
|
-
- `WidgetPromptBuilder` — utility for auto-generating LLM widget prompts
|
|
53
|
+
- Widget System: `UWidget`, `UImagesWidget`, `UVideoWidget`, `UMapWidget`, `UChartWidget`
|
|
54
|
+
- Action System: `UQuestionAction` for clickable question choices (rendered from `action-json` block)
|
|
55
|
+
- New block types: `UFilesBlock` (file attachment list), `UTableBlock` (table display)
|
|
56
|
+
- `JsonSchema` types for LLM use (`BooleanJsonSchema`, `StringJsonSchema`, `NumberJsonSchema`, `ArrayJsonSchema`, `ObjectJsonSchema`)
|
|
57
|
+
- `ActionDefinition`, `ActionSchema`, `PresetAction`, `WidgetDefinition`, `PresetWidget` types
|
|
58
|
+
- `FilesBlockItem`, `FileItem`, `MessageFit` types
|
|
59
|
+
- `ActionPromptBuilder`, `WidgetPromptBuilder` LLM prompt generation utilities
|
|
138
60
|
|
|
139
61
|
### Changed
|
|
140
|
-
- `UMessage
|
|
62
|
+
- **Breaking:** `UMessage.items` prop removed — block components must now be inserted via slots
|
|
63
|
+
- **Breaking:** `UMessage` base class changed from `BaseElement` to `UElement`; added `fit` attribute (`MessageFit`)
|
|
141
64
|
- `UMarkedBlock`: markdown rendering logic fully reworked
|
|
142
65
|
- `UPrompt`: style improvements
|
|
143
66
|
|
|
144
67
|
### Removed
|
|
145
|
-
- `UDotLoader` component
|
|
146
|
-
|
|
147
|
-
---
|
|
68
|
+
- `UDotLoader` component
|
|
148
69
|
|
|
149
|
-
## 0.3.0
|
|
70
|
+
## [0.3.0] - 2026-01-22
|
|
150
71
|
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
- Added `URefBlock` component for displaying multiple reference sources
|
|
72
|
+
### Added
|
|
73
|
+
- `URefBlock` component for displaying multiple reference sources
|
|
154
74
|
- Enhanced `URefCard` and `URefTag` components with improved functionality
|
|
155
75
|
|
|
156
|
-
|
|
76
|
+
### Changed
|
|
77
|
+
- `TextBlockReference` renamed to `ReferenceCitation`; field `name` renamed to `label`
|
|
78
|
+
- `url` field in `ReferenceSource` changed to optional
|
|
79
|
+
|
|
80
|
+
## [0.2.0] - 2026-01-16
|
|
157
81
|
|
|
158
82
|
### Added
|
|
159
|
-
-
|
|
160
|
-
- Reference components: `URefCard`, `URefCardGroup`, `URefTag`
|
|
161
|
-
-
|
|
162
|
-
- `UCancelEvent`
|
|
83
|
+
- `UPrompt`, `UDotLoader` components for enhanced chat UI
|
|
84
|
+
- Reference components: `URefCard`, `URefCardGroup`, `URefTag`
|
|
85
|
+
- Button components: `UReportButton`, `URetryButton`, `UShareButton`, `UVoteButton`
|
|
86
|
+
- `UCancelEvent` replacing `UStopEvent`
|
|
163
87
|
- Type definitions: `BlockItem`, `BlockReference`, `JsonNode`
|
|
164
88
|
- Utility converters for data transformation
|
|
165
|
-
- Test utilities: generator.ts
|
|
89
|
+
- Test utilities: `generator.ts`, `messages.ts`
|
|
166
90
|
|
|
167
91
|
### Changed
|
|
168
|
-
-
|
|
92
|
+
- `UJsonViewer` renamed to `UJsonBlock`
|
|
169
93
|
- Enhanced styling and functionality across multiple block components
|
|
170
|
-
- Updated
|
|
171
|
-
- Improved UMessage component structure and styling
|
|
94
|
+
- Updated `UAttachButton` and `UCopyButton` styling and behavior
|
|
95
|
+
- Improved `UMessage` component structure and styling
|
|
172
96
|
|
|
173
97
|
### Removed
|
|
174
|
-
-
|
|
175
|
-
- UStopEvent (replaced by UCancelEvent)
|
|
176
|
-
- UMessage.types.ts (types moved to dedicated types directory)
|
|
177
|
-
- Internal date-helpers utility
|
|
98
|
+
- `USendButton`, `UThinkButton`
|
|
99
|
+
- `UStopEvent` (replaced by `UCancelEvent`)
|
|
100
|
+
- `UMessage.types.ts` (types moved to dedicated types directory)
|
|
101
|
+
- Internal `date-helpers` utility
|
|
178
102
|
|
|
179
|
-
## 0.1.1
|
|
180
|
-
- Update package.json exports field with correct paths
|
|
103
|
+
## [0.1.1] - 2025-12-19
|
|
181
104
|
|
|
182
|
-
|
|
183
|
-
-
|
|
105
|
+
### Fixed
|
|
106
|
+
- Fixed `package.json` exports field with correct paths
|
|
107
|
+
|
|
108
|
+
## [0.1.0] - 2025-12-19
|
|
109
|
+
|
|
110
|
+
### Added
|
|
111
|
+
- Initial release
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.124.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.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
|
|
3
3
|
import "../buttons/UCopyButton.js";
|
|
4
4
|
import { styles } from "./UCodeBlock.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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,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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
|
|
3
3
|
import "./UCodeBlock.js";
|
|
4
4
|
import "../references/URefTag.js";
|
|
5
5
|
import { URefCard } from "../references/URefCard.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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";
|
|
@@ -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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
3
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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";
|
|
@@ -25,6 +25,11 @@ export declare class UPrompt extends UElement {
|
|
|
25
25
|
* 텍스트 또는 첨부 파일이 없는 경우에는 아무런 동작도 하지 않습니다.
|
|
26
26
|
*/
|
|
27
27
|
submit(): void;
|
|
28
|
+
/**
|
|
29
|
+
* 0.4.x 호환을 위한 legacy 이벤트를 함께 발행합니다.
|
|
30
|
+
* `u-submit`/`u-cancel`은 0.6.0에서 제거 예정.
|
|
31
|
+
*/
|
|
32
|
+
private dispatchLegacy;
|
|
28
33
|
private handleRemoveFile;
|
|
29
34
|
private handleTextBlockInput;
|
|
30
35
|
private handleTextBlockKeydown;
|
|
@@ -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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
|
|
3
3
|
import "../blocks/UFileBlock.js";
|
|
4
4
|
import { styles } from "./UPrompt.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -81,12 +81,33 @@ var UPrompt = class UPrompt extends UElement {
|
|
|
81
81
|
*/
|
|
82
82
|
submit() {
|
|
83
83
|
if (this.loading) {
|
|
84
|
-
|
|
84
|
+
const stopDetail = {};
|
|
85
|
+
this.fire("stop", { detail: stopDetail });
|
|
86
|
+
this.dispatchLegacy("u-cancel", stopDetail);
|
|
85
87
|
return;
|
|
86
88
|
}
|
|
87
89
|
const hasValue = this.value && this.value.trim() !== "";
|
|
88
90
|
const hasFiles = this.files && this.files.length > 0;
|
|
89
|
-
if (hasValue || hasFiles)
|
|
91
|
+
if (hasValue || hasFiles) {
|
|
92
|
+
const sendDetail = {
|
|
93
|
+
value: this.value?.trim() ?? "",
|
|
94
|
+
files: this.files ? [...this.files] : void 0
|
|
95
|
+
};
|
|
96
|
+
this.fire("send", { detail: sendDetail });
|
|
97
|
+
this.dispatchLegacy("u-submit", sendDetail);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* 0.4.x 호환을 위한 legacy 이벤트를 함께 발행합니다.
|
|
102
|
+
* `u-submit`/`u-cancel`은 0.6.0에서 제거 예정.
|
|
103
|
+
*/
|
|
104
|
+
dispatchLegacy(name, detail) {
|
|
105
|
+
this.dispatchEvent(new CustomEvent(name, {
|
|
106
|
+
bubbles: true,
|
|
107
|
+
composed: true,
|
|
108
|
+
cancelable: true,
|
|
109
|
+
detail
|
|
110
|
+
}));
|
|
90
111
|
}
|
|
91
112
|
handleRemoveFile(e) {
|
|
92
113
|
e.stopPropagation();
|
|
@@ -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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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";
|
|
@@ -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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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.124.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.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";
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { FileBlockItem } from '../types/BlockItem.js';
|
|
2
|
+
/**
|
|
3
|
+
* `send` 이벤트의 detail 페이로드.
|
|
4
|
+
* - `value`: 사용자가 입력한 텍스트 (trim된 원본, 빈 문자열일 수 있음)
|
|
5
|
+
* - `files`: 첨부된 파일 목록 (있는 경우)
|
|
6
|
+
*/
|
|
7
|
+
export interface SendEventDetail {
|
|
8
|
+
value: string;
|
|
9
|
+
files?: FileBlockItem[];
|
|
10
|
+
}
|
|
2
11
|
export type SendEvent = CustomEvent<SendEventDetail>;
|
|
3
12
|
declare global {
|
|
4
13
|
interface HTMLElementEventMap {
|
|
5
14
|
'send': SendEvent;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated 0.5.1부터 `send`와 동시에 발생합니다. 0.6.0에서 제거 예정.
|
|
17
|
+
* 새 코드는 `send`를 사용하세요.
|
|
18
|
+
*/
|
|
19
|
+
'u-submit': SendEvent;
|
|
6
20
|
}
|
|
7
21
|
}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `stop` 이벤트의 detail 페이로드.
|
|
3
|
+
* 현재는 추가 컨텍스트가 없으므로 빈 객체이며, 향후 확장 대비 interface로 유지.
|
|
4
|
+
*/
|
|
5
|
+
export interface StopEventDetail {
|
|
6
|
+
}
|
|
2
7
|
export type StopEvent = CustomEvent<StopEventDetail>;
|
|
3
8
|
declare global {
|
|
4
9
|
interface HTMLElementEventMap {
|
|
5
10
|
'stop': StopEvent;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated 0.5.1부터 `stop`과 동시에 발생합니다. 0.6.0에서 제거 예정.
|
|
13
|
+
* 새 코드는 `stop`를 사용하세요.
|
|
14
|
+
*/
|
|
15
|
+
'u-cancel': StopEvent;
|
|
6
16
|
}
|
|
7
17
|
}
|
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.1",
|
|
5
5
|
"author": "iyulab",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
21
|
+
"skills",
|
|
21
22
|
"package.json",
|
|
22
23
|
"README.md",
|
|
23
24
|
"CHANGELOG.md",
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"build": "eslint && vite build"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@iyulab/components": "^1.0.
|
|
44
|
+
"@iyulab/components": "^1.0.3",
|
|
44
45
|
"highlight.js": "^11.11.1",
|
|
45
46
|
"html2canvas": "^1.4.1",
|
|
46
47
|
"lit": "^3.3.2",
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
"globals": "^17.4.0",
|
|
74
75
|
"openai": "^6.33.0",
|
|
75
76
|
"typescript": "^5.9.3",
|
|
76
|
-
"typescript-eslint": "^8.
|
|
77
|
+
"typescript-eslint": "^8.58.0",
|
|
77
78
|
"vite": "^8.0.3",
|
|
78
79
|
"vite-plugin-dts": "^4.5.4"
|
|
79
80
|
}
|