@functionalcms/svelte-components 2.38.5 → 2.38.7

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.
@@ -4,7 +4,7 @@ const authorizationHandle = () => {
4
4
  const path = event.url.pathname;
5
5
  if (path.startsWith('/auth/') === false) {
6
6
  const route = event.route;
7
- if (route.id.includes('/(protect)/')) {
7
+ if (route.id.includes('/(protect)')) {
8
8
  const session = event?.locals?.session;
9
9
  if (!session) {
10
10
  const cookieHeader = `retrunToAddress=${event.url.toString()}; HttpOnly; Secure; SameSite=Lax; Max-Age=3600; Path=/`;
@@ -1,9 +1,10 @@
1
1
  <script>import Link from "../Link.svelte";
2
2
  import { Justify } from "../Styling.js";
3
3
  export let description;
4
+ export let css = "";
4
5
  </script>
5
6
 
6
- <p>
7
+ <p class={css}>
7
8
  {description}
8
9
  <slot name="readMore"></slot>
9
10
  </p>
@@ -2,6 +2,7 @@ import { SvelteComponent } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  description: string;
5
+ css?: string;
5
6
  };
6
7
  events: {
7
8
  [evt: string]: CustomEvent<any>;
@@ -1,11 +1,12 @@
1
1
  <script>export let slug = "";
2
2
  export let path = "";
3
3
  export let title;
4
+ export let css;
4
5
  const href = `${path}/${slug}`;
5
6
  const isLink = slug != "";
6
7
  </script>
7
8
 
8
- <h1>
9
+ <h1 class={css}>
9
10
  {#if isLink}
10
11
  <a {href}>
11
12
  {title}
@@ -4,6 +4,7 @@ declare const __propDef: {
4
4
  slug?: string;
5
5
  path?: string;
6
6
  title: string;
7
+ css: string;
7
8
  };
8
9
  events: {
9
10
  [evt: string]: CustomEvent<any>;
@@ -2,7 +2,7 @@
2
2
  import { isAuthenticated } from "./authentication.js";
3
3
  import { page } from "$app/stores";
4
4
  import { mergedClasses } from "../CssHelper.js";
5
- export let css = defaultCss;
5
+ export let css;
6
6
  const cssClasses = { ...defaultCss, ...css };
7
7
  export let localPages = [];
8
8
  $: pagesVisiblity = isAuthenticated($page);
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
2
2
  import { HeaderNavigationItem } from './Menu.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
- css?: {
5
+ css: {
6
6
  container: string[];
7
7
  };
8
8
  localPages?: Array<HeaderNavigationItem>;
@@ -14,11 +14,17 @@ const linkCss = mergedClasses(cssClasses.link);
14
14
 
15
15
  <ul class={containerCss} role="menu" aria-roledescription="">
16
16
  {#each localPages as pageItem}
17
- <li aria-current={isSelected(includeSubpagesForSelect, $page, pageItem)} class={linkCss} role="presentation">
17
+ <li
18
+ aria-current={isSelected(includeSubpagesForSelect, $page, pageItem)}
19
+ class={linkCss}
20
+ role="presentation"
21
+ >
18
22
  <span class="screenreader-only">Navigate to {pageItem.name}</span>
19
- <Link href={pageItem.path} role="menuItem">
23
+ <!-- <Link href={pageItem.path} role="menuItem"> -->
24
+ <a href={pageItem.path} role="menuItem">
20
25
  {pageItem.name}
21
- </Link>
26
+ </a>
27
+ <!-- </Link> -->
22
28
  </li>
23
29
  {/each}
24
30
  </ul>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "2.38.5",
3
+ "version": "2.38.7",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [