@iyulab/chat-components 0.4.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.
Files changed (237) hide show
  1. package/CHANGELOG.md +124 -21
  2. package/README.md +133 -16
  3. package/dist/_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js +9 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.122.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 +32 -2
  50. package/dist/components/prompt/UPrompt.js +118 -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 +7 -0
  79. package/dist/events/StopEvent.d.ts +7 -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 +32 -16
  146. package/dist/assets/action-prompt.md.js +0 -3
  147. package/dist/assets/widget-prompt.md.js +0 -3
  148. package/dist/components/actions/UQuestionAction.component.js +0 -58
  149. package/dist/components/actions/UQuestionAction.d.ts +0 -7
  150. package/dist/components/actions/UQuestionAction.js +0 -5
  151. package/dist/components/blocks/UCodeBlock.component.d.ts +0 -25
  152. package/dist/components/blocks/UCodeBlock.component.js +0 -88
  153. package/dist/components/blocks/UFilesBlock.component.d.ts +0 -22
  154. package/dist/components/blocks/UFilesBlock.component.js +0 -192
  155. package/dist/components/blocks/UFilesBlock.d.ts +0 -7
  156. package/dist/components/blocks/UFilesBlock.js +0 -5
  157. package/dist/components/blocks/UJsonBlock.component.d.ts +0 -45
  158. package/dist/components/blocks/UJsonBlock.component.js +0 -140
  159. package/dist/components/blocks/UMarkedBlock.component.d.ts +0 -40
  160. package/dist/components/blocks/UMarkedBlock.component.js +0 -159
  161. package/dist/components/blocks/URefBlock.component.d.ts +0 -17
  162. package/dist/components/blocks/URefBlock.component.js +0 -73
  163. package/dist/components/blocks/UTableBlock.component.d.ts +0 -49
  164. package/dist/components/blocks/UTableBlock.component.js +0 -228
  165. package/dist/components/blocks/UTextBlock.component.d.ts +0 -37
  166. package/dist/components/blocks/UTextBlock.component.js +0 -123
  167. package/dist/components/blocks/UThinkBlock.component.d.ts +0 -23
  168. package/dist/components/blocks/UThinkBlock.component.js +0 -90
  169. package/dist/components/blocks/UToolBlock.component.d.ts +0 -20
  170. package/dist/components/blocks/UToolBlock.component.js +0 -80
  171. package/dist/components/buttons/UAttachButton.component.d.ts +0 -22
  172. package/dist/components/buttons/UAttachButton.component.js +0 -89
  173. package/dist/components/buttons/UCopyButton.component.d.ts +0 -20
  174. package/dist/components/buttons/UCopyButton.component.js +0 -81
  175. package/dist/components/buttons/UReportButton.component.d.ts +0 -9
  176. package/dist/components/buttons/UReportButton.component.js +0 -36
  177. package/dist/components/buttons/UReportButton.d.ts +0 -7
  178. package/dist/components/buttons/UReportButton.js +0 -5
  179. package/dist/components/buttons/UReportButton.styles.js +0 -14
  180. package/dist/components/buttons/URetryButton.component.d.ts +0 -11
  181. package/dist/components/buttons/URetryButton.component.js +0 -53
  182. package/dist/components/buttons/URetryButton.d.ts +0 -7
  183. package/dist/components/buttons/URetryButton.js +0 -5
  184. package/dist/components/buttons/URetryButton.styles.js +0 -26
  185. package/dist/components/buttons/UShareButton.component.d.ts +0 -9
  186. package/dist/components/buttons/UShareButton.component.js +0 -36
  187. package/dist/components/buttons/UShareButton.d.ts +0 -7
  188. package/dist/components/buttons/UShareButton.js +0 -5
  189. package/dist/components/buttons/UShareButton.styles.js +0 -14
  190. package/dist/components/buttons/UVoteButton.component.d.ts +0 -15
  191. package/dist/components/buttons/UVoteButton.component.js +0 -73
  192. package/dist/components/message/UMessage.component.d.ts +0 -19
  193. package/dist/components/message/UMessage.component.js +0 -56
  194. package/dist/components/prompt/UPrompt.component.d.ts +0 -25
  195. package/dist/components/prompt/UPrompt.component.js +0 -113
  196. package/dist/components/references/URefCard.component.d.ts +0 -27
  197. package/dist/components/references/URefCard.component.js +0 -109
  198. package/dist/components/references/URefCardGroup.component.d.ts +0 -26
  199. package/dist/components/references/URefCardGroup.component.js +0 -88
  200. package/dist/components/references/URefTag.component.d.ts +0 -13
  201. package/dist/components/references/URefTag.component.js +0 -54
  202. package/dist/components/widgets/UChartWidget.component.js +0 -180
  203. package/dist/components/widgets/UChartWidget.d.ts +0 -7
  204. package/dist/components/widgets/UChartWidget.js +0 -5
  205. package/dist/components/widgets/UImagesWidget.component.js +0 -164
  206. package/dist/components/widgets/UImagesWidget.d.ts +0 -7
  207. package/dist/components/widgets/UImagesWidget.js +0 -5
  208. package/dist/components/widgets/UMapWidget.component.js +0 -65
  209. package/dist/components/widgets/UMapWidget.d.ts +0 -7
  210. package/dist/components/widgets/UMapWidget.js +0 -5
  211. package/dist/components/widgets/UMapWidget.styles.d.ts +0 -1
  212. package/dist/components/widgets/UVideoWidget.component.js +0 -106
  213. package/dist/components/widgets/UVideoWidget.d.ts +0 -7
  214. package/dist/components/widgets/UVideoWidget.js +0 -5
  215. package/dist/components/widgets/UVideoWidget.styles.d.ts +0 -1
  216. package/dist/components/widgets/UWidget.component.js +0 -140
  217. package/dist/components/widgets/UWidget.d.ts +0 -7
  218. package/dist/components/widgets/UWidget.js +0 -5
  219. package/dist/components/widgets/UWidget.styles.d.ts +0 -1
  220. package/dist/events/UCancelEvent.d.ts +0 -6
  221. package/dist/events/USubmitEvent.d.ts +0 -6
  222. package/dist/types/Actions.d.ts +0 -24
  223. package/dist/types/Actions.js +0 -34
  224. package/dist/types/Widgets.js +0 -115
  225. package/dist/utilities/ActionPromptBuilder.d.ts +0 -40
  226. package/dist/utilities/ActionPromptBuilder.js +0 -93
  227. package/dist/utilities/WidgetPromptBuilder.d.ts +0 -28
  228. package/dist/utilities/WidgetPromptBuilder.js +0 -87
  229. package/dist/utilities/converters.d.ts +0 -9
  230. package/dist/utilities/converters.js +0 -19
  231. /package/dist/components/{actions/UQuestionAction.styles.d.ts → blocks/UFileBlock.styles.d.ts} +0 -0
  232. /package/dist/components/{blocks/UFilesBlock.styles.d.ts → intents/UQuestionIntent.styles.d.ts} +0 -0
  233. /package/dist/components/{buttons/UReportButton.styles.d.ts → views/UChartView.styles.d.ts} +0 -0
  234. /package/dist/components/{buttons/URetryButton.styles.d.ts → views/UImagesView.styles.d.ts} +0 -0
  235. /package/dist/components/{buttons/UShareButton.styles.d.ts → views/UMapView.styles.d.ts} +0 -0
  236. /package/dist/components/{widgets/UChartWidget.styles.d.ts → views/UVideoView.styles.d.ts} +0 -0
  237. /package/dist/components/{widgets/UImagesWidget.styles.d.ts → views/UView.styles.d.ts} +0 -0
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UMarkedBlock as UMarkedBlockElement } from '../components/blocks/UMarkedBlock';
3
+
4
+ export declare const UMarkedBlock: React.ForwardRefExoticComponent<
5
+ Partial<UMarkedBlockElement> & React.HTMLAttributes<UMarkedBlockElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UMarkedBlockProps = React.ComponentProps<typeof UMarkedBlock>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UMarkedBlock } from '../components/blocks/UMarkedBlock.js';
4
+
5
+ export const UMarkedBlock = createComponent({
6
+ react: React,
7
+ tagName: 'u-marked-block',
8
+ elementClass: UMarkedBlock,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UMessage as UMessageElement } from '../components/message/UMessage';
3
+
4
+ export declare const UMessage: React.ForwardRefExoticComponent<
5
+ Partial<UMessageElement> & React.HTMLAttributes<UMessageElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UMessageProps = React.ComponentProps<typeof UMessage>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UMessage } from '../components/message/UMessage.js';
4
+
5
+ export const UMessage = createComponent({
6
+ react: React,
7
+ tagName: 'u-message',
8
+ elementClass: UMessage,
9
+ events: {},
10
+ });
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { UPrompt as UPromptElement } from '../components/prompt/UPrompt';
3
+ import { type StopEventDetail } from '../events/StopEvent';
4
+ import { type SendEventDetail } from '../events/SendEvent';
5
+
6
+ export declare const UPrompt: React.ForwardRefExoticComponent<
7
+ Partial<UPromptElement> & React.HTMLAttributes<UPromptElement> & {
8
+ onStop?: (event: CustomEvent<StopEventDetail>) => void;
9
+ onSend?: (event: CustomEvent<SendEventDetail>) => void;
10
+ }
11
+ >;
12
+
13
+ export type UPromptProps = React.ComponentProps<typeof UPrompt>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UPrompt } from '../components/prompt/UPrompt.js';
4
+
5
+ export const UPrompt = createComponent({
6
+ react: React,
7
+ tagName: 'u-prompt',
8
+ elementClass: UPrompt,
9
+ events: {
10
+ onStop: 'stop',
11
+ onSend: 'send',
12
+ },
13
+ });
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { UQuestionIntent as UQuestionIntentElement } from '../components/intents/UQuestionIntent';
3
+ import { type ChoiceEventDetail } from '../events/ChoiceEvent';
4
+
5
+ export declare const UQuestionIntent: React.ForwardRefExoticComponent<
6
+ Partial<UQuestionIntentElement> & React.HTMLAttributes<UQuestionIntentElement> & {
7
+ onChoice?: (event: CustomEvent<ChoiceEventDetail>) => void;
8
+ }
9
+ >;
10
+
11
+ export type UQuestionIntentProps = React.ComponentProps<typeof UQuestionIntent>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UQuestionIntent } from '../components/intents/UQuestionIntent.js';
4
+
5
+ export const UQuestionIntent = createComponent({
6
+ react: React,
7
+ tagName: 'u-question-intent',
8
+ elementClass: UQuestionIntent,
9
+ events: {
10
+ onChoice: 'choice',
11
+ },
12
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { URefBlock as URefBlockElement } from '../components/blocks/URefBlock';
3
+
4
+ export declare const URefBlock: React.ForwardRefExoticComponent<
5
+ Partial<URefBlockElement> & React.HTMLAttributes<URefBlockElement> & {
6
+ }
7
+ >;
8
+
9
+ export type URefBlockProps = React.ComponentProps<typeof URefBlock>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { URefBlock } from '../components/blocks/URefBlock.js';
4
+
5
+ export const URefBlock = createComponent({
6
+ react: React,
7
+ tagName: 'u-ref-block',
8
+ elementClass: URefBlock,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { URefCard as URefCardElement } from '../components/references/URefCard';
3
+
4
+ export declare const URefCard: React.ForwardRefExoticComponent<
5
+ Partial<URefCardElement> & React.HTMLAttributes<URefCardElement> & {
6
+ }
7
+ >;
8
+
9
+ export type URefCardProps = React.ComponentProps<typeof URefCard>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { URefCard } from '../components/references/URefCard.js';
4
+
5
+ export const URefCard = createComponent({
6
+ react: React,
7
+ tagName: 'u-ref-card',
8
+ elementClass: URefCard,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { URefCardGroup as URefCardGroupElement } from '../components/references/URefCardGroup';
3
+
4
+ export declare const URefCardGroup: React.ForwardRefExoticComponent<
5
+ Partial<URefCardGroupElement> & React.HTMLAttributes<URefCardGroupElement> & {
6
+ }
7
+ >;
8
+
9
+ export type URefCardGroupProps = React.ComponentProps<typeof URefCardGroup>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { URefCardGroup } from '../components/references/URefCardGroup.js';
4
+
5
+ export const URefCardGroup = createComponent({
6
+ react: React,
7
+ tagName: 'u-ref-card-group',
8
+ elementClass: URefCardGroup,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { URefTag as URefTagElement } from '../components/references/URefTag';
3
+
4
+ export declare const URefTag: React.ForwardRefExoticComponent<
5
+ Partial<URefTagElement> & React.HTMLAttributes<URefTagElement> & {
6
+ }
7
+ >;
8
+
9
+ export type URefTagProps = React.ComponentProps<typeof URefTag>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { URefTag } from '../components/references/URefTag.js';
4
+
5
+ export const URefTag = createComponent({
6
+ react: React,
7
+ tagName: 'u-ref-tag',
8
+ elementClass: URefTag,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UTableBlock as UTableBlockElement } from '../components/blocks/UTableBlock';
3
+
4
+ export declare const UTableBlock: React.ForwardRefExoticComponent<
5
+ Partial<UTableBlockElement> & React.HTMLAttributes<UTableBlockElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UTableBlockProps = React.ComponentProps<typeof UTableBlock>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UTableBlock } from '../components/blocks/UTableBlock.js';
4
+
5
+ export const UTableBlock = createComponent({
6
+ react: React,
7
+ tagName: 'u-table-block',
8
+ elementClass: UTableBlock,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UTextBlock as UTextBlockElement } from '../components/blocks/UTextBlock';
3
+
4
+ export declare const UTextBlock: React.ForwardRefExoticComponent<
5
+ Partial<UTextBlockElement> & React.HTMLAttributes<UTextBlockElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UTextBlockProps = React.ComponentProps<typeof UTextBlock>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UTextBlock } from '../components/blocks/UTextBlock.js';
4
+
5
+ export const UTextBlock = createComponent({
6
+ react: React,
7
+ tagName: 'u-text-block',
8
+ elementClass: UTextBlock,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UThinkBlock as UThinkBlockElement } from '../components/blocks/UThinkBlock';
3
+
4
+ export declare const UThinkBlock: React.ForwardRefExoticComponent<
5
+ Partial<UThinkBlockElement> & React.HTMLAttributes<UThinkBlockElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UThinkBlockProps = React.ComponentProps<typeof UThinkBlock>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UThinkBlock } from '../components/blocks/UThinkBlock.js';
4
+
5
+ export const UThinkBlock = createComponent({
6
+ react: React,
7
+ tagName: 'u-think-block',
8
+ elementClass: UThinkBlock,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UToolBlock as UToolBlockElement } from '../components/blocks/UToolBlock';
3
+
4
+ export declare const UToolBlock: React.ForwardRefExoticComponent<
5
+ Partial<UToolBlockElement> & React.HTMLAttributes<UToolBlockElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UToolBlockProps = React.ComponentProps<typeof UToolBlock>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UToolBlock } from '../components/blocks/UToolBlock.js';
4
+
5
+ export const UToolBlock = createComponent({
6
+ react: React,
7
+ tagName: 'u-tool-block',
8
+ elementClass: UToolBlock,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UVideoView as UVideoViewElement } from '../components/views/UVideoView';
3
+
4
+ export declare const UVideoView: React.ForwardRefExoticComponent<
5
+ Partial<UVideoViewElement> & React.HTMLAttributes<UVideoViewElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UVideoViewProps = React.ComponentProps<typeof UVideoView>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UVideoView } from '../components/views/UVideoView.js';
4
+
5
+ export const UVideoView = createComponent({
6
+ react: React,
7
+ tagName: 'u-video-view',
8
+ elementClass: UVideoView,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UView as UViewElement } from '../components/views/UView';
3
+
4
+ export declare const UView: React.ForwardRefExoticComponent<
5
+ Partial<UViewElement> & React.HTMLAttributes<UViewElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UViewProps = React.ComponentProps<typeof UView>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UView } from '../components/views/UView.js';
4
+
5
+ export const UView = createComponent({
6
+ react: React,
7
+ tagName: 'u-view',
8
+ elementClass: UView,
9
+ events: {},
10
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { UVoteButton as UVoteButtonElement } from '../components/buttons/UVoteButton';
3
+
4
+ export declare const UVoteButton: React.ForwardRefExoticComponent<
5
+ Partial<UVoteButtonElement> & React.HTMLAttributes<UVoteButtonElement> & {
6
+ }
7
+ >;
8
+
9
+ export type UVoteButtonProps = React.ComponentProps<typeof UVoteButton>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UVoteButton } from '../components/buttons/UVoteButton.js';
4
+
5
+ export const UVoteButton = createComponent({
6
+ react: React,
7
+ tagName: 'u-vote-button',
8
+ elementClass: UVoteButton,
9
+ events: {},
10
+ });
@@ -0,0 +1,23 @@
1
+ export { UView, UViewProps } from './UView';
2
+ export { UVideoView, UVideoViewProps } from './UVideoView';
3
+ export { UMapView, UMapViewProps } from './UMapView';
4
+ export { UImagesView, UImagesViewProps } from './UImagesView';
5
+ export { UChartView, UChartViewProps } from './UChartView';
6
+ export { URefTag, URefTagProps } from './URefTag';
7
+ export { URefCardGroup, URefCardGroupProps } from './URefCardGroup';
8
+ export { URefCard, URefCardProps } from './URefCard';
9
+ export { UPrompt, UPromptProps } from './UPrompt';
10
+ export { UMessage, UMessageProps } from './UMessage';
11
+ export { UQuestionIntent, UQuestionIntentProps } from './UQuestionIntent';
12
+ export { UVoteButton, UVoteButtonProps } from './UVoteButton';
13
+ export { UCopyButton, UCopyButtonProps } from './UCopyButton';
14
+ export { UAttachButton, UAttachButtonProps } from './UAttachButton';
15
+ export { UToolBlock, UToolBlockProps } from './UToolBlock';
16
+ export { UThinkBlock, UThinkBlockProps } from './UThinkBlock';
17
+ export { UTextBlock, UTextBlockProps } from './UTextBlock';
18
+ export { UTableBlock, UTableBlockProps } from './UTableBlock';
19
+ export { URefBlock, URefBlockProps } from './URefBlock';
20
+ export { UMarkedBlock, UMarkedBlockProps } from './UMarkedBlock';
21
+ export { UJsonBlock, UJsonBlockProps } from './UJsonBlock';
22
+ export { UFileBlock, UFileBlockProps } from './UFileBlock';
23
+ export { UCodeBlock, UCodeBlockProps } from './UCodeBlock';
@@ -0,0 +1,23 @@
1
+ export { UView } from './UView.js';
2
+ export { UVideoView } from './UVideoView.js';
3
+ export { UMapView } from './UMapView.js';
4
+ export { UImagesView } from './UImagesView.js';
5
+ export { UChartView } from './UChartView.js';
6
+ export { URefTag } from './URefTag.js';
7
+ export { URefCardGroup } from './URefCardGroup.js';
8
+ export { URefCard } from './URefCard.js';
9
+ export { UPrompt } from './UPrompt.js';
10
+ export { UMessage } from './UMessage.js';
11
+ export { UQuestionIntent } from './UQuestionIntent.js';
12
+ export { UVoteButton } from './UVoteButton.js';
13
+ export { UCopyButton } from './UCopyButton.js';
14
+ export { UAttachButton } from './UAttachButton.js';
15
+ export { UToolBlock } from './UToolBlock.js';
16
+ export { UThinkBlock } from './UThinkBlock.js';
17
+ export { UTextBlock } from './UTextBlock.js';
18
+ export { UTableBlock } from './UTableBlock.js';
19
+ export { URefBlock } from './URefBlock.js';
20
+ export { UMarkedBlock } from './UMarkedBlock.js';
21
+ export { UJsonBlock } from './UJsonBlock.js';
22
+ export { UFileBlock } from './UFileBlock.js';
23
+ export { UCodeBlock } from './UCodeBlock.js';
@@ -3,6 +3,8 @@ import { JsonNode } from './JsonNode';
3
3
  /** LLM 추론 텍스트 블록입니다. */
4
4
  export interface ThinkingBlockItem {
5
5
  type: "thinking";
6
+ /** 추론 중 로딩 상태 여부 */
7
+ loading?: boolean;
6
8
  /** 추론 텍스트 내용 */
7
9
  value?: string;
8
10
  }
@@ -20,9 +22,27 @@ export interface MarkdownBlockItem {
20
22
  /** 마크다운 내 인용 정보 들 */
21
23
  refs?: ReferenceCitation[];
22
24
  }
25
+ /** 파일 하나의 데이터 구조입니다. */
26
+ export interface FileBlockItem {
27
+ type: "file";
28
+ /** 파일 상태 */
29
+ status?: "idle" | "uploading" | "error";
30
+ /** 파일 이름 */
31
+ name?: string;
32
+ /** 파일 크기 (bytes) */
33
+ size?: number;
34
+ /** MIME 타입 (예: "image/png", "application/pdf") */
35
+ mimeType?: string;
36
+ /** 다운로드 URL */
37
+ url?: string;
38
+ /** 실제 파일 데이터 (선택적, 필요에 따라 사용) */
39
+ data?: any;
40
+ }
23
41
  /** 툴 사용 블록입니다. */
24
42
  export interface ToolBlockItem {
25
43
  type: "tool";
44
+ /** 툴 사용 중 로딩 상태 여부 */
45
+ loading?: boolean;
26
46
  /** 도구 블록 제목 */
27
47
  title?: string;
28
48
  /** 도구 블록 입력값(json) */
@@ -36,38 +56,7 @@ export interface ReferenceBlockItem {
36
56
  /** 출처 목록 */
37
57
  sources: ReferenceSource[];
38
58
  }
39
- /** 파일 첨부 블록입니다. */
40
- export type FileUploadStatus = {
41
- phase: "uploading";
42
- progress?: number;
43
- } | {
44
- phase: "done";
45
- } | {
46
- phase: "error";
47
- message?: string;
48
- };
49
- /** 파일 하나의 데이터 구조입니다. */
50
- export interface FileItem {
51
- /** 파일 ID (옵션) */
52
- fileId?: string;
53
- /** 파일 이름 */
54
- name: string;
55
- /** MIME 타입 (예: "image/png", "application/pdf") */
56
- type?: string;
57
- /** 파일 크기 (bytes) */
58
- size?: number;
59
- /** 파일 업로드 상태 */
60
- upload?: FileUploadStatus;
61
- /** 다운로드 URL */
62
- downloadUrl?: string;
63
- }
64
- /** 복수 파일 첨부 블록입니다. */
65
- export interface FilesBlockItem {
66
- type: "files";
67
- /** 파일 목록 */
68
- files: FileItem[];
69
- }
70
59
  /**
71
60
  * 타입별 메시지 컨텐츠 아이템
72
61
  */
73
- export type BlockItem = (ThinkingBlockItem | TextBlockItem | MarkdownBlockItem | ToolBlockItem | ReferenceBlockItem | FilesBlockItem);
62
+ export type BlockItem = (ThinkingBlockItem | TextBlockItem | MarkdownBlockItem | FileBlockItem | ToolBlockItem | ReferenceBlockItem);
@@ -0,0 +1,26 @@
1
+ import { JsonSchema } from '../types/JsonSchema.js';
2
+ /** LLM에서 intent-json 블록으로 출력되는 구조입니다.*/
3
+ export interface IntentSchema {
4
+ type: string;
5
+ properties?: Record<string, unknown>;
6
+ }
7
+ /** Intent 정의 구조체 */
8
+ export interface IntentDefinition {
9
+ /** intent 식별자 (intent-json의 "type" 필드와 매칭) */
10
+ type: string;
11
+ /** LLM용 설명 */
12
+ description: string;
13
+ /** LLM용 속성 스키마 */
14
+ properties?: Record<string, JsonSchema>;
15
+ /** LLM용 필수 속성 이름 목록 */
16
+ required?: string[];
17
+ }
18
+ /** 프리셋 Intent 비트 플래그 */
19
+ export declare enum PresetIntent {
20
+ Questions = 1,
21
+ All = 1
22
+ }
23
+ /** 프리셋 Intent 목록 (비트 플래그 순서대로) */
24
+ export declare const PRESET_INTENT_LIST: readonly [PresetIntent];
25
+ /** 프리셋 Intent 정의 매핑 */
26
+ export declare const PRESET_INTENT_DEFINITIONS: Map<PresetIntent, IntentDefinition>;
@@ -0,0 +1,30 @@
1
+ //#region src/types/Intents.ts
2
+ /** 프리셋 Intent 비트 플래그 */
3
+ var PresetIntent = /* @__PURE__ */ function(PresetIntent) {
4
+ PresetIntent[PresetIntent["Questions"] = 1] = "Questions";
5
+ PresetIntent[PresetIntent["All"] = 1] = "All";
6
+ return PresetIntent;
7
+ }({});
8
+ /** 프리셋 Intent 목록 (비트 플래그 순서대로) */
9
+ var PRESET_INTENT_LIST = [PresetIntent.Questions];
10
+ /** 프리셋 Intent 정의 매핑 */
11
+ var PRESET_INTENT_DEFINITIONS = new Map([[PresetIntent.Questions, {
12
+ type: "question",
13
+ description: "Present a question to the user with clickable choices",
14
+ properties: {
15
+ question: {
16
+ type: "string",
17
+ description: "Optional question text displayed above the choices (e.g. \"What would you like to explore?\")"
18
+ },
19
+ choices: {
20
+ type: "array",
21
+ items: { type: "string" },
22
+ minItems: 1,
23
+ maxItems: 5,
24
+ description: "Clickable choice buttons (1–5 items)"
25
+ }
26
+ },
27
+ required: ["choices"]
28
+ }]]);
29
+ //#endregion
30
+ export { PRESET_INTENT_DEFINITIONS, PRESET_INTENT_LIST, PresetIntent };
@@ -1,8 +1,8 @@
1
1
  import { JsonSchema } from './JsonSchema.js';
2
2
  /**
3
- * 위젯을 정의하는 구조체
3
+ * View를 정의하는 구조체
4
4
  */
5
- export interface WidgetDefinition {
5
+ export interface ViewDefinition {
6
6
  /** 등록할 커스텀 엘리먼트 클래스 */
7
7
  element: CustomElementConstructor;
8
8
  /** 등록할 커스텀 엘리먼트 태그명 */
@@ -15,9 +15,9 @@ export interface WidgetDefinition {
15
15
  required?: string[];
16
16
  }
17
17
  /**
18
- * 프리셋 위젯 비트 플래그
18
+ * 프리셋 View 비트 플래그
19
19
  */
20
- export declare enum PresetWidget {
20
+ export declare enum PresetView {
21
21
  Images = 1,
22
22
  Video = 2,
23
23
  Map = 8,
@@ -25,10 +25,10 @@ export declare enum PresetWidget {
25
25
  All = 27
26
26
  }
27
27
  /**
28
- * 전체 프리셋 위젯 플래그 목록
28
+ * 전체 프리셋 View 플래그 목록
29
29
  */
30
- export declare const PRESET_WIDGET_LIST: readonly [PresetWidget.Images, PresetWidget.Video, PresetWidget.Map, PresetWidget.Chart];
30
+ export declare const PRESET_VIEW_LIST: readonly [PresetView.Images, PresetView.Video, PresetView.Map, PresetView.Chart];
31
31
  /**
32
- * 프리셋 위젯 정의
32
+ * 프리셋 View 정의
33
33
  */
34
- export declare const PRESET_WIDGET_DEFINITIONS: Map<PresetWidget, WidgetDefinition>;
34
+ export declare const PRESET_VIEW_DEFINITIONS: Map<PresetView, ViewDefinition>;