@panomc/sdk 1.0.0-dev.15 → 1.0.0-dev.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panomc/sdk",
3
- "version": "1.0.0-dev.15",
3
+ "version": "1.0.0-dev.17",
4
4
  "author": "PanoMC",
5
5
  "repository": {
6
6
  "url": "https://github.com/PanoMC/sdk"
@@ -1,4 +1,4 @@
1
- import { mount, unmount, hydrate } from 'svelte';
1
+ import { hydrate, mount, unmount } from "svelte";
2
2
 
3
3
  /**
4
4
  * Wraps a dynamic component import to include the correct Svelte runtime mount/unmount methods.
@@ -8,7 +8,7 @@ import { mount, unmount, hydrate } from 'svelte';
8
8
  * @returns {() => Promise<any>} - Wrapped importer
9
9
  */
10
10
  export function viewComponent(importer) {
11
- return async () => {
11
+ const wrapper = async () => {
12
12
  const module = await importer();
13
13
  return {
14
14
  ...module,
@@ -17,4 +17,6 @@ export function viewComponent(importer) {
17
17
  hydrate: (options) => hydrate(module.default, options),
18
18
  };
19
19
  };
20
+ wrapper._importer = importer;
21
+ return wrapper;
20
22
  }