svelte-common 6.11.5 → 6.11.6

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": "svelte-common",
3
- "version": "6.11.5",
3
+ "version": "6.11.6",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -77,7 +77,7 @@
77
77
  },
78
78
  "optionalDependencies": {
79
79
  "mf-hosting-cloudflare": "^1.0.6",
80
- "mf-hosting-frontend": "^3.2.2"
80
+ "mf-hosting-frontend": "^3.2.3"
81
81
  },
82
82
  "repository": {
83
83
  "type": "git",
@@ -71,7 +71,7 @@
71
71
  <svg class="acc" width="10000" height="10000">
72
72
  <path bind:this={path} />
73
73
  </svg>
74
- <div bind:this={anchor} on:mouseleave={close} role="none">
74
+ <div bind:this={anchor} onmouseleave={close} role="none">
75
75
  <slot name="anchor" />
76
76
  </div>
77
77
  <div bind:this={content}>
@@ -1,12 +1,13 @@
1
1
  <script>
2
- let open = false;
2
+ let open = $state(false);
3
3
 
4
- function toggle() {
4
+ function onclick(event) {
5
+ event.preventDefault();
5
6
  open = !open;
6
7
  }
7
8
  </script>
8
9
 
9
- <button on:click|preventDefault={toggle}>
10
+ <button {onclick}>
10
11
  <slot />
11
12
  </button>
12
13
  {#if open}
@@ -1,19 +1,20 @@
1
1
  <script>
2
2
  import AnchorContentCatcher from "./AnchorContentCatcher.svelte";
3
3
 
4
- let open = false;
4
+ let open = $state(false);
5
5
 
6
- function hide() {
6
+ function close() {
7
7
  open = false;
8
8
  }
9
9
 
10
- function show() {
10
+ function show(event) {
11
+ event.preventDefault();
11
12
  open = true;
12
13
  }
13
14
  </script>
14
15
 
15
16
  {#if open}
16
- <AnchorContentCatcher close={hide}>
17
+ <AnchorContentCatcher {close}>
17
18
  <a href=" " slot="anchor">
18
19
  <slot name="title" />
19
20
  </a>
@@ -22,7 +23,7 @@
22
23
  </div>
23
24
  </AnchorContentCatcher>
24
25
  {:else}
25
- <a href=" " on:click|preventDefault={show} on:mouseenter={show}>
26
+ <a href=" " onclick={show} onmouseenter={show}>
26
27
  <slot name="title" />
27
28
  <svg width="18" height="16">
28
29
  <path d="M6 7l6 6 6-6 2 2-8 8-8-8z" />