@valerius_petrini/corekit-ui 0.1.25 → 0.1.27
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
3
|
import { onMount } from "svelte";
|
|
4
4
|
|
|
5
|
-
import type { DisplaySegment, TypewriterAction } from "../types.js";
|
|
5
|
+
import type { DisplaySegment, TypewriterAction } from "../types/Typewriter.d.js";
|
|
6
6
|
|
|
7
7
|
let { actions = [] as TypewriterAction[], class: className = "" } = $props();
|
|
8
8
|
|
|
@@ -30,11 +30,13 @@
|
|
|
30
30
|
case "delete":
|
|
31
31
|
const index = displaySegments.findIndex(s => s.label === action.to);
|
|
32
32
|
if (index === -1) break;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
deleteSegment.text
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
for (let j = displaySegments.length - 1; j >= index; j--) {
|
|
34
|
+
const deleteSegment = displaySegments[j];
|
|
35
|
+
while (deleteSegment.text.length > 0) {
|
|
36
|
+
deleteSegment.text = deleteSegment.text.slice(0, -1);
|
|
37
|
+
const speed = Math.random() * ((action.maxspeed || 100) - (action.minspeed || 50)) + (action.minspeed || 50);
|
|
38
|
+
await new Promise(resolve => setTimeout(resolve, speed));
|
|
39
|
+
}
|
|
38
40
|
}
|
|
39
41
|
displaySegments.splice(index, 1);
|
|
40
42
|
break;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
1
|
+
export { default as Button } from "./components/Button.svelte";
|
|
2
|
+
export { default as Typewriter } from "./components/Typewriter.svelte";
|
|
3
|
+
export { default as Analytics } from "./components/Analytics.svelte";
|
|
4
|
+
export { default as SEO } from "./components/SEO.svelte";
|
|
5
|
+
export { fbmBackground } from "./actions/fbm.ts";
|
|
6
|
+
export type { TypewriterAction, DisplaySegment } from "./types/Typewriter.d.ts";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { fbmBackground } from "./actions/fbm.js";
|
|
7
|
-
export { Button, Typewriter, Analytics, SEO, fbmBackground };
|
|
1
|
+
export { default as Button } from "./components/Button.svelte";
|
|
2
|
+
export { default as Typewriter } from "./components/Typewriter.svelte";
|
|
3
|
+
export { default as Analytics } from "./components/Analytics.svelte";
|
|
4
|
+
export { default as SEO } from "./components/SEO.svelte";
|
|
5
|
+
export { fbmBackground } from "./actions/fbm.js";
|
package/package.json
CHANGED
|
File without changes
|