@tuspe/components 1.7.20 → 1.7.21

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/README.md CHANGED
@@ -28,6 +28,8 @@ A breadcrumb navigation provide links back to previous pages, and shows the user
28
28
  interface Props {
29
29
  homeName?: string
30
30
  homeSlug?: string
31
+ onlyMeta?: boolean
32
+ outerClass?: string
31
33
  values: Breadcrumb[]
32
34
  }
33
35
  ```
@@ -6,18 +6,19 @@
6
6
  interface Props {
7
7
  homeName?: string
8
8
  homeSlug?: string
9
+ onlyMeta?: boolean
9
10
  outerClass?: string
10
11
  values: Breadcrumb[]
11
12
  }
12
13
 
13
- let {homeName = 'Etusivu', homeSlug = '', outerClass, values}: Props = $props(),
14
+ let {homeName = 'Etusivu', homeSlug = '', onlyMeta = false, outerClass, values}: Props = $props(),
14
15
  classes = $state('truncate')
15
16
 
16
17
  const origin = page.url.origin + '/'
17
18
 
18
19
  let originWithSlug = $state(origin + homeSlug),
19
20
  listItems = $derived<Breadcrumb[]>(
20
- Array.isArray(values) && values.length > 0
21
+ validateArray(values)
21
22
  ? [
22
23
  {
23
24
  '@type': 'ListItem',
@@ -51,7 +52,7 @@
51
52
  {/if}
52
53
  </svelte:head>
53
54
 
54
- {#if validateArray(listItems)}
55
+ {#if !onlyMeta && validateArray(listItems)}
55
56
  <div class={classes}>
56
57
  <ol id="breadcrumb" class="max-w-screen-xl mx-auto my-0 px-4 py-2" vocab="https://schema.org/" typeof="BreadcrumbList">
57
58
  {#each listItems as page}
@@ -2,6 +2,7 @@ import { type Breadcrumb } from './';
2
2
  interface Props {
3
3
  homeName?: string;
4
4
  homeSlug?: string;
5
+ onlyMeta?: boolean;
5
6
  outerClass?: string;
6
7
  values: Breadcrumb[];
7
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuspe/components",
3
- "version": "1.7.20",
3
+ "version": "1.7.21",
4
4
  "description": "A reusable SvelteKit component library for form elements, breadcrumbs, prices and images.",
5
5
  "keywords": [
6
6
  "svelteKit",
@@ -79,4 +79,4 @@
79
79
  "typescript": "^5.8.2",
80
80
  "vite": "^6.2.2"
81
81
  }
82
- }
82
+ }