@vertesia/ui 1.0.0-dev.20260225.024852Z → 1.0.0-dev.20260305.083323Z

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.
Files changed (121) hide show
  1. package/lib/esm/core/components/shadcn/selectBox.js +1 -1
  2. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js +3 -4
  3. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -1
  4. package/lib/esm/core/components/shadcn/tooltip.js +1 -1
  5. package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
  6. package/lib/esm/env/index.js +3 -0
  7. package/lib/esm/env/index.js.map +1 -1
  8. package/lib/esm/features/agent/chat/ModernAgentConversation.js +3 -3
  9. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
  10. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +8 -1
  11. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
  12. package/lib/esm/features/facets/CollectionsFacetsNav.js +2 -2
  13. package/lib/esm/features/facets/CollectionsFacetsNav.js.map +1 -1
  14. package/lib/esm/features/facets/DocumentsFacetsNav.js +2 -2
  15. package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -1
  16. package/lib/esm/features/facets/utils/TypeFacet.js +2 -2
  17. package/lib/esm/features/facets/utils/TypeFacet.js.map +1 -1
  18. package/lib/esm/features/store/collections/BrowseCollectionView.js +3 -1
  19. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
  20. package/lib/esm/features/store/collections/CreateCollection.js +13 -13
  21. package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
  22. package/lib/esm/features/store/objects/DocumentSearchResults.js +2 -1
  23. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
  24. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +3 -1
  25. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
  26. package/lib/esm/features/store/types/ContentObjectTypesSearch.js +4 -3
  27. package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -1
  28. package/lib/esm/features/store/types/SelectContentType.js +9 -9
  29. package/lib/esm/features/store/types/SelectContentType.js.map +1 -1
  30. package/lib/esm/features/store/types/SelectContentTypeModal.js +2 -2
  31. package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -1
  32. package/lib/esm/features/store/types/TypeRegistry.js.map +1 -0
  33. package/lib/esm/features/store/types/TypeRegistryProvider.js +53 -0
  34. package/lib/esm/features/store/types/TypeRegistryProvider.js.map +1 -0
  35. package/lib/esm/features/store/types/index.js +2 -0
  36. package/lib/esm/features/store/types/index.js.map +1 -1
  37. package/lib/esm/session/UserSession.js +9 -27
  38. package/lib/esm/session/UserSession.js.map +1 -1
  39. package/lib/esm/session/index.js +0 -1
  40. package/lib/esm/session/index.js.map +1 -1
  41. package/lib/esm/shell/SplashScreen.js +2 -2
  42. package/lib/esm/shell/SplashScreen.js.map +1 -1
  43. package/lib/esm/shell/VertesiaShell.js +2 -2
  44. package/lib/esm/shell/VertesiaShell.js.map +1 -1
  45. package/lib/esm/shell/login/TerminalLogin.js +1 -1
  46. package/lib/esm/shell/login/TerminalLogin.js.map +1 -1
  47. package/lib/tsconfig.tsbuildinfo +1 -1
  48. package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts +6 -1
  49. package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts.map +1 -1
  50. package/lib/types/env/index.d.ts +2 -0
  51. package/lib/types/env/index.d.ts.map +1 -1
  52. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
  53. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
  54. package/lib/types/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
  55. package/lib/types/features/facets/utils/TypeFacet.d.ts.map +1 -1
  56. package/lib/types/features/facets/utils/VTypeFacet.d.ts +1 -1
  57. package/lib/types/features/facets/utils/VTypeFacet.d.ts.map +1 -1
  58. package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
  59. package/lib/types/features/store/collections/CreateCollection.d.ts.map +1 -1
  60. package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
  61. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
  62. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
  63. package/lib/types/features/store/types/TypeRegistry.d.ts.map +1 -0
  64. package/lib/types/features/store/types/TypeRegistryProvider.d.ts +15 -0
  65. package/lib/types/features/store/types/TypeRegistryProvider.d.ts.map +1 -0
  66. package/lib/types/features/store/types/index.d.ts +2 -0
  67. package/lib/types/features/store/types/index.d.ts.map +1 -1
  68. package/lib/types/session/UserSession.d.ts +0 -4
  69. package/lib/types/session/UserSession.d.ts.map +1 -1
  70. package/lib/types/session/index.d.ts +0 -1
  71. package/lib/types/session/index.d.ts.map +1 -1
  72. package/lib/types/shell/VertesiaShell.d.ts.map +1 -1
  73. package/lib/types/shell/login/TerminalLogin.d.ts.map +1 -1
  74. package/lib/vertesia-ui-core.js +1 -1
  75. package/lib/vertesia-ui-core.js.map +1 -1
  76. package/lib/vertesia-ui-env.js +1 -1
  77. package/lib/vertesia-ui-env.js.map +1 -1
  78. package/lib/vertesia-ui-features.js +1 -1
  79. package/lib/vertesia-ui-features.js.map +1 -1
  80. package/lib/vertesia-ui-session.js +1 -1
  81. package/lib/vertesia-ui-session.js.map +1 -1
  82. package/lib/vertesia-ui-shell.js +1 -1
  83. package/lib/vertesia-ui-shell.js.map +1 -1
  84. package/llms.txt +124 -4
  85. package/package.json +29 -7
  86. package/src/core/components/shadcn/selectBox.tsx +1 -1
  87. package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +13 -8
  88. package/src/core/components/shadcn/tooltip.tsx +1 -1
  89. package/src/css/base.css +31 -0
  90. package/src/css/color.css +136 -0
  91. package/src/css/custom-tooltips.css +64 -0
  92. package/src/css/index.css +27 -0
  93. package/src/css/theme.css +86 -0
  94. package/src/css/typography.css +88 -0
  95. package/src/css/utilities.css +72 -0
  96. package/src/env/index.ts +5 -0
  97. package/src/features/agent/chat/ModernAgentConversation.tsx +84 -91
  98. package/src/features/agent/chat/ModernAgentOutput/utils.ts +7 -1
  99. package/src/features/facets/CollectionsFacetsNav.tsx +2 -2
  100. package/src/features/facets/DocumentsFacetsNav.tsx +2 -2
  101. package/src/features/facets/utils/TypeFacet.tsx +2 -2
  102. package/src/features/facets/utils/VTypeFacet.tsx +1 -1
  103. package/src/features/store/collections/BrowseCollectionView.tsx +5 -2
  104. package/src/features/store/collections/CreateCollection.tsx +36 -34
  105. package/src/features/store/objects/DocumentSearchResults.tsx +4 -2
  106. package/src/features/store/objects/upload/DocumentUploadModal.tsx +3 -1
  107. package/src/features/store/types/ContentObjectTypesSearch.tsx +4 -3
  108. package/src/features/store/types/SelectContentType.tsx +9 -9
  109. package/src/features/store/types/SelectContentTypeModal.tsx +2 -2
  110. package/src/features/store/types/TypeRegistryProvider.tsx +73 -0
  111. package/src/features/store/types/index.ts +2 -0
  112. package/src/session/UserSession.ts +9 -28
  113. package/src/session/index.ts +0 -1
  114. package/src/shell/SplashScreen.tsx +4 -2
  115. package/src/shell/VertesiaShell.tsx +10 -8
  116. package/src/shell/login/TerminalLogin.tsx +1 -2
  117. package/lib/esm/session/TypeRegistry.js.map +0 -1
  118. package/lib/types/session/TypeRegistry.d.ts.map +0 -1
  119. /package/lib/esm/{session → features/store/types}/TypeRegistry.js +0 -0
  120. /package/lib/types/{session → features/store/types}/TypeRegistry.d.ts +0 -0
  121. /package/src/{session → features/store/types}/TypeRegistry.ts +0 -0
@@ -7,7 +7,6 @@ import { Env } from '@vertesia/ui/env';
7
7
 
8
8
  import { getComposableToken } from './auth/composable';
9
9
  import { getFirebaseAuth } from './auth/firebase';
10
- import { TypeRegistry } from './TypeRegistry';
11
10
 
12
11
  import { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY } from './constants';
13
12
  export { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY };
@@ -21,7 +20,6 @@ class UserSession {
21
20
  client: VertesiaClient;
22
21
  authError?: Error;
23
22
  authToken?: AuthTokenPayload;
24
- typeRegistry?: TypeRegistry;
25
23
  setSession?: (session: UserSession) => void;
26
24
  lastSelectedAccount?: string | null;
27
25
  lastSelectedProject?: string | null;
@@ -102,11 +100,7 @@ class UserSession {
102
100
  // notify the host app of the login
103
101
  Env.onLogin?.(this.authToken);
104
102
 
105
- // Independent async calls
106
- await Promise.all([
107
- this._loadTypes(),
108
- this.fetchOnboardingStatus(),
109
- ]);
103
+ await this.fetchOnboardingStatus();
110
104
 
111
105
  return Promise.resolve();
112
106
 
@@ -131,7 +125,6 @@ class UserSession {
131
125
  this.authError = undefined;
132
126
  this.isLoading = false;
133
127
  this.authToken = undefined;
134
- this.typeRegistry = undefined;
135
128
  this.setSession = undefined;
136
129
  this.client.withAuthCallback(undefined);
137
130
 
@@ -144,15 +137,22 @@ class UserSession {
144
137
  } else {
145
138
  // Use Firebase logout directly
146
139
  console.log('Using Firebase logout');
140
+ const wasLoggedIn = !!this.authToken;
147
141
  if (this.authToken) {
148
142
  getFirebaseAuth().signOut();
149
143
  }
150
144
  this.authError = undefined;
151
145
  this.isLoading = false;
152
146
  this.authToken = undefined;
153
- this.typeRegistry = undefined;
154
147
  this.setSession = undefined;
155
148
  this.client.withAuthCallback(undefined);
149
+ // Navigate to root to avoid React rendering errors when
150
+ // unmounting deeply nested route components during logout.
151
+ // Only navigate if user was actually logged in to avoid
152
+ // infinite reload loop on fresh/incognito sessions.
153
+ if (wasLoggedIn) {
154
+ location.replace("/");
155
+ }
156
156
  }
157
157
  }
158
158
 
@@ -177,24 +177,6 @@ class UserSession {
177
177
  window.location.replace('/?a=' + this.account?.id + '&p=' + targetProjectId);
178
178
  }
179
179
 
180
- async _loadTypes() {
181
- if (this.project) {
182
- return this.store.types.catalog.list({ layout: true }).then(types => this.typeRegistry = new TypeRegistry(types)).catch(err => {
183
- //return this.store.types.list({}, { layout: true }).then(types => this.typeRegistry = new TypeRegistry(types)).catch(err => {
184
- console.error('Failed to fetch object types', err);
185
- throw err;
186
- })
187
- } else {
188
- console.log('No project selected');
189
- }
190
- }
191
-
192
- async reloadTypes() {
193
- return this._loadTypes().then(() => {
194
- this.setSession?.(this.clone());
195
- });
196
- }
197
-
198
180
  async fetchAccounts() {
199
181
  return this.client.accounts.list().then(accounts => {
200
182
  if (!this.authToken) {
@@ -237,7 +219,6 @@ class UserSession {
237
219
  session.setSession = this.setSession;
238
220
  session.lastSelectedAccount = this.lastSelectedAccount;
239
221
  session.switchAccount = this.switchAccount;
240
- session.typeRegistry = this.typeRegistry;
241
222
  session.onboardingComplete = this.onboardingComplete;
242
223
  return session;
243
224
  }
@@ -2,7 +2,6 @@ export * from "./auth/composable";
2
2
  export * from "./auth/useCurrentTenant";
3
3
  export * from "./auth/useAuthState";
4
4
  export * from "./auth/firebase";
5
- export * from "./TypeRegistry";
6
5
  export * from "./UserSession";
7
6
  export * from "./UserSessionProvider";
8
7
  export * from "./useUXTracking";
@@ -30,8 +30,8 @@ export function SplashScreen({ icon: Icon }: SplashScreenProps) {
30
30
  leaveFrom="opacity-100"
31
31
  leaveTo="opacity-0"
32
32
  >
33
- <div style={{ zIndex: 999999 }} className='fixed inset-x-0 inset-y-0'>
34
- <div className="flex w-full h-full items-center justify-center">
33
+ <div style={{ zIndex: 999999, position: 'fixed', inset: 0 }} className='fixed inset-x-0 inset-y-0'>
34
+ <div style={{ display: 'flex', width: '100%', height: '100%', alignItems: 'center', justifyContent: 'center' }} className="flex w-full h-full items-center justify-center">
35
35
  <div className="animate-[spin_4s_linear_infinite]">
36
36
  <div className='animate-pulse rounded-full bg-transparent'>
37
37
  {Icon || <LoadingIcon />}
@@ -50,6 +50,8 @@ function LoadingIcon() {
50
50
  // const stopColor2 = "#4F46E5";
51
51
  return (
52
52
  <svg
53
+ width="32"
54
+ height="32"
53
55
  className="w-8 h-8 text-indigo-600"
54
56
  viewBox="0 0 50 50"
55
57
  xmlns="http://www.w3.org/2000/svg"
@@ -1,5 +1,5 @@
1
1
  import { ThemeProvider, ToastProvider } from "@vertesia/ui/core";
2
- import { UserPermissionProvider } from "@vertesia/ui/features";
2
+ import { UserPermissionProvider, TypeRegistryProvider } from "@vertesia/ui/features";
3
3
  import { UserSessionProvider } from "@vertesia/ui/session";
4
4
  import { SplashScreen } from "./SplashScreen";
5
5
  import { SigninScreen } from "./login/SigninScreen";
@@ -16,13 +16,15 @@ export function VertesiaShell({ children, lightLogo, darkLogo, loadingIcon }: Ve
16
16
  return (
17
17
  <ToastProvider>
18
18
  <UserSessionProvider>
19
- <ThemeProvider defaultTheme="system" storageKey="vite-ui-theme">
20
- <SplashScreen icon={loadingIcon} />
21
- <SigninScreen allowedPrefix="/shared/" lightLogo={lightLogo} darkLogo={darkLogo} />
22
- <UserPermissionProvider>
23
- {children}
24
- </UserPermissionProvider>
25
- </ThemeProvider>
19
+ <TypeRegistryProvider>
20
+ <ThemeProvider defaultTheme="system" storageKey="vite-ui-theme">
21
+ <SplashScreen icon={loadingIcon} />
22
+ <SigninScreen allowedPrefix="/shared/" lightLogo={lightLogo} darkLogo={darkLogo} />
23
+ <UserPermissionProvider>
24
+ {children}
25
+ </UserPermissionProvider>
26
+ </ThemeProvider>
27
+ </TypeRegistryProvider>
26
28
  </UserSessionProvider>
27
29
  </ToastProvider>
28
30
  )
@@ -1,10 +1,9 @@
1
- import { useState } from 'react'
2
-
3
1
  import { AccountRef, ProjectRef } from '@vertesia/common'
4
2
  import { Button, Center, ErrorBox, Input, SelectBox, Spinner, useFetch, useToast } from '@vertesia/ui/core'
5
3
  import { Env } from "@vertesia/ui/env"
6
4
  import { useLocation } from "@vertesia/ui/router"
7
5
  import { fetchComposableTokenFromFirebaseToken, useUserSession } from '@vertesia/ui/session'
6
+ import { useState } from 'react'
8
7
 
9
8
  interface ProfileData {
10
9
  profile?: string
@@ -1 +0,0 @@
1
- {"version":3,"file":"TypeRegistry.js","sourceRoot":"","sources":["../../../src/session/TypeRegistry.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,YAAY;IAEF;IADnB,GAAG,GAA0C,EAAE,CAAC;IAChD,YAAmB,KAA8B;QAA9B,UAAK,GAAL,KAAK,CAAyB;QAC7C,YAAY;QACZ,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;QAClD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;QAC7B,CAAC;IACL,CAAC;IAED,OAAO,CAAC,EAAU;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;IAED,aAAa,CAAC,EAAU;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;IAChD,CAAC;IAED,WAAW,CAAC,EAAU;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACxC,CAAC;CAEJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TypeRegistry.d.ts","sourceRoot":"","sources":["../../../src/session/TypeRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,qBAAa,YAAY;IAEF,KAAK,EAAE,qBAAqB,EAAE;IADjD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAM;gBAC7B,KAAK,EAAE,qBAAqB,EAAE;IAQjD,OAAO,CAAC,EAAE,EAAE,MAAM;IAIlB,aAAa,CAAC,EAAE,EAAE,MAAM;IAKxB,WAAW,CAAC,EAAE,EAAE,MAAM;CAKzB"}