@docyrus/ui-pro-ai-assistant 0.6.7 → 0.6.8

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 (78) hide show
  1. package/dist/components/adaptive-card-tool.d.ts +12 -0
  2. package/dist/components/docyrus/adaptive-card/action-bar.d.ts +7 -0
  3. package/dist/components/docyrus/adaptive-card/actions/action-button.d.ts +11 -0
  4. package/dist/components/docyrus/adaptive-card/actions/action-execute.d.ts +4 -0
  5. package/dist/components/docyrus/adaptive-card/actions/action-open-url.d.ts +4 -0
  6. package/dist/components/docyrus/adaptive-card/actions/action-reset-inputs.d.ts +4 -0
  7. package/dist/components/docyrus/adaptive-card/actions/action-show-card.d.ts +7 -0
  8. package/dist/components/docyrus/adaptive-card/actions/action-submit.d.ts +4 -0
  9. package/dist/components/docyrus/adaptive-card/actions/action-toggle-visibility.d.ts +4 -0
  10. package/dist/components/docyrus/adaptive-card/adaptive-card-context.d.ts +43 -0
  11. package/dist/components/docyrus/adaptive-card/adaptive-card-types.d.ts +672 -0
  12. package/dist/components/docyrus/adaptive-card/adaptive-card-view.d.ts +6 -0
  13. package/dist/components/docyrus/adaptive-card/adaptive-card.d.ts +3 -0
  14. package/dist/components/docyrus/adaptive-card/element-node.d.ts +11 -0
  15. package/dist/components/docyrus/adaptive-card/element-registry.d.ts +4 -0
  16. package/dist/components/docyrus/adaptive-card/elements/accordion-element.d.ts +4 -0
  17. package/dist/components/docyrus/adaptive-card/elements/action-set.d.ts +4 -0
  18. package/dist/components/docyrus/adaptive-card/elements/badge-element.d.ts +4 -0
  19. package/dist/components/docyrus/adaptive-card/elements/carousel-element.d.ts +4 -0
  20. package/dist/components/docyrus/adaptive-card/elements/chart-elements.d.ts +19 -0
  21. package/dist/components/docyrus/adaptive-card/elements/chart-shared.d.ts +8 -0
  22. package/dist/components/docyrus/adaptive-card/elements/code-block-element.d.ts +4 -0
  23. package/dist/components/docyrus/adaptive-card/elements/column-set.d.ts +4 -0
  24. package/dist/components/docyrus/adaptive-card/elements/component-element.d.ts +4 -0
  25. package/dist/components/docyrus/adaptive-card/elements/compound-button-element.d.ts +4 -0
  26. package/dist/components/docyrus/adaptive-card/elements/container.d.ts +4 -0
  27. package/dist/components/docyrus/adaptive-card/elements/fact-set.d.ts +4 -0
  28. package/dist/components/docyrus/adaptive-card/elements/icon-element.d.ts +6 -0
  29. package/dist/components/docyrus/adaptive-card/elements/image-element.d.ts +4 -0
  30. package/dist/components/docyrus/adaptive-card/elements/image-set.d.ts +4 -0
  31. package/dist/components/docyrus/adaptive-card/elements/loop-component-element.d.ts +4 -0
  32. package/dist/components/docyrus/adaptive-card/elements/media-element.d.ts +4 -0
  33. package/dist/components/docyrus/adaptive-card/elements/progress-bar-element.d.ts +4 -0
  34. package/dist/components/docyrus/adaptive-card/elements/progress-ring-element.d.ts +4 -0
  35. package/dist/components/docyrus/adaptive-card/elements/rating-element.d.ts +10 -0
  36. package/dist/components/docyrus/adaptive-card/elements/rich-text-block.d.ts +4 -0
  37. package/dist/components/docyrus/adaptive-card/elements/tab-set-element.d.ts +4 -0
  38. package/dist/components/docyrus/adaptive-card/elements/table-element.d.ts +4 -0
  39. package/dist/components/docyrus/adaptive-card/elements/text-block.d.ts +4 -0
  40. package/dist/components/docyrus/adaptive-card/index.d.ts +15 -0
  41. package/dist/components/docyrus/adaptive-card/inputs/input-choice-set.d.ts +4 -0
  42. package/dist/components/docyrus/adaptive-card/inputs/input-date.d.ts +4 -0
  43. package/dist/components/docyrus/adaptive-card/inputs/input-number.d.ts +4 -0
  44. package/dist/components/docyrus/adaptive-card/inputs/input-rating.d.ts +4 -0
  45. package/dist/components/docyrus/adaptive-card/inputs/input-shell.d.ts +7 -0
  46. package/dist/components/docyrus/adaptive-card/inputs/input-text.d.ts +4 -0
  47. package/dist/components/docyrus/adaptive-card/inputs/input-time.d.ts +4 -0
  48. package/dist/components/docyrus/adaptive-card/inputs/input-toggle.d.ts +4 -0
  49. package/dist/components/docyrus/adaptive-card/inputs/use-input-register.d.ts +2 -0
  50. package/dist/components/docyrus/adaptive-card/lib/chart-palette.d.ts +4 -0
  51. package/dist/components/docyrus/adaptive-card/lib/collect-inputs.d.ts +3 -0
  52. package/dist/components/docyrus/adaptive-card/lib/color-tokens.d.ts +9 -0
  53. package/dist/components/docyrus/adaptive-card/lib/default-host-config.d.ts +3 -0
  54. package/dist/components/docyrus/adaptive-card/lib/expression.d.ts +12 -0
  55. package/dist/components/docyrus/adaptive-card/lib/interpolate.d.ts +2 -0
  56. package/dist/components/docyrus/adaptive-card/lib/parse-card.d.ts +4 -0
  57. package/dist/components/docyrus/adaptive-card/lib/size-tokens.d.ts +16 -0
  58. package/dist/components/docyrus/adaptive-card/lib/spacing-tokens.d.ts +4 -0
  59. package/dist/components/docyrus/adaptive-card/lib/templating.d.ts +6 -0
  60. package/dist/components/docyrus/adaptive-card/lib/validate-inputs.d.ts +7 -0
  61. package/dist/components/docyrus/adaptive-card/lib/version.d.ts +5 -0
  62. package/dist/components/docyrus/adaptive-card/register-default-elements.d.ts +1 -0
  63. package/dist/components/generative-tool.d.ts +7 -1
  64. package/dist/components/template-output.d.ts +11 -0
  65. package/dist/components/ui/circular-progress.d.ts +24 -0
  66. package/dist/hooks/docyrus/use-adaptive-card.d.ts +43 -0
  67. package/dist/hooks/use-assistant-api.d.ts +6 -0
  68. package/dist/index.js +4677 -471
  69. package/dist/index.js.map +1 -1
  70. package/dist/internal/plate-editor/editor/plugins/emoji-kit.d.ts +2 -5
  71. package/dist/internal/plate-editor/editor/plugins/mention-base-kit.d.ts +2 -11
  72. package/dist/internal/plate-editor/editor/plugins/mention-kit.d.ts +2 -11
  73. package/dist/internal/plate-editor/editor/plugins/slash-kit.d.ts +2 -1
  74. package/dist/styles.css +441 -0
  75. package/dist/views/assistant-view.d.ts +5 -0
  76. package/dist/views/chat-panel.d.ts +7 -1
  77. package/dist/views/message-list.d.ts +2 -1
  78. package/package.json +10 -2
@@ -0,0 +1,672 @@
1
+ import { type ReactNode } from 'react';
2
+ export type AdaptiveCardSpacing = 'none' | 'small' | 'default' | 'medium' | 'large' | 'extraLarge' | 'padding';
3
+ export type AdaptiveCardColor = 'default' | 'dark' | 'light' | 'accent' | 'good' | 'warning' | 'attention';
4
+ export type AdaptiveCardFontSize = 'default' | 'small' | 'medium' | 'large' | 'extraLarge';
5
+ export type AdaptiveCardFontWeight = 'default' | 'lighter' | 'bolder';
6
+ export type AdaptiveCardFontType = 'default' | 'monospace';
7
+ export type AdaptiveCardHorizontalAlignment = 'left' | 'center' | 'right';
8
+ export type AdaptiveCardVerticalAlignment = 'top' | 'center' | 'bottom';
9
+ export type AdaptiveCardContainerStyle = 'default' | 'emphasis' | 'good' | 'attention' | 'warning' | 'accent';
10
+ export type AdaptiveCardImageSize = 'auto' | 'stretch' | 'small' | 'medium' | 'large';
11
+ export type AdaptiveCardImageStyle = 'default' | 'person';
12
+ export type AdaptiveCardHeight = 'auto' | 'stretch';
13
+ export type AdaptiveCardActionStyle = 'default' | 'positive' | 'destructive';
14
+ export type AdaptiveCardActionMode = 'primary' | 'secondary';
15
+ export type AdaptiveCardAssociatedInputs = 'auto' | 'none';
16
+ export type AdaptiveCardTextBlockStyle = 'default' | 'heading';
17
+ export type AdaptiveCardInputTextStyle = 'text' | 'tel' | 'url' | 'email' | 'password';
18
+ export type AdaptiveCardChoiceSetStyle = 'compact' | 'expanded' | 'filtered';
19
+ export type AdaptiveCardBackgroundImageFillMode = 'cover' | 'repeatHorizontally' | 'repeatVertically' | 'repeat';
20
+ export type AdaptiveCardGridStyle = 'default' | 'accent';
21
+ export type AdaptiveCardLabelPosition = 'inline' | 'above';
22
+ export interface AdaptiveCardBackgroundImage {
23
+ url: string;
24
+ fillMode?: AdaptiveCardBackgroundImageFillMode;
25
+ horizontalAlignment?: AdaptiveCardHorizontalAlignment;
26
+ verticalAlignment?: AdaptiveCardVerticalAlignment;
27
+ }
28
+ export interface AdaptiveCardRefresh {
29
+ action?: AdaptiveCardActionExecute | AdaptiveCardActionSubmit;
30
+ expires?: string;
31
+ userIds?: Array<string>;
32
+ }
33
+ export interface AdaptiveCardTokenExchangeResource {
34
+ id: string;
35
+ uri: string;
36
+ providerId: string;
37
+ }
38
+ export interface AdaptiveCardAuthCardButton {
39
+ type: string;
40
+ title?: string;
41
+ value?: string;
42
+ image?: string;
43
+ }
44
+ export interface AdaptiveCardAuthentication {
45
+ text?: string;
46
+ connectionName?: string;
47
+ tokenExchangeResource?: AdaptiveCardTokenExchangeResource;
48
+ buttons?: Array<AdaptiveCardAuthCardButton>;
49
+ }
50
+ export interface AdaptiveCardElementBase {
51
+ id?: string;
52
+ isVisible?: boolean;
53
+ requires?: Record<string, string>;
54
+ fallback?: AdaptiveCardElement | 'drop';
55
+ spacing?: AdaptiveCardSpacing;
56
+ separator?: boolean;
57
+ height?: AdaptiveCardHeight;
58
+ }
59
+ export interface AdaptiveCardTextBlock extends AdaptiveCardElementBase {
60
+ type: 'TextBlock';
61
+ text: string;
62
+ size?: AdaptiveCardFontSize;
63
+ weight?: AdaptiveCardFontWeight;
64
+ color?: AdaptiveCardColor;
65
+ isSubtle?: boolean;
66
+ wrap?: boolean;
67
+ maxLines?: number;
68
+ horizontalAlignment?: AdaptiveCardHorizontalAlignment;
69
+ fontType?: AdaptiveCardFontType;
70
+ style?: AdaptiveCardTextBlockStyle;
71
+ }
72
+ export interface AdaptiveCardTextRun {
73
+ type: 'TextRun';
74
+ text: string;
75
+ size?: AdaptiveCardFontSize;
76
+ weight?: AdaptiveCardFontWeight;
77
+ color?: AdaptiveCardColor;
78
+ isSubtle?: boolean;
79
+ fontType?: AdaptiveCardFontType;
80
+ highlight?: boolean;
81
+ italic?: boolean;
82
+ strikethrough?: boolean;
83
+ underline?: boolean;
84
+ selectAction?: AdaptiveCardSelectAction;
85
+ }
86
+ export interface AdaptiveCardImageRun {
87
+ type: 'ImageRun';
88
+ url: string;
89
+ size?: AdaptiveCardImageSize;
90
+ style?: AdaptiveCardImageStyle;
91
+ themedUrls?: Record<string, string>;
92
+ selectAction?: AdaptiveCardSelectAction;
93
+ }
94
+ export interface AdaptiveCardIconRun {
95
+ type: 'IconRun';
96
+ name: string;
97
+ size?: AdaptiveCardIconSize;
98
+ style?: AdaptiveCardIconStyle;
99
+ color?: AdaptiveCardColor;
100
+ selectAction?: AdaptiveCardSelectAction;
101
+ }
102
+ export interface AdaptiveCardCitationRun {
103
+ type: 'CitationRun';
104
+ referenceIndex?: number;
105
+ }
106
+ export type AdaptiveCardInline = string | AdaptiveCardTextRun | AdaptiveCardImageRun | AdaptiveCardIconRun | AdaptiveCardCitationRun;
107
+ export interface AdaptiveCardRichTextBlock extends AdaptiveCardElementBase {
108
+ type: 'RichTextBlock';
109
+ inlines: Array<AdaptiveCardInline>;
110
+ horizontalAlignment?: AdaptiveCardHorizontalAlignment;
111
+ }
112
+ export interface AdaptiveCardImage extends Omit<AdaptiveCardElementBase, 'height'> {
113
+ type: 'Image';
114
+ url: string;
115
+ altText?: string;
116
+ size?: AdaptiveCardImageSize;
117
+ style?: AdaptiveCardImageStyle;
118
+ horizontalAlignment?: AdaptiveCardHorizontalAlignment;
119
+ backgroundColor?: string;
120
+ width?: string;
121
+ height?: string;
122
+ selectAction?: AdaptiveCardSelectAction;
123
+ }
124
+ export interface AdaptiveCardMediaSource {
125
+ url: string;
126
+ mimeType?: string;
127
+ }
128
+ export interface AdaptiveCardCaptionSource {
129
+ url: string;
130
+ mimeType?: string;
131
+ label?: string;
132
+ }
133
+ export interface AdaptiveCardMedia extends AdaptiveCardElementBase {
134
+ type: 'Media';
135
+ sources: Array<AdaptiveCardMediaSource>;
136
+ poster?: string;
137
+ altText?: string;
138
+ captionSources?: Array<AdaptiveCardCaptionSource>;
139
+ }
140
+ export interface AdaptiveCardContainer extends AdaptiveCardElementBase {
141
+ type: 'Container';
142
+ items?: Array<AdaptiveCardElement>;
143
+ style?: AdaptiveCardContainerStyle;
144
+ verticalContentAlignment?: AdaptiveCardVerticalAlignment;
145
+ bleed?: boolean;
146
+ backgroundImage?: string | AdaptiveCardBackgroundImage;
147
+ rtl?: boolean;
148
+ minHeight?: string;
149
+ roundedCorners?: boolean;
150
+ showBorder?: boolean;
151
+ selectAction?: AdaptiveCardSelectAction;
152
+ }
153
+ export interface AdaptiveCardColumn extends AdaptiveCardElementBase {
154
+ type: 'Column';
155
+ items?: Array<AdaptiveCardElement>;
156
+ width?: string | number;
157
+ style?: AdaptiveCardContainerStyle;
158
+ bleed?: boolean;
159
+ selectAction?: AdaptiveCardSelectAction;
160
+ verticalContentAlignment?: AdaptiveCardVerticalAlignment;
161
+ rtl?: boolean;
162
+ minHeight?: string;
163
+ backgroundImage?: string | AdaptiveCardBackgroundImage;
164
+ }
165
+ export interface AdaptiveCardColumnSet extends AdaptiveCardElementBase {
166
+ type: 'ColumnSet';
167
+ columns?: Array<AdaptiveCardColumn>;
168
+ style?: AdaptiveCardContainerStyle;
169
+ bleed?: boolean;
170
+ horizontalAlignment?: AdaptiveCardHorizontalAlignment;
171
+ selectAction?: AdaptiveCardSelectAction;
172
+ minHeight?: string;
173
+ }
174
+ export interface AdaptiveCardFact {
175
+ title: string;
176
+ value: string;
177
+ }
178
+ export interface AdaptiveCardFactSet extends AdaptiveCardElementBase {
179
+ type: 'FactSet';
180
+ facts: Array<AdaptiveCardFact>;
181
+ }
182
+ export interface AdaptiveCardImageSet extends AdaptiveCardElementBase {
183
+ type: 'ImageSet';
184
+ images: Array<AdaptiveCardImage>;
185
+ imageSize?: AdaptiveCardImageSize;
186
+ }
187
+ export interface AdaptiveCardTableColumn {
188
+ width?: number | string;
189
+ horizontalCellContentAlignment?: AdaptiveCardHorizontalAlignment;
190
+ verticalCellContentAlignment?: AdaptiveCardVerticalAlignment;
191
+ }
192
+ export interface AdaptiveCardTableCell {
193
+ type?: 'TableCell';
194
+ items?: Array<AdaptiveCardElement>;
195
+ verticalContentAlignment?: AdaptiveCardVerticalAlignment;
196
+ style?: AdaptiveCardContainerStyle;
197
+ selectAction?: AdaptiveCardSelectAction;
198
+ }
199
+ export interface AdaptiveCardTableRow {
200
+ type?: 'TableRow';
201
+ cells: Array<AdaptiveCardTableCell>;
202
+ style?: AdaptiveCardContainerStyle;
203
+ horizontalCellContentAlignment?: AdaptiveCardHorizontalAlignment;
204
+ verticalCellContentAlignment?: AdaptiveCardVerticalAlignment;
205
+ }
206
+ export interface AdaptiveCardTable extends AdaptiveCardElementBase {
207
+ type: 'Table';
208
+ columns?: Array<AdaptiveCardTableColumn>;
209
+ rows?: Array<AdaptiveCardTableRow>;
210
+ firstRowAsHeader?: boolean;
211
+ showGridLines?: boolean;
212
+ gridStyle?: AdaptiveCardGridStyle;
213
+ horizontalCellContentAlignment?: AdaptiveCardHorizontalAlignment;
214
+ verticalCellContentAlignment?: AdaptiveCardVerticalAlignment;
215
+ }
216
+ export interface AdaptiveCardActionSetElement extends AdaptiveCardElementBase {
217
+ type: 'ActionSet';
218
+ actions: Array<AdaptiveCardAction>;
219
+ }
220
+ export interface AdaptiveCardInputBase extends AdaptiveCardElementBase {
221
+ label?: string;
222
+ labelPosition?: AdaptiveCardLabelPosition;
223
+ errorMessage?: string;
224
+ isRequired?: boolean;
225
+ inputStyle?: 'default' | 'revealOnHover';
226
+ }
227
+ export interface AdaptiveCardInputText extends AdaptiveCardInputBase {
228
+ type: 'Input.Text';
229
+ id: string;
230
+ value?: string;
231
+ placeholder?: string;
232
+ isMultiline?: boolean;
233
+ maxLength?: number;
234
+ regex?: string;
235
+ style?: AdaptiveCardInputTextStyle;
236
+ inlineAction?: AdaptiveCardAction;
237
+ }
238
+ export interface AdaptiveCardInputNumber extends AdaptiveCardInputBase {
239
+ type: 'Input.Number';
240
+ id: string;
241
+ value?: number;
242
+ placeholder?: string;
243
+ min?: number;
244
+ max?: number;
245
+ }
246
+ export interface AdaptiveCardInputDate extends AdaptiveCardInputBase {
247
+ type: 'Input.Date';
248
+ id: string;
249
+ value?: string;
250
+ placeholder?: string;
251
+ min?: string;
252
+ max?: string;
253
+ }
254
+ export interface AdaptiveCardInputTime extends AdaptiveCardInputBase {
255
+ type: 'Input.Time';
256
+ id: string;
257
+ value?: string;
258
+ placeholder?: string;
259
+ min?: string;
260
+ max?: string;
261
+ }
262
+ export interface AdaptiveCardInputToggle extends AdaptiveCardInputBase {
263
+ type: 'Input.Toggle';
264
+ id: string;
265
+ title?: string;
266
+ value?: string;
267
+ valueOn?: string;
268
+ valueOff?: string;
269
+ wrap?: boolean;
270
+ }
271
+ export interface AdaptiveCardChoice {
272
+ title: string;
273
+ value: string;
274
+ }
275
+ export interface AdaptiveCardDataQuery {
276
+ type: 'Data.Query';
277
+ dataset: string;
278
+ value?: string;
279
+ count?: number;
280
+ skip?: number;
281
+ }
282
+ export interface AdaptiveCardInputChoiceSet extends AdaptiveCardInputBase {
283
+ type: 'Input.ChoiceSet';
284
+ id: string;
285
+ choices: Array<AdaptiveCardChoice>;
286
+ 'choices.data'?: AdaptiveCardDataQuery;
287
+ isMultiSelect?: boolean;
288
+ style?: AdaptiveCardChoiceSetStyle;
289
+ placeholder?: string;
290
+ value?: string;
291
+ wrap?: boolean;
292
+ }
293
+ export interface AdaptiveCardInputRating extends AdaptiveCardInputBase {
294
+ type: 'Input.Rating';
295
+ id: string;
296
+ value?: number;
297
+ max?: number;
298
+ size?: 'medium' | 'large';
299
+ color?: 'marigold' | 'neutral';
300
+ }
301
+ export type AdaptiveCardInput = AdaptiveCardInputText | AdaptiveCardInputNumber | AdaptiveCardInputDate | AdaptiveCardInputTime | AdaptiveCardInputToggle | AdaptiveCardInputChoiceSet | AdaptiveCardInputRating;
302
+ export type AdaptiveCardBadgeAppearance = 'filled' | 'tint';
303
+ export type AdaptiveCardBadgeShape = 'rounded' | 'square' | 'circular';
304
+ export type AdaptiveCardBadgeSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge';
305
+ export type AdaptiveCardBadgeStyle = 'default' | 'subtle' | 'informative' | 'accent' | 'good' | 'attention' | 'warning';
306
+ export interface AdaptiveCardBadge extends AdaptiveCardElementBase {
307
+ type: 'Badge';
308
+ text?: string;
309
+ icon?: string;
310
+ appearance?: AdaptiveCardBadgeAppearance;
311
+ shape?: AdaptiveCardBadgeShape;
312
+ size?: AdaptiveCardBadgeSize;
313
+ style?: AdaptiveCardBadgeStyle;
314
+ tooltip?: string;
315
+ }
316
+ export interface AdaptiveCardCodeBlock extends AdaptiveCardElementBase {
317
+ type: 'CodeBlock';
318
+ codeSnippet?: string;
319
+ language?: string;
320
+ startLineNumber?: number;
321
+ }
322
+ export interface AdaptiveCardCompoundButton extends AdaptiveCardElementBase {
323
+ type: 'CompoundButton';
324
+ title: string;
325
+ description?: string;
326
+ icon?: string;
327
+ badge?: string;
328
+ selectAction?: AdaptiveCardSelectAction;
329
+ }
330
+ export type AdaptiveCardIconStyle = 'regular' | 'filled';
331
+ export type AdaptiveCardIconSize = 'xxSmall' | 'xSmall' | 'small' | 'standard' | 'medium' | 'large' | 'xLarge' | 'xxLarge';
332
+ export interface AdaptiveCardIcon extends AdaptiveCardElementBase {
333
+ type: 'Icon';
334
+ name: string;
335
+ size?: AdaptiveCardIconSize;
336
+ style?: AdaptiveCardIconStyle;
337
+ color?: AdaptiveCardColor;
338
+ selectAction?: AdaptiveCardSelectAction;
339
+ }
340
+ export type AdaptiveCardProgressColor = 'default' | 'accent' | 'good' | 'warning' | 'attention';
341
+ export interface AdaptiveCardProgressBar extends AdaptiveCardElementBase {
342
+ type: 'ProgressBar';
343
+ value?: number;
344
+ max?: number;
345
+ color?: AdaptiveCardProgressColor;
346
+ }
347
+ export type AdaptiveCardProgressRingSize = 'tiny' | 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge' | 'huge';
348
+ export interface AdaptiveCardProgressRing extends AdaptiveCardElementBase {
349
+ type: 'ProgressRing';
350
+ value?: number;
351
+ max?: number;
352
+ size?: AdaptiveCardProgressRingSize;
353
+ label?: string;
354
+ color?: AdaptiveCardProgressColor;
355
+ }
356
+ export interface AdaptiveCardRating extends AdaptiveCardElementBase {
357
+ type: 'Rating';
358
+ value: number;
359
+ max?: number;
360
+ size?: 'medium' | 'large';
361
+ style?: 'default' | 'compact';
362
+ color?: 'marigold' | 'neutral';
363
+ count?: number;
364
+ }
365
+ export interface AdaptiveCardCarouselPage extends AdaptiveCardElementBase {
366
+ type: 'CarouselPage';
367
+ items?: Array<AdaptiveCardElement>;
368
+ style?: AdaptiveCardContainerStyle;
369
+ verticalContentAlignment?: AdaptiveCardVerticalAlignment;
370
+ backgroundImage?: string | AdaptiveCardBackgroundImage;
371
+ minHeight?: string;
372
+ }
373
+ export interface AdaptiveCardCarousel extends AdaptiveCardElementBase {
374
+ type: 'Carousel';
375
+ pages: Array<AdaptiveCardCarouselPage>;
376
+ timer?: number;
377
+ initialPage?: number;
378
+ loop?: boolean;
379
+ orientation?: 'horizontal' | 'vertical';
380
+ heightInPixels?: number;
381
+ }
382
+ export interface AdaptiveCardChartDataPoint {
383
+ x?: string | number;
384
+ y: number;
385
+ color?: string;
386
+ legend?: string;
387
+ }
388
+ export interface AdaptiveCardChartSegment {
389
+ value: number;
390
+ color?: string;
391
+ legend?: string;
392
+ }
393
+ export type AdaptiveCardChartColorSet = 'categorical' | 'sequential' | 'divergent';
394
+ export type AdaptiveCardChartColor = 'categoricalBlue' | 'categoricalGreen' | 'categoricalOrange' | 'categoricalPurple' | 'categoricalRed' | 'categoricalTeal' | 'categoricalYellow' | 'good' | 'warning' | 'attention' | 'neutral' | string;
395
+ interface AdaptiveCardChartBase extends AdaptiveCardElementBase {
396
+ data: Array<AdaptiveCardChartDataPoint>;
397
+ title?: string;
398
+ showTitle?: boolean;
399
+ showLegend?: boolean;
400
+ colorSet?: AdaptiveCardChartColorSet;
401
+ color?: AdaptiveCardChartColor;
402
+ valueFormat?: 'short' | 'long' | 'percentage';
403
+ displayMode?: 'absolute' | 'percentage';
404
+ maxWidth?: number;
405
+ }
406
+ export interface AdaptiveCardChartVerticalBar extends AdaptiveCardChartBase {
407
+ type: 'Chart.VerticalBar';
408
+ showBarValues?: boolean;
409
+ stacked?: boolean;
410
+ }
411
+ export interface AdaptiveCardChartHorizontalBar extends AdaptiveCardChartBase {
412
+ type: 'Chart.HorizontalBar';
413
+ showBarValues?: boolean;
414
+ stacked?: boolean;
415
+ }
416
+ export interface AdaptiveCardChartPie extends AdaptiveCardChartBase {
417
+ type: 'Chart.Pie';
418
+ }
419
+ export interface AdaptiveCardChartDonut extends AdaptiveCardChartBase {
420
+ type: 'Chart.Donut';
421
+ thickness?: 'thin' | 'medium' | 'thick';
422
+ }
423
+ export interface AdaptiveCardChartLine extends AdaptiveCardChartBase {
424
+ type: 'Chart.Line';
425
+ showOutlines?: boolean;
426
+ }
427
+ export interface AdaptiveCardChartGauge extends AdaptiveCardElementBase {
428
+ type: 'Chart.Gauge';
429
+ value: number;
430
+ min?: number;
431
+ max?: number;
432
+ title?: string;
433
+ showTitle?: boolean;
434
+ showMinMax?: boolean;
435
+ showNeedle?: boolean;
436
+ subLabel?: string;
437
+ valueColor?: AdaptiveCardChartColor;
438
+ valueFormat?: 'short' | 'long' | 'percentage';
439
+ segments?: Array<AdaptiveCardChartSegment>;
440
+ }
441
+ export type AdaptiveCardChart = AdaptiveCardChartVerticalBar | AdaptiveCardChartHorizontalBar | AdaptiveCardChartPie | AdaptiveCardChartDonut | AdaptiveCardChartLine | AdaptiveCardChartGauge;
442
+ export interface AdaptiveCardAccordionPage extends AdaptiveCardElementBase {
443
+ type: 'AccordionPage';
444
+ items?: Array<AdaptiveCardElement>;
445
+ headerTitle?: string;
446
+ headerIconName?: string;
447
+ headerSize?: AdaptiveCardFontSize;
448
+ headerWrap?: boolean;
449
+ isExpanded?: boolean;
450
+ expandIconPosition?: 'leading' | 'trailing';
451
+ style?: AdaptiveCardContainerStyle;
452
+ }
453
+ export interface AdaptiveCardAccordion extends AdaptiveCardElementBase {
454
+ type: 'Accordion';
455
+ items?: Array<AdaptiveCardAccordionPage>;
456
+ allowCollapseAllPages?: boolean;
457
+ allowMultipleExpandedPages?: boolean;
458
+ }
459
+ export interface AdaptiveCardTabPage extends AdaptiveCardElementBase {
460
+ type: 'TabPage';
461
+ title?: string;
462
+ icon?: string;
463
+ items?: Array<AdaptiveCardElement>;
464
+ }
465
+ export interface AdaptiveCardTabSet extends AdaptiveCardElementBase {
466
+ type: 'TabSet';
467
+ tabs?: Array<AdaptiveCardTabPage>;
468
+ size?: 'small' | 'medium' | 'large';
469
+ }
470
+ export interface AdaptiveCardLoopComponent extends AdaptiveCardElementBase {
471
+ type: 'LoopComponent';
472
+ componentUrl: string;
473
+ }
474
+ export interface AdaptiveCardComponent extends AdaptiveCardElementBase {
475
+ type: 'Component';
476
+ name?: string;
477
+ componentName?: string;
478
+ componentUrl?: string;
479
+ properties?: Record<string, unknown>;
480
+ }
481
+ export interface AdaptiveCardActionBase {
482
+ id?: string;
483
+ title?: string;
484
+ iconUrl?: string;
485
+ tooltip?: string;
486
+ isEnabled?: boolean;
487
+ style?: AdaptiveCardActionStyle;
488
+ mode?: AdaptiveCardActionMode;
489
+ requires?: Record<string, string>;
490
+ fallback?: AdaptiveCardAction | 'drop';
491
+ }
492
+ export interface AdaptiveCardActionSubmit extends AdaptiveCardActionBase {
493
+ type: 'Action.Submit';
494
+ data?: unknown;
495
+ associatedInputs?: AdaptiveCardAssociatedInputs;
496
+ }
497
+ export interface AdaptiveCardActionExecute extends AdaptiveCardActionBase {
498
+ type: 'Action.Execute';
499
+ verb?: string;
500
+ data?: unknown;
501
+ associatedInputs?: AdaptiveCardAssociatedInputs;
502
+ }
503
+ export interface AdaptiveCardActionOpenUrl extends AdaptiveCardActionBase {
504
+ type: 'Action.OpenUrl';
505
+ url: string;
506
+ }
507
+ export interface AdaptiveCardActionShowCard extends AdaptiveCardActionBase {
508
+ type: 'Action.ShowCard';
509
+ card: AdaptiveCardPayload;
510
+ }
511
+ export interface AdaptiveCardToggleVisibilityTarget {
512
+ elementId: string;
513
+ isVisible?: boolean;
514
+ }
515
+ export interface AdaptiveCardActionToggleVisibility extends AdaptiveCardActionBase {
516
+ type: 'Action.ToggleVisibility';
517
+ targetElements: Array<string | AdaptiveCardToggleVisibilityTarget>;
518
+ }
519
+ export interface AdaptiveCardActionResetInputs extends AdaptiveCardActionBase {
520
+ type: 'Action.ResetInputs';
521
+ targetInputIds?: Array<string>;
522
+ }
523
+ export type AdaptiveCardAction = AdaptiveCardActionSubmit | AdaptiveCardActionExecute | AdaptiveCardActionOpenUrl | AdaptiveCardActionShowCard | AdaptiveCardActionToggleVisibility | AdaptiveCardActionResetInputs;
524
+ export type AdaptiveCardSelectAction = AdaptiveCardActionSubmit | AdaptiveCardActionExecute | AdaptiveCardActionOpenUrl | AdaptiveCardActionToggleVisibility | AdaptiveCardActionResetInputs;
525
+ export type AdaptiveCardElement = AdaptiveCardTextBlock | AdaptiveCardRichTextBlock | AdaptiveCardImage | AdaptiveCardMedia | AdaptiveCardContainer | AdaptiveCardColumnSet | AdaptiveCardFactSet | AdaptiveCardImageSet | AdaptiveCardTable | AdaptiveCardActionSetElement | AdaptiveCardInput | AdaptiveCardBadge | AdaptiveCardCodeBlock | AdaptiveCardCompoundButton | AdaptiveCardIcon | AdaptiveCardProgressBar | AdaptiveCardProgressRing | AdaptiveCardRating | AdaptiveCardCarousel | AdaptiveCardChartVerticalBar | AdaptiveCardChartHorizontalBar | AdaptiveCardChartPie | AdaptiveCardChartDonut | AdaptiveCardChartLine | AdaptiveCardChartGauge | AdaptiveCardAccordion | AdaptiveCardTabSet | AdaptiveCardLoopComponent | AdaptiveCardComponent;
526
+ export interface AdaptiveCardCustomElement extends AdaptiveCardElementBase {
527
+ type: string;
528
+ [key: string]: unknown;
529
+ }
530
+ export type AdaptiveCardElementOrCustom = AdaptiveCardElement | AdaptiveCardCustomElement;
531
+ export interface AdaptiveCardPayload {
532
+ type: 'AdaptiveCard';
533
+ $schema?: string;
534
+ version: string;
535
+ refresh?: AdaptiveCardRefresh;
536
+ authentication?: AdaptiveCardAuthentication;
537
+ body?: Array<AdaptiveCardElement>;
538
+ actions?: Array<AdaptiveCardAction>;
539
+ selectAction?: AdaptiveCardSelectAction;
540
+ fallbackText?: string;
541
+ backgroundImage?: string | AdaptiveCardBackgroundImage;
542
+ minHeight?: string;
543
+ rtl?: boolean;
544
+ speak?: string;
545
+ lang?: string;
546
+ verticalContentAlignment?: AdaptiveCardVerticalAlignment;
547
+ requires?: Record<string, string>;
548
+ }
549
+ export interface AdaptiveCardColorPair {
550
+ default: string;
551
+ subtle: string;
552
+ }
553
+ export interface AdaptiveCardContainerStyleTokens {
554
+ bg: string;
555
+ fg: string;
556
+ borderColor: string;
557
+ }
558
+ export interface AdaptiveCardHostConfigColors {
559
+ default: AdaptiveCardColorPair;
560
+ accent: AdaptiveCardColorPair;
561
+ good: AdaptiveCardColorPair;
562
+ warning: AdaptiveCardColorPair;
563
+ attention: AdaptiveCardColorPair;
564
+ dark: AdaptiveCardColorPair;
565
+ light: AdaptiveCardColorPair;
566
+ }
567
+ export interface AdaptiveCardHostConfigSpacing {
568
+ none: number;
569
+ small: number;
570
+ default: number;
571
+ medium: number;
572
+ large: number;
573
+ extraLarge: number;
574
+ padding: number;
575
+ }
576
+ export interface AdaptiveCardHostConfigImageSizes {
577
+ small: number;
578
+ medium: number;
579
+ large: number;
580
+ }
581
+ export interface AdaptiveCardHostConfigFontSizes {
582
+ small: number;
583
+ default: number;
584
+ medium: number;
585
+ large: number;
586
+ extraLarge: number;
587
+ }
588
+ export interface AdaptiveCardHostConfigFontWeights {
589
+ lighter: number;
590
+ default: number;
591
+ bolder: number;
592
+ }
593
+ export interface AdaptiveCardHostConfigActions {
594
+ maxActions: number;
595
+ actionsOrientation: 'horizontal' | 'vertical';
596
+ buttonSpacing: number;
597
+ showCard: {
598
+ actionMode: 'inline' | 'popup';
599
+ inlineTopMargin: number;
600
+ style: AdaptiveCardContainerStyle;
601
+ };
602
+ }
603
+ export interface AdaptiveCardHostConfig {
604
+ supportsInteractivity: boolean;
605
+ hostCapabilities?: Record<string, string>;
606
+ colors: AdaptiveCardHostConfigColors;
607
+ spacing: AdaptiveCardHostConfigSpacing;
608
+ imageSizes: AdaptiveCardHostConfigImageSizes;
609
+ fontSizes: AdaptiveCardHostConfigFontSizes;
610
+ fontWeights: AdaptiveCardHostConfigFontWeights;
611
+ containerStyles: Record<AdaptiveCardContainerStyle, AdaptiveCardContainerStyleTokens>;
612
+ actions: AdaptiveCardHostConfigActions;
613
+ }
614
+ export type AdaptiveCardHostConfigOverride = DeepPartial<AdaptiveCardHostConfig>;
615
+ type DeepPartial<T> = {
616
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
617
+ };
618
+ export type AdaptiveCardInputValue = string | Array<string> | boolean | number | null;
619
+ export interface AdaptiveCardSubmitEvent {
620
+ type: 'submit';
621
+ data: Record<string, AdaptiveCardInputValue> | unknown;
622
+ action: AdaptiveCardActionSubmit;
623
+ card: AdaptiveCardPayload;
624
+ }
625
+ export interface AdaptiveCardExecuteEvent {
626
+ type: 'execute';
627
+ verb?: string;
628
+ data: Record<string, AdaptiveCardInputValue> | unknown;
629
+ action: AdaptiveCardActionExecute;
630
+ card: AdaptiveCardPayload;
631
+ }
632
+ export interface AdaptiveCardOpenUrlEvent {
633
+ type: 'openUrl';
634
+ url: string;
635
+ action: AdaptiveCardActionOpenUrl;
636
+ card: AdaptiveCardPayload;
637
+ }
638
+ export interface AdaptiveCardToggleVisibilityEvent {
639
+ type: 'toggleVisibility';
640
+ action: AdaptiveCardActionToggleVisibility;
641
+ card: AdaptiveCardPayload;
642
+ }
643
+ export interface AdaptiveCardShowCardEvent {
644
+ type: 'showCard';
645
+ isOpen: boolean;
646
+ action: AdaptiveCardActionShowCard;
647
+ card: AdaptiveCardPayload;
648
+ }
649
+ export interface AdaptiveCardResetInputsEvent {
650
+ type: 'resetInputs';
651
+ action: AdaptiveCardActionResetInputs;
652
+ card: AdaptiveCardPayload;
653
+ }
654
+ export type AdaptiveCardActionEvent = AdaptiveCardSubmitEvent | AdaptiveCardExecuteEvent | AdaptiveCardOpenUrlEvent | AdaptiveCardToggleVisibilityEvent | AdaptiveCardShowCardEvent | AdaptiveCardResetInputsEvent;
655
+ export type ElementRenderer<T extends AdaptiveCardElement = AdaptiveCardElement> = (props: {
656
+ element: T;
657
+ }) => ReactNode;
658
+ export interface AdaptiveCardChoiceQueryRequestPayload {
659
+ dataset: string;
660
+ search: string;
661
+ inputId: string;
662
+ }
663
+ export interface AdaptiveCardProps {
664
+ payload: AdaptiveCardPayload;
665
+ data?: unknown;
666
+ onAction?: (event: AdaptiveCardActionEvent) => void | Promise<void>;
667
+ hostConfig?: AdaptiveCardHostConfigOverride;
668
+ customElements?: Record<string, ElementRenderer>;
669
+ onChoiceQuery?: (request: AdaptiveCardChoiceQueryRequestPayload) => Promise<Array<AdaptiveCardChoice>>;
670
+ className?: string;
671
+ }
672
+ export {};
@@ -0,0 +1,6 @@
1
+ import { type AdaptiveCardContextValue } from './adaptive-card-context';
2
+ export interface AdaptiveCardViewProps {
3
+ cardProps: AdaptiveCardContextValue;
4
+ className?: string;
5
+ }
6
+ export declare function AdaptiveCardView({ cardProps, className }: AdaptiveCardViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { type AdaptiveCardProps } from './adaptive-card-types';
2
+ export declare function AdaptiveCard({ payload, data, onAction, hostConfig, customElements, onChoiceQuery, className }: AdaptiveCardProps): import("react/jsx-runtime").JSX.Element;
3
+ export type { AdaptiveCardProps };
@@ -0,0 +1,11 @@
1
+ import { type AdaptiveCardElement } from './adaptive-card-types';
2
+ interface ElementNodeProps {
3
+ element: AdaptiveCardElement;
4
+ index?: number;
5
+ }
6
+ export declare function ElementNode({ element, index }: ElementNodeProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export declare function ElementList({ items, emptyClassName }: {
8
+ items: Array<AdaptiveCardElement> | undefined;
9
+ emptyClassName?: string;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ import { type ElementRenderer } from './adaptive-card-types';
2
+ export declare function registerElement(type: string, renderer: ElementRenderer): void;
3
+ export declare function getElementRenderer(type: string): ElementRenderer | undefined;
4
+ export declare function listElementTypes(): Array<string>;