@ainsleydev/sveltekit-helper 0.6.2 → 0.6.4

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.
@@ -41,7 +41,6 @@ export type TableOfContentsProps = {
41
41
 
42
42
  <script lang="ts">
43
43
  import { onMount } from 'svelte'
44
- import Sidebar from './Sidebar.svelte'
45
44
 
46
45
  let {
47
46
  heading = '',
@@ -133,29 +132,27 @@ export type TableOfContentsProps = {
133
132
  <TableOfContents items={[{ label: 'Intro', href: 'intro' }]} />
134
133
  ```
135
134
  -->
136
- <Sidebar>
137
- <div class="toc" class:toc--border={displayBorder}>
138
- {#if heading !== ''}
139
- <p class="toc__heading">
140
- {heading}
141
- </p>
142
- {/if}
143
- <menu class="toc__items">
144
- {#each items as item, index (index)}
145
- <li class="toc__item">
146
- <a
147
- class="toc__link"
148
- class:toc__link--active={activeId ===
149
- (item.href.startsWith('#') ? item.href.slice(1) : item.href)}
150
- href="#{item.href}"
151
- >
152
- <small>{item.label}</small>
153
- </a>
154
- </li>
155
- {/each}
156
- </menu>
157
- </div>
158
- </Sidebar>
135
+ <div class="toc" class:toc--border={displayBorder}>
136
+ {#if heading !== ''}
137
+ <p class="toc__heading">
138
+ {heading}
139
+ </p>
140
+ {/if}
141
+ <menu class="toc__items">
142
+ {#each items as item, index (index)}
143
+ <li class="toc__item">
144
+ <a
145
+ class="toc__link"
146
+ class:toc__link--active={activeId ===
147
+ (item.href.startsWith('#') ? item.href.slice(1) : item.href)}
148
+ href="#{item.href}"
149
+ >
150
+ <small>{item.label}</small>
151
+ </a>
152
+ </li>
153
+ {/each}
154
+ </menu>
155
+ </div>
159
156
 
160
157
  <style>.toc__item {
161
158
  margin-bottom: 0.5rem;
@@ -168,16 +165,16 @@ export type TableOfContentsProps = {
168
165
  will-change: color;
169
166
  }
170
167
  .toc__link--active {
171
- color: var(--token-text-action);
168
+ color: var(--toc-colour-active, var(--token-text-action));
172
169
  font-weight: var(--font-weight-medium);
173
170
  }
174
171
  .toc__link:hover {
175
- color: var(--token-text-action);
172
+ color: var(--toc-colour-active, var(--token-text-action));
176
173
  }
177
174
  @media screen and (min-width: 768px) {
178
175
  .toc--border {
179
- margin-left: 3rem;
180
- padding-left: 3rem;
181
- border-left: 1px solid var(--colour-light-600);
176
+ margin-left: var(--toc-border-offset, 3rem);
177
+ padding-left: var(--toc-border-offset, 3rem);
178
+ border-left: 1px solid var(--toc-border-colour, var(--colour-light-600));
182
179
  }
183
180
  }</style>
@@ -1 +1 @@
1
- {"version":3,"file":"TableOfContents.svelte.d.ts","sourceRoot":"","sources":["../../src/components/TableOfContents.svelte.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,OAAO,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAgGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,eAAe,0DAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"TableOfContents.svelte.d.ts","sourceRoot":"","sources":["../../src/components/TableOfContents.svelte.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,OAAO,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AA4FF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,eAAe,0DAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ainsleydev/sveltekit-helper",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "SvelteKit utilities, components and helpers for ainsley.dev builds",
5
5
  "license": "MIT",
6
6
  "type": "module",