@ims360/svelte-ivory 0.5.2 → 0.5.3
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/colorTheme.svelte.d.ts.map +1 -1
- package/dist/colorTheme.svelte.js +1 -1
- package/dist/components/layout/tabs/Tab.svelte +1 -2
- package/dist/components/layout/tabs/Tab.svelte.d.ts.map +1 -1
- package/dist/utils/attachments/shortcut.svelte.d.ts.map +1 -1
- package/dist/utils/attachments/shortcut.svelte.js +1 -1
- package/package.json +2 -2
- package/src/lib/colorTheme.svelte.ts +2 -1
- package/src/lib/components/layout/tabs/Tab.svelte +1 -2
- package/src/lib/utils/attachments/shortcut.svelte.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorTheme.svelte.d.ts","sourceRoot":"","sources":["../src/lib/colorTheme.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"colorTheme.svelte.d.ts","sourceRoot":"","sources":["../src/lib/colorTheme.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAK5C,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAI/D,cAAM,eAAe;IACjB,OAAO,CAAC,YAAY,CAA0C;;IAY9D,IAAI,KAAK,IAWQ,oBAAoB,CATpC;IAED,IAAI,OAAO,qBAKV;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,oBAAoB,EAepC;IAED,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAcZ;CACL;AAED,eAAO,MAAM,UAAU,iBAAwB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import { page } from '$app/state';
|
|
3
2
|
import type { IvoryComponent } from '../../../types';
|
|
4
3
|
import { merge, pseudoRandomId } from '../../../utils/functions';
|
|
5
4
|
import { onMount, type Snippet } from 'svelte';
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
if (typeof active === 'boolean') {
|
|
34
33
|
return active;
|
|
35
34
|
} else if (href) {
|
|
36
|
-
return
|
|
35
|
+
return window.location.href.startsWith(href);
|
|
37
36
|
} else if (tabs && tabs.selectedTab === tabId) {
|
|
38
37
|
return true;
|
|
39
38
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tabs/Tab.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tab.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tabs/Tab.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IAC3E,KAAK,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC;IACzD,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IAC3C,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AA6CL,QAAA,MAAM,GAAG,8CAAwC,CAAC;AAClD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;AAClC,eAAe,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortcut.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/attachments/shortcut.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shortcut.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/attachments/shortcut.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,MAAM,WAAW,cAAc;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AA8CD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAQ3D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ims360/svelte-ivory",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"svelte"
|
|
6
6
|
],
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"@eslint/compat": "^2.0.2",
|
|
87
87
|
"@eslint/js": "^10.0.1",
|
|
88
88
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
89
|
+
"@sveltejs/kit": "^2.55.0",
|
|
89
90
|
"@sveltejs/package": "^2.5.7",
|
|
90
91
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
91
92
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -112,7 +113,6 @@
|
|
|
112
113
|
},
|
|
113
114
|
"peerDependencies": {
|
|
114
115
|
"@skeletonlabs/skeleton": "^4.0.0",
|
|
115
|
-
"@sveltejs/kit": "^2.55.0",
|
|
116
116
|
"svelte": "^5.55.1"
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { browser } from '$app/environment';
|
|
2
1
|
import type { Handle } from '@sveltejs/kit';
|
|
3
2
|
import { cookie } from './utils/functions';
|
|
4
3
|
|
|
@@ -6,6 +5,8 @@ const COOKIE_THEME_KEY = 'theme';
|
|
|
6
5
|
|
|
7
6
|
export type ColorThemePreference = 'system' | 'light' | 'dark';
|
|
8
7
|
|
|
8
|
+
const browser = typeof window !== 'undefined';
|
|
9
|
+
|
|
9
10
|
class ThemeController {
|
|
10
11
|
private currentTheme = $state<ColorThemePreference>('system');
|
|
11
12
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import { page } from '$app/state';
|
|
3
2
|
import type { IvoryComponent } from '$lib/types';
|
|
4
3
|
import { merge, pseudoRandomId } from '$lib/utils/functions';
|
|
5
4
|
import { onMount, type Snippet } from 'svelte';
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
if (typeof active === 'boolean') {
|
|
34
33
|
return active;
|
|
35
34
|
} else if (href) {
|
|
36
|
-
return
|
|
35
|
+
return window.location.href.startsWith(href);
|
|
37
36
|
} else if (tabs && tabs.selectedTab === tabId) {
|
|
38
37
|
return true;
|
|
39
38
|
} else {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { browser } from '$app/environment';
|
|
2
1
|
import type { Attachment } from 'svelte/attachments';
|
|
3
2
|
import { pseudoRandomId } from '../functions';
|
|
4
3
|
|
|
@@ -10,6 +9,8 @@ export interface ShortcutParams {
|
|
|
10
9
|
callback: () => void;
|
|
11
10
|
}
|
|
12
11
|
|
|
12
|
+
const browser = typeof window !== 'undefined';
|
|
13
|
+
|
|
13
14
|
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
14
15
|
const callbacks: Map<string, IdShortcutParams[]> = new Map();
|
|
15
16
|
|