@eventcatalog/core 3.0.0 → 3.2.0
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/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-VO5WYA44.js → chunk-AA47DJ43.js} +1 -1
- package/dist/{chunk-EKGR533N.js → chunk-GGRXP5WM.js} +1 -1
- package/dist/{chunk-E5Q7TZYT.js → chunk-L3QRQT7U.js} +1 -1
- package/dist/{chunk-BYP43AAT.js → chunk-RWYEP5SD.js} +1 -1
- package/dist/{chunk-KF5PARQK.js → chunk-VPQCMMRM.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.config.d.cts +7 -0
- package/dist/eventcatalog.config.d.ts +7 -0
- package/dist/eventcatalog.js +5 -5
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +520 -247
- package/eventcatalog/src/components/ChatPanel/ChatPanelButton.tsx +3 -3
- package/eventcatalog/src/components/Checkbox.astro +7 -4
- package/eventcatalog/src/components/CopyAsMarkdown.tsx +15 -15
- package/eventcatalog/src/components/EnvironmentDropdown.tsx +15 -7
- package/eventcatalog/src/components/FavoriteButton.tsx +1 -1
- package/eventcatalog/src/components/Grids/DomainGrid.tsx +72 -60
- package/eventcatalog/src/components/Grids/MessageGrid.tsx +68 -48
- package/eventcatalog/src/components/Header.astro +15 -10
- package/eventcatalog/src/components/Lists/OwnersList.tsx +17 -10
- package/eventcatalog/src/components/Lists/PillListFlat.styles.css +12 -0
- package/eventcatalog/src/components/Lists/PillListFlat.tsx +15 -15
- package/eventcatalog/src/components/Lists/VersionList.astro +15 -5
- package/eventcatalog/src/components/MDX/Accordion/Accordion.tsx +3 -3
- package/eventcatalog/src/components/MDX/Admonition.tsx +49 -9
- package/eventcatalog/src/components/MDX/Attachments.astro +15 -11
- package/eventcatalog/src/components/MDX/ChannelInformation/ChannelInformation.tsx +29 -15
- package/eventcatalog/src/components/MDX/EntityPropertiesTable/EntityPropertiesTable.astro +20 -13
- package/eventcatalog/src/components/MDX/Link/Link.astro +1 -1
- package/eventcatalog/src/components/MDX/MessageTable/MessageTable.client.tsx +50 -29
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +14 -12
- package/eventcatalog/src/components/MDX/NodeGraph/StepWalkthrough.tsx +4 -4
- package/eventcatalog/src/components/MDX/NodeGraph/StudioModal.tsx +4 -4
- package/eventcatalog/src/components/MDX/NodeGraph/VisualiserSearch.tsx +2 -2
- package/eventcatalog/src/components/MDX/ResourceGroupTable/ResourceGroupTable.client.tsx +54 -33
- package/eventcatalog/src/components/MDX/ResourceLink/ResourceLink.astro +1 -1
- package/eventcatalog/src/components/MDX/Steps/Step.astro +2 -2
- package/eventcatalog/src/components/MDX/Steps/Steps.astro +3 -3
- package/eventcatalog/src/components/MDX/Tabs/Tabs.astro +13 -9
- package/eventcatalog/src/components/MDX/Tiles/Tile.astro +25 -13
- package/eventcatalog/src/components/MDX/Tiles/Tiles.astro +1 -1
- package/eventcatalog/src/components/SchemaExplorer/ApiAccessSection.tsx +3 -3
- package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +3 -3
- package/eventcatalog/src/components/SchemaExplorer/AvroSchemaViewer.tsx +29 -25
- package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +3 -3
- package/eventcatalog/src/components/SchemaExplorer/JSONSchemaViewer.tsx +61 -42
- package/eventcatalog/src/components/SchemaExplorer/OwnersSection.tsx +13 -9
- package/eventcatalog/src/components/SchemaExplorer/Pagination.tsx +6 -4
- package/eventcatalog/src/components/SchemaExplorer/ProducersConsumersSection.tsx +17 -13
- package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +35 -8
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsHeader.tsx +33 -21
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +1 -1
- package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +41 -33
- package/eventcatalog/src/components/SchemaExplorer/SchemaListItem.tsx +19 -7
- package/eventcatalog/src/components/SchemaExplorer/SchemaViewerModal.tsx +8 -8
- package/eventcatalog/src/components/Search/Search.astro +3 -3
- package/eventcatalog/src/components/Search/SearchModal.tsx +65 -36
- package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +31 -21
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +92 -59
- package/eventcatalog/src/components/Tables/Table.tsx +25 -24
- package/eventcatalog/src/components/Tables/columns/ContainersTableColumns.tsx +22 -16
- package/eventcatalog/src/components/Tables/columns/DomainTableColumns.tsx +14 -11
- package/eventcatalog/src/components/Tables/columns/FlowTableColumns.tsx +6 -6
- package/eventcatalog/src/components/Tables/columns/MessageTableColumns.tsx +22 -16
- package/eventcatalog/src/components/Tables/columns/ServiceTableColumns.tsx +22 -16
- package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +4 -4
- package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +21 -13
- package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +30 -19
- package/eventcatalog/src/components/ThemeToggle.tsx +18 -0
- package/eventcatalog/src/enterprise/ai/chat-api.ts +24 -3
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +15 -7
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +2 -2
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +19 -15
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +50 -17
- package/eventcatalog/src/layouts/DirectoryLayout.astro +11 -6
- package/eventcatalog/src/layouts/DiscoverLayout.astro +13 -8
- package/eventcatalog/src/layouts/Footer.astro +6 -6
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +62 -14
- package/eventcatalog/src/pages/_index.astro +135 -179
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +4 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +77 -63
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +23 -24
- package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +66 -50
- package/eventcatalog/src/pages/docs/custom/index.astro +2 -2
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +25 -21
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +25 -21
- package/eventcatalog/src/pages/schemas/explorer/index.astro +1 -1
- package/eventcatalog/src/pages/studio.astro +59 -31
- package/eventcatalog/src/remark-plugins/directives.ts +6 -6
- package/eventcatalog/src/remark-plugins/mermaid.ts +2 -2
- package/eventcatalog/src/stores/theme-store.ts +93 -0
- package/eventcatalog/src/styles/theme.css +255 -0
- package/eventcatalog/src/styles/themes/forest.css +230 -0
- package/eventcatalog/src/styles/themes/ocean.css +235 -0
- package/eventcatalog/src/styles/themes/sapphire.css +230 -0
- package/eventcatalog/src/styles/themes/sunset.css +230 -0
- package/eventcatalog/src/utils/feature.ts +4 -0
- package/eventcatalog/tailwind.config.mjs +6 -3
- package/package.json +7 -6
|
@@ -13,21 +13,21 @@ import { favoritesStore, toggleFavorite as toggleFavoriteAction, type FavoriteIt
|
|
|
13
13
|
const cn = (...classes: (string | false | undefined)[]) => classes.filter(Boolean).join(' ');
|
|
14
14
|
|
|
15
15
|
// ============================================
|
|
16
|
-
// Badge color mapping
|
|
16
|
+
// Badge color mapping (uses CSS variables from theme.css)
|
|
17
17
|
// ============================================
|
|
18
18
|
|
|
19
19
|
const getBadgeClasses = (badge: string): string => {
|
|
20
20
|
const badgeColors: Record<string, string> = {
|
|
21
|
-
domain: 'bg-
|
|
22
|
-
service: 'bg-
|
|
23
|
-
event: 'bg-
|
|
24
|
-
command: 'bg-
|
|
25
|
-
query: 'bg-
|
|
26
|
-
message: 'bg-
|
|
27
|
-
design: 'bg-
|
|
28
|
-
channel: 'bg-
|
|
21
|
+
domain: 'bg-[rgb(var(--ec-badge-domain-bg))] text-[rgb(var(--ec-badge-domain-text))]',
|
|
22
|
+
service: 'bg-[rgb(var(--ec-badge-service-bg))] text-[rgb(var(--ec-badge-service-text))]',
|
|
23
|
+
event: 'bg-[rgb(var(--ec-badge-event-bg))] text-[rgb(var(--ec-badge-event-text))]',
|
|
24
|
+
command: 'bg-[rgb(var(--ec-badge-command-bg))] text-[rgb(var(--ec-badge-command-text))]',
|
|
25
|
+
query: 'bg-[rgb(var(--ec-badge-query-bg))] text-[rgb(var(--ec-badge-query-text))]',
|
|
26
|
+
message: 'bg-[rgb(var(--ec-badge-message-bg))] text-[rgb(var(--ec-badge-message-text))]',
|
|
27
|
+
design: 'bg-[rgb(var(--ec-badge-design-bg))] text-[rgb(var(--ec-badge-design-text))]',
|
|
28
|
+
channel: 'bg-[rgb(var(--ec-badge-channel-bg))] text-[rgb(var(--ec-badge-channel-text))]',
|
|
29
29
|
};
|
|
30
|
-
return badgeColors[badge.toLowerCase()] || 'bg-
|
|
30
|
+
return badgeColors[badge.toLowerCase()] || 'bg-[rgb(var(--ec-badge-default-bg))] text-[rgb(var(--ec-badge-default-text))]';
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// ============================================
|
|
@@ -474,32 +474,41 @@ export default function NestedSideBar() {
|
|
|
474
474
|
return (
|
|
475
475
|
<aside className="w-[315px] h-full flex flex-col font-sans">
|
|
476
476
|
{/* Search skeleton */}
|
|
477
|
-
<div className="px-3 py-3 border-b border-
|
|
478
|
-
<div className="h-9 bg-
|
|
477
|
+
<div className="px-3 py-3 border-b border-[rgb(var(--ec-content-border))]">
|
|
478
|
+
<div className="h-9 bg-[rgb(var(--ec-content-hover))] rounded-lg animate-pulse" />
|
|
479
479
|
</div>
|
|
480
480
|
{/* Content skeleton */}
|
|
481
481
|
<div className="p-3 space-y-3">
|
|
482
482
|
{/* Group header skeleton */}
|
|
483
483
|
<div className="flex items-center gap-2 px-2 py-1.5">
|
|
484
|
-
<div className="w-3.5 h-3.5 bg-
|
|
485
|
-
<div className="h-4 w-24 bg-
|
|
484
|
+
<div className="w-3.5 h-3.5 bg-[rgb(var(--ec-content-hover))] rounded animate-pulse" />
|
|
485
|
+
<div className="h-4 w-24 bg-[rgb(var(--ec-content-hover))] rounded animate-pulse" />
|
|
486
486
|
</div>
|
|
487
487
|
{/* Item skeletons */}
|
|
488
488
|
{[1, 2, 3, 4, 5].map((i) => (
|
|
489
|
-
<div key={i} className="flex items-center gap-2.5 px-3 py-1.5 ml-3.5 border-l border-
|
|
490
|
-
<div className="w-4 h-4 bg-
|
|
491
|
-
<div
|
|
489
|
+
<div key={i} className="flex items-center gap-2.5 px-3 py-1.5 ml-3.5 border-l border-[rgb(var(--ec-content-border))]">
|
|
490
|
+
<div className="w-4 h-4 bg-[rgb(var(--ec-content-hover))] rounded animate-pulse" />
|
|
491
|
+
<div
|
|
492
|
+
className="h-4 bg-[rgb(var(--ec-content-hover))] rounded animate-pulse"
|
|
493
|
+
style={{ width: `${60 + ((i * 15) % 40)}%` }}
|
|
494
|
+
/>
|
|
492
495
|
</div>
|
|
493
496
|
))}
|
|
494
497
|
{/* Second group skeleton */}
|
|
495
498
|
<div className="flex items-center gap-2 px-2 py-1.5 mt-4">
|
|
496
|
-
<div className="w-3.5 h-3.5 bg-
|
|
497
|
-
<div className="h-4 w-20 bg-
|
|
499
|
+
<div className="w-3.5 h-3.5 bg-[rgb(var(--ec-content-hover))] rounded animate-pulse" />
|
|
500
|
+
<div className="h-4 w-20 bg-[rgb(var(--ec-content-hover))] rounded animate-pulse" />
|
|
498
501
|
</div>
|
|
499
502
|
{[1, 2, 3].map((i) => (
|
|
500
|
-
<div
|
|
501
|
-
|
|
502
|
-
|
|
503
|
+
<div
|
|
504
|
+
key={`g2-${i}`}
|
|
505
|
+
className="flex items-center gap-2.5 px-3 py-1.5 ml-3.5 border-l border-[rgb(var(--ec-content-border))]"
|
|
506
|
+
>
|
|
507
|
+
<div className="w-4 h-4 bg-[rgb(var(--ec-content-hover))] rounded animate-pulse" />
|
|
508
|
+
<div
|
|
509
|
+
className="h-4 bg-[rgb(var(--ec-content-hover))] rounded animate-pulse"
|
|
510
|
+
style={{ width: `${50 + ((i * 20) % 35)}%` }}
|
|
511
|
+
/>
|
|
503
512
|
</div>
|
|
504
513
|
))}
|
|
505
514
|
</div>
|
|
@@ -727,13 +736,17 @@ export default function NestedSideBar() {
|
|
|
727
736
|
<>
|
|
728
737
|
<div className="flex items-center gap-2">
|
|
729
738
|
{GroupIcon && (
|
|
730
|
-
<span className="flex items-center justify-center w-5 h-5 rounded bg-
|
|
739
|
+
<span className="flex items-center justify-center w-5 h-5 rounded bg-[rgb(var(--ec-group-icon-bg))] text-[rgb(var(--ec-group-icon-text))]">
|
|
731
740
|
<GroupIcon className="w-3 h-3" />
|
|
732
741
|
</span>
|
|
733
742
|
)}
|
|
734
|
-
<span className="text-[13px] text-
|
|
743
|
+
<span className="text-[13px] text-[rgb(var(--ec-content-text))] font-semibold tracking-tight">{group.title}</span>
|
|
735
744
|
</div>
|
|
736
|
-
{canCollapse &&
|
|
745
|
+
{canCollapse && (
|
|
746
|
+
<ChevronDown
|
|
747
|
+
className={cn('w-4 h-4 text-[rgb(var(--ec-icon-color))] transition-transform', isCollapsed && '-rotate-90')}
|
|
748
|
+
/>
|
|
749
|
+
)}
|
|
737
750
|
</>
|
|
738
751
|
);
|
|
739
752
|
|
|
@@ -742,7 +755,7 @@ export default function NestedSideBar() {
|
|
|
742
755
|
{canCollapse ? (
|
|
743
756
|
<button
|
|
744
757
|
onClick={() => toggleSectionCollapse(groupId)}
|
|
745
|
-
className="flex items-center justify-between w-full px-2 py-1.5 hover:bg-
|
|
758
|
+
className="flex items-center justify-between w-full px-2 py-1.5 hover:bg-[rgb(var(--ec-content-hover))] rounded-md transition-colors cursor-pointer"
|
|
746
759
|
>
|
|
747
760
|
{headerContent}
|
|
748
761
|
</button>
|
|
@@ -750,7 +763,7 @@ export default function NestedSideBar() {
|
|
|
750
763
|
<div className="flex items-center justify-between px-2 py-1.5">{headerContent}</div>
|
|
751
764
|
)}
|
|
752
765
|
{!isCollapsed && (
|
|
753
|
-
<div className="flex flex-col gap-0.5 border-l ml-4 mt-1 border-
|
|
766
|
+
<div className="flex flex-col gap-0.5 border-l ml-4 mt-1 border-[rgb(var(--ec-content-border))]">
|
|
754
767
|
{visibleChildren.map((childRef, childIndex) => {
|
|
755
768
|
const child = resolveRef(childRef);
|
|
756
769
|
if (!child) return null;
|
|
@@ -762,7 +775,10 @@ export default function NestedSideBar() {
|
|
|
762
775
|
if (!hasVisibleChildren(child)) return null;
|
|
763
776
|
|
|
764
777
|
return (
|
|
765
|
-
<div
|
|
778
|
+
<div
|
|
779
|
+
key={`nested-group-${childKey || childIndex}`}
|
|
780
|
+
className="ml-3 mt-1.5 pl-3 border-l border-[rgb(var(--ec-content-border))]"
|
|
781
|
+
>
|
|
766
782
|
{renderGroup(child, childKey, childIndex)}
|
|
767
783
|
</div>
|
|
768
784
|
);
|
|
@@ -798,7 +814,10 @@ export default function NestedSideBar() {
|
|
|
798
814
|
<div className="flex items-center gap-2.5 min-w-0 flex-1 ">
|
|
799
815
|
{IconComponent && (
|
|
800
816
|
<span
|
|
801
|
-
className={cn(
|
|
817
|
+
className={cn(
|
|
818
|
+
'flex items-center justify-center w-5 h-5 flex-shrink-0',
|
|
819
|
+
isActive ? 'text-[rgb(var(--ec-content-text))]' : 'text-[rgb(var(--ec-content-text-muted))]'
|
|
820
|
+
)}
|
|
802
821
|
>
|
|
803
822
|
<IconComponent className="w-4 h-4" />
|
|
804
823
|
</span>
|
|
@@ -807,7 +826,9 @@ export default function NestedSideBar() {
|
|
|
807
826
|
<span
|
|
808
827
|
className={cn(
|
|
809
828
|
'text-[13px] truncate',
|
|
810
|
-
isActive
|
|
829
|
+
isActive
|
|
830
|
+
? 'text-[rgb(var(--ec-content-text))] font-medium'
|
|
831
|
+
: 'text-[rgb(var(--ec-content-text-secondary))] group-hover:text-[rgb(var(--ec-content-text))]'
|
|
811
832
|
)}
|
|
812
833
|
>
|
|
813
834
|
{item.title}
|
|
@@ -821,14 +842,14 @@ export default function NestedSideBar() {
|
|
|
821
842
|
'flex items-center justify-center w-5 h-5 rounded transition-colors cursor-pointer',
|
|
822
843
|
isFav
|
|
823
844
|
? 'text-amber-400 hover:text-amber-500'
|
|
824
|
-
: 'text-
|
|
845
|
+
: 'text-[rgb(var(--ec-content-text-muted))] opacity-0 group-hover:opacity-100 hover:text-amber-400'
|
|
825
846
|
)}
|
|
826
847
|
>
|
|
827
848
|
<Star className={cn('w-3.5 h-3.5', isFav && 'fill-current')} />
|
|
828
849
|
</div>
|
|
829
850
|
)}
|
|
830
851
|
{itemHasChildren && (
|
|
831
|
-
<span className="flex items-center justify-center w-5 h-5 text-
|
|
852
|
+
<span className="flex items-center justify-center w-5 h-5 text-[rgb(var(--ec-icon-color))] group-hover:text-[rgb(var(--ec-content-text))] group-hover:translate-x-0.5 transition-transform">
|
|
832
853
|
<ChevronRight className="w-4 h-4" />
|
|
833
854
|
</span>
|
|
834
855
|
)}
|
|
@@ -837,9 +858,11 @@ export default function NestedSideBar() {
|
|
|
837
858
|
);
|
|
838
859
|
|
|
839
860
|
const baseClasses =
|
|
840
|
-
'group flex items-center justify-between w-full px-3 py-1.5 rounded-lg cursor-pointer text-left transition-colors hover:bg-
|
|
861
|
+
'group flex items-center justify-between w-full px-3 py-1.5 rounded-lg cursor-pointer text-left transition-colors hover:bg-[rgb(var(--ec-content-hover))] active:bg-[rgb(var(--ec-content-hover))]';
|
|
841
862
|
const parentClasses = itemHasChildren ? 'font-medium' : '';
|
|
842
|
-
const activeClasses = isActive
|
|
863
|
+
const activeClasses = isActive
|
|
864
|
+
? 'bg-[rgb(var(--ec-content-active))] hover:bg-[rgb(var(--ec-content-active))] border-l-2 border-[rgb(var(--ec-accent))] rounded-l-none'
|
|
865
|
+
: '';
|
|
843
866
|
|
|
844
867
|
// Leaf item with href → render as link
|
|
845
868
|
if (item.href && !itemHasChildren) {
|
|
@@ -884,7 +907,7 @@ export default function NestedSideBar() {
|
|
|
884
907
|
<>
|
|
885
908
|
{!isTopLevel && (
|
|
886
909
|
<div
|
|
887
|
-
className="px-3 py-2 bg-
|
|
910
|
+
className="px-3 py-2 bg-[rgb(var(--ec-content-bg))] border-b border-[rgb(var(--ec-content-border))] sticky top-0 z-10"
|
|
888
911
|
onMouseEnter={() => !isTopLevel && setShowPathPreview(true)}
|
|
889
912
|
onMouseLeave={() => {
|
|
890
913
|
setShowPathPreview(false);
|
|
@@ -896,20 +919,20 @@ export default function NestedSideBar() {
|
|
|
896
919
|
disabled={isTopLevel}
|
|
897
920
|
className={cn(
|
|
898
921
|
'flex items-center gap-2 w-full px-2 py-1.5 -mx-2 rounded-md transition-colors',
|
|
899
|
-
!isTopLevel && 'hover:bg-
|
|
922
|
+
!isTopLevel && 'hover:bg-[rgb(var(--ec-content-hover))] cursor-pointer',
|
|
900
923
|
isTopLevel && 'cursor-default'
|
|
901
924
|
)}
|
|
902
925
|
>
|
|
903
926
|
<span
|
|
904
927
|
className={cn(
|
|
905
|
-
'flex items-center justify-center w-5 h-5 text-
|
|
928
|
+
'flex items-center justify-center w-5 h-5 text-[rgb(var(--ec-icon-color))] transition-all',
|
|
906
929
|
isTopLevel && 'opacity-0',
|
|
907
930
|
!isTopLevel && 'group-hover:-translate-x-0.5'
|
|
908
931
|
)}
|
|
909
932
|
>
|
|
910
933
|
<ChevronLeft className="w-4 h-4" />
|
|
911
934
|
</span>
|
|
912
|
-
<span className="text-sm font-semibold text-
|
|
935
|
+
<span className="text-sm font-semibold text-[rgb(var(--ec-content-text))] truncate">{currentLevel.title}</span>
|
|
913
936
|
{currentLevel.badge && (
|
|
914
937
|
<span
|
|
915
938
|
className={cn(
|
|
@@ -924,9 +947,11 @@ export default function NestedSideBar() {
|
|
|
924
947
|
|
|
925
948
|
{/* Path Preview Dropdown */}
|
|
926
949
|
{showPathPreview && navigationStack.length > 1 && (
|
|
927
|
-
<div className="absolute left-0 right-0 top-full bg-
|
|
950
|
+
<div className="absolute left-0 right-0 top-full bg-[rgb(var(--ec-content-bg))] border-b border-[rgb(var(--ec-content-border))] shadow-lg z-20">
|
|
928
951
|
<div className="px-3 py-2">
|
|
929
|
-
<div className="text-[10px] font-medium text-
|
|
952
|
+
<div className="text-[10px] font-medium text-[rgb(var(--ec-content-text-muted))] uppercase tracking-wide mb-2">
|
|
953
|
+
Navigation Path
|
|
954
|
+
</div>
|
|
930
955
|
<div className="flex flex-col gap-0.5">
|
|
931
956
|
{(() => {
|
|
932
957
|
const SHOW_FIRST = 2; // Show first N items
|
|
@@ -944,18 +969,23 @@ export default function NestedSideBar() {
|
|
|
944
969
|
disabled={isCurrentLevel}
|
|
945
970
|
className={cn(
|
|
946
971
|
'flex items-center gap-2 px-2 py-1.5 rounded text-left transition-colors',
|
|
947
|
-
!isCurrentLevel && 'hover:bg-
|
|
948
|
-
isCurrentLevel && 'bg-
|
|
972
|
+
!isCurrentLevel && 'hover:bg-[rgb(var(--ec-content-hover))] cursor-pointer',
|
|
973
|
+
isCurrentLevel && 'bg-[rgb(var(--ec-content-hover))] cursor-default'
|
|
949
974
|
)}
|
|
950
975
|
style={{ paddingLeft: `${displayIndex * 12 + 8}px` }}
|
|
951
976
|
>
|
|
952
977
|
{index === 0 ? (
|
|
953
|
-
<Home className="w-3.5 h-3.5 text-
|
|
978
|
+
<Home className="w-3.5 h-3.5 text-[rgb(var(--ec-icon-color))] flex-shrink-0" />
|
|
954
979
|
) : (
|
|
955
|
-
<ChevronRight className="w-3.5 h-3.5 text-
|
|
980
|
+
<ChevronRight className="w-3.5 h-3.5 text-[rgb(var(--ec-content-text-muted))] flex-shrink-0" />
|
|
956
981
|
)}
|
|
957
982
|
<span
|
|
958
|
-
className={cn(
|
|
983
|
+
className={cn(
|
|
984
|
+
'text-sm truncate',
|
|
985
|
+
isCurrentLevel
|
|
986
|
+
? 'font-medium text-[rgb(var(--ec-content-text))]'
|
|
987
|
+
: 'text-[rgb(var(--ec-content-text-secondary))]'
|
|
988
|
+
)}
|
|
959
989
|
>
|
|
960
990
|
{level.title}
|
|
961
991
|
</span>
|
|
@@ -985,16 +1015,16 @@ export default function NestedSideBar() {
|
|
|
985
1015
|
e.stopPropagation();
|
|
986
1016
|
setShowFullPath(true);
|
|
987
1017
|
}}
|
|
988
|
-
className="flex items-center gap-2 px-2 py-1.5 rounded text-left transition-colors hover:bg-
|
|
1018
|
+
className="flex items-center gap-2 px-2 py-1.5 rounded text-left transition-colors hover:bg-[rgb(var(--ec-content-hover))] cursor-pointer"
|
|
989
1019
|
style={{ paddingLeft: `${SHOW_FIRST * 12 + 8}px` }}
|
|
990
1020
|
>
|
|
991
|
-
<span className="flex items-center justify-center w-3.5 h-3.5 text-
|
|
1021
|
+
<span className="flex items-center justify-center w-3.5 h-3.5 text-[rgb(var(--ec-icon-color))]">
|
|
992
1022
|
<span className="text-xs">•••</span>
|
|
993
1023
|
</span>
|
|
994
|
-
<span className="text-sm text-
|
|
1024
|
+
<span className="text-sm text-[rgb(var(--ec-content-text-muted))]">
|
|
995
1025
|
{hiddenCount} more level{hiddenCount > 1 ? 's' : ''}
|
|
996
1026
|
</span>
|
|
997
|
-
<ChevronDown className="w-3.5 h-3.5 text-
|
|
1027
|
+
<ChevronDown className="w-3.5 h-3.5 text-[rgb(var(--ec-icon-color))] ml-auto" />
|
|
998
1028
|
</button>
|
|
999
1029
|
|
|
1000
1030
|
{/* Last N items */}
|
|
@@ -1022,7 +1052,7 @@ export default function NestedSideBar() {
|
|
|
1022
1052
|
className={cn('flex-1 overflow-y-auto overflow-x-hidden p-3', getAnimationClass())}
|
|
1023
1053
|
style={{
|
|
1024
1054
|
scrollbarWidth: 'thin',
|
|
1025
|
-
scrollbarColor: '
|
|
1055
|
+
scrollbarColor: 'rgb(var(--ec-content-border)) transparent',
|
|
1026
1056
|
}}
|
|
1027
1057
|
>
|
|
1028
1058
|
{/* Favorites Section */}
|
|
@@ -1030,7 +1060,7 @@ export default function NestedSideBar() {
|
|
|
1030
1060
|
<div className="mb-6">
|
|
1031
1061
|
<div className="flex items-center px-2 py-1.5">
|
|
1032
1062
|
<Star className="w-3.5 h-3.5 mr-2 text-amber-400 fill-current" />
|
|
1033
|
-
<span className="text-sm text-
|
|
1063
|
+
<span className="text-sm text-[rgb(var(--ec-content-text))] font-semibold">Favorites</span>
|
|
1034
1064
|
</div>
|
|
1035
1065
|
<div className="flex flex-col gap-0.5 border-l ml-3.5 border-amber-200">
|
|
1036
1066
|
{favorites.map((fav, index) => {
|
|
@@ -1042,15 +1072,18 @@ export default function NestedSideBar() {
|
|
|
1042
1072
|
key={`fav-${index}`}
|
|
1043
1073
|
onClick={() => navigateToFavorite(fav)}
|
|
1044
1074
|
className={cn(
|
|
1045
|
-
'group flex items-center justify-between w-full px-3 py-1.5 rounded-lg cursor-pointer text-left transition-colors hover:bg-amber-
|
|
1046
|
-
isActive &&
|
|
1075
|
+
'group flex items-center justify-between w-full px-3 py-1.5 rounded-lg cursor-pointer text-left transition-colors hover:bg-amber-500/10 active:bg-amber-500/20',
|
|
1076
|
+
isActive &&
|
|
1077
|
+
'bg-[rgb(var(--ec-content-active))] hover:bg-[rgb(var(--ec-content-active))] border-l-2 border-[rgb(var(--ec-accent))] rounded-l-none'
|
|
1047
1078
|
)}
|
|
1048
1079
|
>
|
|
1049
1080
|
<div className="flex items-center gap-2.5 min-w-0 flex-1">
|
|
1050
1081
|
<span
|
|
1051
1082
|
className={cn(
|
|
1052
1083
|
'text-[14px] truncate',
|
|
1053
|
-
isActive
|
|
1084
|
+
isActive
|
|
1085
|
+
? 'text-[rgb(var(--ec-content-text))] font-medium'
|
|
1086
|
+
: 'text-[rgb(var(--ec-content-text-secondary))] group-hover:text-[rgb(var(--ec-content-text))]'
|
|
1054
1087
|
)}
|
|
1055
1088
|
>
|
|
1056
1089
|
{fav.title}
|
|
@@ -1077,7 +1110,7 @@ export default function NestedSideBar() {
|
|
|
1077
1110
|
<Star className="w-3.5 h-3.5 fill-current" />
|
|
1078
1111
|
</div>
|
|
1079
1112
|
{node?.pages && node.pages.length > 0 && (
|
|
1080
|
-
<span className="flex items-center justify-center w-5 h-5 text-
|
|
1113
|
+
<span className="flex items-center justify-center w-5 h-5 text-[rgb(var(--ec-icon-color))] group-hover:text-[rgb(var(--ec-content-text))]">
|
|
1081
1114
|
<ChevronRight className="w-4 h-4" />
|
|
1082
1115
|
</span>
|
|
1083
1116
|
)}
|
|
@@ -1092,11 +1125,11 @@ export default function NestedSideBar() {
|
|
|
1092
1125
|
{/* Empty State */}
|
|
1093
1126
|
{currentLevel.entries.length === 0 && favorites.length === 0 && (
|
|
1094
1127
|
<div className="flex flex-col items-center justify-center px-6 py-12 text-center">
|
|
1095
|
-
<div className="mb-4 p-3 rounded-full bg-
|
|
1096
|
-
<FileQuestion className="w-8 h-8 text-
|
|
1128
|
+
<div className="mb-4 p-3 rounded-full bg-[rgb(var(--ec-group-icon-bg))]">
|
|
1129
|
+
<FileQuestion className="w-8 h-8 text-[rgb(var(--ec-icon-color))]" />
|
|
1097
1130
|
</div>
|
|
1098
|
-
<h3 className="text-sm font-semibold text-
|
|
1099
|
-
<p className="text-xs text-
|
|
1131
|
+
<h3 className="text-sm font-semibold text-[rgb(var(--ec-content-text))] mb-2">Your catalog is empty</h3>
|
|
1132
|
+
<p className="text-xs text-[rgb(var(--ec-content-text-muted))] leading-relaxed max-w-[240px]">
|
|
1100
1133
|
Navigation will appear here when you add resources to your EventCatalog.
|
|
1101
1134
|
</p>
|
|
1102
1135
|
</div>
|
|
@@ -246,15 +246,15 @@ export const Table = <T extends TCollectionTypes>({
|
|
|
246
246
|
|
|
247
247
|
return (
|
|
248
248
|
<div>
|
|
249
|
-
<div className="rounded-lg border border-
|
|
250
|
-
<table className="min-w-full divide-y divide-
|
|
251
|
-
<thead className="bg-
|
|
249
|
+
<div className="rounded-lg border border-[rgb(var(--ec-page-border))] overflow-hidden">
|
|
250
|
+
<table className="min-w-full divide-y divide-[rgb(var(--ec-page-border))]">
|
|
251
|
+
<thead className="bg-[rgb(var(--ec-content-hover))] sticky top-0 z-10">
|
|
252
252
|
{table.getHeaderGroups().map((headerGroup, index) => (
|
|
253
253
|
<tr key={`${headerGroup}-${index}`}>
|
|
254
254
|
{headerGroup.headers.map((header) => (
|
|
255
255
|
<th
|
|
256
256
|
key={`${header.id}`}
|
|
257
|
-
className="px-4 py-3 text-left text-xs font-semibold text-
|
|
257
|
+
className="px-4 py-3 text-left text-xs font-semibold text-[rgb(var(--ec-page-text-muted))] uppercase tracking-wider"
|
|
258
258
|
>
|
|
259
259
|
<div className="flex flex-col gap-2">
|
|
260
260
|
<div>{header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}</div>
|
|
@@ -269,14 +269,14 @@ export const Table = <T extends TCollectionTypes>({
|
|
|
269
269
|
))}
|
|
270
270
|
</thead>
|
|
271
271
|
|
|
272
|
-
<tbody className="bg-
|
|
272
|
+
<tbody className="bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))] divide-y divide-[rgb(var(--ec-page-border))]">
|
|
273
273
|
{hasResults ? (
|
|
274
274
|
table.getRowModel().rows.map((row, index) => (
|
|
275
|
-
<tr key={`${row.id}-${index}`} className="hover:bg-
|
|
275
|
+
<tr key={`${row.id}-${index}`} className="hover:bg-[rgb(var(--ec-content-hover))] transition-colors">
|
|
276
276
|
{row.getVisibleCells().map((cell) => (
|
|
277
277
|
<td
|
|
278
278
|
key={cell.id}
|
|
279
|
-
className={`px-4 py-3 text-sm text-
|
|
279
|
+
className={`px-4 py-3 text-sm text-[rgb(var(--ec-page-text))] ${cell.column.columnDef.meta?.className || ''}`}
|
|
280
280
|
>
|
|
281
281
|
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
|
282
282
|
</td>
|
|
@@ -286,10 +286,10 @@ export const Table = <T extends TCollectionTypes>({
|
|
|
286
286
|
) : (
|
|
287
287
|
<tr>
|
|
288
288
|
<td colSpan={table.getAllColumns().length} className="px-4 py-12 text-center">
|
|
289
|
-
<div className="flex flex-col items-center justify-center text-
|
|
290
|
-
<SearchX className="w-10 h-10 text-
|
|
291
|
-
<p className="text-sm font-medium text-
|
|
292
|
-
<p className="text-xs text-
|
|
289
|
+
<div className="flex flex-col items-center justify-center text-[rgb(var(--ec-page-text-muted))]">
|
|
290
|
+
<SearchX className="w-10 h-10 text-[rgb(var(--ec-icon-color))] mb-3 opacity-50" />
|
|
291
|
+
<p className="text-sm font-medium text-[rgb(var(--ec-page-text-muted))]">No results found</p>
|
|
292
|
+
<p className="text-xs text-[rgb(var(--ec-icon-color))] mt-1">Try adjusting your search or filters</p>
|
|
293
293
|
</div>
|
|
294
294
|
</td>
|
|
295
295
|
</tr>
|
|
@@ -300,18 +300,18 @@ export const Table = <T extends TCollectionTypes>({
|
|
|
300
300
|
|
|
301
301
|
{/* Pagination */}
|
|
302
302
|
<div className="flex items-center justify-between px-1 py-4">
|
|
303
|
-
<div className="text-sm text-
|
|
303
|
+
<div className="text-sm text-[rgb(var(--ec-page-text-muted))]">
|
|
304
304
|
{totalResults > 0 && (
|
|
305
305
|
<span>
|
|
306
|
-
Showing <span className="font-medium text-
|
|
307
|
-
<span className="font-medium text-
|
|
306
|
+
Showing <span className="font-medium text-[rgb(var(--ec-page-text))]">{table.getRowModel().rows.length}</span> of{' '}
|
|
307
|
+
<span className="font-medium text-[rgb(var(--ec-page-text))]">{totalResults}</span> results
|
|
308
308
|
</span>
|
|
309
309
|
)}
|
|
310
310
|
</div>
|
|
311
311
|
<div className="flex items-center gap-2">
|
|
312
|
-
<div className="flex items-center rounded-lg border border-
|
|
312
|
+
<div className="flex items-center rounded-lg border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))]">
|
|
313
313
|
<button
|
|
314
|
-
className="p-2 text-
|
|
314
|
+
className="p-2 text-[rgb(var(--ec-icon-color))] hover:text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-content-hover))] disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors rounded-l-lg"
|
|
315
315
|
onClick={() => table.setPageIndex(0)}
|
|
316
316
|
disabled={!table.getCanPreviousPage()}
|
|
317
317
|
title="First page"
|
|
@@ -319,19 +319,20 @@ export const Table = <T extends TCollectionTypes>({
|
|
|
319
319
|
<ChevronsLeft className="w-4 h-4" />
|
|
320
320
|
</button>
|
|
321
321
|
<button
|
|
322
|
-
className="p-2 text-
|
|
322
|
+
className="p-2 text-[rgb(var(--ec-icon-color))] hover:text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-content-hover))] disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors border-l border-[rgb(var(--ec-page-border))]"
|
|
323
323
|
onClick={() => table.previousPage()}
|
|
324
324
|
disabled={!table.getCanPreviousPage()}
|
|
325
325
|
title="Previous page"
|
|
326
326
|
>
|
|
327
327
|
<ChevronLeft className="w-4 h-4" />
|
|
328
328
|
</button>
|
|
329
|
-
<span className="px-3 py-2 text-sm text-
|
|
330
|
-
Page
|
|
331
|
-
<span className="font-medium">{table.
|
|
329
|
+
<span className="px-3 py-2 text-sm text-[rgb(var(--ec-page-text-muted))] border-l border-r border-[rgb(var(--ec-page-border))] min-w-[100px] text-center">
|
|
330
|
+
Page{' '}
|
|
331
|
+
<span className="font-medium text-[rgb(var(--ec-page-text))]">{table.getState().pagination.pageIndex + 1}</span> of{' '}
|
|
332
|
+
<span className="font-medium text-[rgb(var(--ec-page-text))]">{table.getPageCount() || 1}</span>
|
|
332
333
|
</span>
|
|
333
334
|
<button
|
|
334
|
-
className="p-2 text-
|
|
335
|
+
className="p-2 text-[rgb(var(--ec-icon-color))] hover:text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-content-hover))] disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors border-r border-[rgb(var(--ec-page-border))]"
|
|
335
336
|
onClick={() => table.nextPage()}
|
|
336
337
|
disabled={!table.getCanNextPage()}
|
|
337
338
|
title="Next page"
|
|
@@ -339,7 +340,7 @@ export const Table = <T extends TCollectionTypes>({
|
|
|
339
340
|
<ChevronRight className="w-4 h-4" />
|
|
340
341
|
</button>
|
|
341
342
|
<button
|
|
342
|
-
className="p-2 text-
|
|
343
|
+
className="p-2 text-[rgb(var(--ec-icon-color))] hover:text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-content-hover))] disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors rounded-r-lg"
|
|
343
344
|
onClick={() => table.setPageIndex(table.getPageCount() - 1)}
|
|
344
345
|
disabled={!table.getCanNextPage()}
|
|
345
346
|
title="Last page"
|
|
@@ -352,7 +353,7 @@ export const Table = <T extends TCollectionTypes>({
|
|
|
352
353
|
onChange={(e) => {
|
|
353
354
|
table.setPageSize(Number(e.target.value));
|
|
354
355
|
}}
|
|
355
|
-
className="px-3 py-2 text-sm text-
|
|
356
|
+
className="px-3 py-2 text-sm text-[rgb(var(--ec-page-text-muted))] bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))] border border-[rgb(var(--ec-page-border))] rounded-lg hover:border-[rgb(var(--ec-icon-color))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ec-accent)/0.2)] transition-colors"
|
|
356
357
|
>
|
|
357
358
|
{[10, 20, 30, 40, 50].map((pageSize) => (
|
|
358
359
|
<option key={pageSize} value={pageSize}>
|
|
@@ -427,7 +428,7 @@ function Filter<T extends TCollectionTypes>({ column }: { column: Column<TData<T
|
|
|
427
428
|
value={(columnFilterValue ?? '') as string}
|
|
428
429
|
onChange={(value) => column.setFilterValue(value)}
|
|
429
430
|
placeholder={!column?.columnDef?.meta?.filterVariant ? `Search (${uniqueCount})...` : 'Search...'}
|
|
430
|
-
className="w-full px-3 py-2 text-sm bg-
|
|
431
|
+
className="w-full px-3 py-2 text-sm bg-[rgb(var(--ec-input-bg))] text-[rgb(var(--ec-input-text))] border border-[rgb(var(--ec-input-border))] rounded-lg placeholder:text-[rgb(var(--ec-input-placeholder))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ec-accent)/0.2)] focus:border-[rgb(var(--ec-accent))] transition-colors"
|
|
431
432
|
list={column.id + 'list'}
|
|
432
433
|
/>
|
|
433
434
|
</div>
|
|
@@ -21,13 +21,13 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
21
21
|
href={buildUrl(`/docs/${containerRaw.collection}/${containerRaw.data.id}/${containerRaw.data.version}`)}
|
|
22
22
|
className="group inline-flex items-center"
|
|
23
23
|
>
|
|
24
|
-
<span className="inline-flex items-center rounded-md border border-
|
|
24
|
+
<span className="inline-flex items-center rounded-md border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))] hover:border-blue-400 dark:hover:border-blue-500 hover:bg-blue-50 dark:hover:bg-blue-500/10 transition-colors">
|
|
25
25
|
<span className="flex items-center justify-center w-6 h-6 bg-blue-500 rounded-l-md">
|
|
26
26
|
<DatabaseIcon className="h-3 w-3 text-white" />
|
|
27
27
|
</span>
|
|
28
|
-
<span className="px-2 py-1 text-xs text-
|
|
28
|
+
<span className="px-2 py-1 text-xs text-[rgb(var(--ec-page-text))] group-hover:text-[rgb(var(--ec-page-text))]">
|
|
29
29
|
{containerRaw.data.name}
|
|
30
|
-
<span className="text-
|
|
30
|
+
<span className="text-[rgb(var(--ec-icon-color))] ml-1">v{containerRaw.data.version}</span>
|
|
31
31
|
</span>
|
|
32
32
|
</span>
|
|
33
33
|
</a>
|
|
@@ -45,7 +45,7 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
45
45
|
cell: (info) => {
|
|
46
46
|
const summary = info.renderValue() as string;
|
|
47
47
|
return (
|
|
48
|
-
<span className="text-sm text-
|
|
48
|
+
<span className="text-sm text-[rgb(var(--ec-page-text-muted))] line-clamp-2" title={summary || ''}>
|
|
49
49
|
{summary}
|
|
50
50
|
</span>
|
|
51
51
|
);
|
|
@@ -69,7 +69,7 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
69
69
|
|
|
70
70
|
if (services?.length === 0 || !services)
|
|
71
71
|
return (
|
|
72
|
-
<span className="inline-flex items-center px-2 py-1 text-xs text-
|
|
72
|
+
<span className="inline-flex items-center px-2 py-1 text-xs text-[rgb(var(--ec-icon-color))] bg-[rgb(var(--ec-content-hover))] rounded-md border border-[rgb(var(--ec-page-border))]">
|
|
73
73
|
No services
|
|
74
74
|
</span>
|
|
75
75
|
);
|
|
@@ -85,19 +85,22 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
85
85
|
href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.version}`)}
|
|
86
86
|
className="group inline-flex items-center"
|
|
87
87
|
>
|
|
88
|
-
<span className="inline-flex items-center rounded-md border border-
|
|
88
|
+
<span className="inline-flex items-center rounded-md border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))] hover:border-pink-400 dark:hover:border-pink-500 hover:bg-pink-50 dark:hover:bg-pink-500/10 transition-colors">
|
|
89
89
|
<span className="flex items-center justify-center w-6 h-6 bg-pink-500 rounded-l-md">
|
|
90
90
|
<ServerIcon className="h-3 w-3 text-white" />
|
|
91
91
|
</span>
|
|
92
|
-
<span className="px-2 py-1 text-xs text-
|
|
92
|
+
<span className="px-2 py-1 text-xs text-[rgb(var(--ec-page-text))] group-hover:text-[rgb(var(--ec-page-text))]">
|
|
93
93
|
{service.data.name}
|
|
94
|
-
<span className="text-
|
|
94
|
+
<span className="text-[rgb(var(--ec-icon-color))] ml-1">v{service.data.version}</span>
|
|
95
95
|
</span>
|
|
96
96
|
</span>
|
|
97
97
|
</a>
|
|
98
98
|
))}
|
|
99
99
|
{hiddenCount > 0 && (
|
|
100
|
-
<button
|
|
100
|
+
<button
|
|
101
|
+
onClick={() => setIsExpanded(!isExpanded)}
|
|
102
|
+
className="text-xs text-[rgb(var(--ec-icon-color))] hover:text-[rgb(var(--ec-page-text))] text-left"
|
|
103
|
+
>
|
|
101
104
|
{isExpanded ? 'Show less' : `+${hiddenCount} more`}
|
|
102
105
|
</button>
|
|
103
106
|
)}
|
|
@@ -120,7 +123,7 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
120
123
|
|
|
121
124
|
if (services?.length === 0 || !services)
|
|
122
125
|
return (
|
|
123
|
-
<span className="inline-flex items-center px-2 py-1 text-xs text-
|
|
126
|
+
<span className="inline-flex items-center px-2 py-1 text-xs text-[rgb(var(--ec-icon-color))] bg-[rgb(var(--ec-content-hover))] rounded-md border border-[rgb(var(--ec-page-border))]">
|
|
124
127
|
No services
|
|
125
128
|
</span>
|
|
126
129
|
);
|
|
@@ -136,19 +139,22 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
136
139
|
href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.version}`)}
|
|
137
140
|
className="group inline-flex items-center"
|
|
138
141
|
>
|
|
139
|
-
<span className="inline-flex items-center rounded-md border border-
|
|
142
|
+
<span className="inline-flex items-center rounded-md border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))] hover:border-pink-400 dark:hover:border-pink-500 hover:bg-pink-50 dark:hover:bg-pink-500/10 transition-colors">
|
|
140
143
|
<span className="flex items-center justify-center w-6 h-6 bg-pink-500 rounded-l-md">
|
|
141
144
|
<ServerIcon className="h-3 w-3 text-white" />
|
|
142
145
|
</span>
|
|
143
|
-
<span className="px-2 py-1 text-xs text-
|
|
146
|
+
<span className="px-2 py-1 text-xs text-[rgb(var(--ec-page-text))] group-hover:text-[rgb(var(--ec-page-text))]">
|
|
144
147
|
{service.data.name}
|
|
145
|
-
<span className="text-
|
|
148
|
+
<span className="text-[rgb(var(--ec-icon-color))] ml-1">v{service.data.version}</span>
|
|
146
149
|
</span>
|
|
147
150
|
</span>
|
|
148
151
|
</a>
|
|
149
152
|
))}
|
|
150
153
|
{hiddenCount > 0 && (
|
|
151
|
-
<button
|
|
154
|
+
<button
|
|
155
|
+
onClick={() => setIsExpanded(!isExpanded)}
|
|
156
|
+
className="text-xs text-[rgb(var(--ec-icon-color))] hover:text-[rgb(var(--ec-page-text))] text-left"
|
|
157
|
+
>
|
|
152
158
|
{isExpanded ? 'Show less' : `+${hiddenCount} more`}
|
|
153
159
|
</button>
|
|
154
160
|
)}
|
|
@@ -166,13 +172,13 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
166
172
|
return (
|
|
167
173
|
<div className="flex items-center gap-2">
|
|
168
174
|
<a
|
|
169
|
-
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-
|
|
175
|
+
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-[rgb(var(--ec-page-text-muted))] bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))] rounded-md hover:bg-[rgb(var(--ec-content-hover))] hover:text-[rgb(var(--ec-page-text))] transition-colors whitespace-nowrap"
|
|
170
176
|
href={buildUrl(`/docs/${item.collection}/${item.data.id}/${item.data.version}`)}
|
|
171
177
|
>
|
|
172
178
|
Docs
|
|
173
179
|
</a>
|
|
174
180
|
<a
|
|
175
|
-
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-
|
|
181
|
+
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-[rgb(var(--ec-page-text-muted))] bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))] rounded-md hover:bg-[rgb(var(--ec-content-hover))] hover:text-[rgb(var(--ec-page-text))] transition-colors whitespace-nowrap"
|
|
176
182
|
href={buildUrl(`/visualiser/${item.collection}/${item.data.id}/${item.data.version}`)}
|
|
177
183
|
>
|
|
178
184
|
Visualiser
|