Skip to content

Commit 26bbd81

Browse files
committed
docs: sync installation version and README
1 parent d90cf12 commit 26bbd81

35 files changed

Lines changed: 274 additions & 167 deletions

File tree

.changeset/popular-emus-lay.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@svelte-put/preprocess-external-link': patch
3+
'@svelte-put/cloudflare-turnstile': patch
4+
'@svelte-put/preprocess-auto-slug': patch
5+
'@svelte-put/clickoutside': patch
6+
'@svelte-put/dragscroll': patch
7+
'@svelte-put/inline-svg': patch
8+
'@svelte-put/lockscroll': patch
9+
'@svelte-put/intersect': patch
10+
'@svelte-put/shortcut': patch
11+
'@svelte-put/movable': patch
12+
'@svelte-put/avatar': patch
13+
'@svelte-put/resize': patch
14+
'@svelte-put/copy': patch
15+
'@svelte-put/noti': patch
16+
'@svelte-put/toc': patch
17+
'@svelte-put/qr': patch
18+
---
19+
20+
sync README.md and installation version in docs page

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Useful svelte stuff to put in your projects
3131
| [@svelte-put/movable][github.movable] | move node on mousedown | [![npm.movable.badge]][npm.movable] | [Changelog][github.movable.changelog] | [![docs.badge]][docs.movable] |
3232
| [@svelte-put/noti][github.noti] | type-safe & headless async notification builder | [![npm.noti.badge]][npm.noti] | [Changelog][github.noti.changelog] | [![docs.badge]][docs.noti] |
3333
| [@svelte-put/preprocess-auto-slug][github.preprocess-auto-slug] | auto add `id` and anchor to selected nodes | [![npm.preprocess-auto-slug.badge]][npm.preprocess-auto-slug] | [Changelog][github.preprocess-auto-slug.changelog] | [![docs.badge]][docs.preprocess-auto-slug] |
34+
| [@svelte-put/preprocess-external-link][github.preprocess-external-link] | auto add `id` and anchor to selected nodes | [![npm.preprocess-external-link.badge]][npm.preprocess-external-link] | [Changelog][github.preprocess-external-link.changelog] | [![docs.badge]][docs.preprocess-external-link] |
3435
| [@svelte-put/qr][github.qr] | render QR as `img` or `svg` | [![npm.qr.badge]][npm.qr] | [Changelog][github.qr.changelog] | [![docs.badge]][docs.qr] |
3536
| [@svelte-put/resize][github.resize] | wrapper for ResizeObserver | [![npm.resize.badge]][npm.resize] | [Changelog][github.resize.changelog] | [![docs.badge]][docs.resize] |
3637
| [@svelte-put/shortcut][github.shortcut] | add keyboard shortcuts to node | [![npm.shortcut.badge]][npm.shortcut] | [Changelog][github.shortcut.changelog] | [![docs.badge]][docs.shortcut] |
@@ -82,8 +83,10 @@ pnpm turbo
8283
[github.movable.changelog]: https://github.com/vnphanquang/svelte-put/blob/main/packages/movable/CHANGELOG.md
8384
[github.noti]: https://github.com/vnphanquang/svelte-put/tree/main/packages/noti
8485
[github.noti.changelog]: https://github.com/vnphanquang/svelte-put/blob/main/packages/noti/CHANGELOG.md
85-
[github.preprocess-auto-slug]: https://github.com/vnphanquang/svelte-put/tree/main/packages/auto-slug
86-
[github.preprocess-auto-slug.changelog]: https://github.com/vnphanquang/svelte-put/blob/main/packages/auto-slug/CHANGELOG.md
86+
[github.preprocess-auto-slug]: https://github.com/vnphanquang/svelte-put/tree/main/packages/preprocess-auto-slug
87+
[github.preprocess-auto-slug.changelog]: https://github.com/vnphanquang/svelte-put/blob/main/packages/preprocess-auto-slug/CHANGELOG.md
88+
[github.preprocess-external-link]: https://github.com/vnphanquang/svelte-put/tree/main/packages/preprocess-external-link
89+
[github.preprocess-external-link.changelog]: https://github.com/vnphanquang/svelte-put/blob/main/packages/preprocess-external-link/CHANGELOG.md
8790
[github.qr]: https://github.com/vnphanquang/svelte-put/tree/main/packages/qr
8891
[github.qr.changelog]: https://github.com/vnphanquang/svelte-put/blob/main/packages/qr/CHANGELOG.md
8992
[github.resize]: https://github.com/vnphanquang/svelte-put/tree/main/packages/resize
@@ -126,6 +129,8 @@ pnpm turbo
126129
[npm.noti]: https://www.npmjs.com/package/@svelte-put/noti
127130
[npm.preprocess-auto-slug.badge]: https://img.shields.io/npm/v/@svelte-put/preprocess-auto-slug
128131
[npm.preprocess-auto-slug]: https://www.npmjs.com/package/@svelte-put/preprocess-auto-slug
132+
[npm.preprocess-external-link.badge]: https://img.shields.io/npm/v/@svelte-put/preprocess-external-link
133+
[npm.preprocess-external-link]: https://www.npmjs.com/package/@svelte-put/preprocess-external-link
129134
[npm.qr.badge]: https://img.shields.io/npm/v/@svelte-put/qr
130135
[npm.qr]: https://www.npmjs.com/package/@svelte-put/qr
131136
[npm.resize.badge]: https://img.shields.io/npm/v/@svelte-put/resize
@@ -155,6 +160,7 @@ pnpm turbo
155160
[docs.movable]: https://svelte-put.vnphanquang.com/docs/movable
156161
[docs.noti]: https://svelte-put.vnphanquang.com/docs/noti
157162
[docs.preprocess-auto-slug]: https://svelte-put.vnphanquang.com/docs/preprocess-auto-slug
163+
[docs.preprocess-external-link]: https://svelte-put.vnphanquang.com/docs/preprocess-external-link
158164
[docs.qr]: https://svelte-put.vnphanquang.com/docs/qr
159165
[docs.resize]: https://svelte-put.vnphanquang.com/docs/resize
160166
[docs.shortcut]: https://svelte-put.vnphanquang.com/docs/shortcut

packages/avatar/README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[![npm.badge]][npm] [![bundlephobia.badge]][bundlephobia] [![docs.badge]][docs] [![repl.badge]][repl]
66

7-
Svelte `Avatar` component and utilities for building avatars with builtin supports [Gravatar] and [UI Avatar][uiavatar].
7+
Svelte `Avatar` component and utilities for building avatars with builtin supports for [Gravatar] and [UI Avatar][uiavatar].
88

99
</div>
1010

@@ -19,20 +19,17 @@ This package is part of the [@svelte-put][github.monorepo] family. For contribut
1919
## Quick Start
2020

2121
```html
22-
<script lang="ts">
23-
import Avatar from '@svelte-put/avatar/Avatar.svelte';
22+
<script>
23+
import Avatar from '@svelte-put/avatar/Avatar.svelte';
2424
25-
export let id: string;
26-
export let email = '';
27-
export let firstName = '';
28-
export let lastName = '';
25+
let { id, email, firstName, lastName } = $props();
2926
</script>
3027

3128
<Avatar
32-
src="https://your.api/avatar/{id}"
33-
gravatar="{email}"
34-
uiAvatar="{firstName}+{lastName}"
35-
fallback="https://your.api/avatar/default"
29+
src="https://your.api/avatar/{id}"
30+
gravatar="{email}"
31+
uiAvatar="{firstName}+{lastName}"
32+
fallback="https://your.api/avatar/default"
3633
/>
3734
```
3835

packages/clickoutside/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ This package is part of the [@svelte-put][github.monorepo] family. For contribut
2222

2323
```html
2424
<script lang="ts">
25-
import { clickoutside } from '@svelte-put/clickoutside';
25+
import { clickoutside } from '@svelte-put/clickoutside';
2626
27-
function doSomething(e: CustomEvent<MouseEvent>) {
28-
console.log(e.target);
29-
}
27+
function doSomething(e: CustomEvent<MouseEvent>) {
28+
console.log(e.target);
29+
}
3030
</script>
3131

3232
<div use:clickoutside onclickoutside="{doSomething}" />

packages/cloudflare-turnstile/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ This package is part of the [@svelte-put][github.monorepo] family. For contribut
2020

2121
```html
2222
<!-- component.svelte -->
23-
<script lang="ts">
24-
import { turnstile } from '@svelte-put/cloudflare-turnstile';
23+
<script>
24+
import { turnstile } from '@svelte-put/cloudflare-turnstile';
2525
</script>
2626

2727
<div
28-
use:turnstile
29-
turnstile-sitekey="1x00000000000000000000AA"
30-
turnstile-theme="dark"
31-
turnstile-size="normal"
32-
/>
28+
use:turnstile
29+
turnstile-sitekey="1x00000000000000000000AA"
30+
turnstile-theme="dark"
31+
turnstile-size="normal"
32+
></div>
3333
```
3434

3535
## [Changelog][github.changelog]

packages/copy/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ This package is part of the [@svelte-put][github.monorepo] family. For contribut
2020

2121
```html
2222
<script lang="ts">
23-
import { copy, type CopyDetail } from '@svelte-put/copy';
23+
import { copy, type CopyDetail } from '@svelte-put/copy';
2424
25-
function handleCopied(e: CustomEvent<CopyDetail>) {
26-
console.log('Text copied:', e.detail.text);
27-
}
25+
function handleCopied(e: CustomEvent<CopyDetail>) {
26+
console.log('Text copied:', e.detail.text);
27+
}
2828
</script>
2929

30-
<button type="button" use:copy on:copied="{handleCopied}">Click to copy this</button>
30+
<button type="button" use:copy oncopied={handleCopied}>Click to copy this</button>
3131
```
3232

3333
## [Changelog][github.changelog]

packages/dragscroll/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This package is part of the [@svelte-put][github.monorepo] family. For contribut
2020

2121
```html
2222
<script>
23-
import { dragscroll } from '@svelte-put/dragscroll';
23+
import { dragscroll } from '@svelte-put/dragscroll';
2424
</script>
2525

2626
<div use:dragscroll>...</div>

packages/intersect/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ This package is part of the [@svelte-put][github.monorepo] family. For contribut
2222

2323
```html
2424
<script lang="ts">
25-
import { intersect, type IntersectDetail } from '@svelte-put/intersect';
26-
function onIntersect(e: CustomEvent<IntersectDetail>) {
27-
const { observer, entries, direction } = e.detail;
28-
console.log('the observer itself', observer);
29-
console.log('scrolling direction:', direction);
30-
console.log('intersecting:', entries[0]?.isIntersecting ? 'entering' : 'leaving');
31-
}
25+
import { intersect, type IntersectDetail } from '@svelte-put/intersect';
26+
27+
function onIntersect(e: CustomEvent<IntersectDetail>) {
28+
const { observer, entries, direction } = e.detail;
29+
console.log('the observer itself', observer);
30+
console.log('scrolling direction:', direction);
31+
console.log('intersecting:', entries[0]?.isIntersecting ? 'entering' : 'leaving');
32+
}
3233
</script>
3334
34-
<div use:intersect on:intersect="{onIntersect}" on:intersectonce />
35+
<div use:intersect onintersect={onIntersect} onintersectonce></div>
3536
```
3637
3738
## [Changelog][github.changelog]

packages/lockscroll/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ This package is part of the [@svelte-put][github.monorepo] family. For contribut
1919
## Quick Start
2020

2121
```html
22-
<script lang="ts">
23-
import { lockscroll, createLockScrollStore } from '@svelte-put/lockscroll';
22+
<script>
23+
import { lockscroll } from '@svelte-put/lockscroll';
2424
25-
const locked = createLockScrollStore();
26-
// ... later
27-
locked.toggle();
25+
let locked = $state(false);
2826
</script>
2927

30-
<svelte:body use:lockscroll="{locked}" />
28+
<svelte:body use:lockscroll={locked} />
29+
30+
<button onclick={() => locked = !locked}>Toggle lock scroll on body</button>
3131
```
3232

3333
## [Changelog][github.changelog]

packages/movable/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This package is part of the [@svelte-put][github.monorepo] family. For contribut
2222

2323
```html
2424
<script lang="ts">
25-
import { movable } from '@svelte-put/movable';
25+
import { movable } from '@svelte-put/movable';
2626
</script>
2727

2828
<div class="h-20 w-20" use:movable>...</div>

0 commit comments

Comments
 (0)