@iyulab/chat-components 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/README.md +15 -39
- package/dist/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.138.0/helpers/esm}/decorate.js +2 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.138.0/helpers/esm}/decorateMetadata.js +2 -2
- package/dist/_virtual/_glob-assets_raw/alert-triangle-fill.svg.4cfc4305.js +4 -0
- package/dist/_virtual/_glob-assets_raw/arrows-sort.svg.dda43a85.js +4 -0
- package/dist/_virtual/_glob-assets_raw/code.svg.c69bc144.js +4 -0
- package/dist/_virtual/_glob-assets_raw/download.svg.bce82177.js +4 -0
- package/dist/_virtual/_glob-assets_raw/element-prompt.md.7047ffcc.js +4 -0
- package/dist/_virtual/_glob-assets_raw/external-link.svg.a9f7f02d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-code.svg.0e706f93.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-music.svg.b9970203.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-spreadsheet.svg.8c03bdfa.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-text.svg.85bdd923.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-type-pdf.svg.bc12db6d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-zip.svg.76dde660.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file.svg.28f5d6f1.js +4 -0
- package/dist/_virtual/_glob-assets_raw/photo.svg.cc273cc1.js +4 -0
- package/dist/_virtual/_glob-assets_raw/player-stop-fill.svg.5378b752.js +4 -0
- package/dist/_virtual/_glob-assets_raw/send.svg.02326253.js +4 -0
- package/dist/_virtual/_glob-assets_raw/sort-ascending-letters.svg.14a3df67.js +4 -0
- package/dist/_virtual/_glob-assets_raw/sort-descending-letters.svg.3e03647c.js +4 -0
- package/dist/_virtual/_glob-assets_raw/video.svg.c183f03c.js +4 -0
- package/dist/_virtual/_glob-assets_raw/world.svg.cd9903c8.js +4 -0
- package/dist/components/UDataElement.d.ts +44 -0
- package/dist/components/UDataElement.js +76 -0
- package/dist/components/blocks/UCodeBlock.d.ts +0 -4
- package/dist/components/blocks/UCodeBlock.js +6 -12
- package/dist/components/{views/UView.d.ts → blocks/UElementBlock.d.ts} +18 -8
- package/dist/components/{views/UView.js → blocks/UElementBlock.js} +31 -21
- package/dist/components/{views/UView.styles.js → blocks/UElementBlock.styles.js} +1 -1
- package/dist/components/blocks/UFileBlock.d.ts +15 -5
- package/dist/components/blocks/UFileBlock.js +81 -68
- package/dist/components/blocks/UFileBlock.styles.js +86 -29
- package/dist/components/blocks/UMarkedBlock.d.ts +3 -1
- package/dist/components/blocks/UMarkedBlock.js +23 -18
- package/dist/components/blocks/URefBlock.js +2 -2
- package/dist/components/blocks/UTableBlock.d.ts +2 -2
- package/dist/components/blocks/UTableBlock.js +9 -8
- package/dist/components/blocks/UTableBlock.styles.js +1 -1
- package/dist/components/blocks/UTextBlock.d.ts +2 -0
- package/dist/components/blocks/UTextBlock.js +4 -5
- package/dist/components/message/UMessage.js +2 -2
- package/dist/components/prompt/UPrompt.d.ts +0 -5
- package/dist/components/prompt/UPrompt.js +18 -27
- package/dist/components/prompt/UPrompt.styles.js +9 -10
- package/dist/components/references/URefCard.d.ts +2 -2
- package/dist/components/references/URefCard.js +8 -7
- package/dist/components/references/URefCardGroup.js +2 -2
- package/dist/components/references/URefTag.js +5 -4
- package/dist/{components/views/UChartView.d.ts → components-extra/UChartBlock.d.ts} +4 -4
- package/dist/{components/views/UChartView.js → components-extra/UChartBlock.js} +22 -34
- package/dist/components-extra/UChartBlock.schema.d.ts +3 -0
- package/dist/components-extra/UChartBlock.schema.js +34 -0
- package/dist/{components/views/UChartView.styles.js → components-extra/UChartBlock.styles.js} +1 -1
- package/dist/{components/views/UImagesView.d.ts → components-extra/UImagesBlock.d.ts} +4 -4
- package/dist/{components/views/UImagesView.js → components-extra/UImagesBlock.js} +15 -15
- package/dist/components-extra/UImagesBlock.schema.d.ts +3 -0
- package/dist/components-extra/UImagesBlock.schema.js +31 -0
- package/dist/{components/views/UImagesView.styles.js → components-extra/UImagesBlock.styles.js} +5 -5
- package/dist/{components/views/UMapView.d.ts → components-extra/UMapBlock.d.ts} +4 -4
- package/dist/{components/views/UMapView.js → components-extra/UMapBlock.js} +18 -18
- package/dist/components-extra/UMapBlock.schema.d.ts +3 -0
- package/dist/components-extra/UMapBlock.schema.js +33 -0
- package/dist/{components/views/UMapView.styles.js → components-extra/UMapBlock.styles.js} +1 -1
- package/dist/{components/views/UVideoView.d.ts → components-extra/UVideoBlock.d.ts} +4 -4
- package/dist/{components/views/UVideoView.js → components-extra/UVideoBlock.js} +10 -10
- package/dist/components-extra/UVideoBlock.schema.d.ts +3 -0
- package/dist/components-extra/UVideoBlock.schema.js +28 -0
- package/dist/{components/views/UVideoView.styles.js → components-extra/UVideoBlock.styles.js} +1 -1
- package/dist/events/SendEvent.d.ts +0 -5
- package/dist/events/StopEvent.d.ts +0 -5
- package/dist/extra.d.ts +6 -0
- package/dist/extra.js +14 -0
- package/dist/index.d.ts +5 -17
- package/dist/index.js +6 -16
- package/dist/react/UCodeBlock.js +2 -2
- package/dist/react/UElementBlock.d.ts +9 -0
- package/dist/react/UElementBlock.js +10 -0
- package/dist/react/UFileBlock.js +2 -2
- package/dist/react/UImagesBlock.d.ts +9 -0
- package/dist/react/UImagesBlock.js +10 -0
- package/dist/react/UMapBlock.d.ts +9 -0
- package/dist/react/UMapBlock.js +10 -0
- package/dist/react/UMarkedBlock.js +2 -2
- package/dist/react/UMessage.js +2 -2
- package/dist/react/UPrompt.js +2 -2
- package/dist/react/URefBlock.js +2 -2
- package/dist/react/URefCard.js +2 -2
- package/dist/react/URefCardGroup.js +2 -2
- package/dist/react/URefTag.js +2 -2
- package/dist/react/UTableBlock.js +2 -2
- package/dist/react/UTextBlock.d.ts +1 -0
- package/dist/react/UTextBlock.js +5 -3
- package/dist/react/UVideoBlock.d.ts +9 -0
- package/dist/react/UVideoBlock.js +10 -0
- package/dist/react/index.d.ts +4 -11
- package/dist/react/index.js +4 -11
- package/dist/types/BlockItem.d.ts +1 -24
- package/dist/types/{JsonSchema.d.ts → Schema.d.ts} +13 -0
- package/dist/utilities/HtmlBuilder.d.ts +28 -0
- package/dist/utilities/HtmlBuilder.js +41 -0
- package/dist/utilities/PromptBuilder.d.ts +21 -0
- package/dist/utilities/PromptBuilder.js +60 -0
- package/dist/utilities/icons.d.ts +1 -0
- package/dist/utilities/icons.js +52 -0
- package/dist/utilities/sanitizers.d.ts +35 -0
- package/dist/utilities/sanitizers.js +75 -0
- package/package.json +13 -18
- package/skills/iyulab-chat-components/SKILL.md +18 -33
- package/skills/iyulab-chat-components/references/components/{chart-view.md → chart-block.md} +16 -12
- package/skills/iyulab-chat-components/references/components/code-block.md +1 -5
- package/skills/iyulab-chat-components/references/components/element-block.md +57 -0
- package/skills/iyulab-chat-components/references/components/file-block.md +22 -25
- package/skills/iyulab-chat-components/references/components/{images-view.md → images-block.md} +10 -10
- package/skills/iyulab-chat-components/references/components/{map-view.md → map-block.md} +9 -9
- package/skills/iyulab-chat-components/references/components/marked-block.md +5 -4
- package/skills/iyulab-chat-components/references/components/message.md +1 -2
- package/skills/iyulab-chat-components/references/components/prompt.md +12 -21
- package/skills/iyulab-chat-components/references/components/{video-view.md → video-block.md} +10 -10
- package/skills/iyulab-chat-components/references/extra-system.md +95 -0
- package/skills/iyulab-chat-components/references/types.md +17 -31
- package/skills/iyulab-chat-components/references/usage.md +13 -81
- package/skills/iyulab-chat-components/references/utilities/html-builder.md +35 -0
- package/skills/iyulab-chat-components/references/utilities/prompt-builder.md +73 -0
- package/dist/_virtual/_glob-assets_raw/intent-prompt.md.1907474e.js +0 -4
- package/dist/_virtual/_glob-assets_raw/view-prompt.md.e0dbcffe.js +0 -4
- package/dist/chart.d.ts +0 -1
- package/dist/chart.js +0 -2
- package/dist/components/blocks/UJsonBlock.d.ts +0 -49
- package/dist/components/blocks/UJsonBlock.js +0 -130
- package/dist/components/blocks/UJsonBlock.styles.js +0 -115
- package/dist/components/blocks/UThinkBlock.d.ts +0 -35
- package/dist/components/blocks/UThinkBlock.js +0 -87
- package/dist/components/blocks/UThinkBlock.styles.js +0 -74
- package/dist/components/blocks/UToolBlock.d.ts +0 -24
- package/dist/components/blocks/UToolBlock.js +0 -70
- package/dist/components/blocks/UToolBlock.styles.js +0 -66
- package/dist/components/buttons/UAttachButton.d.ts +0 -26
- package/dist/components/buttons/UAttachButton.js +0 -63
- package/dist/components/buttons/UAttachButton.styles.js +0 -14
- package/dist/components/buttons/UCopyButton.d.ts +0 -24
- package/dist/components/buttons/UCopyButton.js +0 -59
- package/dist/components/buttons/UCopyButton.styles.js +0 -18
- package/dist/components/buttons/UVoteButton.d.ts +0 -19
- package/dist/components/buttons/UVoteButton.js +0 -64
- package/dist/components/buttons/UVoteButton.styles.d.ts +0 -1
- package/dist/components/buttons/UVoteButton.styles.js +0 -19
- package/dist/components/intents/UQuestionIntent.d.ts +0 -22
- package/dist/components/intents/UQuestionIntent.js +0 -41
- package/dist/components/intents/UQuestionIntent.styles.d.ts +0 -1
- package/dist/components/intents/UQuestionIntent.styles.js +0 -43
- package/dist/components/views/UChartView.styles.d.ts +0 -1
- package/dist/components/views/UImagesView.styles.d.ts +0 -1
- package/dist/components/views/UMapView.styles.d.ts +0 -1
- package/dist/components/views/UVideoView.styles.d.ts +0 -1
- package/dist/components/views/UView.styles.d.ts +0 -1
- package/dist/events/AttachEvent.d.ts +0 -9
- package/dist/events/ChoiceEvent.d.ts +0 -9
- package/dist/react/UAttachButton.d.ts +0 -11
- package/dist/react/UAttachButton.js +0 -12
- package/dist/react/UCopyButton.d.ts +0 -9
- package/dist/react/UCopyButton.js +0 -10
- package/dist/react/UImagesView.d.ts +0 -9
- package/dist/react/UImagesView.js +0 -10
- package/dist/react/UJsonBlock.d.ts +0 -9
- package/dist/react/UJsonBlock.js +0 -10
- package/dist/react/UMapView.d.ts +0 -9
- package/dist/react/UMapView.js +0 -10
- package/dist/react/UQuestionIntent.d.ts +0 -11
- package/dist/react/UQuestionIntent.js +0 -12
- package/dist/react/UThinkBlock.d.ts +0 -9
- package/dist/react/UThinkBlock.js +0 -10
- package/dist/react/UToolBlock.d.ts +0 -9
- package/dist/react/UToolBlock.js +0 -10
- package/dist/react/UVideoView.d.ts +0 -9
- package/dist/react/UVideoView.js +0 -10
- package/dist/react/UView.d.ts +0 -9
- package/dist/react/UView.js +0 -10
- package/dist/react/UVoteButton.d.ts +0 -9
- package/dist/react/UVoteButton.js +0 -10
- package/dist/types/Intents.d.ts +0 -26
- package/dist/types/Intents.js +0 -30
- package/dist/types/JsonNode.d.ts +0 -20
- package/dist/types/Views.d.ts +0 -34
- package/dist/types/Views.js +0 -148
- package/dist/utilities/IntentPromptBuilder.d.ts +0 -40
- package/dist/utilities/IntentPromptBuilder.js +0 -95
- package/dist/utilities/ViewPromptBuilder.d.ts +0 -28
- package/dist/utilities/ViewPromptBuilder.js +0 -78
- package/dist/utilities/dom-agent/DOMAgent.d.ts +0 -74
- package/dist/utilities/dom-agent/DOMController.d.ts +0 -78
- package/dist/utilities/dom-agent/DOMPromptBuilder.d.ts +0 -54
- package/dist/utilities/dom-agent/DOMScanner.d.ts +0 -83
- package/dist/utilities/dom-agent/index.d.ts +0 -9
- package/dist/utilities/dom-agent/types.d.ts +0 -209
- package/skills/iyulab-chat-components/references/components/attach-button.md +0 -69
- package/skills/iyulab-chat-components/references/components/copy-button.md +0 -46
- package/skills/iyulab-chat-components/references/components/json-block.md +0 -41
- package/skills/iyulab-chat-components/references/components/question-intent.md +0 -75
- package/skills/iyulab-chat-components/references/components/think-block.md +0 -48
- package/skills/iyulab-chat-components/references/components/tool-block.md +0 -57
- package/skills/iyulab-chat-components/references/components/view.md +0 -51
- package/skills/iyulab-chat-components/references/components/vote-button.md +0 -60
- package/skills/iyulab-chat-components/references/utilities/intent-prompt-builder.md +0 -123
- package/skills/iyulab-chat-components/references/utilities/view-prompt-builder.md +0 -112
- /package/dist/components/{buttons/UCopyButton.styles.d.ts → blocks/UElementBlock.styles.d.ts} +0 -0
- /package/dist/{components/blocks/UJsonBlock.styles.d.ts → components-extra/UChartBlock.styles.d.ts} +0 -0
- /package/dist/{components/blocks/UThinkBlock.styles.d.ts → components-extra/UImagesBlock.styles.d.ts} +0 -0
- /package/dist/{components/blocks/UToolBlock.styles.d.ts → components-extra/UMapBlock.styles.d.ts} +0 -0
- /package/dist/{components/buttons/UAttachButton.styles.d.ts → components-extra/UVideoBlock.styles.d.ts} +0 -0
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorateMetadata.js";
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
|
|
3
|
-
import "./UMarkedBlock.js";
|
|
4
|
-
import { styles } from "./UThinkBlock.styles.js";
|
|
5
|
-
import { html } from "lit";
|
|
6
|
-
import { customElement, property, query } from "lit/decorators.js";
|
|
7
|
-
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
8
|
-
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
9
|
-
//#region src/components/blocks/UThinkBlock.ts
|
|
10
|
-
var _ref;
|
|
11
|
-
var UThinkBlock = class UThinkBlock extends UElement {
|
|
12
|
-
constructor(..._args) {
|
|
13
|
-
super(..._args);
|
|
14
|
-
this.loading = false;
|
|
15
|
-
this.collapsed = true;
|
|
16
|
-
this.autoScroll = false;
|
|
17
|
-
this.handleUserInterrupt = () => {
|
|
18
|
-
if (this.autoScroll) this.autoScroll = false;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
static {
|
|
22
|
-
this.styles = [super.styles, styles];
|
|
23
|
-
}
|
|
24
|
-
updated(changedProperties) {
|
|
25
|
-
super.updated(changedProperties);
|
|
26
|
-
if (changedProperties.has("value") && this.autoScroll) this.scrollToBottom();
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
29
|
-
return html`
|
|
30
|
-
<div class="header" part="header"
|
|
31
|
-
@click=${() => this.collapsed = !this.collapsed}>
|
|
32
|
-
<u-icon class="prefix-icon"
|
|
33
|
-
?loading=${this.loading}
|
|
34
|
-
lib="bootstrap"
|
|
35
|
-
name="lightbulb-fill"
|
|
36
|
-
></u-icon>
|
|
37
|
-
<span class="title">
|
|
38
|
-
${this.loading ? "Thinking..." : "Thought"}
|
|
39
|
-
</span>
|
|
40
|
-
<u-icon class="suffix-icon"
|
|
41
|
-
lib="internal"
|
|
42
|
-
name=${this.collapsed ? "plus-lg" : "dash-lg"}
|
|
43
|
-
></u-icon>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div class="body" part="body" scrollable
|
|
47
|
-
?hidden=${this.collapsed}
|
|
48
|
-
@wheel=${this.handleUserInterrupt}
|
|
49
|
-
@touchstart=${this.handleUserInterrupt}>
|
|
50
|
-
<u-marked-block
|
|
51
|
-
.value=${this.value}
|
|
52
|
-
></u-marked-block>
|
|
53
|
-
</div>
|
|
54
|
-
`;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* 컨텐츠 스크롤을 맨 아래로 이동
|
|
58
|
-
* @returns 스크롤 작업이 시작되었는지 여부 (bodyEl이 존재할 때만 true)
|
|
59
|
-
*/
|
|
60
|
-
scrollToBottom() {
|
|
61
|
-
if (!this.bodyEl) return false;
|
|
62
|
-
requestAnimationFrame(() => {
|
|
63
|
-
this.bodyEl.scrollTo({
|
|
64
|
-
top: this.bodyEl.scrollHeight,
|
|
65
|
-
behavior: "smooth"
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
__decorate([property({
|
|
72
|
-
type: Boolean,
|
|
73
|
-
reflect: true
|
|
74
|
-
}), __decorateMetadata("design:type", Boolean)], UThinkBlock.prototype, "loading", void 0);
|
|
75
|
-
__decorate([property({
|
|
76
|
-
type: Boolean,
|
|
77
|
-
reflect: true
|
|
78
|
-
}), __decorateMetadata("design:type", Boolean)], UThinkBlock.prototype, "collapsed", void 0);
|
|
79
|
-
__decorate([property({
|
|
80
|
-
type: Boolean,
|
|
81
|
-
attribute: "auto-scroll"
|
|
82
|
-
}), __decorateMetadata("design:type", Boolean)], UThinkBlock.prototype, "autoScroll", void 0);
|
|
83
|
-
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UThinkBlock.prototype, "value", void 0);
|
|
84
|
-
__decorate([query(".body"), __decorateMetadata("design:type", typeof (_ref = typeof HTMLDivElement !== "undefined" && HTMLDivElement) === "function" ? _ref : Object)], UThinkBlock.prototype, "bodyEl", void 0);
|
|
85
|
-
UThinkBlock = __decorate([customElement("u-think-block")], UThinkBlock);
|
|
86
|
-
//#endregion
|
|
87
|
-
export { UThinkBlock };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
//#region src/components/blocks/UThinkBlock.styles.ts
|
|
3
|
-
var styles = css`
|
|
4
|
-
:host {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
width: 100%;
|
|
8
|
-
font-size: 14px;
|
|
9
|
-
border: 1px solid var(--u-border-color);
|
|
10
|
-
border-radius: 8px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.header {
|
|
14
|
-
width: 100%;
|
|
15
|
-
padding: 8px;
|
|
16
|
-
border-radius: inherit;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: row;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: space-between;
|
|
21
|
-
gap: 8px;
|
|
22
|
-
user-select: none;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
}
|
|
25
|
-
.header:hover {
|
|
26
|
-
background: linear-gradient(var(--u-neutral-100), transparent);
|
|
27
|
-
}
|
|
28
|
-
.header:active {
|
|
29
|
-
background: linear-gradient(var(--u-neutral-200), transparent);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.header .prefix-icon {
|
|
33
|
-
color: var(--u-yellow-800);
|
|
34
|
-
transition: all 0.3s ease-in-out;
|
|
35
|
-
}
|
|
36
|
-
.header .prefix-icon[loading] {
|
|
37
|
-
animation: pulse-glow 3s ease-in-out infinite;
|
|
38
|
-
}
|
|
39
|
-
.header .title {
|
|
40
|
-
flex: 1;
|
|
41
|
-
font-size: inherit;
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
line-height: 1;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.body {
|
|
47
|
-
font-size: inherit;
|
|
48
|
-
font-weight: 300;
|
|
49
|
-
line-height: 1.5;
|
|
50
|
-
padding: 8px;
|
|
51
|
-
max-height: 210px;
|
|
52
|
-
overflow: auto;
|
|
53
|
-
}
|
|
54
|
-
.body u-marked-block {
|
|
55
|
-
font-size: inherit;
|
|
56
|
-
font-family: inherit;
|
|
57
|
-
line-height: inherit;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@keyframes pulse-glow {
|
|
61
|
-
0%, 100% {
|
|
62
|
-
opacity: 1;
|
|
63
|
-
filter: brightness(1);
|
|
64
|
-
transform: scale(1);
|
|
65
|
-
}
|
|
66
|
-
50% {
|
|
67
|
-
opacity: 0.7;
|
|
68
|
-
filter: brightness(1.3);
|
|
69
|
-
transform: scale(1.1);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
73
|
-
//#endregion
|
|
74
|
-
export { styles };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { UElement } from '@iyulab/components/dist/components/UElement.js';
|
|
2
|
-
import { JsonNode } from '../../types/JsonNode.js';
|
|
3
|
-
/**
|
|
4
|
-
* 툴 사용 블록 컴포넌트입니다.
|
|
5
|
-
*/
|
|
6
|
-
export declare class UToolBlock extends UElement {
|
|
7
|
-
static styles: import('lit').CSSResultGroup[];
|
|
8
|
-
/** 로딩 상태 */
|
|
9
|
-
loading: boolean;
|
|
10
|
-
/** 블록 접힘 여부 */
|
|
11
|
-
collapsed: boolean;
|
|
12
|
-
/** 헤딩 텍스트 */
|
|
13
|
-
title: string;
|
|
14
|
-
/** 입력 데이터 (JSON Object) */
|
|
15
|
-
input?: JsonNode;
|
|
16
|
-
/** 출력 데이터 (JSON Object) */
|
|
17
|
-
output?: JsonNode;
|
|
18
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
19
|
-
}
|
|
20
|
-
declare global {
|
|
21
|
-
interface HTMLElementTagNameMap {
|
|
22
|
-
"u-tool-block": UToolBlock;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorateMetadata.js";
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
|
|
3
|
-
import "./UJsonBlock.js";
|
|
4
|
-
import { styles } from "./UToolBlock.styles.js";
|
|
5
|
-
import { html } from "lit";
|
|
6
|
-
import { customElement, property } from "lit/decorators.js";
|
|
7
|
-
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
8
|
-
import "@iyulab/components/dist/components/spinner/USpinner.js";
|
|
9
|
-
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
10
|
-
import { jsonAttrConverter } from "@iyulab/components/dist/utilities/converters.js";
|
|
11
|
-
//#region src/components/blocks/UToolBlock.ts
|
|
12
|
-
var UToolBlock = class UToolBlock extends UElement {
|
|
13
|
-
constructor(..._args) {
|
|
14
|
-
super(..._args);
|
|
15
|
-
this.loading = false;
|
|
16
|
-
this.collapsed = true;
|
|
17
|
-
this.title = "";
|
|
18
|
-
}
|
|
19
|
-
static {
|
|
20
|
-
this.styles = [super.styles, styles];
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
return html`
|
|
24
|
-
<div class="header" @click=${() => this.collapsed = !this.collapsed}>
|
|
25
|
-
${this.loading ? html`<u-spinner></u-spinner>` : html`<u-icon lib="bootstrap" name="tools"></u-icon>`}
|
|
26
|
-
<div class="title">
|
|
27
|
-
${this.title || "Tool Usage"}
|
|
28
|
-
</div>
|
|
29
|
-
<u-icon
|
|
30
|
-
lib="internal"
|
|
31
|
-
name=${this.collapsed ? "plus-lg" : "dash-lg"}
|
|
32
|
-
></u-icon>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div class="body" part="body" scrollable ?hidden=${this.collapsed}>
|
|
36
|
-
<div class="input-view" ?hidden=${!this.input}>
|
|
37
|
-
<u-json-block
|
|
38
|
-
.value=${this.input || {}}
|
|
39
|
-
></u-json-block>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="output-view" ?hidden=${!this.output}>
|
|
42
|
-
<u-icon lib="internal" name="chevron-down"></u-icon>
|
|
43
|
-
<u-json-block
|
|
44
|
-
.value=${this.output || {}}
|
|
45
|
-
></u-json-block>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
`;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
__decorate([property({
|
|
52
|
-
type: Boolean,
|
|
53
|
-
reflect: true
|
|
54
|
-
}), __decorateMetadata("design:type", Boolean)], UToolBlock.prototype, "loading", void 0);
|
|
55
|
-
__decorate([property({
|
|
56
|
-
type: Boolean,
|
|
57
|
-
reflect: true
|
|
58
|
-
}), __decorateMetadata("design:type", Boolean)], UToolBlock.prototype, "collapsed", void 0);
|
|
59
|
-
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UToolBlock.prototype, "title", void 0);
|
|
60
|
-
__decorate([property({
|
|
61
|
-
type: Object,
|
|
62
|
-
converter: jsonAttrConverter()
|
|
63
|
-
}), __decorateMetadata("design:type", Object)], UToolBlock.prototype, "input", void 0);
|
|
64
|
-
__decorate([property({
|
|
65
|
-
type: Object,
|
|
66
|
-
converter: jsonAttrConverter()
|
|
67
|
-
}), __decorateMetadata("design:type", Object)], UToolBlock.prototype, "output", void 0);
|
|
68
|
-
UToolBlock = __decorate([customElement("u-tool-block")], UToolBlock);
|
|
69
|
-
//#endregion
|
|
70
|
-
export { UToolBlock };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
//#region src/components/blocks/UToolBlock.styles.ts
|
|
3
|
-
var styles = css`
|
|
4
|
-
:host {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
width: 100%;
|
|
8
|
-
font-size: 14px;
|
|
9
|
-
border: 1px solid var(--u-border-color);
|
|
10
|
-
border-radius: 8px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.header {
|
|
14
|
-
width: 100%;
|
|
15
|
-
padding: 8px;
|
|
16
|
-
border-radius: inherit;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: row;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: space-between;
|
|
21
|
-
gap: 8px;
|
|
22
|
-
cursor: pointer;
|
|
23
|
-
user-select: none;
|
|
24
|
-
}
|
|
25
|
-
.header:hover {
|
|
26
|
-
background: linear-gradient(var(--u-neutral-100), transparent);
|
|
27
|
-
}
|
|
28
|
-
.header:active {
|
|
29
|
-
background: linear-gradient(var(--u-neutral-200), transparent);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.header u-icon[name="tools"] {
|
|
33
|
-
color: var(--u-blue-800);
|
|
34
|
-
}
|
|
35
|
-
.header .title {
|
|
36
|
-
flex: 1;
|
|
37
|
-
font-size: inherit;
|
|
38
|
-
font-weight: 600;
|
|
39
|
-
line-height: 1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.body {
|
|
43
|
-
display: block;
|
|
44
|
-
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
45
|
-
width: 100%;
|
|
46
|
-
max-height: 260px;
|
|
47
|
-
padding: 8px;
|
|
48
|
-
overflow: auto;
|
|
49
|
-
}
|
|
50
|
-
.body u-json-viewer {
|
|
51
|
-
font-size: inherit;
|
|
52
|
-
font-family: inherit;
|
|
53
|
-
line-height: 1.5;
|
|
54
|
-
}
|
|
55
|
-
.body u-icon[name="chevron-down"] {
|
|
56
|
-
align-self: center;
|
|
57
|
-
font-size: 16px;
|
|
58
|
-
color: var(--u-neutral-600, #4b5563);
|
|
59
|
-
}
|
|
60
|
-
.body .output-view {
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
}
|
|
64
|
-
`;
|
|
65
|
-
//#endregion
|
|
66
|
-
export { styles };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { UElement } from '@iyulab/components/dist/components/UElement.js';
|
|
2
|
-
/**
|
|
3
|
-
* 파일 첨부 버튼 컴포넌트입니다.
|
|
4
|
-
*/
|
|
5
|
-
export declare class UAttachButton extends UElement {
|
|
6
|
-
static styles: import('lit').CSSResultGroup[];
|
|
7
|
-
/** 첨부 파일 유형 제한, 컴마로 구분된 MIME 타입 문자열 (예: "image/*,application/pdf") */
|
|
8
|
-
accept?: string;
|
|
9
|
-
/** 다중 파일 선택 가능 여부 */
|
|
10
|
-
multiple: boolean;
|
|
11
|
-
input?: HTMLInputElement;
|
|
12
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
13
|
-
/**
|
|
14
|
-
* 버튼 클릭 핸들러
|
|
15
|
-
*/
|
|
16
|
-
private handleButtonClick;
|
|
17
|
-
/**
|
|
18
|
-
* 파일 선택 이벤트 핸들러
|
|
19
|
-
*/
|
|
20
|
-
private handleInputChange;
|
|
21
|
-
}
|
|
22
|
-
declare global {
|
|
23
|
-
interface HTMLElementTagNameMap {
|
|
24
|
-
"u-attach-button": UAttachButton;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorateMetadata.js";
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
|
|
3
|
-
import { styles } from "./UAttachButton.styles.js";
|
|
4
|
-
import { html } from "lit";
|
|
5
|
-
import { customElement, property, query } from "lit/decorators.js";
|
|
6
|
-
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
7
|
-
import "@iyulab/components/dist/components/button/UButton.js";
|
|
8
|
-
import "@iyulab/components/dist/components/tooltip/UTooltip.js";
|
|
9
|
-
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
10
|
-
//#region src/components/buttons/UAttachButton.ts
|
|
11
|
-
var _ref;
|
|
12
|
-
var UAttachButton = class UAttachButton extends UElement {
|
|
13
|
-
constructor(..._args) {
|
|
14
|
-
super(..._args);
|
|
15
|
-
this.multiple = false;
|
|
16
|
-
this.handleButtonClick = () => {
|
|
17
|
-
if (!this.input) return;
|
|
18
|
-
this.input.click();
|
|
19
|
-
};
|
|
20
|
-
this.handleInputChange = (e) => {
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
e.stopPropagation();
|
|
23
|
-
const target = e.target;
|
|
24
|
-
const files = target.files;
|
|
25
|
-
if (!files || files.length === 0) return;
|
|
26
|
-
this.fire("attach", { detail: { files: Array.from(files) } });
|
|
27
|
-
target.value = "";
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
static {
|
|
31
|
-
this.styles = [super.styles, styles];
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
return html`
|
|
35
|
-
<u-button part="base"
|
|
36
|
-
variant="ghost"
|
|
37
|
-
@click=${this.handleButtonClick}>
|
|
38
|
-
<u-icon part="icon"
|
|
39
|
-
lib="bootstrap"
|
|
40
|
-
name="paperclip"
|
|
41
|
-
></u-icon>
|
|
42
|
-
</u-button>
|
|
43
|
-
|
|
44
|
-
<u-tooltip for="u-button" placement="bottom" distance="8">
|
|
45
|
-
<slot></slot>
|
|
46
|
-
</u-tooltip>
|
|
47
|
-
|
|
48
|
-
<input
|
|
49
|
-
hidden
|
|
50
|
-
type="file"
|
|
51
|
-
?multiple=${this.multiple}
|
|
52
|
-
.accept=${this.accept || "*"}
|
|
53
|
-
@change=${this.handleInputChange}
|
|
54
|
-
/>
|
|
55
|
-
`;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UAttachButton.prototype, "accept", void 0);
|
|
59
|
-
__decorate([property({ type: Boolean }), __decorateMetadata("design:type", Boolean)], UAttachButton.prototype, "multiple", void 0);
|
|
60
|
-
__decorate([query("input[type=\"file\"]"), __decorateMetadata("design:type", typeof (_ref = typeof HTMLInputElement !== "undefined" && HTMLInputElement) === "function" ? _ref : Object)], UAttachButton.prototype, "input", void 0);
|
|
61
|
-
UAttachButton = __decorate([customElement("u-attach-button")], UAttachButton);
|
|
62
|
-
//#endregion
|
|
63
|
-
export { UAttachButton };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
//#region src/components/buttons/UAttachButton.styles.ts
|
|
3
|
-
var styles = css`
|
|
4
|
-
:host(:empty) u-tooltip {
|
|
5
|
-
display: none;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
u-button {
|
|
9
|
-
color: var(--u-txt-color-weak);
|
|
10
|
-
font-size: 16px;
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { styles };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { UElement } from '@iyulab/components/dist/components/UElement.js';
|
|
2
|
-
/**
|
|
3
|
-
* 클릭 시 클립보드에 텍스트를 복사하는 버튼입니다. 복사 상태를 표시하기 위해 아이콘이 변경됩니다.
|
|
4
|
-
*/
|
|
5
|
-
export declare class UCopyButton extends UElement {
|
|
6
|
-
static styles: import('lit').CSSResultGroup[];
|
|
7
|
-
/** 클립보드 복사 후 재사용 대기 시간 (ms) */
|
|
8
|
-
delay: number;
|
|
9
|
-
/** 복사할 텍스트를 설정합니다. */
|
|
10
|
-
value?: string;
|
|
11
|
-
/** 클립보드 복사 상태를 나타내는 플래그입니다. */
|
|
12
|
-
isCopied: boolean;
|
|
13
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
14
|
-
/**
|
|
15
|
-
* 클립보드에 텍스트를 복사하는 메서드입니다.
|
|
16
|
-
* 복사 후 재사용 대기 시간이 설정되어 있으면, 일정 시간 후에 복사 가능 상태로 되돌립니다.
|
|
17
|
-
*/
|
|
18
|
-
private copyToClipboard;
|
|
19
|
-
}
|
|
20
|
-
declare global {
|
|
21
|
-
interface HTMLElementTagNameMap {
|
|
22
|
-
"u-copy-button": UCopyButton;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { styles } from "./UCopyButton.styles.js";
|
|
2
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorateMetadata.js";
|
|
3
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
|
|
4
|
-
import { html } from "lit";
|
|
5
|
-
import { customElement, property, state } from "lit/decorators.js";
|
|
6
|
-
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
7
|
-
import "@iyulab/components/dist/components/icon-button/UIconButton.js";
|
|
8
|
-
import "@iyulab/components/dist/components/button/UButton.js";
|
|
9
|
-
import "@iyulab/components/dist/components/tooltip/UTooltip.js";
|
|
10
|
-
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
11
|
-
//#region src/components/buttons/UCopyButton.ts
|
|
12
|
-
var UCopyButton = class UCopyButton extends UElement {
|
|
13
|
-
constructor(..._args) {
|
|
14
|
-
super(..._args);
|
|
15
|
-
this.delay = 1e3;
|
|
16
|
-
this.isCopied = false;
|
|
17
|
-
this.copyToClipboard = async () => {
|
|
18
|
-
if (!this.value) return;
|
|
19
|
-
if (this.isCopied) return;
|
|
20
|
-
try {
|
|
21
|
-
await window.navigator.clipboard.writeText(this.value);
|
|
22
|
-
if (this.delay <= 0) return;
|
|
23
|
-
this.isCopied = true;
|
|
24
|
-
setTimeout(() => {
|
|
25
|
-
this.isCopied = false;
|
|
26
|
-
}, this.delay);
|
|
27
|
-
} catch (error) {
|
|
28
|
-
console.error("Failed to copy text to clipboard:", error);
|
|
29
|
-
this.isCopied = false;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
static {
|
|
34
|
-
this.styles = [super.styles, styles];
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
return html`
|
|
38
|
-
<u-button part="base"
|
|
39
|
-
variant="ghost"
|
|
40
|
-
?disabled=${this.isCopied}
|
|
41
|
-
@click=${this.copyToClipboard}>
|
|
42
|
-
<u-icon part="icon"
|
|
43
|
-
lib="bootstrap"
|
|
44
|
-
name=${this.isCopied ? "check-lg" : "copy"}
|
|
45
|
-
></u-icon>
|
|
46
|
-
</u-button>
|
|
47
|
-
|
|
48
|
-
<u-tooltip for="u-button" placement="bottom" distance="8">
|
|
49
|
-
<slot></slot>
|
|
50
|
-
</u-tooltip>
|
|
51
|
-
`;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
__decorate([property({ type: Number }), __decorateMetadata("design:type", Number)], UCopyButton.prototype, "delay", void 0);
|
|
55
|
-
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UCopyButton.prototype, "value", void 0);
|
|
56
|
-
__decorate([state(), __decorateMetadata("design:type", Boolean)], UCopyButton.prototype, "isCopied", void 0);
|
|
57
|
-
UCopyButton = __decorate([customElement("u-copy-button")], UCopyButton);
|
|
58
|
-
//#endregion
|
|
59
|
-
export { UCopyButton };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
//#region src/components/buttons/UCopyButton.styles.ts
|
|
3
|
-
var styles = css`
|
|
4
|
-
:host(:empty) u-tooltip {
|
|
5
|
-
display: none;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
u-button {
|
|
9
|
-
color: var(--u-txt-color-weak);
|
|
10
|
-
font-size: 16px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
u-icon[name="check-lg"] {
|
|
14
|
-
color: var(--u-green-500);
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { styles };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { UElement } from '@iyulab/components/dist/components/UElement.js';
|
|
2
|
-
/** 투표 상태 타입 */
|
|
3
|
-
export type VoteValue = 'none' | 'up' | 'down';
|
|
4
|
-
/**
|
|
5
|
-
* 투표 버튼 컴포넌트입니다.
|
|
6
|
-
*/
|
|
7
|
-
export declare class UVoteButton extends UElement {
|
|
8
|
-
static styles: import('lit').CSSResultGroup[];
|
|
9
|
-
/** 현재 투표 상태 */
|
|
10
|
-
value: VoteValue;
|
|
11
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
12
|
-
private handleUpButtonClick;
|
|
13
|
-
private handleDownButtonClick;
|
|
14
|
-
}
|
|
15
|
-
declare global {
|
|
16
|
-
interface HTMLElementTagNameMap {
|
|
17
|
-
'u-vote-button': UVoteButton;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorateMetadata.js";
|
|
2
|
-
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
|
|
3
|
-
import { styles } from "./UVoteButton.styles.js";
|
|
4
|
-
import { html } from "lit";
|
|
5
|
-
import { customElement, property } from "lit/decorators.js";
|
|
6
|
-
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
7
|
-
import "@iyulab/components/dist/components/button/UButton.js";
|
|
8
|
-
import "@iyulab/components/dist/components/tooltip/UTooltip.js";
|
|
9
|
-
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
10
|
-
//#region src/components/buttons/UVoteButton.ts
|
|
11
|
-
var UVoteButton = class UVoteButton extends UElement {
|
|
12
|
-
constructor(..._args) {
|
|
13
|
-
super(..._args);
|
|
14
|
-
this.value = "none";
|
|
15
|
-
this.handleUpButtonClick = () => {
|
|
16
|
-
this.value = this.value === "up" ? "none" : "up";
|
|
17
|
-
this.dispatchEvent(new Event("change", {
|
|
18
|
-
bubbles: true,
|
|
19
|
-
composed: true
|
|
20
|
-
}));
|
|
21
|
-
};
|
|
22
|
-
this.handleDownButtonClick = () => {
|
|
23
|
-
this.value = this.value === "down" ? "none" : "down";
|
|
24
|
-
this.dispatchEvent(new Event("change", {
|
|
25
|
-
bubbles: true,
|
|
26
|
-
composed: true
|
|
27
|
-
}));
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
static {
|
|
31
|
-
this.styles = [super.styles, styles];
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
return html`
|
|
35
|
-
<u-button class="up-btn" part="up-btn"
|
|
36
|
-
variant="ghost"
|
|
37
|
-
@click=${this.handleUpButtonClick}>
|
|
38
|
-
<u-icon part="icon"
|
|
39
|
-
lib="bootstrap"
|
|
40
|
-
name=${this.value === "up" ? "hand-thumbs-up-fill" : "hand-thumbs-up"}
|
|
41
|
-
></u-icon>
|
|
42
|
-
</u-button>
|
|
43
|
-
<u-button class="down-btn" part="down-btn"
|
|
44
|
-
variant="ghost"
|
|
45
|
-
@click=${this.handleDownButtonClick}>
|
|
46
|
-
<u-icon part="icon"
|
|
47
|
-
lib="bootstrap"
|
|
48
|
-
name=${this.value === "down" ? "hand-thumbs-down-fill" : "hand-thumbs-down"}
|
|
49
|
-
></u-icon>
|
|
50
|
-
</u-button>
|
|
51
|
-
|
|
52
|
-
<u-tooltip for=".up-btn" placement="bottom" distance="8">
|
|
53
|
-
<slot name="up"></slot>
|
|
54
|
-
</u-tooltip>
|
|
55
|
-
<u-tooltip for=".down-btn" placement="bottom" distance="8">
|
|
56
|
-
<slot name="down"></slot>
|
|
57
|
-
</u-tooltip>
|
|
58
|
-
`;
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
__decorate([property({ type: String }), __decorateMetadata("design:type", Object)], UVoteButton.prototype, "value", void 0);
|
|
62
|
-
UVoteButton = __decorate([customElement("u-vote-button")], UVoteButton);
|
|
63
|
-
//#endregion
|
|
64
|
-
export { UVoteButton };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const styles: import('lit').CSSResult;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
//#region src/components/buttons/UVoteButton.styles.ts
|
|
3
|
-
var styles = css`
|
|
4
|
-
:host {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: row;
|
|
7
|
-
align-items: center;
|
|
8
|
-
}
|
|
9
|
-
:host(:empty) u-tooltip {
|
|
10
|
-
display: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
u-button {
|
|
14
|
-
color: var(--u-txt-color-weak);
|
|
15
|
-
font-size: 16px;
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { styles };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { nothing } from 'lit';
|
|
2
|
-
import { UElement } from '@iyulab/components/dist/components/UElement.js';
|
|
3
|
-
/**
|
|
4
|
-
* 질문/선택지 제안 블록 컴포넌트
|
|
5
|
-
*
|
|
6
|
-
* LLM이 질문 텍스트(`question`)와 클릭 선택지(`choices`)를 제시하고,
|
|
7
|
-
* `input: true`일 때는 사용자가 직접 텍스트를 입력할 수도 있습니다.
|
|
8
|
-
*/
|
|
9
|
-
export declare class UQuestionIntent extends UElement {
|
|
10
|
-
static styles: import('lit').CSSResultGroup[];
|
|
11
|
-
/** LLM이 제시하는 질문 텍스트 */
|
|
12
|
-
question?: string;
|
|
13
|
-
/** 클릭 가능한 선택지 목록 */
|
|
14
|
-
choices: string[];
|
|
15
|
-
render(): import('lit-html').TemplateResult<1> | typeof nothing;
|
|
16
|
-
private handleChoiceClick;
|
|
17
|
-
}
|
|
18
|
-
declare global {
|
|
19
|
-
interface HTMLElementTagNameMap {
|
|
20
|
-
"u-question-intent": UQuestionIntent;
|
|
21
|
-
}
|
|
22
|
-
}
|