@cloudparker/moldex.js 0.0.50 → 0.0.51

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.
@@ -1,5 +1,6 @@
1
1
  export * from './date/date-service.js';
2
2
  export * from './dialog/dialog-service.js';
3
+ export * from './navigation/navigation-service.js';
3
4
  export * from './screen/screen-service.js';
4
5
  export * from './toast/toast-service.js';
5
6
  export * from './utils/utils-service.js';
@@ -1,6 +1,6 @@
1
1
  export * from './date/date-service.js';
2
2
  export * from './dialog/dialog-service.js';
3
- // export * from './navigation/navigation-service.js';
3
+ export * from './navigation/navigation-service.js';
4
4
  export * from './screen/screen-service.js';
5
5
  export * from './toast/toast-service.js';
6
6
  export * from './utils/utils-service.js';
@@ -1,4 +1,4 @@
1
- import { goto, pushState } from '$app/navigation';
1
+ // import { goto, pushState } from '$app/navigation';
2
2
  import { createRefererStore } from '../../stores/referrer-store/referrer-store.svelte';
3
3
  import { BROWSER } from 'esm-env';
4
4
  export const referrer = createRefererStore();
@@ -12,7 +12,7 @@ export const popBackState = () => {
12
12
  export const registerBackPress = (state) => {
13
13
  if (BROWSER) {
14
14
  pushBackState(state);
15
- pushState('', {});
15
+ window.history.pushState({}, '');
16
16
  }
17
17
  };
18
18
  export const addBackKeyListener = (callback) => {
@@ -21,11 +21,11 @@ export const addBackKeyListener = (callback) => {
21
21
  if (callback) {
22
22
  let result = callback(event);
23
23
  if (result) {
24
- pushState('', {});
24
+ window.history.pushState({}, '');
25
25
  }
26
26
  }
27
27
  };
28
- pushState('', {});
28
+ window.history.pushState({}, '');
29
29
  window.addEventListener('popstate', listener);
30
30
  return listener;
31
31
  }
@@ -39,7 +39,7 @@ export function goBack() {
39
39
  history.back();
40
40
  }
41
41
  export function goHome() {
42
- goto('/', { replaceState: true });
42
+ history.back();
43
43
  }
44
44
  ;
45
45
  export function createRedirectUrl() {
@@ -8,7 +8,6 @@ export * from './navbar/index.js';
8
8
  export * from './no-data/index.js';
9
9
  export * from './pagination/index.js';
10
10
  export * from './progressbar/index.js';
11
- // export * from './referrer/index.js';
12
11
  export * from './ruler/index.js';
13
12
  export * from './sidebar/index.js';
14
13
  export * from './screen-detector/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudparker/moldex.js",
3
- "version": "0.0.50",
3
+ "version": "0.0.51",
4
4
  "author": "cloudparker.com",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -1,16 +0,0 @@
1
- <script lang="ts">
2
- import { page } from '$app/stores';
3
- import { referrer } from '../../../../services/navigation/navigation-service';
4
- import { BROWSER } from 'esm-env';
5
-
6
- $effect(() => {
7
- if (BROWSER) {
8
- const unsubscribe = page.subscribe((_) => {
9
- referrer.referer = referrer.referer === location.href ? referrer.referer : location.href;
10
- });
11
- return () => {
12
- unsubscribe && unsubscribe();
13
- };
14
- }
15
- });
16
- </script>
@@ -1,18 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- declare const Referrer: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
- [evt: string]: CustomEvent<any>;
16
- }, {}, {}, "">;
17
- type Referrer = InstanceType<typeof Referrer>;
18
- export default Referrer;
@@ -1,2 +0,0 @@
1
- import Referrer from "./components/referrer.svelte";
2
- export { Referrer, };
@@ -1,2 +0,0 @@
1
- import Referrer from "./components/referrer.svelte";
2
- export { Referrer, };