@iyulab/chat-components 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +15 -39
  3. package/dist/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.138.0/helpers/esm}/decorate.js +2 -2
  4. package/dist/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.138.0/helpers/esm}/decorateMetadata.js +2 -2
  5. package/dist/_virtual/_glob-assets_raw/alert-triangle-fill.svg.4cfc4305.js +4 -0
  6. package/dist/_virtual/_glob-assets_raw/arrows-sort.svg.dda43a85.js +4 -0
  7. package/dist/_virtual/_glob-assets_raw/code.svg.c69bc144.js +4 -0
  8. package/dist/_virtual/_glob-assets_raw/download.svg.bce82177.js +4 -0
  9. package/dist/_virtual/_glob-assets_raw/element-prompt.md.7047ffcc.js +4 -0
  10. package/dist/_virtual/_glob-assets_raw/external-link.svg.a9f7f02d.js +4 -0
  11. package/dist/_virtual/_glob-assets_raw/file-code.svg.0e706f93.js +4 -0
  12. package/dist/_virtual/_glob-assets_raw/file-music.svg.b9970203.js +4 -0
  13. package/dist/_virtual/_glob-assets_raw/file-spreadsheet.svg.8c03bdfa.js +4 -0
  14. package/dist/_virtual/_glob-assets_raw/file-text.svg.85bdd923.js +4 -0
  15. package/dist/_virtual/_glob-assets_raw/file-type-pdf.svg.bc12db6d.js +4 -0
  16. package/dist/_virtual/_glob-assets_raw/file-zip.svg.76dde660.js +4 -0
  17. package/dist/_virtual/_glob-assets_raw/file.svg.28f5d6f1.js +4 -0
  18. package/dist/_virtual/_glob-assets_raw/photo.svg.cc273cc1.js +4 -0
  19. package/dist/_virtual/_glob-assets_raw/player-stop-fill.svg.5378b752.js +4 -0
  20. package/dist/_virtual/_glob-assets_raw/send.svg.02326253.js +4 -0
  21. package/dist/_virtual/_glob-assets_raw/sort-ascending-letters.svg.14a3df67.js +4 -0
  22. package/dist/_virtual/_glob-assets_raw/sort-descending-letters.svg.3e03647c.js +4 -0
  23. package/dist/_virtual/_glob-assets_raw/video.svg.c183f03c.js +4 -0
  24. package/dist/_virtual/_glob-assets_raw/world.svg.cd9903c8.js +4 -0
  25. package/dist/components/UDataElement.d.ts +44 -0
  26. package/dist/components/UDataElement.js +76 -0
  27. package/dist/components/blocks/UCodeBlock.d.ts +0 -4
  28. package/dist/components/blocks/UCodeBlock.js +6 -12
  29. package/dist/components/{views/UView.d.ts → blocks/UElementBlock.d.ts} +18 -8
  30. package/dist/components/{views/UView.js → blocks/UElementBlock.js} +31 -21
  31. package/dist/components/{views/UView.styles.js → blocks/UElementBlock.styles.js} +1 -1
  32. package/dist/components/blocks/UFileBlock.d.ts +15 -5
  33. package/dist/components/blocks/UFileBlock.js +81 -68
  34. package/dist/components/blocks/UFileBlock.styles.js +86 -29
  35. package/dist/components/blocks/UMarkedBlock.d.ts +3 -1
  36. package/dist/components/blocks/UMarkedBlock.js +23 -18
  37. package/dist/components/blocks/URefBlock.js +2 -2
  38. package/dist/components/blocks/UTableBlock.d.ts +2 -2
  39. package/dist/components/blocks/UTableBlock.js +9 -8
  40. package/dist/components/blocks/UTableBlock.styles.js +1 -1
  41. package/dist/components/blocks/UTextBlock.d.ts +2 -0
  42. package/dist/components/blocks/UTextBlock.js +4 -5
  43. package/dist/components/message/UMessage.js +2 -2
  44. package/dist/components/prompt/UPrompt.d.ts +0 -5
  45. package/dist/components/prompt/UPrompt.js +18 -27
  46. package/dist/components/prompt/UPrompt.styles.js +9 -10
  47. package/dist/components/references/URefCard.d.ts +2 -2
  48. package/dist/components/references/URefCard.js +8 -7
  49. package/dist/components/references/URefCardGroup.js +2 -2
  50. package/dist/components/references/URefTag.js +5 -4
  51. package/dist/{components/views/UChartView.d.ts → components-extra/UChartBlock.d.ts} +4 -4
  52. package/dist/{components/views/UChartView.js → components-extra/UChartBlock.js} +22 -34
  53. package/dist/components-extra/UChartBlock.schema.d.ts +3 -0
  54. package/dist/components-extra/UChartBlock.schema.js +34 -0
  55. package/dist/{components/views/UChartView.styles.js → components-extra/UChartBlock.styles.js} +1 -1
  56. package/dist/{components/views/UImagesView.d.ts → components-extra/UImagesBlock.d.ts} +4 -4
  57. package/dist/{components/views/UImagesView.js → components-extra/UImagesBlock.js} +15 -15
  58. package/dist/components-extra/UImagesBlock.schema.d.ts +3 -0
  59. package/dist/components-extra/UImagesBlock.schema.js +31 -0
  60. package/dist/{components/views/UImagesView.styles.js → components-extra/UImagesBlock.styles.js} +5 -5
  61. package/dist/{components/views/UMapView.d.ts → components-extra/UMapBlock.d.ts} +4 -4
  62. package/dist/{components/views/UMapView.js → components-extra/UMapBlock.js} +18 -18
  63. package/dist/components-extra/UMapBlock.schema.d.ts +3 -0
  64. package/dist/components-extra/UMapBlock.schema.js +33 -0
  65. package/dist/{components/views/UMapView.styles.js → components-extra/UMapBlock.styles.js} +1 -1
  66. package/dist/{components/views/UVideoView.d.ts → components-extra/UVideoBlock.d.ts} +4 -4
  67. package/dist/{components/views/UVideoView.js → components-extra/UVideoBlock.js} +10 -10
  68. package/dist/components-extra/UVideoBlock.schema.d.ts +3 -0
  69. package/dist/components-extra/UVideoBlock.schema.js +28 -0
  70. package/dist/{components/views/UVideoView.styles.js → components-extra/UVideoBlock.styles.js} +1 -1
  71. package/dist/events/SendEvent.d.ts +0 -5
  72. package/dist/events/StopEvent.d.ts +0 -5
  73. package/dist/extra.d.ts +6 -0
  74. package/dist/extra.js +14 -0
  75. package/dist/index.d.ts +5 -17
  76. package/dist/index.js +6 -16
  77. package/dist/react/UCodeBlock.js +2 -2
  78. package/dist/react/UElementBlock.d.ts +9 -0
  79. package/dist/react/UElementBlock.js +10 -0
  80. package/dist/react/UFileBlock.js +2 -2
  81. package/dist/react/UImagesBlock.d.ts +9 -0
  82. package/dist/react/UImagesBlock.js +10 -0
  83. package/dist/react/UMapBlock.d.ts +9 -0
  84. package/dist/react/UMapBlock.js +10 -0
  85. package/dist/react/UMarkedBlock.js +2 -2
  86. package/dist/react/UMessage.js +2 -2
  87. package/dist/react/UPrompt.js +2 -2
  88. package/dist/react/URefBlock.js +2 -2
  89. package/dist/react/URefCard.js +2 -2
  90. package/dist/react/URefCardGroup.js +2 -2
  91. package/dist/react/URefTag.js +2 -2
  92. package/dist/react/UTableBlock.js +2 -2
  93. package/dist/react/UTextBlock.d.ts +1 -0
  94. package/dist/react/UTextBlock.js +5 -3
  95. package/dist/react/UVideoBlock.d.ts +9 -0
  96. package/dist/react/UVideoBlock.js +10 -0
  97. package/dist/react/index.d.ts +4 -11
  98. package/dist/react/index.js +4 -11
  99. package/dist/types/BlockItem.d.ts +1 -24
  100. package/dist/types/{JsonSchema.d.ts → Schema.d.ts} +13 -0
  101. package/dist/utilities/HtmlBuilder.d.ts +28 -0
  102. package/dist/utilities/HtmlBuilder.js +41 -0
  103. package/dist/utilities/PromptBuilder.d.ts +21 -0
  104. package/dist/utilities/PromptBuilder.js +60 -0
  105. package/dist/utilities/icons.d.ts +1 -0
  106. package/dist/utilities/icons.js +52 -0
  107. package/dist/utilities/sanitizers.d.ts +35 -0
  108. package/dist/utilities/sanitizers.js +75 -0
  109. package/package.json +13 -18
  110. package/skills/iyulab-chat-components/SKILL.md +18 -33
  111. package/skills/iyulab-chat-components/references/components/{chart-view.md → chart-block.md} +16 -12
  112. package/skills/iyulab-chat-components/references/components/code-block.md +1 -5
  113. package/skills/iyulab-chat-components/references/components/element-block.md +57 -0
  114. package/skills/iyulab-chat-components/references/components/file-block.md +22 -25
  115. package/skills/iyulab-chat-components/references/components/{images-view.md → images-block.md} +10 -10
  116. package/skills/iyulab-chat-components/references/components/{map-view.md → map-block.md} +9 -9
  117. package/skills/iyulab-chat-components/references/components/marked-block.md +5 -4
  118. package/skills/iyulab-chat-components/references/components/message.md +1 -2
  119. package/skills/iyulab-chat-components/references/components/prompt.md +12 -21
  120. package/skills/iyulab-chat-components/references/components/{video-view.md → video-block.md} +10 -10
  121. package/skills/iyulab-chat-components/references/extra-system.md +95 -0
  122. package/skills/iyulab-chat-components/references/types.md +17 -31
  123. package/skills/iyulab-chat-components/references/usage.md +13 -81
  124. package/skills/iyulab-chat-components/references/utilities/html-builder.md +35 -0
  125. package/skills/iyulab-chat-components/references/utilities/prompt-builder.md +73 -0
  126. package/dist/_virtual/_glob-assets_raw/intent-prompt.md.1907474e.js +0 -4
  127. package/dist/_virtual/_glob-assets_raw/view-prompt.md.e0dbcffe.js +0 -4
  128. package/dist/chart.d.ts +0 -1
  129. package/dist/chart.js +0 -2
  130. package/dist/components/blocks/UJsonBlock.d.ts +0 -49
  131. package/dist/components/blocks/UJsonBlock.js +0 -130
  132. package/dist/components/blocks/UJsonBlock.styles.js +0 -115
  133. package/dist/components/blocks/UThinkBlock.d.ts +0 -35
  134. package/dist/components/blocks/UThinkBlock.js +0 -87
  135. package/dist/components/blocks/UThinkBlock.styles.js +0 -74
  136. package/dist/components/blocks/UToolBlock.d.ts +0 -24
  137. package/dist/components/blocks/UToolBlock.js +0 -70
  138. package/dist/components/blocks/UToolBlock.styles.js +0 -66
  139. package/dist/components/buttons/UAttachButton.d.ts +0 -26
  140. package/dist/components/buttons/UAttachButton.js +0 -63
  141. package/dist/components/buttons/UAttachButton.styles.js +0 -14
  142. package/dist/components/buttons/UCopyButton.d.ts +0 -24
  143. package/dist/components/buttons/UCopyButton.js +0 -59
  144. package/dist/components/buttons/UCopyButton.styles.js +0 -18
  145. package/dist/components/buttons/UVoteButton.d.ts +0 -19
  146. package/dist/components/buttons/UVoteButton.js +0 -64
  147. package/dist/components/buttons/UVoteButton.styles.d.ts +0 -1
  148. package/dist/components/buttons/UVoteButton.styles.js +0 -19
  149. package/dist/components/intents/UQuestionIntent.d.ts +0 -22
  150. package/dist/components/intents/UQuestionIntent.js +0 -41
  151. package/dist/components/intents/UQuestionIntent.styles.d.ts +0 -1
  152. package/dist/components/intents/UQuestionIntent.styles.js +0 -43
  153. package/dist/components/views/UChartView.styles.d.ts +0 -1
  154. package/dist/components/views/UImagesView.styles.d.ts +0 -1
  155. package/dist/components/views/UMapView.styles.d.ts +0 -1
  156. package/dist/components/views/UVideoView.styles.d.ts +0 -1
  157. package/dist/components/views/UView.styles.d.ts +0 -1
  158. package/dist/events/AttachEvent.d.ts +0 -9
  159. package/dist/events/ChoiceEvent.d.ts +0 -9
  160. package/dist/react/UAttachButton.d.ts +0 -11
  161. package/dist/react/UAttachButton.js +0 -12
  162. package/dist/react/UCopyButton.d.ts +0 -9
  163. package/dist/react/UCopyButton.js +0 -10
  164. package/dist/react/UImagesView.d.ts +0 -9
  165. package/dist/react/UImagesView.js +0 -10
  166. package/dist/react/UJsonBlock.d.ts +0 -9
  167. package/dist/react/UJsonBlock.js +0 -10
  168. package/dist/react/UMapView.d.ts +0 -9
  169. package/dist/react/UMapView.js +0 -10
  170. package/dist/react/UQuestionIntent.d.ts +0 -11
  171. package/dist/react/UQuestionIntent.js +0 -12
  172. package/dist/react/UThinkBlock.d.ts +0 -9
  173. package/dist/react/UThinkBlock.js +0 -10
  174. package/dist/react/UToolBlock.d.ts +0 -9
  175. package/dist/react/UToolBlock.js +0 -10
  176. package/dist/react/UVideoView.d.ts +0 -9
  177. package/dist/react/UVideoView.js +0 -10
  178. package/dist/react/UView.d.ts +0 -9
  179. package/dist/react/UView.js +0 -10
  180. package/dist/react/UVoteButton.d.ts +0 -9
  181. package/dist/react/UVoteButton.js +0 -10
  182. package/dist/types/Intents.d.ts +0 -26
  183. package/dist/types/Intents.js +0 -30
  184. package/dist/types/JsonNode.d.ts +0 -20
  185. package/dist/types/Views.d.ts +0 -34
  186. package/dist/types/Views.js +0 -148
  187. package/dist/utilities/IntentPromptBuilder.d.ts +0 -40
  188. package/dist/utilities/IntentPromptBuilder.js +0 -95
  189. package/dist/utilities/ViewPromptBuilder.d.ts +0 -28
  190. package/dist/utilities/ViewPromptBuilder.js +0 -78
  191. package/dist/utilities/dom-agent/DOMAgent.d.ts +0 -74
  192. package/dist/utilities/dom-agent/DOMController.d.ts +0 -78
  193. package/dist/utilities/dom-agent/DOMPromptBuilder.d.ts +0 -54
  194. package/dist/utilities/dom-agent/DOMScanner.d.ts +0 -83
  195. package/dist/utilities/dom-agent/index.d.ts +0 -9
  196. package/dist/utilities/dom-agent/types.d.ts +0 -209
  197. package/skills/iyulab-chat-components/references/components/attach-button.md +0 -69
  198. package/skills/iyulab-chat-components/references/components/copy-button.md +0 -46
  199. package/skills/iyulab-chat-components/references/components/json-block.md +0 -41
  200. package/skills/iyulab-chat-components/references/components/question-intent.md +0 -75
  201. package/skills/iyulab-chat-components/references/components/think-block.md +0 -48
  202. package/skills/iyulab-chat-components/references/components/tool-block.md +0 -57
  203. package/skills/iyulab-chat-components/references/components/view.md +0 -51
  204. package/skills/iyulab-chat-components/references/components/vote-button.md +0 -60
  205. package/skills/iyulab-chat-components/references/utilities/intent-prompt-builder.md +0 -123
  206. package/skills/iyulab-chat-components/references/utilities/view-prompt-builder.md +0 -112
  207. /package/dist/components/{buttons/UCopyButton.styles.d.ts → blocks/UElementBlock.styles.d.ts} +0 -0
  208. /package/dist/{components/blocks/UJsonBlock.styles.d.ts → components-extra/UChartBlock.styles.d.ts} +0 -0
  209. /package/dist/{components/blocks/UThinkBlock.styles.d.ts → components-extra/UImagesBlock.styles.d.ts} +0 -0
  210. /package/dist/{components/blocks/UToolBlock.styles.d.ts → components-extra/UMapBlock.styles.d.ts} +0 -0
  211. /package/dist/{components/buttons/UAttachButton.styles.d.ts → components-extra/UVideoBlock.styles.d.ts} +0 -0
@@ -1,41 +0,0 @@
1
- import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorateMetadata.js";
2
- import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
3
- import { styles } from "./UQuestionIntent.styles.js";
4
- import { html, nothing } from "lit";
5
- import { customElement, property } from "lit/decorators.js";
6
- import "@iyulab/components/dist/components/button/UButton.js";
7
- import { UElement } from "@iyulab/components/dist/components/UElement.js";
8
- import { repeat } from "lit/directives/repeat.js";
9
- //#region src/components/intents/UQuestionIntent.ts
10
- var UQuestionIntent = class UQuestionIntent extends UElement {
11
- constructor(..._args) {
12
- super(..._args);
13
- this.choices = [];
14
- }
15
- static {
16
- this.styles = [super.styles, styles];
17
- }
18
- render() {
19
- if (!this.choices || this.choices.length === 0) return nothing;
20
- return html`
21
- <p class="question" ?hidden=${!this.question}>${this.question}</p>
22
- <div class="choices">
23
- ${repeat(this.choices, (value, index) => html`
24
- <u-button @click=${() => this.handleChoiceClick(index)}>
25
- ${value}
26
- </u-button>
27
- `)}
28
- </div>
29
- `;
30
- }
31
- handleChoiceClick(index) {
32
- const value = this.choices[index];
33
- if (!value) return;
34
- this.fire("choice", { detail: { value } });
35
- }
36
- };
37
- __decorate([property({ type: String }), __decorateMetadata("design:type", String)], UQuestionIntent.prototype, "question", void 0);
38
- __decorate([property({ type: Array }), __decorateMetadata("design:type", Array)], UQuestionIntent.prototype, "choices", void 0);
39
- UQuestionIntent = __decorate([customElement("u-question-intent")], UQuestionIntent);
40
- //#endregion
41
- export { UQuestionIntent };
@@ -1 +0,0 @@
1
- export declare const styles: import('lit').CSSResult;
@@ -1,43 +0,0 @@
1
- import { css } from "lit";
2
- //#region src/components/intents/UQuestionIntent.styles.ts
3
- var styles = css`
4
- :host {
5
- display: flex;
6
- flex-direction: column;
7
- gap: 0.5em;
8
- margin: 0.75em 0;
9
- }
10
-
11
- .question {
12
- margin: 0 0 0.25em;
13
- font-size: 0.9em;
14
- color: var(--u-txt-color-weak);
15
- line-height: 1.5;
16
- }
17
-
18
- .choices {
19
- display: flex;
20
- flex-direction: column;
21
- gap: 0.4em;
22
- }
23
-
24
- u-button {
25
- display: block;
26
- width: fit-content;
27
- padding: 0.5em 0.75em;
28
- font-size: 0.875em;
29
- justify-content: flex-start;
30
- line-height: 1.4;
31
- border-radius: 10px;
32
- box-shadow: 0 1px 2px var(--u-shadow-color-weaker);
33
- transition: all 0.15s ease;
34
- }
35
- u-button:hover {
36
- transform: translateY(-1px);
37
- }
38
- u-button:active {
39
- transform: translateY(0);
40
- }
41
- `;
42
- //#endregion
43
- export { styles };
@@ -1 +0,0 @@
1
- export declare const styles: import('lit').CSSResult;
@@ -1 +0,0 @@
1
- export declare const styles: import('lit').CSSResult;
@@ -1 +0,0 @@
1
- export declare const styles: import('lit').CSSResult;
@@ -1 +0,0 @@
1
- export declare const styles: import('lit').CSSResult;
@@ -1 +0,0 @@
1
- export declare const styles: import('lit').CSSResult;
@@ -1,9 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
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
- }
@@ -1,11 +0,0 @@
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>;
@@ -1,12 +0,0 @@
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
- });
@@ -1,9 +0,0 @@
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>;
@@ -1,10 +0,0 @@
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
- });
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { UImagesView as UImagesViewElement } from '../components/views/UImagesView';
3
-
4
- export declare const UImagesView: React.ForwardRefExoticComponent<
5
- Partial<UImagesViewElement> & React.HTMLAttributes<UImagesViewElement> & {
6
- }
7
- >;
8
-
9
- export type UImagesViewProps = React.ComponentProps<typeof UImagesView>;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit/react';
3
- import { UImagesView } from '../components/views/UImagesView.js';
4
-
5
- export const UImagesView = createComponent({
6
- react: React,
7
- tagName: 'u-images-view',
8
- elementClass: UImagesView,
9
- events: {},
10
- });
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { UJsonBlock as UJsonBlockElement } from '../components/blocks/UJsonBlock';
3
-
4
- export declare const UJsonBlock: React.ForwardRefExoticComponent<
5
- Partial<UJsonBlockElement> & React.HTMLAttributes<UJsonBlockElement> & {
6
- }
7
- >;
8
-
9
- export type UJsonBlockProps = React.ComponentProps<typeof UJsonBlock>;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit/react';
3
- import { UJsonBlock } from '../components/blocks/UJsonBlock.js';
4
-
5
- export const UJsonBlock = createComponent({
6
- react: React,
7
- tagName: 'u-json-block',
8
- elementClass: UJsonBlock,
9
- events: {},
10
- });
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { UMapView as UMapViewElement } from '../components/views/UMapView';
3
-
4
- export declare const UMapView: React.ForwardRefExoticComponent<
5
- Partial<UMapViewElement> & React.HTMLAttributes<UMapViewElement> & {
6
- }
7
- >;
8
-
9
- export type UMapViewProps = React.ComponentProps<typeof UMapView>;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit/react';
3
- import { UMapView } from '../components/views/UMapView.js';
4
-
5
- export const UMapView = createComponent({
6
- react: React,
7
- tagName: 'u-map-view',
8
- elementClass: UMapView,
9
- events: {},
10
- });
@@ -1,11 +0,0 @@
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>;
@@ -1,12 +0,0 @@
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
- });
@@ -1,9 +0,0 @@
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>;
@@ -1,10 +0,0 @@
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
- });
@@ -1,9 +0,0 @@
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>;
@@ -1,10 +0,0 @@
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
- });
@@ -1,9 +0,0 @@
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>;
@@ -1,10 +0,0 @@
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
- });
@@ -1,9 +0,0 @@
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>;
@@ -1,10 +0,0 @@
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
- });
@@ -1,9 +0,0 @@
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>;
@@ -1,10 +0,0 @@
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
- });
@@ -1,26 +0,0 @@
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>;
@@ -1,30 +0,0 @@
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 = [1];
10
- /** 프리셋 Intent 정의 매핑 */
11
- var PRESET_INTENT_DEFINITIONS = new Map([[1, {
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,20 +0,0 @@
1
- /** JSON 값 타입 */
2
- export type JsonValue = string | number | boolean | null;
3
- /** JSON 객체 타입 */
4
- export type JsonObject = {
5
- [x: string]: JsonNode;
6
- };
7
- /** JSON 배열 타입 */
8
- export type JsonArray = Array<JsonNode>;
9
- /**
10
- * JSON 데이터 구조에서 사용할 수 있는 모든 유형의 노드를 표현합니다.
11
- * JsonValue(원시값), JsonObject(객체), JsonArray(배열) 중 하나가 될 수 있습니다.
12
- *
13
- * @example
14
- * ```typescript
15
- * const primitiveNode: JsonNode = "string value";
16
- * const objectNode: JsonNode = { key: "value" };
17
- * const arrayNode: JsonNode = [1, 2, 3];
18
- * ```
19
- */
20
- export type JsonNode = JsonValue | JsonObject | JsonArray;
@@ -1,34 +0,0 @@
1
- import { JsonSchema } from './JsonSchema.js';
2
- /**
3
- * View를 정의하는 구조체
4
- */
5
- export interface ViewDefinition {
6
- /** 커스텀 엘리먼트 클래스 (optional: chart처럼 별도 서브패스로 분리된 경우 생략 가능) */
7
- element?: CustomElementConstructor;
8
- /** 등록할 커스텀 엘리먼트 태그명 */
9
- tag: string;
10
- /** LLM용 설명 */
11
- description: string;
12
- /** LLM용 속성 스키마 */
13
- properties?: Record<string, JsonSchema>;
14
- /** 필수 속성 목록 */
15
- required?: string[];
16
- }
17
- /**
18
- * 프리셋 View 비트 플래그
19
- */
20
- export declare enum PresetView {
21
- Images = 1,
22
- Video = 2,
23
- Map = 8,
24
- Chart = 16,
25
- All = 27
26
- }
27
- /**
28
- * 전체 프리셋 View 플래그 목록
29
- */
30
- export declare const PRESET_VIEW_LIST: readonly [PresetView.Images, PresetView.Video, PresetView.Map, PresetView.Chart];
31
- /**
32
- * 프리셋 View 정의
33
- */
34
- export declare const PRESET_VIEW_DEFINITIONS: Map<PresetView, ViewDefinition>;
@@ -1,148 +0,0 @@
1
- import { UImagesView } from "../components/views/UImagesView.js";
2
- import { UVideoView } from "../components/views/UVideoView.js";
3
- import { UMapView } from "../components/views/UMapView.js";
4
- //#region src/types/Views.ts
5
- /**
6
- * 프리셋 View 비트 플래그
7
- */
8
- var PresetView = /* @__PURE__ */ function(PresetView) {
9
- PresetView[PresetView["Images"] = 1] = "Images";
10
- PresetView[PresetView["Video"] = 2] = "Video";
11
- PresetView[PresetView["Map"] = 8] = "Map";
12
- PresetView[PresetView["Chart"] = 16] = "Chart";
13
- PresetView[PresetView["All"] = 27] = "All";
14
- return PresetView;
15
- }({});
16
- /**
17
- * 전체 프리셋 View 플래그 목록
18
- */
19
- var PRESET_VIEW_LIST = [
20
- 1,
21
- 2,
22
- 8,
23
- 16
24
- ];
25
- /**
26
- * 프리셋 View 정의
27
- */
28
- var PRESET_VIEW_DEFINITIONS = new Map([
29
- [1, {
30
- element: UImagesView,
31
- tag: "u-images-view",
32
- description: "Display multiple images in a scrollable gallery",
33
- properties: { items: {
34
- type: "array",
35
- items: {
36
- type: "object",
37
- properties: {
38
- src: {
39
- type: "string",
40
- description: "Image URL"
41
- },
42
- alt: {
43
- type: "string",
44
- description: "Alt text for accessibility"
45
- },
46
- caption: {
47
- type: "string",
48
- description: "Image caption"
49
- }
50
- },
51
- required: ["src"]
52
- },
53
- minItems: 1,
54
- description: "Array of image objects"
55
- } },
56
- required: ["items"]
57
- }],
58
- [2, {
59
- element: UVideoView,
60
- tag: "u-video-view",
61
- description: "Embed video from YouTube, Vimeo, or Others. Provide a direct video file URL or a platform URL.",
62
- properties: {
63
- src: {
64
- type: "string",
65
- description: "Video URL (YouTube, Vimeo, or direct video file URL)"
66
- },
67
- poster: {
68
- type: "string",
69
- description: "Poster image URL"
70
- },
71
- ratio: {
72
- type: "string",
73
- enum: [
74
- "16:9",
75
- "4:3",
76
- "1:1"
77
- ],
78
- default: "16:9",
79
- description: "Video aspect ratio"
80
- }
81
- },
82
- required: ["src"]
83
- }],
84
- [8, {
85
- element: UMapView,
86
- tag: "u-map-view",
87
- description: "Display a map showing a single location",
88
- properties: {
89
- lat: {
90
- type: "number",
91
- description: "Latitude coordinate"
92
- },
93
- lng: {
94
- type: "number",
95
- description: "Longitude coordinate"
96
- },
97
- zoom: {
98
- type: "integer",
99
- minimum: 1,
100
- maximum: 20,
101
- default: 15,
102
- description: "Map zoom level"
103
- },
104
- label: {
105
- type: "string",
106
- description: "Location title"
107
- },
108
- description: {
109
- type: "string",
110
- description: "Location description"
111
- }
112
- },
113
- required: ["lat", "lng"]
114
- }],
115
- [16, {
116
- tag: "u-chart-view",
117
- description: "Display charts using Chart.js v4 format. Use standard Chart.js configuration (type, data, options). The View accepts the exact same structure as Chart.js - no conversion needed.",
118
- properties: {
119
- type: {
120
- type: "string",
121
- enum: [
122
- "bar",
123
- "line",
124
- "pie",
125
- "doughnut",
126
- "radar",
127
- "polarArea",
128
- "bubble",
129
- "scatter"
130
- ],
131
- description: "Chart.js chart type"
132
- },
133
- data: {
134
- type: "object",
135
- description: "Chart.js data configuration",
136
- additionalProperties: true
137
- },
138
- options: {
139
- type: "object",
140
- description: "Chart.js options configuration (optional)",
141
- additionalProperties: true
142
- }
143
- },
144
- required: ["type", "data"]
145
- }]
146
- ]);
147
- //#endregion
148
- export { PRESET_VIEW_DEFINITIONS, PRESET_VIEW_LIST, PresetView };