@shimmer-from-structure/svelte 1.1.0 → 2.0.0
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/README.md +7 -3
- package/dist/index.esm.js +1786 -714
- package/dist/index.js +36 -1
- package/dist/src/types.d.ts +5 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -124,7 +124,8 @@ const isLoading = ref(true);
|
|
|
124
124
|
```svelte
|
|
125
125
|
<script>
|
|
126
126
|
import { Shimmer } from '@shimmer-from-structure/svelte';
|
|
127
|
-
|
|
127
|
+
|
|
128
|
+
let isLoading = $state(true);
|
|
128
129
|
</script>
|
|
129
130
|
|
|
130
131
|
<Shimmer loading={isLoading}>
|
|
@@ -205,8 +206,9 @@ const userTemplate = {
|
|
|
205
206
|
import { Shimmer } from '@shimmer-from-structure/svelte';
|
|
206
207
|
import UserCard from './UserCard.svelte';
|
|
207
208
|
|
|
208
|
-
|
|
209
|
-
let loading = true;
|
|
209
|
+
let { user } = $props();
|
|
210
|
+
let loading = $state(true);
|
|
211
|
+
|
|
210
212
|
const userTemplate = {
|
|
211
213
|
name: 'Loading...',
|
|
212
214
|
role: 'Loading role...',
|
|
@@ -534,7 +536,9 @@ provideShimmerConfig({
|
|
|
534
536
|
<!-- App.svelte or any parent component -->
|
|
535
537
|
<script>
|
|
536
538
|
import { setShimmerConfig } from '@shimmer-from-structure/svelte';
|
|
539
|
+
import Dashboard from './Dashboard.svelte';
|
|
537
540
|
|
|
541
|
+
// Must be called at the top level during component initialization
|
|
538
542
|
setShimmerConfig({
|
|
539
543
|
shimmerColor: 'rgba(56, 189, 248, 0.4)',
|
|
540
544
|
backgroundColor: 'rgba(56, 189, 248, 0.1)',
|