@rustic-ai/ui-components 0.0.19 → 0.0.21
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/dist/components/calendar/fCCalendar.d.ts +8 -2
- package/dist/components/calendar/fCCalendar.d.ts.map +1 -1
- package/dist/components/calendar/index.css +21 -0
- package/dist/components/calendar/index.d.ts +5 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/codeSnippet/index.css +14 -0
- package/dist/components/codeSnippet/index.d.ts +5 -0
- package/dist/components/codeSnippet/index.d.ts.map +1 -0
- package/dist/components/codeSnippet/index.js +1 -0
- package/dist/components/elementRenderer/elementRenderer.d.ts +2 -2
- package/dist/components/elementRenderer/elementRenderer.d.ts.map +1 -1
- package/dist/components/elementRenderer/index.d.ts +3 -0
- package/dist/components/elementRenderer/index.d.ts.map +1 -0
- package/dist/components/elementRenderer/index.js +1 -0
- package/dist/components/image/index.css +43 -0
- package/dist/components/image/index.d.ts +5 -0
- package/dist/components/image/index.d.ts.map +1 -0
- package/dist/components/image/index.js +1 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/baseInput/baseInput.d.ts.map +1 -1
- package/dist/components/input/emoji/index.css +16 -0
- package/dist/components/input/emoji/index.d.ts +4 -0
- package/dist/components/input/emoji/index.d.ts.map +1 -0
- package/dist/components/input/emoji/index.js +1 -0
- package/dist/components/input/multimodal/multimodalInput/index.css +227 -0
- package/dist/components/input/multimodal/multimodalInput/index.d.ts +5 -0
- package/dist/components/input/multimodal/multimodalInput/index.d.ts.map +1 -0
- package/dist/components/input/multimodal/multimodalInput/index.js +1 -0
- package/dist/components/input/multimodal/multimodalInput/multimodalInput.d.ts +8 -1
- package/dist/components/input/multimodal/multimodalInput/multimodalInput.d.ts.map +1 -1
- package/dist/components/input/multimodal/uploader/index.css +145 -0
- package/dist/components/input/multimodal/uploader/index.d.ts +5 -0
- package/dist/components/input/multimodal/uploader/index.d.ts.map +1 -0
- package/dist/components/input/multimodal/uploader/index.js +1 -0
- package/dist/components/input/textInput/index.css +57 -0
- package/dist/components/input/textInput/index.d.ts +4 -0
- package/dist/components/input/textInput/index.d.ts.map +1 -0
- package/dist/components/input/textInput/index.js +1 -0
- package/dist/components/input/textInput/textInput.d.ts +0 -3
- package/dist/components/input/textInput/textInput.d.ts.map +1 -1
- package/dist/components/map/index.css +13 -0
- package/dist/components/map/index.d.ts +5 -0
- package/dist/components/map/index.d.ts.map +1 -0
- package/dist/components/map/index.js +1 -0
- package/dist/components/map/openLayersMap.d.ts +6 -1
- package/dist/components/map/openLayersMap.d.ts.map +1 -1
- package/dist/components/markdown/index.d.ts +6 -0
- package/dist/components/markdown/index.d.ts.map +1 -0
- package/dist/components/markdown/index.js +1 -0
- package/dist/components/markdown/markedMarkdown.d.ts +7 -1
- package/dist/components/markdown/markedMarkdown.d.ts.map +1 -1
- package/dist/components/media/audio/index.css +182 -0
- package/dist/components/media/audio/index.d.ts +5 -0
- package/dist/components/media/audio/index.d.ts.map +1 -0
- package/dist/components/media/audio/index.js +1 -0
- package/dist/components/media/video/index.css +225 -0
- package/dist/components/media/video/index.d.ts +5 -0
- package/dist/components/media/video/index.d.ts.map +1 -0
- package/dist/components/media/video/index.js +1 -0
- package/dist/components/menu/index.css +26 -0
- package/dist/components/menu/index.d.ts +4 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/messageCanvas/actions/action.d.ts +12 -0
- package/dist/components/messageCanvas/actions/action.d.ts.map +1 -0
- package/dist/components/messageCanvas/actions/copy/copyText.d.ts +2 -2
- package/dist/components/messageCanvas/actions/copy/copyText.d.ts.map +1 -1
- package/dist/components/messageCanvas/actions/copy/index.css +8 -0
- package/dist/components/messageCanvas/actions/copy/index.d.ts +3 -0
- package/dist/components/messageCanvas/actions/copy/index.d.ts.map +1 -0
- package/dist/components/messageCanvas/actions/copy/index.js +1 -0
- package/dist/components/messageCanvas/actions/index.css +4 -0
- package/dist/components/messageCanvas/actions/index.d.ts +4 -11
- package/dist/components/messageCanvas/actions/index.d.ts.map +1 -1
- package/dist/components/messageCanvas/actions/index.js +1 -0
- package/dist/components/messageCanvas/actions/textToSpeech/index.css +8 -0
- package/dist/components/messageCanvas/actions/textToSpeech/index.d.ts +3 -0
- package/dist/components/messageCanvas/actions/textToSpeech/index.d.ts.map +1 -0
- package/dist/components/messageCanvas/actions/textToSpeech/index.js +1 -0
- package/dist/components/messageCanvas/actions/textToSpeech/textToSpeech.d.ts +2 -2
- package/dist/components/messageCanvas/actions/textToSpeech/textToSpeech.d.ts.map +1 -1
- package/dist/components/messageCanvas/index.css +39 -0
- package/dist/components/messageCanvas/index.d.ts +4 -0
- package/dist/components/messageCanvas/index.d.ts.map +1 -0
- package/dist/components/messageCanvas/index.js +1 -0
- package/dist/components/messageCanvas/messageCanvas.d.ts +5 -5
- package/dist/components/messageCanvas/messageCanvas.d.ts.map +1 -1
- package/dist/components/messageSpace/index.css +63 -0
- package/dist/components/messageSpace/index.d.ts +4 -0
- package/dist/components/messageSpace/index.d.ts.map +1 -0
- package/dist/components/messageSpace/index.js +1 -0
- package/dist/components/messageSpace/messageSpace.d.ts +6 -3
- package/dist/components/messageSpace/messageSpace.d.ts.map +1 -1
- package/dist/components/mockWebSocket.d.ts +5 -0
- package/dist/components/mockWebSocket.d.ts.map +1 -0
- package/dist/components/multipart/index.css +134 -0
- package/dist/components/multipart/index.d.ts +5 -0
- package/dist/components/multipart/index.d.ts.map +1 -0
- package/dist/components/multipart/index.js +1 -0
- package/dist/components/multipart/multipart.d.ts +2 -2
- package/dist/components/multipart/multipart.d.ts.map +1 -1
- package/dist/components/participantsContainer/index.css +42 -0
- package/dist/components/participantsContainer/index.d.ts +5 -0
- package/dist/components/participantsContainer/index.d.ts.map +1 -0
- package/dist/components/participantsContainer/index.js +1 -0
- package/dist/components/participantsContainer/participantsContainer.d.ts +14 -1
- package/dist/components/participantsContainer/participantsContainer.d.ts.map +1 -1
- package/dist/components/pdfViewer/index.css +60 -0
- package/dist/components/pdfViewer/index.d.ts +5 -0
- package/dist/components/pdfViewer/index.d.ts.map +1 -0
- package/dist/components/pdfViewer/index.js +1 -0
- package/dist/components/pdfViewer/pdfViewer.d.ts +4 -0
- package/dist/components/pdfViewer/pdfViewer.d.ts.map +1 -1
- package/dist/components/promptBuilder/index.css +96 -0
- package/dist/components/promptBuilder/index.d.ts +5 -0
- package/dist/components/promptBuilder/index.d.ts.map +1 -0
- package/dist/components/promptBuilder/index.js +1 -0
- package/dist/components/promptBuilder/promptBuilder.d.ts +24 -0
- package/dist/components/promptBuilder/promptBuilder.d.ts.map +1 -0
- package/dist/components/question/index.css +14 -0
- package/dist/components/question/index.d.ts +5 -0
- package/dist/components/question/index.d.ts.map +1 -0
- package/dist/components/question/index.js +1 -0
- package/dist/components/question/question.d.ts +7 -1
- package/dist/components/question/question.d.ts.map +1 -1
- package/dist/components/table/index.css +43 -0
- package/dist/components/table/index.d.ts +5 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/text/index.css +5 -0
- package/dist/components/text/index.d.ts +7 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +1 -0
- package/dist/components/text/text.d.ts +7 -1
- package/dist/components/text/text.d.ts.map +1 -1
- package/dist/components/timestamp/index.d.ts +3 -0
- package/dist/components/timestamp/index.d.ts.map +1 -0
- package/dist/components/timestamp/index.js +1 -0
- package/dist/components/types.d.ts +20 -50
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/video/index.css +34 -0
- package/dist/components/video/index.d.ts +3 -0
- package/dist/components/video/index.d.ts.map +1 -0
- package/dist/components/video/index.js +1 -0
- package/dist/components/video/youtubeVideo.d.ts +8 -1
- package/dist/components/video/youtubeVideo.d.ts.map +1 -1
- package/dist/components/visualization/chart/index.css +44 -0
- package/dist/components/visualization/chart/index.d.ts +4 -0
- package/dist/components/visualization/chart/index.d.ts.map +1 -0
- package/dist/components/visualization/chart/index.js +1 -0
- package/dist/components/visualization/chart/rechartsTimeSeries.d.ts +8 -1
- package/dist/components/visualization/chart/rechartsTimeSeries.d.ts.map +1 -1
- package/dist/components/visualization/mermaidViz/index.css +21 -0
- package/dist/components/visualization/mermaidViz/index.d.ts +5 -0
- package/dist/components/visualization/mermaidViz/index.d.ts.map +1 -0
- package/dist/components/visualization/mermaidViz/index.js +1 -0
- package/dist/components/visualization/mermaidViz/mermaidViz.d.ts +9 -2
- package/dist/components/visualization/mermaidViz/mermaidViz.d.ts.map +1 -1
- package/dist/components/visualization/mermaidViz/mermaidViz.types.d.ts +10 -0
- package/dist/components/visualization/mermaidViz/mermaidViz.types.d.ts.map +1 -0
- package/dist/components/visualization/perspectiveViz/index.css +16 -0
- package/dist/components/visualization/perspectiveViz/index.d.ts +5 -0
- package/dist/components/visualization/perspectiveViz/index.d.ts.map +1 -0
- package/dist/components/visualization/perspectiveViz/index.js +1 -0
- package/dist/components/visualization/perspectiveViz/perspectiveViz.d.ts +7 -4
- package/dist/components/visualization/perspectiveViz/perspectiveViz.d.ts.map +1 -1
- package/dist/components/visualization/vegaLiteViz/index.css +45 -0
- package/dist/components/visualization/vegaLiteViz/index.d.ts +5 -0
- package/dist/components/visualization/vegaLiteViz/index.d.ts.map +1 -0
- package/dist/components/visualization/vegaLiteViz/index.js +1 -0
- package/dist/components/visualization/vegaLiteViz/vegaLiteViz.d.ts +9 -2
- package/dist/components/visualization/vegaLiteViz/vegaLiteViz.d.ts.map +1 -1
- package/dist/components/visualization/vegaLiteViz/vegaLiteViz.types.d.ts +20 -0
- package/dist/components/visualization/vegaLiteViz/vegaLiteViz.types.d.ts.map +1 -0
- package/dist/components/weather/index.css +77 -0
- package/dist/components/weather/index.d.ts +5 -0
- package/dist/components/weather/index.d.ts.map +1 -0
- package/dist/components/weather/index.js +1 -0
- package/dist/index.css +62 -0
- package/dist/index.js +1 -2
- package/dist/rusticTheme.d.ts +29 -0
- package/dist/rusticTheme.d.ts.map +1 -1
- package/dist/rusticTheme.js +1 -0
- package/package.json +123 -22
- package/dist/index.js.LICENSE.txt +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './messageSpace.css';
|
|
2
2
|
import { type MessageContainerProps } from '../messageCanvas/messageCanvas';
|
|
3
|
-
import type { ComponentMap,
|
|
3
|
+
import type { ComponentMap, Message, Sender, WebSocketClient } from '../types';
|
|
4
4
|
export interface MessageSpaceProps extends MessageContainerProps {
|
|
5
5
|
/** WebSocket connection to send and receive messages to and from a backend. This can be useful for component interactions, for example, to send filter conditions, user location, etc. */
|
|
6
6
|
ws: WebSocketClient;
|
|
@@ -8,12 +8,15 @@ export interface MessageSpaceProps extends MessageContainerProps {
|
|
|
8
8
|
sender: Sender;
|
|
9
9
|
/** A component map contains message formats as keys and their corresponding React components as values. */
|
|
10
10
|
supportedElements: ComponentMap;
|
|
11
|
-
messages
|
|
11
|
+
/** Messages received before the component was mounted. These messages are rendered along with new messages received from the websocket. */
|
|
12
|
+
receivedMessages?: Message[];
|
|
12
13
|
/** Text label for scroll down button. Default value is 'scroll down'. */
|
|
13
14
|
scrollDownLabel?: string;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
|
-
The `MessageSpace` component uses `MessageCanvas` and `ElementRenderer` to render a list of messages. It serves as a container for individual message items, each encapsulated within a `MessageCanvas` for consistent styling and layout.
|
|
17
|
+
The `MessageSpace` component uses `MessageCanvas` and `ElementRenderer` to render a list of messages. It serves as a container for individual message items, each encapsulated within a `MessageCanvas` for consistent styling and layout. It can receive and process messages to dynamically update the displayed content.
|
|
18
|
+
|
|
19
|
+
The `MessageSpace` component can combine update messages with the original message and render them as a single message. For this to work, the `threadId` of the update message must match the `id` of the original message, and the format of the update message should be prefixed with 'update'. For example, if the original message format is 'streamingText', the update message format should be 'updateStreamingText'.
|
|
17
20
|
|
|
18
21
|
Note: For more information about the `getActionsComponent` and `getProfileComponent` fields, refer to the [MessageCanvas' docs](http://localhost:6006/?path=/docs/rustic-ui-message-canvas-message-canvas--docs).
|
|
19
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageSpace.d.ts","sourceRoot":"","sources":["../../../src/components/messageSpace/messageSpace.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAQ3B,OAAsB,EACpB,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"messageSpace.d.ts","sourceRoot":"","sources":["../../../src/components/messageSpace/messageSpace.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAQ3B,OAAsB,EACpB,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE9E,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,0LAA0L;IAC1L,EAAE,EAAE,eAAe,CAAA;IACnB,0GAA0G;IAC1G,MAAM,EAAE,MAAM,CAAA;IACd,2GAA2G;IAC3G,iBAAiB,EAAE,YAAY,CAAA;IAC/B,2IAA2I;IAC3I,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAA;IAC5B,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AA0CD;;;;;;EAME;AAEF,iBAAwB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAiK5D;kBAjKuB,YAAY;;;;;eAAZ,YAAY"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Client } from 'mock-socket';
|
|
2
|
+
import type { MessageData, WebSocketClient } from './types';
|
|
3
|
+
export declare function sendMessageToClient(socket: Client, format: string, data: MessageData): void;
|
|
4
|
+
export declare function getMockWebSocketClient(webSocketUrl: string): WebSocketClient;
|
|
5
|
+
//# sourceMappingURL=mockWebSocket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockWebSocket.d.ts","sourceRoot":"","sources":["../../src/components/mockWebSocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAa,MAAM,aAAa,CAAA;AAGpD,OAAO,KAAK,EAAW,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAKpE,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,WAAW,QAalB;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,GAAG,eAAe,CAkC5E"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
.rustic-multipart {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
margin: 0;
|
|
9
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
10
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
11
|
+
sans-serif;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
code {
|
|
17
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
18
|
+
monospace;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rustic-fit-container {
|
|
22
|
+
object-fit: contain;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.rustic-files {
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: 8px;
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.rustic-cursor-pointer {
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.rustic-align-self-center {
|
|
38
|
+
align-self: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.rustic-file-preview {
|
|
42
|
+
position: relative;
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
padding: 8px 8px 8px 16px;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
width: 220px;
|
|
48
|
+
height: 56px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.rustic-file-preview-modal {
|
|
52
|
+
width: 90vw;
|
|
53
|
+
height: 90vh;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-self: center;
|
|
56
|
+
justify-self: center;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.rustic-file-preview-modal .rustic-modal-content {
|
|
60
|
+
position: relative;
|
|
61
|
+
width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.rustic-modal-content .rustic-close-button {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 16px;
|
|
67
|
+
right: 16px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
span.rustic-icon-large {
|
|
71
|
+
font-size: 32px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.rustic-pdf-viewer {
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: 100%;
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
padding: 16px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.rustic-pdf-error {
|
|
83
|
+
padding: 16px;
|
|
84
|
+
width: fit-content;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.rustic-pdf-viewer .rustic-pdf-viewer-header {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
margin-bottom: 8px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.rustic-pdf-viewer .rustic-pdf-canvas {
|
|
94
|
+
flex: 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.rustic-pdf-viewer .rustic-pdf-page-input > div {
|
|
98
|
+
height: 24px;
|
|
99
|
+
width: 56px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.rustic-pdf-viewer .rustic-pdf-page-input input {
|
|
103
|
+
text-align: center;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.rustic-pdf-viewer
|
|
107
|
+
.rustic-pdf-page-input
|
|
108
|
+
input[type='number']::-webkit-inner-spin-button {
|
|
109
|
+
display: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.rustic-pdf-viewer .rustic-page-indicator {
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
gap: 8px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.rustic-pdf-viewer-body {
|
|
119
|
+
flex: 1;
|
|
120
|
+
display: flex;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
overflow: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.rustic-pdf-viewer-body-inner {
|
|
126
|
+
overflow: auto;
|
|
127
|
+
width: fit-content;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.rustic-text {
|
|
131
|
+
white-space: break-spaces;
|
|
132
|
+
overflow-wrap: break-word;
|
|
133
|
+
}
|
|
134
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/multipart/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAExB,OAAO,SAAS,MAAM,aAAa,CAAA;AAEnC,cAAc,UAAU,CAAA;AACxB,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():e["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>I});const t=require("react/jsx-runtime"),n=require("@mui/material/IconButton");var i=e.n(n);const a=require("@mui/material/Tooltip");var s=e.n(a);const o=require("@mui/system/Box");var l=e.n(o);const c=require("react"),u=require("@mui/material/Card");var d=e.n(u);const m=require("@mui/material/Modal");var f=e.n(m);const p=require("@mui/material/styles"),x=require("@mui/material/Typography");var h,v=e.n(x);function j(e){return e.name.replaceAll("_","-"),(0,t.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),children:e.name})}require("pluralize"),function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(h||(h={}));const b=require("@mui/material/Box");var y=e.n(b);const g=require("@mui/material/TextField");var w=e.n(g);const N=require("@mui/material/useMediaQuery");var C=e.n(N);const k=require("@mui/system/Stack");var q=e.n(k);const P=require("@mui/system/useTheme");var S=e.n(P);const O=require("pdfjs-dist"),T=function(e){var r={zoomIn:{symbol:"zoom_in",label:"Zoom in"},zoomOut:{symbol:"zoom_out",label:"Zoom out"},close:{symbol:"close",label:"Close"},previousPage:{symbol:"arrow_back",label:"Previous page"},nextPage:{symbol:"arrow_forward",label:"Next page"}},n=(r[e.action].label.replaceAll(" ","-").toLowerCase(),r[e.action]);return(0,t.jsx)(s(),{title:n.label,children:(0,t.jsx)("span",{children:(0,t.jsx)(i(),{onClick:e.onClick,className:e.className,disabled:e.isDisabled,children:(0,t.jsx)(j,{name:n.symbol})})})})};var _={pdf:function(e){var r,n=(0,c.useRef)(null),i=(0,c.useState)(1),a=i[0],s=i[1],o=(0,c.useState)(1),l=o[0],u=o[1],m=(0,c.useState)(1),f=m[0],p=m[1],x=(0,c.useState)(!1),h=x[0],j=x[1],b=(0,c.useState)(),g=b[0],N=b[1],k=S()(),P=C()(k.breakpoints.down("sm")),_=C()(k.breakpoints.between("sm","md"));if(r=e.url,!/\/[^/]+\.pdf$/.test(r))return(0,t.jsx)(d(),{variant:"outlined",className:"rustic-pdf-error",children:(0,t.jsx)(v(),{variant:"body2",children:"The provided URL does not point to a PDF file."})});var z=(0,c.useState)((function(){return P?.5:_?1:1.5})),D=z[0],M=z[1];return(0,c.useEffect)((function(){O.GlobalWorkerOptions.workerSrc||(O.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(O.version,"/pdf.worker.mjs")),O.getDocument({url:"".concat(e.url)}).promise.then((function(e){u(e.numPages),function(e){e.getPage(a).then((function(e){var r=e.getViewport({scale:D}),t=n.current;if(t){var i=t.getContext("2d");if(i){var a=window.devicePixelRatio||1;t.style.width="".concat(r.width,"px"),t.style.height="".concat(r.height,"px"),t.width=r.width*a,t.height=r.height*a;var s={canvasContext:i,viewport:r,transform:[a,0,0,a,0,0]};g&&g.cancel();var o=e.render(s);N(o),o.promise.then((function(){N(void 0)})).catch((function(e){console.error(e)}))}}}))}(e)})).catch((function(){j(!0)}))}),[e.url,a,D]),h?(0,t.jsx)(d(),{variant:"outlined",className:"rustic-pdf-error",children:(0,t.jsx)(v(),{variant:"body2",children:"Failed to load the PDF file."})}):(0,t.jsxs)(d(),{variant:"outlined",className:"rustic-pdf-viewer",children:[(0,t.jsxs)(y(),{className:"rustic-pdf-viewer-header",children:[(0,t.jsx)(T,{action:"zoomOut",onClick:function(){M((function(e){return Math.max(e-.2,.2)}))}}),(0,t.jsx)(T,{action:"zoomIn",onClick:function(){M((function(e){return e+.2}))}})]}),(0,t.jsx)(y(),{className:"rustic-pdf-viewer-body",children:(0,t.jsx)(y(),{className:"rustic-pdf-viewer-body-inner",children:(0,t.jsx)("canvas",{ref:n})})}),(0,t.jsxs)(q(),{direction:"row",justifyContent:"center",alignItems:"center",gap:1,children:[(0,t.jsx)(T,{action:"previousPage",onClick:function(){a>1&&(s(a-1),p(a-1))},isDisabled:1===a}),(0,t.jsx)(v(),{variant:"body1",className:"rustic-page-indicator",children:"Page"}),(0,t.jsx)(w(),{type:"number",value:f,onChange:function(e){var r=parseInt(e.target.value);p(r),!isNaN(r)&&r>=1&&r<=l&&s(r)},size:"small",className:"rustic-pdf-page-input"}),(0,t.jsxs)(v(),{variant:"body1",className:"rustic-page-indicator",children:["of ",l]}),(0,t.jsx)(T,{action:"nextPage",onClick:function(){a<l&&(s(a+1),p(a+1))},isDisabled:a===l})]})]})}};function z(e){var r=(0,p.useTheme)(),n=(0,c.useState)(!1),a=n[0],o=n[1];function l(){o(!1)}var u,m,x=e.file.url&&(u=e.file.url.split("."))[u.length-1].toLowerCase(),h=x&&e.supportedViewers?e.supportedViewers[x]:null,b=!!h;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d(),{className:"rustic-file-preview".concat(b?" rustic-cursor-pointer":""),variant:"outlined",sx:{boxShadow:r.shadows[1]},onClick:function(){o(!0)},children:[(0,t.jsx)(v(),{variant:"subtitle2",children:(m=e.file.name,15,m.length<=15?m:m.substring(0,12)+"...")}),(0,t.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:e.children})]}),b&&(0,t.jsx)(f(),{open:a,onClose:l,className:"rustic-file-preview-modal",children:(0,t.jsxs)("div",{className:"rustic-modal-content",children:[(0,t.jsx)(s(),{title:"Close",children:(0,t.jsx)(i(),{onClick:l,className:"rustic-close-button",children:(0,t.jsx)(j,{name:"close"})})}),e.file.url&&(0,t.jsx)(h,{url:e.file.url})]})})]})}z.defaultProps={supportedViewers:_};const D=require("dompurify");var M=e.n(D);const F=function(e){return(0,t.jsx)(v(),{variant:"body2",className:"rustic-text",children:M().sanitize(e.text)})},I=function(e){return(0,t.jsxs)(l(),{className:"rustic-multipart",children:[e.text&&(0,t.jsx)(F,{text:e.text}),(r=e.files.map((function(e,r){return(0,t.jsx)(z,{file:e,children:e.url&&(0,t.jsx)(s(),{title:"Download",children:(0,t.jsx)(i(),{component:"a",href:e.url,download:e.name,children:(0,t.jsx)(j,{name:"download"})})})},r)})),(0,t.jsx)(l(),{className:"rustic-files",children:r}))]});var r};return r})()));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
2
|
import './multipart.css';
|
|
3
|
-
import type {
|
|
3
|
+
import type { MultipartProps } from '../types';
|
|
4
4
|
/** The `Multipart` component is a versatile message format designed to accommodate both textual content and file attachments within a single message interface. */
|
|
5
|
-
export default function Multipart(props:
|
|
5
|
+
export default function Multipart(props: MultipartProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=multipart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multipart.d.ts","sourceRoot":"","sources":["../../../src/components/multipart/multipart.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AACxB,OAAO,iBAAiB,CAAA;AAUxB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"multipart.d.ts","sourceRoot":"","sources":["../../../src/components/multipart/multipart.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AACxB,OAAO,iBAAiB,CAAA;AAUxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,mKAAmK;AACnK,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,2CA8BtD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.rustic-participant-list {
|
|
2
|
+
padding: 24px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.rustic-participant-list-no-participants-message {
|
|
6
|
+
padding: 24px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.rustic-participants-container-title {
|
|
10
|
+
padding: 24px 32px 16px 32px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rustic-participant-list-item {
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.rustic-participant-list-subheader {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
margin-bottom: 16px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.rustic-participant-list-subheader-title {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 8px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.rustic-participants-container-divider {
|
|
36
|
+
margin-inline: 24px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
span.rustic-icon-large {
|
|
40
|
+
font-size: 32px;
|
|
41
|
+
}
|
|
42
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './participantsContainer.css';
|
|
2
|
+
import ParticipantsContainer, { type Participant, ParticipantRole, ParticipantType } from './participantsContainer';
|
|
3
|
+
export default ParticipantsContainer;
|
|
4
|
+
export { type Participant, ParticipantRole, ParticipantType };
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/participantsContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,qBAAqB,EAAE,EAC5B,KAAK,WAAW,EAChB,eAAe,EACf,eAAe,EAChB,MAAM,yBAAyB,CAAA;AAEhC,eAAe,qBAAqB,CAAA;AAEpC,OAAO,EAAE,KAAK,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@rustic-ai/ui-components"]=e():t["@rustic-ai/ui-components"]=e()}(global,(()=>(()=>{"use strict";var t={n:e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},d:(e,r)=>{for(var a in r)t.o(r,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{ParticipantRole:()=>q,ParticipantType:()=>_,default:()=>S});const r=require("react/jsx-runtime"),a=require("@mui/material/Button");var i=t.n(a);const n=require("@mui/material/Dialog");var c=t.n(n);const s=require("@mui/material/DialogTitle");var o=t.n(s);const p=require("@mui/material/Divider");var l=t.n(p);const u=require("@mui/material/List");var m=t.n(u);const d=require("@mui/material/ListItem");var y=t.n(d);const f=require("@mui/material/ListSubheader");var h=t.n(f);const x=require("@mui/material/Typography");var j=t.n(x);const v=require("@mui/system"),b=require("pluralize");var g=t.n(b);const T=require("react");var N;function O(t){return t.name.replaceAll("_","-"),(0,r.jsx)("span",{className:"".concat(t.className?t.className+" ":"","material-symbols-rounded"),children:t.name})}!function(t){t[t.HOUR=0]="HOUR",t[t.MONTH_DATE=1]="MONTH_DATE"}(N||(N={}));var q,_;function A(t){var e=(0,T.useState)(!1),a=e[0],n=e[1],c=t.participants.length,s=a?t.participants:t.participants.slice(0,3),o="".concat(g()(t.participantType,c)," (").concat(c,")"),p=a?"Show Less":"Show All ".concat(c);return 0===c?(0,r.jsx)(j(),{variant:"caption",className:"rustic-participant-list-no-participants-message",children:"There are currently no participants."}):(0,r.jsx)(m(),{className:"rustic-participant-list",subheader:(0,r.jsxs)(h(),{disableSticky:!0,className:"rustic-participant-list-subheader",children:[(0,r.jsxs)(v.Box,{className:"rustic-participant-list-subheader-title",children:[t.participantTypeIcon,(0,r.jsx)(j(),{variant:"subtitle2",color:"text.secondary",children:o})]}),c>3&&(0,r.jsx)(i(),{onClick:function(){return n(!a)},color:"primary",size:"small",startIcon:(0,r.jsx)(O,{name:"keyboard_arrow_down"}),children:p})]}),children:s.map((function(t){return(0,r.jsxs)(y(),{className:"rustic-participant-list-item",children:[(0,r.jsx)(j(),{variant:"subtitle2",children:t.displayName}),(0,r.jsx)(j(),{variant:t.participantRole===q.Owner?"subtitle2":"caption",children:(e=t.participantRole,e.charAt(0).toUpperCase()+e.slice(1))})]},t.id);var e}))})}!function(t){t.Owner="owner",t.Member="member"}(q||(q={})),function(t){t.Human="human",t.Agent="agent"}(_||(_={}));const S=function(t){function e(t,e){return function(t){return function(t,e,r){if(r||2===arguments.length)for(var a,i=0,n=e.length;i<n;i++)!a&&i in e||(a||(a=Array.prototype.slice.call(e,0,i)),a[i]=e[i]);return t.concat(a||Array.prototype.slice.call(e))}([],t,!0).sort((function(t,e){return e.participantRole===q.Owner?1:-1}))}(t.filter((function(t){return t.participantType===e})))}var a=e(t.participants,_.Human),i=e(t.participants,_.Agent),n="".concat(g()("Participant",t.participants.length)," (").concat(t.participants.length,")");return(0,r.jsxs)(c(),{open:t.isParticipantListOpen,onClose:t.onClose,className:"rustic-participants-container",maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(o(),{sx:{borderBottom:"1px solid",borderColor:"divider"},component:"h6",className:"rustic-participants-container-title",children:n}),(0,r.jsx)(A,{participantType:"Human",participantTypeIcon:(0,r.jsx)(O,{name:"account_circle"}),participants:a}),i.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l(),{className:"rustic-participants-container-divider"}),(0,r.jsx)(A,{participantType:"Agent",participantTypeIcon:(0,r.jsx)(O,{name:"smart_toy"}),participants:i})]})]})};return e})()));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import './participantsContainer.css';
|
|
2
|
-
import { type Participant } from '../types';
|
|
3
2
|
export interface ParticipantsContainerProps {
|
|
4
3
|
participants: Participant[];
|
|
5
4
|
/** Boolean that dictates the open/closed state of the participants modal. */
|
|
@@ -7,6 +6,20 @@ export interface ParticipantsContainerProps {
|
|
|
7
6
|
/** Callback function to close the participants modal. */
|
|
8
7
|
onClose: () => void;
|
|
9
8
|
}
|
|
9
|
+
export declare enum ParticipantRole {
|
|
10
|
+
Owner = "owner",
|
|
11
|
+
Member = "member"
|
|
12
|
+
}
|
|
13
|
+
export declare enum ParticipantType {
|
|
14
|
+
Human = "human",
|
|
15
|
+
Agent = "agent"
|
|
16
|
+
}
|
|
17
|
+
export interface Participant {
|
|
18
|
+
id: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
participantRole: ParticipantRole;
|
|
21
|
+
participantType: ParticipantType;
|
|
22
|
+
}
|
|
10
23
|
/** The `ParticipantsContainer` component is responsible for displaying a list of participants within a dialog window. It organizes participants into separate lists based on their type (human or agent) and provides options to toggle between showing a subset of participants and displaying the full list. This component enhances the user experience by presenting participant information in a structured format and allowing users to view additional details as needed.
|
|
11
24
|
*
|
|
12
25
|
* Note: The component does not include the button displayed to toggle between the two views. This button is typically implemented in the parent component that uses the `ParticipantsContainer` component. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participantsContainer.d.ts","sourceRoot":"","sources":["../../../src/components/participantsContainer/participantsContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"participantsContainer.d.ts","sourceRoot":"","sources":["../../../src/components/participantsContainer/participantsContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AAmBpC,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,6EAA6E;IAC7E,qBAAqB,EAAE,OAAO,CAAA;IAC9B,yDAAyD;IACzD,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,eAAe,CAAA;IAChC,eAAe,EAAE,eAAe,CAAA;CACjC;AA+FD;;8MAE8M;AAC9M,iBAAS,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAyE/D;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.rustic-pdf-viewer {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
padding: 16px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.rustic-pdf-error {
|
|
10
|
+
padding: 16px;
|
|
11
|
+
width: fit-content;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.rustic-pdf-viewer .rustic-pdf-viewer-header {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
margin-bottom: 8px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.rustic-pdf-viewer .rustic-pdf-canvas {
|
|
21
|
+
flex: 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.rustic-pdf-viewer .rustic-pdf-page-input > div {
|
|
25
|
+
height: 24px;
|
|
26
|
+
width: 56px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.rustic-pdf-viewer .rustic-pdf-page-input input {
|
|
30
|
+
text-align: center;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.rustic-pdf-viewer
|
|
34
|
+
.rustic-pdf-page-input
|
|
35
|
+
input[type='number']::-webkit-inner-spin-button {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.rustic-pdf-viewer .rustic-page-indicator {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: 8px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.rustic-pdf-viewer-body {
|
|
46
|
+
flex: 1;
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
overflow: auto;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.rustic-pdf-viewer-body-inner {
|
|
53
|
+
overflow: auto;
|
|
54
|
+
width: fit-content;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
span.rustic-icon-large {
|
|
58
|
+
font-size: 32px;
|
|
59
|
+
}
|
|
60
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/pdfViewer/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAExB,OAAO,SAAS,MAAM,aAAa,CAAA;AAEnC,cAAc,UAAU,CAAA;AACxB,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>P});const r=require("react/jsx-runtime"),a=require("@mui/material/Box");var n=e.n(a);const o=require("@mui/material/Card");var i=e.n(o);const s=require("@mui/material/TextField");var c=e.n(s);const l=require("@mui/material/Typography");var u=e.n(l);const d=require("@mui/material/useMediaQuery");var m=e.n(d);const f=require("@mui/system/Stack");var p=e.n(f);const v=require("@mui/system/useTheme");var b=e.n(v);const h=require("pdfjs-dist"),x=require("react"),j=require("@mui/material/IconButton");var y=e.n(j);const g=require("@mui/material/Tooltip");var w=e.n(g);function N(e){return e.name.replaceAll("_","-"),(0,r.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),children:e.name})}const k=function(e){var t={zoomIn:{symbol:"zoom_in",label:"Zoom in"},zoomOut:{symbol:"zoom_out",label:"Zoom out"},close:{symbol:"close",label:"Close"},previousPage:{symbol:"arrow_back",label:"Previous page"},nextPage:{symbol:"arrow_forward",label:"Next page"}},a=(t[e.action].label.replaceAll(" ","-").toLowerCase(),t[e.action]);return(0,r.jsx)(w(),{title:a.label,children:(0,r.jsx)("span",{children:(0,r.jsx)(y(),{onClick:e.onClick,className:e.className,disabled:e.isDisabled,children:(0,r.jsx)(N,{name:a.symbol})})})})},P=function(e){var t,a=(0,x.useRef)(null),o=(0,x.useState)(1),s=o[0],l=o[1],d=(0,x.useState)(1),f=d[0],v=d[1],j=(0,x.useState)(1),y=j[0],g=j[1],w=(0,x.useState)(!1),N=w[0],P=w[1],S=(0,x.useState)(),C=S[0],q=S[1],O=b()(),_=m()(O.breakpoints.down("sm")),z=m()(O.breakpoints.between("sm","md"));if(t=e.url,!/\/[^/]+\.pdf$/.test(t))return(0,r.jsx)(i(),{variant:"outlined",className:"rustic-pdf-error",children:(0,r.jsx)(u(),{variant:"body2",children:"The provided URL does not point to a PDF file."})});var T=(0,x.useState)((function(){return _?.5:z?1:1.5})),D=T[0],I=T[1];return(0,x.useEffect)((function(){h.GlobalWorkerOptions.workerSrc||(h.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(h.version,"/pdf.worker.mjs")),h.getDocument({url:"".concat(e.url)}).promise.then((function(e){v(e.numPages),function(e){e.getPage(s).then((function(e){var t=e.getViewport({scale:D}),r=a.current;if(r){var n=r.getContext("2d");if(n){var o=window.devicePixelRatio||1;r.style.width="".concat(t.width,"px"),r.style.height="".concat(t.height,"px"),r.width=t.width*o,r.height=t.height*o;var i={canvasContext:n,viewport:t,transform:[o,0,0,o,0,0]};C&&C.cancel();var s=e.render(i);q(s),s.promise.then((function(){q(void 0)})).catch((function(e){console.error(e)}))}}}))}(e)})).catch((function(){P(!0)}))}),[e.url,s,D]),N?(0,r.jsx)(i(),{variant:"outlined",className:"rustic-pdf-error",children:(0,r.jsx)(u(),{variant:"body2",children:"Failed to load the PDF file."})}):(0,r.jsxs)(i(),{variant:"outlined",className:"rustic-pdf-viewer",children:[(0,r.jsxs)(n(),{className:"rustic-pdf-viewer-header",children:[(0,r.jsx)(k,{action:"zoomOut",onClick:function(){I((function(e){return Math.max(e-.2,.2)}))}}),(0,r.jsx)(k,{action:"zoomIn",onClick:function(){I((function(e){return e+.2}))}})]}),(0,r.jsx)(n(),{className:"rustic-pdf-viewer-body",children:(0,r.jsx)(n(),{className:"rustic-pdf-viewer-body-inner",children:(0,r.jsx)("canvas",{ref:a})})}),(0,r.jsxs)(p(),{direction:"row",justifyContent:"center",alignItems:"center",gap:1,children:[(0,r.jsx)(k,{action:"previousPage",onClick:function(){s>1&&(l(s-1),g(s-1))},isDisabled:1===s}),(0,r.jsx)(u(),{variant:"body1",className:"rustic-page-indicator",children:"Page"}),(0,r.jsx)(c(),{type:"number",value:y,onChange:function(e){var t=parseInt(e.target.value);g(t),!isNaN(t)&&t>=1&&t<=f&&l(t)},size:"small",className:"rustic-pdf-page-input"}),(0,r.jsxs)(u(),{variant:"body1",className:"rustic-page-indicator",children:["of ",f]}),(0,r.jsx)(k,{action:"nextPage",onClick:function(){s<f&&(l(s+1),g(s+1))},isDisabled:s===f})]})]})};return t})()));
|
|
@@ -12,6 +12,10 @@ export declare function setPdfWorkerSrc(workerSrc: string): void;
|
|
|
12
12
|
* ```
|
|
13
13
|
*
|
|
14
14
|
* Note: [PDF.js](https://mozilla.github.io/pdf.js/) is not bundled, so it must be included in the application's build process.
|
|
15
|
+
*
|
|
16
|
+
* ```typescript
|
|
17
|
+
* npm i pdfjs-dist
|
|
18
|
+
* ```
|
|
15
19
|
*/
|
|
16
20
|
declare function PDFViewer(props: PDFViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
21
|
export default PDFViewer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdfViewer.d.ts","sourceRoot":"","sources":["../../../src/components/pdfViewer/pdfViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAaxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,QAEhD;AAMD
|
|
1
|
+
{"version":3,"file":"pdfViewer.d.ts","sourceRoot":"","sources":["../../../src/components/pdfViewer/pdfViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAaxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,QAEhD;AAMD;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,2CA0LvC;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
.rustic-prompt-builder {
|
|
2
|
+
padding: 24px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.rustic-prompt-builder-avatar {
|
|
6
|
+
width: 24px;
|
|
7
|
+
height: 24px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.rustic-prompt-builder-divider {
|
|
11
|
+
margin-top: 16px;
|
|
12
|
+
margin-bottom: 24px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.rustic-prompt-builder-questions {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 24px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rustic-prompt-builder-question {
|
|
22
|
+
gap: 8px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.rustic-prompt-builder-buttons {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
margin-top: 56px;
|
|
29
|
+
gap: 16px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.rustic-prompt-builder-buttons-left {
|
|
33
|
+
width: 100%;
|
|
34
|
+
display: flex;
|
|
35
|
+
gap: 8px;
|
|
36
|
+
justify-content: space-between;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.rustic-prompt-builder-dialog-buttons {
|
|
40
|
+
display: flex;
|
|
41
|
+
gap: 16px;
|
|
42
|
+
padding: 24px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media (max-width: 900px) {
|
|
46
|
+
.rustic-prompt-builder-buttons-right button {
|
|
47
|
+
flex: 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.rustic-prompt-builder-buttons {
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.rustic-prompt-builder-buttons-right {
|
|
55
|
+
display: flex;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
body {
|
|
60
|
+
margin: 0;
|
|
61
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
62
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
63
|
+
sans-serif;
|
|
64
|
+
-webkit-font-smoothing: antialiased;
|
|
65
|
+
-moz-osx-font-smoothing: grayscale;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
code {
|
|
69
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
70
|
+
monospace;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.rustic-fit-container {
|
|
74
|
+
object-fit: contain;
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: 100%;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.rustic-files {
|
|
80
|
+
display: flex;
|
|
81
|
+
gap: 8px;
|
|
82
|
+
flex-wrap: wrap;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.rustic-cursor-pointer {
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.rustic-align-self-center {
|
|
90
|
+
align-self: center;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
span.rustic-icon-large {
|
|
94
|
+
font-size: 32px;
|
|
95
|
+
}
|
|
96
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/promptBuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAE3C,cAAc,UAAU,CAAA;AACxB,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():e["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>D});const t=require("react/jsx-runtime"),n=require("@mui/material/Button");var i=e.n(n);const s=require("@mui/material/Card");var a=e.n(s);const o=require("@mui/material/CircularProgress");var l=e.n(o);const c=require("@mui/material/Dialog");var u=e.n(c);const d=require("@mui/material/DialogActions");var m=e.n(d);const p=require("@mui/material/DialogContent");var f=e.n(p);const g=require("@mui/material/DialogContentText");var x=e.n(g);const b=require("@mui/material/DialogTitle");var h=e.n(b);const v=require("@mui/material/Divider");var j=e.n(v);const y=require("@mui/material/Typography");var q=e.n(y);const S=require("@mui/system"),w=require("react");var C=e.n(w),N=function(){return N=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},N.apply(this,arguments)};const P=function(e){var r=e.messages[0],n=e.messages.slice(1),i=e.supportedElements[r.format];return(0,t.jsx)(t.Fragment,{children:i?C().createElement(i,N(N({sender:e.sender,ws:e.ws,messageId:r.id,conversationId:r.conversationId},r.data),n.length>0&&{updatedData:n.map((function(e){return e.data}))})):(0,t.jsxs)(q(),{variant:"body2",children:["Unsupported element format: ",r.format]})})};function O(e){return e.name.replaceAll("_","-"),(0,t.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),children:e.name})}var B=function(){return B=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},B.apply(this,arguments)},I=function(e,r,t){if(t||2===arguments.length)for(var n,i=0,s=r.length;i<s;i++)!n&&i in r||(n||(n=Array.prototype.slice.call(r,0,i)),n[i]=r[i]);return e.concat(n||Array.prototype.slice.call(r))};const D=function(e){var r=(0,w.useState)(!1),n=r[0],s=r[1],o=(0,w.useState)(!1),c=o[0],d=o[1],p=(0,w.useState)(!1),g=p[0],b=p[1],v=(0,w.useState)(!1),y=v[0],C=v[1],N=(0,w.useState)([]),D=N[0],A=N[1],E=(0,w.useState)(null),T=E[0],_=E[1],k=(0,S.useTheme)(),M=D[D.length-1],Q=B(B({},e.ws),{send:function(e){_(e)}});function F(e){A((function(r){return I(I([],r,!0),[e],!1)}))}function R(){if(T){var r=B(B({},T),{threadId:e.messageId});e.ws.send(r)}}if((0,w.useEffect)((function(){e.ws.onReceive&&e.ws.onReceive(F)}),[e.ws]),(0,w.useEffect)((function(){D.length>0&&(M&&M.sender.id!==e.sender.id&&d(!1),"promptBuilder"===M.format&&M.data.isLastQuestion&&s(!0))}),[D.length]),0!==D.length)return(0,t.jsxs)(a(),{variant:"outlined",className:"rustic-prompt-builder",children:[(0,t.jsxs)(u(),{open:g,onClose:function(){return b(!1)},"aria-labelledby":"quit-dialog-title","aria-describedby":"quit-dialog-description",sx:{"& .MuiPaper-root":{width:"clamp(320px,50vw,600px)",border:"1px solid ".concat(k.palette.divider)}},children:[(0,t.jsx)(h(),{id:"quit-dialog-title",className:"rustic-align-self-center",children:"Are you sure?"}),(0,t.jsx)(j(),{}),(0,t.jsx)(f(),{children:(0,t.jsx)(x(),{id:"quit-dialog-description",className:"rustic-align-self-center",children:"All progress will be lost."})}),(0,t.jsxs)(m(),{className:"rustic-prompt-builder-dialog-buttons",disableSpacing:!0,children:[(0,t.jsx)(i(),{variant:"rusticSecondary",startIcon:(0,t.jsx)(O,{name:"close"}),onClick:function(){b(!1),e.onCancel()},children:"Quit"}),(0,t.jsx)(i(),{variant:"rusticPrimary",onClick:function(){return b(!1)},children:"Continue build"})]})]}),e.getProfileComponent?e.getProfileComponent(D[0]):(0,t.jsx)(q(),{color:"text.secondary",children:"Prompt Builder"}),(0,t.jsx)(j(),{className:"rustic-prompt-builder-divider"}),(0,t.jsxs)(S.Box,{className:"rustic-prompt-builder-questions",children:[function(){if(!y&&D.length>0)return D.map((function(r){if(r.sender.id!==e.sender.id&&"promptBuilder"!==r.format)return(0,t.jsx)(P,{ws:Q,sender:e.sender,messages:[r],supportedElements:e.supportedElements},r.id)}))}(),c&&(0,t.jsx)(l(),{color:"secondary",className:"rustic-align-self-center"})]}),(0,t.jsx)(t.Fragment,{children:!y&&(0,t.jsxs)(S.Box,{className:"rustic-prompt-builder-buttons",children:[(0,t.jsxs)(S.Box,{className:"rustic-prompt-builder-buttons-left",children:[(0,t.jsx)(i(),{variant:"rusticSecondary",startIcon:(0,t.jsx)(O,{name:"close"}),onClick:function(){return b(!0)},children:"Quit"}),(0,t.jsx)(i(),{variant:"rusticSecondary",endIcon:(0,t.jsx)(O,{name:"chevron_right"}),onClick:function(){R(),_(null),d(!0)},disabled:!T,"aria-disabled":!T,children:"Next question"})]}),n&&(0,t.jsx)(S.Box,{className:"rustic-prompt-builder-buttons-right",children:(0,t.jsx)(i(),{variant:"rusticPrimary",onClick:function(){R(),C(!0),d(!0),e.onSubmit()},disabled:c,"aria-disabled":c,children:"Generate"})})]})})]})};return r})()));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import './promptBuilder.css';
|
|
2
|
+
import '../../index.css';
|
|
3
|
+
import type { PromptBuilderProps } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
The `PromptBuilder` component is an interactive tool designed to help end users construct enhanced prompts through guided conversations with an agent. Users should be able to invoke the PromptBuilder via a button click or a text input command. Once activated, the agent guides the user step-by-step to create a detailed prompt, culminating in a "Generate" button for finalization or a "Next Question" option for further refinement.
|
|
6
|
+
|
|
7
|
+
The expected output of the `PromptBuilder` should not be direct answers to the gathered input. Instead, when the "Generate" button is clicked, the component should produce refined prompt suggestion(s) based on the user's responses during the guided conversation. The `PromptBuilder` does not display the results directly; instead, developers can use the `onSubmit` function to handle the output and choose the most appropriate place to present it within their application.
|
|
8
|
+
|
|
9
|
+
Try out the chat application example below to see how the `PromptBuilder` component can be used in your own application. Please note that the questions asked by agent are fixed as there is no backend involved. This is showcasing an example flow and use case.
|
|
10
|
+
|
|
11
|
+
Notes for implementation:
|
|
12
|
+
- The user will be allowed to start generating prompts when a message has been received with format of `"promptBuilder"` and data field of `isLastQuestion` set to `true`. For example:
|
|
13
|
+
```
|
|
14
|
+
const newMessage = {
|
|
15
|
+
...otherRequiredFields,
|
|
16
|
+
format: 'promptBuilder',
|
|
17
|
+
data: {
|
|
18
|
+
isLastQuestion: true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
*/
|
|
23
|
+
export default function PromptBuilder(props: PromptBuilderProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
24
|
+
//# sourceMappingURL=promptBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptBuilder.d.ts","sourceRoot":"","sources":["../../../src/components/promptBuilder/promptBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,iBAAiB,CAAA;AAiBxB,OAAO,KAAK,EAAW,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,uDAqP9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/question/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAA;AAEvB,OAAO,QAAQ,MAAM,YAAY,CAAA;AAEjC,cAAc,UAAU,CAAA;AACxB,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>f});const r=require("react/jsx-runtime"),i=require("@mui/material"),o=require("@mui/material/Box");var n=e.n(o);const a=require("@mui/material/Chip");var s=e.n(a);const u=require("@mui/material/Stack");var c=e.n(u);const l=require("@mui/material/Typography");var d=e.n(l);const m=require("react"),p=require("uuid"),f=function(e){var t=(0,m.useState)(""),o=t[0],a=t[1],u=(0,i.useTheme)(),l=(0,i.useMediaQuery)(u.breakpoints.down("md"))?"column":"row",f=e.options.map((function(t,i){return(0,r.jsx)(s(),{onClick:function(){return function(t){a(t);var r=(new Date).toISOString(),i={id:(0,p.v4)(),timestamp:r,sender:e.sender,conversationId:e.conversationId,format:"text",data:{text:t},inReplyTo:e.messageId};e.ws.send(i)}(t)},variant:"rusticSecondary",size:"small",sx:o===t?{"&.Mui-disabled":{backgroundColor:"secondary.light",color:"text.primary"}}:{},className:"rustic-option",disabled:!!o,"aria-disabled":!!o,label:t},i)}));return(0,r.jsxs)(n(),{className:"rustic-question",children:[(e.title||e.description)&&(0,r.jsxs)(n(),{className:"rustic-question-text",children:[e.title&&(0,r.jsx)(d(),{variant:"subtitle2",className:"rustic-title",children:e.title}),e.description&&(0,r.jsx)(d(),{variant:"caption",children:e.description})]}),(0,r.jsx)(c(),{direction:l,className:"rustic-options-container",children:f})]})};return t})()));
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import './question.css';
|
|
2
2
|
import type { QuestionProps } from '../types';
|
|
3
3
|
/**
|
|
4
|
-
The `Question` component provides a user interface for selecting an option from a list. It is designed to facilitate interactive decision-making and response submission within a conversation or messaging context.
|
|
4
|
+
* The `Question` component provides a user interface for selecting an option from a list. It is designed to facilitate interactive decision-making and response submission within a conversation or messaging context.
|
|
5
|
+
*
|
|
6
|
+
* Note: `uuid` is not bundled, so please install the following package using npm:
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* npm i uuid
|
|
10
|
+
* ```
|
|
5
11
|
*/
|
|
6
12
|
export default function Question(props: QuestionProps): import("react/jsx-runtime").JSX.Element;
|
|
7
13
|
//# sourceMappingURL=question.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../src/components/question/question.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAA;AAUvB,OAAO,KAAK,EAAW,aAAa,EAAE,MAAM,UAAU,CAAA;AAEtD
|
|
1
|
+
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../src/components/question/question.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAA;AAUvB,OAAO,KAAK,EAAW,aAAa,EAAE,MAAM,UAAU,CAAA;AAEtD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAwEpD"}
|