@functionalcms/svelte-components 2.13.7 → 2.13.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.
@@ -1,26 +1,26 @@
1
- <style>
2
- a {
3
- display: var(--functional-logo-display, 'inline-block');
4
- margin: var(--functional-mobile-logo-margin);
5
- padding: var(--functional-mobile-logo-padding);
6
- }
7
- a img {
8
- width: 100%;
9
- }
10
-
11
- @media (min-width: 960px) {
12
- a img {
13
- margin: var(--functional-logo-margin);
14
- padding: var(--functional-logo-padding);
15
- }
16
- }
17
- </style>
18
-
1
+ <style>
2
+ a {
3
+ display: var(--functional-logo-display, 'inline-block');
4
+ margin: var(--functional-mobile-logo-margin);
5
+ padding: var(--functional-mobile-logo-padding);
6
+ }
7
+ a img {
8
+ width: 100%;
9
+ }
10
+
11
+ @media (min-width: 960px) {
12
+ a img {
13
+ margin: var(--functional-logo-margin);
14
+ padding: var(--functional-logo-padding);
15
+ }
16
+ }
17
+ </style>
18
+
19
19
  <script>export let companyName;
20
20
  export let logoUrl;
21
21
  export let css = "logo";
22
- </script>
23
-
24
- <a href="/" class={css}>
25
- <img src={logoUrl} alt={companyName} />
22
+ </script>
23
+
24
+ <a href="/" class={css}>
25
+ <img src={logoUrl} alt={companyName} />
26
26
  </a>
@@ -9,7 +9,9 @@ export let localPages = [];
9
9
  $:
10
10
  activePages = !localPages || localPages.length == 0 ? $pagesStore : localPages;
11
11
  $:
12
- visibleNavItems = selectVisible(activePages, isAuthenticated(page));
12
+ pagesVisiblity = isAuthenticated(page);
13
+ $:
14
+ visibleNavItems = selectVisible(activePages, pagesVisiblity);
13
15
  const klasses = ["flex", "flex-dynamic-row", css ? css : ""].filter((c) => c).join(" ");
14
16
  </script>
15
17
 
@@ -1,6 +1,8 @@
1
1
  import { Visiblity } from '@functionalcms/svelte-components';
2
+ import { get } from 'svelte/store';
2
3
  export function isAuthenticated(page) {
3
- const isAuthenticated = page?.data?.session == null;
4
+ const pageStore = get(page);
5
+ const isAuthenticated = pageStore?.data?.session != null;
4
6
  const visibility = isAuthenticated ? Visiblity.Authenticated : Visiblity.NotAuthenticated;
5
7
  return visibility;
6
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "2.13.7",
3
+ "version": "2.13.8",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [