@eventcatalog/core 2.33.3 → 2.33.5

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.33.3";
40
+ var version = "2.33.5";
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-5QUF2S7L.js";
4
- import "../chunk-557OECV4.js";
3
+ } from "../chunk-3H3JI5WP.js";
4
+ import "../chunk-AECMEWQ4.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.33.3";
109
+ var version = "2.33.5";
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-5TXSONUY.js";
4
- import "../chunk-5QUF2S7L.js";
5
- import "../chunk-557OECV4.js";
3
+ } from "../chunk-QUTVOUHZ.js";
4
+ import "../chunk-3H3JI5WP.js";
5
+ import "../chunk-AECMEWQ4.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
  VERSION
3
- } from "./chunk-557OECV4.js";
3
+ } from "./chunk-AECMEWQ4.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.33.3";
2
+ var version = "2.33.5";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-5QUF2S7L.js";
3
+ } from "./chunk-3H3JI5WP.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.33.3";
28
+ var version = "2.33.5";
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-557OECV4.js";
3
+ } from "./chunk-AECMEWQ4.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.33.3";
160
+ var version = "2.33.5";
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-5TXSONUY.js";
10
- import "./chunk-5QUF2S7L.js";
9
+ } from "./chunk-QUTVOUHZ.js";
10
+ import "./chunk-3H3JI5WP.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-557OECV4.js";
17
+ } from "./chunk-AECMEWQ4.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogScaleEnabled,
@@ -0,0 +1,87 @@
1
+ ---
2
+ import Admonition from '@components/MDX/Admonition';
3
+ import { buildUrl, buildUrlWithParams } from '@utils/url-builder';
4
+ import type { CollectionEntry } from 'astro:content';
5
+ import { ExpandIcon } from 'lucide-react';
6
+
7
+ interface Props {
8
+ title?: string;
9
+ height: string;
10
+ boardId: string;
11
+ autoplay: boolean;
12
+ moveToViewport: string;
13
+ moveToWidget: string;
14
+ edit: boolean;
15
+ }
16
+
17
+ const {
18
+ title,
19
+ height = '500',
20
+ boardId,
21
+ autoplay = true,
22
+ edit = false,
23
+ moveToViewport,
24
+ moveToWidget,
25
+ ...eventCatalogResource
26
+ } = Astro.props;
27
+
28
+ const resource = eventCatalogResource as CollectionEntry<'services'>;
29
+
30
+ const baseUrl = 'https://miro.com/app/live-embed';
31
+ const params = {
32
+ autoplay: autoplay ? 'true' : 'false',
33
+ embedMode: !edit ? 'view_only_without_ui' : undefined,
34
+ moveToViewport: moveToViewport || undefined,
35
+ moveToWidget: moveToWidget || undefined,
36
+ };
37
+
38
+ const backUrl = buildUrl(`/docs/${resource.collection}/${resource.data.id}/${resource.data.version}#${title}-miro-title`);
39
+
40
+ const fullScreenParams = {
41
+ ...params,
42
+ boardId: boardId,
43
+ title: title,
44
+ back: backUrl,
45
+ };
46
+
47
+ const url = new URL(`${baseUrl}/${boardId}`);
48
+ Object.entries(params).forEach(([key, value]) => {
49
+ if (value !== undefined) {
50
+ url.searchParams.set(key, value);
51
+ }
52
+ });
53
+
54
+ const openFullScreenUrl = buildUrlWithParams(`/miro`, fullScreenParams);
55
+ ---
56
+
57
+ {
58
+ !boardId && (
59
+ <Admonition type="warning">
60
+ <div>
61
+ <span class="block font-bold">{`<Miro/>`} failed to load</span>
62
+ <span class="block">Please provide a boardId to use the Miro component.</span>
63
+ </div>
64
+ </Admonition>
65
+ )
66
+ }
67
+
68
+ {
69
+ boardId && (
70
+ <div>
71
+ {title && (
72
+ <h3 id={`${title}-miro-title`} class="text-3xl font-bold">
73
+ {title}
74
+ </h3>
75
+ )}
76
+ <div class="relative">
77
+ <iframe class="border border-gray-200 rounded-md" src={url.href} width="100%" height={height} />
78
+ <a
79
+ href={openFullScreenUrl}
80
+ class="absolute bottom-[15px] right-5 bg-white border border-gray-300 text-gray-700 hover:bg-gray-50 px-4 py-2 rounded-md transition-colors"
81
+ >
82
+ <ExpandIcon className="w-5 h-5" />
83
+ </a>
84
+ </div>
85
+ </div>
86
+ )
87
+ }
@@ -189,8 +189,10 @@ const NodeGraphBuilder = ({
189
189
  }, [animateMessages]);
190
190
 
191
191
  useEffect(() => {
192
- fitView({ duration: 800 });
193
- }, [nodes, edges]);
192
+ setTimeout(() => {
193
+ fitView({ duration: 800 });
194
+ }, 150);
195
+ }, []);
194
196
 
195
197
  const handlePaneClick = useCallback(() => {
196
198
  setIsSettingsOpen(false);
@@ -18,6 +18,7 @@ import Tabs from '@components/MDX/Tabs/Tabs.astro';
18
18
  import TabItem from '@components/MDX/Tabs/TabItem.astro';
19
19
  import ResourceLink from '@components/MDX/ResourceLink/ResourceLink.astro';
20
20
  import Link from '@components/MDX/Link/Link.astro';
21
+ import Miro from '@components/MDX/Miro/Miro.astro';
21
22
  // Portals: required for server/client components
22
23
  import NodeGraphPortal from '@components/MDX/NodeGraph/NodeGraphPortal';
23
24
  import SchemaViewerPortal from '@components/MDX/SchemaViewer/SchemaViewerPortal';
@@ -46,6 +47,7 @@ const components = (props: any) => {
46
47
  Tabs,
47
48
  Tile,
48
49
  Tiles,
50
+ Miro: (mdxProp: any) => jsx(Miro, { ...props, ...mdxProp }),
49
51
  };
50
52
  };
51
53
 
@@ -14,7 +14,7 @@ export const projectDirBase = (() => {
14
14
 
15
15
  const pages = defineCollection({
16
16
  loader: glob({
17
- pattern: ['**/pages/*.(md|mdx)'],
17
+ pattern: ['**/pages/*.(md|mdx)', '!**/node_modules/**'],
18
18
  base: projectDirBase,
19
19
  }),
20
20
  schema: z
@@ -43,7 +43,7 @@ const resourcePointer = z.object({
43
43
 
44
44
  const changelogs = defineCollection({
45
45
  loader: glob({
46
- pattern: ['**/changelog.(md|mdx)'],
46
+ pattern: ['**/changelog.(md|mdx)', '!**/node_modules/**'],
47
47
  base: projectDirBase,
48
48
  }),
49
49
  schema: z.object({
@@ -133,7 +133,7 @@ const flowStep = z
133
133
 
134
134
  const flows = defineCollection({
135
135
  loader: glob({
136
- pattern: ['**/flows/*/index.(md|mdx)', '**/flows/*/versioned/*/index.(md|mdx)'],
136
+ pattern: ['**/flows/*/index.(md|mdx)', '**/flows/*/versioned/*/index.(md|mdx)', '!**/node_modules/**'],
137
137
  base: projectDirBase,
138
138
  generateId: ({ data }) => {
139
139
  return `${data.id}-${data.version}`;
@@ -203,7 +203,7 @@ const flows = defineCollection({
203
203
 
204
204
  const events = defineCollection({
205
205
  loader: glob({
206
- pattern: ['**/events/*/index.(md|mdx)', '**/events/*/versioned/*/index.(md|mdx)'],
206
+ pattern: ['**/events/*/index.(md|mdx)', '**/events/*/versioned/*/index.(md|mdx)', '!**/node_modules/**'],
207
207
  base: projectDirBase,
208
208
  generateId: ({ data, ...rest }) => {
209
209
  return `${data.id}-${data.version}`;
@@ -222,7 +222,7 @@ const events = defineCollection({
222
222
 
223
223
  const commands = defineCollection({
224
224
  loader: glob({
225
- pattern: ['**/commands/*/index.(md|mdx)', '**/commands/*/versioned/*/index.(md|mdx)'],
225
+ pattern: ['**/commands/*/index.(md|mdx)', '**/commands/*/versioned/*/index.(md|mdx)', '!**/node_modules/**'],
226
226
  base: projectDirBase,
227
227
  generateId: ({ data }) => {
228
228
  return `${data.id}-${data.version}`;
@@ -241,7 +241,7 @@ const commands = defineCollection({
241
241
 
242
242
  const queries = defineCollection({
243
243
  loader: glob({
244
- pattern: ['**/queries/*/index.(md|mdx)', '**/queries/*/versioned/*/index.(md|mdx)'],
244
+ pattern: ['**/queries/*/index.(md|mdx)', '**/queries/*/versioned/*/index.(md|mdx)', '!**/node_modules/**'],
245
245
  base: projectDirBase,
246
246
  generateId: ({ data }) => {
247
247
  return `${data.id}-${data.version}`;
@@ -309,7 +309,7 @@ const domains = defineCollection({
309
309
 
310
310
  const channels = defineCollection({
311
311
  loader: glob({
312
- pattern: ['**/channels/*/index.(md|mdx)', '**/channels/*/versioned/*/index.(md|mdx)'],
312
+ pattern: ['**/channels/*/index.(md|mdx)', '**/channels/*/versioned/*/index.(md|mdx)', '!**/node_modules/**'],
313
313
  base: projectDirBase,
314
314
  generateId: ({ data }) => {
315
315
  return `${data.id}-${data.version}`;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { buildUrl } from '@utils/url-builder';
3
3
  import type { SidebarItem } from '../types';
4
+ import { ExternalLinkIcon } from 'lucide-react';
4
5
 
5
6
  interface NestedItemProps {
6
7
  item: SidebarItem;
@@ -89,16 +90,45 @@ const NestedItem: React.FC<NestedItemProps> = ({
89
90
  );
90
91
  }
91
92
 
92
- const itemPath = item.slug ? buildUrl(`/docs/custom/${item.slug}`) : '#';
93
+ let itemPath = item.slug ? buildUrl(`/docs/custom/${item.slug}`) : '#';
93
94
  const isActive = currentPath === itemPath || currentPath.endsWith(`/${item.slug}`);
94
95
 
96
+ // Convert string style to React CSSProperties if needed
97
+ const attrs = item.attrs
98
+ ? {
99
+ ...item.attrs,
100
+ style:
101
+ typeof item.attrs.style === 'string'
102
+ ? item.attrs.style
103
+ .split(';')
104
+ .filter((style) => style.trim())
105
+ .reduce((acc, style) => {
106
+ const [key, value] = style.split(':').map((s) => s.trim());
107
+ const camelKey = key.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
108
+ return { ...acc, [camelKey]: value };
109
+ }, {})
110
+ : item.attrs.style,
111
+ }
112
+ : null;
113
+
114
+ const isExternalLink = item.slug?.startsWith('http');
115
+
116
+ if (isExternalLink && item.slug) {
117
+ itemPath = item.slug;
118
+ }
119
+
95
120
  return (
96
121
  <a
97
122
  href={itemPath}
123
+ {...(attrs || {})}
98
124
  className={`flex items-center px-2 py-1.5 text-xs ${isActive ? 'bg-purple-100 text-purple-900 font-medium' : 'text-gray-600 hover:bg-purple-100'} rounded-md`}
99
125
  data-active={isActive}
126
+ target={isExternalLink ? '_blank' : undefined}
100
127
  >
101
- <span className="truncate">{item.label}</span>
128
+ <span className="truncate flex items-center gap-1.5">
129
+ {item.label}
130
+ {isExternalLink && <ExternalLinkIcon className="w-3 -mt-0.5 h-3" />}
131
+ </span>
102
132
  {item.badge && item?.badge?.text && (
103
133
  <span
104
134
  className={`text-${item.badge.color || 'purple'}-600 ml-2 text-[10px] font-medium bg-${item.badge.color || 'purple'}-50 px-2 py-0.5 rounded uppercase`}
@@ -1,6 +1,8 @@
1
1
  export interface SidebarItem {
2
2
  label: string;
3
3
  slug?: string;
4
+ link?: string;
5
+ attrs?: Record<string, string>;
4
6
  items?: SidebarItem[];
5
7
  badge?: {
6
8
  text: string;
@@ -1,4 +1,3 @@
1
- // import { getCollection } from "astro:content";
2
1
  import config from '@config';
3
2
  import fs from 'node:fs';
4
3
  import path from 'node:path';
@@ -16,6 +15,8 @@ type SidebarItem = {
16
15
  items?: SidebarItem[];
17
16
  badge?: Badge;
18
17
  collapsed?: boolean;
18
+ link?: string;
19
+ attrs?: Record<string, string>;
19
20
  };
20
21
 
21
22
  type SideBarConfigurationItem = {
@@ -28,6 +29,8 @@ type SideBarConfigurationItem = {
28
29
  };
29
30
  badge?: Badge;
30
31
  collapsed?: boolean;
32
+ link?: string;
33
+ attrs?: Record<string, string>;
31
34
  };
32
35
 
33
36
  type AdjacentPage = {
@@ -52,39 +55,45 @@ const processAutoGeneratedDirectory = async (
52
55
  collapsed?: boolean
53
56
  ): Promise<SidebarItem> => {
54
57
  // @ts-ignore
55
- const files = fs.readdirSync(path.join(process.env.PROJECT_DIR || '', DOCS_DIR, directory));
56
-
57
- // Convert files to frontmatter
58
- const docsWithFrontmatter = files.map((file) => {
59
- // @ts-ignore
60
- const content = fs.readFileSync(path.join(process.env.PROJECT_DIR || '', DOCS_DIR, directory, file), 'utf8');
61
- const { data } = matter(content);
62
- return { ...data, file };
63
- });
64
-
65
- // If user defined slug use it, otherwise use the file
66
- const astroIdsForFiles = docsWithFrontmatter.map(
67
- (doc: any) => doc.slug || path.join(DOCS_DIR, directory, doc.file).replace('.mdx', '')
68
- );
58
+ const items = fs.readdirSync(path.join(process.env.PROJECT_DIR || '', DOCS_DIR, directory));
69
59
 
70
- const entries = await Promise.all(
71
- astroIdsForFiles.map(async (astroId) => {
72
- const entry = await getEntry('customPages', astroId);
73
- return entry;
74
- })
75
- );
60
+ const allItems: SidebarItem[] = [];
76
61
 
77
- // Filter anything we haven't found
78
- const filteredEntries = entries.filter((entry) => entry !== undefined);
62
+ for (const item of items) {
63
+ const fullPath = path.join(process.env.PROJECT_DIR || '', DOCS_DIR, directory, item);
64
+ const isDirectory = fs.statSync(fullPath).isDirectory();
65
+
66
+ if (isDirectory) {
67
+ // Recursively process subdirectory
68
+ const subdirResult = await processAutoGeneratedDirectory(
69
+ path.join(directory, item),
70
+ item, // Use directory name as label
71
+ undefined, // No badge for subdirectories
72
+ collapsed // Inherit collapsed state
73
+ );
74
+ allItems.push(subdirResult);
75
+ } else {
76
+ // Process file
77
+ const content = fs.readFileSync(fullPath, 'utf8');
78
+ const { data } = matter(content);
79
+
80
+ const astroId = data.slug || path.join(DOCS_DIR, directory, item).replace('.mdx', '');
81
+ const entry = await getEntry('customPages', astroId.toLowerCase());
82
+
83
+ if (entry) {
84
+ allItems.push({
85
+ label: entry.data.title,
86
+ slug: entry.data.slug || entry.id.replace(DOCS_DIR, ''),
87
+ });
88
+ }
89
+ }
90
+ }
79
91
 
80
92
  return {
81
93
  label,
82
94
  badge,
83
95
  collapsed,
84
- items: filteredEntries.map((entry) => ({
85
- label: entry?.data?.title,
86
- slug: entry?.data?.slug || entry?.id.replace(DOCS_DIR, ''),
87
- })),
96
+ items: allItems,
88
97
  };
89
98
  };
90
99
 
@@ -118,7 +127,16 @@ const processSidebarItems = async (items: SideBarConfigurationItem[]): Promise<S
118
127
  }
119
128
  // Otherwise, it's a regular item
120
129
  else {
121
- processedItems.push(item as SidebarItem);
130
+ // if its a link, add it to the processedItems
131
+ if (item.link) {
132
+ processedItems.push({
133
+ label: item.label,
134
+ slug: item.link,
135
+ attrs: item.attrs,
136
+ });
137
+ } else {
138
+ processedItems.push(item as SidebarItem);
139
+ }
122
140
  }
123
141
  }
124
142
 
@@ -13,6 +13,7 @@ import {
13
13
  } from '@heroicons/react/24/outline';
14
14
  import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
15
15
  import { render, getEntry } from 'astro:content';
16
+ import mdxComponents from '@components/MDX/components';
16
17
  import 'diff2html/bundles/css/diff2html.min.css';
17
18
 
18
19
  import { buildUrl } from '@utils/url-builder';
@@ -226,7 +227,7 @@ const pages = [
226
227
  </div>
227
228
  )}
228
229
  <div class="prose prose-md !max-w-none py-2">
229
- <log.Content />
230
+ <log.Content components={mdxComponents(props)} />
230
231
  </div>
231
232
  {log.diffs && log.diffs.map((diff) => <div id="diff-container" set:html={diff} />)}
232
233
  </div>
@@ -0,0 +1,121 @@
1
+ ---
2
+ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
3
+ import { ClientRouter } from 'astro:transitions';
4
+ ---
5
+
6
+ <VerticalSideBarLayout title="Miro">
7
+ <div class="h-[calc(100vh-80px)] bg-white p-3">
8
+ <div class="flex items-center justify-between mb-4">
9
+ <h1 id="boardTitle" class="text-2xl font-bold">Miro Board</h1>
10
+ <div class="flex items-center gap-3">
11
+ <button
12
+ id="backButton"
13
+ class="hidden items-center gap-2 bg-white border border-gray-300 text-gray-700 hover:bg-gray-50 px-4 py-2 rounded-md transition-colors"
14
+ >
15
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
16
+ <path
17
+ fill-rule="evenodd"
18
+ d="M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L4.414 9H17a1 1 0 110 2H4.414l5.293 5.293a1 1 0 010 1.414z"
19
+ clip-rule="evenodd"></path>
20
+ </svg>
21
+ <span>Back</span>
22
+ </button>
23
+ <button id="toggleEditButton" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md transition-colors">
24
+ Enable Editing
25
+ </button>
26
+ </div>
27
+ </div>
28
+ <div class="w-full bg-gray-100 h-[calc(100%-4rem)]">
29
+ <iframe class="w-full h-full border border-gray-200 rounded-md"></iframe>
30
+ </div>
31
+ </div>
32
+ </VerticalSideBarLayout>
33
+
34
+ <ClientRouter />
35
+ <script>
36
+ function configureMiro() {
37
+ // Get url from query params and then embed into the iframe
38
+ const url = new URL(window.location.href);
39
+ const boardId = url.searchParams.get('boardId');
40
+ const moveToViewport = url.searchParams.get('moveToViewport');
41
+ const moveToWidget = url.searchParams.get('moveToWidget');
42
+ const autoplay = url.searchParams.get('autoplay');
43
+ const edit = url.searchParams.get('edit');
44
+ const title = url.searchParams.get('title') || 'Miro Board';
45
+ const backUrl = url.searchParams.get('back');
46
+
47
+ // Configure back button if back URL is provided
48
+ const backButton = document.querySelector('#backButton');
49
+ if (backButton && backUrl) {
50
+ backButton.classList.remove('hidden');
51
+ backButton.classList.add('flex');
52
+ backButton.addEventListener('click', () => {
53
+ window.location.href = `${decodeURIComponent(backUrl)}#${title}-miro-title`;
54
+ });
55
+ }
56
+
57
+ // Update the board title
58
+ const boardTitleElement = document.querySelector('#boardTitle');
59
+ if (boardTitleElement) {
60
+ boardTitleElement.textContent = title;
61
+ }
62
+
63
+ // Create base Miro URL
64
+ const miroBaseUrl = `https://miro.com/app/live-embed/${boardId}`;
65
+ const miroUrlParams = new URLSearchParams({
66
+ autoplay: autoplay ? 'true' : 'false',
67
+ });
68
+
69
+ // Add optional parameters
70
+ if (!edit) {
71
+ miroUrlParams.set('embedMode', 'view_only_without_ui');
72
+ }
73
+
74
+ if (moveToViewport) {
75
+ miroUrlParams.set('moveToViewport', moveToViewport);
76
+ }
77
+
78
+ if (moveToWidget) {
79
+ miroUrlParams.set('moveToWidget', moveToWidget);
80
+ }
81
+
82
+ const miroUrl = `${miroBaseUrl}?${miroUrlParams.toString()}`;
83
+
84
+ const iframe = document.querySelector('iframe');
85
+ if (iframe) {
86
+ iframe.src = miroUrl;
87
+ iframe.width = '100%';
88
+ iframe.height = '100%';
89
+ }
90
+
91
+ // Configure toggle edit button
92
+ const toggleEditButton = document.querySelector('#toggleEditButton');
93
+ if (toggleEditButton) {
94
+ // Update button text and style based on current mode
95
+ if (edit === 'true') {
96
+ toggleEditButton.textContent = 'Switch to Read only';
97
+ toggleEditButton.classList.remove('bg-blue-500', 'hover:bg-blue-600');
98
+ toggleEditButton.classList.add('bg-gray-500', 'hover:bg-gray-600');
99
+ } else {
100
+ toggleEditButton.textContent = 'Enable Editing';
101
+ toggleEditButton.classList.remove('bg-gray-500', 'hover:bg-gray-600');
102
+ toggleEditButton.classList.add('bg-blue-500', 'hover:bg-blue-600');
103
+ }
104
+
105
+ // Add click handler
106
+ toggleEditButton.addEventListener('click', () => {
107
+ const currentUrl = new URL(window.location.href);
108
+ if (edit === 'true') {
109
+ currentUrl.searchParams.delete('edit');
110
+ } else {
111
+ currentUrl.searchParams.set('edit', 'true');
112
+ }
113
+ window.location.href = currentUrl.toString();
114
+ });
115
+ }
116
+ }
117
+
118
+ configureMiro();
119
+
120
+ document.addEventListener('astro:page-load', configureMiro);
121
+ </script>
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.33.3",
9
+ "version": "2.33.5",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },