@humanspeak/svelte-virtual-list 0.1.4 → 0.1.5
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": "@humanspeak/svelte-virtual-list",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "A lightweight, high-performance virtual list component for Svelte 5 that renders large datasets with minimal memory usage. Features include dynamic height support, smooth scrolling, TypeScript support, and efficient DOM recycling. Ideal for infinite scrolling lists, data tables, chat interfaces, and any application requiring the rendering of thousands of items without compromising performance. Zero dependencies and fully customizable.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"svelte": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
23
|
"dev": "vite dev",
|
|
24
|
-
"build": "
|
|
24
|
+
"build": "vite build && npm run package",
|
|
25
25
|
"preview": "vite preview",
|
|
26
26
|
"package": "svelte-kit sync && svelte-package && publint",
|
|
27
27
|
"prepublishOnly": "npm run package",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
"test:watch": "vitest",
|
|
33
33
|
"lint": "prettier --check . && eslint .",
|
|
34
34
|
"lint:fix": "npm run format && eslint . --fix",
|
|
35
|
-
"format": "prettier --write ."
|
|
36
|
-
"generate-social": "tsx scripts/generate-social-images.ts"
|
|
35
|
+
"format": "prettier --write ."
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
38
|
"esm-env": "^1.2.1"
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { onMount } from 'svelte'
|
|
3
|
-
import html2canvas from 'html2canvas'
|
|
4
|
-
|
|
5
|
-
export let type: 'og' | 'twitter' = 'og'
|
|
6
|
-
|
|
7
|
-
const dimensions = {
|
|
8
|
-
og: { width: 1200, height: 630 },
|
|
9
|
-
twitter: { width: 1200, height: 600 }
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
onMount(async () => {
|
|
13
|
-
const element = document.getElementById('social-card')
|
|
14
|
-
if (element) {
|
|
15
|
-
const canvas = await html2canvas(element)
|
|
16
|
-
const dataUrl = canvas.toDataURL('image/png')
|
|
17
|
-
// Save or process the image
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<div
|
|
23
|
-
id="social-card"
|
|
24
|
-
style="width: {dimensions[type].width}px; height: {dimensions[type].height}px;"
|
|
25
|
-
class="relative bg-gradient-to-br from-[#FF3E00] to-[#40B3FF] p-16"
|
|
26
|
-
>
|
|
27
|
-
<div class="flex flex-col items-center justify-center h-full text-white">
|
|
28
|
-
<img src="/humanspeak-bubble.svg" alt="Humanspeak Logo" class="w-32 h-32 mb-8" />
|
|
29
|
-
<h1 class="text-6xl font-bold mb-6">Svelte Virtual List</h1>
|
|
30
|
-
<p class="text-2xl opacity-90">High Performance List Virtualization for Svelte 5</p>
|
|
31
|
-
|
|
32
|
-
<!-- Stats/Features -->
|
|
33
|
-
<div class="flex gap-8 mt-12">
|
|
34
|
-
<div class="text-center">
|
|
35
|
-
<div class="text-4xl font-bold">10k+</div>
|
|
36
|
-
<div class="text-sm opacity-80">Items</div>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="text-center">
|
|
39
|
-
<div class="text-4xl font-bold">60fps</div>
|
|
40
|
-
<div class="text-sm opacity-80">Smooth Scroll</div>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="text-center">
|
|
43
|
-
<div class="text-4xl font-bold">5kb</div>
|
|
44
|
-
<div class="text-sm opacity-80">Gzipped</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<!-- Watermark -->
|
|
50
|
-
<div class="absolute bottom-6 right-6 flex items-center gap-2 text-white/80">
|
|
51
|
-
<img src="/humanspeak-bubble.svg" alt="Humanspeak" class="w-6 h-6" />
|
|
52
|
-
<span>humanspeak.com</span>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const SocialCard: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
type?: "og" | "twitter";
|
|
16
|
-
}, {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
}, {}, {}, string>;
|
|
19
|
-
type SocialCard = InstanceType<typeof SocialCard>;
|
|
20
|
-
export default SocialCard;
|