intelliwaketssveltekitv25 0.1.42 → 0.1.43
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/dist/Functions.js
CHANGED
|
@@ -4,7 +4,6 @@ import { tick } from 'svelte';
|
|
|
4
4
|
import { goto } from '$app/navigation';
|
|
5
5
|
import { browser } from '$app/environment';
|
|
6
6
|
import { page } from '$app/state';
|
|
7
|
-
import { get } from 'svelte/store';
|
|
8
7
|
export const KEY_UP_ARROW = 38;
|
|
9
8
|
export const KEY_DOWN_ARROW = 40;
|
|
10
9
|
export const KEY_LEFT_ARROW = 37;
|
|
@@ -540,7 +539,7 @@ export function clickSubmitOnFocusOut(el) {
|
|
|
540
539
|
*/
|
|
541
540
|
export async function setSearchParam(key, value) {
|
|
542
541
|
if (browser) {
|
|
543
|
-
const pageURL =
|
|
542
|
+
const pageURL = page.url;
|
|
544
543
|
if (pageURL.searchParams.get(key) !== value) {
|
|
545
544
|
const url = new URL(pageURL);
|
|
546
545
|
if (isNullUndefined(value)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang='ts'>
|
|
2
|
-
import { page
|
|
2
|
+
import { page } from '$app/state'
|
|
3
3
|
import ListGroupItems from './ListGroupItems.svelte'
|
|
4
4
|
import { quintOut } from 'svelte/easing'
|
|
5
5
|
import { fly } from 'svelte/transition'
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
detail?: Snippet
|
|
54
54
|
} = $props()
|
|
55
55
|
|
|
56
|
-
let pathAnalyzer = $derived(browser ? new PathAnalyzer(
|
|
56
|
+
let pathAnalyzer = $derived(browser ? new PathAnalyzer(page, pageRoute) : null)
|
|
57
57
|
|
|
58
58
|
let innerWidth = $state<number | undefined>(undefined)
|
|
59
59
|
|
package/dist/PathAnalyzer.js
CHANGED
|
@@ -156,8 +156,8 @@ export class PathAnalyzer {
|
|
|
156
156
|
return navs;
|
|
157
157
|
}
|
|
158
158
|
isOpen(path) {
|
|
159
|
-
return (path ?? '') === (this.activePageSlugs ?? '') || (!!path && ((this.activePageSlugs ?? '').startsWith(path + '/') || (this.activePageSlugs ?? '').endsWith(path))) ||
|
|
160
|
-
(this.page.url.search && (path ?? '') === ((this.activePageSlugs ?? '') + this.page.url.search) || (!!path && (((this.activePageSlugs ?? '') + this.page.url.search).startsWith(path + '/') || ((this.activePageSlugs ?? '') + this.page.url.search).endsWith(path))));
|
|
159
|
+
return (path ?? '') === (this.activePageSlugs ?? '') || (!!path && ((this.activePageSlugs ?? '').startsWith(path + '/') || (this.activePageSlugs ?? '').endsWith('/' + path))) ||
|
|
160
|
+
(this.page.url.search && (path ?? '') === ((this.activePageSlugs ?? '') + this.page.url.search) || (!!path && (((this.activePageSlugs ?? '') + this.page.url.search).startsWith(path + '/') || ((this.activePageSlugs ?? '') + this.page.url.search).endsWith('/' + path))));
|
|
161
161
|
}
|
|
162
162
|
open(path, closeIfOpen = true) {
|
|
163
163
|
if (closeIfOpen) {
|