m3-svelte 3.4.10 → 3.4.12

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,7 +1,6 @@
1
1
  <script lang="ts">
2
2
  import type { HTMLAttributes, HTMLInputAttributes } from "svelte/elements";
3
- import { tweened } from "svelte/motion";
4
- import { easeEmphasized } from "../misc/easing";
3
+ import { spring } from "svelte/motion";
5
4
 
6
5
  export let extraWrapperOptions: HTMLAttributes<HTMLDivElement> = {};
7
6
  export let extraOptions: HTMLInputAttributes = {};
@@ -15,7 +14,7 @@
15
14
  return n.toFixed(0);
16
15
  };
17
16
 
18
- const valueDisplayed = tweened(value, { duration: 200, easing: easeEmphasized });
17
+ const valueDisplayed = spring(value, { stiffness: 0.3, damping: 1 });
19
18
  const updateValue = (e: Event & { currentTarget: EventTarget & HTMLInputElement }) => {
20
19
  const newValue = Number(e.currentTarget.value);
21
20
  e.preventDefault();
@@ -53,7 +52,7 @@
53
52
  class="tick"
54
53
  class:hidden={Math.abs(tick / 100 - $valueDisplayed / range) < 0.01}
55
54
  class:inactive={tick / 100 > $valueDisplayed / range}
56
- style="left: calc(4px + {tick}% - {i * 2}px);"
55
+ style:--x={tick / 100 - 0.5}
57
56
  ></div>
58
57
  {/each}
59
58
  <div class="thumb"></div>
@@ -126,7 +125,8 @@
126
125
  height: 4px;
127
126
  border-radius: var(--m3-util-rounding-full);
128
127
  top: 50%;
129
- translate: 0 -50%;
128
+ left: calc(50% + (100% - 0.75rem) * var(--x));
129
+ translate: -50% -50%;
130
130
  background-color: rgb(var(--m3-scheme-primary-container));
131
131
  pointer-events: none;
132
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "m3-svelte",
3
- "version": "3.4.10",
3
+ "version": "3.4.12",
4
4
  "license": "Apache-2.0 OR GPL-3.0-only",
5
5
  "repository": "KTibow/m3-svelte",
6
6
  "author": {
@@ -30,29 +30,29 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@sveltejs/adapter-static": "^3.0.8",
33
- "@sveltejs/kit": "^2.18.0",
33
+ "@sveltejs/kit": "^2.20.2",
34
34
  "@sveltejs/package": "^2.3.10",
35
35
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
36
- "@typescript-eslint/eslint-plugin": "^8.26.0",
37
- "@typescript-eslint/parser": "^8.26.0",
36
+ "@typescript-eslint/eslint-plugin": "^8.29.0",
37
+ "@typescript-eslint/parser": "^8.29.0",
38
38
  "eslint": "^8.57.1",
39
- "eslint-config-prettier": "^10.0.2",
40
- "eslint-plugin-svelte": "^3.0.3",
39
+ "eslint-config-prettier": "^10.1.1",
40
+ "eslint-plugin-svelte": "^3.5.0",
41
41
  "fast-glob": "^3.3.3",
42
42
  "globals": "^16.0.0",
43
43
  "prettier": "^3.5.3",
44
44
  "prettier-plugin-svelte": "^3.3.3",
45
- "svelte-check": "^4.1.4",
45
+ "svelte-check": "^4.1.5",
46
46
  "svelte-highlight": "^7.8.2",
47
47
  "tslib": "^2.8.1",
48
48
  "typescript": "^5.8.2",
49
- "vite": "^6.2.0"
49
+ "vite": "^6.2.4"
50
50
  },
51
51
  "dependencies": {
52
52
  "@iconify/types": "^2.0.0",
53
- "@ktibow/iconset-material-symbols": "^0.0.1741080195",
53
+ "@ktibow/iconset-material-symbols": "^0.0.1742538575",
54
54
  "@material/material-color-utilities": "^0.3.0",
55
- "svelte": "^5.22.4"
55
+ "svelte": "^5.25.6"
56
56
  },
57
57
  "files": [
58
58
  "package"