glchat-a2ui-react-renderer 0.3.6 → 0.4.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/README.md +200 -267
- package/dist/index.d.ts +13 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/src/Provider.d.ts +33 -8
- package/dist/src/Provider.d.ts.map +1 -1
- package/dist/src/Provider.js +12 -10
- package/dist/src/SurfaceRenderer.d.ts +7 -1
- package/dist/src/SurfaceRenderer.d.ts.map +1 -1
- package/dist/src/SurfaceRenderer.js +2 -2
- package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.d.ts +1 -5
- package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.js +2 -12
- package/dist/src/components/a2ui/v0_9/Button/Button.d.ts +73 -239
- package/dist/src/components/a2ui/v0_9/Button/Button.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/Button/Button.js +2 -13
- package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.d.ts +1 -8
- package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.js +2 -51
- package/dist/src/components/a2ui/v0_9/TagInput/TagInput.d.ts +40 -196
- package/dist/src/components/a2ui/v0_9/TagInput/TagInput.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/TagInput/TagInput.js +3 -10
- package/dist/src/components/a2ui/v0_9/Timeout/Timeout.d.ts +24 -100
- package/dist/src/components/a2ui/v0_9/Timeout/Timeout.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/Timeout/Timeout.js +3 -23
- package/dist/src/components/a2ui/v0_9/common.d.ts +11 -57
- package/dist/src/components/a2ui/v0_9/common.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/common.js +0 -9
- package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.d.ts +3 -0
- package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.js +6 -0
- package/dist/src/components/a2ui/v1_0/Button/Button.d.ts +223 -0
- package/dist/src/components/a2ui/v1_0/Button/Button.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/Button/Button.js +26 -0
- package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.d.ts +3 -0
- package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.js +6 -0
- package/dist/src/components/a2ui/v1_0/TagInput/TagInput.d.ts +214 -0
- package/dist/src/components/a2ui/v1_0/TagInput/TagInput.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/TagInput/TagInput.js +34 -0
- package/dist/src/components/a2ui/v1_0/Timeout/Timeout.d.ts +58 -0
- package/dist/src/components/a2ui/v1_0/Timeout/Timeout.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/Timeout/Timeout.js +25 -0
- package/dist/src/components/a2ui/v1_0/common.d.ts +15 -0
- package/dist/src/components/a2ui/v1_0/common.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/common.js +16 -0
- package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.d.ts +14 -0
- package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.js +10 -0
- package/dist/src/components/a2ui/views/Button/Button.d.ts +18 -0
- package/dist/src/components/a2ui/views/Button/Button.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/Button/Button.js +22 -0
- package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.d.ts +25 -0
- package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.js +46 -0
- package/dist/src/components/a2ui/views/ChoicePicker/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/TagInput/TagInput.d.ts +16 -0
- package/dist/src/components/a2ui/views/TagInput/TagInput.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/TagInput/TagInput.js +12 -0
- package/dist/src/components/a2ui/views/Timeout/Timeout.d.ts +9 -0
- package/dist/src/components/a2ui/views/Timeout/Timeout.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/Timeout/Timeout.js +27 -0
- package/dist/src/components/a2ui/views/weight.d.ts +7 -0
- package/dist/src/components/a2ui/views/weight.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/weight.js +9 -0
- package/dist/src/core/SurfaceErrorBoundary.d.ts +27 -0
- package/dist/src/core/SurfaceErrorBoundary.d.ts.map +1 -0
- package/dist/src/core/SurfaceErrorBoundary.js +24 -0
- package/dist/src/core/SurfaceGroupProvider.d.ts +38 -0
- package/dist/src/core/SurfaceGroupProvider.d.ts.map +1 -0
- package/dist/src/core/SurfaceGroupProvider.js +142 -0
- package/dist/src/core/SurfaceRenderer.d.ts +4 -0
- package/dist/src/core/SurfaceRenderer.d.ts.map +1 -0
- package/dist/src/core/SurfaceRenderer.js +64 -0
- package/dist/src/core/errors.d.ts +44 -0
- package/dist/src/core/errors.d.ts.map +1 -0
- package/dist/src/core/errors.js +42 -0
- package/dist/src/core/types.d.ts +11 -0
- package/dist/src/core/types.d.ts.map +1 -0
- package/dist/src/core/types.js +1 -0
- package/dist/src/core/unknownComponent.d.ts +28 -0
- package/dist/src/core/unknownComponent.d.ts.map +1 -0
- package/dist/src/core/unknownComponent.js +41 -0
- package/dist/src/{v0_9 → core}/useSurfaces.d.ts +3 -3
- package/dist/src/core/useSurfaces.d.ts.map +1 -0
- package/dist/src/utils/detectVersion.d.ts +1 -1
- package/dist/src/utils/detectVersion.d.ts.map +1 -1
- package/dist/src/utils/detectVersion.js +5 -1
- package/dist/src/v0_8/Provider.d.ts +2 -1
- package/dist/src/v0_8/Provider.d.ts.map +1 -1
- package/dist/src/v0_8/Provider.js +3 -8
- package/dist/src/v0_9/Provider.d.ts +13 -13
- package/dist/src/v0_9/Provider.d.ts.map +1 -1
- package/dist/src/v0_9/Provider.js +14 -61
- package/dist/src/v0_9/catalog.d.ts +2 -8
- package/dist/src/v0_9/catalog.d.ts.map +1 -1
- package/dist/src/v0_9/catalog.js +3 -17
- package/dist/src/v1_0/Provider.d.ts +27 -0
- package/dist/src/v1_0/Provider.d.ts.map +1 -0
- package/dist/src/v1_0/Provider.js +35 -0
- package/dist/src/v1_0/catalog.d.ts +52 -0
- package/dist/src/v1_0/catalog.d.ts.map +1 -0
- package/dist/src/v1_0/catalog.js +118 -0
- package/dist/src/v1_0/types.d.ts +13 -0
- package/dist/src/v1_0/types.d.ts.map +1 -0
- package/dist/src/v1_0/types.js +1 -0
- package/json/README.md +27 -30
- package/json/v0_9/glchat_standard_catalog_definition.json +5 -5
- package/json/v1_0/a2ui-sample-messages-extension.json +150 -0
- package/json/v1_0/a2ui-sample-messages.json +144 -0
- package/json/v1_0/glchat_extension_catalog_definition.json +794 -0
- package/json/v1_0/glchat_standard_catalog_definition.json +1487 -0
- package/package.json +4 -4
- package/styles/globals.css +136 -67
- package/dist/src/components/a2ui/v0_9/ChoicePicker/theme.d.ts.map +0 -1
- package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.d.ts +0 -231
- package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.d.ts.map +0 -1
- package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.js +0 -24
- package/dist/src/v0_9/SurfaceErrorBoundary.d.ts +0 -18
- package/dist/src/v0_9/SurfaceErrorBoundary.d.ts.map +0 -1
- package/dist/src/v0_9/SurfaceErrorBoundary.js +0 -24
- package/dist/src/v0_9/SurfaceRenderer.d.ts +0 -3
- package/dist/src/v0_9/SurfaceRenderer.d.ts.map +0 -1
- package/dist/src/v0_9/SurfaceRenderer.js +0 -47
- package/dist/src/v0_9/useSurfaces.d.ts.map +0 -1
- /package/dist/src/components/a2ui/{v0_9 → views}/ChoicePicker/theme.d.ts +0 -0
- /package/dist/src/components/a2ui/{v0_9 → views}/ChoicePicker/theme.js +0 -0
- /package/dist/src/{v0_9 → core}/useSurfaces.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glchat-a2ui-react-renderer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A2UI (Agent-to-UI) React renderer for GLChat — render declarative UI from AI agent messages",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "GDP Labs",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"react": ">=18.0.0"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@a2ui/markdown-it": "^0.
|
|
58
|
-
"@a2ui/react": "^0.
|
|
59
|
-
"@a2ui/web_core": "^0.
|
|
57
|
+
"@a2ui/markdown-it": "^0.2.2",
|
|
58
|
+
"@a2ui/react": "^0.15.0",
|
|
59
|
+
"@a2ui/web_core": "^0.15.0",
|
|
60
60
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
61
61
|
"@radix-ui/react-label": "^2.1.8",
|
|
62
62
|
"@radix-ui/react-popover": "^1.1.15",
|
package/styles/globals.css
CHANGED
|
@@ -135,6 +135,14 @@
|
|
|
135
135
|
--font-family-mono: var(--a2ui-font-family-monospace);
|
|
136
136
|
--default-font-family-mono: var(--a2ui-font-family-monospace);
|
|
137
137
|
|
|
138
|
+
/*
|
|
139
|
+
* Base colors (v0.9 Lit basic catalog). Upstream defaults use light-dark(),
|
|
140
|
+
* which follows `color-scheme`, not GLChat's `.dark` class.
|
|
141
|
+
*/
|
|
142
|
+
--a2ui-color-background: hsl(var(--background));
|
|
143
|
+
--a2ui-color-on-background: hsl(var(--foreground));
|
|
144
|
+
--a2ui-text-caption-color: hsl(var(--muted-foreground));
|
|
145
|
+
|
|
138
146
|
/** Card */
|
|
139
147
|
--a2ui-card-background: hsl(var(--card));
|
|
140
148
|
--a2ui-color-surface: hsl(var(--card));
|
|
@@ -186,6 +194,25 @@
|
|
|
186
194
|
--a2ui-datetimeinput-label-font-size: 0.875rem;
|
|
187
195
|
--a2ui-datetimeinput-label-font-weight: 600;
|
|
188
196
|
|
|
197
|
+
/* List — v0.9 Lit adds an inline-start indent; keep items flush (as in 0.12) */
|
|
198
|
+
--a2ui-list-padding: 0;
|
|
199
|
+
|
|
200
|
+
/* Icon — sans-serif fallback while the icon font loads / if it is absent */
|
|
201
|
+
--a2ui-icon-font-family: 'Material Symbols Outlined', 'Material Icons', sans-serif;
|
|
202
|
+
|
|
203
|
+
/*
|
|
204
|
+
* Slider — GLChat primary. v0.9 Lit basics apply `createSurface.theme.primaryColor`
|
|
205
|
+
* as an inline `--a2ui-color-primary`; 0.12 ignored it (and v1.0 drops `theme`).
|
|
206
|
+
*/
|
|
207
|
+
--a2ui-slider-thumb-color: hsl(var(--primary));
|
|
208
|
+
|
|
209
|
+
/* Tabs — 0.12 look: subtle border, grey active tab, padded content */
|
|
210
|
+
--a2ui-tabs-border: 1px solid hsl(var(--border));
|
|
211
|
+
--a2ui-tabs-header-color: hsl(var(--card-foreground));
|
|
212
|
+
--a2ui-tabs-header-background-active: hsl(var(--secondary));
|
|
213
|
+
--a2ui-tabs-header-color-active: hsl(var(--secondary-foreground));
|
|
214
|
+
--a2ui-tabs-content-padding: 0 0.5rem;
|
|
215
|
+
|
|
189
216
|
/* Checkbox */
|
|
190
217
|
--a2ui-checkbox-size: 1rem;
|
|
191
218
|
--a2ui-checkbox-background: hsl(var(--background));
|
|
@@ -236,9 +263,69 @@
|
|
|
236
263
|
color: var(--a2ui-text-caption-color, hsl(var(--muted-foreground)));
|
|
237
264
|
}
|
|
238
265
|
|
|
239
|
-
/* Card */
|
|
266
|
+
/* Card — v0.9 `.a2ui-card` is the padded, bordered box itself */
|
|
240
267
|
.a2ui-surface .a2ui-card {
|
|
241
268
|
width: 100%;
|
|
269
|
+
box-sizing: border-box;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/*
|
|
273
|
+
* v0.9 Lit basic components — keep the 0.12 (React basic catalog) look.
|
|
274
|
+
* Upstream adopts tag-scoped rules after page styles, so these use the
|
|
275
|
+
* `.a2ui-surface` prefix for higher specificity.
|
|
276
|
+
*/
|
|
277
|
+
|
|
278
|
+
/*
|
|
279
|
+
* Image — fill the available width (0.12 stretched the <img> as a flex item).
|
|
280
|
+
* Scoped to the v0.9 Lit element: v0.8 also emits `.a2ui-image` with its own variants.
|
|
281
|
+
*/
|
|
282
|
+
.a2ui-surface a2ui-image > .a2ui-image:not(.a2ui-image-icon, .a2ui-image-avatar, .a2ui-image-smallFeature) {
|
|
283
|
+
width: 100%;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/* Icon — centered within its slot, as 0.12's inline-flex icon */
|
|
287
|
+
.a2ui-surface a2ui-icon {
|
|
288
|
+
display: inline-flex;
|
|
289
|
+
align-items: center;
|
|
290
|
+
justify-content: center;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/*
|
|
294
|
+
* The icon box is 24px but the Material Symbols line box is ~26px, so a host
|
|
295
|
+
* `overflow: auto` (e.g. on `.material-icons`) would draw a scrollbar inside it.
|
|
296
|
+
*/
|
|
297
|
+
.a2ui-surface a2ui-icon > .a2ui-icon {
|
|
298
|
+
overflow: hidden;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/* Tabs — grey pill on the active tab instead of a primary underline */
|
|
302
|
+
.a2ui-surface .a2ui-tab-bar {
|
|
303
|
+
gap: 0.25rem;
|
|
304
|
+
margin-bottom: 0.5rem;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.a2ui-surface .a2ui-tab-button {
|
|
308
|
+
padding: 0.5rem 1rem;
|
|
309
|
+
border: none;
|
|
310
|
+
margin-bottom: 0;
|
|
311
|
+
border-radius: var(--radius-sm) var(--radius-sm) 0 0;
|
|
312
|
+
font-weight: 400;
|
|
313
|
+
font-family: inherit;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.a2ui-surface .a2ui-tab-button.a2ui-tab-button-active {
|
|
317
|
+
border-bottom: none;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* Slider — width within its margin; small caption-style value as in 0.12 */
|
|
321
|
+
.a2ui-surface .a2ui-slider-container {
|
|
322
|
+
width: auto;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.a2ui-surface .a2ui-slider-value {
|
|
326
|
+
font-size: var(--a2ui-font-size-xs);
|
|
327
|
+
font-weight: 400;
|
|
328
|
+
color: var(--a2ui-text-caption-color);
|
|
242
329
|
}
|
|
243
330
|
|
|
244
331
|
/* AudioPlayer — custom progress range thumbs (pseudo-elements need CSS) */
|
|
@@ -270,19 +357,25 @@
|
|
|
270
357
|
width: fit-content;
|
|
271
358
|
}
|
|
272
359
|
|
|
273
|
-
/* Modal panel — v0.9
|
|
274
|
-
.a2ui-surface .a2ui-modal-
|
|
360
|
+
/* Modal panel — v0.9 `.a2ui-modal-content` (Lit); v0.8 dialog body */
|
|
361
|
+
.a2ui-surface .a2ui-modal-content,
|
|
275
362
|
.a2ui-surface .a2ui-modal dialog > section {
|
|
276
363
|
min-width: min(var(--a2ui-modal-min-width), 100%);
|
|
277
364
|
box-sizing: border-box;
|
|
278
365
|
}
|
|
279
366
|
|
|
280
367
|
/*
|
|
281
|
-
* Vertical Divider (v0.9): upstream
|
|
282
|
-
* in content-sized Rows
|
|
368
|
+
* Vertical Divider (v0.9): upstream renders `a2ui-divider > hr.a2ui-divider.a2ui-divider-vertical`
|
|
369
|
+
* with `height: 100%`, which collapses to 0 in content-sized Rows (the host is an
|
|
370
|
+
* inline custom element). Stretch the host and the rule to the Row's height instead.
|
|
283
371
|
*/
|
|
284
|
-
.a2ui-surface
|
|
285
|
-
|
|
372
|
+
.a2ui-surface a2ui-divider:has(> .a2ui-divider.a2ui-divider-vertical) {
|
|
373
|
+
display: flex;
|
|
374
|
+
align-self: stretch;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.a2ui-surface .a2ui-divider.a2ui-divider-vertical {
|
|
378
|
+
height: auto;
|
|
286
379
|
align-self: stretch;
|
|
287
380
|
}
|
|
288
381
|
|
|
@@ -296,6 +389,11 @@
|
|
|
296
389
|
font-weight: 600 !important;
|
|
297
390
|
}
|
|
298
391
|
|
|
392
|
+
/* v0.9 Lit Text sets its own color; the button label must follow the variant color. */
|
|
393
|
+
.a2ui-surface .a2ui-button > button.glchat-a2ui-button .a2ui-text {
|
|
394
|
+
color: inherit;
|
|
395
|
+
}
|
|
396
|
+
|
|
299
397
|
.a2ui-surface .a2ui-button > button.glchat-a2ui-button:hover {
|
|
300
398
|
background-image: var(--glchat-button-bg-hover) !important;
|
|
301
399
|
border-color: var(--glchat-button-border-hover) !important;
|
|
@@ -323,16 +421,15 @@
|
|
|
323
421
|
|
|
324
422
|
/*
|
|
325
423
|
* TextField / DateTimeInput / inputs
|
|
326
|
-
* - v0.9
|
|
424
|
+
* - v0.9 (@a2ui/web_core >= 0.13 Lit elements, light DOM):
|
|
425
|
+
* - TextField: `a2ui-basic-textfield > label + input|textarea.a2ui-textfield + .error`
|
|
426
|
+
* - DateTimeInput: `.a2ui-date-time-container > .a2ui-date-time-label + .a2ui-date-time-inputs > input.a2ui-date-time-input`
|
|
427
|
+
* Upstream adopts tag-scoped rules (e.g. `a2ui-basic-textfield .a2ui-textfield`, 0-1-1)
|
|
428
|
+
* after page styles, so these overrides need higher specificity (`.a2ui-surface` prefix).
|
|
327
429
|
* - v0.8: upstream hosts are `div.a2ui-textfield|a2ui-datetime-input > section > …`.
|
|
328
430
|
*/
|
|
329
|
-
.a2ui-surface
|
|
330
|
-
.a2ui-surface
|
|
331
|
-
.a2ui-surface div:has(> input[type='password']),
|
|
332
|
-
.a2ui-surface div:has(> textarea),
|
|
333
|
-
.a2ui-surface div:has(> input[type='date']),
|
|
334
|
-
.a2ui-surface div:has(> input[type='time']),
|
|
335
|
-
.a2ui-surface div:has(> input[type='datetime-local']),
|
|
431
|
+
.a2ui-surface a2ui-basic-textfield,
|
|
432
|
+
.a2ui-surface .a2ui-date-time-container,
|
|
336
433
|
.a2ui-surface div:has(> input[type='range']),
|
|
337
434
|
.a2ui-textfield > section,
|
|
338
435
|
.a2ui-datetime-input > section {
|
|
@@ -343,13 +440,8 @@
|
|
|
343
440
|
box-sizing: border-box;
|
|
344
441
|
}
|
|
345
442
|
|
|
346
|
-
.a2ui-surface
|
|
347
|
-
.a2ui-surface
|
|
348
|
-
.a2ui-surface div:has(> input[type='password']) > label,
|
|
349
|
-
.a2ui-surface div:has(> textarea) > label,
|
|
350
|
-
.a2ui-surface div:has(> input[type='date']) > label,
|
|
351
|
-
.a2ui-surface div:has(> input[type='time']) > label,
|
|
352
|
-
.a2ui-surface div:has(> input[type='datetime-local']) > label,
|
|
443
|
+
.a2ui-surface a2ui-basic-textfield > label,
|
|
444
|
+
.a2ui-surface .a2ui-date-time-label,
|
|
353
445
|
.a2ui-textfield label,
|
|
354
446
|
.a2ui-datetime-input label {
|
|
355
447
|
font-size: 0.875rem;
|
|
@@ -358,13 +450,8 @@
|
|
|
358
450
|
margin: 0;
|
|
359
451
|
}
|
|
360
452
|
|
|
361
|
-
.a2ui-surface
|
|
362
|
-
.a2ui-surface
|
|
363
|
-
.a2ui-surface div:has(> input[type='password']) > input,
|
|
364
|
-
.a2ui-surface div:has(> textarea) > textarea,
|
|
365
|
-
.a2ui-surface div:has(> input[type='date']) > input,
|
|
366
|
-
.a2ui-surface div:has(> input[type='time']) > input,
|
|
367
|
-
.a2ui-surface div:has(> input[type='datetime-local']) > input,
|
|
453
|
+
.a2ui-surface a2ui-basic-textfield > .a2ui-textfield,
|
|
454
|
+
.a2ui-surface .a2ui-date-time-input,
|
|
368
455
|
.a2ui-textfield input,
|
|
369
456
|
.a2ui-textfield textarea,
|
|
370
457
|
.a2ui-datetime-input input {
|
|
@@ -381,14 +468,12 @@
|
|
|
381
468
|
caret-color: currentColor;
|
|
382
469
|
}
|
|
383
470
|
|
|
384
|
-
.a2ui-surface
|
|
385
|
-
.a2ui-surface div:has(> input[type='time']) > input,
|
|
386
|
-
.a2ui-surface div:has(> input[type='datetime-local']) > input,
|
|
471
|
+
.a2ui-surface .a2ui-date-time-input,
|
|
387
472
|
.a2ui-datetime-input input {
|
|
388
473
|
height: 2.5rem;
|
|
389
474
|
}
|
|
390
475
|
|
|
391
|
-
.a2ui-surface
|
|
476
|
+
.a2ui-surface a2ui-basic-textfield > textarea.a2ui-textfield,
|
|
392
477
|
.a2ui-textfield textarea {
|
|
393
478
|
min-height: 80px;
|
|
394
479
|
height: auto;
|
|
@@ -397,20 +482,10 @@
|
|
|
397
482
|
overflow-wrap: break-word;
|
|
398
483
|
}
|
|
399
484
|
|
|
400
|
-
.a2ui-surface
|
|
401
|
-
.a2ui-surface
|
|
402
|
-
.a2ui-surface
|
|
403
|
-
.a2ui-surface
|
|
404
|
-
.a2ui-surface div:has(> input[type='password']) > input:focus,
|
|
405
|
-
.a2ui-surface div:has(> input[type='password']) > input:focus-visible,
|
|
406
|
-
.a2ui-surface div:has(> textarea) > textarea:focus,
|
|
407
|
-
.a2ui-surface div:has(> textarea) > textarea:focus-visible,
|
|
408
|
-
.a2ui-surface div:has(> input[type='date']) > input:focus,
|
|
409
|
-
.a2ui-surface div:has(> input[type='date']) > input:focus-visible,
|
|
410
|
-
.a2ui-surface div:has(> input[type='time']) > input:focus,
|
|
411
|
-
.a2ui-surface div:has(> input[type='time']) > input:focus-visible,
|
|
412
|
-
.a2ui-surface div:has(> input[type='datetime-local']) > input:focus,
|
|
413
|
-
.a2ui-surface div:has(> input[type='datetime-local']) > input:focus-visible,
|
|
485
|
+
.a2ui-surface a2ui-basic-textfield > .a2ui-textfield:focus,
|
|
486
|
+
.a2ui-surface a2ui-basic-textfield > .a2ui-textfield:focus-visible,
|
|
487
|
+
.a2ui-surface .a2ui-date-time-input:focus,
|
|
488
|
+
.a2ui-surface .a2ui-date-time-input:focus-visible,
|
|
414
489
|
.a2ui-textfield input:focus,
|
|
415
490
|
.a2ui-textfield input:focus-visible,
|
|
416
491
|
.a2ui-textfield textarea:focus,
|
|
@@ -421,13 +496,8 @@
|
|
|
421
496
|
outline: none !important;
|
|
422
497
|
}
|
|
423
498
|
|
|
424
|
-
.a2ui-surface
|
|
425
|
-
.a2ui-surface
|
|
426
|
-
.a2ui-surface div:has(> input[type='password']) > input:disabled,
|
|
427
|
-
.a2ui-surface div:has(> textarea) > textarea:disabled,
|
|
428
|
-
.a2ui-surface div:has(> input[type='date']) > input:disabled,
|
|
429
|
-
.a2ui-surface div:has(> input[type='time']) > input:disabled,
|
|
430
|
-
.a2ui-surface div:has(> input[type='datetime-local']) > input:disabled,
|
|
499
|
+
.a2ui-surface a2ui-basic-textfield > .a2ui-textfield:disabled,
|
|
500
|
+
.a2ui-surface .a2ui-date-time-input:disabled,
|
|
431
501
|
.a2ui-textfield input:disabled,
|
|
432
502
|
.a2ui-textfield textarea:disabled,
|
|
433
503
|
.a2ui-datetime-input input:disabled {
|
|
@@ -435,26 +505,19 @@
|
|
|
435
505
|
opacity: 0.5 !important;
|
|
436
506
|
}
|
|
437
507
|
|
|
438
|
-
.a2ui-surface
|
|
439
|
-
.a2ui-surface div:has(> input[type='number']) > input::placeholder,
|
|
440
|
-
.a2ui-surface div:has(> input[type='password']) > input::placeholder,
|
|
441
|
-
.a2ui-surface div:has(> textarea) > textarea::placeholder,
|
|
508
|
+
.a2ui-surface a2ui-basic-textfield > .a2ui-textfield::placeholder,
|
|
442
509
|
.a2ui-textfield input::placeholder,
|
|
443
510
|
.a2ui-textfield textarea::placeholder {
|
|
444
511
|
color: hsl(var(--foreground) / 0.5);
|
|
445
512
|
}
|
|
446
513
|
|
|
447
|
-
|
|
448
|
-
.a2ui-surface
|
|
449
|
-
.a2ui-surface div:has(> input[type='password']) > input:has(+ span),
|
|
450
|
-
.a2ui-surface div:has(> textarea) > textarea:has(+ span) {
|
|
514
|
+
/* Invalid (checks failed): after :focus so the error border wins while focused. */
|
|
515
|
+
.a2ui-surface a2ui-basic-textfield > .a2ui-textfield.a2ui-invalid {
|
|
451
516
|
border-color: hsl(var(--destructive)) !important;
|
|
452
517
|
}
|
|
453
518
|
|
|
454
|
-
.a2ui-surface
|
|
455
|
-
.a2ui-surface
|
|
456
|
-
.a2ui-surface div:has(> input[type='password']) > span,
|
|
457
|
-
.a2ui-surface div:has(> textarea) > span {
|
|
519
|
+
.a2ui-surface a2ui-basic-textfield > .a2ui-error-message,
|
|
520
|
+
.a2ui-surface .a2ui-date-time-container > .a2ui-error-message {
|
|
458
521
|
font-size: 0.75rem;
|
|
459
522
|
line-height: 1.25rem;
|
|
460
523
|
color: hsl(var(--destructive));
|
|
@@ -528,7 +591,12 @@
|
|
|
528
591
|
outline: none !important;
|
|
529
592
|
}
|
|
530
593
|
|
|
531
|
-
/*
|
|
594
|
+
/*
|
|
595
|
+
* Checkbox — shared look for native input and Radix `.glchat-a2ui-checkbox`.
|
|
596
|
+
* v0.9 (Lit): `a2ui-checkbox > .container > label.a2ui-checkbox > input + .a2ui-check-box-text`.
|
|
597
|
+
* v0.8: `.a2ui-checkbox > section > input + label`.
|
|
598
|
+
*/
|
|
599
|
+
.a2ui-surface label.a2ui-checkbox,
|
|
532
600
|
.a2ui-surface .a2ui-checkbox > section,
|
|
533
601
|
.a2ui-surface .glchat-a2ui-checkbox-option {
|
|
534
602
|
display: inline-flex;
|
|
@@ -536,6 +604,7 @@
|
|
|
536
604
|
gap: var(--a2ui-checkbox-gap);
|
|
537
605
|
}
|
|
538
606
|
|
|
607
|
+
.a2ui-surface label.a2ui-checkbox,
|
|
539
608
|
.a2ui-surface .a2ui-checkbox label,
|
|
540
609
|
.a2ui-surface .glchat-a2ui-checkbox-option {
|
|
541
610
|
font-size: var(--a2ui-checkbox-label-font-size);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v0_9/ChoicePicker/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,2BAA2B,EAAE,aAKzC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,aAIrC,CAAC"}
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Fallback API used when a message references a component type that is not
|
|
4
|
-
* registered in the active catalog. Properties are accepted but ignored.
|
|
5
|
-
*/
|
|
6
|
-
export declare const UnknownComponentApi: {
|
|
7
|
-
name: string;
|
|
8
|
-
schema: z.ZodObject<{
|
|
9
|
-
accessibility: z.ZodOptional<z.ZodObject<{
|
|
10
|
-
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
11
|
-
path: z.ZodString;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
path: string;
|
|
14
|
-
}, {
|
|
15
|
-
path: string;
|
|
16
|
-
}>, z.ZodObject<{
|
|
17
|
-
call: z.ZodString;
|
|
18
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
19
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
call: string;
|
|
22
|
-
args: Record<string, any>;
|
|
23
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
24
|
-
}, {
|
|
25
|
-
call: string;
|
|
26
|
-
args: Record<string, any>;
|
|
27
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
28
|
-
}>]>>;
|
|
29
|
-
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
30
|
-
path: z.ZodString;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
path: string;
|
|
33
|
-
}, {
|
|
34
|
-
path: string;
|
|
35
|
-
}>, z.ZodObject<{
|
|
36
|
-
call: z.ZodString;
|
|
37
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
38
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
call: string;
|
|
41
|
-
args: Record<string, any>;
|
|
42
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
43
|
-
}, {
|
|
44
|
-
call: string;
|
|
45
|
-
args: Record<string, any>;
|
|
46
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
47
|
-
}>]>>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
description?: string | {
|
|
50
|
-
path: string;
|
|
51
|
-
} | {
|
|
52
|
-
call: string;
|
|
53
|
-
args: Record<string, any>;
|
|
54
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
55
|
-
} | undefined;
|
|
56
|
-
label?: string | {
|
|
57
|
-
path: string;
|
|
58
|
-
} | {
|
|
59
|
-
call: string;
|
|
60
|
-
args: Record<string, any>;
|
|
61
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
62
|
-
} | undefined;
|
|
63
|
-
}, {
|
|
64
|
-
description?: string | {
|
|
65
|
-
path: string;
|
|
66
|
-
} | {
|
|
67
|
-
call: string;
|
|
68
|
-
args: Record<string, any>;
|
|
69
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
70
|
-
} | undefined;
|
|
71
|
-
label?: string | {
|
|
72
|
-
path: string;
|
|
73
|
-
} | {
|
|
74
|
-
call: string;
|
|
75
|
-
args: Record<string, any>;
|
|
76
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
77
|
-
} | undefined;
|
|
78
|
-
}>>;
|
|
79
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
80
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
81
|
-
accessibility: z.ZodOptional<z.ZodObject<{
|
|
82
|
-
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
83
|
-
path: z.ZodString;
|
|
84
|
-
}, "strip", z.ZodTypeAny, {
|
|
85
|
-
path: string;
|
|
86
|
-
}, {
|
|
87
|
-
path: string;
|
|
88
|
-
}>, z.ZodObject<{
|
|
89
|
-
call: z.ZodString;
|
|
90
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
91
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
call: string;
|
|
94
|
-
args: Record<string, any>;
|
|
95
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
96
|
-
}, {
|
|
97
|
-
call: string;
|
|
98
|
-
args: Record<string, any>;
|
|
99
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
100
|
-
}>]>>;
|
|
101
|
-
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
102
|
-
path: z.ZodString;
|
|
103
|
-
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
path: string;
|
|
105
|
-
}, {
|
|
106
|
-
path: string;
|
|
107
|
-
}>, z.ZodObject<{
|
|
108
|
-
call: z.ZodString;
|
|
109
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
110
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
111
|
-
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
call: string;
|
|
113
|
-
args: Record<string, any>;
|
|
114
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
115
|
-
}, {
|
|
116
|
-
call: string;
|
|
117
|
-
args: Record<string, any>;
|
|
118
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
119
|
-
}>]>>;
|
|
120
|
-
}, "strip", z.ZodTypeAny, {
|
|
121
|
-
description?: string | {
|
|
122
|
-
path: string;
|
|
123
|
-
} | {
|
|
124
|
-
call: string;
|
|
125
|
-
args: Record<string, any>;
|
|
126
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
127
|
-
} | undefined;
|
|
128
|
-
label?: string | {
|
|
129
|
-
path: string;
|
|
130
|
-
} | {
|
|
131
|
-
call: string;
|
|
132
|
-
args: Record<string, any>;
|
|
133
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
134
|
-
} | undefined;
|
|
135
|
-
}, {
|
|
136
|
-
description?: string | {
|
|
137
|
-
path: string;
|
|
138
|
-
} | {
|
|
139
|
-
call: string;
|
|
140
|
-
args: Record<string, any>;
|
|
141
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
142
|
-
} | undefined;
|
|
143
|
-
label?: string | {
|
|
144
|
-
path: string;
|
|
145
|
-
} | {
|
|
146
|
-
call: string;
|
|
147
|
-
args: Record<string, any>;
|
|
148
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
149
|
-
} | undefined;
|
|
150
|
-
}>>;
|
|
151
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
152
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
153
|
-
accessibility: z.ZodOptional<z.ZodObject<{
|
|
154
|
-
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
155
|
-
path: z.ZodString;
|
|
156
|
-
}, "strip", z.ZodTypeAny, {
|
|
157
|
-
path: string;
|
|
158
|
-
}, {
|
|
159
|
-
path: string;
|
|
160
|
-
}>, z.ZodObject<{
|
|
161
|
-
call: z.ZodString;
|
|
162
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
163
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
164
|
-
}, "strip", z.ZodTypeAny, {
|
|
165
|
-
call: string;
|
|
166
|
-
args: Record<string, any>;
|
|
167
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
168
|
-
}, {
|
|
169
|
-
call: string;
|
|
170
|
-
args: Record<string, any>;
|
|
171
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
172
|
-
}>]>>;
|
|
173
|
-
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
174
|
-
path: z.ZodString;
|
|
175
|
-
}, "strip", z.ZodTypeAny, {
|
|
176
|
-
path: string;
|
|
177
|
-
}, {
|
|
178
|
-
path: string;
|
|
179
|
-
}>, z.ZodObject<{
|
|
180
|
-
call: z.ZodString;
|
|
181
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
182
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
183
|
-
}, "strip", z.ZodTypeAny, {
|
|
184
|
-
call: string;
|
|
185
|
-
args: Record<string, any>;
|
|
186
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
187
|
-
}, {
|
|
188
|
-
call: string;
|
|
189
|
-
args: Record<string, any>;
|
|
190
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
191
|
-
}>]>>;
|
|
192
|
-
}, "strip", z.ZodTypeAny, {
|
|
193
|
-
description?: string | {
|
|
194
|
-
path: string;
|
|
195
|
-
} | {
|
|
196
|
-
call: string;
|
|
197
|
-
args: Record<string, any>;
|
|
198
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
199
|
-
} | undefined;
|
|
200
|
-
label?: string | {
|
|
201
|
-
path: string;
|
|
202
|
-
} | {
|
|
203
|
-
call: string;
|
|
204
|
-
args: Record<string, any>;
|
|
205
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
206
|
-
} | undefined;
|
|
207
|
-
}, {
|
|
208
|
-
description?: string | {
|
|
209
|
-
path: string;
|
|
210
|
-
} | {
|
|
211
|
-
call: string;
|
|
212
|
-
args: Record<string, any>;
|
|
213
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
214
|
-
} | undefined;
|
|
215
|
-
label?: string | {
|
|
216
|
-
path: string;
|
|
217
|
-
} | {
|
|
218
|
-
call: string;
|
|
219
|
-
args: Record<string, any>;
|
|
220
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
221
|
-
} | undefined;
|
|
222
|
-
}>>;
|
|
223
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
224
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
225
|
-
};
|
|
226
|
-
/**
|
|
227
|
-
* Renders a warning alert for unknown component types.
|
|
228
|
-
* Wired into catalogs via `installUnknownComponentFallback`.
|
|
229
|
-
*/
|
|
230
|
-
export declare const UnknownComponentFallback: import("@a2ui/react/v0_9").ReactComponentImplementation;
|
|
231
|
-
//# sourceMappingURL=UnknownComponent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UnknownComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;0BAsBqqZ,CAAC;;;;;;;;;;;;;;;;;;;0BAAivB,CAAC;;;;;;;;;;;;;;;;;;;;;;;0BAA2sB,CAAC;;;;;;;0BAA0O,CAAC;;;;;;;;;;;;;;;;;;;;;;;0BAA1qD,CAAC;;;;;;;;;;;;;;;;;;;0BAAivB,CAAC;;;;;;;;;;;;;;;;;;;;;;;0BAA2sB,CAAC;;;;;;;0BAA0O,CAAC;;;;;;;;;;;;;;;;;;;;;;;0BAA1qD,CAAC;;;;;;;;;;;;;;;;;;;0BAAivB,CAAC;;;;;;;;;;;;;;;;;;;;;;;0BAA2sB,CAAC;;;;;;;0BAA0O,CAAC;;;;;CAd92c,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,yDAOpC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createBinderlessComponentImplementation } from '@a2ui/react/v0_9';
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
import { InlineAlert } from '../../../../components/ui/InlineAlert/InlineAlert.js';
|
|
6
|
-
import { CommonProps } from '../common.js';
|
|
7
|
-
/**
|
|
8
|
-
* Fallback API used when a message references a component type that is not
|
|
9
|
-
* registered in the active catalog. Properties are accepted but ignored.
|
|
10
|
-
*/
|
|
11
|
-
export const UnknownComponentApi = {
|
|
12
|
-
name: '__UnknownComponent__',
|
|
13
|
-
schema: z
|
|
14
|
-
.object({
|
|
15
|
-
...CommonProps,
|
|
16
|
-
})
|
|
17
|
-
.passthrough()
|
|
18
|
-
.describe('Placeholder for an unsupported or unregistered A2UI component.'),
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Renders a warning alert for unknown component types.
|
|
22
|
-
* Wired into catalogs via `installUnknownComponentFallback`.
|
|
23
|
-
*/
|
|
24
|
-
export const UnknownComponentFallback = createBinderlessComponentImplementation(UnknownComponentApi, ({ context }) => (_jsx(InlineAlert, { role: "status", variant: "warning", children: `Unknown A2UI component: ${context.componentModel.type}` })));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Component, type ErrorInfo, type ReactNode } from 'react';
|
|
2
|
-
type SurfaceErrorBoundaryProps = Readonly<{
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
}>;
|
|
5
|
-
type SurfaceErrorBoundaryState = {
|
|
6
|
-
hasError: boolean;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Catches render errors from `@a2ui/react` catalog components.
|
|
10
|
-
*/
|
|
11
|
-
export declare class SurfaceErrorBoundary extends Component<SurfaceErrorBoundaryProps, SurfaceErrorBoundaryState> {
|
|
12
|
-
state: SurfaceErrorBoundaryState;
|
|
13
|
-
static getDerivedStateFromError(): SurfaceErrorBoundaryState;
|
|
14
|
-
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
15
|
-
render(): ReactNode;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=SurfaceErrorBoundary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SurfaceErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/v0_9/SurfaceErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlE,KAAK,yBAAyB,GAAG,QAAQ,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AACnE,KAAK,yBAAyB,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC;AAEvD;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,SAAS,CACjD,yBAAyB,EACzB,yBAAyB,CAC1B;IACC,KAAK,EAAE,yBAAyB,CAAuB;IAEvD,MAAM,CAAC,wBAAwB,IAAI,yBAAyB;IAI5D,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI;IAKtD,MAAM,IAAI,SAAS;CAUpB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Component } from 'react';
|
|
4
|
-
import { InlineAlert } from '../components/ui/InlineAlert/InlineAlert.js';
|
|
5
|
-
const RENDER_ERROR_MESSAGE = 'Failed to render A2UI surface';
|
|
6
|
-
/**
|
|
7
|
-
* Catches render errors from `@a2ui/react` catalog components.
|
|
8
|
-
*/
|
|
9
|
-
export class SurfaceErrorBoundary extends Component {
|
|
10
|
-
state = { hasError: false };
|
|
11
|
-
static getDerivedStateFromError() {
|
|
12
|
-
return { hasError: true };
|
|
13
|
-
}
|
|
14
|
-
componentDidCatch(error, info) {
|
|
15
|
-
// eslint-disable-next-line no-console -- match Provider message-process logging
|
|
16
|
-
console.error('[glchat-a2ui] Failed to render v0.9 surface:', error, info.componentStack);
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
if (this.state.hasError) {
|
|
20
|
-
return (_jsx(InlineAlert, { role: "alert", variant: "warning", children: RENDER_ERROR_MESSAGE }));
|
|
21
|
-
}
|
|
22
|
-
return this.props.children;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SurfaceRenderer.d.ts","sourceRoot":"","sources":["../../../src/v0_9/SurfaceRenderer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AA6DlE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,+BAkCvE"}
|