@eventcatalog/core 3.0.0-beta.25 → 3.0.0-beta.26

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 (49) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/catalog-to-astro-content-directory.cjs +2 -19
  6. package/dist/catalog-to-astro-content-directory.d.cts +1 -2
  7. package/dist/catalog-to-astro-content-directory.d.ts +1 -2
  8. package/dist/catalog-to-astro-content-directory.js +3 -5
  9. package/dist/{chunk-RA6AYXGJ.js → chunk-3YJD7KVJ.js} +1 -1
  10. package/dist/{chunk-NAW6EPCS.js → chunk-5TB5SKXE.js} +1 -1
  11. package/dist/{chunk-3SWCGDD7.js → chunk-6VKMP3FH.js} +1 -1
  12. package/dist/{chunk-R2BJ7MJG.js → chunk-6Z6ARMQS.js} +1 -17
  13. package/dist/{chunk-DFHXF3VF.js → chunk-MZTNQHMI.js} +1 -1
  14. package/dist/{chunk-OJA6CNVO.js → chunk-WQFW32XA.js} +1 -1
  15. package/dist/constants.cjs +1 -1
  16. package/dist/constants.js +1 -1
  17. package/dist/eventcatalog.cjs +1 -18
  18. package/dist/eventcatalog.js +7 -10
  19. package/dist/generate.cjs +1 -1
  20. package/dist/generate.js +3 -3
  21. package/dist/utils/cli-logger.cjs +1 -1
  22. package/dist/utils/cli-logger.js +2 -2
  23. package/eventcatalog/src/components/SchemaExplorer/ApiAccessSection.tsx +95 -90
  24. package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +144 -0
  25. package/eventcatalog/src/components/SchemaExplorer/Pagination.tsx +34 -8
  26. package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +2 -2
  27. package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsHeader.tsx +140 -109
  28. package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +5 -14
  29. package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +247 -59
  30. package/eventcatalog/src/components/SchemaExplorer/SchemaFilters.tsx +64 -126
  31. package/eventcatalog/src/components/SchemaExplorer/SchemaListItem.tsx +41 -43
  32. package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +42 -15
  33. package/eventcatalog/src/components/Tables/Table.tsx +96 -77
  34. package/eventcatalog/src/components/Tables/columns/ContainersTableColumns.tsx +108 -74
  35. package/eventcatalog/src/components/Tables/columns/DomainTableColumns.tsx +74 -55
  36. package/eventcatalog/src/components/Tables/columns/FlowTableColumns.tsx +36 -36
  37. package/eventcatalog/src/components/Tables/columns/MessageTableColumns.tsx +110 -77
  38. package/eventcatalog/src/components/Tables/columns/ServiceTableColumns.tsx +105 -94
  39. package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +31 -26
  40. package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +115 -215
  41. package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +145 -243
  42. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +2 -2
  43. package/eventcatalog/src/pages/_index.astro +239 -554
  44. package/eventcatalog/src/pages/directory/[type]/index.astro +6 -0
  45. package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +194 -121
  46. package/eventcatalog/src/pages/docs/teams/[id]/index.astro +94 -70
  47. package/eventcatalog/src/pages/docs/users/[id]/index.astro +56 -45
  48. package/eventcatalog/src/pages/studio.astro +124 -72
  49. package/package.json +1 -1
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "3.0.0-beta.25";
40
+ var version = "3.0.0-beta.26";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-OJA6CNVO.js";
4
- import "../chunk-3SWCGDD7.js";
3
+ } from "../chunk-WQFW32XA.js";
4
+ import "../chunk-6VKMP3FH.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "3.0.0-beta.25";
109
+ var version = "3.0.0-beta.26";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-DFHXF3VF.js";
4
- import "../chunk-OJA6CNVO.js";
5
- import "../chunk-3SWCGDD7.js";
3
+ } from "../chunk-MZTNQHMI.js";
4
+ import "../chunk-WQFW32XA.js";
5
+ import "../chunk-6VKMP3FH.js";
6
6
  import "../chunk-UPONRQSN.js";
7
7
  export {
8
8
  log_build_default as default
@@ -30,8 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/catalog-to-astro-content-directory.js
31
31
  var catalog_to_astro_content_directory_exports = {};
32
32
  __export(catalog_to_astro_content_directory_exports, {
33
- catalogToAstro: () => catalogToAstro,
34
- checkAndConvertMdToMdx: () => checkAndConvertMdToMdx
33
+ catalogToAstro: () => catalogToAstro
35
34
  });
36
35
  module.exports = __toCommonJS(catalog_to_astro_content_directory_exports);
37
36
 
@@ -241,23 +240,7 @@ var catalogToAstro = async (source, astroDir) => {
241
240
  }
242
241
  await copyFiles(source, astroDir);
243
242
  };
244
- var checkAndConvertMdToMdx = async (source, astroDir) => {
245
- const files = await (0, import_glob.glob)(path3.join(source, "**"), {
246
- nodir: true,
247
- windowsPathsNoEscape: import_node_os.default.platform() == "win32",
248
- ignore: ["node_modules/**", "**/dist/**", "**/README.md"]
249
- });
250
- if (files.some((file) => file.endsWith(".md"))) {
251
- console.log(`EventCatalog now requires all markdown files to be .mdx files. Converting all .md files to .mdx...`);
252
- }
253
- for (const file of files) {
254
- if (file.endsWith(".md")) {
255
- import_fs.default.renameSync(file, file.replace(".md", ".mdx"));
256
- }
257
- }
258
- };
259
243
  // Annotate the CommonJS export names for ESM import in node:
260
244
  0 && (module.exports = {
261
- catalogToAstro,
262
- checkAndConvertMdToMdx
245
+ catalogToAstro
263
246
  });
@@ -1,4 +1,3 @@
1
1
  declare function catalogToAstro(source: any, astroDir: any): Promise<void>;
2
- declare function checkAndConvertMdToMdx(source: any, astroDir: any): Promise<void>;
3
2
 
4
- export { catalogToAstro, checkAndConvertMdToMdx };
3
+ export { catalogToAstro };
@@ -1,4 +1,3 @@
1
1
  declare function catalogToAstro(source: any, astroDir: any): Promise<void>;
2
- declare function checkAndConvertMdToMdx(source: any, astroDir: any): Promise<void>;
3
2
 
4
- export { catalogToAstro, checkAndConvertMdToMdx };
3
+ export { catalogToAstro };
@@ -1,10 +1,8 @@
1
1
  import {
2
- catalogToAstro,
3
- checkAndConvertMdToMdx
4
- } from "./chunk-R2BJ7MJG.js";
2
+ catalogToAstro
3
+ } from "./chunk-6Z6ARMQS.js";
5
4
  import "./chunk-55D645EH.js";
6
5
  import "./chunk-UPONRQSN.js";
7
6
  export {
8
- catalogToAstro,
9
- checkAndConvertMdToMdx
7
+ catalogToAstro
10
8
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-NAW6EPCS.js";
3
+ } from "./chunk-5TB5SKXE.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-3SWCGDD7.js";
3
+ } from "./chunk-6VKMP3FH.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "3.0.0-beta.25";
2
+ var version = "3.0.0-beta.26";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -50,23 +50,7 @@ var catalogToAstro = async (source, astroDir) => {
50
50
  }
51
51
  await copyFiles(source, astroDir);
52
52
  };
53
- var checkAndConvertMdToMdx = async (source, astroDir) => {
54
- const files = await glob(path.join(source, "**"), {
55
- nodir: true,
56
- windowsPathsNoEscape: os.platform() == "win32",
57
- ignore: ["node_modules/**", "**/dist/**", "**/README.md"]
58
- });
59
- if (files.some((file) => file.endsWith(".md"))) {
60
- console.log(`EventCatalog now requires all markdown files to be .mdx files. Converting all .md files to .mdx...`);
61
- }
62
- for (const file of files) {
63
- if (file.endsWith(".md")) {
64
- fs.renameSync(file, file.replace(".md", ".mdx"));
65
- }
66
- }
67
- };
68
53
 
69
54
  export {
70
- catalogToAstro,
71
- checkAndConvertMdToMdx
55
+ catalogToAstro
72
56
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-OJA6CNVO.js";
3
+ } from "./chunk-WQFW32XA.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-3SWCGDD7.js";
3
+ } from "./chunk-6VKMP3FH.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "3.0.0-beta.25";
28
+ var version = "3.0.0-beta.26";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-3SWCGDD7.js";
3
+ } from "./chunk-6VKMP3FH.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -109,7 +109,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
109
109
  var import_picocolors = __toESM(require("picocolors"), 1);
110
110
 
111
111
  // package.json
112
- var version = "3.0.0-beta.25";
112
+ var version = "3.0.0-beta.26";
113
113
 
114
114
  // src/constants.ts
115
115
  var VERSION = version;
@@ -479,21 +479,6 @@ var catalogToAstro = async (source, astroDir) => {
479
479
  }
480
480
  await copyFiles(source, astroDir);
481
481
  };
482
- var checkAndConvertMdToMdx = async (source, astroDir) => {
483
- const files = await (0, import_glob.glob)(path4.join(source, "**"), {
484
- nodir: true,
485
- windowsPathsNoEscape: import_node_os.default.platform() == "win32",
486
- ignore: ["node_modules/**", "**/dist/**", "**/README.md"]
487
- });
488
- if (files.some((file) => file.endsWith(".md"))) {
489
- console.log(`EventCatalog now requires all markdown files to be .mdx files. Converting all .md files to .mdx...`);
490
- }
491
- for (const file of files) {
492
- if (file.endsWith(".md")) {
493
- import_fs.default.renameSync(file, file.replace(".md", ".mdx"));
494
- }
495
- }
496
- };
497
482
 
498
483
  // src/resolve-catalog-dependencies.js
499
484
  var import_node_path4 = __toESM(require("path"), 1);
@@ -763,7 +748,6 @@ program.command("dev").description("Run development server of EventCatalog").opt
763
748
  if (options.forceRecreate) clearCore();
764
749
  copyCore();
765
750
  await resolve_catalog_dependencies_default(dir, core);
766
- await checkAndConvertMdToMdx(dir, core);
767
751
  await runMigrations(dir);
768
752
  await catalogToAstro(dir, core);
769
753
  const canEmbedPages = await (0, import_license.isFeatureEnabled)(
@@ -825,7 +809,6 @@ program.command("build").description("Run build of EventCatalog").action(async (
825
809
  isBackstagePluginEnabled: canEmbedPages || isEventCatalogScale
826
810
  });
827
811
  await resolve_catalog_dependencies_default(dir, core);
828
- await checkAndConvertMdToMdx(dir, core);
829
812
  await runMigrations(dir);
830
813
  await catalogToAstro(dir, core);
831
814
  checkForUpdate();
@@ -6,29 +6,28 @@ import {
6
6
  } from "./chunk-PLNJC7NZ.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-DFHXF3VF.js";
10
- import "./chunk-OJA6CNVO.js";
9
+ } from "./chunk-MZTNQHMI.js";
10
+ import "./chunk-WQFW32XA.js";
11
11
  import {
12
12
  runMigrations
13
13
  } from "./chunk-BH3JMNAV.js";
14
14
  import "./chunk-622JYJWG.js";
15
15
  import {
16
- catalogToAstro,
17
- checkAndConvertMdToMdx
18
- } from "./chunk-R2BJ7MJG.js";
16
+ catalogToAstro
17
+ } from "./chunk-6Z6ARMQS.js";
19
18
  import "./chunk-55D645EH.js";
20
19
  import {
21
20
  isOutputServer
22
21
  } from "./chunk-5VBIXL6C.js";
23
22
  import {
24
23
  generate
25
- } from "./chunk-RA6AYXGJ.js";
24
+ } from "./chunk-3YJD7KVJ.js";
26
25
  import {
27
26
  logger
28
- } from "./chunk-NAW6EPCS.js";
27
+ } from "./chunk-5TB5SKXE.js";
29
28
  import {
30
29
  VERSION
31
- } from "./chunk-3SWCGDD7.js";
30
+ } from "./chunk-6VKMP3FH.js";
32
31
  import "./chunk-UPONRQSN.js";
33
32
 
34
33
  // src/eventcatalog.ts
@@ -141,7 +140,6 @@ program.command("dev").description("Run development server of EventCatalog").opt
141
140
  if (options.forceRecreate) clearCore();
142
141
  copyCore();
143
142
  await resolve_catalog_dependencies_default(dir, core);
144
- await checkAndConvertMdToMdx(dir, core);
145
143
  await runMigrations(dir);
146
144
  await catalogToAstro(dir, core);
147
145
  const canEmbedPages = await isFeatureEnabled(
@@ -203,7 +201,6 @@ program.command("build").description("Run build of EventCatalog").action(async (
203
201
  isBackstagePluginEnabled: canEmbedPages || isEventCatalogScale
204
202
  });
205
203
  await resolve_catalog_dependencies_default(dir, core);
206
- await checkAndConvertMdToMdx(dir, core);
207
204
  await runMigrations(dir);
208
205
  await catalogToAstro(dir, core);
209
206
  checkForUpdate();
package/dist/generate.cjs CHANGED
@@ -73,7 +73,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
73
73
  var import_picocolors = __toESM(require("picocolors"), 1);
74
74
 
75
75
  // package.json
76
- var version = "3.0.0-beta.25";
76
+ var version = "3.0.0-beta.26";
77
77
 
78
78
  // src/constants.ts
79
79
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-RA6AYXGJ.js";
4
- import "./chunk-NAW6EPCS.js";
5
- import "./chunk-3SWCGDD7.js";
3
+ } from "./chunk-3YJD7KVJ.js";
4
+ import "./chunk-5TB5SKXE.js";
5
+ import "./chunk-6VKMP3FH.js";
6
6
  import "./chunk-UPONRQSN.js";
7
7
  export {
8
8
  generate
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "3.0.0-beta.25";
39
+ var version = "3.0.0-beta.26";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-NAW6EPCS.js";
4
- import "../chunk-3SWCGDD7.js";
3
+ } from "../chunk-5TB5SKXE.js";
4
+ import "../chunk-6VKMP3FH.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -1,4 +1,5 @@
1
- import { ChevronUpIcon, ChevronDownIcon, ClipboardDocumentIcon } from '@heroicons/react/24/outline';
1
+ import { ChevronUpIcon, ChevronDownIcon, ClipboardDocumentIcon, CheckIcon } from '@heroicons/react/24/outline';
2
+ import { CommandLineIcon, LockClosedIcon } from '@heroicons/react/24/solid';
2
3
  import type { SchemaItem } from './types';
3
4
 
4
5
  interface ApiAccessSectionProps {
@@ -27,109 +28,113 @@ export default function ApiAccessSection({
27
28
  apiPath = `/api/schemas/${message.collection}/${message.data.id}/${message.data.version}`;
28
29
  }
29
30
 
30
- const curlCommand = typeof window !== 'undefined' ? `curl -X GET "${window.location.origin}${apiPath}"` : '';
31
+ const fullUrl = typeof window !== 'undefined' ? `${window.location.origin}${apiPath}` : apiPath;
32
+ const curlCommand = `curl ${fullUrl}`;
33
+ const isCopied = copiedId === `${message.data.id}-api`;
31
34
 
32
35
  return (
33
- <div className="flex-shrink-0 border-b border-gray-200">
36
+ <div className="flex-shrink-0 border-b border-gray-100">
34
37
  <button
35
38
  onClick={onToggle}
36
- className="w-full flex items-center justify-between px-4 py-1.5 text-left hover:bg-gray-50 transition-colors"
39
+ className="w-full flex items-center justify-between px-4 py-2 text-left hover:bg-gray-50/50 transition-colors"
37
40
  >
38
41
  <div className="flex items-center gap-2">
39
- <svg
40
- xmlns="http://www.w3.org/2000/svg"
41
- className="h-4 w-4 text-gray-600"
42
- fill="none"
43
- viewBox="0 0 24 24"
44
- stroke="currentColor"
45
- >
46
- <path
47
- strokeLinecap="round"
48
- strokeLinejoin="round"
49
- strokeWidth={2}
50
- d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
51
- />
52
- </svg>
53
- <span className="text-xs font-semibold text-gray-900">API Access</span>
54
- <span className="inline-flex items-center rounded-full bg-purple-100 px-2 py-0.5 text-xs font-medium text-purple-800">
55
- Scale
56
- </span>
42
+ <CommandLineIcon className="h-3.5 w-3.5 text-gray-700" />
43
+ <span className="text-xs font-medium text-gray-700">API</span>
44
+ {!apiAccessEnabled && (
45
+ <span className="inline-flex items-center gap-1 rounded bg-purple-50 px-1.5 py-0.5 text-[10px] font-medium text-purple-600 border border-purple-100">
46
+ <LockClosedIcon className="h-2.5 w-2.5" />
47
+ Scale
48
+ </span>
49
+ )}
57
50
  </div>
58
- {isExpanded ? <ChevronUpIcon className="h-4 w-4 text-gray-600" /> : <ChevronDownIcon className="h-4 w-4 text-gray-600" />}
51
+ {isExpanded ? (
52
+ <ChevronUpIcon className="h-3.5 w-3.5 text-gray-400" />
53
+ ) : (
54
+ <ChevronDownIcon className="h-3.5 w-3.5 text-gray-400" />
55
+ )}
59
56
  </button>
60
57
 
61
58
  {isExpanded && (
62
- <div className="px-4 pb-2 bg-gray-50">
59
+ <div className="px-4 pb-3">
63
60
  {apiAccessEnabled ? (
64
- <>
65
- <p className="text-xs text-gray-600 mb-2">Access this schema programmatically via API</p>
66
- <div className="bg-gray-900 rounded-md p-3">
67
- <div className="flex items-start justify-between mb-2">
68
- <span className="text-xs text-gray-400 font-mono">GET</span>
69
- <button
70
- onClick={() => onCopy(curlCommand, `${message.data.id}-api`)}
71
- className="inline-flex items-center gap-1 px-2 py-1 text-xs font-medium text-gray-300 hover:text-white transition-colors"
72
- title="Copy curl command"
73
- >
74
- <ClipboardDocumentIcon className="h-3.5 w-3.5" />
75
- {copiedId === `${message.data.id}-api` ? 'Copied!' : 'Copy'}
76
- </button>
77
- </div>
78
- <code className="block text-xs text-green-400 font-mono break-all">{apiPath}</code>
79
- <div className="mt-3 pt-3 border-t border-gray-700">
80
- <p className="text-xs text-gray-400 mb-2">Example:</p>
81
- <code className="block text-xs text-gray-300 font-mono whitespace-pre-wrap break-all">{curlCommand}</code>
82
- </div>
61
+ <div className="space-y-2">
62
+ {/* Endpoint */}
63
+ <div className="flex items-center gap-2 bg-gray-900 rounded-md px-3 py-2">
64
+ <span className="text-[10px] font-semibold text-emerald-400 uppercase tracking-wide">GET</span>
65
+ <code className="flex-1 text-[11px] text-gray-300 font-mono truncate">{apiPath}</code>
66
+ <button
67
+ onClick={() => onCopy(fullUrl, `${message.data.id}-api`)}
68
+ className={`flex-shrink-0 p-1 rounded transition-colors ${
69
+ isCopied ? 'text-emerald-400' : 'text-gray-500 hover:text-gray-300'
70
+ }`}
71
+ title="Copy URL"
72
+ >
73
+ {isCopied ? <CheckIcon className="h-3.5 w-3.5" /> : <ClipboardDocumentIcon className="h-3.5 w-3.5" />}
74
+ </button>
75
+ </div>
76
+
77
+ {/* Quick copy buttons */}
78
+ <div className="flex items-center gap-2">
79
+ <button
80
+ onClick={() => onCopy(curlCommand, `${message.data.id}-curl`)}
81
+ className={`inline-flex items-center gap-1.5 px-2 py-1 text-[10px] font-medium rounded border transition-colors ${
82
+ copiedId === `${message.data.id}-curl`
83
+ ? 'bg-emerald-50 text-emerald-600 border-emerald-200'
84
+ : 'text-gray-500 border-gray-200 hover:bg-gray-50 hover:text-gray-700'
85
+ }`}
86
+ >
87
+ {copiedId === `${message.data.id}-curl` ? (
88
+ <>
89
+ <CheckIcon className="h-3 w-3" />
90
+ Copied
91
+ </>
92
+ ) : (
93
+ <>
94
+ <ClipboardDocumentIcon className="h-3 w-3" />
95
+ Copy cURL
96
+ </>
97
+ )}
98
+ </button>
99
+ <button
100
+ onClick={() => onCopy(fullUrl, `${message.data.id}-url`)}
101
+ className={`inline-flex items-center gap-1.5 px-2 py-1 text-[10px] font-medium rounded border transition-colors ${
102
+ copiedId === `${message.data.id}-url`
103
+ ? 'bg-emerald-50 text-emerald-600 border-emerald-200'
104
+ : 'text-gray-500 border-gray-200 hover:bg-gray-50 hover:text-gray-700'
105
+ }`}
106
+ >
107
+ {copiedId === `${message.data.id}-url` ? (
108
+ <>
109
+ <CheckIcon className="h-3 w-3" />
110
+ Copied
111
+ </>
112
+ ) : (
113
+ <>
114
+ <ClipboardDocumentIcon className="h-3 w-3" />
115
+ Copy URL
116
+ </>
117
+ )}
118
+ </button>
83
119
  </div>
84
- </>
120
+ </div>
85
121
  ) : (
86
- <div className="bg-white border border-purple-200 rounded-md p-4">
87
- <div className="flex items-start gap-3">
88
- <div className="flex-shrink-0">
89
- <svg
90
- xmlns="http://www.w3.org/2000/svg"
91
- className="h-5 w-5 text-purple-600"
92
- fill="none"
93
- viewBox="0 0 24 24"
94
- stroke="currentColor"
95
- >
96
- <path
97
- strokeLinecap="round"
98
- strokeLinejoin="round"
99
- strokeWidth={2}
100
- d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
101
- />
102
- </svg>
103
- </div>
104
- <div className="flex-1">
105
- <h4 className="text-sm font-semibold text-gray-900 mb-1">Upgrade to Scale</h4>
106
- <p className="text-xs text-gray-600 mb-3">
107
- Access your schemas programmatically via API. Perfect for CI/CD pipelines, automation, and integrations.
108
- </p>
109
- <a
110
- href="https://eventcatalog.cloud"
111
- target="_blank"
112
- rel="noopener noreferrer"
113
- className="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-white bg-purple-600 rounded-md hover:bg-purple-700 transition-colors"
114
- >
115
- Start 14-day free trial
116
- <svg
117
- xmlns="http://www.w3.org/2000/svg"
118
- className="h-3.5 w-3.5"
119
- fill="none"
120
- viewBox="0 0 24 24"
121
- stroke="currentColor"
122
- >
123
- <path
124
- strokeLinecap="round"
125
- strokeLinejoin="round"
126
- strokeWidth={2}
127
- d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
128
- />
129
- </svg>
130
- </a>
131
- </div>
122
+ <div className="flex items-center justify-between gap-3 bg-gradient-to-r from-purple-50 to-indigo-50 border border-purple-100 rounded-md px-3 py-2.5">
123
+ <div className="flex-1 min-w-0">
124
+ <p className="text-xs font-medium text-gray-700">Access schemas via API</p>
125
+ <p className="text-[10px] text-gray-500 mt-0.5">CI/CD, automation & integrations</p>
132
126
  </div>
127
+ <a
128
+ href="https://eventcatalog.cloud"
129
+ target="_blank"
130
+ rel="noopener noreferrer"
131
+ className="flex-shrink-0 inline-flex items-center gap-1 px-2.5 py-1.5 text-[11px] font-medium text-white bg-purple-600 rounded-md hover:bg-purple-700 transition-colors"
132
+ >
133
+ Try Scale
134
+ <svg xmlns="http://www.w3.org/2000/svg" className="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
135
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
136
+ </svg>
137
+ </a>
133
138
  </div>
134
139
  )}
135
140
  </div>