@burdenoff/microfe-botmanor 2026.821.1 → 2026.925.1
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/dist/botlit/BotlitRoutes.js.map +1 -1
- package/dist/botlit/BotmanorRoot.js.map +1 -1
- package/dist/botlit/BotmanorRootInner.js +4 -4
- package/dist/botlit/BotmanorRootInner.js.map +1 -1
- package/dist/botlit/components/ErrorState.js +33 -29
- package/dist/botlit/components/ErrorState.js.map +1 -1
- package/dist/botlit/components/RouteLoader.js +52 -48
- package/dist/botlit/components/RouteLoader.js.map +1 -1
- package/dist/botlit/components/VersionHistoryPanel.js +74 -77
- package/dist/botlit/components/VersionHistoryPanel.js.map +1 -1
- package/dist/botlit/components/WorkspaceRequired.js +31 -30
- package/dist/botlit/components/WorkspaceRequired.js.map +1 -1
- package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -1
- package/dist/botlit/hooks/useConversations.js.map +1 -1
- package/dist/botlit/hooks/useLLMProviders.js.map +1 -1
- package/dist/botlit/pages/A2AAgentDetailPage.js +1 -1
- package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/A2ARegistryPage.js +116 -124
- package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
- package/dist/botlit/pages/AgentDetailPage.js +169 -172
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/AgentsListPage.js +96 -90
- package/dist/botlit/pages/AgentsListPage.js.map +1 -1
- package/dist/botlit/pages/BotChannelsTab.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +228 -231
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/botlit/pages/BotWorkflowTab.js +84 -87
- package/dist/botlit/pages/BotWorkflowTab.js.map +1 -1
- package/dist/botlit/pages/BotsListPage.js +144 -147
- package/dist/botlit/pages/BotsListPage.js.map +1 -1
- package/dist/botlit/pages/BucketsPage.js +3 -3
- package/dist/botlit/pages/BucketsPage.js.map +1 -1
- package/dist/botlit/pages/ChannelDetailPage.js +1 -1
- package/dist/botlit/pages/ChannelDetailPage.js.map +1 -1
- package/dist/botlit/pages/ChannelsPage.js +156 -149
- package/dist/botlit/pages/ChannelsPage.js.map +1 -1
- package/dist/botlit/pages/ChatPage.js +126 -129
- package/dist/botlit/pages/ChatPage.js.map +1 -1
- package/dist/botlit/pages/DashboardPage.js +111 -114
- package/dist/botlit/pages/DashboardPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionsPage.js +163 -159
- package/dist/botlit/pages/ExecutionsPage.js.map +1 -1
- package/dist/botlit/pages/InstalledPackagesPage.js +3 -3
- package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
- package/dist/botlit/pages/KnowledgeBasesPage.js +84 -78
- package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
- package/dist/botlit/pages/MCPServersPage.js +159 -154
- package/dist/botlit/pages/MCPServersPage.js.map +1 -1
- package/dist/botlit/pages/PoliciesPage.js +119 -114
- package/dist/botlit/pages/PoliciesPage.js.map +1 -1
- package/dist/botlit/pages/RetrievalProfilesPage.js +102 -109
- package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -1
- package/dist/botlit/pages/SettingsPage.js +144 -159
- package/dist/botlit/pages/SettingsPage.js.map +1 -1
- package/dist/botlit/pages/SkillsPage.js +122 -105
- package/dist/botlit/pages/SkillsPage.js.map +1 -1
- package/dist/botlit/pages/StorePage.js +176 -175
- package/dist/botlit/pages/StorePage.js.map +1 -1
- package/dist/botlit/providers/BotlitProvider.js.map +1 -1
- package/dist/botlit/store/botlitStore.js +1 -1
- package/dist/botlit/store/botlitStore.js.map +1 -1
- package/dist/botlit/utils/navigation.js.map +1 -1
- package/dist/shared/hooks/useTr.js +14 -0
- package/dist/shared/hooks/useTr.js.map +1 -0
- package/package.json +33 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BotlitProvider.js","names":[],"sources":["../../../src/botlit/providers/BotlitProvider.tsx"],"sourcesContent":["/**\n *
|
|
1
|
+
{"version":3,"file":"BotlitProvider.js","names":[],"sources":["../../../src/botlit/providers/BotlitProvider.tsx"],"sourcesContent":["/**\n * BotManor Context Provider\n * @module botlit/providers\n */\n\nimport type { FC, PropsWithChildren } from 'react';\nimport { createContext, useContext, useMemo, useCallback } from 'react';\nimport { MemoryRouter, useNavigate as useRouterNavigate } from 'react-router';\nimport type { BotmanorRootProps } from '../types';\nimport { joinPath } from '../utils/navigation';\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface BotlitContextValue extends Omit<\n BotmanorRootProps,\n 'registerNavItems' | 'registerFooterItems' | 'navigate'\n> {\n isStandalone: boolean;\n /** Shell's navigate function (only available in integrated mode) */\n navigate?: (path: string) => void;\n /** Navigate to a path relative to basePath */\n navigateTo: (relativePath: string) => void;\n /** Get the full path for a relative path */\n getPath: (relativePath: string) => string;\n}\n\nconst BotlitContext = createContext<BotlitContextValue | null>(null);\n\n// ============================================================================\n// Hook\n// ============================================================================\n\nexport function useBotlit(): BotlitContextValue {\n const context = useContext(BotlitContext);\n if (!context) {\n throw new Error('useBotlit must be used within a BotlitProvider');\n }\n return context;\n}\n\n// ============================================================================\n// Provider Component\n// ============================================================================\n\ntype ProviderProps = Omit<BotmanorRootProps, 'registerNavItems' | 'registerFooterItems'> & {\n isStandalone: boolean;\n};\n\n/** Provider for standalone mode (has access to MemoryRouter) */\nconst StandaloneProviderInner: FC<PropsWithChildren<ProviderProps>> = ({\n children,\n basePath,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onBotSelect,\n onAgentSelect,\n}) => {\n // Always call hooks unconditionally in this component\n const routerNavigate = useRouterNavigate();\n const effectiveBasePath = basePath || '/';\n\n const getPath = useCallback(\n (relativePath: string) => joinPath(effectiveBasePath, relativePath),\n [effectiveBasePath]\n );\n\n const navigateTo = useCallback(\n (relativePath: string) => {\n const fullPath = joinPath(effectiveBasePath, relativePath);\n routerNavigate(fullPath);\n },\n [effectiveBasePath, routerNavigate]\n );\n\n const contextValue = useMemo<BotlitContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate: undefined,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onBotSelect,\n onAgentSelect,\n isStandalone: true,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onBotSelect,\n onAgentSelect,\n navigateTo,\n getPath,\n ]\n );\n\n return <BotlitContext.Provider value={contextValue}>{children}</BotlitContext.Provider>;\n};\n\n/** Provider for integrated mode (shell provides navigate) */\nconst IntegratedProviderInner: FC<\n PropsWithChildren<ProviderProps & { navigate: (path: string) => void }>\n> = ({\n children,\n basePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onBotSelect,\n onAgentSelect,\n}) => {\n const effectiveBasePath = basePath || '/';\n\n const getPath = useCallback(\n (relativePath: string) => joinPath(effectiveBasePath, relativePath),\n [effectiveBasePath]\n );\n\n const navigateTo = useCallback(\n (relativePath: string) => {\n const fullPath = joinPath(effectiveBasePath, relativePath);\n navigate(fullPath);\n },\n [effectiveBasePath, navigate]\n );\n\n const contextValue = useMemo<BotlitContextValue>(\n () => ({\n basePath: effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onBotSelect,\n onAgentSelect,\n isStandalone: false,\n navigateTo,\n getPath,\n }),\n [\n effectiveBasePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n onBotSelect,\n onAgentSelect,\n navigateTo,\n getPath,\n ]\n );\n\n return <BotlitContext.Provider value={contextValue}>{children}</BotlitContext.Provider>;\n};\n\nexport const BotlitProvider: FC<PropsWithChildren<BotmanorRootProps>> = (props) => {\n const { children, navigate } = props;\n // Standalone mode: no navigate function provided (MFE manages its own router)\n // Integrated mode: navigate function provided by shell (shell provides router)\n const isStandalone = !navigate;\n\n // Standalone mode: wrap in MemoryRouter\n if (isStandalone) {\n return (\n <MemoryRouter>\n <StandaloneProviderInner {...props} isStandalone={true}>\n {children}\n </StandaloneProviderInner>\n </MemoryRouter>\n );\n }\n\n // Integrated mode: shell provides router\n return (\n <IntegratedProviderInner {...props} navigate={navigate} isStandalone={false}>\n {children}\n </IntegratedProviderInner>\n );\n};\n"],"mappings":";;;;;AA4BA,IAAM,IAAgB,EAAyC,KAAK;AAMpE,SAAgB,IAAgC;CAC9C,IAAM,IAAU,EAAW,EAAc;AACzC,KAAI,CAAC,EACH,OAAU,MAAM,iDAAiD;AAEnE,QAAO;;AAYT,IAAM,KAAiE,EACrE,aACA,aACA,gBACA,aACA,gBACA,kBACA,cACA,gBACA,uBACI;CAEJ,IAAM,IAAiB,GAAmB,EACpC,IAAoB,KAAY,KAEhC,IAAU,GACb,MAAyB,EAAS,GAAmB,EAAa,EACnE,CAAC,EAAkB,CACpB,EAEK,IAAa,GAChB,MAAyB;AAExB,IADiB,EAAS,GAAmB,EAAa,CAClC;IAE1B,CAAC,GAAmB,EAAe,CACpC,EAEK,IAAe,SACZ;EACL,UAAU;EACV,UAAU,KAAA;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAED,QAAO,kBAAC,EAAc,UAAf;EAAwB,OAAO;EAAe;EAAkC,CAAA;GAInF,KAED,EACH,aACA,aACA,aACA,gBACA,aACA,gBACA,kBACA,cACA,gBACA,uBACI;CACJ,IAAM,IAAoB,KAAY,KAEhC,IAAU,GACb,MAAyB,EAAS,GAAmB,EAAa,EACnE,CAAC,EAAkB,CACpB,EAEK,IAAa,GAChB,MAAyB;AAExB,IADiB,EAAS,GAAmB,EAAa,CACxC;IAEpB,CAAC,GAAmB,EAAS,CAC9B,EAEK,IAAe,SACZ;EACL,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAED,QAAO,kBAAC,EAAc,UAAf;EAAwB,OAAO;EAAe;EAAkC,CAAA;GAG5E,KAA4D,MAAU;CACjF,IAAM,EAAE,aAAU,gBAAa;AAiB/B,QAdsB,IAepB,kBAAC,GAAD;EAAyB,GAAI;EAAiB;EAAU,cAAc;EACnE;EACuB,CAAA,GAZxB,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EAAyB,GAAI;EAAO,cAAc;EAC/C;EACuB,CAAA,EACb,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"botlitStore.js","names":[],"sources":["../../../src/botlit/store/botlitStore.ts"],"sourcesContent":["/**\n *
|
|
1
|
+
{"version":3,"file":"botlitStore.js","names":[],"sources":["../../../src/botlit/store/botlitStore.ts"],"sourcesContent":["/**\n * BotManor Zustand Store\n * @module botlit/store\n */\n\nimport { create } from 'zustand';\nimport { devtools, persist } from 'zustand/middleware';\nimport { createProfileScopedStorage } from '@burdenoff/fe-libs/shared/utils';\nimport type {\n BotSummary,\n AgentSummary,\n KnowledgeBaseSummary,\n Conversation,\n ViewMode,\n BotFilter,\n AgentFilter,\n BaseFilter,\n} from '../types';\n\n// ConversationFilter extends BaseFilter with conversation-specific fields\ninterface ConversationFilter extends BaseFilter {\n botId?: string;\n agentId?: string;\n}\n\n// ============================================================================\n// State Interface\n// ============================================================================\n\ninterface BotlitState {\n // View state\n viewMode: ViewMode;\n sidebarCollapsed: boolean;\n activeTab: string;\n\n // Selected entities\n selectedBot: BotSummary | null;\n selectedAgent: AgentSummary | null;\n selectedKnowledgeBase: KnowledgeBaseSummary | null;\n selectedConversation: Conversation | null;\n\n // Filters\n botFilter: BotFilter;\n agentFilter: AgentFilter;\n conversationFilter: ConversationFilter;\n\n // UI State\n isCreatingBot: boolean;\n isCreatingAgent: boolean;\n isUploadingDocument: boolean;\n isChatOpen: boolean;\n chatAgentId: string | null;\n\n // Recent items\n recentBots: string[];\n recentAgents: string[];\n recentConversations: string[];\n\n // Actions\n setViewMode: (mode: ViewMode) => void;\n toggleSidebar: () => void;\n setActiveTab: (tab: string) => void;\n\n setSelectedBot: (bot: BotSummary | null) => void;\n setSelectedAgent: (agent: AgentSummary | null) => void;\n setSelectedKnowledgeBase: (kb: KnowledgeBaseSummary | null) => void;\n setSelectedConversation: (conversation: Conversation | null) => void;\n\n updateBotFilter: (filter: Partial<BotFilter>) => void;\n updateAgentFilter: (filter: Partial<AgentFilter>) => void;\n updateConversationFilter: (filter: Partial<ConversationFilter>) => void;\n resetFilters: () => void;\n\n setIsCreatingBot: (value: boolean) => void;\n setIsCreatingAgent: (value: boolean) => void;\n setIsUploadingDocument: (value: boolean) => void;\n openChat: (agentId: string) => void;\n closeChat: () => void;\n\n addRecentBot: (botId: string) => void;\n addRecentAgent: (agentId: string) => void;\n addRecentConversation: (conversationId: string) => void;\n\n reset: () => void;\n}\n\n// ============================================================================\n// Initial State\n// ============================================================================\n\nconst initialState = {\n viewMode: 'grid' as ViewMode,\n sidebarCollapsed: false,\n activeTab: 'bots',\n\n selectedBot: null,\n selectedAgent: null,\n selectedKnowledgeBase: null,\n selectedConversation: null,\n\n botFilter: {\n search: '',\n status: undefined,\n sortBy: 'updatedAt' as const,\n sortOrder: 'desc' as const,\n },\n agentFilter: {\n search: '',\n appId: undefined,\n type: undefined,\n status: undefined,\n sortBy: 'updatedAt' as const,\n sortOrder: 'desc' as const,\n },\n conversationFilter: {\n search: '',\n botId: undefined,\n agentId: undefined,\n status: undefined,\n sortBy: 'updatedAt' as const,\n sortOrder: 'desc' as const,\n },\n\n isCreatingBot: false,\n isCreatingAgent: false,\n isUploadingDocument: false,\n isChatOpen: false,\n chatAgentId: null,\n\n recentBots: [] as string[],\n recentAgents: [] as string[],\n recentConversations: [] as string[],\n};\n\n// ============================================================================\n// Store\n// ============================================================================\n\nexport const useBotlitStore = create<BotlitState>()(\n devtools(\n persist(\n (set) => ({\n ...initialState,\n\n // View actions\n setViewMode: (mode) => set({ viewMode: mode }),\n toggleSidebar: () => set((state) => ({ sidebarCollapsed: !state.sidebarCollapsed })),\n setActiveTab: (tab) => set({ activeTab: tab }),\n\n // Selection actions\n setSelectedBot: (bot) => set({ selectedBot: bot }),\n setSelectedAgent: (agent) => set({ selectedAgent: agent }),\n setSelectedKnowledgeBase: (kb) => set({ selectedKnowledgeBase: kb }),\n setSelectedConversation: (conversation) => set({ selectedConversation: conversation }),\n\n // Filter actions\n updateBotFilter: (filter) =>\n set((state) => ({\n botFilter: { ...state.botFilter, ...filter },\n })),\n updateAgentFilter: (filter) =>\n set((state) => ({\n agentFilter: { ...state.agentFilter, ...filter },\n })),\n updateConversationFilter: (filter) =>\n set((state) => ({\n conversationFilter: { ...state.conversationFilter, ...filter },\n })),\n resetFilters: () =>\n set({\n botFilter: initialState.botFilter,\n agentFilter: initialState.agentFilter,\n conversationFilter: initialState.conversationFilter,\n }),\n\n // UI state actions\n setIsCreatingBot: (value) => set({ isCreatingBot: value }),\n setIsCreatingAgent: (value) => set({ isCreatingAgent: value }),\n setIsUploadingDocument: (value) => set({ isUploadingDocument: value }),\n openChat: (agentId) => set({ isChatOpen: true, chatAgentId: agentId }),\n closeChat: () => set({ isChatOpen: false, chatAgentId: null }),\n\n // Recent items actions\n addRecentBot: (botId) =>\n set((state) => ({\n recentBots: [botId, ...state.recentBots.filter((id) => id !== botId)].slice(0, 10),\n })),\n addRecentAgent: (agentId) =>\n set((state) => ({\n recentAgents: [agentId, ...state.recentAgents.filter((id) => id !== agentId)].slice(\n 0,\n 10\n ),\n })),\n addRecentConversation: (conversationId) =>\n set((state) => ({\n recentConversations: [\n conversationId,\n ...state.recentConversations.filter((id) => id !== conversationId),\n ].slice(0, 10),\n })),\n\n // Reset\n reset: () => set(initialState),\n }),\n {\n name: 'burdenoff-botlit-storage',\n storage: createProfileScopedStorage(),\n partialize: (state) => ({\n viewMode: state.viewMode,\n sidebarCollapsed: state.sidebarCollapsed,\n recentBots: state.recentBots,\n recentAgents: state.recentAgents,\n recentConversations: state.recentConversations,\n }),\n }\n ),\n { name: 'BotManor Store', enabled: import.meta.env?.DEV === true }\n )\n);\n"],"mappings":";;;;AA0FA,IAAM,IAAe;CACnB,UAAU;CACV,kBAAkB;CAClB,WAAW;CAEX,aAAa;CACb,eAAe;CACf,uBAAuB;CACvB,sBAAsB;CAEtB,WAAW;EACT,QAAQ;EACR,QAAQ,KAAA;EACR,QAAQ;EACR,WAAW;EACZ;CACD,aAAa;EACX,QAAQ;EACR,OAAO,KAAA;EACP,MAAM,KAAA;EACN,QAAQ,KAAA;EACR,QAAQ;EACR,WAAW;EACZ;CACD,oBAAoB;EAClB,QAAQ;EACR,OAAO,KAAA;EACP,SAAS,KAAA;EACT,QAAQ,KAAA;EACR,QAAQ;EACR,WAAW;EACZ;CAED,eAAe;CACf,iBAAiB;CACjB,qBAAqB;CACrB,YAAY;CACZ,aAAa;CAEb,YAAY,EAAE;CACd,cAAc,EAAE;CAChB,qBAAqB,EAAE;CACxB,EAMY,IAAiB,GAAqB,CACjD,EACE,GACG,OAAS;CACR,GAAG;CAGH,cAAc,MAAS,EAAI,EAAE,UAAU,GAAM,CAAC;CAC9C,qBAAqB,GAAK,OAAW,EAAE,kBAAkB,CAAC,EAAM,kBAAkB,EAAE;CACpF,eAAe,MAAQ,EAAI,EAAE,WAAW,GAAK,CAAC;CAG9C,iBAAiB,MAAQ,EAAI,EAAE,aAAa,GAAK,CAAC;CAClD,mBAAmB,MAAU,EAAI,EAAE,eAAe,GAAO,CAAC;CAC1D,2BAA2B,MAAO,EAAI,EAAE,uBAAuB,GAAI,CAAC;CACpE,0BAA0B,MAAiB,EAAI,EAAE,sBAAsB,GAAc,CAAC;CAGtF,kBAAkB,MAChB,GAAK,OAAW,EACd,WAAW;EAAE,GAAG,EAAM;EAAW,GAAG;EAAQ,EAC7C,EAAE;CACL,oBAAoB,MAClB,GAAK,OAAW,EACd,aAAa;EAAE,GAAG,EAAM;EAAa,GAAG;EAAQ,EACjD,EAAE;CACL,2BAA2B,MACzB,GAAK,OAAW,EACd,oBAAoB;EAAE,GAAG,EAAM;EAAoB,GAAG;EAAQ,EAC/D,EAAE;CACL,oBACE,EAAI;EACF,WAAW,EAAa;EACxB,aAAa,EAAa;EAC1B,oBAAoB,EAAa;EAClC,CAAC;CAGJ,mBAAmB,MAAU,EAAI,EAAE,eAAe,GAAO,CAAC;CAC1D,qBAAqB,MAAU,EAAI,EAAE,iBAAiB,GAAO,CAAC;CAC9D,yBAAyB,MAAU,EAAI,EAAE,qBAAqB,GAAO,CAAC;CACtE,WAAW,MAAY,EAAI;EAAE,YAAY;EAAM,aAAa;EAAS,CAAC;CACtE,iBAAiB,EAAI;EAAE,YAAY;EAAO,aAAa;EAAM,CAAC;CAG9D,eAAe,MACb,GAAK,OAAW,EACd,YAAY,CAAC,GAAO,GAAG,EAAM,WAAW,QAAQ,MAAO,MAAO,EAAM,CAAC,CAAC,MAAM,GAAG,GAAG,EACnF,EAAE;CACL,iBAAiB,MACf,GAAK,OAAW,EACd,cAAc,CAAC,GAAS,GAAG,EAAM,aAAa,QAAQ,MAAO,MAAO,EAAQ,CAAC,CAAC,MAC5E,GACA,GACD,EACF,EAAE;CACL,wBAAwB,MACtB,GAAK,OAAW,EACd,qBAAqB,CACnB,GACA,GAAG,EAAM,oBAAoB,QAAQ,MAAO,MAAO,EAAe,CACnE,CAAC,MAAM,GAAG,GAAG,EACf,EAAE;CAGL,aAAa,EAAI,EAAa;CAC/B,GACD;CACE,MAAM;CACN,SAAS,GAA4B;CACrC,aAAa,OAAW;EACtB,UAAU,EAAM;EAChB,kBAAkB,EAAM;EACxB,YAAY,EAAM;EAClB,cAAc,EAAM;EACpB,qBAAqB,EAAM;EAC5B;CACF,CACF,EACD;CAAE,MAAM;CAAkB,SAAS;CAA+B,CACnE,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","names":[],"sources":["../../../src/botlit/utils/navigation.ts"],"sourcesContent":["/**\n * Navigation utilities for the
|
|
1
|
+
{"version":3,"file":"navigation.js","names":[],"sources":["../../../src/botlit/utils/navigation.ts"],"sourcesContent":["/**\n * Navigation utilities for the BotManor microfrontend\n * @module botlit/utils\n */\n\n/**\n * Join basePath with a relative path, correctly handling slashes\n *\n * @param basePath - The base path (e.g., '/' or '/botlit')\n * @param relativePath - The relative path (e.g., 'bots/new' or '/bots/new')\n * @returns The joined path (e.g., '/botlit/bots/new')\n *\n * @example\n * joinPath('/', 'bots/new') // => '/bots/new'\n * joinPath('/', '/bots/new') // => '/bots/new'\n * joinPath('/botlit', 'bots') // => '/botlit/bots'\n * joinPath('/botlit/', 'bots') // => '/botlit/bots'\n * joinPath('/botlit', '') // => '/botlit'\n */\nexport function joinPath(basePath: string, relativePath: string): string {\n // Remove trailing slash from base\n const cleanBase = basePath.endsWith('/') ? basePath.slice(0, -1) : basePath;\n\n // Handle empty relative path (go to base)\n if (!relativePath || relativePath === '') {\n return cleanBase || '/';\n }\n\n // Ensure relative path starts with /\n const cleanPath = relativePath.startsWith('/') ? relativePath : `/${relativePath}`;\n\n // Join them\n return cleanBase + cleanPath;\n}\n"],"mappings":";AAmBA,SAAgB,EAAS,GAAkB,GAA8B;CAEvE,IAAM,IAAY,EAAS,SAAS,IAAI,GAAG,EAAS,MAAM,GAAG,GAAG,GAAG;AAWnE,QARI,CAAC,KAAgB,MAAiB,KAC7B,KAAa,MAOf,KAHW,EAAa,WAAW,IAAI,GAAG,IAAe,IAAI"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useCallback as e } from "react";
|
|
2
|
+
import { useI18n as t } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
|
+
//#region src/shared/hooks/useTr.ts
|
|
4
|
+
function n() {
|
|
5
|
+
let { t: n } = t();
|
|
6
|
+
return e((e, t, r) => {
|
|
7
|
+
let i = n(e), a = i === e ? t : i;
|
|
8
|
+
return r ? Object.entries(r).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${t}\\}\\}`, "g"), String(n)), a) : a;
|
|
9
|
+
}, [n]);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as useTr };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=useTr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTr.js","names":[],"sources":["../../../src/shared/hooks/useTr.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\n/**\n * useTr — translation hook with fallback semantics.\n *\n * Wraps `useI18n().t()` so that when a key has no translation (i.e. the\n * provider returns the key itself), the caller's English fallback is used\n * instead. This keeps consumer call sites consistent and avoids leaking\n * untranslated keys into the UI.\n *\n * Supports optional interpolation params using `{{key}}` placeholders.\n *\n * @example\n * const tr = useTr();\n * return <h1>{tr('botlit.dashboard.title', 'Dashboard')}</h1>;\n * return <p>{tr('botlit.delete.confirm', 'Delete {{count}} items?', { count: 5 })}</p>;\n */\nexport function useTr(): (\n key: string,\n fallback: string,\n params?: Record<string, string | number>\n) => string {\n const { t } = useI18n();\n return useCallback(\n (key: string, fallback: string, params?: Record<string, string | number>): string => {\n const translated = t(key);\n const raw = translated === key ? fallback : translated;\n if (!params) return raw;\n return Object.entries(params).reduce(\n (str, [k, v]) => str.replace(new RegExp(`\\\\{\\\\{${k}\\\\}\\\\}`, 'g'), String(v)),\n raw\n );\n },\n [t]\n );\n}\n"],"mappings":";;;AAkBA,SAAgB,IAIJ;CACV,IAAM,EAAE,SAAM,GAAS;AACvB,QAAO,GACJ,GAAa,GAAkB,MAAqD;EACnF,IAAM,IAAa,EAAE,EAAI,EACnB,IAAM,MAAe,IAAM,IAAW;AAE5C,SADK,IACE,OAAO,QAAQ,EAAO,CAAC,QAC3B,GAAK,CAAC,GAAG,OAAO,EAAI,QAAY,OAAO,SAAS,EAAE,SAAS,IAAI,EAAE,OAAO,EAAE,CAAC,EAC5E,EACD,GAJmB;IAMtB,CAAC,EAAE,CACJ"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-botmanor",
|
|
3
|
-
"version": "2026.
|
|
4
|
-
"description": "Burdenoff
|
|
3
|
+
"version": "2026.925.1",
|
|
4
|
+
"description": "Burdenoff BotManor Microfrontend - AI Agent platform interface for building, deploying and managing AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -84,16 +84,16 @@
|
|
|
84
84
|
"eslint-plugin-react-refresh": "^0.5.0",
|
|
85
85
|
"jsdom": "^26.1.0",
|
|
86
86
|
"lefthook": "^2.1.1",
|
|
87
|
-
"postcss": "^8.
|
|
87
|
+
"postcss": "^8.5.23",
|
|
88
88
|
"prettier": "^3.4.2",
|
|
89
89
|
"sonner": "^2.0.7",
|
|
90
90
|
"storybook": "^8.6.0",
|
|
91
91
|
"tailwindcss": "^4.0.0",
|
|
92
92
|
"typescript": "^5.9.0",
|
|
93
93
|
"typescript-eslint": "^8.56.0",
|
|
94
|
-
"vite": "8.0.8",
|
|
94
|
+
"vite": "^8.0.8",
|
|
95
95
|
"vite-plugin-dts": "3.9.1",
|
|
96
|
-
"vitest": "^3.2.
|
|
96
|
+
"vitest": "^3.2.7"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"@apollo/client": "^4.0.11",
|
|
@@ -116,18 +116,42 @@
|
|
|
116
116
|
"overrides": {
|
|
117
117
|
"lodash": ">=4.17.21",
|
|
118
118
|
"lodash-es": ">=4.17.21",
|
|
119
|
-
"dompurify": ">=3.
|
|
119
|
+
"dompurify": ">=3.4.13",
|
|
120
120
|
"fast-xml-parser": ">=4.5.5",
|
|
121
121
|
"@xmldom/xmldom": ">=0.8.12",
|
|
122
122
|
"swiper": ">=12.1.2",
|
|
123
123
|
"brace-expansion": ">=1.1.13",
|
|
124
124
|
"follow-redirects": ">=1.15.12",
|
|
125
125
|
"smol-toml": ">=1.6.1",
|
|
126
|
-
"axios": ">=1.
|
|
126
|
+
"axios": ">=1.18.0",
|
|
127
127
|
"flatted": ">=3.4.1",
|
|
128
128
|
"yaml": ">=2.8.3",
|
|
129
129
|
"picomatch": ">=2.3.2",
|
|
130
|
-
"immutable": ">=
|
|
131
|
-
"minimatch": ">=
|
|
130
|
+
"immutable": ">=5.1.8",
|
|
131
|
+
"minimatch": ">=10.2.1",
|
|
132
|
+
"uuid": ">=11.1.1",
|
|
133
|
+
"esbuild": ">=0.28.1",
|
|
134
|
+
"js-yaml": ">=3.15.1 <4.0.0",
|
|
135
|
+
"nanoid": ">=5.1.16",
|
|
136
|
+
"cookie": ">=0.7.0",
|
|
137
|
+
"extract-zip": ">=2.0.2",
|
|
138
|
+
"tar": ">=7.5.16",
|
|
139
|
+
"form-data": ">=4.0.6",
|
|
140
|
+
"undici": ">=7.29.0",
|
|
141
|
+
"ws": ">=8.21.0",
|
|
142
|
+
"@babel/core": ">=7.29.1 <8.0.0",
|
|
143
|
+
"fast-uri": ">=3.1.5",
|
|
144
|
+
"shell-quote": ">=1.8.5",
|
|
145
|
+
"protobufjs": ">=7.5.8",
|
|
146
|
+
"hono": ">=4.12.18",
|
|
147
|
+
"@hono/node-server": ">=1.19.15",
|
|
148
|
+
"deepmerge-ts": ">=8.0.0",
|
|
149
|
+
"valibot": ">=1.4.2",
|
|
150
|
+
"sharp": ">=0.35.0",
|
|
151
|
+
"ip-address": ">=10.3.1",
|
|
152
|
+
"tmp": ">=0.2.4",
|
|
153
|
+
"xlsx": ">=0.19.3",
|
|
154
|
+
"ajv": ">=6.14.0",
|
|
155
|
+
"playwright": ">=1.55.1"
|
|
132
156
|
}
|
|
133
157
|
}
|