@vertesia/ui 1.6.0-dev.20261004.085740Z → 1.6.0-dev.20261008.064737Z
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/boot/vite.d.ts +3 -0
- package/lib/boot/vite.d.ts.map +1 -1
- package/lib/boot/vite.js +12 -0
- package/lib/boot/vite.js.map +1 -1
- package/lib/core/components/shadcn/tabs.d.ts +2 -1
- package/lib/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/core/components/shadcn/tabs.js +6 -4
- package/lib/core/components/shadcn/tabs.js.map +1 -1
- package/lib/env/index.d.ts +8 -0
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.js +16 -10
- package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts +7 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +15 -15
- package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/features/media-viewer/ImagePanel.d.ts +1 -1
- package/lib/features/media-viewer/ImagePanel.d.ts.map +1 -1
- package/lib/features/media-viewer/ImagePanel.js +40 -10
- package/lib/features/media-viewer/ImagePanel.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
- package/lib/i18n/locales/ar.json +14 -0
- package/lib/i18n/locales/de.json +14 -0
- package/lib/i18n/locales/en.json +14 -0
- package/lib/i18n/locales/es.json +14 -0
- package/lib/i18n/locales/fr.json +14 -0
- package/lib/i18n/locales/it.json +14 -0
- package/lib/i18n/locales/ja.json +14 -0
- package/lib/i18n/locales/ko.json +14 -0
- package/lib/i18n/locales/pt.json +14 -0
- package/lib/i18n/locales/ru.json +14 -0
- package/lib/i18n/locales/tr.json +14 -0
- package/lib/i18n/locales/zh-TW.json +14 -0
- package/lib/i18n/locales/zh.json +14 -0
- package/lib/session/auth/oauth.d.ts.map +1 -1
- package/lib/session/auth/oauth.js +5 -3
- package/lib/session/auth/oauth.js.map +1 -1
- package/lib/shell/AuthScreenPreview.d.ts.map +1 -1
- package/lib/shell/AuthScreenPreview.js +1 -0
- package/lib/shell/AuthScreenPreview.js.map +1 -1
- package/lib/shell/login/SignInFlow.d.ts +3 -1
- package/lib/shell/login/SignInFlow.d.ts.map +1 -1
- package/lib/shell/login/SignInFlow.js +13 -4
- package/lib/shell/login/SignInFlow.js.map +1 -1
- package/lib/shell/login/SignInIcons.d.ts.map +1 -1
- package/lib/shell/login/SignInIcons.js +2 -1
- package/lib/shell/login/SignInIcons.js.map +1 -1
- package/lib/shell/login/SignInPasswordStep.d.ts +9 -0
- package/lib/shell/login/SignInPasswordStep.d.ts.map +1 -0
- package/lib/shell/login/SignInPasswordStep.js +58 -0
- package/lib/shell/login/SignInPasswordStep.js.map +1 -0
- package/lib/shell/login/SignInPrimitives.d.ts +13 -0
- package/lib/shell/login/SignInPrimitives.d.ts.map +1 -1
- package/lib/shell/login/SignInPrimitives.js +11 -1
- package/lib/shell/login/SignInPrimitives.js.map +1 -1
- package/lib/shell/login/SignInProvidersStep.d.ts +3 -1
- package/lib/shell/login/SignInProvidersStep.d.ts.map +1 -1
- package/lib/shell/login/SignInProvidersStep.js +4 -2
- package/lib/shell/login/SignInProvidersStep.js.map +1 -1
- package/lib/shell/login/SignInReturningStep.d.ts +3 -1
- package/lib/shell/login/SignInReturningStep.d.ts.map +1 -1
- package/lib/shell/login/SignInReturningStep.js +18 -8
- package/lib/shell/login/SignInReturningStep.js.map +1 -1
- package/lib/shell/login/SignInTenantStep.d.ts +3 -1
- package/lib/shell/login/SignInTenantStep.d.ts.map +1 -1
- package/lib/shell/login/SignInTenantStep.js +2 -2
- package/lib/shell/login/SignInTenantStep.js.map +1 -1
- package/lib/shell/login/SignInWithProviderButton.d.ts +5 -3
- package/lib/shell/login/SignInWithProviderButton.d.ts.map +1 -1
- package/lib/shell/login/SignInWithProviderButton.js +8 -7
- package/lib/shell/login/SignInWithProviderButton.js.map +1 -1
- package/lib/shell/login/SigninScreen.d.ts.map +1 -1
- package/lib/shell/login/SigninScreen.js +9 -3
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/signInUtils.d.ts +24 -4
- package/lib/shell/login/signInUtils.d.ts.map +1 -1
- package/lib/shell/login/signInUtils.js +53 -1
- package/lib/shell/login/signInUtils.js.map +1 -1
- package/lib/vertesia-ui-boot.js.map +1 -1
- package/lib/vertesia-ui-core.js +42 -42
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +339 -339
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.B0orbJb6.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.B0orbJb6.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BChwIQVA.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BChwIQVA.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BTEcAVQm.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BTEcAVQm.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BeJQKbv7.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BeJQKbv7.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BpGr0-5g.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BpGr0-5g.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.Bs8x-1wI.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.Bs8x-1wI.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BymQoOm0.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BymQoOm0.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CNT_wabV.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CNT_wabV.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.Cxh1iVk0.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.Cxh1iVk0.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DLYCM9fV.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DLYCM9fV.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.QvAVguDs.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.QvAVguDs.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.js +2 -2
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-i18n.smozeSmI.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.smozeSmI.chunk.js.map +1 -0
- package/lib/vertesia-ui-layout.js +15 -15
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js +40 -40
- package/lib/vertesia-ui-rich-text.js.map +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 +54 -47
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +47 -47
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +20 -20
- package/src/boot/vite.ts +15 -0
- package/src/core/components/shadcn/tabs.tsx +9 -3
- package/src/env/index.ts +10 -1
- package/src/features/agent/chat/AgentRequestInputOverlay.tsx +73 -34
- package/src/features/agent/chat/AskUserWidget.tsx +222 -205
- package/src/features/media-viewer/ImagePanel.tsx +51 -10
- package/src/features/store/types/IntakePolicyEditor.tsx +2 -1
- package/src/i18n/locales/ar.json +14 -0
- package/src/i18n/locales/de.json +14 -0
- package/src/i18n/locales/en.json +14 -0
- package/src/i18n/locales/es.json +14 -0
- package/src/i18n/locales/fr.json +14 -0
- package/src/i18n/locales/it.json +14 -0
- package/src/i18n/locales/ja.json +14 -0
- package/src/i18n/locales/ko.json +14 -0
- package/src/i18n/locales/pt.json +14 -0
- package/src/i18n/locales/ru.json +14 -0
- package/src/i18n/locales/tr.json +14 -0
- package/src/i18n/locales/zh-TW.json +14 -0
- package/src/i18n/locales/zh.json +14 -0
- package/src/session/auth/oauth.ts +8 -3
- package/src/shell/AuthScreenPreview.tsx +1 -0
- package/src/shell/login/SignInFlow.tsx +23 -2
- package/src/shell/login/SignInIcons.tsx +2 -1
- package/src/shell/login/SignInPasswordStep.tsx +103 -0
- package/src/shell/login/SignInPrimitives.tsx +53 -1
- package/src/shell/login/SignInProvidersStep.tsx +8 -4
- package/src/shell/login/SignInReturningStep.tsx +20 -8
- package/src/shell/login/SignInTenantStep.tsx +6 -2
- package/src/shell/login/SignInWithProviderButton.tsx +11 -7
- package/src/shell/login/SigninScreen.tsx +8 -3
- package/src/shell/login/signInUtils.ts +68 -8
- package/lib/vertesia-ui-i18n.BCPusS2_.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BCPusS2_.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BHWlHchf.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BHWlHchf.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BkNx8SZu.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BkNx8SZu.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.C1LasLrO.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.C1LasLrO.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D8PQ5yKU.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D8PQ5yKU.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DUtVV1Bq.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DUtVV1Bq.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DgA36_k5.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DgA36_k5.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DmG-fjjZ.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DmG-fjjZ.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DreWvQIk.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DreWvQIk.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.Pp8Tj48d.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.Pp8Tj48d.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.gais--x5.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.gais--x5.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.xkqaKpY_.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.xkqaKpY_.chunk.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/ui",
|
|
3
|
-
"version": "1.6.0-dev.
|
|
3
|
+
"version": "1.6.0-dev.20261008.064737Z",
|
|
4
4
|
"description": "Vertesia UI components and and hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"@radix-ui/react-switch": "^1.3.7",
|
|
48
48
|
"@radix-ui/react-tabs": "^1.1.21",
|
|
49
49
|
"@radix-ui/react-tooltip": "^1.2.16",
|
|
50
|
-
"@vertesia/client": "1.6.0-dev.
|
|
51
|
-
"@vertesia/common": "1.6.0-dev.
|
|
52
|
-
"@vertesia/fusion-ux": "1.6.0-dev.
|
|
53
|
-
"@vertesia/json": "1.6.0-dev.
|
|
54
|
-
"@vertesia/rich-text": "1.6.0-dev.
|
|
50
|
+
"@vertesia/client": "1.6.0-dev.20261008.064737Z",
|
|
51
|
+
"@vertesia/common": "1.6.0-dev.20261008.064737Z",
|
|
52
|
+
"@vertesia/fusion-ux": "1.6.0-dev.20261008.064737Z",
|
|
53
|
+
"@vertesia/json": "1.6.0-dev.20261008.064737Z",
|
|
54
|
+
"@vertesia/rich-text": "1.6.0-dev.20261008.064737Z",
|
|
55
55
|
"ajv": "^8.20.0",
|
|
56
56
|
"ajv-formats": "^3.0.1",
|
|
57
57
|
"aria-hidden": "^1.2.6",
|
|
@@ -61,29 +61,29 @@
|
|
|
61
61
|
"dayjs": "^1.11.23",
|
|
62
62
|
"debounce": "^3.0.0",
|
|
63
63
|
"dompurify": "^3.4.16",
|
|
64
|
-
"fast-xml-parser": "^5.11.
|
|
64
|
+
"fast-xml-parser": "^5.11.2",
|
|
65
65
|
"firebase": "^12.19.0",
|
|
66
|
-
"framer-motion": "^13.4.
|
|
66
|
+
"framer-motion": "^13.4.4",
|
|
67
67
|
"i18next": "^26.4.2",
|
|
68
68
|
"jwt-decode": "^4.0.0",
|
|
69
|
-
"katex": "^0.18.
|
|
69
|
+
"katex": "^0.18.9",
|
|
70
70
|
"lodash-es": "^4.18.1",
|
|
71
|
-
"lucide-react": "^1.
|
|
71
|
+
"lucide-react": "^1.48.0",
|
|
72
72
|
"mermaid": "^12.0.0",
|
|
73
|
-
"monaco-editor": "^0.
|
|
74
|
-
"motion": "^13.4.
|
|
73
|
+
"monaco-editor": "^0.57.0",
|
|
74
|
+
"motion": "^13.4.4",
|
|
75
75
|
"papaparse": "^5.7.0",
|
|
76
76
|
"react": "19.3.0",
|
|
77
77
|
"react-calendar": "^6.0.1",
|
|
78
78
|
"react-date-picker": "^12.1.0",
|
|
79
79
|
"react-dom": "19.3.0",
|
|
80
80
|
"react-error-boundary": "^6.1.6",
|
|
81
|
-
"react-i18next": "^17.0.
|
|
81
|
+
"react-i18next": "^17.0.15",
|
|
82
82
|
"react-markdown": "^10.1.0",
|
|
83
83
|
"react-pdf": "^10.5.0",
|
|
84
84
|
"react-remove-scroll": "^2.7.2",
|
|
85
85
|
"react-remove-scroll-bar": "^2.3.8",
|
|
86
|
-
"react-resizable-panels": "^4.
|
|
86
|
+
"react-resizable-panels": "^4.14.1",
|
|
87
87
|
"react-style-singleton": "^2.2.3",
|
|
88
88
|
"react-vega": "^8.0.0",
|
|
89
89
|
"rehype-katex": "^7.0.1",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"ts-md5": "^2.0.1",
|
|
98
98
|
"unist-util-visit": "^5.1.0",
|
|
99
99
|
"vega": "^6.4.0",
|
|
100
|
-
"vega-embed": "^7.
|
|
100
|
+
"vega-embed": "^7.3.0",
|
|
101
101
|
"vega-lite": "^6.4.3"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
@@ -105,19 +105,19 @@
|
|
|
105
105
|
"@testing-library/user-event": "^14.6.7",
|
|
106
106
|
"@types/hast": "^3.0.5",
|
|
107
107
|
"@types/lodash-es": "^4.17.12",
|
|
108
|
-
"@types/node": "^24.
|
|
108
|
+
"@types/node": "^24.19.0",
|
|
109
109
|
"@types/papaparse": "^5.5.2",
|
|
110
110
|
"@types/react": "19.3.0",
|
|
111
111
|
"@types/react-dom": "19.3.0",
|
|
112
112
|
"@vertesia/tsconfig": "0.1.0",
|
|
113
113
|
"axe-core": "^4.13.0",
|
|
114
114
|
"culori": "^4.0.2",
|
|
115
|
-
"i18next-cli": "^1.74.
|
|
115
|
+
"i18next-cli": "^1.74.2",
|
|
116
116
|
"jsdom": "^30.1.1",
|
|
117
|
-
"rolldown": "1.2.
|
|
117
|
+
"rolldown": "1.2.11",
|
|
118
118
|
"tailwindcss": "^4.3.3",
|
|
119
119
|
"typescript": "7.0.2",
|
|
120
|
-
"vitest": "5.0.
|
|
120
|
+
"vitest": "5.0.2",
|
|
121
121
|
"vitest-axe": "^0.1.0",
|
|
122
122
|
"wcag-contrast": "^3.0.0"
|
|
123
123
|
},
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"url": "https://github.com/vertesia/composableai.git",
|
|
194
194
|
"directory": "packages/ui"
|
|
195
195
|
},
|
|
196
|
-
"gitHead": "
|
|
196
|
+
"gitHead": "8ee3a33e9a7c3dbcd13937e971cbdcc5fad56717",
|
|
197
197
|
"scripts": {
|
|
198
198
|
"clean:lib": "rimraf ./lib ./tsconfig.tsbuildinfo",
|
|
199
199
|
"clean": "rimraf ./node_modules ./lib ./tsconfig.tsbuildinfo",
|
package/src/boot/vite.ts
CHANGED
|
@@ -79,9 +79,18 @@ export function resolveBrandingAssets(branding: AppBranding, moduleUrl: URL, wat
|
|
|
79
79
|
|
|
80
80
|
export function createAppBrandingPlugin(branding: AppBranding, moduleUrl: URL) {
|
|
81
81
|
const watched = new Set<string>();
|
|
82
|
+
let workspace: { account?: string; project?: string } = {};
|
|
82
83
|
const resolve = () => resolveBrandingAssets(branding, moduleUrl, (file) => watched.add(file));
|
|
83
84
|
return {
|
|
84
85
|
name: 'vertesia-app-branding',
|
|
86
|
+
configResolved(config: { env: Record<string, unknown> }) {
|
|
87
|
+
const account = config.env.VITE_VERTESIA_ACCOUNT_ID;
|
|
88
|
+
const project = config.env.VITE_VERTESIA_PROJECT_ID;
|
|
89
|
+
workspace = {
|
|
90
|
+
account: typeof account === 'string' ? account : undefined,
|
|
91
|
+
project: typeof project === 'string' ? project : undefined,
|
|
92
|
+
};
|
|
93
|
+
},
|
|
85
94
|
resolveId(id: string) {
|
|
86
95
|
if (id === VIRTUAL_ID) return RESOLVED_ID;
|
|
87
96
|
},
|
|
@@ -115,6 +124,12 @@ export function createAppBrandingPlugin(branding: AppBranding, moduleUrl: URL) {
|
|
|
115
124
|
`<link rel="icon" href="${escapeBrandHtml(resolved.favicon)}"></head>`,
|
|
116
125
|
);
|
|
117
126
|
}
|
|
127
|
+
// Data only: a hosting gateway can render its own trusted login without executing app code.
|
|
128
|
+
const brandData = JSON.stringify({ ...resolved, workspace }).replace(/</g, '\\u003c');
|
|
129
|
+
result = result.replace(
|
|
130
|
+
'</head>',
|
|
131
|
+
`<script type="application/json" id="vertesia-app-branding">${brandData}</script></head>`,
|
|
132
|
+
);
|
|
118
133
|
return injectBootScreenHtml(result, brandedBootOptions(resolved));
|
|
119
134
|
},
|
|
120
135
|
};
|
|
@@ -27,6 +27,7 @@ export interface Tab {
|
|
|
27
27
|
export type CanChangeTab = (nextTab: string, currentTab?: string) => boolean;
|
|
28
28
|
|
|
29
29
|
const TabsContext = React.createContext<{
|
|
30
|
+
orientation?: 'horizontal' | 'vertical';
|
|
30
31
|
size?: number;
|
|
31
32
|
tabs?: Tab[];
|
|
32
33
|
current?: string;
|
|
@@ -46,6 +47,7 @@ const TabsContext = React.createContext<{
|
|
|
46
47
|
});
|
|
47
48
|
|
|
48
49
|
interface TabsProps {
|
|
50
|
+
orientation?: 'horizontal' | 'vertical';
|
|
49
51
|
current?: string | (() => string);
|
|
50
52
|
tabs: Tab[];
|
|
51
53
|
defaultValue?: string;
|
|
@@ -61,6 +63,7 @@ interface TabsProps {
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
const Tabs = ({
|
|
66
|
+
orientation = 'horizontal',
|
|
64
67
|
tabs,
|
|
65
68
|
defaultValue,
|
|
66
69
|
current,
|
|
@@ -165,6 +168,7 @@ const Tabs = ({
|
|
|
165
168
|
return (
|
|
166
169
|
<TabsContext.Provider
|
|
167
170
|
value={{
|
|
171
|
+
orientation,
|
|
168
172
|
tabs: visibleTabs,
|
|
169
173
|
size: fullWidth ? visibleTabs.length : 0,
|
|
170
174
|
current: value,
|
|
@@ -176,6 +180,7 @@ const Tabs = ({
|
|
|
176
180
|
}}
|
|
177
181
|
>
|
|
178
182
|
<TabsPrimitive.Root
|
|
183
|
+
orientation={orientation}
|
|
179
184
|
defaultValue={value || visibleTabs[0]?.name}
|
|
180
185
|
value={value}
|
|
181
186
|
onValueChange={handleValueChange}
|
|
@@ -194,8 +199,9 @@ interface TabsBarProps {
|
|
|
194
199
|
}
|
|
195
200
|
|
|
196
201
|
const TabsBar = ({ className, sticky, direction }: TabsBarProps) => {
|
|
197
|
-
const { tabs, size, current, setTab, responsive, variant, updateHash, canChangeTab } =
|
|
202
|
+
const { tabs, size, current, setTab, responsive, variant, updateHash, canChangeTab, orientation } =
|
|
198
203
|
React.useContext(TabsContext);
|
|
204
|
+
const barDirection = direction ?? orientation ?? 'horizontal';
|
|
199
205
|
|
|
200
206
|
const fullWidth = size !== 0;
|
|
201
207
|
|
|
@@ -248,14 +254,14 @@ const TabsBar = ({ className, sticky, direction }: TabsBarProps) => {
|
|
|
248
254
|
sticky && 'sticky top-0 bg-background z-10',
|
|
249
255
|
// TabsList's `border-b -mb-px` is the rail under a ROW of tabs. In vertical
|
|
250
256
|
// mode it renders as a stray line beneath the column, so drop it here only.
|
|
251
|
-
|
|
257
|
+
barDirection === 'vertical' ? 'flex-col items-start border-b-0 mb-0' : 'flex-row',
|
|
252
258
|
responsive ? 'hidden lg:flex' : '',
|
|
253
259
|
className,
|
|
254
260
|
)}
|
|
255
261
|
>
|
|
256
262
|
{tabs.map((tab) => (
|
|
257
263
|
<TabsTrigger
|
|
258
|
-
className={cn(
|
|
264
|
+
className={cn(barDirection === 'vertical' ? 'w-full text-start' : '')}
|
|
259
265
|
key={tab.name}
|
|
260
266
|
value={tab.name}
|
|
261
267
|
disabled={tab.disabled}
|
package/src/env/index.ts
CHANGED
|
@@ -41,7 +41,16 @@ export interface EnvProps {
|
|
|
41
41
|
/** Explicitly allow legacy Firebase/central sign-in in an iframe when host authentication is unavailable. */
|
|
42
42
|
allowLegacyIframeAuth?: boolean;
|
|
43
43
|
/** Public OAuth client for independently hosted apps; ignored inside Studio or a gateway session. */
|
|
44
|
-
oauth?: {
|
|
44
|
+
oauth?: {
|
|
45
|
+
clientId: string;
|
|
46
|
+
redirectUri: string;
|
|
47
|
+
scopes?: string[];
|
|
48
|
+
offlineAccess?: boolean;
|
|
49
|
+
/** Logical authorization server, optionally including a tenant path; defaults to endpoints.sts. */
|
|
50
|
+
issuer?: string;
|
|
51
|
+
/** RFC 8707 audience, independent of the logical issuer; defaults to the discovered issuer. */
|
|
52
|
+
resource?: string;
|
|
53
|
+
};
|
|
45
54
|
firebase?: {
|
|
46
55
|
apiKey: string;
|
|
47
56
|
authDomain: string;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { McpConnectUxConfig } from '@vertesia/common';
|
|
2
|
-
import { Button } from '@vertesia/ui/core';
|
|
2
|
+
import { Button, VTooltip } from '@vertesia/ui/core';
|
|
3
3
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
4
|
import { useUserSession } from '@vertesia/ui/session';
|
|
5
|
-
import { XIcon } from 'lucide-react';
|
|
5
|
+
import { ChevronDown, ChevronUp, XIcon } from 'lucide-react';
|
|
6
|
+
import { useId, useState } from 'react';
|
|
6
7
|
import { RemoteMcpConnectionButton } from '../../oauth/RemoteMcpConnectionButton.js';
|
|
7
8
|
import { ComposerOverlay, ComposerOverlayQuestion } from './ComposerOverlay';
|
|
8
9
|
import {
|
|
9
10
|
getRequestInputDisplayText,
|
|
11
|
+
getRequestInputResolutionKey,
|
|
10
12
|
getRequestInputResponseMetadata,
|
|
11
13
|
getToolApprovalResponseMetadata,
|
|
12
14
|
type RequestInputMessageWithUx,
|
|
@@ -63,17 +65,30 @@ function McpRequestInputControls({ mcpConnect, onMcpConnected, onDecline, disabl
|
|
|
63
65
|
);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
export function AgentRequestInputOverlay({
|
|
68
|
+
export function AgentRequestInputOverlay(props: AgentRequestInputOverlayProps) {
|
|
69
|
+
if (!props.message) return null;
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<PendingRequestInputOverlay
|
|
73
|
+
{...props}
|
|
74
|
+
message={props.message}
|
|
75
|
+
key={`${props.message.workflow_run_id}:${getRequestInputResolutionKey(props.message)}`}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function PendingRequestInputOverlay({
|
|
67
81
|
message,
|
|
68
82
|
onSendMessage,
|
|
69
83
|
onMcpConnected,
|
|
70
84
|
isLoading = false,
|
|
71
85
|
disabled = false,
|
|
72
86
|
className,
|
|
73
|
-
}: AgentRequestInputOverlayProps) {
|
|
87
|
+
}: AgentRequestInputOverlayProps & { message: RequestInputMessageWithUx }) {
|
|
74
88
|
const { t } = useUITranslation();
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
const [isCollapsed, setIsCollapsed] = useState(false);
|
|
90
|
+
const contentId = useId();
|
|
91
|
+
const toggleLabel = isCollapsed ? t('agent.showQuestions') : t('agent.hideQuestions');
|
|
77
92
|
|
|
78
93
|
const uxConfig = message.details.ux;
|
|
79
94
|
const options = uxConfig.options ?? [];
|
|
@@ -86,37 +101,61 @@ export function AgentRequestInputOverlay({
|
|
|
86
101
|
sendRequestInputResponse(onSendMessage, message, value, metadata);
|
|
87
102
|
};
|
|
88
103
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
const collapseButton = (
|
|
105
|
+
<VTooltip description={toggleLabel} asChild>
|
|
106
|
+
<Button
|
|
107
|
+
variant="ghost"
|
|
108
|
+
size="icon"
|
|
109
|
+
className="size-6 shrink-0"
|
|
110
|
+
aria-label={toggleLabel}
|
|
111
|
+
aria-expanded={!isCollapsed}
|
|
112
|
+
aria-controls={contentId}
|
|
113
|
+
onClick={() => setIsCollapsed((collapsed) => !collapsed)}
|
|
114
|
+
>
|
|
115
|
+
{isCollapsed ? (
|
|
116
|
+
<ChevronUp className="size-4" aria-hidden="true" />
|
|
117
|
+
) : (
|
|
118
|
+
<ChevronDown className="size-4" aria-hidden="true" />
|
|
119
|
+
)}
|
|
120
|
+
</Button>
|
|
121
|
+
</VTooltip>
|
|
122
|
+
);
|
|
104
123
|
|
|
105
124
|
return (
|
|
106
125
|
<ComposerOverlay className={className} data-agent-request-input-overlay>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
126
|
+
{mcpConnect ? (
|
|
127
|
+
<div className="mx-auto w-full max-w-3xl px-3 py-3">
|
|
128
|
+
<div className="flex items-start gap-2">
|
|
129
|
+
<div className="min-w-0 flex-1 text-sm leading-6 text-foreground/85">{displayText}</div>
|
|
130
|
+
{collapseButton}
|
|
131
|
+
</div>
|
|
132
|
+
<div id={contentId} hidden={isCollapsed}>
|
|
133
|
+
<McpRequestInputControls
|
|
134
|
+
mcpConnect={mcpConnect}
|
|
135
|
+
onMcpConnected={(cfg) => onMcpConnected?.(cfg, getRequestInputResponseMetadata(message))}
|
|
136
|
+
onDecline={() => send(t('agent.mcpDeclinedMessage', { name: mcpConnect.name }))}
|
|
137
|
+
disabled={isDisabled}
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
) : (
|
|
142
|
+
<ComposerOverlayQuestion
|
|
143
|
+
question={displayText}
|
|
144
|
+
options={options}
|
|
145
|
+
variant={uxConfig.variant}
|
|
146
|
+
multiSelect={uxConfig.multiSelect}
|
|
147
|
+
allowFreeResponse={options.length === 0 || !!freeResponse}
|
|
148
|
+
placeholder={freeResponse?.placeholder}
|
|
149
|
+
submitLabel={freeResponse?.submit_label}
|
|
150
|
+
onSelect={(optionId) => send(optionId, getToolApprovalResponseMetadata(message, optionId))}
|
|
151
|
+
onMultiSelect={(optionIds) => send(optionIds.join(', '))}
|
|
152
|
+
onSubmit={(value) => send(value, freeResponse?.metadata)}
|
|
153
|
+
isLoading={isDisabled}
|
|
154
|
+
headerAction={collapseButton}
|
|
155
|
+
responseControlsId={contentId}
|
|
156
|
+
responseControlsHidden={isCollapsed}
|
|
157
|
+
/>
|
|
158
|
+
)}
|
|
120
159
|
</ComposerOverlay>
|
|
121
160
|
);
|
|
122
161
|
}
|