@iyulab/chat-components 0.5.0 → 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 +78 -144
- package/dist/_virtual/{_@oxc-project_runtime@0.122.0 → _@oxc-project_runtime@0.128.0}/helpers/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.122.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.d.ts +5 -0
- package/dist/components/prompt/UPrompt.js +27 -5
- 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/events/SendEvent.d.ts +15 -1
- package/dist/events/StopEvent.d.ts +11 -1
- 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 +11 -10
- 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,117 @@
|
|
|
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.2] - 2026-05-08
|
|
40
4
|
|
|
41
|
-
###
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- `AttachEvent` (`attach`) — file attach event (`detail.files: File[]`)
|
|
45
|
-
- `ChoiceEvent` (`choice`) — choice selection event (`detail.value: string`)
|
|
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.
|
|
46
8
|
|
|
47
|
-
|
|
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)
|
|
9
|
+
## [0.5.1] - 2026-04-15
|
|
53
10
|
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
11
|
+
### Added
|
|
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.
|
|
57
16
|
|
|
58
|
-
|
|
59
|
-
-
|
|
17
|
+
### Fixed
|
|
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`).
|
|
60
19
|
|
|
61
|
-
|
|
62
|
-
- `ThinkingBlockItem`: added `loading?: boolean` field
|
|
63
|
-
- `ToolBlockItem`: added `loading?: boolean` field
|
|
20
|
+
## [0.5.0] - 2026-04-01
|
|
64
21
|
|
|
65
|
-
|
|
66
|
-
- `
|
|
22
|
+
### Added
|
|
23
|
+
- `AttachEvent` (`attach`) — file attach event (`detail.files: File[]`)
|
|
24
|
+
- `ChoiceEvent` (`choice`) — choice selection event (`detail.value: string`)
|
|
25
|
+
- DOM Agent utilities (`src/utilities/dom-agent/`) — experimental LLM web automation suite: `DOMScanner`, `DOMController`, `DOMAgent`, `DOMPromptBuilder` (currently excluded from main index export)
|
|
26
|
+
- `./react` package export entry point; `@lit/react` and `react` added as optional `peerDependencies`
|
|
27
|
+
- `html2canvas` dependency for screenshot capture support
|
|
28
|
+
- `ThinkingBlockItem.loading?: boolean` and `ToolBlockItem.loading?: boolean` fields
|
|
29
|
+
- `skills/iyulab-chat-components/` — full component reference and utility documentation
|
|
67
30
|
|
|
68
31
|
### 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
|
|
32
|
+
- **Breaking:** Widget System renamed to View System: `UWidget` → `UView`, `UImagesWidget` → `UImagesView`, `UVideoWidget` → `UVideoView`, `UMapWidget` → `UMapView`, `UChartWidget` → `UChartView`; `WidgetDefinition` / `PresetWidget` → `ViewDefinition` / `PresetView`; `WidgetPromptBuilder` → `ViewPromptBuilder`
|
|
33
|
+
- **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`
|
|
34
|
+
- **Breaking:** `UCancelEvent` → `StopEvent`; `USubmitEvent` → `SendEvent`
|
|
35
|
+
- **Breaking:** `UFilesBlock` → `UFileBlock`; `FilesBlockItem` + `FileItem` → `FileBlockItem`; `FileUploadStatus` type removed — replaced by inline `status?: "idle" | "uploading" | "error"` field
|
|
36
|
+
- **Breaking:** `UToolBlock.heading` property renamed to `title`
|
|
37
|
+
- **Breaking:** `package.json` exports simplified from `./dist/*` to direct `./src/*` mapping; `chart.js` moved from `dependencies` to optional `peerDependencies`
|
|
38
|
+
- Component file structure consolidated: `.component.ts` + `.ts` split merged into single `.ts` file; registration switched to `@customElement()` decorator
|
|
39
|
+
- `UThinkBlock`: added `auto-scroll` attribute, public `scrollToBottom()` method, wheel/touch scroll interruption
|
|
40
|
+
- 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
|
|
41
|
+
- `README.md` fully rewritten; new `docs/` pages added (architecture, block system, events, intent system, view system)
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
- `UTableBlock`: inline markdown (`**bold**`, `` `code` ``, `<br>`, etc.) inside table cells now renders correctly using `Parser.parseInline()` instead of displaying as raw text
|
|
92
45
|
|
|
93
46
|
### Removed
|
|
94
47
|
- `UReportButton`, `URetryButton`, `UShareButton`
|
|
95
|
-
- `UCancelEvent`, `USubmitEvent` (
|
|
96
|
-
- `UQuestionAction` (
|
|
97
|
-
- `UWidget`, `UImagesWidget`, `UVideoWidget`, `UMapWidget`, `UChartWidget` (
|
|
98
|
-
- `ActionPromptBuilder`, `WidgetPromptBuilder` (
|
|
99
|
-
- `types/Actions.ts`, `types/Widgets.ts` (
|
|
48
|
+
- `UCancelEvent`, `USubmitEvent` (replaced by `StopEvent`, `SendEvent`)
|
|
49
|
+
- `UQuestionAction` (replaced by `UQuestionIntent`)
|
|
50
|
+
- `UWidget`, `UImagesWidget`, `UVideoWidget`, `UMapWidget`, `UChartWidget` (replaced by View equivalents)
|
|
51
|
+
- `ActionPromptBuilder`, `WidgetPromptBuilder` (replaced by `IntentPromptBuilder`, `ViewPromptBuilder`)
|
|
52
|
+
- `types/Actions.ts`, `types/Widgets.ts` (replaced by `types/Intents.ts`, `types/Views.ts`)
|
|
100
53
|
- `utilities/converters.ts` (moved to `@iyulab/components`)
|
|
101
|
-
- `TODO.md`
|
|
102
54
|
- All `.component.ts` split files
|
|
103
55
|
|
|
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`
|
|
56
|
+
## [0.4.0] - 2026-03-03
|
|
111
57
|
|
|
112
58
|
### 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
|
|
59
|
+
- Widget System: `UWidget`, `UImagesWidget`, `UVideoWidget`, `UMapWidget`, `UChartWidget`
|
|
60
|
+
- Action System: `UQuestionAction` for clickable question choices (rendered from `action-json` block)
|
|
61
|
+
- New block types: `UFilesBlock` (file attachment list), `UTableBlock` (table display)
|
|
62
|
+
- `JsonSchema` types for LLM use (`BooleanJsonSchema`, `StringJsonSchema`, `NumberJsonSchema`, `ArrayJsonSchema`, `ObjectJsonSchema`)
|
|
63
|
+
- `ActionDefinition`, `ActionSchema`, `PresetAction`, `WidgetDefinition`, `PresetWidget` types
|
|
64
|
+
- `FilesBlockItem`, `FileItem`, `MessageFit` types
|
|
65
|
+
- `ActionPromptBuilder`, `WidgetPromptBuilder` LLM prompt generation utilities
|
|
138
66
|
|
|
139
67
|
### Changed
|
|
140
|
-
- `UMessage
|
|
68
|
+
- **Breaking:** `UMessage.items` prop removed — block components must now be inserted via slots
|
|
69
|
+
- **Breaking:** `UMessage` base class changed from `BaseElement` to `UElement`; added `fit` attribute (`MessageFit`)
|
|
141
70
|
- `UMarkedBlock`: markdown rendering logic fully reworked
|
|
142
71
|
- `UPrompt`: style improvements
|
|
143
72
|
|
|
144
73
|
### Removed
|
|
145
|
-
- `UDotLoader` component
|
|
74
|
+
- `UDotLoader` component
|
|
146
75
|
|
|
147
|
-
|
|
76
|
+
## [0.3.0] - 2026-01-22
|
|
148
77
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
- Renamed `TextBlockReference` to `ReferenceCitation` and field `name` to `label`
|
|
152
|
-
- Updated `url` field in `ReferenceSource` to be optiona
|
|
153
|
-
- Added `URefBlock` component for displaying multiple reference sources
|
|
78
|
+
### Added
|
|
79
|
+
- `URefBlock` component for displaying multiple reference sources
|
|
154
80
|
- Enhanced `URefCard` and `URefTag` components with improved functionality
|
|
155
81
|
|
|
156
|
-
|
|
82
|
+
### Changed
|
|
83
|
+
- `TextBlockReference` renamed to `ReferenceCitation`; field `name` renamed to `label`
|
|
84
|
+
- `url` field in `ReferenceSource` changed to optional
|
|
85
|
+
|
|
86
|
+
## [0.2.0] - 2026-01-16
|
|
157
87
|
|
|
158
88
|
### Added
|
|
159
|
-
-
|
|
160
|
-
- Reference components: `URefCard`, `URefCardGroup`, `URefTag`
|
|
161
|
-
-
|
|
162
|
-
- `UCancelEvent`
|
|
89
|
+
- `UPrompt`, `UDotLoader` components for enhanced chat UI
|
|
90
|
+
- Reference components: `URefCard`, `URefCardGroup`, `URefTag`
|
|
91
|
+
- Button components: `UReportButton`, `URetryButton`, `UShareButton`, `UVoteButton`
|
|
92
|
+
- `UCancelEvent` replacing `UStopEvent`
|
|
163
93
|
- Type definitions: `BlockItem`, `BlockReference`, `JsonNode`
|
|
164
94
|
- Utility converters for data transformation
|
|
165
|
-
- Test utilities: generator.ts
|
|
95
|
+
- Test utilities: `generator.ts`, `messages.ts`
|
|
166
96
|
|
|
167
97
|
### Changed
|
|
168
|
-
-
|
|
98
|
+
- `UJsonViewer` renamed to `UJsonBlock`
|
|
169
99
|
- Enhanced styling and functionality across multiple block components
|
|
170
|
-
- Updated
|
|
171
|
-
- Improved UMessage component structure and styling
|
|
100
|
+
- Updated `UAttachButton` and `UCopyButton` styling and behavior
|
|
101
|
+
- Improved `UMessage` component structure and styling
|
|
172
102
|
|
|
173
103
|
### Removed
|
|
174
|
-
-
|
|
175
|
-
- UStopEvent (replaced by UCancelEvent)
|
|
176
|
-
- UMessage.types.ts (types moved to dedicated types directory)
|
|
177
|
-
- Internal date-helpers utility
|
|
104
|
+
- `USendButton`, `UThinkButton`
|
|
105
|
+
- `UStopEvent` (replaced by `UCancelEvent`)
|
|
106
|
+
- `UMessage.types.ts` (types moved to dedicated types directory)
|
|
107
|
+
- Internal `date-helpers` utility
|
|
178
108
|
|
|
179
|
-
## 0.1.1
|
|
180
|
-
- Update package.json exports field with correct paths
|
|
109
|
+
## [0.1.1] - 2025-12-19
|
|
181
110
|
|
|
182
|
-
|
|
183
|
-
-
|
|
111
|
+
### Fixed
|
|
112
|
+
- Fixed `package.json` exports field with correct paths
|
|
113
|
+
|
|
114
|
+
## [0.1.0] - 2025-12-19
|
|
115
|
+
|
|
116
|
+
### Added
|
|
117
|
+
- Initial release
|
|
@@ -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";
|
|
@@ -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.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";
|
|
@@ -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();
|
|
@@ -98,7 +119,8 @@ var UPrompt = class UPrompt extends UElement {
|
|
|
98
119
|
}
|
|
99
120
|
handleTextBlockInput(e) {
|
|
100
121
|
e.preventDefault();
|
|
101
|
-
|
|
122
|
+
const target = e.target;
|
|
123
|
+
this.value = target.value;
|
|
102
124
|
}
|
|
103
125
|
handleTextBlockKeydown(e) {
|
|
104
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";
|