@elevasis/ui 2.25.5 → 2.25.6
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/app/index.css +3 -24
- package/dist/app/index.d.ts +63 -56
- package/dist/app/index.js +3 -2
- package/dist/chunk-5RLYII6P.js +314 -0
- package/dist/chunk-6U7AIIHF.js +880 -0
- package/dist/{chunk-NHHCUECV.js → chunk-7F3IQMLI.js} +1 -1
- package/dist/{chunk-N2AP4I5N.js → chunk-ARJPZ66V.js} +39 -757
- package/dist/{chunk-IS53MXE4.js → chunk-BDKM56TP.js} +1 -1
- package/dist/{chunk-KINQW4JT.js → chunk-C7IBFI5B.js} +1 -1
- package/dist/{chunk-5BJXMZN4.js → chunk-CPAJXBTL.js} +9 -5
- package/dist/chunk-HAEJ4M54.js +94 -0
- package/dist/{chunk-QNCVK3ZF.js → chunk-JXSBOG2R.js} +1 -1
- package/dist/{chunk-3KY2GNPE.js → chunk-KNISO652.js} +1 -1
- package/dist/{chunk-VMAWXEVG.js → chunk-L7D6KNHV.js} +457 -290
- package/dist/{chunk-JMI7L7Y7.js → chunk-LPM7O6XM.js} +2 -233
- package/dist/{chunk-FVKLHLF4.js → chunk-QARSVM7Q.js} +1 -1
- package/dist/{chunk-F7JDHS2I.js → chunk-SBQ4MYQV.js} +3 -2
- package/dist/{chunk-MU4VPAMR.js → chunk-YRKQNPK2.js} +1 -1
- package/dist/components/index.css +3 -24
- package/dist/components/index.d.ts +11 -2
- package/dist/components/index.js +18 -16
- package/dist/components/navigation/index.css +3 -24
- package/dist/features/auth/index.css +3 -24
- package/dist/features/crm/index.css +3 -24
- package/dist/features/crm/index.js +5 -4
- package/dist/features/dashboard/index.css +3 -24
- package/dist/features/dashboard/index.js +5 -4
- package/dist/features/delivery/index.css +3 -24
- package/dist/features/delivery/index.js +5 -4
- package/dist/features/knowledge/index.js +397 -1
- package/dist/features/lead-gen/index.css +3 -24
- package/dist/features/lead-gen/index.d.ts +158 -151
- package/dist/features/lead-gen/index.js +6 -5
- package/dist/features/monitoring/index.css +3 -24
- package/dist/features/monitoring/index.js +6 -5
- package/dist/features/monitoring/requests/index.css +3 -24
- package/dist/features/monitoring/requests/index.js +4 -3
- package/dist/features/operations/index.css +3 -24
- package/dist/features/operations/index.js +9 -7
- package/dist/features/settings/index.css +3 -24
- package/dist/features/settings/index.js +5 -4
- package/dist/hooks/delivery/index.css +3 -24
- package/dist/hooks/index.css +3 -24
- package/dist/hooks/index.d.ts +14 -3
- package/dist/hooks/index.js +4 -3
- package/dist/hooks/published.css +3 -24
- package/dist/hooks/published.d.ts +14 -3
- package/dist/hooks/published.js +4 -3
- package/dist/index.css +3 -24
- package/dist/index.d.ts +611 -593
- package/dist/index.js +4 -3
- package/dist/knowledge/index.d.ts +14 -4
- package/dist/knowledge/index.js +20 -119
- package/dist/organization/index.css +3 -24
- package/dist/provider/index.css +3 -24
- package/dist/provider/index.d.ts +346 -339
- package/dist/provider/index.js +3 -2
- package/dist/provider/published.css +3 -24
- package/dist/provider/published.d.ts +346 -339
- package/dist/provider/published.js +2 -1
- package/package.json +33 -33
package/dist/index.js
CHANGED
|
@@ -2,24 +2,25 @@ import './chunk-XCYKC6OZ.js';
|
|
|
2
2
|
export { useAvailablePresets } from './chunk-SNHGSCKH.js';
|
|
3
3
|
export { AGENT_CONSTANTS, CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS, STATUS_COLORS, TIMELINE_CONSTANTS, WORKFLOW_CONSTANTS, calculateBarPosition, formatDuration, getEdgeColor, getEdgeOpacity, getResourceStatusColor, getStatusColors, getStatusIcon, shouldAnimateEdge, useAgentIterationData, useExecutionPath, useReactFlowAgent, useTimelineData, useUnifiedWorkflowLayout, useWorkflowStepsLayout } from './chunk-E4WQGJNS.js';
|
|
4
4
|
import './chunk-7M2VOCYN.js';
|
|
5
|
-
export { ApiKeyService, CredentialService, DeploymentService, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, collectResourceFilterFacets, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, getResourceFilterFacetIds, isSessionCapable, labelResourceFilterFacet, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, operationsKeys, projectActivityKeys, requestsKeys, scheduleKeys, sessionsKeys, sortData, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useAddCompaniesToList, useAddContactsToList, useArchiveSession, useArchivedLogs, useArtifacts, useAssignRole, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompanyFacets, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateArtifact, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateList, useCreateOrgRole, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDealsLookup, useDealsSummary, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteOrgRole, useDeleteRequest, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteWebhookEndpoint, useDeriveActions, useEffectivePermissions, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAction, useExecuteAsync, useExecuteResource, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutionSSE, useExecutions, useGetExecutionHistory, useGetSchedule, useGraphStats, useHasPermission, useList, useListApiKeys, useListDeployments, useListExecutions, useListMember, useListMembers, useListProgress, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useNotificationCount as useNotificationCountSSE, useNotifications, useOrgRoles, useOrganizationMembers, useOrganizationPermissions, usePaginationState, usePatchTask, usePauseSchedule, usePermissionCatalog, useProjectActivities, useProjectRealtime, useReactivateMembership, useRecentExecutionsByResource, useRemoveCompaniesFromList, useRequest, useRequestsList, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useRevokeRole, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTestNotification, useTimeRangeDates, useTopFailingResources, useTransitionItem, useTransitionListCompany, useTransitionListMember, useTransitionState, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateList, useUpdateListConfig, useUpdateListStatus, useUpdateMemberConfig, useUpdateOrgRole, useUpdateRequestStatus, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources, useWarningNotification, useWorkflowExecution } from './chunk-
|
|
5
|
+
export { ApiKeyService, CredentialService, DeploymentService, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, collectResourceFilterFacets, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, getResourceFilterFacetIds, isSessionCapable, labelResourceFilterFacet, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, operationsKeys, projectActivityKeys, requestsKeys, scheduleKeys, sessionsKeys, sortData, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useAddCompaniesToList, useAddContactsToList, useArchiveSession, useArchivedLogs, useArtifacts, useAssignRole, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompanyFacets, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateArtifact, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateList, useCreateOrgRole, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDealsLookup, useDealsSummary, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteOrgRole, useDeleteRequest, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteWebhookEndpoint, useDeriveActions, useEffectivePermissions, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAction, useExecuteAsync, useExecuteResource, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutionSSE, useExecutions, useGetExecutionHistory, useGetSchedule, useGraphStats, useHasPermission, useList, useListApiKeys, useListDeployments, useListExecutions, useListMember, useListMembers, useListProgress, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useNotificationCount as useNotificationCountSSE, useNotifications, useOrgRoles, useOrganizationMembers, useOrganizationPermissions, usePaginationState, usePatchTask, usePauseSchedule, usePermissionCatalog, useProjectActivities, useProjectRealtime, useReactivateMembership, useRecentExecutionsByResource, useRemoveCompaniesFromList, useRequest, useRequestsList, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useRevokeRole, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTestNotification, useTimeRangeDates, useTopFailingResources, useTransitionItem, useTransitionListCompany, useTransitionListMember, useTransitionState, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateList, useUpdateListConfig, useUpdateListStatus, useUpdateMemberConfig, useUpdateOrgRole, useUpdateRequestStatus, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources, useWarningNotification, useWorkflowExecution } from './chunk-CPAJXBTL.js';
|
|
6
6
|
export { observabilityKeys, useErrorTrends } from './chunk-VKMNWHTL.js';
|
|
7
7
|
export { milestoneKeys, noteKeys, projectKeys, taskKeys, useCreateProject as useCreateDeliveryProject, useCreateMilestone, useCreateNote, useCreateTask, useDeleteProject as useDeleteDeliveryProject, useDeleteTask as useDeleteDeliveryTask, useDeleteMilestone, useMilestones, useProject, useProjectMilestones, useProjectNotes, useProjectTasks, useProjects, useTasks, useUpdateProject as useUpdateDeliveryProject, useUpdateMilestone, useUpdateTask } from './chunk-HKBEURCV.js';
|
|
8
8
|
import './chunk-BRXELOHC.js';
|
|
9
9
|
export { GRAPH_CONSTANTS, calculateGraphHeight, useConnectionHighlight, useDirectedChainHighlighting, useFitViewTrigger, useGraphHighlighting, useNodeSelection } from './chunk-22UVE3RA.js';
|
|
10
10
|
export { useMergedExecution } from './chunk-3ZMAGTWF.js';
|
|
11
11
|
export { createTestFeaturesProvider } from './chunk-VMJVQAFZ.js';
|
|
12
|
-
export { ElevasisUIProvider } from './chunk-
|
|
12
|
+
export { ElevasisUIProvider } from './chunk-YRKQNPK2.js';
|
|
13
13
|
export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride, PRESETS as presets, usePresetsContext } from './chunk-QIW6OCEI.js';
|
|
14
14
|
import './chunk-WLOQ4IBG.js';
|
|
15
15
|
export { FeatureShell } from './chunk-TAIX4NO3.js';
|
|
16
16
|
import './chunk-TKAYX2SP.js';
|
|
17
17
|
import './chunk-U36X6NZM.js';
|
|
18
18
|
import './chunk-NYBEU5TE.js';
|
|
19
|
-
export { CrmActionsProvider, ElevasisCoreProvider, ListActionsProvider, NotificationProvider, useCrmActions, useListActions, useNotificationAdapter } from './chunk-
|
|
19
|
+
export { CrmActionsProvider, ElevasisCoreProvider, ListActionsProvider, NotificationProvider, useCrmActions, useListActions, useNotificationAdapter } from './chunk-LPM7O6XM.js';
|
|
20
20
|
import './chunk-SZHARWKU.js';
|
|
21
21
|
export { ElevasisFeaturesProvider, createFeatureAccessHook, useElevasisFeatures, useOptionalElevasisFeatures } from './chunk-V3HUIZJX.js';
|
|
22
22
|
import './chunk-3KMDHCAR.js';
|
|
23
|
+
import './chunk-5RLYII6P.js';
|
|
23
24
|
export { ApiClientProvider, useApiClient, useApiClientContext } from './chunk-T6INEVX6.js';
|
|
24
25
|
export { ScrollToTop, TanStackRouterBridge } from './chunk-2IFYDILW.js';
|
|
25
26
|
export { RouterProvider, useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
@@ -399,9 +399,10 @@ interface KnowledgeBrowserProps {
|
|
|
399
399
|
/**
|
|
400
400
|
* Composed default browser for the knowledge map.
|
|
401
401
|
*
|
|
402
|
-
* Layout: search bar at top;
|
|
403
|
-
*
|
|
404
|
-
*
|
|
402
|
+
* Layout: search bar at top; content area shows either the search-results list
|
|
403
|
+
* (when a search is active) or the selected node detail. The file-system tree
|
|
404
|
+
* nav lives in the subshell sidebar (KnowledgeSidebar / KnowledgeSidebarMiddle).
|
|
405
|
+
* Selection is URL-driven via `initialNodeId` (sourced from route params).
|
|
405
406
|
*/
|
|
406
407
|
declare function KnowledgeBrowser({ graph, knowledgeNodes, initialNodeId, onNavigateToNode }: KnowledgeBrowserProps): react_jsx_runtime.JSX.Element;
|
|
407
408
|
|
|
@@ -537,7 +538,12 @@ interface KnowledgeSidebarMiddleProps {
|
|
|
537
538
|
items?: NavItem[];
|
|
538
539
|
}
|
|
539
540
|
/**
|
|
540
|
-
*
|
|
541
|
+
* @deprecated Use `KnowledgeSidebarMiddle` from `features/knowledge/sidebar` instead.
|
|
542
|
+
* This legacy nav-items sidebar is retained as a published API surface for external
|
|
543
|
+
* consumers that compose custom sidebars using `KNOWLEDGE_ITEMS`. The canonical
|
|
544
|
+
* subshell sidebar now lives at `packages/ui/src/features/knowledge/sidebar/`.
|
|
545
|
+
*
|
|
546
|
+
* Sidebar middle section for the Knowledge feature (legacy nav-items variant).
|
|
541
547
|
*
|
|
542
548
|
* Mirrors the `CrmSidebarMiddle` pattern. Pass `items` to extend or replace
|
|
543
549
|
* the default nav entries (e.g. add owner-scoped sections for a specific org).
|
|
@@ -550,6 +556,10 @@ interface KnowledgeSidebarMiddleProps {
|
|
|
550
556
|
declare const KnowledgeSidebarMiddle: ({ items }?: KnowledgeSidebarMiddleProps) => react_jsx_runtime.JSX.Element;
|
|
551
557
|
|
|
552
558
|
/**
|
|
559
|
+
* @deprecated Used by the legacy `KnowledgeSidebarMiddle` (nav-items variant).
|
|
560
|
+
* Retained as a published API surface for external consumers. The canonical
|
|
561
|
+
* subshell sidebar is `KnowledgeSidebarMiddle` from `features/knowledge/sidebar/`.
|
|
562
|
+
*
|
|
553
563
|
* Default sidebar nav items for the Knowledge feature.
|
|
554
564
|
*
|
|
555
565
|
* Mirrors the `CRM_ITEMS` shape so it can be used directly with
|
package/dist/knowledge/index.js
CHANGED
|
@@ -1,100 +1,16 @@
|
|
|
1
|
+
import { governs, governedBy } from '../chunk-HAEJ4M54.js';
|
|
2
|
+
export { KnowledgeTree } from '../chunk-HAEJ4M54.js';
|
|
1
3
|
import { SubshellNavItem } from '../chunk-X4WBGKJQ.js';
|
|
2
4
|
import { SubshellSidebarSection } from '../chunk-IIMU5YAJ.js';
|
|
3
5
|
import '../chunk-2IFYDILW.js';
|
|
4
6
|
import { useRouterContext } from '../chunk-Q7DJKLEN.js';
|
|
5
7
|
import '../chunk-DT3QYZVU.js';
|
|
6
8
|
import '../chunk-I2KLQ2HA.js';
|
|
7
|
-
import { createContext,
|
|
8
|
-
import { Stack, Text, Group, Badge,
|
|
9
|
+
import { createContext, Children, isValidElement, cloneElement, useMemo, useContext, useState, useRef, useEffect } from 'react';
|
|
10
|
+
import { Stack, Text, UnstyledButton, Group, Badge, Card, SimpleGrid, Alert, Tabs, Title, Divider, Box, TextInput } from '@mantine/core';
|
|
9
11
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
12
|
import { IconBook, IconX, IconSearch, IconCircleX, IconAlertTriangle, IconInfoCircle } from '@tabler/icons-react';
|
|
11
13
|
|
|
12
|
-
// ../core/src/knowledge/queries.ts
|
|
13
|
-
function toGraphNodeId(omNodeId) {
|
|
14
|
-
return `knowledge:${omNodeId}`;
|
|
15
|
-
}
|
|
16
|
-
function buildKnowledgeSourceIdMap(graph) {
|
|
17
|
-
const map = /* @__PURE__ */ new Map();
|
|
18
|
-
for (const node of graph.nodes) {
|
|
19
|
-
if (node.kind === "knowledge" && node.sourceId) {
|
|
20
|
-
map.set(node.id, node.sourceId);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return map;
|
|
24
|
-
}
|
|
25
|
-
function byFeature(graph, featureId, knowledgeNodes) {
|
|
26
|
-
const targetGraphNodeId = `feature:${featureId}`;
|
|
27
|
-
const governingKnowledgeNodeIds = /* @__PURE__ */ new Set();
|
|
28
|
-
for (const edge of graph.edges) {
|
|
29
|
-
if (edge.kind === "governs" && edge.targetId === targetGraphNodeId && edge.sourceId.startsWith("knowledge:")) {
|
|
30
|
-
governingKnowledgeNodeIds.add(edge.sourceId);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
const sourceIdMap = buildKnowledgeSourceIdMap(graph);
|
|
34
|
-
const matchingOmIds = /* @__PURE__ */ new Set();
|
|
35
|
-
for (const graphNodeId of governingKnowledgeNodeIds) {
|
|
36
|
-
const omId = sourceIdMap.get(graphNodeId);
|
|
37
|
-
if (omId) matchingOmIds.add(omId);
|
|
38
|
-
}
|
|
39
|
-
return knowledgeNodes.filter((n) => matchingOmIds.has(n.id));
|
|
40
|
-
}
|
|
41
|
-
function governs(graph, nodeId) {
|
|
42
|
-
const graphNodeId = nodeId.startsWith("knowledge:") ? nodeId : toGraphNodeId(nodeId);
|
|
43
|
-
const results = [];
|
|
44
|
-
for (const edge of graph.edges) {
|
|
45
|
-
if (edge.kind === "governs" && edge.sourceId === graphNodeId) {
|
|
46
|
-
results.push(edge.targetId);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return results;
|
|
50
|
-
}
|
|
51
|
-
function governedBy(graph, nodeId) {
|
|
52
|
-
const targetId = nodeId.startsWith("feature:") || nodeId.startsWith("knowledge:") || nodeId.startsWith("resource:") ? nodeId : `feature:${nodeId}`;
|
|
53
|
-
const results = [];
|
|
54
|
-
for (const edge of graph.edges) {
|
|
55
|
-
if (edge.kind === "governs" && edge.targetId === targetId) {
|
|
56
|
-
results.push(edge.sourceId);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return results;
|
|
60
|
-
}
|
|
61
|
-
function KnowledgeTree({ graph, knowledgeNodes, onSelectNode, selectedNodeId }) {
|
|
62
|
-
const groups = useMemo(() => {
|
|
63
|
-
const featureNodes = graph.nodes.filter((n) => n.kind === "feature");
|
|
64
|
-
return featureNodes.map((feature) => {
|
|
65
|
-
const featureId = feature.featureId ?? feature.sourceId ?? feature.id.replace(/^feature:/, "");
|
|
66
|
-
const nodes = byFeature(graph, featureId, knowledgeNodes);
|
|
67
|
-
return { feature, nodes };
|
|
68
|
-
}).filter((group) => group.nodes.length > 0);
|
|
69
|
-
}, [graph, knowledgeNodes]);
|
|
70
|
-
if (groups.length === 0) {
|
|
71
|
-
return /* @__PURE__ */ jsx(Stack, { gap: "xs", style: { padding: "var(--mantine-spacing-md)" }, children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "No knowledge nodes governing any feature." }) });
|
|
72
|
-
}
|
|
73
|
-
return /* @__PURE__ */ jsx(Stack, { gap: "md", style: { padding: "var(--mantine-spacing-sm)" }, children: groups.map(({ feature, nodes }) => /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
74
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
75
|
-
/* @__PURE__ */ jsx(Text, { size: "xs", fw: 600, tt: "uppercase", c: "dimmed", style: { letterSpacing: "0.05em" }, children: feature.label }),
|
|
76
|
-
/* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "gray", children: nodes.length })
|
|
77
|
-
] }),
|
|
78
|
-
/* @__PURE__ */ jsx(Stack, { gap: 2, children: nodes.map((node) => {
|
|
79
|
-
const isActive = node.id === selectedNodeId;
|
|
80
|
-
return /* @__PURE__ */ jsx(
|
|
81
|
-
UnstyledButton,
|
|
82
|
-
{
|
|
83
|
-
onClick: () => onSelectNode(node),
|
|
84
|
-
style: {
|
|
85
|
-
padding: "6px 10px",
|
|
86
|
-
borderRadius: "var(--mantine-radius-sm)",
|
|
87
|
-
backgroundColor: isActive ? "color-mix(in srgb, var(--color-primary) 10%, transparent)" : "transparent",
|
|
88
|
-
width: "100%",
|
|
89
|
-
textAlign: "left"
|
|
90
|
-
},
|
|
91
|
-
children: /* @__PURE__ */ jsx(Text, { size: "sm", c: isActive ? "var(--color-primary)" : void 0, fw: isActive ? 600 : 400, children: node.title })
|
|
92
|
-
},
|
|
93
|
-
node.id
|
|
94
|
-
);
|
|
95
|
-
}) })
|
|
96
|
-
] }, feature.id)) });
|
|
97
|
-
}
|
|
98
14
|
var KIND_COLORS = {
|
|
99
15
|
playbook: "blue",
|
|
100
16
|
strategy: "violet",
|
|
@@ -533,41 +449,26 @@ function KnowledgeSearchBar({
|
|
|
533
449
|
);
|
|
534
450
|
}
|
|
535
451
|
function KnowledgeBrowser({ graph, knowledgeNodes, initialNodeId, onNavigateToNode }) {
|
|
536
|
-
const
|
|
452
|
+
const { navigate } = useRouterContext();
|
|
453
|
+
const selectedNode = useMemo(
|
|
537
454
|
() => initialNodeId ? knowledgeNodes.find((n) => n.id === initialNodeId) ?? null : null,
|
|
538
455
|
[initialNodeId, knowledgeNodes]
|
|
539
456
|
);
|
|
540
|
-
const [selectedNode, setSelectedNode] = useState(initialNode);
|
|
541
457
|
const [searchResults, setSearchResults] = useState(null);
|
|
542
|
-
|
|
458
|
+
const handleSelectNode = (node) => {
|
|
459
|
+
navigate(`/knowledge/${node.id}`);
|
|
460
|
+
};
|
|
461
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "md", style: { flex: 1, minHeight: 0 }, children: [
|
|
543
462
|
/* @__PURE__ */ jsx(KnowledgeSearchBar, { knowledgeNodes, onResults: setSearchResults }),
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
graph,
|
|
554
|
-
knowledgeNodes,
|
|
555
|
-
onSelectNode: setSelectedNode,
|
|
556
|
-
selectedNodeId: selectedNode?.id
|
|
557
|
-
}
|
|
558
|
-
)
|
|
559
|
-
}
|
|
560
|
-
),
|
|
561
|
-
/* @__PURE__ */ jsx(Grid.Col, { span: { base: 12, md: 8 }, style: { overflowY: "auto" }, children: searchResults ? /* @__PURE__ */ jsx(
|
|
562
|
-
KnowledgeNodeList,
|
|
563
|
-
{
|
|
564
|
-
nodes: searchResults,
|
|
565
|
-
onSelect: setSelectedNode,
|
|
566
|
-
selectedNodeId: selectedNode?.id,
|
|
567
|
-
label: `${searchResults.length} result${searchResults.length === 1 ? "" : "s"}`
|
|
568
|
-
}
|
|
569
|
-
) : selectedNode ? /* @__PURE__ */ jsx(KnowledgeNodeView, { node: selectedNode, graph, onNavigateToNode }) : /* @__PURE__ */ jsx(Box, { style: { padding: "var(--mantine-spacing-xl)" }, children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Select a knowledge node from the tree to view its details." }) }) })
|
|
570
|
-
] })
|
|
463
|
+
/* @__PURE__ */ jsx(Box, { style: { flex: 1, minHeight: 0, overflowY: "auto" }, children: searchResults ? /* @__PURE__ */ jsx(
|
|
464
|
+
KnowledgeNodeList,
|
|
465
|
+
{
|
|
466
|
+
nodes: searchResults,
|
|
467
|
+
onSelect: handleSelectNode,
|
|
468
|
+
selectedNodeId: selectedNode?.id,
|
|
469
|
+
label: `${searchResults.length} result${searchResults.length === 1 ? "" : "s"}`
|
|
470
|
+
}
|
|
471
|
+
) : selectedNode ? /* @__PURE__ */ jsx(KnowledgeNodeView, { node: selectedNode, graph, onNavigateToNode }) : /* @__PURE__ */ jsx(Box, { style: { padding: "var(--mantine-spacing-xl)" }, children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Select a knowledge node from the tree to view its details." }) }) })
|
|
571
472
|
] });
|
|
572
473
|
}
|
|
573
474
|
var KNOWLEDGE_ITEMS = [{ label: "Knowledge", to: "/knowledge", icon: IconBook, exact: true }];
|
|
@@ -592,4 +493,4 @@ var KnowledgeSidebarMiddle = ({ items = KNOWLEDGE_ITEMS } = {}) => {
|
|
|
592
493
|
] });
|
|
593
494
|
};
|
|
594
495
|
|
|
595
|
-
export { KNOWLEDGE_ALLOWLIST, KNOWLEDGE_BODIES, KNOWLEDGE_ITEMS, KnowledgeBrowser, KnowledgeMDXProvider, KnowledgeNodeList, KnowledgeNodeView, KnowledgeSearchBar, KnowledgeSidebarMiddle,
|
|
496
|
+
export { KNOWLEDGE_ALLOWLIST, KNOWLEDGE_BODIES, KNOWLEDGE_ITEMS, KnowledgeBrowser, KnowledgeMDXProvider, KnowledgeNodeList, KnowledgeNodeView, KnowledgeSearchBar, KnowledgeSidebarMiddle, useKnowledgeAllowlist };
|
|
@@ -156,32 +156,11 @@
|
|
|
156
156
|
.mantine-Select-option:hover {
|
|
157
157
|
background-color: var(--color-surface-hover) !important;
|
|
158
158
|
}
|
|
159
|
-
[data-mantine-color-scheme] .mantine-Tabs-root {
|
|
160
|
-
--tabs-color: var(--color-primary);
|
|
159
|
+
[data-mantine-color-scheme=dark] .mantine-Tabs-root {
|
|
161
160
|
--tab-border-color: var(--color-border);
|
|
162
|
-
--tab-hover-color: color-mix(in srgb, var(--color-surface-hover) 70%, transparent);
|
|
163
161
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab {
|
|
168
|
-
color: var(--color-text);
|
|
169
|
-
border-color: transparent;
|
|
170
|
-
background-color: transparent;
|
|
171
|
-
transition:
|
|
172
|
-
background-color var(--duration-fast) var(--easing),
|
|
173
|
-
border-color var(--duration-fast) var(--easing),
|
|
174
|
-
color var(--duration-fast) var(--easing);
|
|
175
|
-
}
|
|
176
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab:not([data-active]):hover {
|
|
177
|
-
background-color: var(--tab-hover-color);
|
|
178
|
-
border-color: var(--color-border);
|
|
179
|
-
}
|
|
180
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active],
|
|
181
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active]:hover {
|
|
182
|
-
color: var(--color-text);
|
|
183
|
-
background-color: transparent;
|
|
184
|
-
border-color: var(--color-primary);
|
|
162
|
+
.mantine-Tabs-tab:hover {
|
|
163
|
+
background-color: var(--color-surface-hover);
|
|
185
164
|
}
|
|
186
165
|
.mantine-Pagination-control:not([data-active]) {
|
|
187
166
|
background: var(--color-surface);
|
package/dist/provider/index.css
CHANGED
|
@@ -540,32 +540,11 @@
|
|
|
540
540
|
.mantine-Select-option:hover {
|
|
541
541
|
background-color: var(--color-surface-hover) !important;
|
|
542
542
|
}
|
|
543
|
-
[data-mantine-color-scheme] .mantine-Tabs-root {
|
|
544
|
-
--tabs-color: var(--color-primary);
|
|
543
|
+
[data-mantine-color-scheme=dark] .mantine-Tabs-root {
|
|
545
544
|
--tab-border-color: var(--color-border);
|
|
546
|
-
--tab-hover-color: color-mix(in srgb, var(--color-surface-hover) 70%, transparent);
|
|
547
545
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
}
|
|
551
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab {
|
|
552
|
-
color: var(--color-text);
|
|
553
|
-
border-color: transparent;
|
|
554
|
-
background-color: transparent;
|
|
555
|
-
transition:
|
|
556
|
-
background-color var(--duration-fast) var(--easing),
|
|
557
|
-
border-color var(--duration-fast) var(--easing),
|
|
558
|
-
color var(--duration-fast) var(--easing);
|
|
559
|
-
}
|
|
560
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab:not([data-active]):hover {
|
|
561
|
-
background-color: var(--tab-hover-color);
|
|
562
|
-
border-color: var(--color-border);
|
|
563
|
-
}
|
|
564
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active],
|
|
565
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active]:hover {
|
|
566
|
-
color: var(--color-text);
|
|
567
|
-
background-color: transparent;
|
|
568
|
-
border-color: var(--color-primary);
|
|
546
|
+
.mantine-Tabs-tab:hover {
|
|
547
|
+
background-color: var(--color-surface-hover);
|
|
569
548
|
}
|
|
570
549
|
.mantine-Pagination-control:not([data-active]) {
|
|
571
550
|
background: var(--color-surface);
|