@kitnai/chat 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +247 -0
- package/dist/kitn-chat.es.js +29 -29
- package/dist/llms/llms-full.txt +32 -4
- package/dist/llms/llms.txt +3 -3
- package/frameworks/react/index.tsx +47 -5
- package/llms-full.txt +32 -4
- package/llms.txt +3 -3
- package/package.json +1 -1
- package/src/components/artifact.tsx +241 -82
- package/src/components/card-fallback.tsx +28 -0
- package/src/components/card-renderer.tsx +52 -0
- package/src/components/component-meta.json +169 -12
- package/src/elements/artifact.stories.tsx +214 -0
- package/src/elements/artifact.tsx +95 -30
- package/src/elements/cards.stories.tsx +54 -0
- package/src/elements/cards.tsx +91 -0
- package/src/elements/compiled.css +1 -1
- package/src/elements/element-meta.json +156 -0
- package/src/elements/element-types.d.ts +34 -0
- package/src/elements/register.ts +1 -0
- package/src/elements/resizable.d.ts +27 -0
- package/src/elements/resizable.stories.tsx +226 -1
- package/src/elements/resizable.tsx +208 -3
- package/src/index.ts +10 -0
- package/src/primitives/card-registry.tsx +58 -0
- package/src/stories/docs/generative-ui-overview.mdx +59 -0
- package/src/ui/resizable.tsx +33 -4
|
@@ -66,6 +66,96 @@
|
|
|
66
66
|
},
|
|
67
67
|
"description": "Accessible title for the preview iframe.",
|
|
68
68
|
"privacy": "public"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"kind": "field",
|
|
72
|
+
"name": "maximized",
|
|
73
|
+
"type": {
|
|
74
|
+
"text": "undefined | false | true"
|
|
75
|
+
},
|
|
76
|
+
"description": "Reflects the artifact's own maximized view-state (usually driven by the protocol).",
|
|
77
|
+
"privacy": "public"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"kind": "field",
|
|
81
|
+
"name": "expandable",
|
|
82
|
+
"type": {
|
|
83
|
+
"text": "undefined | false | true"
|
|
84
|
+
},
|
|
85
|
+
"description": "Show the expand-to-fill button (OPT-IN).",
|
|
86
|
+
"privacy": "public"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"kind": "field",
|
|
90
|
+
"name": "openInTab",
|
|
91
|
+
"type": {
|
|
92
|
+
"text": "undefined | false | true"
|
|
93
|
+
},
|
|
94
|
+
"description": "Show the open-in-new-tab button (OPT-IN).",
|
|
95
|
+
"privacy": "public"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"kind": "field",
|
|
99
|
+
"name": "noNav",
|
|
100
|
+
"type": {
|
|
101
|
+
"text": "undefined | false | true"
|
|
102
|
+
},
|
|
103
|
+
"description": "Hide back/forward.",
|
|
104
|
+
"privacy": "public"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"kind": "field",
|
|
108
|
+
"name": "noReload",
|
|
109
|
+
"type": {
|
|
110
|
+
"text": "undefined | false | true"
|
|
111
|
+
},
|
|
112
|
+
"description": "Hide reload.",
|
|
113
|
+
"privacy": "public"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"kind": "field",
|
|
117
|
+
"name": "noHome",
|
|
118
|
+
"type": {
|
|
119
|
+
"text": "undefined | false | true"
|
|
120
|
+
},
|
|
121
|
+
"description": "Hide home.",
|
|
122
|
+
"privacy": "public"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"kind": "field",
|
|
126
|
+
"name": "noPathField",
|
|
127
|
+
"type": {
|
|
128
|
+
"text": "undefined | false | true"
|
|
129
|
+
},
|
|
130
|
+
"description": "Hide the address field.",
|
|
131
|
+
"privacy": "public"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"kind": "field",
|
|
135
|
+
"name": "noTabs",
|
|
136
|
+
"type": {
|
|
137
|
+
"text": "undefined | false | true"
|
|
138
|
+
},
|
|
139
|
+
"description": "Hide the Preview|Code toggle.",
|
|
140
|
+
"privacy": "public"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"kind": "field",
|
|
144
|
+
"name": "standalone",
|
|
145
|
+
"type": {
|
|
146
|
+
"text": "undefined | false | true"
|
|
147
|
+
},
|
|
148
|
+
"description": "Standalone chrome: rounded corners + border (else square, borderless in-panel).",
|
|
149
|
+
"privacy": "public"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"kind": "field",
|
|
153
|
+
"name": "readonlyPath",
|
|
154
|
+
"type": {
|
|
155
|
+
"text": "undefined | false | true"
|
|
156
|
+
},
|
|
157
|
+
"description": "Show the address but make it read-only (visible, nav-tracking, non-editable).",
|
|
158
|
+
"privacy": "public"
|
|
69
159
|
}
|
|
70
160
|
],
|
|
71
161
|
"attributes": [
|
|
@@ -115,6 +205,86 @@
|
|
|
115
205
|
"text": "undefined | string"
|
|
116
206
|
},
|
|
117
207
|
"description": "Accessible title for the preview iframe."
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "maximized",
|
|
211
|
+
"fieldName": "maximized",
|
|
212
|
+
"type": {
|
|
213
|
+
"text": "undefined | false | true"
|
|
214
|
+
},
|
|
215
|
+
"description": "Reflects the artifact's own maximized view-state (usually driven by the protocol)."
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "expandable",
|
|
219
|
+
"fieldName": "expandable",
|
|
220
|
+
"type": {
|
|
221
|
+
"text": "undefined | false | true"
|
|
222
|
+
},
|
|
223
|
+
"description": "Show the expand-to-fill button (OPT-IN)."
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "open-in-tab",
|
|
227
|
+
"fieldName": "openInTab",
|
|
228
|
+
"type": {
|
|
229
|
+
"text": "undefined | false | true"
|
|
230
|
+
},
|
|
231
|
+
"description": "Show the open-in-new-tab button (OPT-IN)."
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "no-nav",
|
|
235
|
+
"fieldName": "noNav",
|
|
236
|
+
"type": {
|
|
237
|
+
"text": "undefined | false | true"
|
|
238
|
+
},
|
|
239
|
+
"description": "Hide back/forward."
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "no-reload",
|
|
243
|
+
"fieldName": "noReload",
|
|
244
|
+
"type": {
|
|
245
|
+
"text": "undefined | false | true"
|
|
246
|
+
},
|
|
247
|
+
"description": "Hide reload."
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "no-home",
|
|
251
|
+
"fieldName": "noHome",
|
|
252
|
+
"type": {
|
|
253
|
+
"text": "undefined | false | true"
|
|
254
|
+
},
|
|
255
|
+
"description": "Hide home."
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "no-path-field",
|
|
259
|
+
"fieldName": "noPathField",
|
|
260
|
+
"type": {
|
|
261
|
+
"text": "undefined | false | true"
|
|
262
|
+
},
|
|
263
|
+
"description": "Hide the address field."
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"name": "no-tabs",
|
|
267
|
+
"fieldName": "noTabs",
|
|
268
|
+
"type": {
|
|
269
|
+
"text": "undefined | false | true"
|
|
270
|
+
},
|
|
271
|
+
"description": "Hide the Preview|Code toggle."
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "standalone",
|
|
275
|
+
"fieldName": "standalone",
|
|
276
|
+
"type": {
|
|
277
|
+
"text": "undefined | false | true"
|
|
278
|
+
},
|
|
279
|
+
"description": "Standalone chrome: rounded corners + border (else square, borderless in-panel)."
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "readonly-path",
|
|
283
|
+
"fieldName": "readonlyPath",
|
|
284
|
+
"type": {
|
|
285
|
+
"text": "undefined | false | true"
|
|
286
|
+
},
|
|
287
|
+
"description": "Show the address but make it read-only (visible, nav-tracking, non-editable)."
|
|
118
288
|
}
|
|
119
289
|
],
|
|
120
290
|
"events": [
|
|
@@ -125,6 +295,13 @@
|
|
|
125
295
|
},
|
|
126
296
|
"description": "Fired when a file is selected. `detail.path`."
|
|
127
297
|
},
|
|
298
|
+
{
|
|
299
|
+
"name": "maximizechange",
|
|
300
|
+
"type": {
|
|
301
|
+
"text": "CustomEvent<{ maximized: false | true }>"
|
|
302
|
+
},
|
|
303
|
+
"description": "Artifact's own maximize button toggled (consumer-observable; non-bubbling)."
|
|
304
|
+
},
|
|
128
305
|
{
|
|
129
306
|
"name": "navigate",
|
|
130
307
|
"type": {
|
|
@@ -352,6 +529,53 @@
|
|
|
352
529
|
"events": [],
|
|
353
530
|
"cssProperties": []
|
|
354
531
|
},
|
|
532
|
+
{
|
|
533
|
+
"kind": "class",
|
|
534
|
+
"customElement": true,
|
|
535
|
+
"tagName": "kc-cards",
|
|
536
|
+
"name": "KcCardsElement",
|
|
537
|
+
"description": "",
|
|
538
|
+
"members": [
|
|
539
|
+
{
|
|
540
|
+
"kind": "field",
|
|
541
|
+
"name": "cards",
|
|
542
|
+
"type": {
|
|
543
|
+
"text": "undefined | { type: string; id: string; data: unknown; title?: undefined | string }[]"
|
|
544
|
+
},
|
|
545
|
+
"description": "The stream of card envelopes to render. Set as a JS PROPERTY: `el.cards = [...]`.",
|
|
546
|
+
"privacy": "public"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"kind": "field",
|
|
550
|
+
"name": "types",
|
|
551
|
+
"type": {
|
|
552
|
+
"text": "undefined | Record<string, string>"
|
|
553
|
+
},
|
|
554
|
+
"description": "Optional type→tag overrides/additions (merged over the built-ins). Property: `el.types`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type.",
|
|
555
|
+
"privacy": "public"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"kind": "field",
|
|
559
|
+
"name": "policy",
|
|
560
|
+
"type": {
|
|
561
|
+
"text": "undefined | { onSubmitData?: undefined | (cardId: string, data: unknown) => void; onAction?: undefined | (cardId: string, action: string, payload?: unknown) => void; onSendPrompt?: undefined | (text: string, opts: { mode: \"compose\" | \"send\"; context?: unknown; }) => void; onOpen?: undefined | (url: string, target: \"tab\" | \"artifact\") => void; onState?: undefined | (cardId: string, patch: unknown) => void; onDismiss?: undefined | (cardId: string) => void; onError?: undefined | (cardId: string, message: string) => void; maxSendPromptMode?: undefined | \"compose\" | \"send\" }"
|
|
562
|
+
},
|
|
563
|
+
"description": "Optional CardPolicy handling child events. Property: `el.policy`.",
|
|
564
|
+
"privacy": "public"
|
|
565
|
+
}
|
|
566
|
+
],
|
|
567
|
+
"attributes": [
|
|
568
|
+
{
|
|
569
|
+
"name": "theme",
|
|
570
|
+
"type": {
|
|
571
|
+
"text": "'light' | 'dark' | 'auto'"
|
|
572
|
+
},
|
|
573
|
+
"description": "Color mode (auto follows prefers-color-scheme)."
|
|
574
|
+
}
|
|
575
|
+
],
|
|
576
|
+
"events": [],
|
|
577
|
+
"cssProperties": []
|
|
578
|
+
},
|
|
355
579
|
{
|
|
356
580
|
"kind": "class",
|
|
357
581
|
"customElement": true,
|
|
@@ -2353,6 +2577,15 @@
|
|
|
2353
2577
|
},
|
|
2354
2578
|
"description": "Layout axis: `horizontal` (row, default) or `vertical` (column).",
|
|
2355
2579
|
"privacy": "public"
|
|
2580
|
+
},
|
|
2581
|
+
{
|
|
2582
|
+
"kind": "field",
|
|
2583
|
+
"name": "maximizedIndex",
|
|
2584
|
+
"type": {
|
|
2585
|
+
"text": "undefined | null | number"
|
|
2586
|
+
},
|
|
2587
|
+
"description": "Which item index is maximized (null = none). Declarative source of truth.",
|
|
2588
|
+
"privacy": "public"
|
|
2356
2589
|
}
|
|
2357
2590
|
],
|
|
2358
2591
|
"attributes": [
|
|
@@ -2379,6 +2612,13 @@
|
|
|
2379
2612
|
"text": "CustomEvent<{ sizes: number[] }>"
|
|
2380
2613
|
},
|
|
2381
2614
|
"description": "Fired on drag-end / keyboard resize / visibility change. `detail.sizes` = panel sizes in percent."
|
|
2615
|
+
},
|
|
2616
|
+
{
|
|
2617
|
+
"name": "maximizechange",
|
|
2618
|
+
"type": {
|
|
2619
|
+
"text": "CustomEvent<{ maximized: false | true; index: null | number }>"
|
|
2620
|
+
},
|
|
2621
|
+
"description": "Observe layout maximize state."
|
|
2382
2622
|
}
|
|
2383
2623
|
],
|
|
2384
2624
|
"cssProperties": []
|
|
@@ -2492,6 +2732,13 @@
|
|
|
2492
2732
|
"text": "CustomEvent<unknown>"
|
|
2493
2733
|
},
|
|
2494
2734
|
"description": ""
|
|
2735
|
+
},
|
|
2736
|
+
{
|
|
2737
|
+
"name": "maximizechange",
|
|
2738
|
+
"type": {
|
|
2739
|
+
"text": "CustomEvent<unknown>"
|
|
2740
|
+
},
|
|
2741
|
+
"description": ""
|
|
2495
2742
|
}
|
|
2496
2743
|
],
|
|
2497
2744
|
"cssProperties": []
|