@eventcatalog/core 2.0.7 → 2.0.9
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eventcatalog/core
|
|
2
2
|
|
|
3
|
+
## 2.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d4916a0: fix(core): configure width for nodes in visualiser (#560)
|
|
8
|
+
|
|
9
|
+
## 2.0.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 5bde1d4: feat(core): versions now show as a dropdown
|
|
14
|
+
|
|
3
15
|
## 2.0.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -9,21 +9,27 @@ interface Props {
|
|
|
9
9
|
|
|
10
10
|
const { versions, collectionItem } = Astro.props;
|
|
11
11
|
const currentPath = Astro.url.pathname;
|
|
12
|
+
|
|
12
13
|
---
|
|
13
14
|
|
|
14
15
|
<div class="space-y-2 my-2 mb-8">
|
|
15
16
|
<span class="font-light text-black group-data-[hover]:text-black/80 capitalize">Versions ({collectionItem.data.versions?.length})</span>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<a href={`/docs/${collectionItem.collection}/${collectionItem.data.id}/${version}`} class={`inline-flex items-center rounded-md px-2 py-1 text-xs font-medium text-indigo-700 ring-1 ring-inset ring-indigo-700/10 hover:bg-purple-100 hover:underline ${isCurrent ? 'bg-purple-100 text-purple-500 underline ' : 'bg-white'}`}>
|
|
17
|
+
<select id="version" class="block bg-gray-50 rounded-md border border-gray-200 px-1 py-0.5 text-xs">
|
|
18
|
+
{versions.map((version) => {
|
|
19
|
+
const isCurrent = currentPath.includes(version);
|
|
20
|
+
return <option selected={isCurrent} value={`/docs/${collectionItem.collection}/${collectionItem.data.id}/${version}`} class={`inline-flex items-center rounded-md px-2 py-1 text-xs text-indigo-700 ring-1 ring-inset ring-indigo-700/10 hover:bg-purple-100 hover:underline ${isCurrent ? 'bg-purple-100 text-purple-500 underline ' : 'bg-white'}`}>
|
|
21
21
|
<span>
|
|
22
22
|
v{version}
|
|
23
23
|
{version === collectionItem.data.latestVersion && <span>(latest)</span>}
|
|
24
24
|
</span>
|
|
25
|
-
</
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
</option>
|
|
26
|
+
})}
|
|
27
|
+
</select>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
document.getElementById('version')?.addEventListener('change', (e: any) => {
|
|
32
|
+
if (!e.target) return
|
|
33
|
+
window.location.href = e.target.value;
|
|
34
|
+
})
|
|
35
|
+
</script>
|
|
@@ -40,7 +40,7 @@ export default function CommandNode({ data, sourcePosition, targetPosition }: an
|
|
|
40
40
|
</span>
|
|
41
41
|
)}
|
|
42
42
|
</div>
|
|
43
|
-
<div className="p-1">
|
|
43
|
+
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
44
44
|
{renderTarget && <Handle type="target" position={targetPosition} />}
|
|
45
45
|
{renderSource && <Handle type="source" position={sourcePosition} />}
|
|
46
46
|
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
@@ -40,7 +40,7 @@ export default function EventNode({ data, sourcePosition, targetPosition }: any)
|
|
|
40
40
|
</span>
|
|
41
41
|
)}
|
|
42
42
|
</div>
|
|
43
|
-
<div className="p-1">
|
|
43
|
+
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
44
44
|
{renderTarget && <Handle type="target" position={targetPosition} />}
|
|
45
45
|
{renderSource && <Handle type="source" position={sourcePosition} />}
|
|
46
46
|
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
@@ -39,7 +39,7 @@ export default function ServiceNode({ data, sourcePosition, targetPosition }: an
|
|
|
39
39
|
</span>
|
|
40
40
|
)}
|
|
41
41
|
</div>
|
|
42
|
-
<div className="p-1">
|
|
42
|
+
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
43
43
|
{showTarget && <Handle type="target" position={targetPosition} />}
|
|
44
44
|
{showSource && <Handle type="source" position={sourcePosition} />}
|
|
45
45
|
{/* {mode === 'full' && (
|