@eventcatalog/core 5.0.0-beta.28 → 5.0.0-beta.29

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 (37) 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 +3 -1
  4. package/dist/analytics/log-build.js +4 -4
  5. package/dist/{chunk-TDUUHSGF.js → chunk-34VU2X7H.js} +1 -1
  6. package/dist/{chunk-G46KUC6G.js → chunk-3RDV4HXA.js} +1 -1
  7. package/dist/{chunk-VAL22T5Y.js → chunk-4IREUUHE.js} +2 -2
  8. package/dist/{chunk-AWOO63ME.js → chunk-AD7CL772.js} +11 -4
  9. package/dist/{chunk-QWFP2PDM.js → chunk-B4OOUG5I.js} +1 -1
  10. package/dist/{chunk-EUMQAONX.js → chunk-ZK7Q7XDV.js} +1 -1
  11. package/dist/constants.cjs +1 -1
  12. package/dist/constants.js +1 -1
  13. package/dist/eventcatalog.cjs +12 -5
  14. package/dist/eventcatalog.js +6 -6
  15. package/dist/generate.cjs +1 -1
  16. package/dist/generate.js +3 -3
  17. package/dist/utils/cli-logger.cjs +1 -1
  18. package/dist/utils/cli-logger.js +2 -2
  19. package/dist/utils/license-status.cjs +11 -4
  20. package/dist/utils/license-status.d.cts +3 -2
  21. package/dist/utils/license-status.d.ts +3 -2
  22. package/dist/utils/license-status.js +1 -1
  23. package/eventcatalog/src/components/MDX/NodeGraph/AstroNodeGraph.tsx +19 -2
  24. package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +53 -48
  25. package/eventcatalog/src/components/Settings/GeneralSettingsForm.tsx +183 -178
  26. package/eventcatalog/src/components/Settings/LicenseSettings.tsx +140 -31
  27. package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +40 -35
  28. package/eventcatalog/src/components/Settings/LogoUpload.tsx +1 -1
  29. package/eventcatalog/src/components/Settings/McpSettingsForm.tsx +9 -8
  30. package/eventcatalog/src/components/Settings/Row.tsx +7 -4
  31. package/eventcatalog/src/components/Settings/SettingsShared.tsx +3 -3
  32. package/eventcatalog/src/components/TrialBadge.astro +20 -9
  33. package/eventcatalog/src/layouts/SettingsLayout.astro +2 -2
  34. package/eventcatalog/src/pages/settings/license.astro +9 -1
  35. package/eventcatalog/src/utils/license.ts +1 -1
  36. package/eventcatalog/src/utils/trial.ts +13 -0
  37. package/package.json +3 -3
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "5.0.0-beta.28";
39
+ var version = "5.0.0-beta.29";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-QWFP2PDM.js";
3
+ } from "../chunk-B4OOUG5I.js";
4
4
  import "../chunk-CPW6G62V.js";
5
- import "../chunk-EUMQAONX.js";
5
+ import "../chunk-ZK7Q7XDV.js";
6
6
  export {
7
7
  raiseEvent
8
8
  };
@@ -169,7 +169,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
169
169
  var import_os = __toESM(require("os"), 1);
170
170
 
171
171
  // package.json
172
- var version = "5.0.0-beta.28";
172
+ var version = "5.0.0-beta.29";
173
173
 
174
174
  // src/constants.ts
175
175
  var VERSION = version;
@@ -294,6 +294,7 @@ var import_license2 = require("@eventcatalog/license");
294
294
 
295
295
  // eventcatalog/src/utils/trial.ts
296
296
  var TRIAL_LENGTH_DAYS = 60;
297
+ var FREE_USE_NOTE = "Under $10M revenue and $10M raised, an individual or an open-source project? You qualify for Free Use; get a free key at eventcatalog.cloud.";
297
298
  var DAY_IN_MS = 24 * 60 * 60 * 1e3;
298
299
  var getTrialStatus = (tsd, now = Date.now()) => {
299
300
  if (typeof tsd !== "number" || !Number.isFinite(tsd) || tsd <= 0) return;
@@ -321,6 +322,7 @@ var getLicenseAnalytics = (license = { state: "none" }, tsd) => ({
321
322
  trialExpiry: getTrialStatus(tsd)?.endsAt.getTime()
322
323
  });
323
324
  var COLOURS = { bold: import_picocolors.default.bold, dim: import_picocolors.default.dim, link: (text) => import_picocolors.default.cyan(text) };
325
+ var FREE_USE_LINES = FREE_USE_NOTE.split(/(?<=\?) /);
324
326
 
325
327
  // src/analytics/studio-usage.js
326
328
  var import_node_fs3 = __toESM(require("fs"), 1);
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-VAL22T5Y.js";
4
- import "../chunk-AWOO63ME.js";
3
+ } from "../chunk-4IREUUHE.js";
4
+ import "../chunk-AD7CL772.js";
5
5
  import "../chunk-ZAZHAVKB.js";
6
6
  import "../chunk-CA6WCQ2T.js";
7
- import "../chunk-QWFP2PDM.js";
7
+ import "../chunk-B4OOUG5I.js";
8
8
  import "../chunk-CPW6G62V.js";
9
- import "../chunk-EUMQAONX.js";
9
+ import "../chunk-ZK7Q7XDV.js";
10
10
  import "../chunk-4G7FSRPN.js";
11
11
  export {
12
12
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-EUMQAONX.js";
3
+ } from "./chunk-ZK7Q7XDV.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-TDUUHSGF.js";
3
+ } from "./chunk-34VU2X7H.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getLicenseAnalytics
3
- } from "./chunk-AWOO63ME.js";
3
+ } from "./chunk-AD7CL772.js";
4
4
  import {
5
5
  countResources,
6
6
  hashCatalogContent,
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-CA6WCQ2T.js";
14
14
  import {
15
15
  raiseEvent
16
- } from "./chunk-QWFP2PDM.js";
16
+ } from "./chunk-B4OOUG5I.js";
17
17
  import {
18
18
  TELEMETRY_REQUEST_TIMEOUT_MS,
19
19
  isTelemetryDisabled
@@ -7,6 +7,9 @@ import { isEventCatalogScaleEnabled, isEventCatalogStarterEnabled } from "@event
7
7
  var TRIAL_LENGTH_DAYS = 60;
8
8
  var LICENSE_FAQ_URL = "https://www.eventcatalog.dev/license-faq";
9
9
  var LICENSE_RENEW_URL = "https://eventcatalog.cloud";
10
+ var BUY_BUSINESS_URL = "https://www.eventcatalog.dev/buy?source=cli";
11
+ var PRICING_URL = "https://www.eventcatalog.dev/pricing";
12
+ var FREE_USE_NOTE = "Under $10M revenue and $10M raised, an individual or an open-source project? You qualify for Free Use; get a free key at eventcatalog.cloud.";
10
13
  var DAY_IN_MS = 24 * 60 * 60 * 1e3;
11
14
  var getTrialStatus = (tsd, now = Date.now()) => {
12
15
  if (typeof tsd !== "number" || !Number.isFinite(tsd) || tsd <= 0) return;
@@ -125,15 +128,17 @@ var formatDate = (date) => date.toLocaleDateString(void 0, { dateStyle: "medium"
125
128
  var formatDays = (days) => `${days} ${days === 1 ? "day" : "days"}`;
126
129
  var PLAIN = { bold: (text) => text, dim: (text) => text, link: (text) => text };
127
130
  var COLOURS = { bold: pc.bold, dim: pc.dim, link: (text) => pc.cyan(text) };
128
- var render = ({ headline, rows, links }, colours) => {
131
+ var render = ({ headline, rows, links, note }, colours) => {
129
132
  const width = Math.max(0, ...[...rows, ...links].map(([label]) => label.length));
130
133
  const row = ([label, value]) => `${colours.dim(label.padEnd(width))} ${value}`;
131
134
  return [
132
135
  colours.bold(headline),
133
136
  ...rows.length ? ["", ...rows.map(row)] : [],
134
- ...links.length ? ["", ...links.map(([label, url]) => row([label, colours.link(url)]))] : []
137
+ ...links.length ? ["", ...links.map(([label, url]) => row([label, colours.link(url)]))] : [],
138
+ ...note?.length ? ["", ...note.map(colours.dim)] : []
135
139
  ].join("\n");
136
140
  };
141
+ var FREE_USE_LINES = FREE_USE_NOTE.split(/(?<=\?) /);
137
142
  var message = (content) => ({
138
143
  ...content,
139
144
  text: render(content, PLAIN)
@@ -180,7 +185,8 @@ var getLicenseStatusMessage = (license, tsd, now = Date.now()) => {
180
185
  color: trial.ended ? "yellow" : "green",
181
186
  headline: trial.ended ? "Your EventCatalog trial has ended" : `You're on the ${TRIAL_LENGTH_DAYS}-day EventCatalog trial`,
182
187
  rows: trialRows,
183
- links: trial.ended ? [["Get a license", LICENSE_RENEW_URL], licensing] : [licensing]
188
+ links: trial.ended ? [["Get a license", LICENSE_RENEW_URL], ["Buy Business", BUY_BUSINESS_URL], licensing] : [["Buy a license", PRICING_URL], licensing],
189
+ note: trial.ended ? FREE_USE_LINES : void 0
184
190
  });
185
191
  }
186
192
  if (license.state === "expired") {
@@ -194,7 +200,8 @@ var getLicenseStatusMessage = (license, tsd, now = Date.now()) => {
194
200
  title: "EventCatalog license",
195
201
  color: "yellow",
196
202
  headline: "Your commercial license has expired",
197
- rows: [...licensedTo, ...expiredOn, ...trialRows],
203
+ // A catalog has a license or is on the trial: an expired license is renewed, not replaced by the trial
204
+ rows: [...licensedTo, ...expiredOn],
198
205
  links: [renew, licensing]
199
206
  });
200
207
  }
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-CPW6G62V.js";
5
5
  import {
6
6
  VERSION
7
- } from "./chunk-EUMQAONX.js";
7
+ } from "./chunk-ZK7Q7XDV.js";
8
8
 
9
9
  // src/analytics/analytics.js
10
10
  import os from "os";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "5.0.0-beta.28";
2
+ var version = "5.0.0-beta.29";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "5.0.0-beta.28";
28
+ var version = "5.0.0-beta.29";
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-EUMQAONX.js";
3
+ } from "./chunk-ZK7Q7XDV.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -174,7 +174,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
174
174
  var import_picocolors = __toESM(require("picocolors"), 1);
175
175
 
176
176
  // package.json
177
- var version = "5.0.0-beta.28";
177
+ var version = "5.0.0-beta.29";
178
178
 
179
179
  // src/constants.ts
180
180
  var VERSION = version;
@@ -422,6 +422,9 @@ var import_license2 = require("@eventcatalog/license");
422
422
  var TRIAL_LENGTH_DAYS = 60;
423
423
  var LICENSE_FAQ_URL = "https://www.eventcatalog.dev/license-faq";
424
424
  var LICENSE_RENEW_URL = "https://eventcatalog.cloud";
425
+ var BUY_BUSINESS_URL = "https://www.eventcatalog.dev/buy?source=cli";
426
+ var PRICING_URL = "https://www.eventcatalog.dev/pricing";
427
+ var FREE_USE_NOTE = "Under $10M revenue and $10M raised, an individual or an open-source project? You qualify for Free Use; get a free key at eventcatalog.cloud.";
425
428
  var DAY_IN_MS = 24 * 60 * 60 * 1e3;
426
429
  var getTrialStatus = (tsd, now = Date.now()) => {
427
430
  if (typeof tsd !== "number" || !Number.isFinite(tsd) || tsd <= 0) return;
@@ -540,15 +543,17 @@ var formatDate = (date) => date.toLocaleDateString(void 0, { dateStyle: "medium"
540
543
  var formatDays = (days) => `${days} ${days === 1 ? "day" : "days"}`;
541
544
  var PLAIN = { bold: (text) => text, dim: (text) => text, link: (text) => text };
542
545
  var COLOURS = { bold: import_picocolors2.default.bold, dim: import_picocolors2.default.dim, link: (text) => import_picocolors2.default.cyan(text) };
543
- var render = ({ headline, rows, links }, colours) => {
546
+ var render = ({ headline, rows, links, note }, colours) => {
544
547
  const width = Math.max(0, ...[...rows, ...links].map(([label]) => label.length));
545
548
  const row = ([label, value]) => `${colours.dim(label.padEnd(width))} ${value}`;
546
549
  return [
547
550
  colours.bold(headline),
548
551
  ...rows.length ? ["", ...rows.map(row)] : [],
549
- ...links.length ? ["", ...links.map(([label, url]) => row([label, colours.link(url)]))] : []
552
+ ...links.length ? ["", ...links.map(([label, url]) => row([label, colours.link(url)]))] : [],
553
+ ...note?.length ? ["", ...note.map(colours.dim)] : []
550
554
  ].join("\n");
551
555
  };
556
+ var FREE_USE_LINES = FREE_USE_NOTE.split(/(?<=\?) /);
552
557
  var message = (content) => ({
553
558
  ...content,
554
559
  text: render(content, PLAIN)
@@ -595,7 +600,8 @@ var getLicenseStatusMessage = (license, tsd, now = Date.now()) => {
595
600
  color: trial.ended ? "yellow" : "green",
596
601
  headline: trial.ended ? "Your EventCatalog trial has ended" : `You're on the ${TRIAL_LENGTH_DAYS}-day EventCatalog trial`,
597
602
  rows: trialRows,
598
- links: trial.ended ? [["Get a license", LICENSE_RENEW_URL], licensing] : [licensing]
603
+ links: trial.ended ? [["Get a license", LICENSE_RENEW_URL], ["Buy Business", BUY_BUSINESS_URL], licensing] : [["Buy a license", PRICING_URL], licensing],
604
+ note: trial.ended ? FREE_USE_LINES : void 0
599
605
  });
600
606
  }
601
607
  if (license.state === "expired") {
@@ -609,7 +615,8 @@ var getLicenseStatusMessage = (license, tsd, now = Date.now()) => {
609
615
  title: "EventCatalog license",
610
616
  color: "yellow",
611
617
  headline: "Your commercial license has expired",
612
- rows: [...licensedTo, ...expiredOn, ...trialRows],
618
+ // A catalog has a license or is on the trial: an expired license is renewed, not replaced by the trial
619
+ rows: [...licensedTo, ...expiredOn],
613
620
  links: [renew, licensing]
614
621
  });
615
622
  }
@@ -7,11 +7,11 @@ import {
7
7
  } from "./chunk-S5GWAUG5.js";
8
8
  import {
9
9
  log_build_default
10
- } from "./chunk-VAL22T5Y.js";
10
+ } from "./chunk-4IREUUHE.js";
11
11
  import {
12
12
  getLicenseStatus,
13
13
  printLicenseStatus
14
- } from "./chunk-AWOO63ME.js";
14
+ } from "./chunk-AD7CL772.js";
15
15
  import "./chunk-ZAZHAVKB.js";
16
16
  import "./chunk-CA6WCQ2T.js";
17
17
  import {
@@ -37,10 +37,10 @@ import {
37
37
  } from "./chunk-NKNOXQ62.js";
38
38
  import {
39
39
  generate
40
- } from "./chunk-G46KUC6G.js";
40
+ } from "./chunk-3RDV4HXA.js";
41
41
  import {
42
42
  logger
43
- } from "./chunk-TDUUHSGF.js";
43
+ } from "./chunk-34VU2X7H.js";
44
44
  import {
45
45
  resolve_catalog_dependencies_default
46
46
  } from "./chunk-PD7KTSYN.js";
@@ -54,7 +54,7 @@ import {
54
54
  import {
55
55
  watch
56
56
  } from "./chunk-U63GDPPY.js";
57
- import "./chunk-QWFP2PDM.js";
57
+ import "./chunk-B4OOUG5I.js";
58
58
  import "./chunk-CPW6G62V.js";
59
59
  import {
60
60
  getAstroConfigPath
@@ -71,7 +71,7 @@ import {
71
71
  } from "./chunk-LFQJXLHG.js";
72
72
  import {
73
73
  VERSION
74
- } from "./chunk-EUMQAONX.js";
74
+ } from "./chunk-ZK7Q7XDV.js";
75
75
  import {
76
76
  getEventCatalogConfigFile,
77
77
  verifyRequiredFieldsAreInCatalogConfigFile
package/dist/generate.cjs CHANGED
@@ -105,7 +105,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
105
105
  var import_picocolors = __toESM(require("picocolors"), 1);
106
106
 
107
107
  // package.json
108
- var version = "5.0.0-beta.28";
108
+ var version = "5.0.0-beta.29";
109
109
 
110
110
  // src/constants.ts
111
111
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-G46KUC6G.js";
4
- import "./chunk-TDUUHSGF.js";
5
- import "./chunk-EUMQAONX.js";
3
+ } from "./chunk-3RDV4HXA.js";
4
+ import "./chunk-34VU2X7H.js";
5
+ import "./chunk-ZK7Q7XDV.js";
6
6
  import "./chunk-4G7FSRPN.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 = "5.0.0-beta.28";
39
+ var version = "5.0.0-beta.29";
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-TDUUHSGF.js";
4
- import "../chunk-EUMQAONX.js";
3
+ } from "../chunk-34VU2X7H.js";
4
+ import "../chunk-ZK7Q7XDV.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -44,6 +44,9 @@ var import_license2 = require("@eventcatalog/license");
44
44
  var TRIAL_LENGTH_DAYS = 60;
45
45
  var LICENSE_FAQ_URL = "https://www.eventcatalog.dev/license-faq";
46
46
  var LICENSE_RENEW_URL = "https://eventcatalog.cloud";
47
+ var BUY_BUSINESS_URL = "https://www.eventcatalog.dev/buy?source=cli";
48
+ var PRICING_URL = "https://www.eventcatalog.dev/pricing";
49
+ var FREE_USE_NOTE = "Under $10M revenue and $10M raised, an individual or an open-source project? You qualify for Free Use; get a free key at eventcatalog.cloud.";
47
50
  var DAY_IN_MS = 24 * 60 * 60 * 1e3;
48
51
  var getTrialStatus = (tsd, now = Date.now()) => {
49
52
  if (typeof tsd !== "number" || !Number.isFinite(tsd) || tsd <= 0) return;
@@ -162,15 +165,17 @@ var formatDate = (date) => date.toLocaleDateString(void 0, { dateStyle: "medium"
162
165
  var formatDays = (days) => `${days} ${days === 1 ? "day" : "days"}`;
163
166
  var PLAIN = { bold: (text) => text, dim: (text) => text, link: (text) => text };
164
167
  var COLOURS = { bold: import_picocolors.default.bold, dim: import_picocolors.default.dim, link: (text) => import_picocolors.default.cyan(text) };
165
- var render = ({ headline, rows, links }, colours) => {
168
+ var render = ({ headline, rows, links, note }, colours) => {
166
169
  const width = Math.max(0, ...[...rows, ...links].map(([label]) => label.length));
167
170
  const row = ([label, value]) => `${colours.dim(label.padEnd(width))} ${value}`;
168
171
  return [
169
172
  colours.bold(headline),
170
173
  ...rows.length ? ["", ...rows.map(row)] : [],
171
- ...links.length ? ["", ...links.map(([label, url]) => row([label, colours.link(url)]))] : []
174
+ ...links.length ? ["", ...links.map(([label, url]) => row([label, colours.link(url)]))] : [],
175
+ ...note?.length ? ["", ...note.map(colours.dim)] : []
172
176
  ].join("\n");
173
177
  };
178
+ var FREE_USE_LINES = FREE_USE_NOTE.split(/(?<=\?) /);
174
179
  var message = (content) => ({
175
180
  ...content,
176
181
  text: render(content, PLAIN)
@@ -217,7 +222,8 @@ var getLicenseStatusMessage = (license, tsd, now = Date.now()) => {
217
222
  color: trial.ended ? "yellow" : "green",
218
223
  headline: trial.ended ? "Your EventCatalog trial has ended" : `You're on the ${TRIAL_LENGTH_DAYS}-day EventCatalog trial`,
219
224
  rows: trialRows,
220
- links: trial.ended ? [["Get a license", LICENSE_RENEW_URL], licensing] : [licensing]
225
+ links: trial.ended ? [["Get a license", LICENSE_RENEW_URL], ["Buy Business", BUY_BUSINESS_URL], licensing] : [["Buy a license", PRICING_URL], licensing],
226
+ note: trial.ended ? FREE_USE_LINES : void 0
221
227
  });
222
228
  }
223
229
  if (license.state === "expired") {
@@ -231,7 +237,8 @@ var getLicenseStatusMessage = (license, tsd, now = Date.now()) => {
231
237
  title: "EventCatalog license",
232
238
  color: "yellow",
233
239
  headline: "Your commercial license has expired",
234
- rows: [...licensedTo, ...expiredOn, ...trialRows],
240
+ // A catalog has a license or is on the trial: an expired license is renewed, not replaced by the trial
241
+ rows: [...licensedTo, ...expiredOn],
235
242
  links: [renew, licensing]
236
243
  });
237
244
  }
@@ -17,8 +17,8 @@ declare const getLicenseAnalytics: (license?: LicenseStatus, tsd?: unknown) => {
17
17
  };
18
18
  type Row = [label: string, value: string];
19
19
  /**
20
- * What the license box says: a headline, the facts as aligned rows ("Licensed to acme"), and links on their own
21
- * rows, so it can be read at a glance. `text` is the box's content without colours.
20
+ * What the license box says: a headline, the facts as aligned rows ("Licensed to acme"), links on their own
21
+ * rows, and an optional note at the end, so it can be read at a glance. `text` is the box's content without colours.
22
22
  */
23
23
  type LicenseStatusMessage = {
24
24
  title: string;
@@ -26,6 +26,7 @@ type LicenseStatusMessage = {
26
26
  headline: string;
27
27
  rows: Row[];
28
28
  links: Row[];
29
+ note?: string[];
29
30
  text: string;
30
31
  };
31
32
  /**
@@ -17,8 +17,8 @@ declare const getLicenseAnalytics: (license?: LicenseStatus, tsd?: unknown) => {
17
17
  };
18
18
  type Row = [label: string, value: string];
19
19
  /**
20
- * What the license box says: a headline, the facts as aligned rows ("Licensed to acme"), and links on their own
21
- * rows, so it can be read at a glance. `text` is the box's content without colours.
20
+ * What the license box says: a headline, the facts as aligned rows ("Licensed to acme"), links on their own
21
+ * rows, and an optional note at the end, so it can be read at a glance. `text` is the box's content without colours.
22
22
  */
23
23
  type LicenseStatusMessage = {
24
24
  title: string;
@@ -26,6 +26,7 @@ type LicenseStatusMessage = {
26
26
  headline: string;
27
27
  rows: Row[];
28
28
  links: Row[];
29
+ note?: string[];
29
30
  text: string;
30
31
  };
31
32
  /**
@@ -3,7 +3,7 @@ import {
3
3
  getLicenseStatus,
4
4
  getLicenseStatusMessage,
5
5
  printLicenseStatus
6
- } from "../chunk-AWOO63ME.js";
6
+ } from "../chunk-AD7CL772.js";
7
7
  export {
8
8
  getLicenseAnalytics,
9
9
  getLicenseStatus,
@@ -12,7 +12,8 @@
12
12
  * CSS ships in the page head and survives ClientRouter navigations (see NodeGraph.astro).
13
13
  */
14
14
 
15
- import { useCallback, useState, lazy, Suspense } from 'react';
15
+ import { useCallback, useEffect, useState, lazy, Suspense } from 'react';
16
+ import { createPortal } from 'react-dom';
16
17
  import type { Node, Edge } from '@xyflow/react';
17
18
  import type { FlowGroupBy, OpenInStudioRequest } from '@eventcatalog/visualiser';
18
19
  import { buildUrl } from '@utils/url-builder';
@@ -27,6 +28,22 @@ const NodeGraph = lazy(() =>
27
28
  import('@eventcatalog/visualiser').then((module) => ({ default: module.NodeGraph }))
28
29
  ) as React.LazyExoticComponent<React.ComponentType<AstroNodeGraphProps & Record<string, unknown>>>;
29
30
 
31
+ /**
32
+ * "Loading graph..." in the box the graph is drawn into, while the visualiser loads. Not where this island sits: the
33
+ * graph is portalled from there, and on the homepage that's beside the page's content (top right).
34
+ */
35
+ const LoadingGraph = ({ portalId }: { portalId: string }) => {
36
+ const [container, setContainer] = useState<HTMLElement | null>(null);
37
+ useEffect(() => setContainer(document.getElementById(portalId)), [portalId]);
38
+ if (!container) return null;
39
+ return createPortal(
40
+ <div className="flex h-full min-h-[8rem] items-center justify-center text-sm text-[rgb(var(--ec-page-text-muted))]">
41
+ Loading graph...
42
+ </div>,
43
+ container
44
+ );
45
+ };
46
+
30
47
  interface AstroNodeGraphProps {
31
48
  id: string;
32
49
  nodes: Node[];
@@ -141,7 +158,7 @@ const AstroNodeGraph = ({ isDevMode = false, resourceKey, studioApiUrl, ...other
141
158
  );
142
159
 
143
160
  return (
144
- <Suspense fallback={<div>Loading graph...</div>}>
161
+ <Suspense fallback={<LoadingGraph portalId={otherProps.portalId || `${otherProps.id}-portal`} />}>
145
162
  <NodeGraph
146
163
  {...otherProps}
147
164
  resourceKey={resourceKey}
@@ -64,53 +64,58 @@ export const AssistantSettingsForm = ({ canEdit, initial, chatAvailable, inSSR,
64
64
  };
65
65
 
66
66
  return (
67
- <form onSubmit={(e) => e.preventDefault()} className="divide-y divide-[rgb(var(--ec-page-border))]">
67
+ <>
68
68
  <Toaster richColors closeButton position="bottom-right" theme="system" />
69
- {!canEdit && (
70
- <div className="pb-6">
71
- <ReadOnlyBanner />
72
- </div>
73
- )}
74
-
75
- <Row
76
- title="Assistant Agent"
77
- description="Assistant agent that answers questions about your architecture directly in your catalog."
78
- canEdit={canEdit}
79
- dirty={dirty}
80
- saving={saving}
81
- onSave={save}
69
+ <form
70
+ onSubmit={(e) => e.preventDefault()}
71
+ className="divide-y divide-[rgb(var(--ec-page-border))] border-t border-[rgb(var(--ec-page-border))]"
82
72
  >
83
- <div className="space-y-3">
84
- <ToggleRow
85
- icon={<MessageSquare className="h-4 w-4" aria-hidden />}
86
- label={chatEnabled ? 'Enabled' : 'Disabled'}
87
- hint={
88
- chatEnabled
89
- ? 'Event Catalog Assistant is visible in this catalog.'
90
- : 'Event Catalog Assistant is hidden from this catalog.'
91
- }
92
- checked={chatEnabled}
93
- disabled={!canEdit}
94
- onChange={setChatEnabled}
95
- />
96
- {chatEnabled &&
97
- (chatAvailable ? (
98
- <ConfigurationRequired />
99
- ) : !inSSR ? (
100
- <AssistantNeedsSSR />
101
- ) : !hasChatConfigFile ? (
102
- <AssistantNeedsConfigFile />
103
- ) : null)}
104
- </div>
105
- </Row>
106
- </form>
73
+ {!canEdit && (
74
+ <div className="pb-6">
75
+ <ReadOnlyBanner />
76
+ </div>
77
+ )}
78
+
79
+ <Row
80
+ title="Assistant Agent"
81
+ description="Assistant agent that answers questions about your architecture directly in your catalog."
82
+ canEdit={canEdit}
83
+ dirty={dirty}
84
+ saving={saving}
85
+ onSave={save}
86
+ >
87
+ <div className="space-y-3">
88
+ <ToggleRow
89
+ icon={<MessageSquare className="h-4 w-4" aria-hidden />}
90
+ label={chatEnabled ? 'Enabled' : 'Disabled'}
91
+ hint={
92
+ chatEnabled
93
+ ? 'Event Catalog Assistant is visible in this catalog.'
94
+ : 'Event Catalog Assistant is hidden from this catalog.'
95
+ }
96
+ checked={chatEnabled}
97
+ disabled={!canEdit}
98
+ onChange={setChatEnabled}
99
+ />
100
+ {chatEnabled &&
101
+ (chatAvailable ? (
102
+ <ConfigurationRequired />
103
+ ) : !inSSR ? (
104
+ <AssistantNeedsSSR />
105
+ ) : !hasChatConfigFile ? (
106
+ <AssistantNeedsConfigFile />
107
+ ) : null)}
108
+ </div>
109
+ </Row>
110
+ </form>
111
+ </>
107
112
  );
108
113
  };
109
114
 
110
115
  const ConfigurationRequired = () => (
111
- <div className="rounded-lg border border-[rgb(var(--ec-accent)/0.4)] bg-[rgb(var(--ec-accent)/0.06)] px-4 py-3">
116
+ <div className="rounded-lg border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-text)/0.03)] px-4 py-3">
112
117
  <div className="flex items-start gap-3">
113
- <span className="flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md border border-[rgb(var(--ec-accent)/0.4)] bg-[rgb(var(--ec-accent)/0.1)] text-[rgb(var(--ec-accent))]">
118
+ <span className="flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-text)/0.05)] text-[rgb(var(--ec-page-text))]">
114
119
  <Wrench className="h-3.5 w-3.5" aria-hidden />
115
120
  </span>
116
121
  <div className="flex-1 min-w-0">
@@ -125,7 +130,7 @@ const ConfigurationRequired = () => (
125
130
  target="_blank"
126
131
  rel="noreferrer"
127
132
  className={cn(
128
- 'mt-2 inline-flex items-center gap-1 text-[12px] font-medium text-[rgb(var(--ec-accent))] hover:underline'
133
+ 'mt-2 inline-flex items-center gap-1 text-[12px] font-medium text-[rgb(var(--ec-page-text))] hover:underline'
129
134
  )}
130
135
  >
131
136
  Configure the Agent
@@ -137,15 +142,15 @@ const ConfigurationRequired = () => (
137
142
  );
138
143
 
139
144
  const AssistantNeedsSSR = () => (
140
- <div className="overflow-hidden rounded-lg border border-[rgb(var(--ec-accent)/0.4)] bg-gradient-to-br from-[rgb(var(--ec-accent)/0.1)] via-[rgb(var(--ec-accent)/0.05)] to-transparent">
145
+ <div className="overflow-hidden rounded-lg border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-text)/0.03)]">
141
146
  <div className="flex items-start gap-3 px-4 py-3.5">
142
- <span className="flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border border-[rgb(var(--ec-accent)/0.4)] bg-[rgb(var(--ec-accent)/0.1)] text-[rgb(var(--ec-accent))]">
147
+ <span className="flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-text)/0.05)] text-[rgb(var(--ec-page-text))]">
143
148
  <ServerCog className="h-4 w-4" aria-hidden />
144
149
  </span>
145
150
  <div className="flex-1 min-w-0">
146
151
  <div className="flex items-center gap-2">
147
152
  <p className="text-[13px] font-semibold text-[rgb(var(--ec-page-text))]">Server output mode required</p>
148
- <span className="inline-flex items-center gap-1 rounded-full border border-[rgb(var(--ec-accent)/0.4)] bg-[rgb(var(--ec-accent)/0.1)] px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-[rgb(var(--ec-accent))]">
153
+ <span className="inline-flex items-center gap-1 rounded-full border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-text)/0.05)] px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-[rgb(var(--ec-page-text))]">
149
154
  SSR
150
155
  </span>
151
156
  </div>
@@ -157,7 +162,7 @@ const AssistantNeedsSSR = () => (
157
162
  href={ASSISTANT_CONFIGURATION_DOCS_URL}
158
163
  target="_blank"
159
164
  rel="noreferrer"
160
- className="inline-flex items-center gap-1 rounded-md bg-[rgb(var(--ec-accent))] px-3 py-1.5 text-[12px] font-semibold text-white shadow-sm transition-colors hover:bg-[rgb(var(--ec-accent-hover))]"
165
+ className="inline-flex items-center gap-1 rounded-md bg-[rgb(var(--ec-page-text))] px-3 py-1.5 text-[12px] font-semibold text-[rgb(var(--ec-page-bg))] shadow-sm transition-colors hover:opacity-85"
161
166
  >
162
167
  Configuration guide
163
168
  <ExternalLink className="h-3 w-3" aria-hidden />
@@ -178,9 +183,9 @@ const AssistantNeedsSSR = () => (
178
183
  );
179
184
 
180
185
  const AssistantNeedsConfigFile = () => (
181
- <div className="overflow-hidden rounded-lg border border-[rgb(var(--ec-accent)/0.4)] bg-gradient-to-br from-[rgb(var(--ec-accent)/0.1)] via-[rgb(var(--ec-accent)/0.05)] to-transparent">
186
+ <div className="overflow-hidden rounded-lg border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-text)/0.03)]">
182
187
  <div className="flex items-start gap-3 px-4 py-3.5">
183
- <span className="flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border border-[rgb(var(--ec-accent)/0.4)] bg-[rgb(var(--ec-accent)/0.1)] text-[rgb(var(--ec-accent))]">
188
+ <span className="flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-text)/0.05)] text-[rgb(var(--ec-page-text))]">
184
189
  <Wrench className="h-4 w-4" aria-hidden />
185
190
  </span>
186
191
  <div className="flex-1 min-w-0">
@@ -195,7 +200,7 @@ const AssistantNeedsConfigFile = () => (
195
200
  href={ASSISTANT_CONFIGURATION_DOCS_URL}
196
201
  target="_blank"
197
202
  rel="noreferrer"
198
- className="inline-flex items-center gap-1 rounded-md bg-[rgb(var(--ec-accent))] px-3 py-1.5 text-[12px] font-semibold text-white shadow-sm transition-colors hover:bg-[rgb(var(--ec-accent-hover))]"
203
+ className="inline-flex items-center gap-1 rounded-md bg-[rgb(var(--ec-page-text))] px-3 py-1.5 text-[12px] font-semibold text-[rgb(var(--ec-page-bg))] shadow-sm transition-colors hover:opacity-85"
199
204
  >
200
205
  Configuration guide
201
206
  <ExternalLink className="h-3 w-3" aria-hidden />