@eventcatalog/core 2.7.12 → 2.7.14

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.
@@ -1,6 +1,6 @@
1
1
  name: Bug Report 🐞
2
2
  description: Create a bug report
3
- labels: ["🐛 bug"]
3
+ labels: ["bug"]
4
4
  body:
5
5
  - type: markdown
6
6
  attributes:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.7.14
4
+
5
+ ### Patch Changes
6
+
7
+ - c45ebd0: feat(core): added new steps component
8
+
9
+ ## 2.7.13
10
+
11
+ ### Patch Changes
12
+
13
+ - 6268155: feat(core): new styles added to header and docs sidebar
14
+
3
15
  ## 2.7.12
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -226,6 +226,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
226
226
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/carlosallexandre"><img src="https://avatars.githubusercontent.com/u/20143946?v=4?s=100" width="100px;" alt="Carlos Rodrigues"/><br /><sub><b>Carlos Rodrigues</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=carlosallexandre" title="Code">💻</a></td>
227
227
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/XaaXaaX"><img src="https://avatars.githubusercontent.com/u/13409925?v=4?s=100" width="100px;" alt="omid eidivandi"/><br /><sub><b>omid eidivandi</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=XaaXaaX" title="Code">💻</a></td>
228
228
  </tr>
229
+ <tr>
230
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/IsmaelMartinez"><img src="https://avatars.githubusercontent.com/u/430992?v=4s=100" width="100px;" alt="IsmaelMartinez"/><br /><sub><b>IsmaelMartinez</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=IsmaelMartinez" title="Code">💻</a></td>
231
+ </tr>
229
232
  </tbody>
230
233
  </table>
231
234
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eventcatalog/core",
3
3
  "type": "module",
4
- "version": "2.7.12",
4
+ "version": "2.7.14",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,8 +27,11 @@ const logo = {
27
27
  };
28
28
  ---
29
29
 
30
- <nav id="eventcatalog-header" class="fixed top-0 left-0 right-0 z-20 bg-white border-b border-gray-200 py-4 font-bold text-xl">
31
- <div class="max-w-[120em] mx-auto px-4 sm:px-6 lg:px-8 xxl:max-w-[96em]">
30
+ <nav
31
+ id="eventcatalog-header"
32
+ class="fixed top-0 left-0 right-0 z-20 bg-white border-b border-gray-100 py-3 font-bold text-xl bg-opacity-50 backdrop-blur-sm"
33
+ >
34
+ <div class="max-w-[120em] mx-auto px-4 sm:px-6 lg:px-10 xxl:max-w-[96em]">
32
35
  <div class="flex justify-between items-center">
33
36
  <div class="flex-shrink-0 flex items-center w-1/3">
34
37
  <a href={buildUrl(catalog.landingPage || '/')} class="flex space-x-2 items-center">
@@ -37,7 +40,7 @@ const logo = {
37
40
  </a>
38
41
  </div>
39
42
 
40
- <div class="hidden lg:block flex-grow mx-4 w-1/3">
43
+ <div class="hidden lg:block flex-grow w-1/3">
41
44
  <Search />
42
45
  </div>
43
46
 
@@ -47,7 +50,7 @@ const logo = {
47
50
  navItems.map((item) => {
48
51
  const isActive = currentPath.includes(item.href);
49
52
  return (
50
- <li class={`font-light ${isActive ? 'border-b-2 border-purple-500' : ''}`}>
53
+ <li class={`font-light text-[0.8em] ${isActive ? 'border-b-2 border-purple-500' : ''}`}>
51
54
  <a href={item.href}>{item.label}</a>
52
55
  </li>
53
56
  );
@@ -90,7 +93,7 @@ const logo = {
90
93
  </div>
91
94
  </nav>
92
95
 
93
- <div id="eventcatalog-header-spacer" class="h-20"></div>
96
+ <div id="eventcatalog-header-spacer" class="h-16"></div>
94
97
  <!-- Spacer to prevent content from being hidden under the fixed header -->
95
98
 
96
99
  <script>
@@ -0,0 +1,25 @@
1
+ ---
2
+ const { title } = Astro.props;
3
+ ---
4
+
5
+ <li class="mb-8 ml-6 w-full xl:max-w-[50%]">
6
+ <div class="flex items-center mb-4">
7
+ <span class="step-number absolute flex items-center justify-center w-6 h-6 bg-purple-500/70 rounded-md -left-3 text-white">
8
+ <div></div>
9
+ </span>
10
+ <h3 class="font-semibold text-lg ml-0">{title}</h3>
11
+ </div>
12
+ <p class="text-gray-500 text-sm ml-4"><slot /></p>
13
+ </li>
14
+
15
+ <script>
16
+ document.addEventListener('DOMContentLoaded', () => {
17
+ document.querySelectorAll('li[data-step]').forEach((li) => {
18
+ const stepNumber = li.getAttribute('data-step');
19
+ const stepSpan = li.querySelector('.step-number div');
20
+ if (stepSpan) {
21
+ stepSpan.textContent = stepNumber;
22
+ }
23
+ });
24
+ });
25
+ </script>
@@ -0,0 +1,27 @@
1
+ ---
2
+ const { title } = Astro.props;
3
+ const html = await Astro.slots.render('default');
4
+
5
+ function splitByLi(html: string) {
6
+ // Use regex to match <li> tags and their contents, including nested tags
7
+ const liRegex = /<li[\s\S]*?<\/li>/g;
8
+
9
+ // Find all matches
10
+ const matches = html.match(liRegex) || [];
11
+
12
+ // Add data-step attribute to each li
13
+ return matches.map((li: string, index: number) => {
14
+ // Replace the opening <li tag with <li data-step="index+1"
15
+ return li.replace(/<li/, `<li data-step="${index + 1}"`);
16
+ });
17
+ }
18
+
19
+ const data = splitByLi(html);
20
+ ---
21
+
22
+ <div class="bg-white text-gray-800 py-10 pb-0 font-sans not-prose">
23
+ {title && <h2 class="text-2xl font-bold text-gray-800 mb-6">{title}</h2>}
24
+ <ol class="relative border-l border-gray-200 ml-3">
25
+ {data.map((item: any) => <Fragment set:html={item} />)}
26
+ </ol>
27
+ </div>
@@ -6,6 +6,8 @@ import AccordionGroup from '@components/MDX/Accordion/AccordionGroup.astro';
6
6
  import Flow from '@components/MDX/Flow/Flow.astro';
7
7
  import Tiles from '@components/MDX/Tiles/Tiles.astro';
8
8
  import Tile from '@components/MDX/Tiles/Tile.astro';
9
+ import Steps from '@components/MDX/Steps/Steps.astro';
10
+ import Step from '@components/MDX/Steps/Step.astro';
9
11
  import Admonition from '@components/MDX/Admonition';
10
12
  import OpenAPI from '@components/MDX/OpenAPI/OpenAPI.astro';
11
13
  import AsyncAPI from '@components/MDX/AsyncAPI/AsyncAPI.astro';
@@ -21,8 +23,10 @@ const components = (props: any) => {
21
23
  Flow,
22
24
  OpenAPI,
23
25
  AsyncAPI,
24
- Tiles,
25
26
  Tile,
27
+ Tiles,
28
+ Step,
29
+ Steps,
26
30
  Admonition: (mdxProp: any) => <Admonition {...mdxProp} {...props} />,
27
31
  File: (mdxProp: any) => File({ ...props, ...mdxProp }),
28
32
  NodeGraph: (mdxProp: any) => NodeGraphPortal({ ...props.data, ...mdxProp }),
@@ -1,24 +1,26 @@
1
1
  ---
2
+ import MagnifyingGlassIcon from '@heroicons/react/24/outline/MagnifyingGlassIcon';
2
3
  import PageFindSearch from 'astro-pagefind/components/Search';
3
4
  ---
4
5
 
5
6
  <div>
6
- <div class="relative mt-2 flex items-center">
7
+ <div class="relative flex items-center">
7
8
  <input
8
9
  id="search-dummy-input"
9
10
  type="text"
10
11
  name="search"
11
12
  id="search"
12
13
  placeholder="Search EventCatalog"
13
- class="block w-full rounded-md caret-transparent border-0 py-1.5 pr-14 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 sm:text-sm sm:leading-6 px-4"
14
+ class="block w-full rounded-md caret-transparent border-0 py-1.5 pr-14 pl-10 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 font-light sm:text-sm sm:leading-6 px-4"
14
15
  />
16
+ <MagnifyingGlassIcon className="absolute inset-y-0 -left-1 h-9 w-8 flex items-center pl-4 text-gray-400" />
15
17
  <div class="absolute inset-y-0 right-0 flex py-1.5 pr-1.5">
16
- <kbd class="inline-flex items-center rounded border border-gray-200 px-1 font-sans text-xs text-gray-400">⌘K</kbd>
18
+ <kbd class="inline-flex items-center rounded px-1 font-sans text-xs text-gray-400">⌘K</kbd>
17
19
  </div>
18
20
  </div>
19
21
  </div>
20
22
 
21
- <div id="search-dialog" class="hidden relative z-10" role="dialog" aria-modal="true">
23
+ <div id="search-dialog" class="hidden relative z-50" role="dialog" aria-modal="true">
22
24
  <div class="fixed inset-0 bg-gray-500 bg-opacity-25 transition-opacity search-background backdrop-blur-sm bg-black/10"></div>
23
25
  <div id="search-background" class="fixed inset-0 z-10 w-screen overflow-y-auto p-4 sm:p-6 md:p-20">
24
26
  <div
@@ -46,6 +48,7 @@ import PageFindSearch from 'astro-pagefind/components/Search';
46
48
  <script>
47
49
  const dummyInput = document.getElementById('search-dummy-input');
48
50
  const dialog = document.getElementById('search-dialog');
51
+ const header = document.getElementById('eventcatalog-header');
49
52
 
50
53
  // Listen for the short cut keys
51
54
  window.addEventListener('keydown', (event) => {
@@ -56,6 +59,7 @@ import PageFindSearch from 'astro-pagefind/components/Search';
56
59
  if (event.key === 'Escape') {
57
60
  if (dialog) {
58
61
  dialog.style.display = 'none';
62
+ if (header) header.classList.add('backdrop-blur-sm');
59
63
  }
60
64
  }
61
65
  });
@@ -70,6 +74,7 @@ import PageFindSearch from 'astro-pagefind/components/Search';
70
74
  // @ts-ignore
71
75
  input && input.focus();
72
76
  }, 10);
77
+ if (header) header.classList.remove('backdrop-blur-sm');
73
78
  // @ts-ignore
74
79
  dialog.style.display = 'block';
75
80
  });
@@ -79,6 +84,7 @@ import PageFindSearch from 'astro-pagefind/components/Search';
79
84
  dialog?.addEventListener('click', function (e) {
80
85
  // @ts-ignore
81
86
  if (e.target.id === 'search-background') {
87
+ if (header) header.classList.add('backdrop-blur-sm');
82
88
  dialog.style.display = 'none';
83
89
  }
84
90
  });
@@ -21,8 +21,11 @@ import SEO from '../components/Seo.astro';
21
21
  <Header />
22
22
 
23
23
  <div>
24
- <nav class="hidden sm:flex grow w-56 xl:w-[19em] fixed overflow-y-auto h-full py-2">
25
- <div class="w-full pt-4">
24
+ <nav class="hidden sm:flex grow w-56 xl:w-[19em] fixed overflow-y-auto h-full">
25
+ <div class="w-full">
26
+ <div class="sticky top-0 z-10 h-8 pointer-events-none -mt-4">
27
+ <div class="h-full bg-gradient-to-b from-white to-transparent"></div>
28
+ </div>
26
29
  <SideBar />
27
30
  </div>
28
31
  </nav>