@meistrari/chat-ui-lang 0.4.0 → 0.5.0-rc.1
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/README.md +6 -2
- package/dist/components/chart.d.ts +34 -0
- package/dist/components/form.d.ts +10 -0
- package/dist/components/layout.d.ts +272 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +525 -44
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/runtime/chart-colors.d.ts +3 -0
- package/dist/nuxt/runtime/chart-colors.js +7 -0
- package/dist/nuxt/runtime/components/widgets/bar-chart.vue +11 -9
- package/dist/nuxt/runtime/components/widgets/date-input.d.vue.ts +9 -0
- package/dist/nuxt/runtime/components/widgets/date-input.vue +23 -0
- package/dist/nuxt/runtime/components/widgets/date-input.vue.d.ts +9 -0
- package/dist/nuxt/runtime/components/widgets/line-chart.d.vue.ts +12 -0
- package/dist/nuxt/runtime/components/widgets/line-chart.vue +108 -0
- package/dist/nuxt/runtime/components/widgets/line-chart.vue.d.ts +12 -0
- package/dist/nuxt/runtime/components/widgets/pie-chart.d.vue.ts +9 -0
- package/dist/nuxt/runtime/components/widgets/pie-chart.vue +73 -0
- package/dist/nuxt/runtime/components/widgets/pie-chart.vue.d.ts +9 -0
- package/dist/nuxt/runtime/components/widgets/series.d.vue.ts +9 -0
- package/dist/nuxt/runtime/components/widgets/series.vue +12 -0
- package/dist/nuxt/runtime/components/widgets/series.vue.d.ts +9 -0
- package/dist/nuxt/runtime/components/widgets/slice.d.vue.ts +10 -0
- package/dist/nuxt/runtime/components/widgets/slice.vue +12 -0
- package/dist/nuxt/runtime/components/widgets/slice.vue.d.ts +10 -0
- package/dist/nuxt/runtime/form-fields.js +1 -1
- package/dist/nuxt/runtime/registry.js +10 -0
- package/dist/slack.d.ts +11 -1
- package/dist/version.d.ts +1 -1
- package/package.json +71 -71
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ examples, and `prompt({ profile })` builds the system prompt for one of them.
|
|
|
16
16
|
| Profile | Renderer | Offers |
|
|
17
17
|
| --- | --- | --- |
|
|
18
18
|
| `web` | `@meistrari/chat-ui-lang/nuxt` | the whole catalogue |
|
|
19
|
-
| `slack` | `renderSlackAnswer` | layout, text, metrics, one table, buttons |
|
|
19
|
+
| `slack` | `renderSlackAnswer` | everything but `Citation`: layout and native cards, text, metrics, one table, up to two charts, images and files, forms and questions as message inputs, buttons |
|
|
20
20
|
|
|
21
21
|
A Slack-only component must still get a web renderer, so every surface can show any message of a conversation that moved
|
|
22
22
|
between them.
|
|
@@ -26,7 +26,11 @@ between them.
|
|
|
26
26
|
`renderSlackAnswer(content, { prose, threadTs, maxBlocks })` turns an answer with `openui-lang` blocks into Block Kit, or
|
|
27
27
|
returns null when it has none. `prose` is how the connector already renders markdown. Buttons that send a message carry
|
|
28
28
|
`{ t: threadTs, m: message }` in their value under the action id `openui_send_<n>`; `parseSlackWidgetAction` reads it
|
|
29
|
-
back when Slack reports the click. Link buttons (`openui_link_<n>`) only need an acknowledgement.
|
|
29
|
+
back when Slack reports the click. Link buttons (`openui_link_<n>`) only need an acknowledgement. Past five buttons, the
|
|
30
|
+
first four stay visible and the rest go into a "…" menu (`openui_more_<n>`) whose options carry the same value or link.
|
|
31
|
+
Forms and questions become input blocks of the message (`plain_text_input`, `static_select`, `checkboxes`, `datepicker`,
|
|
32
|
+
`radio_buttons`) with a send button (`openui_submit_<n>`); `parseSlackWidgetSubmission(value, state.values)` builds the
|
|
33
|
+
same message the web widgets send from the click's input state. Without `threadTs`,
|
|
30
34
|
send buttons render as text, and so do buttons whose message with its widget context does not fit the 2000-character button value. When the answer does not fit `maxBlocks`, even as prose, `blocks` comes back empty and `text` is the whole answer. `maskWidgets` hides widget code while an answer streams.
|
|
31
35
|
|
|
32
36
|
## Nuxt renderer
|
|
@@ -21,3 +21,37 @@ export declare const BarChart: import("..").UiComponent<z.ZodObject<{
|
|
|
21
21
|
negative: "negative";
|
|
22
22
|
}>>;
|
|
23
23
|
}, z.core.$strip>>;
|
|
24
|
+
export declare const Series: import("..").UiComponent<z.ZodObject<{
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
values: z.ZodArray<z.ZodNumber>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
export declare const LineChart: import("..").UiComponent<z.ZodObject<{
|
|
29
|
+
title: z.ZodString;
|
|
30
|
+
categories: z.ZodArray<z.ZodString>;
|
|
31
|
+
series: z.ZodArray<z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
32
|
+
name: string;
|
|
33
|
+
values: number[];
|
|
34
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
35
|
+
name: string;
|
|
36
|
+
values: number[];
|
|
37
|
+
}>, unknown>>>;
|
|
38
|
+
yLabel: z.ZodOptional<z.ZodString>;
|
|
39
|
+
area: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
export declare const Slice: import("..").UiComponent<z.ZodObject<{
|
|
42
|
+
label: z.ZodString;
|
|
43
|
+
value: z.ZodNumber;
|
|
44
|
+
display: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
export declare const PieChart: import("..").UiComponent<z.ZodObject<{
|
|
47
|
+
title: z.ZodString;
|
|
48
|
+
slices: z.ZodArray<z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
49
|
+
label: string;
|
|
50
|
+
value: number;
|
|
51
|
+
display?: string | undefined;
|
|
52
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
53
|
+
label: string;
|
|
54
|
+
value: number;
|
|
55
|
+
display?: string | undefined;
|
|
56
|
+
}>, unknown>>>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
@@ -13,6 +13,10 @@ export declare const Checkbox: import("..").UiComponent<z.ZodObject<{
|
|
|
13
13
|
name: z.ZodString;
|
|
14
14
|
label: z.ZodString;
|
|
15
15
|
}, z.core.$strip>>;
|
|
16
|
+
export declare const DateInput: import("..").UiComponent<z.ZodObject<{
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
label: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>;
|
|
16
20
|
export declare const Form: import("..").UiComponent<z.ZodObject<{
|
|
17
21
|
name: z.ZodString;
|
|
18
22
|
fields: z.ZodArray<z.ZodUnion<readonly [z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -37,6 +41,12 @@ export declare const Form: import("..").UiComponent<z.ZodObject<{
|
|
|
37
41
|
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
38
42
|
name: string;
|
|
39
43
|
label: string;
|
|
44
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
45
|
+
name: string;
|
|
46
|
+
label: string;
|
|
47
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
48
|
+
name: string;
|
|
49
|
+
label: string;
|
|
40
50
|
}>, unknown>>]>>;
|
|
41
51
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
42
52
|
}, z.core.$strip>>;
|
|
@@ -52,6 +52,38 @@ export declare const Card: import("..").UiComponent<z.ZodObject<{
|
|
|
52
52
|
display?: string | undefined;
|
|
53
53
|
}>[];
|
|
54
54
|
tone?: "neutral" | "positive" | "negative" | undefined;
|
|
55
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
56
|
+
title: string;
|
|
57
|
+
categories: string[];
|
|
58
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
59
|
+
name: string;
|
|
60
|
+
values: number[];
|
|
61
|
+
}>[];
|
|
62
|
+
yLabel?: string | undefined;
|
|
63
|
+
area?: boolean | undefined;
|
|
64
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
65
|
+
title: string;
|
|
66
|
+
categories: string[];
|
|
67
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
68
|
+
name: string;
|
|
69
|
+
values: number[];
|
|
70
|
+
}>[];
|
|
71
|
+
yLabel?: string | undefined;
|
|
72
|
+
area?: boolean | undefined;
|
|
73
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
74
|
+
title: string;
|
|
75
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
76
|
+
label: string;
|
|
77
|
+
value: number;
|
|
78
|
+
display?: string | undefined;
|
|
79
|
+
}>[];
|
|
80
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
81
|
+
title: string;
|
|
82
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
83
|
+
label: string;
|
|
84
|
+
value: number;
|
|
85
|
+
display?: string | undefined;
|
|
86
|
+
}>[];
|
|
55
87
|
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
56
88
|
buttons: import("@openuidev/lang-core").SubComponentOf<{
|
|
57
89
|
label: string;
|
|
@@ -95,6 +127,9 @@ export declare const Card: import("..").UiComponent<z.ZodObject<{
|
|
|
95
127
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
96
128
|
name: string;
|
|
97
129
|
label: string;
|
|
130
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
131
|
+
name: string;
|
|
132
|
+
label: string;
|
|
98
133
|
}>)[];
|
|
99
134
|
submitLabel?: string | undefined;
|
|
100
135
|
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -110,6 +145,9 @@ export declare const Card: import("..").UiComponent<z.ZodObject<{
|
|
|
110
145
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
111
146
|
name: string;
|
|
112
147
|
label: string;
|
|
148
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
149
|
+
name: string;
|
|
150
|
+
label: string;
|
|
113
151
|
}>)[];
|
|
114
152
|
submitLabel?: string | undefined;
|
|
115
153
|
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -187,6 +225,22 @@ export declare const Stack: import("..").UiComponent<z.ZodObject<{
|
|
|
187
225
|
display?: string | undefined;
|
|
188
226
|
}>[];
|
|
189
227
|
tone?: "neutral" | "positive" | "negative" | undefined;
|
|
228
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
229
|
+
title: string;
|
|
230
|
+
categories: string[];
|
|
231
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
232
|
+
name: string;
|
|
233
|
+
values: number[];
|
|
234
|
+
}>[];
|
|
235
|
+
yLabel?: string | undefined;
|
|
236
|
+
area?: boolean | undefined;
|
|
237
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
238
|
+
title: string;
|
|
239
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
240
|
+
label: string;
|
|
241
|
+
value: number;
|
|
242
|
+
display?: string | undefined;
|
|
243
|
+
}>[];
|
|
190
244
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
191
245
|
buttons: import("@openuidev/lang-core").SubComponentOf<{
|
|
192
246
|
label: string;
|
|
@@ -215,6 +269,9 @@ export declare const Stack: import("..").UiComponent<z.ZodObject<{
|
|
|
215
269
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
216
270
|
name: string;
|
|
217
271
|
label: string;
|
|
272
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
273
|
+
name: string;
|
|
274
|
+
label: string;
|
|
218
275
|
}>)[];
|
|
219
276
|
submitLabel?: string | undefined;
|
|
220
277
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -268,6 +325,22 @@ export declare const Stack: import("..").UiComponent<z.ZodObject<{
|
|
|
268
325
|
display?: string | undefined;
|
|
269
326
|
}>[];
|
|
270
327
|
tone?: "neutral" | "positive" | "negative" | undefined;
|
|
328
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
329
|
+
title: string;
|
|
330
|
+
categories: string[];
|
|
331
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
332
|
+
name: string;
|
|
333
|
+
values: number[];
|
|
334
|
+
}>[];
|
|
335
|
+
yLabel?: string | undefined;
|
|
336
|
+
area?: boolean | undefined;
|
|
337
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
338
|
+
title: string;
|
|
339
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
340
|
+
label: string;
|
|
341
|
+
value: number;
|
|
342
|
+
display?: string | undefined;
|
|
343
|
+
}>[];
|
|
271
344
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
272
345
|
buttons: import("@openuidev/lang-core").SubComponentOf<{
|
|
273
346
|
label: string;
|
|
@@ -296,6 +369,9 @@ export declare const Stack: import("..").UiComponent<z.ZodObject<{
|
|
|
296
369
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
297
370
|
name: string;
|
|
298
371
|
label: string;
|
|
372
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
373
|
+
name: string;
|
|
374
|
+
label: string;
|
|
299
375
|
}>)[];
|
|
300
376
|
submitLabel?: string | undefined;
|
|
301
377
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -374,6 +450,38 @@ export declare const Stack: import("..").UiComponent<z.ZodObject<{
|
|
|
374
450
|
display?: string | undefined;
|
|
375
451
|
}>[];
|
|
376
452
|
tone?: "neutral" | "positive" | "negative" | undefined;
|
|
453
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
454
|
+
title: string;
|
|
455
|
+
categories: string[];
|
|
456
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
457
|
+
name: string;
|
|
458
|
+
values: number[];
|
|
459
|
+
}>[];
|
|
460
|
+
yLabel?: string | undefined;
|
|
461
|
+
area?: boolean | undefined;
|
|
462
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
463
|
+
title: string;
|
|
464
|
+
categories: string[];
|
|
465
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
466
|
+
name: string;
|
|
467
|
+
values: number[];
|
|
468
|
+
}>[];
|
|
469
|
+
yLabel?: string | undefined;
|
|
470
|
+
area?: boolean | undefined;
|
|
471
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
472
|
+
title: string;
|
|
473
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
474
|
+
label: string;
|
|
475
|
+
value: number;
|
|
476
|
+
display?: string | undefined;
|
|
477
|
+
}>[];
|
|
478
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
479
|
+
title: string;
|
|
480
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
481
|
+
label: string;
|
|
482
|
+
value: number;
|
|
483
|
+
display?: string | undefined;
|
|
484
|
+
}>[];
|
|
377
485
|
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
378
486
|
buttons: import("@openuidev/lang-core").SubComponentOf<{
|
|
379
487
|
label: string;
|
|
@@ -417,6 +525,9 @@ export declare const Stack: import("..").UiComponent<z.ZodObject<{
|
|
|
417
525
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
418
526
|
name: string;
|
|
419
527
|
label: string;
|
|
528
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
529
|
+
name: string;
|
|
530
|
+
label: string;
|
|
420
531
|
}>)[];
|
|
421
532
|
submitLabel?: string | undefined;
|
|
422
533
|
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -432,6 +543,9 @@ export declare const Stack: import("..").UiComponent<z.ZodObject<{
|
|
|
432
543
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
433
544
|
name: string;
|
|
434
545
|
label: string;
|
|
546
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
547
|
+
name: string;
|
|
548
|
+
label: string;
|
|
435
549
|
}>)[];
|
|
436
550
|
submitLabel?: string | undefined;
|
|
437
551
|
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -513,6 +627,22 @@ export declare const components: {
|
|
|
513
627
|
display?: string | undefined;
|
|
514
628
|
}>[];
|
|
515
629
|
tone?: "neutral" | "positive" | "negative" | undefined;
|
|
630
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
631
|
+
title: string;
|
|
632
|
+
categories: string[];
|
|
633
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
634
|
+
name: string;
|
|
635
|
+
values: number[];
|
|
636
|
+
}>[];
|
|
637
|
+
yLabel?: string | undefined;
|
|
638
|
+
area?: boolean | undefined;
|
|
639
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
640
|
+
title: string;
|
|
641
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
642
|
+
label: string;
|
|
643
|
+
value: number;
|
|
644
|
+
display?: string | undefined;
|
|
645
|
+
}>[];
|
|
516
646
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
517
647
|
buttons: import("@openuidev/lang-core").SubComponentOf<{
|
|
518
648
|
label: string;
|
|
@@ -541,6 +671,9 @@ export declare const components: {
|
|
|
541
671
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
542
672
|
name: string;
|
|
543
673
|
label: string;
|
|
674
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
675
|
+
name: string;
|
|
676
|
+
label: string;
|
|
544
677
|
}>)[];
|
|
545
678
|
submitLabel?: string | undefined;
|
|
546
679
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -594,6 +727,22 @@ export declare const components: {
|
|
|
594
727
|
display?: string | undefined;
|
|
595
728
|
}>[];
|
|
596
729
|
tone?: "neutral" | "positive" | "negative" | undefined;
|
|
730
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
731
|
+
title: string;
|
|
732
|
+
categories: string[];
|
|
733
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
734
|
+
name: string;
|
|
735
|
+
values: number[];
|
|
736
|
+
}>[];
|
|
737
|
+
yLabel?: string | undefined;
|
|
738
|
+
area?: boolean | undefined;
|
|
739
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
740
|
+
title: string;
|
|
741
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
742
|
+
label: string;
|
|
743
|
+
value: number;
|
|
744
|
+
display?: string | undefined;
|
|
745
|
+
}>[];
|
|
597
746
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
598
747
|
buttons: import("@openuidev/lang-core").SubComponentOf<{
|
|
599
748
|
label: string;
|
|
@@ -622,6 +771,9 @@ export declare const components: {
|
|
|
622
771
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
623
772
|
name: string;
|
|
624
773
|
label: string;
|
|
774
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
775
|
+
name: string;
|
|
776
|
+
label: string;
|
|
625
777
|
}>)[];
|
|
626
778
|
submitLabel?: string | undefined;
|
|
627
779
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -700,6 +852,38 @@ export declare const components: {
|
|
|
700
852
|
display?: string | undefined;
|
|
701
853
|
}>[];
|
|
702
854
|
tone?: "neutral" | "positive" | "negative" | undefined;
|
|
855
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
856
|
+
title: string;
|
|
857
|
+
categories: string[];
|
|
858
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
859
|
+
name: string;
|
|
860
|
+
values: number[];
|
|
861
|
+
}>[];
|
|
862
|
+
yLabel?: string | undefined;
|
|
863
|
+
area?: boolean | undefined;
|
|
864
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
865
|
+
title: string;
|
|
866
|
+
categories: string[];
|
|
867
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
868
|
+
name: string;
|
|
869
|
+
values: number[];
|
|
870
|
+
}>[];
|
|
871
|
+
yLabel?: string | undefined;
|
|
872
|
+
area?: boolean | undefined;
|
|
873
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
874
|
+
title: string;
|
|
875
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
876
|
+
label: string;
|
|
877
|
+
value: number;
|
|
878
|
+
display?: string | undefined;
|
|
879
|
+
}>[];
|
|
880
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
881
|
+
title: string;
|
|
882
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
883
|
+
label: string;
|
|
884
|
+
value: number;
|
|
885
|
+
display?: string | undefined;
|
|
886
|
+
}>[];
|
|
703
887
|
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
704
888
|
buttons: import("@openuidev/lang-core").SubComponentOf<{
|
|
705
889
|
label: string;
|
|
@@ -743,6 +927,9 @@ export declare const components: {
|
|
|
743
927
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
744
928
|
name: string;
|
|
745
929
|
label: string;
|
|
930
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
931
|
+
name: string;
|
|
932
|
+
label: string;
|
|
746
933
|
}>)[];
|
|
747
934
|
submitLabel?: string | undefined;
|
|
748
935
|
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -758,6 +945,9 @@ export declare const components: {
|
|
|
758
945
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
759
946
|
name: string;
|
|
760
947
|
label: string;
|
|
948
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
949
|
+
name: string;
|
|
950
|
+
label: string;
|
|
761
951
|
}>)[];
|
|
762
952
|
submitLabel?: string | undefined;
|
|
763
953
|
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -863,6 +1053,38 @@ export declare const components: {
|
|
|
863
1053
|
display?: string | undefined;
|
|
864
1054
|
}>[];
|
|
865
1055
|
tone?: "neutral" | "positive" | "negative" | undefined;
|
|
1056
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
1057
|
+
title: string;
|
|
1058
|
+
categories: string[];
|
|
1059
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
1060
|
+
name: string;
|
|
1061
|
+
values: number[];
|
|
1062
|
+
}>[];
|
|
1063
|
+
yLabel?: string | undefined;
|
|
1064
|
+
area?: boolean | undefined;
|
|
1065
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
1066
|
+
title: string;
|
|
1067
|
+
categories: string[];
|
|
1068
|
+
series: import("@openuidev/lang-core").SubComponentOf<{
|
|
1069
|
+
name: string;
|
|
1070
|
+
values: number[];
|
|
1071
|
+
}>[];
|
|
1072
|
+
yLabel?: string | undefined;
|
|
1073
|
+
area?: boolean | undefined;
|
|
1074
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
1075
|
+
title: string;
|
|
1076
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
1077
|
+
label: string;
|
|
1078
|
+
value: number;
|
|
1079
|
+
display?: string | undefined;
|
|
1080
|
+
}>[];
|
|
1081
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
1082
|
+
title: string;
|
|
1083
|
+
slices: import("@openuidev/lang-core").SubComponentOf<{
|
|
1084
|
+
label: string;
|
|
1085
|
+
value: number;
|
|
1086
|
+
display?: string | undefined;
|
|
1087
|
+
}>[];
|
|
866
1088
|
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
867
1089
|
buttons: import("@openuidev/lang-core").SubComponentOf<{
|
|
868
1090
|
label: string;
|
|
@@ -906,6 +1128,9 @@ export declare const components: {
|
|
|
906
1128
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
907
1129
|
name: string;
|
|
908
1130
|
label: string;
|
|
1131
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
1132
|
+
name: string;
|
|
1133
|
+
label: string;
|
|
909
1134
|
}>)[];
|
|
910
1135
|
submitLabel?: string | undefined;
|
|
911
1136
|
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -921,6 +1146,9 @@ export declare const components: {
|
|
|
921
1146
|
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
922
1147
|
name: string;
|
|
923
1148
|
label: string;
|
|
1149
|
+
}> | import("@openuidev/lang-core").SubComponentOf<{
|
|
1150
|
+
name: string;
|
|
1151
|
+
label: string;
|
|
924
1152
|
}>)[];
|
|
925
1153
|
submitLabel?: string | undefined;
|
|
926
1154
|
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -1035,6 +1263,40 @@ export declare const components: {
|
|
|
1035
1263
|
negative: "negative";
|
|
1036
1264
|
}>>;
|
|
1037
1265
|
}, z.core.$strip>>;
|
|
1266
|
+
Series: import("..").UiComponent<z.ZodObject<{
|
|
1267
|
+
name: z.ZodString;
|
|
1268
|
+
values: z.ZodArray<z.ZodNumber>;
|
|
1269
|
+
}, z.core.$strip>>;
|
|
1270
|
+
LineChart: import("..").UiComponent<z.ZodObject<{
|
|
1271
|
+
title: z.ZodString;
|
|
1272
|
+
categories: z.ZodArray<z.ZodString>;
|
|
1273
|
+
series: z.ZodArray<z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
1274
|
+
name: string;
|
|
1275
|
+
values: number[];
|
|
1276
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
1277
|
+
name: string;
|
|
1278
|
+
values: number[];
|
|
1279
|
+
}>, unknown>>>;
|
|
1280
|
+
yLabel: z.ZodOptional<z.ZodString>;
|
|
1281
|
+
area: z.ZodOptional<z.ZodBoolean>;
|
|
1282
|
+
}, z.core.$strip>>;
|
|
1283
|
+
Slice: import("..").UiComponent<z.ZodObject<{
|
|
1284
|
+
label: z.ZodString;
|
|
1285
|
+
value: z.ZodNumber;
|
|
1286
|
+
display: z.ZodOptional<z.ZodString>;
|
|
1287
|
+
}, z.core.$strip>>;
|
|
1288
|
+
PieChart: import("..").UiComponent<z.ZodObject<{
|
|
1289
|
+
title: z.ZodString;
|
|
1290
|
+
slices: z.ZodArray<z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
1291
|
+
label: string;
|
|
1292
|
+
value: number;
|
|
1293
|
+
display?: string | undefined;
|
|
1294
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
1295
|
+
label: string;
|
|
1296
|
+
value: number;
|
|
1297
|
+
display?: string | undefined;
|
|
1298
|
+
}>, unknown>>>;
|
|
1299
|
+
}, z.core.$strip>>;
|
|
1038
1300
|
Button: import("..").UiComponent<z.ZodObject<{
|
|
1039
1301
|
label: z.ZodString;
|
|
1040
1302
|
action: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -1095,6 +1357,10 @@ export declare const components: {
|
|
|
1095
1357
|
name: z.ZodString;
|
|
1096
1358
|
label: z.ZodString;
|
|
1097
1359
|
}, z.core.$strip>>;
|
|
1360
|
+
DateInput: import("..").UiComponent<z.ZodObject<{
|
|
1361
|
+
name: z.ZodString;
|
|
1362
|
+
label: z.ZodString;
|
|
1363
|
+
}, z.core.$strip>>;
|
|
1098
1364
|
Form: import("..").UiComponent<z.ZodObject<{
|
|
1099
1365
|
name: z.ZodString;
|
|
1100
1366
|
fields: z.ZodArray<z.ZodUnion<readonly [z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
@@ -1119,6 +1385,12 @@ export declare const components: {
|
|
|
1119
1385
|
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
1120
1386
|
name: string;
|
|
1121
1387
|
label: string;
|
|
1388
|
+
}>, unknown>>, z.core.$ZodType<import("@openuidev/lang-core").SubComponentOf<{
|
|
1389
|
+
name: string;
|
|
1390
|
+
label: string;
|
|
1391
|
+
}>, unknown, z.core.$ZodTypeInternals<import("@openuidev/lang-core").SubComponentOf<{
|
|
1392
|
+
name: string;
|
|
1393
|
+
label: string;
|
|
1122
1394
|
}>, unknown>>]>>;
|
|
1123
1395
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
1124
1396
|
}, z.core.$strip>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ export { actions, CopyText } from './actions';
|
|
|
2
2
|
export { formatQuestionAnswers } from './answers';
|
|
3
3
|
export type { AnswerableQuestion, QuestionAnswer } from './answers';
|
|
4
4
|
export { Button, Buttons } from './components/actions';
|
|
5
|
-
export { Bar, BarChart } from './components/chart';
|
|
5
|
+
export { Bar, BarChart, LineChart, PieChart, Series, Slice } from './components/chart';
|
|
6
6
|
export { Citation, FileCard, Image, Option, Question, Questions } from './components/chat';
|
|
7
7
|
export { Col, Metric, Table } from './components/data';
|
|
8
|
-
export { Checkbox, Form, Input, Select } from './components/form';
|
|
8
|
+
export { Checkbox, DateInput, Form, Input, Select } from './components/form';
|
|
9
9
|
export { Card, components, Stack } from './components/layout';
|
|
10
10
|
export { Callout, Markdown } from './components/text';
|
|
11
11
|
export { defineUiComponent } from './define';
|
|
@@ -18,7 +18,7 @@ export { prompt } from './prompt';
|
|
|
18
18
|
export { isSafeUrl } from './safe-url';
|
|
19
19
|
export { maskWidgets, splitAnswer, WIDGET_PENDING_TEXT } from './segments';
|
|
20
20
|
export type { AnswerSegment } from './segments';
|
|
21
|
-
export { isSlackWidgetLinkAction, isSlackWidgetSendAction, parseSlackWidgetAction, renderSlackAnswer } from './slack';
|
|
21
|
+
export { isSlackWidgetLinkAction, isSlackWidgetMoreAction, isSlackWidgetSendAction, isSlackWidgetSubmitAction, parseSlackWidgetAction, parseSlackWidgetSubmission, renderSlackAnswer } from './slack';
|
|
22
22
|
export type { SlackAnswer, SlackBlock, SlackRenderOptions, SlackWidgetAction } from './slack';
|
|
23
23
|
export { LIBRARY_VERSION, UI_LANG_FENCE } from './version';
|
|
24
24
|
export { formatWidgetContext } from './widget-context';
|