@getmicdrop/svelte-components 2.0.0 → 2.0.1
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/__LIB_ENVIRONMENT__.js +4 -0
- package/dist/__LIB_NAVIGATION__.js +21 -0
- package/dist/__LIB_PATHS__.js +2 -0
- package/dist/__LIB_STORES__.js +22 -0
- package/dist/components/Calendar/Calendar.svelte +1 -1
- package/dist/components/Layout/BottomNav.svelte +2 -2
- package/dist/components/Layout/Header.svelte +3 -3
- package/dist/components/pages/performers/ShowItemCard.svelte +1 -1
- package/dist/components/pages/shows/TabContent.svelte +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function goto(url, opts) {
|
|
2
|
+
if (typeof window !== 'undefined' && window.location) {
|
|
3
|
+
if (opts?.replaceState) {
|
|
4
|
+
window.history.replaceState({}, '', url);
|
|
5
|
+
} else {
|
|
6
|
+
window.location.href = url;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export function beforeNavigate(callback) {
|
|
11
|
+
// No-op for library builds
|
|
12
|
+
}
|
|
13
|
+
export function afterNavigate(callback) {
|
|
14
|
+
// No-op for library builds
|
|
15
|
+
}
|
|
16
|
+
export function disable() {
|
|
17
|
+
// No-op for library builds
|
|
18
|
+
}
|
|
19
|
+
export function enable() {
|
|
20
|
+
// No-op for library builds
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { writable } from 'svelte/store';
|
|
2
|
+
|
|
3
|
+
// Create a minimal page store for library builds
|
|
4
|
+
const createPageStore = () => {
|
|
5
|
+
const { subscribe, set } = writable({
|
|
6
|
+
url: typeof window !== 'undefined' ? new URL(window.location.href) : new URL('http://localhost'),
|
|
7
|
+
params: {},
|
|
8
|
+
route: { id: null },
|
|
9
|
+
status: 200,
|
|
10
|
+
error: null,
|
|
11
|
+
data: {},
|
|
12
|
+
form: null,
|
|
13
|
+
state: {}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
return { subscribe };
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const page = createPageStore();
|
|
20
|
+
|
|
21
|
+
export const navigating = writable(null);
|
|
22
|
+
export const updated = writable(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { onMount, onDestroy, createEventDispatcher } from 'svelte';
|
|
3
|
-
import { browser } from '
|
|
3
|
+
import { browser } from './__LIB_ENVIRONMENT__.js';
|
|
4
4
|
import { Calendar } from '@fullcalendar/core';
|
|
5
5
|
import dayGridPlugin from '@fullcalendar/daygrid';
|
|
6
6
|
import interactionPlugin from '@fullcalendar/interaction';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { page } from
|
|
3
|
-
import { base } from
|
|
4
|
-
import { goto } from
|
|
2
|
+
import { page } from './__LIB_STORES__.js';
|
|
3
|
+
import { base } from './__LIB_PATHS__.js';
|
|
4
|
+
import { goto } from './__LIB_NAVIGATION__.js';
|
|
5
5
|
import Logo from "../../../assets/images/Logo.png";
|
|
6
6
|
import { Avatar } from "flowbite-svelte";
|
|
7
7
|
import DarkModeToggle from "../DarkModeToggle.svelte";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getmicdrop/svelte-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Shared component library for Micdrop applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"dev": "vite",
|
|
28
28
|
"build": "vite build && npm run build:types",
|
|
29
|
-
"build:lib": "svelte-package -o dist",
|
|
29
|
+
"build:lib": "svelte-package -o dist && node scripts/post-build.js",
|
|
30
30
|
"build:types": "svelte-package -o dist",
|
|
31
31
|
"preview": "vite preview",
|
|
32
32
|
"test": "vitest run",
|