@iyulab/chat-components 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/CHANGELOG.md +83 -52
  2. package/README.md +133 -16
  3. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js +9 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.124.0/helpers/decorateMetadata.js +6 -0
  5. package/dist/_virtual/_glob-assets_raw/intent-prompt.md.1907474e.js +4 -0
  6. package/dist/_virtual/_glob-assets_raw/view-prompt.md.e0dbcffe.js +4 -0
  7. package/dist/components/blocks/UCodeBlock.d.ts +24 -2
  8. package/dist/components/blocks/UCodeBlock.js +65 -2
  9. package/dist/components/blocks/UCodeBlock.styles.js +4 -4
  10. package/dist/components/blocks/UFileBlock.d.ts +33 -0
  11. package/dist/components/blocks/UFileBlock.js +154 -0
  12. package/dist/components/blocks/{UFilesBlock.styles.js → UFileBlock.styles.js} +12 -90
  13. package/dist/components/blocks/UJsonBlock.d.ts +44 -2
  14. package/dist/components/blocks/UJsonBlock.js +128 -3
  15. package/dist/components/blocks/UJsonBlock.styles.js +4 -4
  16. package/dist/components/blocks/UMarkedBlock.d.ts +44 -2
  17. package/dist/components/blocks/UMarkedBlock.js +154 -4
  18. package/dist/components/blocks/UMarkedBlock.styles.js +4 -4
  19. package/dist/components/blocks/URefBlock.d.ts +16 -2
  20. package/dist/components/blocks/URefBlock.js +58 -3
  21. package/dist/components/blocks/URefBlock.styles.js +4 -4
  22. package/dist/components/blocks/UTableBlock.d.ts +47 -2
  23. package/dist/components/blocks/UTableBlock.js +197 -4
  24. package/dist/components/blocks/UTableBlock.styles.js +4 -5
  25. package/dist/components/blocks/UTextBlock.d.ts +36 -2
  26. package/dist/components/blocks/UTextBlock.js +94 -4
  27. package/dist/components/blocks/UTextBlock.styles.js +4 -4
  28. package/dist/components/blocks/UThinkBlock.d.ts +30 -2
  29. package/dist/components/blocks/UThinkBlock.js +86 -4
  30. package/dist/components/blocks/UThinkBlock.styles.js +4 -4
  31. package/dist/components/blocks/UToolBlock.d.ts +19 -2
  32. package/dist/components/blocks/UToolBlock.js +68 -3
  33. package/dist/components/blocks/UToolBlock.styles.js +4 -4
  34. package/dist/components/buttons/UAttachButton.d.ts +21 -2
  35. package/dist/components/buttons/UAttachButton.js +61 -3
  36. package/dist/components/buttons/UAttachButton.styles.js +4 -4
  37. package/dist/components/buttons/UCopyButton.d.ts +19 -2
  38. package/dist/components/buttons/UCopyButton.js +57 -3
  39. package/dist/components/buttons/UCopyButton.styles.js +4 -4
  40. package/dist/components/buttons/UVoteButton.d.ts +14 -3
  41. package/dist/components/buttons/UVoteButton.js +62 -3
  42. package/dist/components/buttons/UVoteButton.styles.js +4 -4
  43. package/dist/components/{actions/UQuestionAction.component.d.ts → intents/UQuestionIntent.d.ts} +6 -2
  44. package/dist/components/intents/UQuestionIntent.js +41 -0
  45. package/dist/components/{actions/UQuestionAction.styles.js → intents/UQuestionIntent.styles.js} +4 -6
  46. package/dist/components/message/UMessage.d.ts +18 -2
  47. package/dist/components/message/UMessage.js +47 -2
  48. package/dist/components/message/UMessage.styles.js +4 -4
  49. package/dist/components/prompt/UPrompt.d.ts +37 -2
  50. package/dist/components/prompt/UPrompt.js +139 -2
  51. package/dist/components/prompt/UPrompt.styles.js +15 -5
  52. package/dist/components/references/URefCard.d.ts +30 -2
  53. package/dist/components/references/URefCard.js +97 -2
  54. package/dist/components/references/URefCard.styles.js +4 -4
  55. package/dist/components/references/URefCardGroup.d.ts +25 -2
  56. package/dist/components/references/URefCardGroup.js +69 -4
  57. package/dist/components/references/URefCardGroup.styles.js +4 -4
  58. package/dist/components/references/URefTag.d.ts +12 -2
  59. package/dist/components/references/URefTag.js +37 -2
  60. package/dist/components/references/URefTag.styles.js +4 -4
  61. package/dist/components/{widgets/UChartWidget.component.d.ts → views/UChartView.d.ts} +7 -4
  62. package/dist/components/views/UChartView.js +167 -0
  63. package/dist/components/{widgets/UChartWidget.styles.js → views/UChartView.styles.js} +4 -4
  64. package/dist/components/{widgets/UImagesWidget.component.d.ts → views/UImagesView.d.ts} +7 -4
  65. package/dist/components/views/UImagesView.js +144 -0
  66. package/dist/components/{widgets/UImagesWidget.styles.js → views/UImagesView.styles.js} +6 -5
  67. package/dist/components/{widgets/UMapWidget.component.d.ts → views/UMapView.d.ts} +7 -3
  68. package/dist/components/views/UMapView.js +45 -0
  69. package/dist/components/{widgets/UMapWidget.styles.js → views/UMapView.styles.js} +4 -4
  70. package/dist/components/{widgets/UVideoWidget.component.d.ts → views/UVideoView.d.ts} +7 -3
  71. package/dist/components/views/UVideoView.js +81 -0
  72. package/dist/components/{widgets/UVideoWidget.styles.js → views/UVideoView.styles.js} +4 -4
  73. package/dist/components/{widgets/UWidget.component.d.ts → views/UView.d.ts} +8 -5
  74. package/dist/components/views/UView.js +113 -0
  75. package/dist/components/{widgets/UWidget.styles.js → views/UView.styles.js} +4 -4
  76. package/dist/events/AttachEvent.d.ts +9 -0
  77. package/dist/events/ChoiceEvent.d.ts +9 -0
  78. package/dist/events/SendEvent.d.ts +21 -0
  79. package/dist/events/StopEvent.d.ts +17 -0
  80. package/dist/index.d.ts +13 -16
  81. package/dist/index.js +28 -56
  82. package/dist/react/UAttachButton.d.ts +11 -0
  83. package/dist/react/UAttachButton.js +12 -0
  84. package/dist/react/UChartView.d.ts +9 -0
  85. package/dist/react/UChartView.js +10 -0
  86. package/dist/react/UCodeBlock.d.ts +9 -0
  87. package/dist/react/UCodeBlock.js +10 -0
  88. package/dist/react/UCopyButton.d.ts +9 -0
  89. package/dist/react/UCopyButton.js +10 -0
  90. package/dist/react/UFileBlock.d.ts +11 -0
  91. package/dist/react/UFileBlock.js +12 -0
  92. package/dist/react/UImagesView.d.ts +9 -0
  93. package/dist/react/UImagesView.js +10 -0
  94. package/dist/react/UJsonBlock.d.ts +9 -0
  95. package/dist/react/UJsonBlock.js +10 -0
  96. package/dist/react/UMapView.d.ts +9 -0
  97. package/dist/react/UMapView.js +10 -0
  98. package/dist/react/UMarkedBlock.d.ts +9 -0
  99. package/dist/react/UMarkedBlock.js +10 -0
  100. package/dist/react/UMessage.d.ts +9 -0
  101. package/dist/react/UMessage.js +10 -0
  102. package/dist/react/UPrompt.d.ts +13 -0
  103. package/dist/react/UPrompt.js +13 -0
  104. package/dist/react/UQuestionIntent.d.ts +11 -0
  105. package/dist/react/UQuestionIntent.js +12 -0
  106. package/dist/react/URefBlock.d.ts +9 -0
  107. package/dist/react/URefBlock.js +10 -0
  108. package/dist/react/URefCard.d.ts +9 -0
  109. package/dist/react/URefCard.js +10 -0
  110. package/dist/react/URefCardGroup.d.ts +9 -0
  111. package/dist/react/URefCardGroup.js +10 -0
  112. package/dist/react/URefTag.d.ts +9 -0
  113. package/dist/react/URefTag.js +10 -0
  114. package/dist/react/UTableBlock.d.ts +9 -0
  115. package/dist/react/UTableBlock.js +10 -0
  116. package/dist/react/UTextBlock.d.ts +9 -0
  117. package/dist/react/UTextBlock.js +10 -0
  118. package/dist/react/UThinkBlock.d.ts +9 -0
  119. package/dist/react/UThinkBlock.js +10 -0
  120. package/dist/react/UToolBlock.d.ts +9 -0
  121. package/dist/react/UToolBlock.js +10 -0
  122. package/dist/react/UVideoView.d.ts +9 -0
  123. package/dist/react/UVideoView.js +10 -0
  124. package/dist/react/UView.d.ts +9 -0
  125. package/dist/react/UView.js +10 -0
  126. package/dist/react/UVoteButton.d.ts +9 -0
  127. package/dist/react/UVoteButton.js +10 -0
  128. package/dist/react/index.d.ts +23 -0
  129. package/dist/react/index.js +23 -0
  130. package/dist/types/BlockItem.d.ts +21 -32
  131. package/dist/types/Intents.d.ts +26 -0
  132. package/dist/types/Intents.js +30 -0
  133. package/dist/types/{Widgets.d.ts → Views.d.ts} +8 -8
  134. package/dist/types/Views.js +150 -0
  135. package/dist/utilities/IntentPromptBuilder.d.ts +40 -0
  136. package/dist/utilities/IntentPromptBuilder.js +95 -0
  137. package/dist/utilities/ViewPromptBuilder.d.ts +28 -0
  138. package/dist/utilities/ViewPromptBuilder.js +76 -0
  139. package/dist/utilities/dom-agent/DOMAgent.d.ts +74 -0
  140. package/dist/utilities/dom-agent/DOMController.d.ts +78 -0
  141. package/dist/utilities/dom-agent/DOMPromptBuilder.d.ts +54 -0
  142. package/dist/utilities/dom-agent/DOMScanner.d.ts +83 -0
  143. package/dist/utilities/dom-agent/index.d.ts +9 -0
  144. package/dist/utilities/dom-agent/types.d.ts +209 -0
  145. package/package.json +33 -16
  146. package/skills/iyulab-chat-components/SKILL.md +107 -0
  147. package/skills/iyulab-chat-components/references/components/attach-button.md +69 -0
  148. package/skills/iyulab-chat-components/references/components/chart-view.md +65 -0
  149. package/skills/iyulab-chat-components/references/components/code-block.md +42 -0
  150. package/skills/iyulab-chat-components/references/components/copy-button.md +46 -0
  151. package/skills/iyulab-chat-components/references/components/file-block.md +64 -0
  152. package/skills/iyulab-chat-components/references/components/images-view.md +63 -0
  153. package/skills/iyulab-chat-components/references/components/json-block.md +41 -0
  154. package/skills/iyulab-chat-components/references/components/map-view.md +54 -0
  155. package/skills/iyulab-chat-components/references/components/marked-block.md +53 -0
  156. package/skills/iyulab-chat-components/references/components/message.md +60 -0
  157. package/skills/iyulab-chat-components/references/components/prompt.md +102 -0
  158. package/skills/iyulab-chat-components/references/components/question-intent.md +75 -0
  159. package/skills/iyulab-chat-components/references/components/ref-block.md +45 -0
  160. package/skills/iyulab-chat-components/references/components/ref-card-group.md +41 -0
  161. package/skills/iyulab-chat-components/references/components/ref-card.md +48 -0
  162. package/skills/iyulab-chat-components/references/components/ref-tag.md +40 -0
  163. package/skills/iyulab-chat-components/references/components/table-block.md +63 -0
  164. package/skills/iyulab-chat-components/references/components/text-block.md +59 -0
  165. package/skills/iyulab-chat-components/references/components/think-block.md +48 -0
  166. package/skills/iyulab-chat-components/references/components/tool-block.md +57 -0
  167. package/skills/iyulab-chat-components/references/components/video-view.md +55 -0
  168. package/skills/iyulab-chat-components/references/components/view.md +51 -0
  169. package/skills/iyulab-chat-components/references/components/vote-button.md +60 -0
  170. package/skills/iyulab-chat-components/references/types.md +115 -0
  171. package/skills/iyulab-chat-components/references/usage.md +254 -0
  172. package/skills/iyulab-chat-components/references/utilities/intent-prompt-builder.md +123 -0
  173. package/skills/iyulab-chat-components/references/utilities/view-prompt-builder.md +112 -0
  174. package/dist/assets/action-prompt.md.js +0 -3
  175. package/dist/assets/widget-prompt.md.js +0 -3
  176. package/dist/components/actions/UQuestionAction.component.js +0 -58
  177. package/dist/components/actions/UQuestionAction.d.ts +0 -7
  178. package/dist/components/actions/UQuestionAction.js +0 -5
  179. package/dist/components/blocks/UCodeBlock.component.d.ts +0 -25
  180. package/dist/components/blocks/UCodeBlock.component.js +0 -88
  181. package/dist/components/blocks/UFilesBlock.component.d.ts +0 -22
  182. package/dist/components/blocks/UFilesBlock.component.js +0 -192
  183. package/dist/components/blocks/UFilesBlock.d.ts +0 -7
  184. package/dist/components/blocks/UFilesBlock.js +0 -5
  185. package/dist/components/blocks/UJsonBlock.component.d.ts +0 -45
  186. package/dist/components/blocks/UJsonBlock.component.js +0 -140
  187. package/dist/components/blocks/UMarkedBlock.component.d.ts +0 -40
  188. package/dist/components/blocks/UMarkedBlock.component.js +0 -159
  189. package/dist/components/blocks/URefBlock.component.d.ts +0 -17
  190. package/dist/components/blocks/URefBlock.component.js +0 -73
  191. package/dist/components/blocks/UTableBlock.component.d.ts +0 -49
  192. package/dist/components/blocks/UTableBlock.component.js +0 -228
  193. package/dist/components/blocks/UTextBlock.component.d.ts +0 -37
  194. package/dist/components/blocks/UTextBlock.component.js +0 -123
  195. package/dist/components/blocks/UThinkBlock.component.d.ts +0 -23
  196. package/dist/components/blocks/UThinkBlock.component.js +0 -90
  197. package/dist/components/blocks/UToolBlock.component.d.ts +0 -20
  198. package/dist/components/blocks/UToolBlock.component.js +0 -80
  199. package/dist/components/buttons/UAttachButton.component.d.ts +0 -22
  200. package/dist/components/buttons/UAttachButton.component.js +0 -89
  201. package/dist/components/buttons/UCopyButton.component.d.ts +0 -20
  202. package/dist/components/buttons/UCopyButton.component.js +0 -81
  203. package/dist/components/buttons/UReportButton.component.d.ts +0 -9
  204. package/dist/components/buttons/UReportButton.component.js +0 -36
  205. package/dist/components/buttons/UReportButton.d.ts +0 -7
  206. package/dist/components/buttons/UReportButton.js +0 -5
  207. package/dist/components/buttons/UReportButton.styles.js +0 -14
  208. package/dist/components/buttons/URetryButton.component.d.ts +0 -11
  209. package/dist/components/buttons/URetryButton.component.js +0 -53
  210. package/dist/components/buttons/URetryButton.d.ts +0 -7
  211. package/dist/components/buttons/URetryButton.js +0 -5
  212. package/dist/components/buttons/URetryButton.styles.js +0 -26
  213. package/dist/components/buttons/UShareButton.component.d.ts +0 -9
  214. package/dist/components/buttons/UShareButton.component.js +0 -36
  215. package/dist/components/buttons/UShareButton.d.ts +0 -7
  216. package/dist/components/buttons/UShareButton.js +0 -5
  217. package/dist/components/buttons/UShareButton.styles.js +0 -14
  218. package/dist/components/buttons/UVoteButton.component.d.ts +0 -15
  219. package/dist/components/buttons/UVoteButton.component.js +0 -73
  220. package/dist/components/message/UMessage.component.d.ts +0 -19
  221. package/dist/components/message/UMessage.component.js +0 -56
  222. package/dist/components/prompt/UPrompt.component.d.ts +0 -25
  223. package/dist/components/prompt/UPrompt.component.js +0 -113
  224. package/dist/components/references/URefCard.component.d.ts +0 -27
  225. package/dist/components/references/URefCard.component.js +0 -109
  226. package/dist/components/references/URefCardGroup.component.d.ts +0 -26
  227. package/dist/components/references/URefCardGroup.component.js +0 -88
  228. package/dist/components/references/URefTag.component.d.ts +0 -13
  229. package/dist/components/references/URefTag.component.js +0 -54
  230. package/dist/components/widgets/UChartWidget.component.js +0 -180
  231. package/dist/components/widgets/UChartWidget.d.ts +0 -7
  232. package/dist/components/widgets/UChartWidget.js +0 -5
  233. package/dist/components/widgets/UImagesWidget.component.js +0 -164
  234. package/dist/components/widgets/UImagesWidget.d.ts +0 -7
  235. package/dist/components/widgets/UImagesWidget.js +0 -5
  236. package/dist/components/widgets/UMapWidget.component.js +0 -65
  237. package/dist/components/widgets/UMapWidget.d.ts +0 -7
  238. package/dist/components/widgets/UMapWidget.js +0 -5
  239. package/dist/components/widgets/UMapWidget.styles.d.ts +0 -1
  240. package/dist/components/widgets/UVideoWidget.component.js +0 -106
  241. package/dist/components/widgets/UVideoWidget.d.ts +0 -7
  242. package/dist/components/widgets/UVideoWidget.js +0 -5
  243. package/dist/components/widgets/UVideoWidget.styles.d.ts +0 -1
  244. package/dist/components/widgets/UWidget.component.js +0 -140
  245. package/dist/components/widgets/UWidget.d.ts +0 -7
  246. package/dist/components/widgets/UWidget.js +0 -5
  247. package/dist/components/widgets/UWidget.styles.d.ts +0 -1
  248. package/dist/events/UCancelEvent.d.ts +0 -6
  249. package/dist/events/USubmitEvent.d.ts +0 -6
  250. package/dist/types/Actions.d.ts +0 -24
  251. package/dist/types/Actions.js +0 -34
  252. package/dist/types/Widgets.js +0 -115
  253. package/dist/utilities/ActionPromptBuilder.d.ts +0 -40
  254. package/dist/utilities/ActionPromptBuilder.js +0 -93
  255. package/dist/utilities/WidgetPromptBuilder.d.ts +0 -28
  256. package/dist/utilities/WidgetPromptBuilder.js +0 -87
  257. package/dist/utilities/converters.d.ts +0 -9
  258. package/dist/utilities/converters.js +0 -19
  259. /package/dist/components/{actions/UQuestionAction.styles.d.ts → blocks/UFileBlock.styles.d.ts} +0 -0
  260. /package/dist/components/{blocks/UFilesBlock.styles.d.ts → intents/UQuestionIntent.styles.d.ts} +0 -0
  261. /package/dist/components/{buttons/UReportButton.styles.d.ts → views/UChartView.styles.d.ts} +0 -0
  262. /package/dist/components/{buttons/URetryButton.styles.d.ts → views/UImagesView.styles.d.ts} +0 -0
  263. /package/dist/components/{buttons/UShareButton.styles.d.ts → views/UMapView.styles.d.ts} +0 -0
  264. /package/dist/components/{widgets/UChartWidget.styles.d.ts → views/UVideoView.styles.d.ts} +0 -0
  265. /package/dist/components/{widgets/UImagesWidget.styles.d.ts → views/UView.styles.d.ts} +0 -0
@@ -0,0 +1,45 @@
1
+ import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorateMetadata.js";
2
+ import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
3
+ import { styles } from "./UMapView.styles.js";
4
+ import { html, nothing } from "lit";
5
+ import { customElement, property } from "lit/decorators.js";
6
+ import { UElement } from "@iyulab/components/dist/components/UElement.js";
7
+ //#region src/components/views/UMapView.ts
8
+ var UMapView = class UMapView extends UElement {
9
+ constructor(..._args) {
10
+ super(..._args);
11
+ this.zoom = 15;
12
+ }
13
+ static {
14
+ this.styles = [super.styles, styles];
15
+ }
16
+ render() {
17
+ if (this.lat == null || this.lng == null) return nothing;
18
+ const offset = 360 / Math.pow(2, this.zoom);
19
+ const embedUrl = `https://www.openstreetmap.org/export/embed.html?bbox=${`${this.lng - offset},${this.lat - offset},${this.lng + offset},${this.lat + offset}`}&layer=mapnik&marker=${this.lat},${this.lng}`;
20
+ const linkUrl = `https://www.openstreetmap.org/?mlat=${this.lat}&mlon=${this.lng}#map=${this.zoom}/${this.lat}/${this.lng}`;
21
+ return html`
22
+ <iframe
23
+ src="${embedUrl}"
24
+ loading="lazy"
25
+ ></iframe>
26
+ <a class="caption"
27
+ ?hidden=${!this.label && !this.description}
28
+ href="${linkUrl}"
29
+ target="_blank"
30
+ rel="noopener"
31
+ >
32
+ <strong>${this.label}</strong>
33
+ <span>${this.description}</span>
34
+ </a>
35
+ `;
36
+ }
37
+ };
38
+ __decorate([property({ type: Number }), __decorateMetadata("design:type", Number)], UMapView.prototype, "lat", void 0);
39
+ __decorate([property({ type: Number }), __decorateMetadata("design:type", Number)], UMapView.prototype, "lng", void 0);
40
+ __decorate([property({ type: Number }), __decorateMetadata("design:type", Object)], UMapView.prototype, "zoom", void 0);
41
+ __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UMapView.prototype, "label", void 0);
42
+ __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UMapView.prototype, "description", void 0);
43
+ UMapView = __decorate([customElement("u-map-view")], UMapView);
44
+ //#endregion
45
+ export { UMapView };
@@ -1,6 +1,6 @@
1
- import { css } from 'lit';
2
-
3
- const styles = css`
1
+ import { css } from "lit";
2
+ //#region src/components/views/UMapView.styles.ts
3
+ var styles = css`
4
4
  :host {
5
5
  position: relative;
6
6
  display: block;
@@ -43,5 +43,5 @@ const styles = css`
43
43
  opacity: 0.8;
44
44
  }
45
45
  `;
46
-
46
+ //#endregion
47
47
  export { styles };
@@ -1,11 +1,10 @@
1
1
  import { nothing, PropertyValues } from 'lit';
2
2
  import { UElement } from '@iyulab/components/dist/components/UElement.js';
3
3
  /**
4
- * 비디오 플레이어 위젯 컴포넌트
4
+ * 비디오 플레이어 뷰 컴포넌트
5
5
  */
6
- export declare class UVideoWidget extends UElement {
6
+ export declare class UVideoView extends UElement {
7
7
  static styles: import('lit').CSSResultGroup[];
8
- static dependencies: Record<string, typeof UElement>;
9
8
  /** 비디오 URL (YouTube, Vimeo, 직접 파일) */
10
9
  src?: string;
11
10
  /** 포스터 이미지 URL */
@@ -19,3 +18,8 @@ export declare class UVideoWidget extends UElement {
19
18
  private extractYouTubeId;
20
19
  private extractVimeoId;
21
20
  }
21
+ declare global {
22
+ interface HTMLElementTagNameMap {
23
+ "u-video-view": UVideoView;
24
+ }
25
+ }
@@ -0,0 +1,81 @@
1
+ import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorateMetadata.js";
2
+ import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
3
+ import { styles } from "./UVideoView.styles.js";
4
+ import { html, nothing } from "lit";
5
+ import { customElement, property } from "lit/decorators.js";
6
+ import { UElement } from "@iyulab/components/dist/components/UElement.js";
7
+ import { ifDefined } from "lit/directives/if-defined.js";
8
+ //#region src/components/views/UVideoView.ts
9
+ var UVideoView = class UVideoView extends UElement {
10
+ constructor(..._args) {
11
+ super(..._args);
12
+ this.ratio = "16:9";
13
+ }
14
+ static {
15
+ this.styles = [super.styles, styles];
16
+ }
17
+ updated(changedProperties) {
18
+ super.updated(changedProperties);
19
+ if (changedProperties.has("ratio")) this.style.setProperty("--video-ratio", this.ratio.replace(":", " / "));
20
+ }
21
+ render() {
22
+ if (!this.src) return nothing;
23
+ if (this.isYouTube(this.src)) {
24
+ const videoId = this.extractYouTubeId(this.src);
25
+ if (videoId) return html`
26
+ <div class="video-wrapper">
27
+ <iframe
28
+ src="https://www.youtube.com/embed/${videoId}"
29
+ loading="lazy"
30
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
31
+ allowfullscreen
32
+ ></iframe>
33
+ </div>
34
+ `;
35
+ }
36
+ if (this.isVimeo(this.src)) {
37
+ const videoId = this.extractVimeoId(this.src);
38
+ if (videoId) return html`
39
+ <div class="video-wrapper">
40
+ <iframe
41
+ src="https://player.vimeo.com/video/${videoId}"
42
+ loading="lazy"
43
+ allow="autoplay; fullscreen; picture-in-picture"
44
+ allowfullscreen
45
+ ></iframe>
46
+ </div>
47
+ `;
48
+ }
49
+ return html`
50
+ <video
51
+ src=${this.src}
52
+ poster=${ifDefined(this.poster)}
53
+ controls
54
+ playsinline
55
+ ></video>
56
+ `;
57
+ }
58
+ isYouTube(url) {
59
+ return /youtube\.com|youtu\.be/i.test(url);
60
+ }
61
+ isVimeo(url) {
62
+ return /vimeo\.com/i.test(url);
63
+ }
64
+ extractYouTubeId(url) {
65
+ for (const pattern of [/(?:youtube\.com\/watch\?v=|youtu\.be\/)([^&\s]+)/, /youtube\.com\/embed\/([^&\s]+)/]) {
66
+ const match = url.match(pattern);
67
+ if (match && match[1]) return match[1];
68
+ }
69
+ return null;
70
+ }
71
+ extractVimeoId(url) {
72
+ const match = url.match(/vimeo\.com\/(\d+)/);
73
+ return match ? match[1] : null;
74
+ }
75
+ };
76
+ __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UVideoView.prototype, "src", void 0);
77
+ __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UVideoView.prototype, "poster", void 0);
78
+ __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UVideoView.prototype, "ratio", void 0);
79
+ UVideoView = __decorate([customElement("u-video-view")], UVideoView);
80
+ //#endregion
81
+ export { UVideoView };
@@ -1,6 +1,6 @@
1
- import { css } from 'lit';
2
-
3
- const styles = css`
1
+ import { css } from "lit";
2
+ //#region src/components/views/UVideoView.styles.ts
3
+ var styles = css`
4
4
  :host {
5
5
  --video-ratio: 16 / 9;
6
6
  }
@@ -32,5 +32,5 @@ const styles = css`
32
32
  border-radius: 8px;
33
33
  }
34
34
  `;
35
-
35
+ //#endregion
36
36
  export { styles };
@@ -1,12 +1,10 @@
1
1
  import { nothing, PropertyValues } from 'lit';
2
- import { UElement } from '@iyulab/components/dist/components/UElement.js';
3
- import { UJsonElement } from '@iyulab/components/dist/components/UJsonElement.js';
2
+ import { UDataElement } from '@iyulab/components/dist/components/UDataElement.js';
4
3
  /**
5
- * 위젯 파싱/렌더링 오류를 표시하는 컴포넌트입니다.
4
+ * 뷰 컴포넌트를 렌더링 또는 오류를 표시하는 컴포넌트입니다.
6
5
  */
7
- export declare class UWidget extends UJsonElement {
6
+ export declare class UView extends UDataElement {
8
7
  static styles: (import('lit').CSSResult | import('lit').CSSResultGroup[])[];
9
- static dependencies: Record<string, typeof UElement>;
10
8
  /** 로딩 상태입니다. `true`인 경우, 위젯이 로딩 중임을 나타냅니다. */
11
9
  loading: boolean;
12
10
  /** `tag` 프로퍼티에 등록된 커스텀 엘리먼트를 렌더링하는 컴포넌트입니다. */
@@ -41,3 +39,8 @@ export declare class UWidget extends UJsonElement {
41
39
  */
42
40
  private validateProperties;
43
41
  }
42
+ declare global {
43
+ interface HTMLElementTagNameMap {
44
+ "u-view": UView;
45
+ }
46
+ }
@@ -0,0 +1,113 @@
1
+ import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorateMetadata.js";
2
+ import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.124.0/helpers/decorate.js";
3
+ import { styles } from "./UView.styles.js";
4
+ import { html, nothing } from "lit";
5
+ import { customElement, property, state } from "lit/decorators.js";
6
+ import { UDataElement } from "@iyulab/components/dist/components/UDataElement.js";
7
+ import "@iyulab/components/dist/components/skeleton/USkeleton.js";
8
+ //#region src/components/views/UView.ts
9
+ var _ref;
10
+ var DEFAULT_BLACKLIST = [
11
+ "innerHTML",
12
+ "outerHTML",
13
+ "textContent",
14
+ "innerText",
15
+ "outerText",
16
+ "srcdoc"
17
+ ];
18
+ var UView = class UView extends UDataElement {
19
+ constructor(..._args) {
20
+ super(..._args);
21
+ this.loading = false;
22
+ this.blacklist = DEFAULT_BLACKLIST;
23
+ this.element = null;
24
+ }
25
+ static {
26
+ this.styles = [super.styles, styles];
27
+ }
28
+ willUpdate(changedProperties) {
29
+ super.willUpdate(changedProperties);
30
+ if (changedProperties.has("tag")) this.updateElement(this.tag);
31
+ if (changedProperties.has("properties") && this.element) this.updateProperties(this.element, this.properties);
32
+ if (changedProperties.has("blacklist") && this.element && this.properties) this.updateProperties(this.element, this.properties);
33
+ }
34
+ render() {
35
+ if (this.loading === true) return html`
36
+ <div class="sk-container">
37
+ <div class="sk-card">
38
+ <u-skeleton effect="shimmer" width="100%" height="5em" shape="rectangle"></u-skeleton>
39
+ <u-skeleton effect="shimmer" width="80%" height="0.8em" shape="rounded"></u-skeleton>
40
+ <u-skeleton effect="shimmer" width="40%" height="0.75em" shape="rounded"></u-skeleton>
41
+ </div>
42
+ <div class="sk-doc">
43
+ <u-skeleton effect="shimmer" width="40%" height="0.75em" shape="rounded"></u-skeleton>
44
+ <u-skeleton effect="shimmer" width="80%" height="0.75em" shape="rounded"></u-skeleton>
45
+ <u-skeleton effect="shimmer" width="60%" height="0.8em" shape="rounded"></u-skeleton>
46
+ <u-skeleton effect="shimmer" width="100%" height="0.8em" shape="rounded"></u-skeleton>
47
+ <u-skeleton effect="shimmer" width="80%" height="0.8em" shape="rounded"></u-skeleton>
48
+ </div>
49
+ </div>`;
50
+ if (this.element != null) return this.element;
51
+ return nothing;
52
+ }
53
+ /**
54
+ * `loading`이 `true`인 경우, 에러 UI로 대체하지 않습니다.
55
+ */
56
+ async error(error) {
57
+ if (this.loading) return;
58
+ await super.error(error);
59
+ }
60
+ /**
61
+ * `tag` 프로퍼티에 등록된 커스텀 엘리먼트를 렌더링하는 컴포넌트입니다.
62
+ * `tag`가 변경될 때마다 등록된 커스텀 엘리먼트를 새로 생성하여 렌더링합니다.
63
+ * `tag`가 유효하지 않거나 등록된 커스텀 엘리먼트가 아닌 경우, 에러 처리합니다.
64
+ */
65
+ updateElement(tag) {
66
+ tag = tag?.trim();
67
+ if (!tag) {
68
+ this.element = null;
69
+ super.error(/* @__PURE__ */ new Error("Tag is required"));
70
+ return;
71
+ }
72
+ if (!customElements.get(tag)) {
73
+ this.element = null;
74
+ super.error(/* @__PURE__ */ new Error(`Unknown tag: ${tag}`));
75
+ return;
76
+ }
77
+ this.element = document.createElement(tag);
78
+ }
79
+ /**
80
+ * `properties` 객체의 키가 렌더링된 엘리먼트의 프로퍼티 이름과 일치하면 자동으로 할당됩니다.
81
+ * `properties` 객체에 위험한 프로퍼티가 포함되어 있는지 검증하여, 유효한 경우에만 할당합니다.
82
+ * 할당 중 오류가 발생한 경우, 에러 처리합니다.
83
+ */
84
+ updateProperties(element, props) {
85
+ if (this.validateProperties(props)) try {
86
+ Object.assign(element, props);
87
+ } catch (error) {
88
+ super.error(error);
89
+ }
90
+ else super.error(/* @__PURE__ */ new Error(`Not allowed properties: ${JSON.stringify(props)}`));
91
+ }
92
+ /**
93
+ * `properties` 객체에 위험한 프로퍼티가 포함되어 있는지 검증합니다.
94
+ * DOM 조작이나 이벤트 핸들러로 악용될 수 있는 프로퍼티를 최소한으로 차단합니다.
95
+ */
96
+ validateProperties(props) {
97
+ if (typeof props !== "object" || props === null || Array.isArray(props)) return false;
98
+ const obj = props;
99
+ for (const key of Object.keys(obj)) if (this.blacklist.includes(key)) return false;
100
+ return true;
101
+ }
102
+ };
103
+ __decorate([property({
104
+ type: Boolean,
105
+ reflect: true
106
+ }), __decorateMetadata("design:type", Object)], UView.prototype, "loading", void 0);
107
+ __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UView.prototype, "tag", void 0);
108
+ __decorate([property({ type: Object }), __decorateMetadata("design:type", typeof (_ref = typeof Record !== "undefined" && Record) === "function" ? _ref : Object)], UView.prototype, "properties", void 0);
109
+ __decorate([property({ type: Array }), __decorateMetadata("design:type", Array)], UView.prototype, "blacklist", void 0);
110
+ __decorate([state(), __decorateMetadata("design:type", Object)], UView.prototype, "element", void 0);
111
+ UView = __decorate([customElement("u-view")], UView);
112
+ //#endregion
113
+ export { UView };
@@ -1,6 +1,6 @@
1
- import { css } from 'lit';
2
-
3
- const styles = css`
1
+ import { css } from "lit";
2
+ //#region src/components/views/UView.styles.ts
3
+ var styles = css`
4
4
  :host {
5
5
  display: contents;
6
6
  }
@@ -29,5 +29,5 @@ const styles = css`
29
29
  justify-content: space-between;
30
30
  }
31
31
  `;
32
-
32
+ //#endregion
33
33
  export { styles };
@@ -0,0 +1,9 @@
1
+ export interface AttachEventDetail {
2
+ files: File[];
3
+ }
4
+ export type AttachEvent = CustomEvent<AttachEventDetail>;
5
+ declare global {
6
+ interface HTMLElementEventMap {
7
+ 'attach': AttachEvent;
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ export interface ChoiceEventDetail {
2
+ value: string;
3
+ }
4
+ export type ChoiceEvent = CustomEvent<ChoiceEventDetail>;
5
+ declare global {
6
+ interface HTMLElementEventMap {
7
+ 'choice': ChoiceEvent;
8
+ }
9
+ }
@@ -0,0 +1,21 @@
1
+ import { FileBlockItem } from '../types/BlockItem.js';
2
+ /**
3
+ * `send` 이벤트의 detail 페이로드.
4
+ * - `value`: 사용자가 입력한 텍스트 (trim된 원본, 빈 문자열일 수 있음)
5
+ * - `files`: 첨부된 파일 목록 (있는 경우)
6
+ */
7
+ export interface SendEventDetail {
8
+ value: string;
9
+ files?: FileBlockItem[];
10
+ }
11
+ export type SendEvent = CustomEvent<SendEventDetail>;
12
+ declare global {
13
+ interface HTMLElementEventMap {
14
+ 'send': SendEvent;
15
+ /**
16
+ * @deprecated 0.5.1부터 `send`와 동시에 발생합니다. 0.6.0에서 제거 예정.
17
+ * 새 코드는 `send`를 사용하세요.
18
+ */
19
+ 'u-submit': SendEvent;
20
+ }
21
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `stop` 이벤트의 detail 페이로드.
3
+ * 현재는 추가 컨텍스트가 없으므로 빈 객체이며, 향후 확장 대비 interface로 유지.
4
+ */
5
+ export interface StopEventDetail {
6
+ }
7
+ export type StopEvent = CustomEvent<StopEventDetail>;
8
+ declare global {
9
+ interface HTMLElementEventMap {
10
+ 'stop': StopEvent;
11
+ /**
12
+ * @deprecated 0.5.1부터 `stop`과 동시에 발생합니다. 0.6.0에서 제거 예정.
13
+ * 새 코드는 `stop`를 사용하세요.
14
+ */
15
+ 'u-cancel': StopEvent;
16
+ }
17
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './components/blocks/UCodeBlock.js';
2
- export * from './components/blocks/UFilesBlock.js';
2
+ export * from './components/blocks/UFileBlock.js';
3
3
  export * from './components/blocks/UJsonBlock.js';
4
4
  export * from './components/blocks/UMarkedBlock.js';
5
5
  export * from './components/blocks/UTextBlock.js';
@@ -10,27 +10,24 @@ export * from './components/blocks/UTableBlock.js';
10
10
  export * from './components/buttons/UAttachButton.js';
11
11
  export * from './components/buttons/UCopyButton.js';
12
12
  export * from './components/buttons/UVoteButton.js';
13
- export * from './components/buttons/UReportButton.js';
14
- export * from './components/buttons/URetryButton.js';
15
- export * from './components/buttons/UShareButton.js';
16
13
  export * from './components/message/UMessage.js';
17
14
  export * from './components/prompt/UPrompt.js';
18
15
  export * from './components/references/URefTag.js';
19
16
  export * from './components/references/URefCard.js';
20
17
  export * from './components/references/URefCardGroup.js';
21
- export * from './components/actions/UQuestionAction.js';
22
- export * from './components/widgets/UImagesWidget.js';
23
- export * from './components/widgets/UVideoWidget.js';
24
- export * from './components/widgets/UMapWidget.js';
25
- export * from './components/widgets/UChartWidget.js';
26
- export * from './components/widgets/UWidget.js';
18
+ export * from './components/intents/UQuestionIntent.js';
19
+ export * from './components/views/UImagesView.js';
20
+ export * from './components/views/UVideoView.js';
21
+ export * from './components/views/UMapView.js';
22
+ export * from './components/views/UChartView.js';
23
+ export * from './components/views/UView.js';
27
24
  export type * from './types/BlockItem';
28
25
  export type * from './types/JsonNode';
29
26
  export type * from './types/JsonSchema';
30
27
  export type * from './types/References';
31
- export * from './types/Actions';
32
- export * from './types/Widgets';
33
- export type * from './events/UCancelEvent';
34
- export type * from './events/USubmitEvent';
35
- export * from './utilities/ActionPromptBuilder.js';
36
- export * from './utilities/WidgetPromptBuilder.js';
28
+ export * from './types/Intents';
29
+ export * from './types/Views';
30
+ export type * from './events/SendEvent';
31
+ export type * from './events/StopEvent';
32
+ export * from './utilities/IntentPromptBuilder.js';
33
+ export * from './utilities/ViewPromptBuilder.js';
package/dist/index.js CHANGED
@@ -1,56 +1,28 @@
1
- import './components/blocks/UCodeBlock.js';
2
- import './components/blocks/UFilesBlock.js';
3
- import './components/blocks/UJsonBlock.js';
4
- import './components/blocks/UMarkedBlock.js';
5
- import './components/blocks/UTextBlock.js';
6
- import './components/blocks/UThinkBlock.js';
7
- import './components/blocks/UToolBlock.js';
8
- import './components/blocks/URefBlock.js';
9
- import './components/blocks/UTableBlock.js';
10
- import './components/buttons/UAttachButton.js';
11
- import './components/buttons/UCopyButton.js';
12
- import './components/buttons/UVoteButton.js';
13
- import './components/buttons/UReportButton.js';
14
- import './components/buttons/URetryButton.js';
15
- import './components/buttons/UShareButton.js';
16
- import './components/message/UMessage.js';
17
- import './components/prompt/UPrompt.js';
18
- import './components/references/URefTag.js';
19
- import './components/references/URefCard.js';
20
- import './components/references/URefCardGroup.js';
21
- import './components/actions/UQuestionAction.js';
22
- import './components/widgets/UImagesWidget.js';
23
- import './components/widgets/UVideoWidget.js';
24
- import './components/widgets/UMapWidget.js';
25
- import './components/widgets/UChartWidget.js';
26
- import './components/widgets/UWidget.js';
27
- export { PRESET_ACTION_DEFINITIONS, PRESET_ACTION_LIST, PresetAction } from './types/Actions.js';
28
- export { PRESET_WIDGET_DEFINITIONS, PRESET_WIDGET_LIST, PresetWidget } from './types/Widgets.js';
29
- export { ActionPromptBuilder } from './utilities/ActionPromptBuilder.js';
30
- export { WidgetPromptBuilder } from './utilities/WidgetPromptBuilder.js';
31
- export { UAttachButton } from './components/buttons/UAttachButton.component.js';
32
- export { UChartWidget } from './components/widgets/UChartWidget.component.js';
33
- export { UCodeBlock } from './components/blocks/UCodeBlock.component.js';
34
- export { UCopyButton } from './components/buttons/UCopyButton.component.js';
35
- export { UFilesBlock } from './components/blocks/UFilesBlock.component.js';
36
- export { UImagesWidget } from './components/widgets/UImagesWidget.component.js';
37
- export { UJsonBlock } from './components/blocks/UJsonBlock.component.js';
38
- export { UMapWidget } from './components/widgets/UMapWidget.component.js';
39
- export { UMarkedBlock } from './components/blocks/UMarkedBlock.component.js';
40
- export { UMessage } from './components/message/UMessage.component.js';
41
- export { UPrompt } from './components/prompt/UPrompt.component.js';
42
- export { UQuestionAction } from './components/actions/UQuestionAction.component.js';
43
- export { URefBlock } from './components/blocks/URefBlock.component.js';
44
- export { URefCard } from './components/references/URefCard.component.js';
45
- export { URefCardGroup } from './components/references/URefCardGroup.component.js';
46
- export { URefTag } from './components/references/URefTag.component.js';
47
- export { UReportButton } from './components/buttons/UReportButton.component.js';
48
- export { URetryButton } from './components/buttons/URetryButton.component.js';
49
- export { UShareButton } from './components/buttons/UShareButton.component.js';
50
- export { UTableBlock } from './components/blocks/UTableBlock.component.js';
51
- export { UTextBlock } from './components/blocks/UTextBlock.component.js';
52
- export { UThinkBlock } from './components/blocks/UThinkBlock.component.js';
53
- export { UToolBlock } from './components/blocks/UToolBlock.component.js';
54
- export { UVideoWidget } from './components/widgets/UVideoWidget.component.js';
55
- export { UVoteButton } from './components/buttons/UVoteButton.component.js';
56
- export { UWidget } from './components/widgets/UWidget.component.js';
1
+ import { UCopyButton } from "./components/buttons/UCopyButton.js";
2
+ import { UCodeBlock } from "./components/blocks/UCodeBlock.js";
3
+ import { UFileBlock } from "./components/blocks/UFileBlock.js";
4
+ import { UJsonBlock } from "./components/blocks/UJsonBlock.js";
5
+ import { URefTag } from "./components/references/URefTag.js";
6
+ import { URefCard } from "./components/references/URefCard.js";
7
+ import { URefCardGroup } from "./components/references/URefCardGroup.js";
8
+ import { UTableBlock } from "./components/blocks/UTableBlock.js";
9
+ import { UView } from "./components/views/UView.js";
10
+ import { UMarkedBlock } from "./components/blocks/UMarkedBlock.js";
11
+ import { UTextBlock } from "./components/blocks/UTextBlock.js";
12
+ import { UThinkBlock } from "./components/blocks/UThinkBlock.js";
13
+ import { UToolBlock } from "./components/blocks/UToolBlock.js";
14
+ import { URefBlock } from "./components/blocks/URefBlock.js";
15
+ import { UAttachButton } from "./components/buttons/UAttachButton.js";
16
+ import { UVoteButton } from "./components/buttons/UVoteButton.js";
17
+ import { UMessage } from "./components/message/UMessage.js";
18
+ import { UPrompt } from "./components/prompt/UPrompt.js";
19
+ import { UQuestionIntent } from "./components/intents/UQuestionIntent.js";
20
+ import { UImagesView } from "./components/views/UImagesView.js";
21
+ import { UVideoView } from "./components/views/UVideoView.js";
22
+ import { UMapView } from "./components/views/UMapView.js";
23
+ import { UChartView } from "./components/views/UChartView.js";
24
+ import { PRESET_INTENT_DEFINITIONS, PRESET_INTENT_LIST, PresetIntent } from "./types/Intents.js";
25
+ import { PRESET_VIEW_DEFINITIONS, PRESET_VIEW_LIST, PresetView } from "./types/Views.js";
26
+ import { IntentPromptBuilder } from "./utilities/IntentPromptBuilder.js";
27
+ import { ViewPromptBuilder } from "./utilities/ViewPromptBuilder.js";
28
+ export { IntentPromptBuilder, PRESET_INTENT_DEFINITIONS, PRESET_INTENT_LIST, PRESET_VIEW_DEFINITIONS, PRESET_VIEW_LIST, PresetIntent, PresetView, UAttachButton, UChartView, UCodeBlock, UCopyButton, UFileBlock, UImagesView, UJsonBlock, UMapView, UMarkedBlock, UMessage, UPrompt, UQuestionIntent, URefBlock, URefCard, URefCardGroup, URefTag, UTableBlock, UTextBlock, UThinkBlock, UToolBlock, UVideoView, UView, UVoteButton, ViewPromptBuilder };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { UAttachButton as UAttachButtonElement } from '../components/buttons/UAttachButton';
3
+ import { type AttachEventDetail } from '../events/AttachEvent';
4
+
5
+ export declare const UAttachButton: React.ForwardRefExoticComponent<
6
+ Partial<UAttachButtonElement> & React.HTMLAttributes<UAttachButtonElement> & {
7
+ onAttach?: (event: CustomEvent<AttachEventDetail>) => void;
8
+ }
9
+ >;
10
+
11
+ export type UAttachButtonProps = React.ComponentProps<typeof UAttachButton>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UAttachButton } from '../components/buttons/UAttachButton.js';
4
+
5
+ export const UAttachButton = createComponent({
6
+ react: React,
7
+ tagName: 'u-attach-button',
8
+ elementClass: UAttachButton,
9
+ events: {
10
+ onAttach: 'attach',
11
+ },
12
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UChartView as UChartViewElement } from '../components/views/UChartView';
3
+
4
+ export declare const UChartView: React.ForwardRefExoticComponent<
5
+ Partial<UChartViewElement> & React.HTMLAttributes<UChartViewElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UChartViewProps = React.ComponentProps<typeof UChartView>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UChartView } from '../components/views/UChartView.js';
4
+
5
+ export const UChartView = createComponent({
6
+ react: React,
7
+ tagName: 'u-chart-view',
8
+ elementClass: UChartView,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UCodeBlock as UCodeBlockElement } from '../components/blocks/UCodeBlock';
3
+
4
+ export declare const UCodeBlock: React.ForwardRefExoticComponent<
5
+ Partial<UCodeBlockElement> & React.HTMLAttributes<UCodeBlockElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UCodeBlockProps = React.ComponentProps<typeof UCodeBlock>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UCodeBlock } from '../components/blocks/UCodeBlock.js';
4
+
5
+ export const UCodeBlock = createComponent({
6
+ react: React,
7
+ tagName: 'u-code-block',
8
+ elementClass: UCodeBlock,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UCopyButton as UCopyButtonElement } from '../components/buttons/UCopyButton';
3
+
4
+ export declare const UCopyButton: React.ForwardRefExoticComponent<
5
+ Partial<UCopyButtonElement> & React.HTMLAttributes<UCopyButtonElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UCopyButtonProps = React.ComponentProps<typeof UCopyButton>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UCopyButton } from '../components/buttons/UCopyButton.js';
4
+
5
+ export const UCopyButton = createComponent({
6
+ react: React,
7
+ tagName: 'u-copy-button',
8
+ elementClass: UCopyButton,
9
+ events: {},
10
+ });