@marianmeres/stuic 2.1.21 → 2.1.22

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.
@@ -8,7 +8,16 @@
8
8
  let {
9
9
  class: classProp = "",
10
10
  bgStrokeColor = "rgba(0 0 0 / .1)",
11
- }: { class?: string; bgStrokeColor?: string } = $props();
11
+ strokeWidth,
12
+ noOscillate,
13
+ rotateDuration = ".75s",
14
+ }: {
15
+ class?: string;
16
+ bgStrokeColor?: string;
17
+ strokeWidth?: number;
18
+ noOscillate?: boolean;
19
+ rotateDuration?: string;
20
+ } = $props();
12
21
 
13
22
  /**
14
23
  * NOTE: we happen to have 4 distinct values here which effect the overall look and feel...
@@ -19,7 +28,7 @@
19
28
  */
20
29
 
21
30
  const ticker = createTickerRAF(50, true);
22
- let completeness = $derived(oscillate($ticker / 1000, 0.15, 0.85));
31
+ let completeness = $derived(noOscillate ? 0.66 : oscillate($ticker / 1000, 0.15, 0.85));
23
32
 
24
33
  onDestroy(ticker.stop);
25
34
  </script>
@@ -28,5 +37,6 @@
28
37
  {completeness}
29
38
  class={twMerge("stuic-spinner-circle animate-spin", classProp)}
30
39
  {bgStrokeColor}
31
- style="animation-duration: .75s"
40
+ {strokeWidth}
41
+ style="animation-duration: {rotateDuration}"
32
42
  />
@@ -1,6 +1,9 @@
1
1
  type $$ComponentProps = {
2
2
  class?: string;
3
3
  bgStrokeColor?: string;
4
+ strokeWidth?: number;
5
+ noOscillate?: boolean;
6
+ rotateDuration?: string;
4
7
  };
5
8
  declare const SpinnerCircle: import("svelte").Component<$$ComponentProps, {}, "">;
6
9
  type SpinnerCircle = ReturnType<typeof SpinnerCircle>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "2.1.21",
3
+ "version": "2.1.22",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",