@getmicdrop/svelte-components 2.0.0 → 2.0.2

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.
@@ -0,0 +1,4 @@
1
+ export const browser = typeof window !== 'undefined';
2
+ export const dev = false;
3
+ export const building = false;
4
+ export const version = '';
@@ -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,2 @@
1
+ export const base = '';
2
+ export const assets = '';
@@ -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 '$app/environment';
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,6 +1,6 @@
1
1
  <script>
2
- import { page } from "$app/stores";
3
- import { base } from "$app/paths";
2
+ import { page } from '../../__LIB_STORES__.js';
3
+ import { base } from '../../__LIB_PATHS__.js';
4
4
  import Icon from "../Icons/Icon.svelte";
5
5
  import { onMount } from "svelte";
6
6
 
@@ -1,7 +1,7 @@
1
1
  <script>
2
- import { page } from "$app/stores";
3
- import { base } from "$app/paths";
4
- import { goto } from "$app/navigation";
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";
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { goto } from "$app/navigation";
2
+ import { goto } from '../../../__LIB_NAVIGATION__.js';
3
3
  import Icon from "../../Icons/Icon.svelte";
4
4
  import Input from "../../Input/Input.svelte";
5
5
  import Modal from "../../Modal/Modal.svelte";
@@ -1,6 +1,6 @@
1
1
  <script>
2
2
  import { onMount, onDestroy } from "svelte";
3
- import { browser } from "$app/environment";
3
+ import { browser } from '../../../__LIB_ENVIRONMENT__.js';
4
4
  import SectionHeader from "../performers/SectionHeader.svelte";
5
5
  import ShowList from "./ShowList.svelte";
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getmicdrop/svelte-components",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
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",