@eventcatalog/core 2.31.3 → 2.31.4

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.
@@ -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 = "2.31.3";
40
+ var version = "2.31.4";
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-34ONBQTK.js";
4
- import "../chunk-4EXYGKM6.js";
3
+ } from "../chunk-W5HUNIMM.js";
4
+ import "../chunk-H5QIDJHP.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 = "2.31.3";
109
+ var version = "2.31.4";
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-KYLVZEB2.js";
4
- import "../chunk-34ONBQTK.js";
5
- import "../chunk-4EXYGKM6.js";
3
+ } from "../chunk-C3M26NRD.js";
4
+ import "../chunk-W5HUNIMM.js";
5
+ import "../chunk-H5QIDJHP.js";
6
6
  import "../chunk-E7TXTI7G.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-34ONBQTK.js";
3
+ } from "./chunk-W5HUNIMM.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.31.3";
2
+ var version = "2.31.4";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-4EXYGKM6.js";
3
+ } from "./chunk-H5QIDJHP.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 = "2.31.3";
28
+ var version = "2.31.4";
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-4EXYGKM6.js";
3
+ } from "./chunk-H5QIDJHP.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -157,7 +157,7 @@ var import_axios = __toESM(require("axios"), 1);
157
157
  var import_os = __toESM(require("os"), 1);
158
158
 
159
159
  // package.json
160
- var version = "2.31.3";
160
+ var version = "2.31.4";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-UKJ7F5WR.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-KYLVZEB2.js";
10
- import "./chunk-34ONBQTK.js";
9
+ } from "./chunk-C3M26NRD.js";
10
+ import "./chunk-W5HUNIMM.js";
11
11
  import {
12
12
  catalogToAstro,
13
13
  checkAndConvertMdToMdx
14
14
  } from "./chunk-7SI5EVOX.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-4EXYGKM6.js";
17
+ } from "./chunk-H5QIDJHP.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogProEnabled
@@ -223,7 +223,7 @@ const badges = doc?.badges || [];
223
223
  let observerPaused = false;
224
224
 
225
225
  // Function to highlight a TOC item
226
- function highlightTocItem(id) {
226
+ function highlightTocItem(id: string) {
227
227
  // Remove active class from all links
228
228
  document.querySelectorAll('.active-toc-item').forEach((link) => {
229
229
  link.classList.remove('active-toc-item', 'text-purple-600', 'font-light');
@@ -268,126 +268,13 @@ const pagefindAttributes =
268
268
  if (document.getElementsByClassName('mermaid').length > 0) {
269
269
  renderDiagrams(graphs);
270
270
  }
271
-
272
- // Set up TOC highlighting and scrolling
273
- setupTOCHighlighting();
274
271
  });
275
272
 
276
- /**
277
- * Setup TOC highlighting and scrolling
278
- */
279
- function setupTOCHighlighting() {
280
- // Check if there's a sidebar with navigation
281
- const sidebarNav = document.querySelector('aside nav');
282
- if (!sidebarNav) return;
283
-
284
- const observerOptions = {
285
- rootMargin: '0px 0px -40% 0px',
286
- threshold: 0.1,
287
- };
288
-
289
- // Flag to temporarily disable observer after click
290
- let observerPaused = false;
291
-
292
- /**
293
- * Highlights a TOC item and scrolls it into view
294
- * @param {string} id - The ID of the heading to highlight in the TOC
295
- */
296
- function highlightTocItem(id) {
297
- // Remove active class from all links
298
- document.querySelectorAll('.active-toc-item').forEach((link) => {
299
- link.classList.remove('active-toc-item', 'text-primary-600', 'font-medium');
300
- link.classList.add('text-gray-400');
301
- });
302
-
303
- // Add active class to current link
304
- const tocLink = document.querySelector(`aside nav a[href="#${id}"]`);
305
- if (tocLink) {
306
- tocLink.classList.add('active-toc-item', 'text-primary-600', 'font-medium');
307
- tocLink.classList.remove('text-gray-400');
308
-
309
- // Scroll the highlighted item into view with a small delay to ensure DOM updates first
310
- setTimeout(() => {
311
- tocLink.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
312
- }, 10);
313
- }
314
- }
315
-
316
- // Set up the intersection observer for scrolling
317
- const observer = new IntersectionObserver((entries) => {
318
- // If observer is paused, don't process entries
319
- if (observerPaused) return;
320
-
321
- entries.forEach((entry) => {
322
- try {
323
- const id = entry.target.getAttribute('id');
324
- if (entry.isIntersecting && id) {
325
- highlightTocItem(id);
326
- }
327
- } catch (entryError) {
328
- console.error('Error processing intersection entry:', entryError);
329
- }
330
- });
331
- }, observerOptions);
332
-
333
- // Find all headings in the content area
334
- const prose = document.querySelector('.prose');
335
- if (!prose) return;
336
-
337
- // First try to find headings with IDs
338
- const headings = prose.querySelectorAll('h1[id], h2[id], h3[id]');
339
-
340
- if (headings.length > 0) {
341
- headings.forEach((heading) => {
342
- observer.observe(heading);
343
- });
344
- } else {
345
- // Fallback: If no headings with IDs found, attach IDs to them
346
- const allHeadings = prose.querySelectorAll('h1, h2, h3');
347
-
348
- allHeadings.forEach((heading) => {
349
- // Only add ID if it doesn't exist
350
- if (!heading.id) {
351
- const text = heading.textContent || '';
352
- const slug = text
353
- .toLowerCase()
354
- .replace(/[^\w\s-]/g, '')
355
- .replace(/\s+/g, '-');
356
- heading.id = slug;
357
- }
358
- observer.observe(heading);
359
- });
360
- }
361
-
362
- // Add click event listeners to all TOC links
363
- const tocLinks = document.querySelectorAll('aside nav a[href^="#"]');
364
- tocLinks.forEach((link) => {
365
- link.addEventListener('click', (e) => {
366
- // Get the ID from the href attribute
367
- const hrefAttr = link.getAttribute('href');
368
- if (!hrefAttr) return;
369
-
370
- const id = hrefAttr.substring(1);
371
-
372
- // Highlight the clicked item
373
- highlightTocItem(id);
374
-
375
- // Temporarily pause the observer to prevent immediate highlighting changes
376
- observerPaused = true;
377
-
378
- // Resume the observer after a delay
379
- setTimeout(() => {
380
- observerPaused = false;
381
- }, 500);
382
- });
383
- });
384
- }
385
-
386
273
  /**
387
274
  * Renders mermaid diagrams in the page
388
275
  * @param {HTMLCollectionOf<HTMLElement>} graphs - The collection of mermaid graph elements
389
276
  */
390
- async function renderDiagrams(graphs) {
277
+ async function renderDiagrams(graphs: any) {
391
278
  const { default: mermaid } = await import('mermaid');
392
279
 
393
280
  if (window.eventcatalog.mermaid) {
@@ -395,7 +282,7 @@ const pagefindAttributes =
395
282
  const { iconPacks = [] } = window.eventcatalog.mermaid ?? {};
396
283
 
397
284
  if (iconPacks.length > 0) {
398
- const iconPacksToRegister = iconPacks.map((name) => {
285
+ const iconPacksToRegister = iconPacks.map((name: any) => {
399
286
  return {
400
287
  name,
401
288
  icons,
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.31.3",
9
+ "version": "2.31.4",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },