@iyulab/chat-components 0.5.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/README.md +15 -39
- package/dist/_virtual/{_@oxc-project_runtime@0.128.0/helpers → _@oxc-project_runtime@0.138.0/helpers/esm}/decorate.js +2 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.128.0/helpers → _@oxc-project_runtime@0.138.0/helpers/esm}/decorateMetadata.js +2 -2
- package/dist/_virtual/_glob-assets_raw/alert-triangle-fill.svg.4cfc4305.js +4 -0
- package/dist/_virtual/_glob-assets_raw/arrows-sort.svg.dda43a85.js +4 -0
- package/dist/_virtual/_glob-assets_raw/code.svg.c69bc144.js +4 -0
- package/dist/_virtual/_glob-assets_raw/download.svg.bce82177.js +4 -0
- package/dist/_virtual/_glob-assets_raw/element-prompt.md.7047ffcc.js +4 -0
- package/dist/_virtual/_glob-assets_raw/external-link.svg.a9f7f02d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-code.svg.0e706f93.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-music.svg.b9970203.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-spreadsheet.svg.8c03bdfa.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-text.svg.85bdd923.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-type-pdf.svg.bc12db6d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-zip.svg.76dde660.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file.svg.28f5d6f1.js +4 -0
- package/dist/_virtual/_glob-assets_raw/photo.svg.cc273cc1.js +4 -0
- package/dist/_virtual/_glob-assets_raw/player-stop-fill.svg.5378b752.js +4 -0
- package/dist/_virtual/_glob-assets_raw/send.svg.02326253.js +4 -0
- package/dist/_virtual/_glob-assets_raw/sort-ascending-letters.svg.14a3df67.js +4 -0
- package/dist/_virtual/_glob-assets_raw/sort-descending-letters.svg.3e03647c.js +4 -0
- package/dist/_virtual/_glob-assets_raw/video.svg.c183f03c.js +4 -0
- package/dist/_virtual/_glob-assets_raw/world.svg.cd9903c8.js +4 -0
- package/dist/components/UDataElement.d.ts +44 -0
- package/dist/components/UDataElement.js +76 -0
- package/dist/components/blocks/UCodeBlock.d.ts +0 -4
- package/dist/components/blocks/UCodeBlock.js +6 -12
- package/dist/components/{views/UView.d.ts → blocks/UElementBlock.d.ts} +18 -8
- package/dist/components/{views/UView.js → blocks/UElementBlock.js} +31 -21
- package/dist/components/{views/UView.styles.js → blocks/UElementBlock.styles.js} +1 -1
- package/dist/components/blocks/UFileBlock.d.ts +15 -5
- package/dist/components/blocks/UFileBlock.js +81 -68
- package/dist/components/blocks/UFileBlock.styles.js +86 -29
- package/dist/components/blocks/UMarkedBlock.d.ts +3 -1
- package/dist/components/blocks/UMarkedBlock.js +23 -18
- package/dist/components/blocks/URefBlock.js +2 -2
- package/dist/components/blocks/UTableBlock.d.ts +2 -2
- package/dist/components/blocks/UTableBlock.js +9 -8
- package/dist/components/blocks/UTableBlock.styles.js +1 -1
- package/dist/components/blocks/UTextBlock.d.ts +2 -0
- package/dist/components/blocks/UTextBlock.js +4 -5
- package/dist/components/message/UMessage.js +2 -2
- package/dist/components/prompt/UPrompt.d.ts +0 -5
- package/dist/components/prompt/UPrompt.js +18 -27
- package/dist/components/prompt/UPrompt.styles.js +9 -10
- package/dist/components/references/URefCard.d.ts +2 -2
- package/dist/components/references/URefCard.js +8 -7
- package/dist/components/references/URefCardGroup.js +2 -2
- package/dist/components/references/URefTag.js +5 -4
- package/dist/{components/views/UChartView.d.ts → components-extra/UChartBlock.d.ts} +4 -4
- package/dist/{components/views/UChartView.js → components-extra/UChartBlock.js} +22 -34
- package/dist/components-extra/UChartBlock.schema.d.ts +3 -0
- package/dist/components-extra/UChartBlock.schema.js +34 -0
- package/dist/{components/views/UChartView.styles.js → components-extra/UChartBlock.styles.js} +1 -1
- package/dist/{components/views/UImagesView.d.ts → components-extra/UImagesBlock.d.ts} +4 -4
- package/dist/{components/views/UImagesView.js → components-extra/UImagesBlock.js} +15 -15
- package/dist/components-extra/UImagesBlock.schema.d.ts +3 -0
- package/dist/components-extra/UImagesBlock.schema.js +31 -0
- package/dist/{components/views/UImagesView.styles.js → components-extra/UImagesBlock.styles.js} +5 -5
- package/dist/{components/views/UMapView.d.ts → components-extra/UMapBlock.d.ts} +4 -4
- package/dist/{components/views/UMapView.js → components-extra/UMapBlock.js} +18 -18
- package/dist/components-extra/UMapBlock.schema.d.ts +3 -0
- package/dist/components-extra/UMapBlock.schema.js +33 -0
- package/dist/{components/views/UMapView.styles.js → components-extra/UMapBlock.styles.js} +1 -1
- package/dist/{components/views/UVideoView.d.ts → components-extra/UVideoBlock.d.ts} +4 -4
- package/dist/{components/views/UVideoView.js → components-extra/UVideoBlock.js} +10 -10
- package/dist/components-extra/UVideoBlock.schema.d.ts +3 -0
- package/dist/components-extra/UVideoBlock.schema.js +28 -0
- package/dist/{components/views/UVideoView.styles.js → components-extra/UVideoBlock.styles.js} +1 -1
- package/dist/events/SendEvent.d.ts +0 -5
- package/dist/events/StopEvent.d.ts +0 -5
- package/dist/extra.d.ts +6 -0
- package/dist/extra.js +14 -0
- package/dist/index.d.ts +5 -18
- package/dist/index.js +6 -17
- package/dist/react/UCodeBlock.js +2 -2
- package/dist/react/UElementBlock.d.ts +9 -0
- package/dist/react/UElementBlock.js +10 -0
- package/dist/react/UFileBlock.js +2 -2
- package/dist/react/UImagesBlock.d.ts +9 -0
- package/dist/react/UImagesBlock.js +10 -0
- package/dist/react/UMapBlock.d.ts +9 -0
- package/dist/react/UMapBlock.js +10 -0
- package/dist/react/UMarkedBlock.js +2 -2
- package/dist/react/UMessage.js +2 -2
- package/dist/react/UPrompt.js +2 -2
- package/dist/react/URefBlock.js +2 -2
- package/dist/react/URefCard.js +2 -2
- package/dist/react/URefCardGroup.js +2 -2
- package/dist/react/URefTag.js +2 -2
- package/dist/react/UTableBlock.js +2 -2
- package/dist/react/UTextBlock.d.ts +1 -0
- package/dist/react/UTextBlock.js +5 -3
- package/dist/react/UVideoBlock.d.ts +9 -0
- package/dist/react/UVideoBlock.js +10 -0
- package/dist/react/index.d.ts +4 -12
- package/dist/react/index.js +4 -12
- package/dist/types/BlockItem.d.ts +1 -24
- package/dist/types/{JsonSchema.d.ts → Schema.d.ts} +13 -0
- package/dist/utilities/HtmlBuilder.d.ts +28 -0
- package/dist/utilities/HtmlBuilder.js +41 -0
- package/dist/utilities/PromptBuilder.d.ts +21 -0
- package/dist/utilities/PromptBuilder.js +60 -0
- package/dist/utilities/icons.d.ts +1 -0
- package/dist/utilities/icons.js +52 -0
- package/dist/utilities/sanitizers.d.ts +35 -0
- package/dist/utilities/sanitizers.js +75 -0
- package/package.json +15 -15
- package/skills/iyulab-chat-components/SKILL.md +18 -33
- package/skills/iyulab-chat-components/references/components/{chart-view.md → chart-block.md} +16 -12
- package/skills/iyulab-chat-components/references/components/code-block.md +1 -5
- package/skills/iyulab-chat-components/references/components/element-block.md +57 -0
- package/skills/iyulab-chat-components/references/components/file-block.md +22 -25
- package/skills/iyulab-chat-components/references/components/{images-view.md → images-block.md} +10 -10
- package/skills/iyulab-chat-components/references/components/{map-view.md → map-block.md} +9 -9
- package/skills/iyulab-chat-components/references/components/marked-block.md +5 -4
- package/skills/iyulab-chat-components/references/components/message.md +1 -2
- package/skills/iyulab-chat-components/references/components/prompt.md +12 -21
- package/skills/iyulab-chat-components/references/components/{video-view.md → video-block.md} +10 -10
- package/skills/iyulab-chat-components/references/extra-system.md +95 -0
- package/skills/iyulab-chat-components/references/types.md +17 -31
- package/skills/iyulab-chat-components/references/usage.md +13 -81
- package/skills/iyulab-chat-components/references/utilities/html-builder.md +35 -0
- package/skills/iyulab-chat-components/references/utilities/prompt-builder.md +73 -0
- package/dist/_virtual/_glob-assets_raw/intent-prompt.md.1907474e.js +0 -4
- package/dist/_virtual/_glob-assets_raw/view-prompt.md.e0dbcffe.js +0 -4
- package/dist/components/blocks/UJsonBlock.d.ts +0 -49
- package/dist/components/blocks/UJsonBlock.js +0 -130
- package/dist/components/blocks/UJsonBlock.styles.js +0 -115
- package/dist/components/blocks/UThinkBlock.d.ts +0 -35
- package/dist/components/blocks/UThinkBlock.js +0 -87
- package/dist/components/blocks/UThinkBlock.styles.js +0 -74
- package/dist/components/blocks/UToolBlock.d.ts +0 -24
- package/dist/components/blocks/UToolBlock.js +0 -70
- package/dist/components/blocks/UToolBlock.styles.js +0 -66
- package/dist/components/buttons/UAttachButton.d.ts +0 -26
- package/dist/components/buttons/UAttachButton.js +0 -63
- package/dist/components/buttons/UAttachButton.styles.js +0 -14
- package/dist/components/buttons/UCopyButton.d.ts +0 -24
- package/dist/components/buttons/UCopyButton.js +0 -59
- package/dist/components/buttons/UCopyButton.styles.js +0 -18
- package/dist/components/buttons/UVoteButton.d.ts +0 -19
- package/dist/components/buttons/UVoteButton.js +0 -64
- package/dist/components/buttons/UVoteButton.styles.d.ts +0 -1
- package/dist/components/buttons/UVoteButton.styles.js +0 -19
- package/dist/components/intents/UQuestionIntent.d.ts +0 -22
- package/dist/components/intents/UQuestionIntent.js +0 -41
- package/dist/components/intents/UQuestionIntent.styles.d.ts +0 -1
- package/dist/components/intents/UQuestionIntent.styles.js +0 -43
- package/dist/components/views/UChartView.styles.d.ts +0 -1
- package/dist/components/views/UImagesView.styles.d.ts +0 -1
- package/dist/components/views/UMapView.styles.d.ts +0 -1
- package/dist/components/views/UVideoView.styles.d.ts +0 -1
- package/dist/components/views/UView.styles.d.ts +0 -1
- package/dist/events/AttachEvent.d.ts +0 -9
- package/dist/events/ChoiceEvent.d.ts +0 -9
- package/dist/react/UAttachButton.d.ts +0 -11
- package/dist/react/UAttachButton.js +0 -12
- package/dist/react/UChartView.d.ts +0 -9
- package/dist/react/UChartView.js +0 -10
- package/dist/react/UCopyButton.d.ts +0 -9
- package/dist/react/UCopyButton.js +0 -10
- package/dist/react/UImagesView.d.ts +0 -9
- package/dist/react/UImagesView.js +0 -10
- package/dist/react/UJsonBlock.d.ts +0 -9
- package/dist/react/UJsonBlock.js +0 -10
- package/dist/react/UMapView.d.ts +0 -9
- package/dist/react/UMapView.js +0 -10
- package/dist/react/UQuestionIntent.d.ts +0 -11
- package/dist/react/UQuestionIntent.js +0 -12
- package/dist/react/UThinkBlock.d.ts +0 -9
- package/dist/react/UThinkBlock.js +0 -10
- package/dist/react/UToolBlock.d.ts +0 -9
- package/dist/react/UToolBlock.js +0 -10
- package/dist/react/UVideoView.d.ts +0 -9
- package/dist/react/UVideoView.js +0 -10
- package/dist/react/UView.d.ts +0 -9
- package/dist/react/UView.js +0 -10
- package/dist/react/UVoteButton.d.ts +0 -9
- package/dist/react/UVoteButton.js +0 -10
- package/dist/types/Intents.d.ts +0 -26
- package/dist/types/Intents.js +0 -30
- package/dist/types/JsonNode.d.ts +0 -20
- package/dist/types/Views.d.ts +0 -34
- package/dist/types/Views.js +0 -150
- package/dist/utilities/IntentPromptBuilder.d.ts +0 -40
- package/dist/utilities/IntentPromptBuilder.js +0 -95
- package/dist/utilities/ViewPromptBuilder.d.ts +0 -28
- package/dist/utilities/ViewPromptBuilder.js +0 -76
- package/dist/utilities/dom-agent/DOMAgent.d.ts +0 -74
- package/dist/utilities/dom-agent/DOMController.d.ts +0 -78
- package/dist/utilities/dom-agent/DOMPromptBuilder.d.ts +0 -54
- package/dist/utilities/dom-agent/DOMScanner.d.ts +0 -83
- package/dist/utilities/dom-agent/index.d.ts +0 -9
- package/dist/utilities/dom-agent/types.d.ts +0 -209
- package/skills/iyulab-chat-components/references/components/attach-button.md +0 -69
- package/skills/iyulab-chat-components/references/components/copy-button.md +0 -46
- package/skills/iyulab-chat-components/references/components/json-block.md +0 -41
- package/skills/iyulab-chat-components/references/components/question-intent.md +0 -75
- package/skills/iyulab-chat-components/references/components/think-block.md +0 -48
- package/skills/iyulab-chat-components/references/components/tool-block.md +0 -57
- package/skills/iyulab-chat-components/references/components/view.md +0 -51
- package/skills/iyulab-chat-components/references/components/vote-button.md +0 -60
- package/skills/iyulab-chat-components/references/utilities/intent-prompt-builder.md +0 -123
- package/skills/iyulab-chat-components/references/utilities/view-prompt-builder.md +0 -112
- /package/dist/components/{buttons/UCopyButton.styles.d.ts → blocks/UElementBlock.styles.d.ts} +0 -0
- /package/dist/{components/blocks/UJsonBlock.styles.d.ts → components-extra/UChartBlock.styles.d.ts} +0 -0
- /package/dist/{components/blocks/UThinkBlock.styles.d.ts → components-extra/UImagesBlock.styles.d.ts} +0 -0
- /package/dist/{components/blocks/UToolBlock.styles.d.ts → components-extra/UMapBlock.styles.d.ts} +0 -0
- /package/dist/{components/buttons/UAttachButton.styles.d.ts → components-extra/UVideoBlock.styles.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const styles: import('lit').CSSResult;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const styles: import('lit').CSSResult;
|
|
@@ -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 { 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>;
|
package/dist/react/UChartView.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -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>;
|
package/dist/react/UJsonBlock.js
DELETED
|
@@ -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
|
-
});
|
package/dist/react/UMapView.d.ts
DELETED
|
@@ -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>;
|
package/dist/react/UMapView.js
DELETED
|
@@ -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>;
|
package/dist/react/UToolBlock.js
DELETED
|
@@ -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>;
|
package/dist/react/UVideoView.js
DELETED
|
@@ -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
|
-
});
|
package/dist/react/UView.d.ts
DELETED
|
@@ -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>;
|
package/dist/react/UView.js
DELETED
|
@@ -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
|
-
});
|
package/dist/types/Intents.d.ts
DELETED
|
@@ -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>;
|
package/dist/types/Intents.js
DELETED
|
@@ -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"] = PresetIntent.Questions] = "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 };
|
package/dist/types/JsonNode.d.ts
DELETED
|
@@ -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;
|
package/dist/types/Views.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { JsonSchema } from './JsonSchema.js';
|
|
2
|
-
/**
|
|
3
|
-
* View를 정의하는 구조체
|
|
4
|
-
*/
|
|
5
|
-
export interface ViewDefinition {
|
|
6
|
-
/** 등록할 커스텀 엘리먼트 클래스 */
|
|
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>;
|
package/dist/types/Views.js
DELETED
|
@@ -1,150 +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
|
-
import { UChartView } from "../components/views/UChartView.js";
|
|
5
|
-
//#region src/types/Views.ts
|
|
6
|
-
/**
|
|
7
|
-
* 프리셋 View 비트 플래그
|
|
8
|
-
*/
|
|
9
|
-
var PresetView = /* @__PURE__ */ function(PresetView) {
|
|
10
|
-
PresetView[PresetView["Images"] = 1] = "Images";
|
|
11
|
-
PresetView[PresetView["Video"] = 2] = "Video";
|
|
12
|
-
PresetView[PresetView["Map"] = 8] = "Map";
|
|
13
|
-
PresetView[PresetView["Chart"] = 16] = "Chart";
|
|
14
|
-
PresetView[PresetView["All"] = PresetView.Images | PresetView.Video | PresetView.Map | PresetView.Chart] = "All";
|
|
15
|
-
return PresetView;
|
|
16
|
-
}({});
|
|
17
|
-
/**
|
|
18
|
-
* 전체 프리셋 View 플래그 목록
|
|
19
|
-
*/
|
|
20
|
-
var PRESET_VIEW_LIST = [
|
|
21
|
-
PresetView.Images,
|
|
22
|
-
PresetView.Video,
|
|
23
|
-
PresetView.Map,
|
|
24
|
-
PresetView.Chart
|
|
25
|
-
];
|
|
26
|
-
/**
|
|
27
|
-
* 프리셋 View 정의
|
|
28
|
-
*/
|
|
29
|
-
var PRESET_VIEW_DEFINITIONS = new Map([
|
|
30
|
-
[PresetView.Images, {
|
|
31
|
-
element: UImagesView,
|
|
32
|
-
tag: "u-images-view",
|
|
33
|
-
description: "Display multiple images in a scrollable gallery",
|
|
34
|
-
properties: { items: {
|
|
35
|
-
type: "array",
|
|
36
|
-
items: {
|
|
37
|
-
type: "object",
|
|
38
|
-
properties: {
|
|
39
|
-
src: {
|
|
40
|
-
type: "string",
|
|
41
|
-
description: "Image URL"
|
|
42
|
-
},
|
|
43
|
-
alt: {
|
|
44
|
-
type: "string",
|
|
45
|
-
description: "Alt text for accessibility"
|
|
46
|
-
},
|
|
47
|
-
caption: {
|
|
48
|
-
type: "string",
|
|
49
|
-
description: "Image caption"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
required: ["src"]
|
|
53
|
-
},
|
|
54
|
-
minItems: 1,
|
|
55
|
-
description: "Array of image objects"
|
|
56
|
-
} },
|
|
57
|
-
required: ["items"]
|
|
58
|
-
}],
|
|
59
|
-
[PresetView.Video, {
|
|
60
|
-
element: UVideoView,
|
|
61
|
-
tag: "u-video-view",
|
|
62
|
-
description: "Embed video from YouTube, Vimeo, or Others. Provide a direct video file URL or a platform URL.",
|
|
63
|
-
properties: {
|
|
64
|
-
src: {
|
|
65
|
-
type: "string",
|
|
66
|
-
description: "Video URL (YouTube, Vimeo, or direct video file URL)"
|
|
67
|
-
},
|
|
68
|
-
poster: {
|
|
69
|
-
type: "string",
|
|
70
|
-
description: "Poster image URL"
|
|
71
|
-
},
|
|
72
|
-
ratio: {
|
|
73
|
-
type: "string",
|
|
74
|
-
enum: [
|
|
75
|
-
"16:9",
|
|
76
|
-
"4:3",
|
|
77
|
-
"1:1"
|
|
78
|
-
],
|
|
79
|
-
default: "16:9",
|
|
80
|
-
description: "Video aspect ratio"
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
required: ["src"]
|
|
84
|
-
}],
|
|
85
|
-
[PresetView.Map, {
|
|
86
|
-
element: UMapView,
|
|
87
|
-
tag: "u-map-view",
|
|
88
|
-
description: "Display a map showing a single location",
|
|
89
|
-
properties: {
|
|
90
|
-
lat: {
|
|
91
|
-
type: "number",
|
|
92
|
-
description: "Latitude coordinate"
|
|
93
|
-
},
|
|
94
|
-
lng: {
|
|
95
|
-
type: "number",
|
|
96
|
-
description: "Longitude coordinate"
|
|
97
|
-
},
|
|
98
|
-
zoom: {
|
|
99
|
-
type: "integer",
|
|
100
|
-
minimum: 1,
|
|
101
|
-
maximum: 20,
|
|
102
|
-
default: 15,
|
|
103
|
-
description: "Map zoom level"
|
|
104
|
-
},
|
|
105
|
-
label: {
|
|
106
|
-
type: "string",
|
|
107
|
-
description: "Location title"
|
|
108
|
-
},
|
|
109
|
-
description: {
|
|
110
|
-
type: "string",
|
|
111
|
-
description: "Location description"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
required: ["lat", "lng"]
|
|
115
|
-
}],
|
|
116
|
-
[PresetView.Chart, {
|
|
117
|
-
element: UChartView,
|
|
118
|
-
tag: "u-chart-view",
|
|
119
|
-
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.",
|
|
120
|
-
properties: {
|
|
121
|
-
type: {
|
|
122
|
-
type: "string",
|
|
123
|
-
enum: [
|
|
124
|
-
"bar",
|
|
125
|
-
"line",
|
|
126
|
-
"pie",
|
|
127
|
-
"doughnut",
|
|
128
|
-
"radar",
|
|
129
|
-
"polarArea",
|
|
130
|
-
"bubble",
|
|
131
|
-
"scatter"
|
|
132
|
-
],
|
|
133
|
-
description: "Chart.js chart type"
|
|
134
|
-
},
|
|
135
|
-
data: {
|
|
136
|
-
type: "object",
|
|
137
|
-
description: "Chart.js data configuration",
|
|
138
|
-
additionalProperties: true
|
|
139
|
-
},
|
|
140
|
-
options: {
|
|
141
|
-
type: "object",
|
|
142
|
-
description: "Chart.js options configuration (optional)",
|
|
143
|
-
additionalProperties: true
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
required: ["type", "data"]
|
|
147
|
-
}]
|
|
148
|
-
]);
|
|
149
|
-
//#endregion
|
|
150
|
-
export { PRESET_VIEW_DEFINITIONS, PRESET_VIEW_LIST, PresetView };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { PresetIntent, IntentDefinition, IntentSchema } from '../types/Intents.js';
|
|
2
|
-
/**
|
|
3
|
-
* Intent 등록, LLM 인스트럭션 빌드, 텍스트 추출을 통합 제공하는 유틸리티
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* IntentPromptBuilder.use(PresetIntent.All);
|
|
7
|
-
* const prompt = IntentPromptBuilder.buildPrompt();
|
|
8
|
-
* const [clean, templates] = IntentPromptBuilder.extractPrompt(llmText);
|
|
9
|
-
*/
|
|
10
|
-
export declare class IntentPromptBuilder {
|
|
11
|
-
private static _instance;
|
|
12
|
-
private intents;
|
|
13
|
-
/**
|
|
14
|
-
* 싱글톤 인스턴스를 반환합니다. 최초 호출 시 인스턴스가 생성됩니다.
|
|
15
|
-
*/
|
|
16
|
-
static get instance(): IntentPromptBuilder;
|
|
17
|
-
/**
|
|
18
|
-
* Intent 정의를 등록합니다. 같은 type이 이미 등록되어 있으면 에러를 던집니다.
|
|
19
|
-
* @throws {Error} 같은 type의 intent가 이미 등록된 경우
|
|
20
|
-
*/
|
|
21
|
-
add(definition: IntentDefinition): IntentPromptBuilder;
|
|
22
|
-
/**
|
|
23
|
-
* 미리 정의된 프리셋 Intent를 등록합니다.
|
|
24
|
-
* @example
|
|
25
|
-
* IntentPromptBuilder.use(PresetIntent.Questions);
|
|
26
|
-
* IntentPromptBuilder.use(PresetIntent.All);
|
|
27
|
-
*/
|
|
28
|
-
use(flags: PresetIntent): IntentPromptBuilder;
|
|
29
|
-
/**
|
|
30
|
-
* 등록된 intent들에 대한 LLM 시스템 프롬프트 인스트럭션을 생성합니다.
|
|
31
|
-
*/
|
|
32
|
-
build(): string;
|
|
33
|
-
/**
|
|
34
|
-
* LLM 응답 텍스트에서 `intent-json` 코드블록을 추출합니다.
|
|
35
|
-
*
|
|
36
|
-
* @param value - LLM 응답 텍스트
|
|
37
|
-
* @returns `[intents, rest]` — intents는 파싱된 JSON 객체 배열, rest는 블록이 제거된 나머지 텍스트
|
|
38
|
-
*/
|
|
39
|
-
parse(value: string): [IntentSchema[], string];
|
|
40
|
-
}
|