@eventcatalog/core 4.12.2 → 5.0.0-beta.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 (268) hide show
  1. package/LICENSE +226 -95
  2. package/NOTICE +30 -0
  3. package/README.md +3 -2
  4. package/dist/analytics/analytics.cjs +1 -1
  5. package/dist/analytics/analytics.js +2 -2
  6. package/dist/analytics/log-build.cjs +43 -16
  7. package/dist/analytics/log-build.d.cts +6 -5
  8. package/dist/analytics/log-build.d.ts +6 -5
  9. package/dist/analytics/log-build.js +4 -3
  10. package/dist/{chunk-U4YJSTGV.js → chunk-AYNZXUB5.js} +2 -10
  11. package/dist/{chunk-IVVM67LN.js → chunk-CR6AK5LR.js} +1 -1
  12. package/dist/{chunk-GTIC4R74.js → chunk-LR7AGRHN.js} +13 -16
  13. package/dist/chunk-TQLRG35T.js +203 -0
  14. package/dist/{chunk-WK4J6FP3.js → chunk-TWN43V4T.js} +1 -1
  15. package/dist/{chunk-ZW3MYAWF.js → chunk-WAIADKQE.js} +1 -1
  16. package/dist/{chunk-RPVA2SZY.js → chunk-ZHKEARLJ.js} +1 -1
  17. package/dist/constants.cjs +1 -1
  18. package/dist/constants.js +1 -1
  19. package/dist/eventcatalog.cjs +407 -291
  20. package/dist/eventcatalog.config.d.cts +2 -3
  21. package/dist/eventcatalog.config.d.ts +2 -3
  22. package/dist/eventcatalog.js +30 -93
  23. package/dist/federation/content-cache.d.cts +0 -5
  24. package/dist/federation/content-cache.d.ts +0 -5
  25. package/dist/federation/diagnostics.d.cts +0 -5
  26. package/dist/federation/diagnostics.d.ts +0 -5
  27. package/dist/federation/federate.cjs +0 -9
  28. package/dist/federation/federate.d.cts +0 -5
  29. package/dist/federation/federate.d.ts +0 -5
  30. package/dist/federation/federate.js +2 -3
  31. package/dist/federation/filesystem-source-provider.d.cts +0 -5
  32. package/dist/federation/filesystem-source-provider.d.ts +0 -5
  33. package/dist/federation/github-source-provider.d.cts +0 -5
  34. package/dist/federation/github-source-provider.d.ts +0 -5
  35. package/dist/federation/output-transaction.d.cts +0 -4
  36. package/dist/federation/output-transaction.d.ts +0 -4
  37. package/dist/federation/public-assets.d.cts +0 -5
  38. package/dist/federation/public-assets.d.ts +0 -5
  39. package/dist/federation/source-provider.d.cts +0 -5
  40. package/dist/federation/source-provider.d.ts +0 -5
  41. package/dist/federation/types.d.cts +0 -5
  42. package/dist/federation/types.d.ts +0 -5
  43. package/dist/generate.cjs +1 -1
  44. package/dist/generate.js +3 -3
  45. package/dist/license-C1y-56bb.d.cts +23 -0
  46. package/dist/license-C1y-56bb.d.ts +23 -0
  47. package/dist/runtime-dependencies/@eventcatalog__visualiser__layout.mjs +3 -0
  48. package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps.mjs +3 -0
  49. package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__react.mjs +3 -0
  50. package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__server.mjs +3 -0
  51. package/dist/runtime-dependencies/@modelcontextprotocol__sdk__types.js.mjs +3 -0
  52. package/dist/runtime-dependencies/manifest.json +12 -1
  53. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__graphql.mjs +3 -0
  54. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__json.mjs +3 -0
  55. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__markup.mjs +3 -0
  56. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__protobuf.mjs +3 -0
  57. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__yaml.mjs +3 -0
  58. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-dark.mjs +3 -0
  59. package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-light.mjs +3 -0
  60. package/dist/utils/cli-logger.cjs +1 -1
  61. package/dist/utils/cli-logger.js +2 -2
  62. package/dist/utils/license-status.cjs +240 -0
  63. package/dist/utils/license-status.d.cts +28 -0
  64. package/dist/utils/license-status.d.ts +28 -0
  65. package/dist/utils/license-status.js +12 -0
  66. package/eventcatalog/astro.config.mjs +1 -1
  67. package/eventcatalog/integrations/eventcatalog-runtime.mjs +1 -1
  68. package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +29 -19
  69. package/eventcatalog/src/components/ChatPanel/OfflineReply.tsx +74 -0
  70. package/eventcatalog/src/components/FieldsExplorer/FieldFilters.tsx +24 -28
  71. package/eventcatalog/src/components/FieldsExplorer/FieldNodeGraph.tsx +16 -11
  72. package/eventcatalog/src/components/FieldsExplorer/FieldsExplorer.tsx +4 -218
  73. package/eventcatalog/src/components/FieldsExplorer/FieldsTable.tsx +27 -36
  74. package/eventcatalog/src/components/Header.astro +43 -58
  75. package/eventcatalog/src/components/Lists/PillListFlat.styles.css +17 -17
  76. package/eventcatalog/src/components/MDX/EntityMap/EntityMap.astro +1 -1
  77. package/eventcatalog/src/components/MDX/Flow/Flow.astro +4 -0
  78. package/eventcatalog/src/components/MDX/NodeGraph/AstroNodeGraph.tsx +14 -0
  79. package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +49 -18
  80. package/eventcatalog/src/components/MDX/RemoteFile.astro +2 -24
  81. package/eventcatalog/src/components/SchemaExplorer/ApiAccessSection.tsx +59 -93
  82. package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +1 -32
  83. package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +20 -67
  84. package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +2 -11
  85. package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +11 -60
  86. package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +1 -3
  87. package/eventcatalog/src/components/SchemaExplorer/SchemaPageViewer.tsx +0 -3
  88. package/eventcatalog/src/components/SchemaExplorer/VersionHistoryModal.tsx +2 -9
  89. package/eventcatalog/src/components/SchemaExplorer/parse-schema.ts +46 -0
  90. package/eventcatalog/src/components/SchemaExplorer/utils.ts +11 -0
  91. package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +2 -9
  92. package/eventcatalog/src/components/Settings/LicenseSettings.tsx +288 -0
  93. package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +3 -19
  94. package/eventcatalog/src/components/Settings/McpSettingsForm.tsx +85 -30
  95. package/eventcatalog/src/components/Settings/SettingsShared.tsx +7 -75
  96. package/eventcatalog/src/components/SideNav/CustomDocsNav.astro +2 -2
  97. package/eventcatalog/src/components/TrialBadge.astro +82 -0
  98. package/eventcatalog/src/content.config.ts +9 -90
  99. package/eventcatalog/src/{enterprise → features}/ai/chat-api.ts +22 -34
  100. package/eventcatalog/src/{enterprise → features}/analytics/adapters/ga4.ts +0 -5
  101. package/eventcatalog/src/{enterprise → features}/analytics/adapters/gtm.ts +0 -5
  102. package/eventcatalog/src/{enterprise → features}/analytics/adapters/posthog.ts +0 -5
  103. package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsHead.astro +2 -4
  104. package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsTracker.astro +2 -4
  105. package/eventcatalog/src/{enterprise → features}/analytics/tracker.ts +0 -5
  106. package/eventcatalog/src/{enterprise → features}/api/catalog.ts +0 -5
  107. package/eventcatalog/src/{enterprise → features}/auth/[...auth].ts +0 -5
  108. package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware-auth.ts +0 -5
  109. package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware.ts +0 -5
  110. package/eventcatalog/src/{enterprise → features}/collections/custom-pages.ts +0 -5
  111. package/eventcatalog/src/{enterprise → features}/collections/index.ts +0 -5
  112. package/eventcatalog/src/{enterprise → features}/collections/resource-docs.ts +0 -5
  113. package/eventcatalog/src/{enterprise → features}/custom-documentation/collection.ts +0 -5
  114. package/eventcatalog/src/features/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +9 -0
  115. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/CustomDocsNavWrapper.tsx +0 -5
  116. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +1 -6
  117. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +0 -5
  118. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/index.tsx +1 -6
  119. package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/types.ts +0 -5
  120. package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/index.astro → features/custom-documentation/components/CustomDocumentationPage.astro} +5 -5
  121. package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/badge-styles.ts +0 -5
  122. package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/custom-docs.ts +1 -6
  123. package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/docs-search.ts +0 -5
  124. package/eventcatalog/src/{enterprise → features}/custom-pages/routes.ts +0 -5
  125. package/eventcatalog/src/{enterprise → features}/directory/user-team-directory.ts +0 -5
  126. package/eventcatalog/src/{enterprise → features}/fields/field-extractor.ts +0 -5
  127. package/eventcatalog/src/{enterprise → features}/fields/field-indexer.ts +0 -5
  128. package/eventcatalog/src/{enterprise → features}/fields/fields-db.ts +0 -5
  129. package/eventcatalog/src/{enterprise → features}/fields/pages/api/fields.ts +1 -6
  130. package/eventcatalog/src/{enterprise → features}/fields/pages/fields.astro +1 -2
  131. package/eventcatalog/src/{enterprise → features}/integrations/eventcatalog-features.ts +17 -75
  132. package/eventcatalog/src/features/mcp/apps/architecture-diagram/links.ts +59 -0
  133. package/eventcatalog/src/features/mcp/apps/architecture-diagram/node-chat.tsx +299 -0
  134. package/eventcatalog/src/features/mcp/apps/architecture-diagram/shared.ts +14 -0
  135. package/eventcatalog/src/features/mcp/apps/architecture-diagram/view.tsx +454 -0
  136. package/eventcatalog/src/features/mcp/apps/generated/viewer.html +432 -0
  137. package/eventcatalog/src/features/mcp/apps/mermaid-stub.ts +10 -0
  138. package/eventcatalog/src/features/mcp/apps/schema-viewer/schema-code.tsx +65 -0
  139. package/eventcatalog/src/features/mcp/apps/schema-viewer/shared.ts +23 -0
  140. package/eventcatalog/src/features/mcp/apps/schema-viewer/view.tsx +170 -0
  141. package/eventcatalog/src/features/mcp/apps/shared/app-view.tsx +98 -0
  142. package/eventcatalog/src/features/mcp/apps/shared/resource-types.ts +15 -0
  143. package/eventcatalog/src/features/mcp/apps/viewer/shared.ts +24 -0
  144. package/eventcatalog/src/features/mcp/apps/viewer/styles.css +25 -0
  145. package/eventcatalog/src/features/mcp/apps/viewer/view.tsx +59 -0
  146. package/eventcatalog/src/features/mcp/mcp-app-icons.ts +63 -0
  147. package/eventcatalog/src/features/mcp/mcp-apps.ts +160 -0
  148. package/eventcatalog/src/{enterprise → features}/mcp/mcp-auth.ts +0 -5
  149. package/eventcatalog/src/{enterprise → features}/mcp/mcp-scope.ts +7 -7
  150. package/eventcatalog/src/{enterprise → features}/mcp/mcp-scoped-tools.ts +47 -40
  151. package/eventcatalog/src/{enterprise → features}/mcp/mcp-server.ts +347 -34
  152. package/eventcatalog/src/{enterprise → features}/mcp/oauth-protected-resource.ts +0 -5
  153. package/eventcatalog/src/features/mcp/schema-viewer.ts +24 -0
  154. package/eventcatalog/src/{enterprise → features}/tools/catalog-tools.ts +133 -102
  155. package/eventcatalog/src/features/tools/index.ts +5 -0
  156. package/eventcatalog/src/{enterprise → features}/visualizer-layout/reset.ts +0 -5
  157. package/eventcatalog/src/{enterprise → features}/visualizer-layout/save.ts +0 -5
  158. package/eventcatalog/src/layouts/BaseLayout.astro +2 -2
  159. package/eventcatalog/src/layouts/Footer.astro +31 -39
  160. package/eventcatalog/src/layouts/SettingsLayout.astro +6 -6
  161. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +7 -37
  162. package/eventcatalog/src/{enterprise → pages}/api/schemas/[collection]/[id]/[version]/index.ts +0 -22
  163. package/eventcatalog/src/{enterprise → pages}/api/schemas/services/[id]/[version]/[specification]/index.ts +0 -19
  164. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/_index.data.ts +2 -6
  165. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +1 -5
  166. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/_index.data.ts +2 -6
  167. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +1 -5
  168. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].md.ts +2 -6
  169. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].mdx.ts +2 -6
  170. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +9 -5
  171. package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +12 -0
  172. package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/root-index.astro → pages/docs/custom/index.astro} +1 -23
  173. package/eventcatalog/src/pages/docs/llm/llms-full.txt.ts +4 -9
  174. package/eventcatalog/src/pages/docs/llm/llms.txt.ts +4 -4
  175. package/eventcatalog/src/pages/docs/llm/schemas.txt.ts +0 -11
  176. package/eventcatalog/src/pages/docs/services/[id]/[docType]/[docId]/index.astro +2 -2
  177. package/eventcatalog/src/pages/index.astro +2 -2
  178. package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +0 -3
  179. package/eventcatalog/src/pages/schemas/explorer/index.astro +1 -4
  180. package/eventcatalog/src/pages/settings/assistant.astro +2 -4
  181. package/eventcatalog/src/pages/settings/license.astro +18 -0
  182. package/eventcatalog/src/pages/settings/llm-access.astro +1 -4
  183. package/eventcatalog/src/pages/settings/mcp.astro +33 -4
  184. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/_index.data.ts +1 -2
  185. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/data/index.astro +2 -45
  186. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/entity-map/index.astro +1 -1
  187. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version].mermaid.ts +7 -109
  188. package/eventcatalog/src/pages/visualiser/_mermaid-route.ts +78 -0
  189. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/_index.data.ts +44 -0
  190. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/index.astro +1 -1
  191. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/index.astro +56 -0
  192. package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/systems-context/index.astro +3 -40
  193. package/eventcatalog/src/pages/visualiser/domains/[id]/[version].mermaid.ts +20 -0
  194. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/_index.data.ts +29 -0
  195. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/context/index.astro +3 -38
  196. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/index.astro +56 -0
  197. package/eventcatalog/src/pages/visualiser/systems/[id]/[version].mermaid.ts +20 -0
  198. package/eventcatalog/src/stores/sidebar-store/builders/agent.ts +1 -1
  199. package/eventcatalog/src/stores/sidebar-store/builders/container.ts +1 -1
  200. package/eventcatalog/src/stores/sidebar-store/builders/data-product.ts +1 -1
  201. package/eventcatalog/src/stores/sidebar-store/builders/domain.ts +7 -32
  202. package/eventcatalog/src/stores/sidebar-store/builders/entity.ts +1 -1
  203. package/eventcatalog/src/stores/sidebar-store/builders/message.ts +1 -1
  204. package/eventcatalog/src/stores/sidebar-store/builders/service.ts +2 -8
  205. package/eventcatalog/src/stores/sidebar-store/builders/system.ts +2 -12
  206. package/eventcatalog/src/stores/sidebar-store/custom-sidebar.ts +0 -10
  207. package/eventcatalog/src/stores/sidebar-store/state.ts +4 -6
  208. package/eventcatalog/src/styles/theme.css +22 -18
  209. package/eventcatalog/src/styles/themes/forest.css +8 -8
  210. package/eventcatalog/src/styles/themes/ocean.css +8 -8
  211. package/eventcatalog/src/styles/themes/sapphire.css +8 -8
  212. package/eventcatalog/src/styles/themes/sunset.css +8 -8
  213. package/eventcatalog/src/utils/clipboard.ts +4 -4
  214. package/eventcatalog/src/utils/collections/flow-step-schema.ts +117 -0
  215. package/eventcatalog/src/utils/collections/pointer-schema.ts +7 -0
  216. package/eventcatalog/src/utils/collections/resource-docs.ts +677 -14
  217. package/eventcatalog/src/utils/collections/schema-loader.ts +0 -5
  218. package/eventcatalog/src/utils/feature.ts +14 -23
  219. package/eventcatalog/src/utils/license.ts +114 -0
  220. package/eventcatalog/src/utils/node-graphs/architecture-diagram-types.ts +32 -0
  221. package/eventcatalog/src/utils/node-graphs/architecture-diagram.ts +84 -0
  222. package/eventcatalog/src/utils/node-graphs/catalog-force-graph.ts +1 -0
  223. package/eventcatalog/src/utils/node-graphs/channel-node-graph.ts +4 -25
  224. package/eventcatalog/src/utils/node-graphs/container-node-graph.ts +12 -39
  225. package/eventcatalog/src/utils/node-graphs/data-products-node-graph.ts +11 -27
  226. package/eventcatalog/src/utils/node-graphs/domain-levels-node-graph.ts +679 -0
  227. package/eventcatalog/src/utils/node-graphs/domains-node-graph.ts +3 -20
  228. package/eventcatalog/src/utils/node-graphs/export-mermaid.ts +62 -4
  229. package/eventcatalog/src/utils/node-graphs/field-node-graph.ts +8 -23
  230. package/eventcatalog/src/utils/node-graphs/flow-lanes.ts +119 -0
  231. package/eventcatalog/src/utils/node-graphs/flows-node-graph.ts +153 -45
  232. package/eventcatalog/src/utils/node-graphs/layout-node-graph.ts +28 -0
  233. package/eventcatalog/src/utils/node-graphs/layout-persistence.ts +3 -3
  234. package/eventcatalog/src/utils/node-graphs/message-node-graph.ts +16 -34
  235. package/eventcatalog/src/utils/node-graphs/services-node-graph.ts +11 -25
  236. package/eventcatalog/src/utils/node-graphs/system-context-node-graph.ts +18 -54
  237. package/eventcatalog/src/utils/node-graphs/system-levels-node-graph.ts +59 -0
  238. package/eventcatalog/src/utils/node-graphs/systems-node-graph.ts +20 -80
  239. package/eventcatalog/src/utils/node-graphs/utils/utils.ts +1 -78
  240. package/eventcatalog/src/utils/trial.ts +36 -0
  241. package/eventcatalog/tsconfig.json +1 -1
  242. package/package.json +11 -11
  243. package/dist/chunk-FV56YFM4.js +0 -7
  244. package/dist/federation/entitlement.cjs +0 -31
  245. package/dist/federation/entitlement.d.cts +0 -12
  246. package/dist/federation/entitlement.d.ts +0 -12
  247. package/dist/federation/entitlement.js +0 -6
  248. package/dist/runtime-dependencies/dagre.mjs +0 -3
  249. package/eventcatalog/src/components/Settings/BillingSettingsForm.tsx +0 -265
  250. package/eventcatalog/src/enterprise/LICENSE +0 -57
  251. package/eventcatalog/src/enterprise/README.md +0 -5
  252. package/eventcatalog/src/enterprise/collections/resource-docs-utils.ts +0 -691
  253. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +0 -9
  254. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/[...path]/index.astro +0 -18
  255. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/feature.astro +0 -171
  256. package/eventcatalog/src/enterprise/feature.ts +0 -75
  257. package/eventcatalog/src/enterprise/tools/index.ts +0 -10
  258. package/eventcatalog/src/hooks/eventcatalog-visualizer.ts +0 -126
  259. package/eventcatalog/src/pages/settings/billing.astro +0 -17
  260. package/eventcatalog/src/pages/visualiser/domain-integrations/index.astro +0 -26
  261. package/eventcatalog/src/types/mcp-modules.d.ts +0 -67
  262. package/eventcatalog/src/utils/node-graphs/domains-canvas.ts +0 -261
  263. package/eventcatalog/src/utils/node-graphs/export-node-graph.ts +0 -91
  264. /package/eventcatalog/src/{enterprise → features}/auth/error.astro +0 -0
  265. /package/eventcatalog/src/{enterprise → features}/auth/login.astro +0 -0
  266. /package/eventcatalog/src/{enterprise → features}/auth/unauthorized.astro +0 -0
  267. /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path]/_index.data.ts +0 -0
  268. /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path].mdx.ts +0 -0
@@ -6,8 +6,8 @@
6
6
  */
7
7
 
8
8
  /* Sunset Light Mode */
9
- :root[data-catalog-theme="sunset"],
10
- :root[data-catalog-theme="sunset"][data-theme="light"] {
9
+ :root[data-catalog-theme='sunset'],
10
+ :root[data-catalog-theme='sunset'][data-theme='light'] {
11
11
  /* Header - clean white */
12
12
  --ec-header-bg: 255 255 255; /* #ffffff */
13
13
  --ec-header-text: 23 23 23; /* #171717 neutral-900 */
@@ -110,7 +110,7 @@
110
110
  }
111
111
 
112
112
  /* Sunset Dark Mode */
113
- :root[data-catalog-theme="sunset"][data-theme="dark"] {
113
+ :root[data-catalog-theme='sunset'][data-theme='dark'] {
114
114
  /* Header - matches page bg for unified look */
115
115
  --ec-header-bg: 10 10 10; /* #0a0a0a neutral-950 - matches page bg */
116
116
  --ec-header-text: 245 245 245; /* #f5f5f5 neutral-100 */
@@ -209,7 +209,7 @@
209
209
  }
210
210
 
211
211
  /* Sunset theme prose overrides */
212
- :root[data-catalog-theme="sunset"][data-theme="dark"] .prose {
212
+ :root[data-catalog-theme='sunset'][data-theme='dark'] .prose {
213
213
  --tw-prose-body: rgb(163 163 163); /* neutral-400 */
214
214
  --tw-prose-headings: rgb(245 245 245); /* neutral-100 */
215
215
  --tw-prose-lead: rgb(115 115 115); /* neutral-500 */
@@ -228,19 +228,19 @@
228
228
  --tw-prose-td-borders: rgb(38 38 38); /* neutral-800 */
229
229
  }
230
230
 
231
- :root[data-catalog-theme="sunset"][data-theme="dark"] .prose code {
231
+ :root[data-catalog-theme='sunset'][data-theme='dark'] .prose code {
232
232
  background-color: rgb(38 38 38); /* neutral-800 */
233
233
  }
234
234
 
235
- :root[data-catalog-theme="sunset"][data-theme="dark"] .prose pre {
235
+ :root[data-catalog-theme='sunset'][data-theme='dark'] .prose pre {
236
236
  background-color: rgb(23 23 23); /* neutral-900 */
237
237
  border: 1px solid rgb(38 38 38); /* neutral-800 */
238
238
  }
239
239
 
240
- :root[data-catalog-theme="sunset"][data-theme="dark"] .prose a {
240
+ :root[data-catalog-theme='sunset'][data-theme='dark'] .prose a {
241
241
  color: rgb(251 146 60); /* orange-400 */
242
242
  }
243
243
 
244
- :root[data-catalog-theme="sunset"][data-theme="dark"] .prose a:hover {
244
+ :root[data-catalog-theme='sunset'][data-theme='dark'] .prose a:hover {
245
245
  color: rgb(253 186 116); /* orange-300 */
246
246
  }
@@ -1,22 +1,22 @@
1
1
  /**
2
2
  * Copy text to clipboard with fallback for older browsers
3
3
  * @param text - The text to copy to clipboard
4
- * @returns Promise that resolves to true if successful
4
+ * @returns Promise that resolves to true if the text was copied
5
5
  */
6
6
  export async function copyToClipboard(text: string): Promise<boolean> {
7
7
  try {
8
8
  await navigator.clipboard.writeText(text);
9
9
  return true;
10
10
  } catch {
11
- // Fallback for older browsers
11
+ // Fallback for older browsers, and for sandboxed frames (such as MCP App views) without clipboard access
12
12
  const textarea = document.createElement('textarea');
13
13
  textarea.value = text;
14
14
  textarea.style.position = 'fixed';
15
15
  textarea.style.opacity = '0';
16
16
  document.body.appendChild(textarea);
17
17
  textarea.select();
18
- document.execCommand('copy');
18
+ const copied = document.execCommand('copy');
19
19
  document.body.removeChild(textarea);
20
- return true;
20
+ return copied;
21
21
  }
22
22
  }
@@ -0,0 +1,117 @@
1
+ import { z } from 'astro/zod';
2
+ import { withExtensionProperties } from './extension-properties';
3
+ import { pointer } from './pointer-schema';
4
+
5
+ const nextStep = z
6
+ .union([
7
+ // Can be a string or a number just to reference a step
8
+ z.union([z.string(), z.number()]),
9
+ z
10
+ .object({
11
+ id: z.union([z.string(), z.number()]),
12
+ label: z.string().optional(),
13
+ })
14
+ .optional(),
15
+ ])
16
+ .optional();
17
+
18
+ // What a step can be (a step is one of these, or just a titled box)
19
+ const STEP_KINDS = [
20
+ 'message',
21
+ 'agent',
22
+ 'service',
23
+ 'systems',
24
+ 'system',
25
+ 'channel',
26
+ 'flow',
27
+ 'container',
28
+ 'dataProduct',
29
+ 'actor',
30
+ 'custom',
31
+ 'externalSystem',
32
+ ] as const;
33
+
34
+ /**
35
+ * A step in a flow's frontmatter. Keys a step doesn't have are rejected (unless
36
+ * they start with `x-`), so a typo like `servce:` fails the build rather than
37
+ * quietly drawing a plain box.
38
+ *
39
+ * The linter checks flows with its own copy of these rules
40
+ * (packages/linter/src/schemas/flow.ts): keep the two in sync.
41
+ */
42
+ export const flowStepSchema = withExtensionProperties(
43
+ z.object({
44
+ id: z.union([z.string(), z.number()]),
45
+ /** Ignored: the kind of step comes from what it points at. Older flows (and the editor) still write it. */
46
+ type: z.string().optional(),
47
+ /** Defaults to the name of what the step points at (or the custom step's title, or its id) */
48
+ title: z.string().optional(),
49
+ summary: z.string().optional(),
50
+ message: pointer.optional(),
51
+ agent: pointer.optional(),
52
+ service: pointer.optional(),
53
+ // Catalog system reference. `systems` matches how authors write the
54
+ // pointer (same shape as `service`); `system` is accepted as an alias.
55
+ systems: pointer.optional(),
56
+ system: pointer.optional(),
57
+ channel: pointer.optional(),
58
+ flow: pointer.optional(),
59
+ container: pointer.optional(),
60
+ dataProduct: pointer.optional(),
61
+
62
+ actor: z
63
+ .object({
64
+ name: z.string(),
65
+ summary: z.string().optional(),
66
+ })
67
+ .optional(),
68
+ custom: z
69
+ .object({
70
+ /** Defaults to the step's title */
71
+ title: z.string().optional(),
72
+ icon: z.string().optional(),
73
+ type: z.string().optional(),
74
+ summary: z.string().optional(),
75
+ url: z.string().url().optional(),
76
+ color: z.string().optional(),
77
+ properties: z.record(z.string(), z.union([z.string(), z.number()])).optional(),
78
+ height: z.number().optional(),
79
+ menu: z
80
+ .array(
81
+ z.object({
82
+ label: z.string(),
83
+ url: z.string().url().optional(),
84
+ })
85
+ )
86
+ .optional(),
87
+ })
88
+ .optional(),
89
+ externalSystem: z
90
+ .object({
91
+ name: z.string(),
92
+ summary: z.string().optional(),
93
+ url: z.string().url().optional(),
94
+ })
95
+ .optional(),
96
+ next_step: nextStep,
97
+ next_steps: z.array(nextStep).optional(),
98
+ })
99
+ ).superRefine((step, context) => {
100
+ if (step.next_step !== undefined && step.next_steps !== undefined) {
101
+ context.addIssue({
102
+ code: 'custom',
103
+ path: ['next_steps'],
104
+ message: `Step "${step.id}" has both next_step and next_steps. Use next_step for one next step, or next_steps for several.`,
105
+ });
106
+ }
107
+
108
+ const kinds = STEP_KINDS.filter((kind) => step[kind] !== undefined);
109
+ if (kinds.length > 1) {
110
+ const listed = `${kinds.slice(0, -1).join(', ')} and ${kinds[kinds.length - 1]}`;
111
+ context.addIssue({
112
+ code: 'custom',
113
+ path: [kinds[1]],
114
+ message: `Step "${step.id}" points at ${listed}. A step can only be one thing, so split it into ${kinds.length === 2 ? 'two' : 'separate'} steps.`,
115
+ });
116
+ }
117
+ });
@@ -0,0 +1,7 @@
1
+ import { z } from 'astro/zod';
2
+
3
+ /** A reference to a versioned resource in the catalog (the latest version unless one is given) */
4
+ export const pointer = z.object({
5
+ id: z.string(),
6
+ version: z.string().optional().default('latest'),
7
+ });