@lastbrain/ai-ui-core 1.0.12 → 1.0.14

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.
@@ -15,12 +15,12 @@ if (!LB_API_KEY) {
15
15
  * Maps internal auth routes to public API routes
16
16
  */
17
17
  function mapAuthRouteToPublicRoute(path) {
18
+ // Si le path contient déjà api/public/v1, le retourner tel quel (sans double-prefixe)
19
+ if (path.includes("api/public/v1")) {
20
+ return path.replace(/^\//, "");
21
+ }
18
22
  // Remove leading 'ai/' if present
19
23
  const cleanPath = path.startsWith("ai/") ? path.slice(3) : path;
20
- // Si le path contient déjà api/public/v1, le retourner tel quel
21
- if (cleanPath.includes("api/public/v1")) {
22
- return cleanPath;
23
- }
24
24
  // Route mapping for auth routes -> public routes
25
25
  const routeMappings = {
26
26
  // Prompts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lastbrain/ai-ui-core",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "Framework-agnostic core library for LastBrain AI UI Kit",
5
5
  "private": false,
6
6
  "type": "module",
@@ -21,14 +21,14 @@ if (!LB_API_KEY) {
21
21
  * Maps internal auth routes to public API routes
22
22
  */
23
23
  function mapAuthRouteToPublicRoute(path: string): string {
24
+ // Si le path contient déjà api/public/v1, le retourner tel quel (sans double-prefixe)
25
+ if (path.includes("api/public/v1")) {
26
+ return path.replace(/^\//, "");
27
+ }
28
+
24
29
  // Remove leading 'ai/' if present
25
30
  const cleanPath = path.startsWith("ai/") ? path.slice(3) : path;
26
31
 
27
- // Si le path contient déjà api/public/v1, le retourner tel quel
28
- if (cleanPath.includes("api/public/v1")) {
29
- return cleanPath;
30
- }
31
-
32
32
  // Route mapping for auth routes -> public routes
33
33
  const routeMappings: Record<string, string> = {
34
34
  // Prompts