Skip to content

Commit 9bf2fc5

Browse files
committed
docs(noti,modal): set up deprecation notice and point to old docs site
1 parent 46d3100 commit 9bf2fc5

5 files changed

Lines changed: 52 additions & 18 deletions

File tree

sites/docs/src/lib/data/packages.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,19 +128,6 @@ export const packages = {
128128
changelogUrl:
129129
'https://github.com/vnphanquang/svelte-put/blob/main/packages/lockscroll/CHANGELOG.md',
130130
},
131-
// modal: {
132-
// id: 'modal',
133-
// name: '@svelte-put/modal',
134-
// publishedAt: 1670126470519,
135-
// description: 'type-safe async modal builder',
136-
// path: '/docs/modal',
137-
// replId: '0a68001337544b8ab55995fb3d02d1f6',
138-
// status: 'stable',
139-
// ready: true,
140-
// githubUrl: 'https://github.com/vnphanquang/svelte-put/tree/main/packages/modal',
141-
// changelogUrl:
142-
// 'https://github.com/vnphanquang/svelte-put/blob/main/packages/modal/CHANGELOG.md',
143-
// },
144131
movable: {
145132
id: 'movable',
146133
name: '@svelte-put/movable',
@@ -265,6 +252,19 @@ export type PackageId = keyof typeof packages;
265252
export type PackageName = Package['name'];
266253

267254
export const deprecatedPackages = {
255+
modal: {
256+
id: 'modal',
257+
name: '@svelte-put/modal',
258+
publishedAt: 1670126470519,
259+
description: 'type-safe async modal builder',
260+
path: '/docs/modal',
261+
replId: '0a68001337544b8ab55995fb3d02d1f6',
262+
status: 'stable',
263+
ready: true,
264+
githubUrl: 'https://github.com/vnphanquang/svelte-put/tree/main/packages/modal',
265+
changelogUrl:
266+
'https://github.com/vnphanquang/svelte-put/blob/main/packages/modal/CHANGELOG.md',
267+
},
268268
noti: {
269269
id: 'noti',
270270
name: '@svelte-put/noti',

sites/docs/src/routes/docs/(package)/async-stack/+page.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ogImage from '$lib/assets/images/og/svelte-put-clickoutside.jpg';
1+
import ogImage from '$lib/assets/images/og/svelte-put-async-stack.jpg';
22

33
import type { PageServerLoad } from './$types';
44

@@ -13,3 +13,4 @@ export const load: PageServerLoad = async ({ parent }) => {
1313
},
1414
};
1515
}
16+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script>
2+
import { SettingsContext } from '$lib/contexts/settings.svelte';
3+
4+
const settings = SettingsContext.get();
5+
</script>
6+
7+
## Deprecation Notice
8+
9+
This package has been dropped in favor of [@svelte-put/async-stack](/docs/async-stack). `@svelte-put/async-stack` is a generic implementation inspired by `@svelte-put/modal` and `@svelte-put/noti`, and now is more minimal, unopinionated, and powerful thanks to Svelte runes.
10+
11+
Follow patterns introduced in the `async-stack` ["Recipes" section](/docs/async-stack#modal--dialog) to migrate your existing `@svelte-put/modal` system to `@svelte-put/async-stack`.
12+
13+
To see the original documentation, [visit here](https://02e439f1.svelte-put.pages.dev/docs/modal).
14+
15+
---
16+
17+
18+
Happy migrating 😅
19+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import ogImage from '$lib/assets/images/og/svelte-put-modal.jpg';
2+
3+
import type { PageServerLoad } from './$types';
4+
5+
export const load: PageServerLoad = async ({ parent }) => {
6+
const data = await parent();
7+
return {
8+
meta: {
9+
...data.meta,
10+
og: {
11+
image: ogImage,
12+
}
13+
},
14+
};
15+
}
16+

sites/docs/src/routes/docs/(package)/noti/+page.md.svelte

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66

77
## Deprecation Notice
88

9-
<div class="c-callout c-callout--warning c-callout--icon-megaphone">
9+
This package has been dropped in favor of [@svelte-put/async-stack](/docs/async-stack). `@svelte-put/async-stack` is a generic implementation extracted from `@svelte-put/noti` itself, and now is more minimal and powerful thanks to Svelte runes. See [Migration to @svelte-put/async-stack](#migration-to-async-stack) for more details.
1010

11-
`@svelte-put/noti` is now deprecated in favor of [@svelte-put/async-stack](/docs/async-stack). `@svelte-put/async-stack` is a generic implementation extracted from `@svelte-put/noti` itself, and now is more minimal and powerful thanks to Svelte runes. See [Migration to @svelte-put/async-stack](#migration-to-async-stack) for more details.
12-
13-
</div>
11+
To see the original documentation, [visit here](https://svelte-put-svelte-4.vnphanquang.com/docs/noti).
1412

1513
<h2 id="migration-to-async-stack"> Migration to @svelte-put/async-stack </h2>
1614

0 commit comments

Comments
 (0)