@iyulab/chat-components 0.3.0 → 0.5.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 +146 -0
- package/README.md +133 -16
- package/dist/_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js +9 -0
- package/dist/_virtual/_@oxc-project_runtime@0.122.0/helpers/decorateMetadata.js +6 -0
- package/dist/_virtual/_glob-assets_raw/intent-prompt.md.1907474e.js +4 -0
- package/dist/_virtual/_glob-assets_raw/view-prompt.md.e0dbcffe.js +4 -0
- package/dist/components/blocks/UCodeBlock.d.ts +24 -2
- package/dist/components/blocks/UCodeBlock.js +65 -2
- package/dist/components/blocks/UCodeBlock.styles.js +10 -4
- package/dist/components/blocks/UFileBlock.d.ts +33 -0
- package/dist/components/blocks/UFileBlock.js +154 -0
- package/dist/components/blocks/UFileBlock.styles.js +128 -0
- package/dist/components/blocks/UJsonBlock.d.ts +44 -2
- package/dist/components/blocks/UJsonBlock.js +128 -3
- package/dist/components/blocks/UJsonBlock.styles.js +4 -4
- package/dist/components/blocks/UMarkedBlock.d.ts +44 -2
- package/dist/components/blocks/UMarkedBlock.js +154 -4
- package/dist/components/blocks/UMarkedBlock.styles.js +4 -4
- package/dist/components/blocks/URefBlock.d.ts +16 -2
- package/dist/components/blocks/URefBlock.js +58 -3
- package/dist/components/blocks/URefBlock.styles.js +4 -4
- package/dist/components/blocks/UTableBlock.d.ts +52 -0
- package/dist/components/blocks/UTableBlock.js +198 -0
- package/dist/components/blocks/UTableBlock.styles.js +133 -0
- package/dist/components/blocks/UTextBlock.d.ts +36 -2
- package/dist/components/blocks/UTextBlock.js +94 -4
- package/dist/components/blocks/UTextBlock.styles.js +4 -4
- package/dist/components/blocks/UThinkBlock.d.ts +30 -2
- package/dist/components/blocks/UThinkBlock.js +86 -4
- package/dist/components/blocks/UThinkBlock.styles.js +4 -4
- package/dist/components/blocks/UToolBlock.d.ts +19 -2
- package/dist/components/blocks/UToolBlock.js +68 -3
- package/dist/components/blocks/UToolBlock.styles.js +4 -4
- package/dist/components/buttons/UAttachButton.d.ts +21 -2
- package/dist/components/buttons/UAttachButton.js +61 -3
- package/dist/components/buttons/UAttachButton.styles.js +4 -4
- package/dist/components/buttons/UCopyButton.d.ts +19 -2
- package/dist/components/buttons/UCopyButton.js +57 -3
- package/dist/components/buttons/UCopyButton.styles.js +4 -4
- package/dist/components/buttons/UVoteButton.d.ts +14 -3
- package/dist/components/buttons/UVoteButton.js +62 -3
- package/dist/components/buttons/UVoteButton.styles.js +4 -4
- package/dist/components/intents/UQuestionIntent.d.ts +22 -0
- package/dist/components/intents/UQuestionIntent.js +41 -0
- package/dist/components/intents/UQuestionIntent.styles.js +43 -0
- package/dist/components/message/UMessage.d.ts +18 -2
- package/dist/components/message/UMessage.js +47 -2
- package/dist/components/message/UMessage.styles.js +42 -15
- package/dist/components/prompt/UPrompt.d.ts +32 -2
- package/dist/components/prompt/UPrompt.js +118 -2
- package/dist/components/prompt/UPrompt.styles.js +43 -5
- package/dist/components/references/URefCard.d.ts +30 -2
- package/dist/components/references/URefCard.js +97 -2
- package/dist/components/references/URefCard.styles.js +4 -4
- package/dist/components/references/URefCardGroup.d.ts +25 -2
- package/dist/components/references/URefCardGroup.js +69 -4
- package/dist/components/references/URefCardGroup.styles.js +4 -4
- package/dist/components/references/URefTag.d.ts +12 -2
- package/dist/components/references/URefTag.js +37 -2
- package/dist/components/references/URefTag.styles.js +4 -4
- package/dist/components/views/UChartView.d.ts +39 -0
- package/dist/components/views/UChartView.js +167 -0
- package/dist/components/views/UChartView.styles.js +86 -0
- package/dist/components/views/UImagesView.d.ts +33 -0
- package/dist/components/views/UImagesView.js +144 -0
- package/dist/components/views/UImagesView.styles.d.ts +1 -0
- package/dist/components/views/UImagesView.styles.js +219 -0
- package/dist/components/views/UMapView.d.ts +24 -0
- package/dist/components/views/UMapView.js +45 -0
- package/dist/components/views/UMapView.styles.d.ts +1 -0
- package/dist/components/views/UMapView.styles.js +47 -0
- package/dist/components/views/UVideoView.d.ts +25 -0
- package/dist/components/views/UVideoView.js +81 -0
- package/dist/components/views/UVideoView.styles.d.ts +1 -0
- package/dist/components/views/UVideoView.styles.js +36 -0
- package/dist/components/views/UView.d.ts +46 -0
- package/dist/components/views/UView.js +113 -0
- package/dist/components/views/UView.styles.d.ts +1 -0
- package/dist/components/views/UView.styles.js +33 -0
- package/dist/events/AttachEvent.d.ts +9 -0
- package/dist/events/ChoiceEvent.d.ts +9 -0
- package/dist/events/SendEvent.d.ts +7 -0
- package/dist/events/StopEvent.d.ts +7 -0
- package/dist/index.d.ts +15 -6
- package/dist/index.js +28 -38
- package/dist/react/UAttachButton.d.ts +11 -0
- package/dist/react/UAttachButton.js +12 -0
- package/dist/react/UChartView.d.ts +9 -0
- package/dist/react/UChartView.js +10 -0
- package/dist/react/UCodeBlock.d.ts +9 -0
- package/dist/react/UCodeBlock.js +10 -0
- package/dist/react/UCopyButton.d.ts +9 -0
- package/dist/react/UCopyButton.js +10 -0
- package/dist/react/UFileBlock.d.ts +11 -0
- package/dist/react/UFileBlock.js +12 -0
- package/dist/react/UImagesView.d.ts +9 -0
- package/dist/react/UImagesView.js +10 -0
- package/dist/react/UJsonBlock.d.ts +9 -0
- package/dist/react/UJsonBlock.js +10 -0
- package/dist/react/UMapView.d.ts +9 -0
- package/dist/react/UMapView.js +10 -0
- package/dist/react/UMarkedBlock.d.ts +9 -0
- package/dist/react/UMarkedBlock.js +10 -0
- package/dist/react/UMessage.d.ts +9 -0
- package/dist/react/UMessage.js +10 -0
- package/dist/react/UPrompt.d.ts +13 -0
- package/dist/react/UPrompt.js +13 -0
- package/dist/react/UQuestionIntent.d.ts +11 -0
- package/dist/react/UQuestionIntent.js +12 -0
- package/dist/react/URefBlock.d.ts +9 -0
- package/dist/react/URefBlock.js +10 -0
- package/dist/react/URefCard.d.ts +9 -0
- package/dist/react/URefCard.js +10 -0
- package/dist/react/URefCardGroup.d.ts +9 -0
- package/dist/react/URefCardGroup.js +10 -0
- package/dist/react/URefTag.d.ts +9 -0
- package/dist/react/URefTag.js +10 -0
- package/dist/react/UTableBlock.d.ts +9 -0
- package/dist/react/UTableBlock.js +10 -0
- package/dist/react/UTextBlock.d.ts +9 -0
- package/dist/react/UTextBlock.js +10 -0
- package/dist/react/UThinkBlock.d.ts +9 -0
- package/dist/react/UThinkBlock.js +10 -0
- package/dist/react/UToolBlock.d.ts +9 -0
- package/dist/react/UToolBlock.js +10 -0
- package/dist/react/UVideoView.d.ts +9 -0
- package/dist/react/UVideoView.js +10 -0
- package/dist/react/UView.d.ts +9 -0
- package/dist/react/UView.js +10 -0
- package/dist/react/UVoteButton.d.ts +9 -0
- package/dist/react/UVoteButton.js +10 -0
- package/dist/react/index.d.ts +23 -0
- package/dist/react/index.js +23 -0
- package/dist/types/BlockItem.d.ts +21 -1
- package/dist/types/Intents.d.ts +26 -0
- package/dist/types/Intents.js +30 -0
- package/dist/types/JsonSchema.d.ts +59 -0
- package/dist/types/Views.d.ts +34 -0
- package/dist/types/Views.js +150 -0
- package/dist/utilities/IntentPromptBuilder.d.ts +40 -0
- package/dist/utilities/IntentPromptBuilder.js +95 -0
- package/dist/utilities/ViewPromptBuilder.d.ts +28 -0
- package/dist/utilities/ViewPromptBuilder.js +76 -0
- package/dist/utilities/dom-agent/DOMAgent.d.ts +74 -0
- package/dist/utilities/dom-agent/DOMController.d.ts +78 -0
- package/dist/utilities/dom-agent/DOMPromptBuilder.d.ts +54 -0
- package/dist/utilities/dom-agent/DOMScanner.d.ts +83 -0
- package/dist/utilities/dom-agent/index.d.ts +9 -0
- package/dist/utilities/dom-agent/types.d.ts +209 -0
- package/package.json +34 -18
- package/dist/components/blocks/UCodeBlock.component.d.ts +0 -23
- package/dist/components/blocks/UCodeBlock.component.js +0 -76
- package/dist/components/blocks/UJsonBlock.component.d.ts +0 -45
- package/dist/components/blocks/UJsonBlock.component.js +0 -140
- package/dist/components/blocks/UMarkedBlock.component.d.ts +0 -45
- package/dist/components/blocks/UMarkedBlock.component.js +0 -129
- package/dist/components/blocks/URefBlock.component.d.ts +0 -17
- package/dist/components/blocks/URefBlock.component.js +0 -74
- package/dist/components/blocks/UTextBlock.component.d.ts +0 -37
- package/dist/components/blocks/UTextBlock.component.js +0 -123
- package/dist/components/blocks/UThinkBlock.component.d.ts +0 -23
- package/dist/components/blocks/UThinkBlock.component.js +0 -90
- package/dist/components/blocks/UToolBlock.component.d.ts +0 -20
- package/dist/components/blocks/UToolBlock.component.js +0 -80
- package/dist/components/buttons/UAttachButton.component.d.ts +0 -22
- package/dist/components/buttons/UAttachButton.component.js +0 -89
- package/dist/components/buttons/UCopyButton.component.d.ts +0 -20
- package/dist/components/buttons/UCopyButton.component.js +0 -81
- package/dist/components/buttons/UReportButton.component.d.ts +0 -9
- package/dist/components/buttons/UReportButton.component.js +0 -36
- package/dist/components/buttons/UReportButton.d.ts +0 -7
- package/dist/components/buttons/UReportButton.js +0 -5
- package/dist/components/buttons/UReportButton.styles.js +0 -14
- package/dist/components/buttons/URetryButton.component.d.ts +0 -11
- package/dist/components/buttons/URetryButton.component.js +0 -53
- package/dist/components/buttons/URetryButton.d.ts +0 -7
- package/dist/components/buttons/URetryButton.js +0 -5
- package/dist/components/buttons/URetryButton.styles.js +0 -26
- package/dist/components/buttons/UShareButton.component.d.ts +0 -9
- package/dist/components/buttons/UShareButton.component.js +0 -36
- package/dist/components/buttons/UShareButton.d.ts +0 -7
- package/dist/components/buttons/UShareButton.js +0 -5
- package/dist/components/buttons/UShareButton.styles.js +0 -14
- package/dist/components/buttons/UVoteButton.component.d.ts +0 -15
- package/dist/components/buttons/UVoteButton.component.js +0 -70
- package/dist/components/loaders/UDotLoader.component.d.ts +0 -9
- package/dist/components/loaders/UDotLoader.component.js +0 -23
- package/dist/components/loaders/UDotLoader.d.ts +0 -7
- package/dist/components/loaders/UDotLoader.js +0 -5
- package/dist/components/loaders/UDotLoader.styles.js +0 -50
- package/dist/components/message/UMessage.component.d.ts +0 -19
- package/dist/components/message/UMessage.component.js +0 -90
- package/dist/components/prompt/UPrompt.component.d.ts +0 -25
- package/dist/components/prompt/UPrompt.component.js +0 -113
- package/dist/components/references/URefCard.component.d.ts +0 -24
- package/dist/components/references/URefCard.component.js +0 -105
- package/dist/components/references/URefCardGroup.component.d.ts +0 -25
- package/dist/components/references/URefCardGroup.component.js +0 -88
- package/dist/components/references/URefTag.component.d.ts +0 -13
- package/dist/components/references/URefTag.component.js +0 -54
- package/dist/events/UCancelEvent.d.ts +0 -6
- package/dist/events/USubmitEvent.d.ts +0 -6
- package/dist/utilities/converters.d.ts +0 -9
- package/dist/utilities/converters.js +0 -19
- /package/dist/components/{buttons/UReportButton.styles.d.ts → blocks/UFileBlock.styles.d.ts} +0 -0
- /package/dist/components/{buttons/URetryButton.styles.d.ts → blocks/UTableBlock.styles.d.ts} +0 -0
- /package/dist/components/{buttons/UShareButton.styles.d.ts → intents/UQuestionIntent.styles.d.ts} +0 -0
- /package/dist/components/{loaders/UDotLoader.styles.d.ts → views/UChartView.styles.d.ts} +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
2
|
-
import { JsonNode } from '../../types/JsonNode.js';
|
|
3
|
-
/**
|
|
4
|
-
* 툴 사용 블록 컴포넌트입니다.
|
|
5
|
-
*/
|
|
6
|
-
export declare class UToolBlock extends BaseElement {
|
|
7
|
-
static styles: import('lit').CSSResultGroup[];
|
|
8
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
9
|
-
/** 로딩 상태 */
|
|
10
|
-
loading: boolean;
|
|
11
|
-
/** 블록 접힘 여부 */
|
|
12
|
-
collapsed: boolean;
|
|
13
|
-
/** 헤딩 텍스트 */
|
|
14
|
-
heading?: string;
|
|
15
|
-
/** 입력 데이터 (JSON Object) */
|
|
16
|
-
input?: JsonNode;
|
|
17
|
-
/** 출력 데이터 (JSON Object) */
|
|
18
|
-
output?: JsonNode;
|
|
19
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
20
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
4
|
-
import { UIcon } from '@iyulab/components/dist/components/icon/UIcon.component.js';
|
|
5
|
-
import { USpinner } from '@iyulab/components/dist/components/spinner/USpinner.component.js';
|
|
6
|
-
import { UJsonBlock } from './UJsonBlock.component.js';
|
|
7
|
-
import { jsonAttrConverter } from '../../utilities/converters.js';
|
|
8
|
-
import { styles } from './UToolBlock.styles.js';
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
12
|
-
var result = void 0 ;
|
|
13
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
14
|
-
if (decorator = decorators[i])
|
|
15
|
-
result = (decorator(target, key, result) ) || result;
|
|
16
|
-
if (result) __defProp(target, key, result);
|
|
17
|
-
return result;
|
|
18
|
-
};
|
|
19
|
-
class UToolBlock extends BaseElement {
|
|
20
|
-
constructor() {
|
|
21
|
-
super(...arguments);
|
|
22
|
-
this.loading = false;
|
|
23
|
-
this.collapsed = true;
|
|
24
|
-
}
|
|
25
|
-
static {
|
|
26
|
-
this.styles = [super.styles, styles];
|
|
27
|
-
}
|
|
28
|
-
static {
|
|
29
|
-
this.dependencies = {
|
|
30
|
-
"u-icon": UIcon,
|
|
31
|
-
"u-spinner": USpinner,
|
|
32
|
-
"u-json-block": UJsonBlock
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
return html`
|
|
37
|
-
<div class="header" @click=${() => this.collapsed = !this.collapsed}>
|
|
38
|
-
${this.loading ? html`<u-spinner></u-spinner>` : html`<u-icon lib="internal" name="tools"></u-icon>`}
|
|
39
|
-
<div class="title">
|
|
40
|
-
${this.heading || "Tool Usage"}
|
|
41
|
-
</div>
|
|
42
|
-
<u-icon
|
|
43
|
-
lib="internal"
|
|
44
|
-
name=${this.collapsed ? "plus-lg" : "dash-lg"}
|
|
45
|
-
></u-icon>
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<div class="body" part="body" scrollable ?hidden=${this.collapsed}>
|
|
49
|
-
<div class="input-view" ?hidden=${!this.input}>
|
|
50
|
-
<u-json-block
|
|
51
|
-
.value=${this.input || {}}
|
|
52
|
-
></u-json-block>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="output-view" ?hidden=${!this.output}>
|
|
55
|
-
<u-icon lib="internal" name="chevron-down"></u-icon>
|
|
56
|
-
<u-json-block
|
|
57
|
-
.value=${this.output || {}}
|
|
58
|
-
></u-json-block>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
`;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
__decorateClass([
|
|
65
|
-
property({ type: Boolean, reflect: true })
|
|
66
|
-
], UToolBlock.prototype, "loading");
|
|
67
|
-
__decorateClass([
|
|
68
|
-
property({ type: Boolean, reflect: true })
|
|
69
|
-
], UToolBlock.prototype, "collapsed");
|
|
70
|
-
__decorateClass([
|
|
71
|
-
property({ type: String })
|
|
72
|
-
], UToolBlock.prototype, "heading");
|
|
73
|
-
__decorateClass([
|
|
74
|
-
property({ type: Object, converter: jsonAttrConverter })
|
|
75
|
-
], UToolBlock.prototype, "input");
|
|
76
|
-
__decorateClass([
|
|
77
|
-
property({ type: Object, converter: jsonAttrConverter })
|
|
78
|
-
], UToolBlock.prototype, "output");
|
|
79
|
-
|
|
80
|
-
export { UToolBlock };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
2
|
-
/**
|
|
3
|
-
* 파일 첨부 버튼 컴포넌트입니다.
|
|
4
|
-
*/
|
|
5
|
-
export declare class UAttachButton extends BaseElement {
|
|
6
|
-
static styles: import('lit').CSSResultGroup[];
|
|
7
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
8
|
-
input?: HTMLInputElement;
|
|
9
|
-
/** 첨부 파일 유형 제한, 컴마로 구분된 MIME 타입 문자열 (예: "image/*,application/pdf") */
|
|
10
|
-
accept?: string;
|
|
11
|
-
/** 다중 파일 선택 가능 여부 */
|
|
12
|
-
multiple: boolean;
|
|
13
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
14
|
-
/**
|
|
15
|
-
* 버튼 클릭 핸들러
|
|
16
|
-
*/
|
|
17
|
-
private handleButtonClick;
|
|
18
|
-
/**
|
|
19
|
-
* 파일 선택 이벤트 핸들러
|
|
20
|
-
*/
|
|
21
|
-
private handleInputChange;
|
|
22
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { query, property } from 'lit/decorators.js';
|
|
3
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
4
|
-
import { UIcon } from '@iyulab/components/dist/components/icon/UIcon.component.js';
|
|
5
|
-
import { UButton } from '@iyulab/components/dist/components/button/UButton.component.js';
|
|
6
|
-
import { UTooltip } from '@iyulab/components/dist/components/tooltip/UTooltip.component.js';
|
|
7
|
-
import { styles } from './UAttachButton.styles.js';
|
|
8
|
-
|
|
9
|
-
var __defProp = Object.defineProperty;
|
|
10
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
-
var result = void 0 ;
|
|
12
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
-
if (decorator = decorators[i])
|
|
14
|
-
result = (decorator(target, key, result) ) || result;
|
|
15
|
-
if (result) __defProp(target, key, result);
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
|
-
class UAttachButton extends BaseElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.multiple = false;
|
|
22
|
-
/**
|
|
23
|
-
* 버튼 클릭 핸들러
|
|
24
|
-
*/
|
|
25
|
-
this.handleButtonClick = () => {
|
|
26
|
-
if (!this.input) return;
|
|
27
|
-
this.input.click();
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* 파일 선택 이벤트 핸들러
|
|
31
|
-
*/
|
|
32
|
-
this.handleInputChange = (e) => {
|
|
33
|
-
e.preventDefault();
|
|
34
|
-
e.stopPropagation();
|
|
35
|
-
const target = e.target;
|
|
36
|
-
const files = target.files;
|
|
37
|
-
if (!files || files.length === 0) return;
|
|
38
|
-
this.emit("u-change", {
|
|
39
|
-
files: Array.from(files)
|
|
40
|
-
});
|
|
41
|
-
target.value = "";
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
static {
|
|
45
|
-
this.styles = [super.styles, styles];
|
|
46
|
-
}
|
|
47
|
-
static {
|
|
48
|
-
this.dependencies = {
|
|
49
|
-
"u-icon": UIcon,
|
|
50
|
-
"u-button": UButton,
|
|
51
|
-
"u-tooltip": UTooltip
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
return html`
|
|
56
|
-
<u-button part="base"
|
|
57
|
-
variant="borderless"
|
|
58
|
-
@click=${this.handleButtonClick}>
|
|
59
|
-
<u-icon part="icon"
|
|
60
|
-
lib="internal"
|
|
61
|
-
name="paperclip"
|
|
62
|
-
></u-icon>
|
|
63
|
-
</u-button>
|
|
64
|
-
|
|
65
|
-
<u-tooltip for="u-button" placement="bottom" distance="8">
|
|
66
|
-
<slot></slot>
|
|
67
|
-
</u-tooltip>
|
|
68
|
-
|
|
69
|
-
<input
|
|
70
|
-
hidden
|
|
71
|
-
type="file"
|
|
72
|
-
?multiple=${this.multiple}
|
|
73
|
-
.accept=${this.accept || "*"}
|
|
74
|
-
@change=${this.handleInputChange}
|
|
75
|
-
/>
|
|
76
|
-
`;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
__decorateClass([
|
|
80
|
-
query('input[type="file"]')
|
|
81
|
-
], UAttachButton.prototype, "input");
|
|
82
|
-
__decorateClass([
|
|
83
|
-
property({ type: String })
|
|
84
|
-
], UAttachButton.prototype, "accept");
|
|
85
|
-
__decorateClass([
|
|
86
|
-
property({ type: Boolean })
|
|
87
|
-
], UAttachButton.prototype, "multiple");
|
|
88
|
-
|
|
89
|
-
export { UAttachButton };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
2
|
-
/**
|
|
3
|
-
* 클릭 시 클립보드에 텍스트를 복사하는 버튼입니다. 복사 상태를 표시하기 위해 아이콘이 변경됩니다.
|
|
4
|
-
*/
|
|
5
|
-
export declare class UCopyButton extends BaseElement {
|
|
6
|
-
static styles: import('lit').CSSResultGroup[];
|
|
7
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
8
|
-
/** 클립보드 복사 상태를 나타내는 플래그입니다. */
|
|
9
|
-
isCopied: boolean;
|
|
10
|
-
/** 클립보드 복사 후 재사용 대기 시간 (ms) */
|
|
11
|
-
delay: number;
|
|
12
|
-
/** 복사할 텍스트를 설정합니다. */
|
|
13
|
-
value?: string;
|
|
14
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
15
|
-
/**
|
|
16
|
-
* 클립보드에 텍스트를 복사하는 메서드입니다.
|
|
17
|
-
* 복사 후 재사용 대기 시간이 설정되어 있으면, 일정 시간 후에 복사 가능 상태로 되돌립니다.
|
|
18
|
-
*/
|
|
19
|
-
private copyToClipboard;
|
|
20
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { state, property } from 'lit/decorators.js';
|
|
3
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
4
|
-
import { UIcon } from '@iyulab/components/dist/components/icon/UIcon.component.js';
|
|
5
|
-
import { UButton } from '@iyulab/components/dist/components/button/UButton.component.js';
|
|
6
|
-
import { UTooltip } from '@iyulab/components/dist/components/tooltip/UTooltip.component.js';
|
|
7
|
-
import { styles } from './UCopyButton.styles.js';
|
|
8
|
-
|
|
9
|
-
var __defProp = Object.defineProperty;
|
|
10
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
-
var result = void 0 ;
|
|
12
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
-
if (decorator = decorators[i])
|
|
14
|
-
result = (decorator(target, key, result) ) || result;
|
|
15
|
-
if (result) __defProp(target, key, result);
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
|
-
class UCopyButton extends BaseElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.isCopied = false;
|
|
22
|
-
this.delay = 1e3;
|
|
23
|
-
/**
|
|
24
|
-
* 클립보드에 텍스트를 복사하는 메서드입니다.
|
|
25
|
-
* 복사 후 재사용 대기 시간이 설정되어 있으면, 일정 시간 후에 복사 가능 상태로 되돌립니다.
|
|
26
|
-
*/
|
|
27
|
-
this.copyToClipboard = async () => {
|
|
28
|
-
if (!this.value) return;
|
|
29
|
-
if (this.isCopied) return;
|
|
30
|
-
try {
|
|
31
|
-
await window.navigator.clipboard.writeText(this.value);
|
|
32
|
-
if (this.delay <= 0) return;
|
|
33
|
-
this.isCopied = true;
|
|
34
|
-
setTimeout(() => {
|
|
35
|
-
this.isCopied = false;
|
|
36
|
-
}, this.delay);
|
|
37
|
-
} catch (error) {
|
|
38
|
-
console.error("Failed to copy text to clipboard:", error);
|
|
39
|
-
this.isCopied = false;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
static {
|
|
44
|
-
this.styles = [super.styles, styles];
|
|
45
|
-
}
|
|
46
|
-
static {
|
|
47
|
-
this.dependencies = {
|
|
48
|
-
"u-icon": UIcon,
|
|
49
|
-
"u-button": UButton,
|
|
50
|
-
"u-tooltip": UTooltip
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
render() {
|
|
54
|
-
return html`
|
|
55
|
-
<u-button part="base"
|
|
56
|
-
variant="borderless"
|
|
57
|
-
?disabled=${this.isCopied}
|
|
58
|
-
@click=${this.copyToClipboard}>
|
|
59
|
-
<u-icon part="icon"
|
|
60
|
-
lib="internal"
|
|
61
|
-
name=${this.isCopied ? "check-lg" : "copy"}
|
|
62
|
-
></u-icon>
|
|
63
|
-
</u-button>
|
|
64
|
-
|
|
65
|
-
<u-tooltip for="u-button" placement="bottom" distance="8">
|
|
66
|
-
<slot></slot>
|
|
67
|
-
</u-tooltip>
|
|
68
|
-
`;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
__decorateClass([
|
|
72
|
-
state()
|
|
73
|
-
], UCopyButton.prototype, "isCopied");
|
|
74
|
-
__decorateClass([
|
|
75
|
-
property({ type: Number })
|
|
76
|
-
], UCopyButton.prototype, "delay");
|
|
77
|
-
__decorateClass([
|
|
78
|
-
property({ type: String })
|
|
79
|
-
], UCopyButton.prototype, "value");
|
|
80
|
-
|
|
81
|
-
export { UCopyButton };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
2
|
-
/**
|
|
3
|
-
* 메시지 신고 버튼 컴포넌트입니다.
|
|
4
|
-
*/
|
|
5
|
-
export declare class UReportButton extends BaseElement {
|
|
6
|
-
static styles: import('lit').CSSResultGroup[];
|
|
7
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
8
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
9
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
3
|
-
import { UIcon } from '@iyulab/components/dist/components/icon/UIcon.component.js';
|
|
4
|
-
import { UButton } from '@iyulab/components/dist/components/button/UButton.component.js';
|
|
5
|
-
import { UTooltip } from '@iyulab/components/dist/components/tooltip/UTooltip.component.js';
|
|
6
|
-
import { styles } from './UReportButton.styles.js';
|
|
7
|
-
|
|
8
|
-
class UReportButton extends BaseElement {
|
|
9
|
-
static {
|
|
10
|
-
this.styles = [super.styles, styles];
|
|
11
|
-
}
|
|
12
|
-
static {
|
|
13
|
-
this.dependencies = {
|
|
14
|
-
"u-icon": UIcon,
|
|
15
|
-
"u-button": UButton,
|
|
16
|
-
"u-tooltip": UTooltip
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return html`
|
|
21
|
-
<u-button part="base"
|
|
22
|
-
variant="borderless">
|
|
23
|
-
<u-icon part="icon"
|
|
24
|
-
lib="internal"
|
|
25
|
-
name="flag"
|
|
26
|
-
></u-icon>
|
|
27
|
-
</u-button>
|
|
28
|
-
|
|
29
|
-
<u-tooltip for="u-button" placement="bottom" distance="8">
|
|
30
|
-
<slot></slot>
|
|
31
|
-
</u-tooltip>
|
|
32
|
-
`;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { UReportButton };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
2
|
-
/**
|
|
3
|
-
* 메시지 재시도 버튼 컴포넌트입니다.
|
|
4
|
-
*/
|
|
5
|
-
export declare class URetryButton extends BaseElement {
|
|
6
|
-
static styles: import('lit').CSSResultGroup[];
|
|
7
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
8
|
-
/** 재생성 중인지 여부 */
|
|
9
|
-
loading: boolean;
|
|
10
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
11
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
4
|
-
import { UIcon } from '@iyulab/components/dist/components/icon/UIcon.component.js';
|
|
5
|
-
import { UButton } from '@iyulab/components/dist/components/button/UButton.component.js';
|
|
6
|
-
import { UTooltip } from '@iyulab/components/dist/components/tooltip/UTooltip.component.js';
|
|
7
|
-
import { styles } from './URetryButton.styles.js';
|
|
8
|
-
|
|
9
|
-
var __defProp = Object.defineProperty;
|
|
10
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
-
var result = void 0 ;
|
|
12
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
-
if (decorator = decorators[i])
|
|
14
|
-
result = (decorator(target, key, result) ) || result;
|
|
15
|
-
if (result) __defProp(target, key, result);
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
|
-
class URetryButton extends BaseElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.loading = false;
|
|
22
|
-
}
|
|
23
|
-
static {
|
|
24
|
-
this.styles = [super.styles, styles];
|
|
25
|
-
}
|
|
26
|
-
static {
|
|
27
|
-
this.dependencies = {
|
|
28
|
-
"u-icon": UIcon,
|
|
29
|
-
"u-button": UButton,
|
|
30
|
-
"u-tooltip": UTooltip
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
return html`
|
|
35
|
-
<u-button part="base"
|
|
36
|
-
variant="borderless">
|
|
37
|
-
<u-icon part="icon"
|
|
38
|
-
lib="internal"
|
|
39
|
-
name="arrow-repeat"
|
|
40
|
-
></u-icon>
|
|
41
|
-
</u-button>
|
|
42
|
-
|
|
43
|
-
<u-tooltip for="u-button" placement="bottom" distance="8">
|
|
44
|
-
<slot></slot>
|
|
45
|
-
</u-tooltip>
|
|
46
|
-
`;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
__decorateClass([
|
|
50
|
-
property({ type: Boolean, reflect: true })
|
|
51
|
-
], URetryButton.prototype, "loading");
|
|
52
|
-
|
|
53
|
-
export { URetryButton };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
const styles = css`
|
|
4
|
-
:host(:empty) u-tooltip {
|
|
5
|
-
display: none;
|
|
6
|
-
}
|
|
7
|
-
:host([loading]) u-icon {
|
|
8
|
-
animation: spin 1s linear infinite;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
u-button {
|
|
12
|
-
color: var(--u-txt-color-weak);
|
|
13
|
-
font-size: 16px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@keyframes spin {
|
|
17
|
-
from {
|
|
18
|
-
transform: rotate(0deg);
|
|
19
|
-
}
|
|
20
|
-
to {
|
|
21
|
-
transform: rotate(360deg);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
export { styles };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
2
|
-
/**
|
|
3
|
-
* 메시지 공유하기 버튼 컴포넌트입니다.
|
|
4
|
-
*/
|
|
5
|
-
export declare class UShareButton extends BaseElement {
|
|
6
|
-
static styles: import('lit').CSSResultGroup[];
|
|
7
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
8
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
9
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
3
|
-
import { UIcon } from '@iyulab/components/dist/components/icon/UIcon.component.js';
|
|
4
|
-
import { UButton } from '@iyulab/components/dist/components/button/UButton.component.js';
|
|
5
|
-
import { UTooltip } from '@iyulab/components/dist/components/tooltip/UTooltip.component.js';
|
|
6
|
-
import { styles } from './UShareButton.styles.js';
|
|
7
|
-
|
|
8
|
-
class UShareButton extends BaseElement {
|
|
9
|
-
static {
|
|
10
|
-
this.styles = [super.styles, styles];
|
|
11
|
-
}
|
|
12
|
-
static {
|
|
13
|
-
this.dependencies = {
|
|
14
|
-
"u-icon": UIcon,
|
|
15
|
-
"u-button": UButton,
|
|
16
|
-
"u-tooltip": UTooltip
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return html`
|
|
21
|
-
<u-button part="base"
|
|
22
|
-
variant="borderless">
|
|
23
|
-
<u-icon part="icon"
|
|
24
|
-
lib="internal"
|
|
25
|
-
name="share"
|
|
26
|
-
></u-icon>
|
|
27
|
-
</u-button>
|
|
28
|
-
|
|
29
|
-
<u-tooltip for="u-button" placement="bottom" distance="8">
|
|
30
|
-
<slot></slot>
|
|
31
|
-
</u-tooltip>
|
|
32
|
-
`;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { UShareButton };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
2
|
-
/** 투표 상태 타입 */
|
|
3
|
-
export type VoteValue = 'none' | 'up' | 'down';
|
|
4
|
-
/**
|
|
5
|
-
* 투표 버튼 컴포넌트입니다.
|
|
6
|
-
*/
|
|
7
|
-
export declare class UVoteButton extends BaseElement {
|
|
8
|
-
static styles: import('lit').CSSResultGroup[];
|
|
9
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
10
|
-
/** 현재 투표 상태 */
|
|
11
|
-
value: VoteValue;
|
|
12
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
13
|
-
private handleUpButtonClick;
|
|
14
|
-
private handleDownButtonClick;
|
|
15
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
4
|
-
import { UIcon } from '@iyulab/components/dist/components/icon/UIcon.component.js';
|
|
5
|
-
import { UButton } from '@iyulab/components/dist/components/button/UButton.component.js';
|
|
6
|
-
import { UTooltip } from '@iyulab/components/dist/components/tooltip/UTooltip.component.js';
|
|
7
|
-
import { styles } from './UVoteButton.styles.js';
|
|
8
|
-
|
|
9
|
-
var __defProp = Object.defineProperty;
|
|
10
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
-
var result = void 0 ;
|
|
12
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
-
if (decorator = decorators[i])
|
|
14
|
-
result = (decorator(target, key, result) ) || result;
|
|
15
|
-
if (result) __defProp(target, key, result);
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
|
-
class UVoteButton extends BaseElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.value = "none";
|
|
22
|
-
this.handleUpButtonClick = () => {
|
|
23
|
-
this.value = this.value === "up" ? "none" : "up";
|
|
24
|
-
this.emit("u-change", { value: this.value });
|
|
25
|
-
};
|
|
26
|
-
this.handleDownButtonClick = () => {
|
|
27
|
-
this.value = this.value === "down" ? "none" : "down";
|
|
28
|
-
this.emit("u-change", { value: this.value });
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
static {
|
|
32
|
-
this.styles = [super.styles, styles];
|
|
33
|
-
}
|
|
34
|
-
static {
|
|
35
|
-
this.dependencies = {
|
|
36
|
-
"u-icon": UIcon,
|
|
37
|
-
"u-button": UButton,
|
|
38
|
-
"u-tooltip": UTooltip
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
render() {
|
|
42
|
-
return html`
|
|
43
|
-
<u-button class="up-btn" part="up-btn"
|
|
44
|
-
variant="borderless"
|
|
45
|
-
@click=${this.handleUpButtonClick}>
|
|
46
|
-
<u-icon part="icon"
|
|
47
|
-
lib="internal"
|
|
48
|
-
name=${this.value === "up" ? "hand-thumbs-up-fill" : "hand-thumbs-up"}
|
|
49
|
-
></u-icon>
|
|
50
|
-
</u-button>
|
|
51
|
-
<u-button class="down-btn" part="down-btn"
|
|
52
|
-
variant="borderless"
|
|
53
|
-
@click=${this.handleDownButtonClick}>
|
|
54
|
-
<u-icon part="icon"
|
|
55
|
-
lib="internal"
|
|
56
|
-
name=${this.value === "down" ? "hand-thumbs-down-fill" : "hand-thumbs-down"}
|
|
57
|
-
></u-icon>
|
|
58
|
-
</u-button>
|
|
59
|
-
|
|
60
|
-
<u-tooltip for="u-button" placement="bottom" distance="8">
|
|
61
|
-
<slot></slot>
|
|
62
|
-
</u-tooltip>
|
|
63
|
-
`;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
__decorateClass([
|
|
67
|
-
property({ type: String })
|
|
68
|
-
], UVoteButton.prototype, "value");
|
|
69
|
-
|
|
70
|
-
export { UVoteButton };
|