@vertesia/ui 1.5.0-dev.20260713.151751Z → 1.5.0-dev.20260717.131047Z
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/lib/env/index.d.ts +19 -0
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js +6 -0
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +65 -11
- package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +51 -48
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/hooks/useArtifacts.d.ts +8 -1
- package/lib/features/agent/chat/hooks/useArtifacts.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useArtifacts.js +28 -10
- package/lib/features/agent/chat/hooks/useArtifacts.js.map +1 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.d.ts +73 -0
- package/lib/features/document-viewer/UniversalDocumentViewer.d.ts.map +1 -0
- package/lib/features/document-viewer/UniversalDocumentViewer.js +415 -0
- package/lib/features/document-viewer/UniversalDocumentViewer.js.map +1 -0
- package/lib/features/document-viewer/index.d.ts +2 -0
- package/lib/features/document-viewer/index.d.ts.map +1 -0
- package/lib/features/document-viewer/index.js +2 -0
- package/lib/features/document-viewer/index.js.map +1 -0
- package/lib/features/index.d.ts +1 -0
- package/lib/features/index.d.ts.map +1 -1
- package/lib/features/index.js +1 -0
- package/lib/features/index.js.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts +2 -3
- package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +31 -38
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +73 -13
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/i18n/locales/ar.json +2 -0
- package/lib/i18n/locales/de.json +2 -0
- package/lib/i18n/locales/en.json +2 -0
- package/lib/i18n/locales/es.json +2 -0
- package/lib/i18n/locales/fr.json +2 -0
- package/lib/i18n/locales/it.json +2 -0
- package/lib/i18n/locales/ja.json +2 -0
- package/lib/i18n/locales/ko.json +2 -0
- package/lib/i18n/locales/pt.json +2 -0
- package/lib/i18n/locales/ru.json +2 -0
- package/lib/i18n/locales/tr.json +2 -0
- package/lib/i18n/locales/zh-TW.json +2 -0
- package/lib/i18n/locales/zh.json +2 -0
- package/lib/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/router/HistoryNavigator.js +4 -1
- package/lib/router/HistoryNavigator.js.map +1 -1
- package/lib/router/Nav.d.ts.map +1 -1
- package/lib/router/Nav.js +7 -1
- package/lib/router/Nav.js.map +1 -1
- package/lib/router/Router.d.ts.map +1 -1
- package/lib/router/Router.js +19 -4
- package/lib/router/Router.js.map +1 -1
- package/lib/router/path.d.ts +15 -0
- package/lib/router/path.d.ts.map +1 -1
- package/lib/router/path.js +43 -0
- package/lib/router/path.js.map +1 -1
- package/lib/session/UserSession.d.ts +6 -0
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +31 -9
- package/lib/session/UserSession.js.map +1 -1
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +111 -49
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +52 -3
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/session/auth/domainRouting.d.ts +25 -0
- package/lib/session/auth/domainRouting.d.ts.map +1 -1
- package/lib/session/auth/domainRouting.js +36 -0
- package/lib/session/auth/domainRouting.js.map +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.js +1 -1
- package/lib/shell/login/SigninScreen.js +9 -1
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/productionUrl.d.ts +0 -14
- package/lib/shell/login/productionUrl.d.ts.map +1 -1
- package/lib/shell/login/productionUrl.js +14 -5
- package/lib/shell/login/productionUrl.js.map +1 -1
- package/lib/vertesia-ui-core.js +3 -3
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +28 -28
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +13 -13
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +2 -2
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/llms.txt +70 -70
- package/package.json +8 -7
- package/src/env/index.ts +24 -0
- package/src/features/agent/chat/ArtifactsTab.tsx +155 -21
- package/src/features/agent/chat/ModernAgentConversation.tsx +53 -49
- package/src/features/agent/chat/hooks/useArtifacts.ts +44 -11
- package/src/features/document-viewer/UniversalDocumentViewer.test.tsx +123 -0
- package/src/features/document-viewer/UniversalDocumentViewer.tsx +746 -0
- package/src/features/document-viewer/index.ts +1 -0
- package/src/features/index.ts +1 -0
- package/src/features/permissions/UserPermissionsProvider.tsx +36 -39
- package/src/features/store/objects/components/ContentOverview.tsx +99 -26
- package/src/i18n/locales/ar.json +2 -0
- package/src/i18n/locales/de.json +2 -0
- package/src/i18n/locales/en.json +2 -0
- package/src/i18n/locales/es.json +2 -0
- package/src/i18n/locales/fr.json +2 -0
- package/src/i18n/locales/it.json +2 -0
- package/src/i18n/locales/ja.json +2 -0
- package/src/i18n/locales/ko.json +2 -0
- package/src/i18n/locales/pt.json +2 -0
- package/src/i18n/locales/ru.json +2 -0
- package/src/i18n/locales/tr.json +2 -0
- package/src/i18n/locales/zh-TW.json +2 -0
- package/src/i18n/locales/zh.json +2 -0
- package/src/router/HistoryNavigator.ts +4 -1
- package/src/router/Nav.tsx +7 -1
- package/src/router/Router.tsx +18 -4
- package/src/router/path.test.ts +87 -0
- package/src/router/path.ts +38 -0
- package/src/session/UserSession.ts +32 -9
- package/src/session/UserSessionProvider.tsx +138 -62
- package/src/session/auth/composable.test.ts +111 -0
- package/src/session/auth/composable.ts +58 -3
- package/src/session/auth/domainRouting.test.ts +28 -1
- package/src/session/auth/domainRouting.ts +38 -0
- package/src/shell/login/SignInRestrictedEnvStep.tsx +1 -1
- package/src/shell/login/SigninScreen.tsx +9 -1
- package/src/shell/login/productionUrl.test.ts +8 -5
- package/src/shell/login/productionUrl.ts +15 -5
package/llms.txt
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
## Reference URLs
|
|
7
7
|
|
|
8
|
-
- Visual style guide: https://
|
|
9
|
-
- Markdown component guide: https://
|
|
10
|
-
- LLM reference: https://
|
|
8
|
+
- Visual style guide: https://design.vertesiahq.com
|
|
9
|
+
- Markdown component guide: https://design.vertesiahq.com/components.md
|
|
10
|
+
- LLM reference: https://design.vertesiahq.com/llms.txt
|
|
11
11
|
|
|
12
12
|
# @vertesia/ui Component Reference
|
|
13
13
|
|
|
14
14
|
> Markdown rendition of the Vertesia UI style guide for LLMs and text-first clients.
|
|
15
|
-
> Visual style guide: https://
|
|
15
|
+
> Visual style guide: https://design.vertesiahq.com
|
|
16
16
|
|
|
17
17
|
Use this file when generating React UI for Vertesia apps or plugins. Prefer `@vertesia/ui`
|
|
18
18
|
components over local duplicates, and use semantic color classes instead of hardcoded colors.
|
|
@@ -31,65 +31,65 @@ import { useUserSession } from '@vertesia/ui/session';
|
|
|
31
31
|
|
|
32
32
|
## Classes
|
|
33
33
|
|
|
34
|
-
- [Semantic](https://
|
|
35
|
-
- [Background](https://
|
|
36
|
-
- [Text](https://
|
|
37
|
-
- [Border & Ring](https://
|
|
38
|
-
- [Icons](https://
|
|
34
|
+
- [Semantic](https://design.vertesiahq.com/semantic)
|
|
35
|
+
- [Background](https://design.vertesiahq.com/classes/background)
|
|
36
|
+
- [Text](https://design.vertesiahq.com/classes/text)
|
|
37
|
+
- [Border & Ring](https://design.vertesiahq.com/classes/border)
|
|
38
|
+
- [Icons](https://design.vertesiahq.com/classes/icons)
|
|
39
39
|
|
|
40
40
|
## Components
|
|
41
41
|
|
|
42
|
-
- [Heading](https://
|
|
43
|
-
- [Buttons](https://
|
|
44
|
-
- [Badges](https://
|
|
45
|
-
- [Dot Badges](https://
|
|
46
|
-
- [Message Box](https://
|
|
47
|
-
- [Modal](https://
|
|
48
|
-
- [Confirm Modal](https://
|
|
49
|
-
- [Delete Modal](https://
|
|
50
|
-
- [Filter](https://
|
|
51
|
-
- [Tabs](https://
|
|
52
|
-
- [Tooltips](https://
|
|
53
|
-
- [Switch](https://
|
|
54
|
-
- [Side Panel](https://
|
|
55
|
-
- [SelectBox](https://
|
|
56
|
-
- [Overlay](https://
|
|
57
|
-
- [Breadcrumbs](https://
|
|
58
|
-
- [Monaco](https://
|
|
59
|
-
- [Card](https://
|
|
60
|
-
- [Checkbox](https://
|
|
61
|
-
- [Collapsible](https://
|
|
62
|
-
- [Command](https://
|
|
63
|
-
- [Dropdown](https://
|
|
64
|
-
- [Label](https://
|
|
65
|
-
- [Panel](https://
|
|
66
|
-
- [Popover](https://
|
|
67
|
-
- [Radio Group](https://
|
|
68
|
-
- [Resizeable](https://
|
|
69
|
-
- [Separator](https://
|
|
70
|
-
- [Text](https://
|
|
71
|
-
- [Theme](https://
|
|
42
|
+
- [Heading](https://design.vertesiahq.com/components/heading)
|
|
43
|
+
- [Buttons](https://design.vertesiahq.com/components/buttons)
|
|
44
|
+
- [Badges](https://design.vertesiahq.com/components/badges)
|
|
45
|
+
- [Dot Badges](https://design.vertesiahq.com/components/dotBadges)
|
|
46
|
+
- [Message Box](https://design.vertesiahq.com/components/messageBox)
|
|
47
|
+
- [Modal](https://design.vertesiahq.com/components/modal)
|
|
48
|
+
- [Confirm Modal](https://design.vertesiahq.com/components/confirmModal)
|
|
49
|
+
- [Delete Modal](https://design.vertesiahq.com/components/deleteModal)
|
|
50
|
+
- [Filter](https://design.vertesiahq.com/components/filter)
|
|
51
|
+
- [Tabs](https://design.vertesiahq.com/components/tabs)
|
|
52
|
+
- [Tooltips](https://design.vertesiahq.com/components/tooltips)
|
|
53
|
+
- [Switch](https://design.vertesiahq.com/components/switch)
|
|
54
|
+
- [Side Panel](https://design.vertesiahq.com/components/sidePanel)
|
|
55
|
+
- [SelectBox](https://design.vertesiahq.com/components/selectBox)
|
|
56
|
+
- [Overlay](https://design.vertesiahq.com/components/overlay)
|
|
57
|
+
- [Breadcrumbs](https://design.vertesiahq.com/components/breadcrumb)
|
|
58
|
+
- [Monaco](https://design.vertesiahq.com/components/monaco)
|
|
59
|
+
- [Card](https://design.vertesiahq.com/components/card)
|
|
60
|
+
- [Checkbox](https://design.vertesiahq.com/components/checkbox)
|
|
61
|
+
- [Collapsible](https://design.vertesiahq.com/components/collapsible)
|
|
62
|
+
- [Command](https://design.vertesiahq.com/components/command)
|
|
63
|
+
- [Dropdown](https://design.vertesiahq.com/components/dropdown)
|
|
64
|
+
- [Label](https://design.vertesiahq.com/components/label)
|
|
65
|
+
- [Panel](https://design.vertesiahq.com/components/panel)
|
|
66
|
+
- [Popover](https://design.vertesiahq.com/components/popover)
|
|
67
|
+
- [Radio Group](https://design.vertesiahq.com/components/radioGroup)
|
|
68
|
+
- [Resizeable](https://design.vertesiahq.com/components/resizeable)
|
|
69
|
+
- [Separator](https://design.vertesiahq.com/components/separator)
|
|
70
|
+
- [Text](https://design.vertesiahq.com/components/text)
|
|
71
|
+
- [Theme](https://design.vertesiahq.com/components/theme)
|
|
72
72
|
|
|
73
73
|
## Layout & Structure
|
|
74
74
|
|
|
75
|
-
- [Avatar](https://
|
|
76
|
-
- [Center](https://
|
|
77
|
-
- [Divider](https://
|
|
78
|
-
- [Link](https://
|
|
79
|
-
- [Portal](https://
|
|
80
|
-
- [Spinner](https://
|
|
75
|
+
- [Avatar](https://design.vertesiahq.com/components/avatar)
|
|
76
|
+
- [Center](https://design.vertesiahq.com/components/center)
|
|
77
|
+
- [Divider](https://design.vertesiahq.com/components/divider)
|
|
78
|
+
- [Link](https://design.vertesiahq.com/components/link)
|
|
79
|
+
- [Portal](https://design.vertesiahq.com/components/portal)
|
|
80
|
+
- [Spinner](https://design.vertesiahq.com/components/spinner)
|
|
81
81
|
|
|
82
82
|
## Forms
|
|
83
83
|
|
|
84
|
-
- [FormItem](https://
|
|
85
|
-
- [Inputs](https://
|
|
86
|
-
- [Textarea](https://
|
|
87
|
-
- [ComboBox](https://
|
|
88
|
-
- [InputList](https://
|
|
89
|
-
- [MenuList](https://
|
|
90
|
-
- [NumberInput](https://
|
|
91
|
-
- [SelectList](https://
|
|
92
|
-
- [TagsInput](https://
|
|
84
|
+
- [FormItem](https://design.vertesiahq.com/components/formItem)
|
|
85
|
+
- [Inputs](https://design.vertesiahq.com/components/inputs)
|
|
86
|
+
- [Textarea](https://design.vertesiahq.com/components/textarea)
|
|
87
|
+
- [ComboBox](https://design.vertesiahq.com/components/comboBox)
|
|
88
|
+
- [InputList](https://design.vertesiahq.com/components/inputList)
|
|
89
|
+
- [MenuList](https://design.vertesiahq.com/components/menuList)
|
|
90
|
+
- [NumberInput](https://design.vertesiahq.com/components/numberInput)
|
|
91
|
+
- [SelectList](https://design.vertesiahq.com/components/selectList)
|
|
92
|
+
- [TagsInput](https://design.vertesiahq.com/components/tagsInput)
|
|
93
93
|
|
|
94
94
|
# Component Guidance
|
|
95
95
|
|
|
@@ -97,7 +97,7 @@ import { useUserSession } from '@vertesia/ui/session';
|
|
|
97
97
|
|
|
98
98
|
Primary action primitive with Vertesia variants, loading state, disabled state, and tooltip support.
|
|
99
99
|
|
|
100
|
-
- Route: https://
|
|
100
|
+
- Route: https://design.vertesiahq.com/components/buttons
|
|
101
101
|
- Import path: `@vertesia/ui/core`
|
|
102
102
|
- Exports: `Button`, `CopyButton`, `buttonVariants`
|
|
103
103
|
|
|
@@ -147,7 +147,7 @@ import { Button } from '@vertesia/ui/core';
|
|
|
147
147
|
|
|
148
148
|
Single-line text input with a simplified value-based `onChange` callback.
|
|
149
149
|
|
|
150
|
-
- Route: https://
|
|
150
|
+
- Route: https://design.vertesiahq.com/components/inputs
|
|
151
151
|
- Import path: `@vertesia/ui/core`
|
|
152
152
|
- Exports: `Input`
|
|
153
153
|
|
|
@@ -184,7 +184,7 @@ const [name, setName] = useState('');
|
|
|
184
184
|
|
|
185
185
|
Multi-line text control using standard React textarea event handling.
|
|
186
186
|
|
|
187
|
-
- Route: https://
|
|
187
|
+
- Route: https://design.vertesiahq.com/components/textarea
|
|
188
188
|
- Import path: `@vertesia/ui/core`
|
|
189
189
|
- Exports: `Textarea`
|
|
190
190
|
|
|
@@ -215,7 +215,7 @@ Multi-line text control using standard React textarea event handling.
|
|
|
215
215
|
|
|
216
216
|
Field wrapper for labels, required indicators, and help tooltips.
|
|
217
217
|
|
|
218
|
-
- Route: https://
|
|
218
|
+
- Route: https://design.vertesiahq.com/components/formItem
|
|
219
219
|
- Import path: `@vertesia/ui/core`
|
|
220
220
|
- Exports: `FormItem`
|
|
221
221
|
|
|
@@ -248,7 +248,7 @@ Field wrapper for labels, required indicators, and help tooltips.
|
|
|
248
248
|
|
|
249
249
|
Accessible overlay dialog for focused tasks and forms.
|
|
250
250
|
|
|
251
|
-
- Route: https://
|
|
251
|
+
- Route: https://design.vertesiahq.com/components/modal
|
|
252
252
|
- Import path: `@vertesia/ui/core`
|
|
253
253
|
- Exports: `Modal`, `ModalTitle`, `ModalBody`, `ModalFooter`
|
|
254
254
|
|
|
@@ -293,7 +293,7 @@ Accessible overlay dialog for focused tasks and forms.
|
|
|
293
293
|
|
|
294
294
|
Confirmation dialog for actions that need explicit user consent.
|
|
295
295
|
|
|
296
|
-
- Route: https://
|
|
296
|
+
- Route: https://design.vertesiahq.com/components/confirmModal
|
|
297
297
|
- Import path: `@vertesia/ui/core`
|
|
298
298
|
- Exports: `ConfirmModal`
|
|
299
299
|
|
|
@@ -316,7 +316,7 @@ Confirmation dialog for actions that need explicit user consent.
|
|
|
316
316
|
|
|
317
317
|
Delete-specific confirmation wrapper with async delete handling and toast feedback.
|
|
318
318
|
|
|
319
|
-
- Route: https://
|
|
319
|
+
- Route: https://design.vertesiahq.com/components/deleteModal
|
|
320
320
|
- Import path: `@vertesia/ui/core`
|
|
321
321
|
- Exports: `DeleteModal`
|
|
322
322
|
|
|
@@ -342,7 +342,7 @@ Delete-specific confirmation wrapper with async delete handling and toast feedba
|
|
|
342
342
|
|
|
343
343
|
Dropdown select for string or object options, with optional search, clear, and multi-select modes.
|
|
344
344
|
|
|
345
|
-
- Route: https://
|
|
345
|
+
- Route: https://design.vertesiahq.com/components/selectBox
|
|
346
346
|
- Import path: `@vertesia/ui/core`
|
|
347
347
|
- Exports: `SelectBox`
|
|
348
348
|
|
|
@@ -383,7 +383,7 @@ Dropdown select for string or object options, with optional search, clear, and m
|
|
|
383
383
|
|
|
384
384
|
Tab container driven by an array of tab objects and companion bar/panel components.
|
|
385
385
|
|
|
386
|
-
- Route: https://
|
|
386
|
+
- Route: https://design.vertesiahq.com/components/tabs
|
|
387
387
|
- Import path: `@vertesia/ui/core`
|
|
388
388
|
- Exports: `Tabs`, `TabsBar`, `TabsPanel`, `VTabs`, `VTabsBar`, `VTabsPanel`
|
|
389
389
|
|
|
@@ -408,7 +408,7 @@ Tab container driven by an array of tab objects and companion bar/panel componen
|
|
|
408
408
|
|
|
409
409
|
Compact status and category labels.
|
|
410
410
|
|
|
411
|
-
- Route: https://
|
|
411
|
+
- Route: https://design.vertesiahq.com/components/badges
|
|
412
412
|
- Import path: `@vertesia/ui/core`
|
|
413
413
|
- Exports: `Badge`, `DotBadge`
|
|
414
414
|
|
|
@@ -425,7 +425,7 @@ Compact status and category labels.
|
|
|
425
425
|
|
|
426
426
|
Semantic feedback box for success, attention, destructive, done, info, and muted messages.
|
|
427
427
|
|
|
428
|
-
- Route: https://
|
|
428
|
+
- Route: https://design.vertesiahq.com/components/messageBox
|
|
429
429
|
- Import path: `@vertesia/ui/core`
|
|
430
430
|
- Exports: `MessageBox`
|
|
431
431
|
|
|
@@ -437,7 +437,7 @@ Semantic feedback box for success, attention, destructive, done, info, and muted
|
|
|
437
437
|
|
|
438
438
|
Choice controls for boolean values and mutually exclusive option sets.
|
|
439
439
|
|
|
440
|
-
- Route: https://
|
|
440
|
+
- Route: https://design.vertesiahq.com/components/checkbox
|
|
441
441
|
- Import path: `@vertesia/ui/core`
|
|
442
442
|
- Exports: `Checkbox`, `Switch`, `RadioGroup`, `RadioGroupItem`, `RadioGroupOption`
|
|
443
443
|
|
|
@@ -451,7 +451,7 @@ Choice controls for boolean values and mutually exclusive option sets.
|
|
|
451
451
|
|
|
452
452
|
Overlay primitives for action menus, floating content, command palettes, and contextual help.
|
|
453
453
|
|
|
454
|
-
- Route: https://
|
|
454
|
+
- Route: https://design.vertesiahq.com/components/dropdown
|
|
455
455
|
- Import path: `@vertesia/ui/core`
|
|
456
456
|
- Exports: `Dropdown`, `MenuGroup`, `MenuItem`, `Popover`, `Command`, `VTooltip`, `Tooltip`
|
|
457
457
|
|
|
@@ -466,7 +466,7 @@ Overlay primitives for action menus, floating content, command palettes, and con
|
|
|
466
466
|
|
|
467
467
|
Content containers for repeated items and framed tool surfaces.
|
|
468
468
|
|
|
469
|
-
- Route: https://
|
|
469
|
+
- Route: https://design.vertesiahq.com/components/card
|
|
470
470
|
- Import path: `@vertesia/ui/core`
|
|
471
471
|
- Exports: `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter`, `Panel`
|
|
472
472
|
|
|
@@ -479,7 +479,7 @@ Content containers for repeated items and framed tool surfaces.
|
|
|
479
479
|
|
|
480
480
|
Small primitives for display, separation, links, loading states, portals, and overlays.
|
|
481
481
|
|
|
482
|
-
- Route: https://
|
|
482
|
+
- Route: https://design.vertesiahq.com/components/center
|
|
483
483
|
- Import path: `@vertesia/ui/core`
|
|
484
484
|
- Exports: `Avatar`, `SvgAvatar`, `Center`, `Divider`, `Link`, `Portal`, `Spinner`, `Separator`, `Overlay`
|
|
485
485
|
|
|
@@ -493,7 +493,7 @@ Small primitives for display, separation, links, loading states, portals, and ov
|
|
|
493
493
|
|
|
494
494
|
Semantic Tailwind classes and approved lucide-react icon guidance for Vertesia apps.
|
|
495
495
|
|
|
496
|
-
- Route: https://
|
|
496
|
+
- Route: https://design.vertesiahq.com/semantic
|
|
497
497
|
- Import path: `@vertesia/ui/core`
|
|
498
498
|
- Exports: `ModeToggle`
|
|
499
499
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/ui",
|
|
3
|
-
"version": "1.5.0-dev.
|
|
3
|
+
"version": "1.5.0-dev.20260717.131047Z",
|
|
4
4
|
"description": "Vertesia UI components and and hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
"vega": "^6.2.0",
|
|
91
91
|
"vega-embed": "^7.1.0",
|
|
92
92
|
"vega-lite": "^6.4.3",
|
|
93
|
-
"@vertesia/
|
|
94
|
-
"@vertesia/
|
|
95
|
-
"@vertesia/
|
|
96
|
-
"@vertesia/
|
|
93
|
+
"@vertesia/client": "1.5.0-dev.20260717.131047Z",
|
|
94
|
+
"@vertesia/common": "1.5.0-dev.20260717.131047Z",
|
|
95
|
+
"@vertesia/fusion-ux": "1.5.0-dev.20260717.131047Z",
|
|
96
|
+
"@vertesia/json": "1.5.0-dev.20260717.131047Z"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@testing-library/react": "^16.3.2",
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
"@types/react-dom": "19.2.3",
|
|
107
107
|
"axe-core": "^4.12.1",
|
|
108
108
|
"culori": "^4.0.2",
|
|
109
|
-
"i18next-cli": "^1.
|
|
109
|
+
"i18next-cli": "^1.65.0",
|
|
110
110
|
"jsdom": "^29.1.1",
|
|
111
|
-
"rolldown": "1.1.
|
|
111
|
+
"rolldown": "1.1.4",
|
|
112
112
|
"typescript": "^6.0.3",
|
|
113
113
|
"vitest": "^4.1.9",
|
|
114
114
|
"vitest-axe": "^0.1.0",
|
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
"url": "https://github.com/vertesia/composableai.git",
|
|
181
181
|
"directory": "packages/ui"
|
|
182
182
|
},
|
|
183
|
+
"gitHead": "8aaad228827b2927db8e6aa75b27bfac90fec36f",
|
|
183
184
|
"scripts": {
|
|
184
185
|
"clean:lib": "rimraf ./lib ./tsconfig.tsbuildinfo",
|
|
185
186
|
"clean": "rimraf ./node_modules ./lib ./tsconfig.tsbuildinfo",
|
package/src/env/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface EnvProps {
|
|
|
15
15
|
zeno: string;
|
|
16
16
|
studio: string;
|
|
17
17
|
sts: string; // Security Token Service endpoint
|
|
18
|
+
git?: string; // Smart HTTP app source git endpoint
|
|
18
19
|
mcp?: string;
|
|
19
20
|
};
|
|
20
21
|
firebase?: {
|
|
@@ -27,6 +28,21 @@ export interface EnvProps {
|
|
|
27
28
|
region?: string;
|
|
28
29
|
datadogRum?: boolean;
|
|
29
30
|
datadogLogs?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Development-only Vertesia auth token.
|
|
33
|
+
*
|
|
34
|
+
* This is intended for sandbox/dev previews where the host process already
|
|
35
|
+
* has a short-lived Vertesia token. Production apps must not set this.
|
|
36
|
+
*/
|
|
37
|
+
devAuthToken?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Optional host-provided Vertesia auth token bootstrap.
|
|
40
|
+
*
|
|
41
|
+
* Published generated apps use this to ask their same-origin app gateway for
|
|
42
|
+
* the token backing the gateway session cookie, allowing UserSession to
|
|
43
|
+
* initialize without redirecting through Central Auth.
|
|
44
|
+
*/
|
|
45
|
+
authTokenProvider?: () => Promise<string | undefined>;
|
|
30
46
|
logger?: {
|
|
31
47
|
info: (msg: string, ...args: unknown[]) => void;
|
|
32
48
|
warn: (msg: string, ...args: unknown[]) => void;
|
|
@@ -116,6 +132,14 @@ export class VertesiaEnvironment implements Readonly<EnvProps> {
|
|
|
116
132
|
return this._props?.datadogLogs ?? false;
|
|
117
133
|
}
|
|
118
134
|
|
|
135
|
+
get devAuthToken() {
|
|
136
|
+
return this._props?.devAuthToken;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
get authTokenProvider() {
|
|
140
|
+
return this._props?.authTokenProvider;
|
|
141
|
+
}
|
|
142
|
+
|
|
119
143
|
get logger() {
|
|
120
144
|
return this._props?.logger ?? console;
|
|
121
145
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { Button, Center, ErrorBox, Input } from '@vertesia/ui/core';
|
|
1
|
+
import { Button, Center, ErrorBox, Input, Modal, ModalBody, ModalTitle, Switch } from '@vertesia/ui/core';
|
|
2
2
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
3
3
|
import { useUserSession } from '@vertesia/ui/session';
|
|
4
4
|
import {
|
|
5
5
|
ChevronDownIcon,
|
|
6
6
|
ChevronRightIcon,
|
|
7
|
+
DownloadIcon,
|
|
8
|
+
EyeIcon,
|
|
7
9
|
FileIcon,
|
|
8
10
|
FolderIcon,
|
|
9
11
|
FolderOpenIcon,
|
|
@@ -12,6 +14,10 @@ import {
|
|
|
12
14
|
RefreshCwIcon,
|
|
13
15
|
} from 'lucide-react';
|
|
14
16
|
import React, { useCallback, useId, useMemo, useState } from 'react';
|
|
17
|
+
import {
|
|
18
|
+
type UniversalDocumentSource,
|
|
19
|
+
UniversalDocumentViewer,
|
|
20
|
+
} from '../../document-viewer/UniversalDocumentViewer.js';
|
|
15
21
|
import { type ArtifactTreeNode, useArtifacts } from './hooks/useArtifacts.js';
|
|
16
22
|
|
|
17
23
|
// ---------------------------------------------------------------------------
|
|
@@ -22,16 +28,26 @@ interface TreeNodeProps {
|
|
|
22
28
|
node: ArtifactTreeNode;
|
|
23
29
|
depth: number;
|
|
24
30
|
runId: string;
|
|
31
|
+
onPreview: (relativePath: string) => void;
|
|
25
32
|
onDownload: (relativePath: string) => void;
|
|
26
33
|
downloadingPath: string | null;
|
|
27
34
|
forceExpanded?: boolean;
|
|
28
35
|
}
|
|
36
|
+
|
|
29
37
|
//** Convert a raw directory segment (e.g. "out_files") into a readable label ("Out Files"). */
|
|
30
38
|
function formatDirectoryLabel(name: string): string {
|
|
31
39
|
return name.replace(/[_-]/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase());
|
|
32
40
|
}
|
|
33
41
|
|
|
34
|
-
function TreeNode({
|
|
42
|
+
function TreeNode({
|
|
43
|
+
node,
|
|
44
|
+
depth,
|
|
45
|
+
runId,
|
|
46
|
+
onPreview,
|
|
47
|
+
onDownload,
|
|
48
|
+
downloadingPath,
|
|
49
|
+
forceExpanded = false,
|
|
50
|
+
}: TreeNodeProps) {
|
|
35
51
|
const [expanded, setExpanded] = useState(false);
|
|
36
52
|
const isExpanded = forceExpanded || expanded;
|
|
37
53
|
|
|
@@ -66,6 +82,7 @@ function TreeNode({ node, depth, runId, onDownload, downloadingPath, forceExpand
|
|
|
66
82
|
node={child}
|
|
67
83
|
depth={depth + 1}
|
|
68
84
|
runId={runId}
|
|
85
|
+
onPreview={onPreview}
|
|
69
86
|
onDownload={onDownload}
|
|
70
87
|
downloadingPath={downloadingPath}
|
|
71
88
|
forceExpanded={forceExpanded}
|
|
@@ -78,23 +95,45 @@ function TreeNode({ node, depth, runId, onDownload, downloadingPath, forceExpand
|
|
|
78
95
|
const isDownloading = downloadingPath === node.path;
|
|
79
96
|
|
|
80
97
|
return (
|
|
81
|
-
<div
|
|
98
|
+
<div
|
|
99
|
+
className="group flex min-w-0 items-center gap-1.5 rounded text-sm hover:bg-muted/30"
|
|
100
|
+
style={{ paddingInlineStart: `${depth * 14 + 4}px` }}
|
|
101
|
+
>
|
|
82
102
|
<Button
|
|
83
103
|
variant="unstyled"
|
|
84
|
-
className="flex w-
|
|
85
|
-
|
|
86
|
-
onClick={() => onDownload(node.path)}
|
|
87
|
-
disabled={isDownloading}
|
|
104
|
+
className="flex min-w-0 flex-1 items-center justify-start gap-1.5 px-1 py-1 text-start"
|
|
105
|
+
onClick={() => onPreview(node.path)}
|
|
88
106
|
title={node.path}
|
|
89
107
|
>
|
|
90
|
-
|
|
91
|
-
<Loader2Icon className="size-3.5 shrink-0 animate-spin text-info" />
|
|
92
|
-
) : (
|
|
93
|
-
<span className="size-3.5 shrink-0" />
|
|
94
|
-
)}
|
|
108
|
+
<span className="size-3.5 shrink-0" />
|
|
95
109
|
<FileIcon className="size-4 shrink-0 text-muted" />
|
|
96
110
|
<span className="min-w-0 truncate">{node.name}</span>
|
|
97
111
|
</Button>
|
|
112
|
+
<div className="flex shrink-0 items-center pe-1 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100">
|
|
113
|
+
<Button
|
|
114
|
+
variant="ghost"
|
|
115
|
+
size="xs"
|
|
116
|
+
className="h-6 w-6 p-0"
|
|
117
|
+
onClick={() => onPreview(node.path)}
|
|
118
|
+
aria-label="Preview artifact"
|
|
119
|
+
>
|
|
120
|
+
<EyeIcon className="size-3.5" />
|
|
121
|
+
</Button>
|
|
122
|
+
<Button
|
|
123
|
+
variant="ghost"
|
|
124
|
+
size="xs"
|
|
125
|
+
className="h-6 w-6 p-0"
|
|
126
|
+
onClick={() => onDownload(node.path)}
|
|
127
|
+
disabled={isDownloading}
|
|
128
|
+
aria-label="Download artifact"
|
|
129
|
+
>
|
|
130
|
+
{isDownloading ? (
|
|
131
|
+
<Loader2Icon className="size-3.5 animate-spin text-info" />
|
|
132
|
+
) : (
|
|
133
|
+
<DownloadIcon className="size-3.5" />
|
|
134
|
+
)}
|
|
135
|
+
</Button>
|
|
136
|
+
</div>
|
|
98
137
|
</div>
|
|
99
138
|
);
|
|
100
139
|
}
|
|
@@ -142,6 +181,42 @@ function downloadUrl(url: string, filename: string) {
|
|
|
142
181
|
anchor.remove();
|
|
143
182
|
}
|
|
144
183
|
|
|
184
|
+
function getArtifactContentType(path: string): string | undefined {
|
|
185
|
+
const ext = path.split('.').pop()?.toLowerCase();
|
|
186
|
+
switch (ext) {
|
|
187
|
+
case 'css':
|
|
188
|
+
return 'text/css';
|
|
189
|
+
case 'gif':
|
|
190
|
+
return 'image/gif';
|
|
191
|
+
case 'htm':
|
|
192
|
+
case 'html':
|
|
193
|
+
return 'text/html';
|
|
194
|
+
case 'jpeg':
|
|
195
|
+
case 'jpg':
|
|
196
|
+
return 'image/jpeg';
|
|
197
|
+
case 'json':
|
|
198
|
+
return 'application/json';
|
|
199
|
+
case 'md':
|
|
200
|
+
case 'markdown':
|
|
201
|
+
return 'text/markdown';
|
|
202
|
+
case 'pdf':
|
|
203
|
+
return 'application/pdf';
|
|
204
|
+
case 'png':
|
|
205
|
+
return 'image/png';
|
|
206
|
+
case 'svg':
|
|
207
|
+
return 'image/svg+xml';
|
|
208
|
+
case 'ts':
|
|
209
|
+
case 'tsx':
|
|
210
|
+
return 'text/typescript';
|
|
211
|
+
case 'txt':
|
|
212
|
+
return 'text/plain';
|
|
213
|
+
case 'webp':
|
|
214
|
+
return 'image/webp';
|
|
215
|
+
default:
|
|
216
|
+
return undefined;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
145
220
|
// ---------------------------------------------------------------------------
|
|
146
221
|
// Main tab component
|
|
147
222
|
// ---------------------------------------------------------------------------
|
|
@@ -172,8 +247,15 @@ function ArtifactEmptyState({
|
|
|
172
247
|
function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
173
248
|
const { t } = useUITranslation();
|
|
174
249
|
const { client } = useUserSession();
|
|
175
|
-
const
|
|
250
|
+
const [showSystem, setShowSystem] = useState(false);
|
|
251
|
+
const { tree, flatFiles, totalCount, systemHiddenCount, isLoading, error, refresh } = useArtifacts(
|
|
252
|
+
client,
|
|
253
|
+
runId,
|
|
254
|
+
refreshKey,
|
|
255
|
+
showSystem,
|
|
256
|
+
);
|
|
176
257
|
const [downloadingPath, setDownloadingPath] = useState<string | null>(null);
|
|
258
|
+
const [previewPath, setPreviewPath] = useState<string | null>(null);
|
|
177
259
|
const [filterValue, setFilterValue] = useState('');
|
|
178
260
|
const normalizedFilterValue = filterValue.trim();
|
|
179
261
|
const filteredTree = useMemo(() => filterArtifactTree(tree, normalizedFilterValue), [tree, normalizedFilterValue]);
|
|
@@ -196,11 +278,28 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
196
278
|
[client, runId],
|
|
197
279
|
);
|
|
198
280
|
|
|
281
|
+
const handlePreview = useCallback((relativePath: string) => {
|
|
282
|
+
setPreviewPath(relativePath);
|
|
283
|
+
}, []);
|
|
284
|
+
|
|
285
|
+
const previewSource: UniversalDocumentSource | null =
|
|
286
|
+
runId && previewPath
|
|
287
|
+
? {
|
|
288
|
+
title: previewPath.split('/').pop() || previewPath,
|
|
289
|
+
fileName: previewPath.split('/').pop() || previewPath,
|
|
290
|
+
contentType: getArtifactContentType(previewPath),
|
|
291
|
+
artifact: {
|
|
292
|
+
runId,
|
|
293
|
+
path: previewPath,
|
|
294
|
+
},
|
|
295
|
+
}
|
|
296
|
+
: null;
|
|
297
|
+
|
|
199
298
|
if (!runId) {
|
|
200
299
|
return <ArtifactEmptyState icon={<PackageIcon className="mb-2 size-8" />}>No run selected</ArtifactEmptyState>;
|
|
201
300
|
}
|
|
202
301
|
|
|
203
|
-
if (isLoading &&
|
|
302
|
+
if (isLoading && totalCount === 0) {
|
|
204
303
|
return (
|
|
205
304
|
<ArtifactEmptyState icon={<Loader2Icon className="mb-2 size-6 animate-spin" />}>
|
|
206
305
|
{t('agent.loadingArtifacts')}
|
|
@@ -228,7 +327,7 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
228
327
|
);
|
|
229
328
|
}
|
|
230
329
|
|
|
231
|
-
if (
|
|
330
|
+
if (totalCount === 0) {
|
|
232
331
|
return (
|
|
233
332
|
<ArtifactEmptyState
|
|
234
333
|
icon={<PackageIcon className="mb-2 size-8" />}
|
|
@@ -247,16 +346,28 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
247
346
|
return (
|
|
248
347
|
<div className="flex flex-col h-full">
|
|
249
348
|
{/* Top bar */}
|
|
250
|
-
<div className="flex shrink-0 flex-col gap-2 px-3 py-2">
|
|
349
|
+
<div className="flex shrink-0 flex-col gap-2 border-b px-3 py-2">
|
|
251
350
|
<div className="flex items-center justify-between gap-2 text-xs text-muted">
|
|
252
351
|
<span>
|
|
253
352
|
{normalizedFilterValue
|
|
254
353
|
? `${visibleFileCount} of ${flatFiles.length} file${flatFiles.length !== 1 ? 's' : ''}`
|
|
255
354
|
: `${flatFiles.length} file${flatFiles.length !== 1 ? 's' : ''}`}
|
|
355
|
+
{!showSystem && systemHiddenCount > 0 ? ` · ${systemHiddenCount} hidden` : ''}
|
|
256
356
|
</span>
|
|
257
|
-
<
|
|
258
|
-
<
|
|
259
|
-
|
|
357
|
+
<div className="flex items-center gap-1">
|
|
358
|
+
<Switch size="sm" value={showSystem} onChange={setShowSystem}>
|
|
359
|
+
<span className="text-xs text-muted">{t('agent.showSystemArtifacts')}</span>
|
|
360
|
+
</Switch>
|
|
361
|
+
<Button
|
|
362
|
+
variant="ghost"
|
|
363
|
+
size="sm"
|
|
364
|
+
onClick={refresh}
|
|
365
|
+
disabled={isLoading}
|
|
366
|
+
className="h-6 w-6 p-0"
|
|
367
|
+
>
|
|
368
|
+
<RefreshCwIcon className={`size-3.5 ${isLoading ? 'animate-spin' : ''}`} />
|
|
369
|
+
</Button>
|
|
370
|
+
</div>
|
|
260
371
|
</div>
|
|
261
372
|
<label htmlFor={filterInputId} className="sr-only">
|
|
262
373
|
{t('form.filter')}
|
|
@@ -274,7 +385,7 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
274
385
|
</div>
|
|
275
386
|
|
|
276
387
|
{/* Tree */}
|
|
277
|
-
<div className="flex-1 overflow-y-auto px-3
|
|
388
|
+
<div className="flex-1 overflow-y-auto px-3 py-2">
|
|
278
389
|
{filteredTree.length > 0 ? (
|
|
279
390
|
<div className="min-w-0">
|
|
280
391
|
{filteredTree.map((node) => (
|
|
@@ -283,6 +394,7 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
283
394
|
node={node}
|
|
284
395
|
depth={0}
|
|
285
396
|
runId={runId}
|
|
397
|
+
onPreview={handlePreview}
|
|
286
398
|
onDownload={handleDownload}
|
|
287
399
|
downloadingPath={downloadingPath}
|
|
288
400
|
forceExpanded={!!normalizedFilterValue}
|
|
@@ -290,9 +402,31 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
290
402
|
))}
|
|
291
403
|
</div>
|
|
292
404
|
) : (
|
|
293
|
-
<div className="px-1 py-6 text-sm text-muted">
|
|
405
|
+
<div className="px-1 py-6 text-sm text-muted">
|
|
406
|
+
{!showSystem && systemHiddenCount > 0
|
|
407
|
+
? t('agent.onlySystemArtifacts')
|
|
408
|
+
: t('agent.noContentAvailable')}
|
|
409
|
+
</div>
|
|
294
410
|
)}
|
|
295
411
|
</div>
|
|
412
|
+
{previewSource && (
|
|
413
|
+
<Modal
|
|
414
|
+
isOpen={!!previewPath}
|
|
415
|
+
onClose={() => setPreviewPath(null)}
|
|
416
|
+
size="xl"
|
|
417
|
+
className="h-[90vh] p-0"
|
|
418
|
+
description="Artifact preview"
|
|
419
|
+
>
|
|
420
|
+
<ModalTitle show={false}>{previewSource.fileName}</ModalTitle>
|
|
421
|
+
<ModalBody className="h-full max-h-none p-0">
|
|
422
|
+
<UniversalDocumentViewer
|
|
423
|
+
source={previewSource}
|
|
424
|
+
className="h-full"
|
|
425
|
+
onDownload={() => previewPath && void handleDownload(previewPath)}
|
|
426
|
+
/>
|
|
427
|
+
</ModalBody>
|
|
428
|
+
</Modal>
|
|
429
|
+
)}
|
|
296
430
|
</div>
|
|
297
431
|
);
|
|
298
432
|
}
|