@eventcatalog/core 4.10.6 → 4.10.8
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.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-NECJFWMI.js → chunk-CDWE6WWB.js} +1 -1
- package/dist/{chunk-XFS3XVP2.js → chunk-DRK5QSQC.js} +1 -1
- package/dist/{chunk-YSWJHMAX.js → chunk-LB5EMDAY.js} +1 -1
- package/dist/{chunk-GMVJ4B2S.js → chunk-W5C4K7F2.js} +1 -1
- package/dist/{chunk-EB43LSVE.js → chunk-W6IMDOJJ.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +5 -5
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +2 -0
- package/eventcatalog/src/components/Tables/Discover/DiscoverTable.tsx +2 -0
- package/eventcatalog/src/layouts/BaseLayout.astro +10 -2
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +15 -0
- package/eventcatalog/src/pages/discover/[type]/index.astro +10 -0
- package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +6 -0
- package/eventcatalog/src/pages/schemas/explorer/index.astro +10 -0
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +11 -13
- package/eventcatalog/src/pages/visualiser/graph/index.astro +18 -2
- package/eventcatalog/src/pages/visualiser/system-context-map/index.astro +11 -13
- package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/context/index.astro +11 -13
- package/eventcatalog/src/stores/theme-store.ts +18 -0
- package/package.json +4 -4
|
@@ -140,7 +140,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
140
140
|
var import_os = __toESM(require("os"), 1);
|
|
141
141
|
|
|
142
142
|
// package.json
|
|
143
|
-
var version = "4.10.
|
|
143
|
+
var version = "4.10.8";
|
|
144
144
|
|
|
145
145
|
// src/constants.ts
|
|
146
146
|
var VERSION = version;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-W6IMDOJJ.js";
|
|
4
|
+
import "../chunk-CDWE6WWB.js";
|
|
5
5
|
import "../chunk-ZAZHAVKB.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-LB5EMDAY.js";
|
|
7
7
|
import "../chunk-6QENHZZP.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -144,7 +144,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
144
144
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
145
145
|
|
|
146
146
|
// package.json
|
|
147
|
-
var version = "4.10.
|
|
147
|
+
var version = "4.10.8";
|
|
148
148
|
|
|
149
149
|
// src/constants.ts
|
|
150
150
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
import "./chunk-CA4U2JP7.js";
|
|
5
5
|
import {
|
|
6
6
|
log_build_default
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-W6IMDOJJ.js";
|
|
8
|
+
import "./chunk-CDWE6WWB.js";
|
|
9
9
|
import "./chunk-ZAZHAVKB.js";
|
|
10
10
|
import {
|
|
11
11
|
FederationConflictError,
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
} from "./chunk-B7HCX5HM.js";
|
|
32
32
|
import {
|
|
33
33
|
generate
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DRK5QSQC.js";
|
|
35
35
|
import {
|
|
36
36
|
logger
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-W5C4K7F2.js";
|
|
38
38
|
import {
|
|
39
39
|
resolve_catalog_dependencies_default
|
|
40
40
|
} from "./chunk-LHR4G2UO.js";
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
import "./chunk-W5JQON7Z.js";
|
|
55
55
|
import {
|
|
56
56
|
VERSION
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-LB5EMDAY.js";
|
|
58
58
|
import {
|
|
59
59
|
linkCoreNodeModules,
|
|
60
60
|
resolveInstalledCoreNodeModules
|
package/dist/generate.cjs
CHANGED
|
@@ -108,7 +108,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
108
108
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
109
109
|
|
|
110
110
|
// package.json
|
|
111
|
-
var version = "4.10.
|
|
111
|
+
var version = "4.10.8";
|
|
112
112
|
|
|
113
113
|
// src/constants.ts
|
|
114
114
|
var VERSION = version;
|
package/dist/generate.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-DRK5QSQC.js";
|
|
4
|
+
import "./chunk-W5C4K7F2.js";
|
|
5
|
+
import "./chunk-LB5EMDAY.js";
|
|
6
6
|
import "./chunk-6QENHZZP.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -384,6 +384,7 @@ export default function SchemaExplorer({ schemas, apiAccessEnabled = false }: Sc
|
|
|
384
384
|
/>
|
|
385
385
|
<div className="flex flex-1 min-h-0 gap-0 overflow-hidden">
|
|
386
386
|
<div
|
|
387
|
+
id="schema-explorer-sidebar"
|
|
387
388
|
className="fixed top-0 z-20 flex h-screen flex-col overflow-hidden border-r border-[rgb(var(--ec-page-border))] bg-linear-to-b from-[rgb(var(--ec-page-bg))] via-[rgb(var(--ec-page-bg))] to-[rgb(var(--ec-accent)/0.06)]"
|
|
388
389
|
style={{ left: 'var(--ec-vertical-nav-width)', width: 'var(--ec-schema-sidebar-width, 360px)' }}
|
|
389
390
|
>
|
|
@@ -583,6 +584,7 @@ export default function SchemaExplorer({ schemas, apiAccessEnabled = false }: Sc
|
|
|
583
584
|
</div>
|
|
584
585
|
|
|
585
586
|
<div
|
|
587
|
+
id="schema-explorer-content"
|
|
586
588
|
className="flex-1 min-h-0 min-w-0 overflow-hidden bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))]"
|
|
587
589
|
style={{ marginLeft: 'var(--ec-schema-sidebar-width, 360px)' }}
|
|
588
590
|
>
|
|
@@ -812,6 +812,7 @@ export function DiscoverTable<T extends DiscoverTableData>({
|
|
|
812
812
|
<div className="flex h-full min-h-0" style={{ ['--ec-discover-sidebar-width' as any]: '320px' }}>
|
|
813
813
|
{/* Filter Sidebar */}
|
|
814
814
|
<div
|
|
815
|
+
id="discover-filter-sidebar"
|
|
815
816
|
className="fixed left-[var(--ec-vertical-nav-width)] top-0 z-20 flex h-screen w-[320px] flex-shrink-0 flex-col border-r border-[rgb(var(--ec-content-border))] bg-[rgb(var(--ec-rail-bg))]"
|
|
816
817
|
style={{ width: 'var(--ec-discover-sidebar-width, 320px)' }}
|
|
817
818
|
>
|
|
@@ -1180,6 +1181,7 @@ export function DiscoverTable<T extends DiscoverTableData>({
|
|
|
1180
1181
|
|
|
1181
1182
|
{/* Main Table */}
|
|
1182
1183
|
<div
|
|
1184
|
+
id="discover-results"
|
|
1183
1185
|
className="flex-1 min-w-0 flex flex-col overflow-hidden"
|
|
1184
1186
|
style={{ marginLeft: 'var(--ec-discover-sidebar-width, 320px)' }}
|
|
1185
1187
|
>
|
|
@@ -25,10 +25,18 @@ const catalogTheme = config.theme || 'default';
|
|
|
25
25
|
return 'dark';
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
function getEmbeddedTheme() {
|
|
29
|
+
const params = new URLSearchParams(window.location.search);
|
|
30
|
+
const requestedTheme = params.get('theme');
|
|
31
|
+
const embedded = params.get('embed') === 'true';
|
|
32
|
+
return embedded && (requestedTheme === 'light' || requestedTheme === 'dark') ? requestedTheme : null;
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
function applyTheme() {
|
|
29
|
-
//
|
|
36
|
+
// An embed can request its own theme without changing the user's saved catalog preference.
|
|
37
|
+
const embeddedTheme = getEmbeddedTheme();
|
|
30
38
|
const stored = localStorage.getItem('eventcatalog-theme');
|
|
31
|
-
const theme = stored === 'light' || stored === 'dark' ? stored : getDefaultTheme();
|
|
39
|
+
const theme = embeddedTheme || (stored === 'light' || stored === 'dark' ? stored : getDefaultTheme());
|
|
32
40
|
document.documentElement.setAttribute('data-theme', theme);
|
|
33
41
|
// Also ensure catalog theme is set (for page transitions)
|
|
34
42
|
document.documentElement.setAttribute('data-catalog-theme', catalogTheme);
|
|
@@ -432,6 +432,10 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
|
|
|
432
432
|
<script is:inline define:vars={{ verticalNavAutoCollapsePaths }}>
|
|
433
433
|
(() => {
|
|
434
434
|
const verticalNavStorageKey = 'eventcatalog-vertical-nav-collapsed';
|
|
435
|
+
const embedded = new URLSearchParams(window.location.search).get('embed') === 'true';
|
|
436
|
+
|
|
437
|
+
document.documentElement.setAttribute('data-embedded', embedded ? 'true' : 'false');
|
|
438
|
+
|
|
435
439
|
const routeShouldAutoCollapseVerticalNav = (pathname) =>
|
|
436
440
|
verticalNavAutoCollapsePaths.some((path) => pathname === path || pathname.startsWith(`${path}/`));
|
|
437
441
|
|
|
@@ -514,6 +518,15 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
|
|
|
514
518
|
.app-shell--with-sidebar {
|
|
515
519
|
margin-left: calc(var(--ec-vertical-nav-width) + var(--ec-sidebar-panel-width));
|
|
516
520
|
}
|
|
521
|
+
:root[data-embedded='true'] #eventcatalog-vertical-nav,
|
|
522
|
+
:root[data-embedded='true'] #eventcatalog-header,
|
|
523
|
+
:root[data-embedded='true'] #eventcatalog-header-spacer,
|
|
524
|
+
:root[data-embedded='true'] #sidebar {
|
|
525
|
+
display: none !important;
|
|
526
|
+
}
|
|
527
|
+
:root[data-embedded='true'] .app-shell {
|
|
528
|
+
margin-left: 0 !important;
|
|
529
|
+
}
|
|
517
530
|
.vertical-nav-rail {
|
|
518
531
|
width: var(--ec-vertical-nav-width);
|
|
519
532
|
border-right: 1px solid rgb(var(--ec-page-border));
|
|
@@ -1087,6 +1100,7 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
|
|
|
1087
1100
|
const urlSearchParams = new URLSearchParams(window.location.search);
|
|
1088
1101
|
const params = Object.fromEntries(urlSearchParams.entries());
|
|
1089
1102
|
const embeded = params.embed === 'true' ? true : false;
|
|
1103
|
+
document.documentElement.setAttribute('data-embedded', embeded ? 'true' : 'false');
|
|
1090
1104
|
const content = document.getElementById('content');
|
|
1091
1105
|
const shell = document.querySelector('.app-shell');
|
|
1092
1106
|
const app = document.getElementById('eventcatalog-application');
|
|
@@ -1130,6 +1144,7 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
|
|
|
1130
1144
|
'eventcatalog-vertical-nav',
|
|
1131
1145
|
'eventcatalog-header',
|
|
1132
1146
|
'eventcatalog-header-spacer',
|
|
1147
|
+
'sidebar',
|
|
1133
1148
|
'visualiser-footer',
|
|
1134
1149
|
// /discover page elements
|
|
1135
1150
|
'discover-collection-tabs',
|
|
@@ -444,8 +444,18 @@ const title = `${currentTypeConfig.label} (${data.length})`;
|
|
|
444
444
|
#eventcatalog-header {
|
|
445
445
|
left: calc(var(--ec-vertical-nav-width, 14rem) + var(--ec-discover-sidebar-width, 320px)) !important;
|
|
446
446
|
}
|
|
447
|
+
:root[data-embedded='true'] #discover-filter-sidebar {
|
|
448
|
+
display: none !important;
|
|
449
|
+
}
|
|
450
|
+
:root[data-embedded='true'] #discover-results {
|
|
451
|
+
margin-left: 0 !important;
|
|
452
|
+
}
|
|
453
|
+
:root[data-embedded='true'] #discover-page {
|
|
454
|
+
height: 100dvh !important;
|
|
455
|
+
}
|
|
447
456
|
</style>
|
|
448
457
|
<main
|
|
458
|
+
id="discover-page"
|
|
449
459
|
class="ml-0 flex h-full min-h-0 flex-col overflow-hidden bg-[rgb(var(--ec-page-bg))]"
|
|
450
460
|
style={`--ec-discover-sidebar-width: 320px; margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1); margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1); height: calc(100dvh - 60px);`}
|
|
451
461
|
>
|
|
@@ -130,8 +130,14 @@ const apiAccessEnabled = isEventCatalogScaleEnabled();
|
|
|
130
130
|
---
|
|
131
131
|
|
|
132
132
|
<VerticalSideBarLayout title={pageTitle}>
|
|
133
|
+
<style is:global>
|
|
134
|
+
:root[data-embedded='true'] #schema-detail-page {
|
|
135
|
+
height: 100dvh !important;
|
|
136
|
+
}
|
|
137
|
+
</style>
|
|
133
138
|
{/* The schema viewer is an app-style surface: pull it out of the content gutter so it sits flush against the sidebar. */}
|
|
134
139
|
<div
|
|
140
|
+
id="schema-detail-page"
|
|
135
141
|
class="h-[calc(100vh-4rem)] overflow-hidden flex flex-col"
|
|
136
142
|
style="margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1); margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1);"
|
|
137
143
|
>
|
|
@@ -17,8 +17,18 @@ const apiAccessEnabled = isEventCatalogScaleEnabled();
|
|
|
17
17
|
#eventcatalog-header {
|
|
18
18
|
left: calc(var(--ec-vertical-nav-width, 14rem) + var(--ec-schema-sidebar-width, 360px)) !important;
|
|
19
19
|
}
|
|
20
|
+
:root[data-embedded='true'] #schema-explorer-sidebar {
|
|
21
|
+
display: none !important;
|
|
22
|
+
}
|
|
23
|
+
:root[data-embedded='true'] #schema-explorer-content {
|
|
24
|
+
margin-left: 0 !important;
|
|
25
|
+
}
|
|
26
|
+
:root[data-embedded='true'] #schema-explorer-page {
|
|
27
|
+
height: 100dvh !important;
|
|
28
|
+
}
|
|
20
29
|
</style>
|
|
21
30
|
<main
|
|
31
|
+
id="schema-explorer-page"
|
|
22
32
|
class="min-h-0 overflow-hidden bg-[rgb(var(--ec-page-bg))]"
|
|
23
33
|
style={`--ec-schema-sidebar-width: 360px; margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1); margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1); height: calc(100dvh - 60px);`}
|
|
24
34
|
>
|
|
@@ -20,9 +20,9 @@ const {
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
<VisualiserLayout title={`Visualiser | ${props.data.name} (${props.collection})`} description={props.data.summary}>
|
|
23
|
-
<div class="p-2">
|
|
23
|
+
<div id="visualiser-page" class="p-2">
|
|
24
24
|
<div
|
|
25
|
-
class="h-[calc(100vh-5rem)] w-full relative border border-[rgb(var(--ec-page-border))]"
|
|
25
|
+
class="visualiser-viewport h-[calc(100vh-5rem)] w-full relative border border-[rgb(var(--ec-page-border))]"
|
|
26
26
|
id={`${id}-portal`}
|
|
27
27
|
transition:name="visualiser-graph"
|
|
28
28
|
>
|
|
@@ -45,15 +45,13 @@ const {
|
|
|
45
45
|
<ClientRouter />
|
|
46
46
|
</VisualiserLayout>
|
|
47
47
|
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const viewport = document.getElementById(`${id}-portal`);
|
|
48
|
+
<style is:global>
|
|
49
|
+
html[data-embedded='true'] #visualiser-page {
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
height: 100vh;
|
|
52
|
+
}
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</script>
|
|
54
|
+
html[data-embedded='true'] #visualiser-page .visualiser-viewport {
|
|
55
|
+
height: 100%;
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -16,9 +16,25 @@ const { nodes: wireNodes, links: wireLinks, linkLabels } = toCatalogForceGraphWi
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
<VisualiserLayout title="Visualiser | Architecture Graph" description="Force-directed graph of every resource in the catalog">
|
|
19
|
-
<div class="m-4">
|
|
20
|
-
<div
|
|
19
|
+
<div id="architecture-graph-page" class="m-4">
|
|
20
|
+
<div
|
|
21
|
+
id="architecture-graph-container"
|
|
22
|
+
class="h-[calc(100vh-130px)] w-full relative border border-[rgb(var(--ec-page-border))] rounded-md overflow-hidden"
|
|
23
|
+
>
|
|
21
24
|
<CatalogForceGraph nodes={wireNodes} links={wireLinks} linkLabels={linkLabels} client:only="react" />
|
|
22
25
|
</div>
|
|
23
26
|
</div>
|
|
24
27
|
</VisualiserLayout>
|
|
28
|
+
|
|
29
|
+
<style is:global>
|
|
30
|
+
html[data-embedded='true'] #architecture-graph-page {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
height: 100vh;
|
|
33
|
+
margin: 0;
|
|
34
|
+
padding: 1rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
html[data-embedded='true'] #architecture-graph-container {
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
@@ -7,9 +7,9 @@ const id = 'system-context-map';
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
<VisualiserLayout title={`Visualiser | System context map`}>
|
|
10
|
-
<div class="p-2">
|
|
10
|
+
<div id="system-context-map-page" class="p-2">
|
|
11
11
|
<div
|
|
12
|
-
class="h-[calc(100vh-5rem)] w-full relative border border-[rgb(var(--ec-page-border))]"
|
|
12
|
+
class="system-context-map-viewport h-[calc(100vh-5rem)] w-full relative border border-[rgb(var(--ec-page-border))]"
|
|
13
13
|
id={`${id}-portal`}
|
|
14
14
|
transition:name="visualiser-graph"
|
|
15
15
|
>
|
|
@@ -27,15 +27,13 @@ const id = 'system-context-map';
|
|
|
27
27
|
<ClientRouter />
|
|
28
28
|
</VisualiserLayout>
|
|
29
29
|
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const viewport = document.getElementById(`${id}-portal`);
|
|
30
|
+
<style is:global>
|
|
31
|
+
html[data-embedded='true'] #system-context-map-page {
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
height: 100vh;
|
|
34
|
+
}
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</script>
|
|
36
|
+
html[data-embedded='true'] #system-context-map-page .system-context-map-viewport {
|
|
37
|
+
height: 100%;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -17,9 +17,9 @@ const {
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
<VisualiserLayout title={`Visualiser | ${props.data.name} - System Context`} description={props.data.summary}>
|
|
20
|
-
<div class="p-2">
|
|
20
|
+
<div id="system-context-map-page" class="p-2">
|
|
21
21
|
<div
|
|
22
|
-
class="h-[calc(100vh-5rem)] w-full relative border border-[rgb(var(--ec-page-border))]"
|
|
22
|
+
class="system-context-map-viewport h-[calc(100vh-5rem)] w-full relative border border-[rgb(var(--ec-page-border))]"
|
|
23
23
|
id={`${id}-portal`}
|
|
24
24
|
transition:name="visualiser-graph"
|
|
25
25
|
>
|
|
@@ -37,15 +37,13 @@ const {
|
|
|
37
37
|
<ClientRouter />
|
|
38
38
|
</VisualiserLayout>
|
|
39
39
|
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const viewport = document.getElementById(`${id}-portal`);
|
|
40
|
+
<style is:global>
|
|
41
|
+
html[data-embedded='true'] #system-context-map-page {
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
height: 100vh;
|
|
44
|
+
}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
</script>
|
|
46
|
+
html[data-embedded='true'] #system-context-map-page .system-context-map-viewport {
|
|
47
|
+
height: 100%;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -14,6 +14,15 @@ const getDefaultTheme = (): Theme => {
|
|
|
14
14
|
return DEFAULT_THEME;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
const getEmbeddedTheme = (): Theme | null => {
|
|
18
|
+
if (typeof window === 'undefined') return null;
|
|
19
|
+
|
|
20
|
+
const params = new URLSearchParams(window.location.search);
|
|
21
|
+
const requestedTheme = params.get('theme');
|
|
22
|
+
const embedded = params.get('embed') === 'true';
|
|
23
|
+
return embedded && (requestedTheme === 'light' || requestedTheme === 'dark') ? requestedTheme : null;
|
|
24
|
+
};
|
|
25
|
+
|
|
17
26
|
// Apply theme to document via data-theme attribute
|
|
18
27
|
const applyTheme = (theme: Theme) => {
|
|
19
28
|
if (typeof document !== 'undefined') {
|
|
@@ -25,6 +34,13 @@ const applyTheme = (theme: Theme) => {
|
|
|
25
34
|
const initStore = () => {
|
|
26
35
|
if (typeof window !== 'undefined') {
|
|
27
36
|
try {
|
|
37
|
+
const embeddedTheme = getEmbeddedTheme();
|
|
38
|
+
if (embeddedTheme) {
|
|
39
|
+
themeStore.set(embeddedTheme);
|
|
40
|
+
applyTheme(embeddedTheme);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
28
44
|
const stored = localStorage.getItem(THEME_KEY) as Theme | null;
|
|
29
45
|
if (stored && (stored === 'light' || stored === 'dark')) {
|
|
30
46
|
// User has explicitly chosen a theme, use that
|
|
@@ -49,6 +65,8 @@ if (typeof window !== 'undefined') {
|
|
|
49
65
|
// Listen for system preference changes
|
|
50
66
|
if (window.matchMedia) {
|
|
51
67
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
|
|
68
|
+
if (getEmbeddedTheme()) return;
|
|
69
|
+
|
|
52
70
|
// Only follow system preference if user hasn't explicitly set a theme
|
|
53
71
|
const stored = localStorage.getItem(THEME_KEY);
|
|
54
72
|
if (!stored) {
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "4.10.
|
|
10
|
+
"version": "4.10.8",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"update-notifier": "^7.3.1",
|
|
119
119
|
"uuid": "^11.1.1",
|
|
120
120
|
"zod": "^4.3.6",
|
|
121
|
-
"@eventcatalog/linter": "1.1.
|
|
122
|
-
"@eventcatalog/
|
|
123
|
-
"@eventcatalog/
|
|
121
|
+
"@eventcatalog/linter": "1.1.18",
|
|
122
|
+
"@eventcatalog/sdk": "2.29.0",
|
|
123
|
+
"@eventcatalog/visualiser": "^4.1.3"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@astrojs/check": "^0.9.10",
|