@eventcatalog/core 3.0.0-beta.9 → 3.1.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.
Files changed (197) hide show
  1. package/README.md +41 -98
  2. package/dist/__mocks__/astro-content.cjs +32 -0
  3. package/dist/__mocks__/astro-content.d.cts +13 -0
  4. package/dist/__mocks__/astro-content.d.ts +13 -0
  5. package/dist/__mocks__/astro-content.js +7 -0
  6. package/dist/analytics/analytics.cjs +1 -1
  7. package/dist/analytics/analytics.js +2 -2
  8. package/dist/analytics/log-build.cjs +1 -1
  9. package/dist/analytics/log-build.js +3 -3
  10. package/dist/catalog-to-astro-content-directory.cjs +2 -19
  11. package/dist/catalog-to-astro-content-directory.d.cts +1 -2
  12. package/dist/catalog-to-astro-content-directory.d.ts +1 -2
  13. package/dist/catalog-to-astro-content-directory.js +3 -5
  14. package/dist/{chunk-RAJ7TGWN.js → chunk-2WGZFERB.js} +1 -1
  15. package/dist/{chunk-R2BJ7MJG.js → chunk-6Z6ARMQS.js} +1 -17
  16. package/dist/{chunk-TC3R47V6.js → chunk-ESUL7UE6.js} +1 -1
  17. package/dist/{chunk-2VPX4WIJ.js → chunk-I3CW5KQI.js} +1 -1
  18. package/dist/{chunk-TT4LZO2Q.js → chunk-KBO4IL2D.js} +1 -1
  19. package/dist/{chunk-A4MGWK5T.js → chunk-URR33SNK.js} +1 -1
  20. package/dist/constants.cjs +1 -1
  21. package/dist/constants.js +1 -1
  22. package/dist/eventcatalog.cjs +20 -64
  23. package/dist/eventcatalog.config.d.cts +11 -0
  24. package/dist/eventcatalog.config.d.ts +11 -0
  25. package/dist/eventcatalog.js +26 -52
  26. package/dist/generate.cjs +1 -1
  27. package/dist/generate.js +3 -3
  28. package/dist/utils/cli-logger.cjs +1 -1
  29. package/dist/utils/cli-logger.js +2 -2
  30. package/eventcatalog/astro.config.mjs +4 -1
  31. package/eventcatalog/integrations/eventcatalog-features.ts +69 -0
  32. package/eventcatalog/public/icons/asyncapi-black.svg +2 -0
  33. package/eventcatalog/public/icons/graphql-black.svg +1 -0
  34. package/eventcatalog/public/icons/openapi-black.svg +1 -0
  35. package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +1010 -0
  36. package/eventcatalog/src/components/ChatPanel/ChatPanelButton.tsx +24 -0
  37. package/eventcatalog/src/components/Checkbox.astro +7 -4
  38. package/eventcatalog/src/components/CopyAsMarkdown.tsx +15 -15
  39. package/eventcatalog/src/components/EnvironmentDropdown.tsx +15 -7
  40. package/eventcatalog/src/components/FavoriteButton.tsx +1 -1
  41. package/eventcatalog/src/components/Grids/DomainGrid.tsx +322 -173
  42. package/eventcatalog/src/components/Grids/MessageGrid.tsx +317 -178
  43. package/eventcatalog/src/components/Grids/specification-utils.ts +106 -0
  44. package/eventcatalog/src/components/Header.astro +40 -15
  45. package/eventcatalog/src/components/Lists/OwnersList.tsx +17 -10
  46. package/eventcatalog/src/components/Lists/PillListFlat.styles.css +12 -0
  47. package/eventcatalog/src/components/Lists/PillListFlat.tsx +15 -15
  48. package/eventcatalog/src/components/Lists/VersionList.astro +15 -5
  49. package/eventcatalog/src/components/MDX/Accordion/Accordion.tsx +3 -3
  50. package/eventcatalog/src/components/MDX/Admonition.tsx +49 -9
  51. package/eventcatalog/src/components/MDX/Attachments.astro +15 -11
  52. package/eventcatalog/src/components/MDX/ChannelInformation/ChannelInformation.tsx +29 -15
  53. package/eventcatalog/src/components/MDX/EntityPropertiesTable/EntityPropertiesTable.astro +20 -13
  54. package/eventcatalog/src/components/MDX/Link/Link.astro +1 -1
  55. package/eventcatalog/src/components/MDX/MessageTable/MessageTable.client.tsx +50 -29
  56. package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +28 -15
  57. package/eventcatalog/src/components/MDX/NodeGraph/StepWalkthrough.tsx +4 -4
  58. package/eventcatalog/src/components/MDX/NodeGraph/StudioModal.tsx +4 -4
  59. package/eventcatalog/src/components/MDX/NodeGraph/VisualiserSearch.tsx +2 -2
  60. package/eventcatalog/src/components/MDX/ResourceGroupTable/ResourceGroupTable.client.tsx +54 -33
  61. package/eventcatalog/src/components/MDX/ResourceLink/ResourceLink.astro +1 -1
  62. package/eventcatalog/src/components/MDX/Steps/Step.astro +2 -2
  63. package/eventcatalog/src/components/MDX/Steps/Steps.astro +3 -3
  64. package/eventcatalog/src/components/MDX/Tabs/Tabs.astro +13 -9
  65. package/eventcatalog/src/components/MDX/Tiles/Tile.astro +25 -13
  66. package/eventcatalog/src/components/MDX/Tiles/Tiles.astro +1 -1
  67. package/eventcatalog/src/components/SchemaExplorer/ApiAccessSection.tsx +95 -90
  68. package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +144 -0
  69. package/eventcatalog/src/components/SchemaExplorer/AvroSchemaViewer.tsx +29 -25
  70. package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +3 -3
  71. package/eventcatalog/src/components/SchemaExplorer/JSONSchemaViewer.tsx +61 -42
  72. package/eventcatalog/src/components/SchemaExplorer/OwnersSection.tsx +13 -9
  73. package/eventcatalog/src/components/SchemaExplorer/Pagination.tsx +36 -8
  74. package/eventcatalog/src/components/SchemaExplorer/ProducersConsumersSection.tsx +17 -13
  75. package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +37 -10
  76. package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsHeader.tsx +152 -109
  77. package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +6 -15
  78. package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +257 -61
  79. package/eventcatalog/src/components/SchemaExplorer/SchemaFilters.tsx +64 -126
  80. package/eventcatalog/src/components/SchemaExplorer/SchemaListItem.tsx +53 -43
  81. package/eventcatalog/src/components/SchemaExplorer/SchemaViewerModal.tsx +8 -8
  82. package/eventcatalog/src/components/Search/Search.astro +5 -5
  83. package/eventcatalog/src/components/Search/SearchDataLoader.astro +25 -0
  84. package/eventcatalog/src/components/Search/SearchModal.tsx +65 -36
  85. package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +37 -24
  86. package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +117 -56
  87. package/eventcatalog/src/components/SideNav/SideNav.astro +0 -15
  88. package/eventcatalog/src/components/Tables/Table.tsx +97 -77
  89. package/eventcatalog/src/components/Tables/columns/ContainersTableColumns.tsx +114 -74
  90. package/eventcatalog/src/components/Tables/columns/DomainTableColumns.tsx +77 -55
  91. package/eventcatalog/src/components/Tables/columns/FlowTableColumns.tsx +36 -36
  92. package/eventcatalog/src/components/Tables/columns/MessageTableColumns.tsx +116 -77
  93. package/eventcatalog/src/components/Tables/columns/ServiceTableColumns.tsx +111 -94
  94. package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +31 -26
  95. package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +123 -215
  96. package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +156 -243
  97. package/eventcatalog/src/components/ThemeToggle.tsx +18 -0
  98. package/eventcatalog/src/content.config.ts +1 -13
  99. package/eventcatalog/src/enterprise/ai/chat-api.ts +360 -0
  100. package/eventcatalog/src/enterprise/auth/[...auth].ts +3 -0
  101. package/eventcatalog/src/enterprise/auth/login.astro +420 -0
  102. package/eventcatalog/src/enterprise/collections/index.ts +0 -1
  103. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +15 -7
  104. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +2 -2
  105. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +19 -15
  106. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +50 -17
  107. package/eventcatalog/src/layouts/DirectoryLayout.astro +11 -6
  108. package/eventcatalog/src/layouts/DiscoverLayout.astro +13 -8
  109. package/eventcatalog/src/layouts/Footer.astro +14 -11
  110. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +187 -123
  111. package/eventcatalog/src/pages/_index.astro +213 -573
  112. package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/_index.data.ts +8 -2
  113. package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +9 -5
  114. package/eventcatalog/src/pages/directory/[type]/index.astro +6 -0
  115. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +19 -3
  116. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +7 -7
  117. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +5 -5
  118. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +81 -64
  119. package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +23 -24
  120. package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +214 -125
  121. package/eventcatalog/src/pages/docs/custom/index.astro +2 -2
  122. package/eventcatalog/src/pages/docs/teams/[id]/index.astro +98 -70
  123. package/eventcatalog/src/pages/docs/teams/[id].mdx.ts +36 -0
  124. package/eventcatalog/src/pages/docs/users/[id]/index.astro +60 -45
  125. package/eventcatalog/src/pages/docs/users/[id].mdx.ts +36 -0
  126. package/eventcatalog/src/pages/schemas/explorer/_index.data.ts +178 -0
  127. package/eventcatalog/src/pages/schemas/explorer/index.astro +7 -157
  128. package/eventcatalog/src/pages/studio.astro +155 -75
  129. package/eventcatalog/src/remark-plugins/directives.ts +36 -15
  130. package/eventcatalog/src/remark-plugins/mermaid.ts +2 -2
  131. package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/container.ts +10 -1
  132. package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/domain.ts +17 -7
  133. package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/message.ts +10 -1
  134. package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/service.ts +11 -4
  135. package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/shared.ts +14 -0
  136. package/eventcatalog/src/stores/{sidebar-store.ts → sidebar-store/index.ts} +1 -1
  137. package/eventcatalog/src/stores/theme-store.ts +93 -0
  138. package/eventcatalog/src/styles/theme.css +255 -0
  139. package/eventcatalog/src/styles/themes/forest.css +230 -0
  140. package/eventcatalog/src/styles/themes/ocean.css +235 -0
  141. package/eventcatalog/src/styles/themes/sapphire.css +230 -0
  142. package/eventcatalog/src/styles/themes/sunset.css +230 -0
  143. package/eventcatalog/src/utils/collections/channels.ts +0 -2
  144. package/eventcatalog/src/utils/collections/commands.ts +0 -2
  145. package/eventcatalog/src/utils/collections/containers.ts +0 -2
  146. package/eventcatalog/src/utils/collections/domains.ts +0 -2
  147. package/eventcatalog/src/utils/collections/entities.ts +0 -2
  148. package/eventcatalog/src/utils/collections/events.ts +0 -2
  149. package/eventcatalog/src/utils/collections/flows.ts +0 -2
  150. package/eventcatalog/src/utils/collections/queries.ts +0 -2
  151. package/eventcatalog/src/utils/collections/schemas.ts +45 -7
  152. package/eventcatalog/src/utils/collections/services.ts +0 -2
  153. package/eventcatalog/src/utils/feature.ts +13 -5
  154. package/eventcatalog/src/utils/node-graphs/services-node-graph.ts +1 -1
  155. package/eventcatalog/src/utils/resource-files.ts +86 -0
  156. package/eventcatalog/tailwind.config.mjs +6 -3
  157. package/package.json +12 -15
  158. package/default-files-for-collections/changelogs.md +0 -5
  159. package/default-files-for-collections/channels.md +0 -8
  160. package/default-files-for-collections/commands.md +0 -8
  161. package/default-files-for-collections/domains.md +0 -8
  162. package/default-files-for-collections/events.md +0 -8
  163. package/default-files-for-collections/flows.md +0 -11
  164. package/default-files-for-collections/queries.md +0 -8
  165. package/default-files-for-collections/services.md +0 -8
  166. package/default-files-for-collections/ubiquitousLanguages.md +0 -7
  167. package/eventcatalog/src/enterprise/collections/chat-prompts.ts +0 -32
  168. package/eventcatalog/src/enterprise/eventcatalog-chat/components/Chat.tsx +0 -60
  169. package/eventcatalog/src/enterprise/eventcatalog-chat/components/ChatMessage.tsx +0 -414
  170. package/eventcatalog/src/enterprise/eventcatalog-chat/components/ChatSidebar.tsx +0 -169
  171. package/eventcatalog/src/enterprise/eventcatalog-chat/components/InputModal.tsx +0 -244
  172. package/eventcatalog/src/enterprise/eventcatalog-chat/components/MentionInput.tsx +0 -211
  173. package/eventcatalog/src/enterprise/eventcatalog-chat/components/WelcomePromptArea.tsx +0 -176
  174. package/eventcatalog/src/enterprise/eventcatalog-chat/components/default-prompts.ts +0 -93
  175. package/eventcatalog/src/enterprise/eventcatalog-chat/components/hooks/ChatProvider.tsx +0 -143
  176. package/eventcatalog/src/enterprise/eventcatalog-chat/components/windows/ChatWindow.server.tsx +0 -387
  177. package/eventcatalog/src/enterprise/eventcatalog-chat/pages/api/chat.ts +0 -59
  178. package/eventcatalog/src/enterprise/eventcatalog-chat/pages/chat/index.astro +0 -104
  179. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/ai-provider.ts +0 -140
  180. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/anthropic.ts +0 -28
  181. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/google.ts +0 -41
  182. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/index.ts +0 -26
  183. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/openai.ts +0 -61
  184. package/eventcatalog/src/enterprise/eventcatalog-chat/utils/chat-prompts.ts +0 -50
  185. package/eventcatalog/src/pages/auth/login.astro +0 -280
  186. package/eventcatalog/src/pages/chat/feature.astro +0 -179
  187. package/eventcatalog/src/pages/chat/index.astro +0 -10
  188. package/eventcatalog/src/pages/docs/_default-docs.mdx +0 -25
  189. package/eventcatalog/src/pages/docs/index.astro +0 -33
  190. package/eventcatalog/src/pages/nav-index.json.ts +0 -30
  191. /package/eventcatalog/src/{pages → enterprise}/auth/error.astro +0 -0
  192. /package/eventcatalog/src/{middleware-auth.ts → enterprise/auth/middleware/middleware-auth.ts} +0 -0
  193. /package/eventcatalog/src/{middleware.ts → enterprise/auth/middleware/middleware.ts} +0 -0
  194. /package/eventcatalog/src/{pages/unauthorized/index.astro → enterprise/auth/unauthorized.astro} +0 -0
  195. /package/eventcatalog/src/{pages → enterprise}/plans/index.astro +0 -0
  196. /package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/flow.ts +0 -0
  197. /package/eventcatalog/src/{components/SideNav/NestedSideBar/sidebar-builder.ts → stores/sidebar-store/state.ts} +0 -0
@@ -0,0 +1,230 @@
1
+ /**
2
+ * Sapphire Theme for EventCatalog
3
+ *
4
+ * A professional, premium theme inspired by sapphire gemstones.
5
+ * Deep blues with elegant accents for enterprise environments.
6
+ */
7
+
8
+ /* Sapphire Light Mode */
9
+ :root[data-catalog-theme="sapphire"],
10
+ :root[data-catalog-theme="sapphire"][data-theme="light"] {
11
+ /* Header - clean white with subtle blue tint */
12
+ --ec-header-bg: 255 255 255; /* #ffffff */
13
+ --ec-header-text: 15 23 42; /* #0f172a */
14
+ --ec-header-border: 226 232 240; /* #e2e8f0 slate-200 */
15
+
16
+ /* Primary brand color - sapphire blue */
17
+ --ec-primary: 59 130 246; /* #3b82f6 blue-500 */
18
+ --ec-primary-hover: 37 99 235; /* #2563eb blue-600 */
19
+
20
+ /* Accent colors - sapphire blue */
21
+ --ec-accent: 59 130 246; /* #3b82f6 (blue-500) */
22
+ --ec-accent-hover: 37 99 235; /* #2563eb (blue-600) */
23
+ --ec-accent-subtle: 219 234 254; /* #dbeafe (blue-100) */
24
+ --ec-accent-text: 30 64 175; /* #1e40af (blue-800) */
25
+ --ec-accent-gradient-from: 59 130 246; /* #3b82f6 (blue-500) */
26
+ --ec-accent-gradient-to: 37 99 235; /* #2563eb (blue-600) */
27
+
28
+ /* Buttons */
29
+ --ec-button-bg: 37 99 235; /* #2563eb blue-600 */
30
+ --ec-button-bg-hover: 29 78 216; /* #1d4ed8 blue-700 */
31
+ --ec-button-text: 255 255 255; /* #ffffff */
32
+
33
+ /* Dropdowns & menus */
34
+ --ec-dropdown-bg: 255 255 255; /* #ffffff */
35
+ --ec-dropdown-text: 51 65 85; /* #334155 */
36
+ --ec-dropdown-hover: 239 246 255; /* #eff6ff blue-50 */
37
+ --ec-dropdown-border: 226 232 240; /* #e2e8f0 slate-200 */
38
+
39
+ /* Icons */
40
+ --ec-icon-color: 71 85 105; /* #475569 slate-600 */
41
+ --ec-icon-hover: 37 99 235; /* #2563eb blue-600 */
42
+
43
+ /* Sidebar / Vertical Nav */
44
+ --ec-sidebar-bg: 255 255 255; /* #ffffff */
45
+ --ec-sidebar-bg-gradient: 239 246 255; /* #eff6ff blue-50 */
46
+ --ec-sidebar-border: 226 232 240; /* #e2e8f0 slate-200 */
47
+ --ec-sidebar-text: 71 85 105; /* #475569 slate-600 */
48
+ --ec-sidebar-active-bg: 37 99 235; /* #2563eb blue-600 */
49
+ --ec-sidebar-active-text: 255 255 255; /* #ffffff */
50
+ --ec-sidebar-hover-bg: 37 99 235; /* #2563eb blue-600 */
51
+
52
+ /* Nested sidebar content */
53
+ --ec-content-bg: 255 255 255; /* #ffffff */
54
+ --ec-content-text: 15 23 42; /* #0f172a */
55
+ --ec-content-text-muted: 71 85 105; /* #475569 slate-600 */
56
+ --ec-content-text-secondary: 100 116 139; /* #64748b slate-500 */
57
+ --ec-content-border: 226 232 240; /* #e2e8f0 slate-200 */
58
+ --ec-content-hover: 248 250 252; /* #f8fafc slate-50 */
59
+ --ec-content-active: 219 234 254; /* #dbeafe blue-100 */
60
+
61
+ /* Input fields */
62
+ --ec-input-bg: 255 255 255; /* #ffffff */
63
+ --ec-input-border: 203 213 225; /* #cbd5e1 slate-300 */
64
+ --ec-input-text: 15 23 42; /* #0f172a */
65
+ --ec-input-placeholder: 148 163 184; /* #94a3b8 */
66
+
67
+ /* Group headers */
68
+ --ec-group-icon-bg: 219 234 254; /* #dbeafe blue-100 */
69
+ --ec-group-icon-text: 30 64 175; /* #1e40af blue-800 */
70
+
71
+ /* Main content/docs area */
72
+ --ec-page-bg: 255 255 255; /* #ffffff */
73
+ --ec-page-text: 15 23 42; /* #0f172a */
74
+ --ec-page-text-muted: 71 85 105; /* #475569 slate-600 */
75
+ --ec-page-border: 226 232 240; /* #e2e8f0 slate-200 */
76
+
77
+ /* Card/elevated surfaces */
78
+ --ec-card-bg: 255 255 255; /* #ffffff */
79
+
80
+ /* Code blocks */
81
+ --ec-code-bg: 250 250 250; /* #fafafa */
82
+
83
+ /* Badge colors - sapphire theme */
84
+ --ec-badge-domain-bg: 254 249 195; /* yellow-100 */
85
+ --ec-badge-domain-text: 161 98 7; /* yellow-700 */
86
+ --ec-badge-service-bg: 252 231 243; /* pink-100 */
87
+ --ec-badge-service-text: 190 24 93; /* pink-700 */
88
+ --ec-badge-event-bg: 254 243 199; /* amber-100 */
89
+ --ec-badge-event-text: 180 83 9; /* amber-700 */
90
+ --ec-badge-command-bg: 219 234 254; /* blue-100 */
91
+ --ec-badge-command-text: 30 64 175; /* blue-800 */
92
+ --ec-badge-query-bg: 207 250 254; /* cyan-100 */
93
+ --ec-badge-query-text: 21 94 117; /* cyan-800 */
94
+ --ec-badge-message-bg: 224 231 255; /* indigo-100 */
95
+ --ec-badge-message-text: 67 56 202; /* indigo-700 */
96
+ --ec-badge-design-bg: 219 234 254; /* blue-100 */
97
+ --ec-badge-design-text: 37 99 235; /* blue-600 */
98
+ --ec-badge-channel-bg: 224 231 255; /* indigo-100 */
99
+ --ec-badge-channel-text: 67 56 202; /* indigo-700 */
100
+ --ec-badge-default-bg: 239 246 255; /* blue-50 */
101
+ --ec-badge-default-text: 71 85 105; /* slate-600 */
102
+ }
103
+
104
+ /* Sapphire Dark Mode */
105
+ :root[data-catalog-theme="sapphire"][data-theme="dark"] {
106
+ /* Header - slightly elevated for visual hierarchy */
107
+ --ec-header-bg: 15 23 42; /* #0f172a slate-900 */
108
+ --ec-header-text: 226 232 240; /* #e2e8f0 */
109
+ --ec-header-border: 30 41 59; /* #1e293b slate-800 */
110
+
111
+ /* Accent colors - sapphire blue for dark */
112
+ --ec-accent: 96 165 250; /* #60a5fa (blue-400) */
113
+ --ec-accent-hover: 59 130 246; /* #3b82f6 (blue-500) */
114
+ --ec-accent-subtle: 30 64 175 / 0.3; /* blue-800/30 */
115
+ --ec-accent-text: 147 197 253; /* #93c5fd (blue-300) */
116
+ --ec-accent-gradient-from: 96 165 250; /* #60a5fa (blue-400) */
117
+ --ec-accent-gradient-to: 59 130 246; /* #3b82f6 (blue-500) */
118
+
119
+ /* Buttons */
120
+ --ec-button-bg: 59 130 246; /* #3b82f6 blue-500 */
121
+ --ec-button-bg-hover: 96 165 250; /* #60a5fa blue-400 */
122
+ --ec-button-text: 255 255 255; /* #ffffff */
123
+
124
+ /* Dropdowns & menus */
125
+ --ec-dropdown-bg: 15 23 42; /* #0f172a */
126
+ --ec-dropdown-text: 203 213 225; /* #cbd5e1 */
127
+ --ec-dropdown-hover: 30 41 59; /* #1e293b */
128
+ --ec-dropdown-border: 51 65 85; /* #334155 */
129
+
130
+ /* Icons */
131
+ --ec-icon-color: 148 163 184; /* #94a3b8 */
132
+ --ec-icon-hover: 147 197 253; /* #93c5fd blue-300 */
133
+
134
+ /* Sidebar / Vertical Nav */
135
+ --ec-sidebar-bg: 2 6 23; /* #020617 slate-950 */
136
+ --ec-sidebar-bg-gradient: 2 6 23; /* #020617 */
137
+ --ec-sidebar-border: 30 41 59; /* #1e293b */
138
+ --ec-sidebar-text: 148 163 184; /* #94a3b8 */
139
+ --ec-sidebar-active-bg: 59 130 246; /* #3b82f6 blue-500 */
140
+ --ec-sidebar-active-text: 255 255 255; /* #ffffff */
141
+ --ec-sidebar-hover-bg: 30 41 59; /* #1e293b */
142
+
143
+ /* Nested sidebar content */
144
+ --ec-content-bg: 2 6 23; /* #020617 */
145
+ --ec-content-text: 226 232 240; /* #e2e8f0 */
146
+ --ec-content-text-muted: 148 163 184; /* #94a3b8 */
147
+ --ec-content-text-secondary: 148 163 184; /* #94a3b8 */
148
+ --ec-content-border: 30 41 59; /* #1e293b */
149
+ --ec-content-hover: 15 23 42; /* #0f172a */
150
+ --ec-content-active: 30 41 59; /* #1e293b */
151
+
152
+ /* Input fields */
153
+ --ec-input-bg: 15 23 42; /* #0f172a */
154
+ --ec-input-border: 51 65 85; /* #334155 */
155
+ --ec-input-text: 226 232 240; /* #e2e8f0 */
156
+ --ec-input-placeholder: 100 116 139; /* #64748b */
157
+
158
+ /* Group headers */
159
+ --ec-group-icon-bg: 30 41 59; /* #1e293b */
160
+ --ec-group-icon-text: 147 197 253; /* #93c5fd blue-300 */
161
+
162
+ /* Main content/docs area */
163
+ --ec-page-bg: 2 6 23; /* #020617 */
164
+ --ec-page-text: 226 232 240; /* #e2e8f0 */
165
+ --ec-page-text-muted: 148 163 184; /* #94a3b8 */
166
+ --ec-page-border: 30 41 59; /* #1e293b */
167
+
168
+ /* Card/elevated surfaces */
169
+ --ec-card-bg: 2 6 23; /* #020617 */
170
+
171
+ /* Code blocks */
172
+ --ec-code-bg: 15 23 42; /* #0f172a */
173
+
174
+ /* Badge colors - sapphire dark */
175
+ --ec-badge-domain-bg: 113 63 18 / 0.3; /* yellow-900/30 */
176
+ --ec-badge-domain-text: 253 224 71; /* yellow-300 */
177
+ --ec-badge-service-bg: 131 24 67 / 0.3; /* pink-900/30 */
178
+ --ec-badge-service-text: 249 168 212; /* pink-300 */
179
+ --ec-badge-event-bg: 120 53 15 / 0.3; /* amber-900/30 */
180
+ --ec-badge-event-text: 252 211 77; /* amber-300 */
181
+ --ec-badge-command-bg: 30 64 175 / 0.3; /* blue-800/30 */
182
+ --ec-badge-command-text: 147 197 253; /* blue-300 */
183
+ --ec-badge-query-bg: 21 94 117 / 0.3; /* cyan-800/30 */
184
+ --ec-badge-query-text: 103 232 249; /* cyan-300 */
185
+ --ec-badge-message-bg: 49 46 129 / 0.3; /* indigo-900/30 */
186
+ --ec-badge-message-text: 165 180 252; /* indigo-300 */
187
+ --ec-badge-design-bg: 30 64 175 / 0.3; /* blue-800/30 */
188
+ --ec-badge-design-text: 147 197 253; /* blue-300 */
189
+ --ec-badge-channel-bg: 49 46 129 / 0.3; /* indigo-900/30 */
190
+ --ec-badge-channel-text: 165 180 252; /* indigo-300 */
191
+ --ec-badge-default-bg: 51 65 85 / 0.3; /* slate-700/30 */
192
+ --ec-badge-default-text: 203 213 225; /* slate-300 */
193
+ }
194
+
195
+ /* Sapphire theme prose overrides */
196
+ :root[data-catalog-theme="sapphire"][data-theme="dark"] .prose {
197
+ --tw-prose-body: rgb(148 163 184); /* slate-400 */
198
+ --tw-prose-headings: rgb(226 232 240); /* slate-200 */
199
+ --tw-prose-lead: rgb(100 116 139); /* slate-500 */
200
+ --tw-prose-links: rgb(96 165 250); /* blue-400 */
201
+ --tw-prose-bold: rgb(226 232 240); /* slate-200 */
202
+ --tw-prose-counters: rgb(100 116 139); /* slate-500 */
203
+ --tw-prose-bullets: rgb(71 85 105); /* slate-600 */
204
+ --tw-prose-hr: rgb(30 41 59); /* slate-800 */
205
+ --tw-prose-quotes: rgb(226 232 240); /* slate-200 */
206
+ --tw-prose-quote-borders: rgb(51 65 85); /* slate-700 */
207
+ --tw-prose-captions: rgb(100 116 139); /* slate-500 */
208
+ --tw-prose-code: rgb(226 232 240); /* slate-200 */
209
+ --tw-prose-pre-code: rgb(148 163 184); /* slate-400 */
210
+ --tw-prose-pre-bg: rgb(15 23 42); /* slate-900 */
211
+ --tw-prose-th-borders: rgb(51 65 85); /* slate-700 */
212
+ --tw-prose-td-borders: rgb(30 41 59); /* slate-800 */
213
+ }
214
+
215
+ :root[data-catalog-theme="sapphire"][data-theme="dark"] .prose code {
216
+ background-color: rgb(30 41 59); /* slate-800 */
217
+ }
218
+
219
+ :root[data-catalog-theme="sapphire"][data-theme="dark"] .prose pre {
220
+ background-color: rgb(15 23 42); /* slate-900 */
221
+ border: 1px solid rgb(30 41 59); /* slate-800 */
222
+ }
223
+
224
+ :root[data-catalog-theme="sapphire"][data-theme="dark"] .prose a {
225
+ color: rgb(96 165 250); /* blue-400 */
226
+ }
227
+
228
+ :root[data-catalog-theme="sapphire"][data-theme="dark"] .prose a:hover {
229
+ color: rgb(147 197 253); /* blue-300 */
230
+ }
@@ -0,0 +1,230 @@
1
+ /**
2
+ * Sunset Theme for EventCatalog
3
+ *
4
+ * A warm, inviting theme inspired by golden sunsets.
5
+ * Rich oranges and ambers with a cozy, energetic feel.
6
+ */
7
+
8
+ /* Sunset Light Mode */
9
+ :root[data-catalog-theme="sunset"],
10
+ :root[data-catalog-theme="sunset"][data-theme="light"] {
11
+ /* Header - clean white */
12
+ --ec-header-bg: 255 255 255; /* #ffffff */
13
+ --ec-header-text: 23 23 23; /* #171717 neutral-900 */
14
+ --ec-header-border: 229 229 229; /* #e5e5e5 neutral-200 */
15
+
16
+ /* Primary brand color - sunset orange */
17
+ --ec-primary: 249 115 22; /* #f97316 orange-500 */
18
+ --ec-primary-hover: 234 88 12; /* #ea580c orange-600 */
19
+
20
+ /* Accent colors - sunset orange */
21
+ --ec-accent: 249 115 22; /* #f97316 (orange-500) */
22
+ --ec-accent-hover: 234 88 12; /* #ea580c (orange-600) */
23
+ --ec-accent-subtle: 255 237 213; /* #ffedd5 (orange-100) */
24
+ --ec-accent-text: 154 52 18; /* #9a3412 (orange-800) */
25
+ --ec-accent-gradient-from: 249 115 22; /* #f97316 (orange-500) */
26
+ --ec-accent-gradient-to: 234 88 12; /* #ea580c (orange-600) */
27
+
28
+ /* Buttons */
29
+ --ec-button-bg: 234 88 12; /* #ea580c orange-600 */
30
+ --ec-button-bg-hover: 194 65 12; /* #c2410c orange-700 */
31
+ --ec-button-text: 255 255 255; /* #ffffff */
32
+
33
+ /* Dropdowns & menus */
34
+ --ec-dropdown-bg: 255 255 255; /* #ffffff */
35
+ --ec-dropdown-text: 64 64 64; /* #404040 neutral-700 */
36
+ --ec-dropdown-hover: 255 247 237; /* #fff7ed orange-50 */
37
+ --ec-dropdown-border: 229 229 229; /* #e5e5e5 neutral-200 */
38
+
39
+ /* Icons */
40
+ --ec-icon-color: 82 82 82; /* #525252 neutral-600 */
41
+ --ec-icon-hover: 234 88 12; /* #ea580c orange-600 */
42
+
43
+ /* Sidebar / Vertical Nav */
44
+ --ec-sidebar-bg: 255 255 255; /* #ffffff */
45
+ --ec-sidebar-bg-gradient: 255 247 237; /* #fff7ed orange-50 */
46
+ --ec-sidebar-border: 229 229 229; /* #e5e5e5 neutral-200 */
47
+ --ec-sidebar-text: 82 82 82; /* #525252 neutral-600 */
48
+ --ec-sidebar-active-bg: 234 88 12; /* #ea580c orange-600 */
49
+ --ec-sidebar-active-text: 255 255 255; /* #ffffff */
50
+ --ec-sidebar-hover-bg: 234 88 12; /* #ea580c orange-600 */
51
+
52
+ /* Nested sidebar content */
53
+ --ec-content-bg: 255 255 255; /* #ffffff */
54
+ --ec-content-text: 23 23 23; /* #171717 neutral-900 */
55
+ --ec-content-text-muted: 82 82 82; /* #525252 neutral-600 */
56
+ --ec-content-text-secondary: 115 115 115; /* #737373 neutral-500 */
57
+ --ec-content-border: 229 229 229; /* #e5e5e5 neutral-200 */
58
+ --ec-content-hover: 250 250 250; /* #fafafa neutral-50 */
59
+ --ec-content-active: 255 237 213; /* #ffedd5 orange-100 */
60
+
61
+ /* Input fields */
62
+ --ec-input-bg: 255 255 255; /* #ffffff */
63
+ --ec-input-border: 212 212 212; /* #d4d4d4 neutral-300 */
64
+ --ec-input-text: 23 23 23; /* #171717 neutral-900 */
65
+ --ec-input-placeholder: 163 163 163; /* #a3a3a3 neutral-400 */
66
+
67
+ /* Group headers */
68
+ --ec-group-icon-bg: 255 237 213; /* #ffedd5 orange-100 */
69
+ --ec-group-icon-text: 154 52 18; /* #9a3412 orange-800 */
70
+
71
+ /* Main content/docs area */
72
+ --ec-page-bg: 255 255 255; /* #ffffff */
73
+ --ec-page-text: 23 23 23; /* #171717 neutral-900 */
74
+ --ec-page-text-muted: 82 82 82; /* #525252 neutral-600 */
75
+ --ec-page-border: 229 229 229; /* #e5e5e5 neutral-200 */
76
+
77
+ /* Card/elevated surfaces */
78
+ --ec-card-bg: 255 255 255; /* #ffffff */
79
+
80
+ /* Code blocks */
81
+ --ec-code-bg: 250 250 250; /* #fafafa */
82
+
83
+ /* Badge colors - sunset theme */
84
+ --ec-badge-domain-bg: 254 249 195; /* yellow-100 */
85
+ --ec-badge-domain-text: 161 98 7; /* yellow-700 */
86
+ --ec-badge-service-bg: 252 231 243; /* pink-100 */
87
+ --ec-badge-service-text: 190 24 93; /* pink-700 */
88
+ --ec-badge-event-bg: 255 237 213; /* orange-100 */
89
+ --ec-badge-event-text: 154 52 18; /* orange-800 */
90
+ --ec-badge-command-bg: 219 234 254; /* blue-100 */
91
+ --ec-badge-command-text: 30 64 175; /* blue-800 */
92
+ --ec-badge-query-bg: 207 250 254; /* cyan-100 */
93
+ --ec-badge-query-text: 21 94 117; /* cyan-800 */
94
+ --ec-badge-message-bg: 224 231 255; /* indigo-100 */
95
+ --ec-badge-message-text: 67 56 202; /* indigo-700 */
96
+ --ec-badge-design-bg: 255 237 213; /* orange-100 */
97
+ --ec-badge-design-text: 234 88 12; /* orange-600 */
98
+ --ec-badge-channel-bg: 224 231 255; /* indigo-100 */
99
+ --ec-badge-channel-text: 67 56 202; /* indigo-700 */
100
+ --ec-badge-default-bg: 255 247 237; /* orange-50 */
101
+ --ec-badge-default-text: 82 82 82; /* neutral-600 */
102
+ }
103
+
104
+ /* Sunset Dark Mode */
105
+ :root[data-catalog-theme="sunset"][data-theme="dark"] {
106
+ /* Header - warm dark */
107
+ --ec-header-bg: 23 23 23; /* #171717 neutral-900 */
108
+ --ec-header-text: 245 245 245; /* #f5f5f5 neutral-100 */
109
+ --ec-header-border: 38 38 38; /* #262626 neutral-800 */
110
+
111
+ /* Accent colors - sunset orange for dark */
112
+ --ec-accent: 251 146 60; /* #fb923c (orange-400) */
113
+ --ec-accent-hover: 249 115 22; /* #f97316 (orange-500) */
114
+ --ec-accent-subtle: 154 52 18 / 0.3; /* orange-800/30 */
115
+ --ec-accent-text: 253 186 116; /* #fdba74 (orange-300) */
116
+ --ec-accent-gradient-from: 251 146 60; /* #fb923c (orange-400) */
117
+ --ec-accent-gradient-to: 249 115 22; /* #f97316 (orange-500) */
118
+
119
+ /* Buttons */
120
+ --ec-button-bg: 249 115 22; /* #f97316 orange-500 */
121
+ --ec-button-bg-hover: 251 146 60; /* #fb923c orange-400 */
122
+ --ec-button-text: 255 255 255; /* #ffffff */
123
+
124
+ /* Dropdowns & menus */
125
+ --ec-dropdown-bg: 23 23 23; /* #171717 */
126
+ --ec-dropdown-text: 212 212 212; /* #d4d4d4 */
127
+ --ec-dropdown-hover: 38 38 38; /* #262626 */
128
+ --ec-dropdown-border: 64 64 64; /* #404040 */
129
+
130
+ /* Icons */
131
+ --ec-icon-color: 163 163 163; /* #a3a3a3 */
132
+ --ec-icon-hover: 253 186 116; /* #fdba74 orange-300 */
133
+
134
+ /* Sidebar / Vertical Nav */
135
+ --ec-sidebar-bg: 10 10 10; /* #0a0a0a neutral-950 */
136
+ --ec-sidebar-bg-gradient: 10 10 10; /* #0a0a0a */
137
+ --ec-sidebar-border: 38 38 38; /* #262626 */
138
+ --ec-sidebar-text: 163 163 163; /* #a3a3a3 */
139
+ --ec-sidebar-active-bg: 249 115 22; /* #f97316 orange-500 */
140
+ --ec-sidebar-active-text: 255 255 255; /* #ffffff */
141
+ --ec-sidebar-hover-bg: 38 38 38; /* #262626 */
142
+
143
+ /* Nested sidebar content */
144
+ --ec-content-bg: 10 10 10; /* #0a0a0a */
145
+ --ec-content-text: 245 245 245; /* #f5f5f5 */
146
+ --ec-content-text-muted: 163 163 163; /* #a3a3a3 */
147
+ --ec-content-text-secondary: 163 163 163; /* #a3a3a3 */
148
+ --ec-content-border: 38 38 38; /* #262626 */
149
+ --ec-content-hover: 23 23 23; /* #171717 */
150
+ --ec-content-active: 38 38 38; /* #262626 */
151
+
152
+ /* Input fields */
153
+ --ec-input-bg: 23 23 23; /* #171717 */
154
+ --ec-input-border: 64 64 64; /* #404040 */
155
+ --ec-input-text: 245 245 245; /* #f5f5f5 */
156
+ --ec-input-placeholder: 115 115 115; /* #737373 */
157
+
158
+ /* Group headers */
159
+ --ec-group-icon-bg: 38 38 38; /* #262626 */
160
+ --ec-group-icon-text: 253 186 116; /* #fdba74 orange-300 */
161
+
162
+ /* Main content/docs area */
163
+ --ec-page-bg: 10 10 10; /* #0a0a0a */
164
+ --ec-page-text: 245 245 245; /* #f5f5f5 */
165
+ --ec-page-text-muted: 163 163 163; /* #a3a3a3 */
166
+ --ec-page-border: 38 38 38; /* #262626 */
167
+
168
+ /* Card/elevated surfaces */
169
+ --ec-card-bg: 10 10 10; /* #0a0a0a */
170
+
171
+ /* Code blocks */
172
+ --ec-code-bg: 23 23 23; /* #171717 */
173
+
174
+ /* Badge colors - sunset dark */
175
+ --ec-badge-domain-bg: 113 63 18 / 0.3; /* yellow-900/30 */
176
+ --ec-badge-domain-text: 253 224 71; /* yellow-300 */
177
+ --ec-badge-service-bg: 131 24 67 / 0.3; /* pink-900/30 */
178
+ --ec-badge-service-text: 249 168 212; /* pink-300 */
179
+ --ec-badge-event-bg: 124 45 18 / 0.3; /* orange-900/30 */
180
+ --ec-badge-event-text: 253 186 116; /* orange-300 */
181
+ --ec-badge-command-bg: 30 64 175 / 0.3; /* blue-800/30 */
182
+ --ec-badge-command-text: 147 197 253; /* blue-300 */
183
+ --ec-badge-query-bg: 21 94 117 / 0.3; /* cyan-800/30 */
184
+ --ec-badge-query-text: 103 232 249; /* cyan-300 */
185
+ --ec-badge-message-bg: 49 46 129 / 0.3; /* indigo-900/30 */
186
+ --ec-badge-message-text: 165 180 252; /* indigo-300 */
187
+ --ec-badge-design-bg: 124 45 18 / 0.3; /* orange-900/30 */
188
+ --ec-badge-design-text: 253 186 116; /* orange-300 */
189
+ --ec-badge-channel-bg: 49 46 129 / 0.3; /* indigo-900/30 */
190
+ --ec-badge-channel-text: 165 180 252; /* indigo-300 */
191
+ --ec-badge-default-bg: 64 64 64 / 0.3; /* neutral-700/30 */
192
+ --ec-badge-default-text: 212 212 212; /* neutral-300 */
193
+ }
194
+
195
+ /* Sunset theme prose overrides */
196
+ :root[data-catalog-theme="sunset"][data-theme="dark"] .prose {
197
+ --tw-prose-body: rgb(163 163 163); /* neutral-400 */
198
+ --tw-prose-headings: rgb(245 245 245); /* neutral-100 */
199
+ --tw-prose-lead: rgb(115 115 115); /* neutral-500 */
200
+ --tw-prose-links: rgb(251 146 60); /* orange-400 */
201
+ --tw-prose-bold: rgb(245 245 245); /* neutral-100 */
202
+ --tw-prose-counters: rgb(115 115 115); /* neutral-500 */
203
+ --tw-prose-bullets: rgb(82 82 82); /* neutral-600 */
204
+ --tw-prose-hr: rgb(38 38 38); /* neutral-800 */
205
+ --tw-prose-quotes: rgb(245 245 245); /* neutral-100 */
206
+ --tw-prose-quote-borders: rgb(64 64 64); /* neutral-700 */
207
+ --tw-prose-captions: rgb(115 115 115); /* neutral-500 */
208
+ --tw-prose-code: rgb(245 245 245); /* neutral-100 */
209
+ --tw-prose-pre-code: rgb(163 163 163); /* neutral-400 */
210
+ --tw-prose-pre-bg: rgb(23 23 23); /* neutral-900 */
211
+ --tw-prose-th-borders: rgb(64 64 64); /* neutral-700 */
212
+ --tw-prose-td-borders: rgb(38 38 38); /* neutral-800 */
213
+ }
214
+
215
+ :root[data-catalog-theme="sunset"][data-theme="dark"] .prose code {
216
+ background-color: rgb(38 38 38); /* neutral-800 */
217
+ }
218
+
219
+ :root[data-catalog-theme="sunset"][data-theme="dark"] .prose pre {
220
+ background-color: rgb(23 23 23); /* neutral-900 */
221
+ border: 1px solid rgb(38 38 38); /* neutral-800 */
222
+ }
223
+
224
+ :root[data-catalog-theme="sunset"][data-theme="dark"] .prose a {
225
+ color: rgb(251 146 60); /* orange-400 */
226
+ }
227
+
228
+ :root[data-catalog-theme="sunset"][data-theme="dark"] .prose a:hover {
229
+ color: rgb(253 186 116); /* orange-300 */
230
+ }
@@ -122,8 +122,6 @@ export const getChannels = async ({ getAllVersions = true }: Props = {}): Promis
122
122
  },
123
123
  catalog: {
124
124
  path: path.join(channel.collection, channel.id.replace('/index.mdx', '')),
125
- absoluteFilePath: path.join(PROJECT_DIR, channel.collection, channel.id.replace('/index.mdx', '/index.md')),
126
- astroContentFilePath: path.join(process.cwd(), 'src', 'content', channel.collection, channel.id),
127
125
  filePath: path.join(process.cwd(), 'src', 'catalog-files', channel.collection, channel.id.replace('/index.mdx', '')),
128
126
  publicPath: path.join('/generated', channel.collection, channelFolderName),
129
127
  type: 'event',
@@ -112,8 +112,6 @@ export const getCommands = async ({ getAllVersions = true, hydrateServices = tru
112
112
  },
113
113
  catalog: {
114
114
  path: path.join(command.collection, command.id.replace('/index.mdx', '')),
115
- absoluteFilePath: path.join(PROJECT_DIR, command.collection, command.id.replace('/index.mdx', '/index.md')),
116
- astroContentFilePath: path.join(process.cwd(), 'src', 'content', command.collection, command.id),
117
115
  filePath: path.join(process.cwd(), 'src', 'catalog-files', command.collection, command.id.replace('/index.mdx', '')),
118
116
  publicPath: path.join('/generated', command.collection, commandFolderName),
119
117
  type: 'command',
@@ -94,8 +94,6 @@ export const getContainers = async ({ getAllVersions = true }: Props = {}): Prom
94
94
  },
95
95
  catalog: {
96
96
  path: path.join(container.collection, container.id.replace('/index.mdx', '')),
97
- absoluteFilePath: path.join(PROJECT_DIR, container.collection, container.id.replace('/index.mdx', '/index.md')),
98
- astroContentFilePath: path.join(process.cwd(), 'src', 'content', container.collection, container.id),
99
97
  filePath: path.join(
100
98
  process.cwd(),
101
99
  'src',
@@ -213,8 +213,6 @@ export const getDomains = async ({
213
213
  },
214
214
  catalog: {
215
215
  path: path.join(domain.collection, domain.id.replace('/index.mdx', '')),
216
- absoluteFilePath: path.join(PROJECT_DIR, domain.collection, domain.id.replace('/index.mdx', '/index.md')),
217
- astroContentFilePath: path.join(process.cwd(), 'src', 'content', domain.collection, domain.id),
218
216
  filePath: path.join(process.cwd(), 'src', 'catalog-files', domain.collection, domain.id.replace('/index.mdx', '')),
219
217
  publicPath: path.join('/generated', domain.collection, domainFolderName),
220
218
  type: 'service',
@@ -94,8 +94,6 @@ export const getEntities = async ({ getAllVersions = true }: Props = {}): Promis
94
94
  },
95
95
  catalog: {
96
96
  path: path.join(entity.collection, entity.id.replace('/index.mdx', '')),
97
- absoluteFilePath: path.join(PROJECT_DIR, entity.collection, entity.id.replace('/index.mdx', '/index.md')),
98
- astroContentFilePath: path.join(process.cwd(), 'src', 'content', entity.collection, entity.id),
99
97
  filePath: path.join(process.cwd(), 'src', 'catalog-files', entity.collection, entity.id.replace('/index.mdx', '')),
100
98
  publicPath: path.join('/generated', entity.collection, entityFolderName),
101
99
  type: 'entity',
@@ -114,8 +114,6 @@ export const getEvents = async ({ getAllVersions = true, hydrateServices = true
114
114
  },
115
115
  catalog: {
116
116
  path: path.join(event.collection, event.id.replace('/index.mdx', '')),
117
- absoluteFilePath: path.join(PROJECT_DIR, event.collection, event.id.replace('/index.mdx', '/index.md')),
118
- astroContentFilePath: path.join(process.cwd(), 'src', 'content', event.collection, event.id),
119
117
  filePath: path.join(process.cwd(), 'src', 'catalog-files', event.collection, event.id.replace('/index.mdx', '')),
120
118
  publicPath: path.join('/generated', event.collection, eventFolderName),
121
119
  type: 'event',
@@ -76,8 +76,6 @@ export const getFlows = async ({ getAllVersions = true }: Props = {}): Promise<F
76
76
  },
77
77
  catalog: {
78
78
  path: path.join(flow.collection, flow.id.replace('/index.mdx', '')),
79
- absoluteFilePath: path.join(PROJECT_DIR, flow.collection, flow.id.replace('/index.mdx', '/index.md')),
80
- astroContentFilePath: path.join(process.cwd(), 'src', 'content', flow.collection, flow.id),
81
79
  filePath: path.join(process.cwd(), 'src', 'catalog-files', flow.collection, flow.id.replace('/index.mdx', '')),
82
80
  publicPath: path.join('/generated', flow.collection),
83
81
  type: 'flow',
@@ -107,8 +107,6 @@ export const getQueries = async ({ getAllVersions = true, hydrateServices = true
107
107
  },
108
108
  catalog: {
109
109
  path: path.join(query.collection, query.id.replace('/index.mdx', '')),
110
- absoluteFilePath: path.join(PROJECT_DIR, query.collection, query.id.replace('/index.mdx', '/index.md')),
111
- astroContentFilePath: path.join(process.cwd(), 'src', 'content', query.collection, query.id),
112
110
  filePath: path.join(process.cwd(), 'src', 'catalog-files', query.collection, query.id.replace('/index.mdx', '')),
113
111
  publicPath: path.join('/generated', query.collection, queryFolderName),
114
112
  type: 'event', // Kept as 'event' to match original file, though likely should be 'query'
@@ -2,6 +2,7 @@ import type { CollectionEntry } from 'astro:content';
2
2
  import type { PageTypes } from '@types';
3
3
  import path from 'path';
4
4
  import { buildUrl } from '@utils/url-builder';
5
+ import { getAbsoluteFilePathForAstroFile } from '@utils/files';
5
6
 
6
7
  export type Schema = {
7
8
  url: string;
@@ -13,12 +14,23 @@ export const getSchemaURL = (resource: CollectionEntry<PageTypes>) => {
13
14
  const publicPath = resource?.catalog?.publicPath;
14
15
  const schemaFilePath = resource?.data?.schemaPath;
15
16
 
16
- if (!publicPath || !schemaFilePath) {
17
+ // No schema file path, return an empty string
18
+ if (!schemaFilePath) {
19
+ return;
20
+ }
21
+
22
+ if (!publicPath) {
23
+ // Then we try and get the absolute file path from the resource
24
+ const absoluteFilePath = getAbsoluteFilePathForAstroFile(resource.filePath ?? '', schemaFilePath ?? '');
25
+ if (absoluteFilePath) {
26
+ return absoluteFilePath;
27
+ }
28
+ // Can't find the schema file, return an empty string
17
29
  return;
18
30
  }
19
31
 
20
32
  // new URL
21
- return path.join(publicPath, schemaFilePath);
33
+ return path.join(publicPath, schemaFilePath ?? '');
22
34
  };
23
35
 
24
36
  export const getSchemaFormatFromURL = (url: string) => {
@@ -42,18 +54,44 @@ export const getSchemasFromResource = (resource: CollectionEntry<PageTypes>): Sc
42
54
  const openapiPath = Array.isArray(specifications)
43
55
  ? specifications.find((spec) => spec.type === 'openapi')?.path
44
56
  : specifications?.openapiPath;
57
+ const graphqlPath = Array.isArray(specifications)
58
+ ? specifications.find((spec) => spec.type === 'graphql')?.path
59
+ : specifications?.graphqlPath;
45
60
  // @ts-ignore
46
- const publicPath = resource?.catalog?.publicPath;
61
+ let publicPath = resource?.catalog?.publicPath;
47
62
  const schemas = [];
48
63
 
49
64
  if (asyncapiPath) {
50
- const asyncapiUrl = path.join(publicPath, asyncapiPath);
51
- schemas.push({ url: buildUrl(asyncapiUrl), format: 'asyncapi' });
65
+ if (!publicPath) {
66
+ // We try and get the absoulate file path from the resource
67
+ const absoluteFilePath = getAbsoluteFilePathForAstroFile(resource.filePath ?? '', asyncapiPath ?? '');
68
+ schemas.push({ url: buildUrl(absoluteFilePath), format: 'asyncapi' });
69
+ } else {
70
+ // The resource has the public path, so we can use it to build the URL
71
+ schemas.push({ url: buildUrl(path.join(publicPath, asyncapiPath)), format: 'asyncapi' });
72
+ }
52
73
  }
53
74
 
54
75
  if (openapiPath) {
55
- const openapiUrl = path.join(publicPath, openapiPath);
56
- schemas.push({ url: buildUrl(openapiUrl), format: 'openapi' });
76
+ if (!publicPath) {
77
+ // We try and get the absoulate file path from the resource
78
+ const absoluteFilePath = getAbsoluteFilePathForAstroFile(resource.filePath ?? '', openapiPath ?? '');
79
+ schemas.push({ url: buildUrl(absoluteFilePath), format: 'openapi' });
80
+ } else {
81
+ // The resource has the public path, so we can use it to build the URL
82
+ schemas.push({ url: buildUrl(path.join(publicPath, openapiPath)), format: 'openapi' });
83
+ }
84
+ }
85
+
86
+ if (graphqlPath) {
87
+ if (!publicPath) {
88
+ // We try and get the absoulate file path from the resource
89
+ const absoluteFilePath = getAbsoluteFilePathForAstroFile(resource.filePath ?? '', graphqlPath ?? '');
90
+ schemas.push({ url: buildUrl(absoluteFilePath), format: 'graphql' });
91
+ } else {
92
+ // The resource has the public path, so we can use it to build the URL
93
+ schemas.push({ url: buildUrl(path.join(publicPath, graphqlPath)), format: 'graphql' });
94
+ }
57
95
  }
58
96
 
59
97
  return schemas;
@@ -118,8 +118,6 @@ export const getServices = async ({ getAllVersions = true, returnBody = false }:
118
118
  catalog: {
119
119
  // TODO: avoid use string replace at path due to win32
120
120
  path: path.join(service.collection, service.id.replace('/index.mdx', '')),
121
- absoluteFilePath: path.join(PROJECT_DIR, service.collection, service.id.replace('/index.mdx', '/index.md')),
122
- astroContentFilePath: path.join(process.cwd(), 'src', 'content', service.collection, service.id),
123
121
  filePath: path.join(process.cwd(), 'src', 'catalog-files', service.collection, service.id.replace('/index.mdx', '')),
124
122
  // service will be MySerive-0.0.1 remove the version
125
123
  publicPath: path.join('/generated', service.collection, serviceFolderName),