@leftium/gg 0.0.31 → 0.0.33

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,26 +1,24 @@
1
1
  <script lang="ts">
2
2
  import { dev } from '$app/environment';
3
3
 
4
- let { ggResult } = $props();
4
+ let {
5
+ url,
6
+ fileName,
7
+ title = fileName
8
+ }: { url: string; fileName: string; title?: string } = $props();
5
9
 
6
10
  // svelte-ignore non_reactive_update
7
11
  let iframeElement: HTMLIFrameElement;
8
12
 
9
13
  function onclick(event: MouseEvent) {
10
- iframeElement.src = ggResult.url;
14
+ iframeElement.src = url;
11
15
  event.preventDefault();
12
16
  }
13
17
  </script>
14
18
 
15
19
  {#if dev}
16
- [📝<a
17
- {onclick}
18
- href={ggResult.url}
19
- title={`${ggResult.fileName}@${ggResult.functionName}`}
20
- target="_open-in-editor"
21
- class="open-in-editor-link"
22
- >
23
- {ggResult.fileName}
20
+ [📝<a {onclick} href={url} {title} target="_open-in-editor" class="open-in-editor-link">
21
+ {fileName}
24
22
  </a>
25
23
  👀]
26
24
 
@@ -1,5 +1,8 @@
1
- declare const OpenInEditorLink: import("svelte").Component<{
2
- ggResult: any;
3
- }, {}, "">;
1
+ type $$ComponentProps = {
2
+ url: string;
3
+ fileName: string;
4
+ title?: string;
5
+ };
6
+ declare const OpenInEditorLink: import("svelte").Component<$$ComponentProps, {}, "">;
4
7
  type OpenInEditorLink = ReturnType<typeof OpenInEditorLink>;
5
8
  export default OpenInEditorLink;