;
```
-
## PreprocessorGroup
@@ -1196,8 +1207,7 @@ script?: Preprocessor;
```
-
-
+
## Processed
@@ -1268,8 +1278,7 @@ toString?: () => string;
```
-
-
+
## Warning
@@ -1279,7 +1288,6 @@ toString?: () => string;
interface Warning extends ICompileDiagnostic {}
```
-
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-easing.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-easing.md
index ecf8554173..4454fd47aa 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-easing.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-easing.md
@@ -43,8 +43,6 @@ import {
## backIn
-
-
```dts
@@ -53,9 +51,9 @@ function backIn(t: number): number;
-## backInOut
+## backInOut
@@ -65,9 +63,9 @@ function backInOut(t: number): number;
-## backOut
+## backOut
@@ -77,9 +75,9 @@ function backOut(t: number): number;
-## bounceIn
+## bounceIn
@@ -89,9 +87,9 @@ function bounceIn(t: number): number;
-## bounceInOut
+## bounceInOut
@@ -101,9 +99,9 @@ function bounceInOut(t: number): number;
-## bounceOut
+## bounceOut
@@ -113,9 +111,9 @@ function bounceOut(t: number): number;
-## circIn
+## circIn
@@ -125,9 +123,9 @@ function circIn(t: number): number;
-## circInOut
+## circInOut
@@ -137,9 +135,9 @@ function circInOut(t: number): number;
-## circOut
+## circOut
@@ -149,9 +147,9 @@ function circOut(t: number): number;
-## cubicIn
+## cubicIn
@@ -161,9 +159,9 @@ function cubicIn(t: number): number;
-## cubicInOut
+## cubicInOut
@@ -173,9 +171,9 @@ function cubicInOut(t: number): number;
-## cubicOut
+## cubicOut
@@ -185,9 +183,9 @@ function cubicOut(t: number): number;
-## elasticIn
+## elasticIn
@@ -197,9 +195,9 @@ function elasticIn(t: number): number;
-## elasticInOut
+## elasticInOut
@@ -209,9 +207,9 @@ function elasticInOut(t: number): number;
-## elasticOut
+## elasticOut
@@ -221,9 +219,9 @@ function elasticOut(t: number): number;
-## expoIn
+## expoIn
@@ -233,9 +231,9 @@ function expoIn(t: number): number;
-## expoInOut
+## expoInOut
@@ -245,9 +243,9 @@ function expoInOut(t: number): number;
-## expoOut
+## expoOut
@@ -257,9 +255,9 @@ function expoOut(t: number): number;
-## linear
+## linear
@@ -269,9 +267,9 @@ function linear(t: number): number;
-## quadIn
+## quadIn
@@ -281,9 +279,9 @@ function quadIn(t: number): number;
-## quadInOut
+## quadInOut
@@ -293,9 +291,9 @@ function quadInOut(t: number): number;
-## quadOut
+## quadOut
@@ -305,9 +303,9 @@ function quadOut(t: number): number;
-## quartIn
+## quartIn
@@ -317,9 +315,9 @@ function quartIn(t: number): number;
-## quartInOut
+## quartInOut
@@ -329,9 +327,9 @@ function quartInOut(t: number): number;
-## quartOut
+## quartOut
@@ -341,9 +339,9 @@ function quartOut(t: number): number;
-## quintIn
+## quintIn
@@ -353,9 +351,9 @@ function quintIn(t: number): number;
-## quintInOut
+## quintInOut
@@ -365,9 +363,9 @@ function quintInOut(t: number): number;
-## quintOut
+## quintOut
@@ -377,9 +375,9 @@ function quintOut(t: number): number;
-## sineIn
+## sineIn
@@ -389,9 +387,9 @@ function sineIn(t: number): number;
-## sineInOut
+## sineInOut
@@ -401,9 +399,9 @@ function sineInOut(t: number): number;
-## sineOut
+## sineOut
@@ -414,3 +412,5 @@ function sineOut(t: number): number;
+
+
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-events.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-events.md
index 46aec88c9f..cbb94e05fc 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-events.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-events.md
@@ -99,3 +99,5 @@ function on(
+
+
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-legacy.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-legacy.md
index dce95ef119..1367df7533 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-legacy.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-legacy.md
@@ -25,6 +25,12 @@ import {
## asClassComponent
+
+
+Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
+
+
+
Takes the component function and returns a Svelte 4 compatible component constructor.
@@ -46,8 +52,16 @@ function asClassComponent<
+
+
## createBubbler
+
+
+Use this only as a temporary solution to migrate your automatically delegated events in Svelte 5.
+
+
+
Function to create a `bubble` function that mimic the behavior of `on:click` without handler available in svelte 4.
@@ -60,8 +74,16 @@ function createBubbler(): (
+
+
## createClassComponent
+
+
+Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
+
+
+
Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
@@ -83,6 +105,8 @@ function createClassComponent<
+
+
## handlers
Function to mimic the multiple listeners available in svelte 4
@@ -97,6 +121,8 @@ function handlers(
+
+
## nonpassive
Substitute for the `nonpassive` event modifier, implemented as an action
@@ -115,6 +141,8 @@ function nonpassive(
+
+
## once
Substitute for the `once` event modifier
@@ -129,6 +157,8 @@ function once(
+
+
## passive
Substitute for the `passive` event modifier, implemented as an action
@@ -147,6 +177,8 @@ function passive(
+
+
## preventDefault
Substitute for the `preventDefault` event modifier
@@ -161,8 +193,16 @@ function preventDefault(
+
+
## run
+
+
+Use this only as a temporary solution to migrate your component code to Svelte 5.
+
+
+
Runs the given function once immediately on the server, and works like `$effect.pre` on the client.
@@ -173,6 +213,8 @@ function run(fn: () => void | (() => void)): void;
+
+
## self
Substitute for the `self` event modifier
@@ -187,6 +229,8 @@ function self(
+
+
## stopImmediatePropagation
Substitute for the `stopImmediatePropagation` event modifier
@@ -201,6 +245,8 @@ function stopImmediatePropagation(
+
+
## stopPropagation
Substitute for the `stopPropagation` event modifier
@@ -215,6 +261,8 @@ function stopPropagation(
+
+
## trusted
Substitute for the `trusted` event modifier
@@ -230,3 +278,5 @@ function trusted(
+
+
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-motion.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-motion.md
index 0fd62a1d4c..263329be9a 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-motion.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-motion.md
@@ -24,6 +24,8 @@ function spring(
+
+
## tweened
A tweened store in Svelte is a special type of store that provides smooth transitions between state values over time.
@@ -39,6 +41,8 @@ function tweened(
+
+
## Spring
@@ -90,8 +94,7 @@ stiffness: number;
```
-
-
+
## Tweened
@@ -117,7 +120,6 @@ update(updater: Updater, opts?: TweenedOptions): Promise;
```
-
-
+
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-reactivity.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-reactivity.md
index a65d4dcf41..bb8cddf12e 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-reactivity.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-reactivity.md
@@ -26,8 +26,7 @@ constructor(...params: any[]);
```
-
-
+
## SvelteMap
@@ -62,8 +61,7 @@ set(key: K, value: V): this;
```
-
-
+
## SvelteSet
@@ -98,8 +96,7 @@ add(value: T): this;
```
-
-
+
## SvelteURL
@@ -125,8 +122,7 @@ get searchParams(): SvelteURLSearchParams;
```
-
-
+
## SvelteURLSearchParams
@@ -152,7 +148,6 @@ class SvelteURLSearchParams extends URLSearchParams {/*…*/}
```
-
-
+
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-server.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-server.md
index 75891647ab..cb604efbd4 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-server.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-server.md
@@ -46,3 +46,5 @@ function render<
+
+
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-store.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-store.md
index fbd0adc1ab..8d60fd7be6 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-store.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-store.md
@@ -50,9 +50,9 @@ function derived(
-## fromStore
+## fromStore
@@ -74,6 +74,8 @@ function fromStore(store: Readable): {
+
+
## get
Get the current value from a store by subscribing and immediately unsubscribing.
@@ -86,6 +88,8 @@ function get(store: Readable): T;
+
+
## readable
Creates a `Readable` store that allows reading by subscription.
@@ -101,6 +105,8 @@ function readable(
+
+
## readonly
Takes a store and returns a new one derived from the old one that is readable.
@@ -113,9 +119,9 @@ function readonly(store: Readable): Readable;
-## toStore
+## toStore
@@ -136,6 +142,8 @@ function toStore(get: () => V): Readable;
+
+
## writable
Create a `Writable` store that allows both updating and reading by subscription.
@@ -151,6 +159,8 @@ function writable(
+
+
## Readable
Readable interface for subscribing.
@@ -179,8 +189,7 @@ subscribe(this: void, run: Subscriber, invalidate?: () => void): Unsubscriber
Subscribe on value changes.
-
-
+
## StartStopNotifier
@@ -196,7 +205,6 @@ type StartStopNotifier = (
) => void | (() => void);
```
-
## Subscriber
@@ -209,7 +217,6 @@ Callback to inform of a value updates.
type Subscriber = (value: T) => void;
```
-
## Unsubscriber
@@ -222,7 +229,6 @@ Unsubscribes from value updates.
type Unsubscriber = () => void;
```
-
## Updater
@@ -235,7 +241,6 @@ Callback to update a value.
type Updater = (value: T) => T;
```
-
## Writable
@@ -284,7 +289,6 @@ update(this: void, updater: Updater): void;
Update value using callback and inform subscribers.
-
-
+
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-transition.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-transition.md
index a27e5e0dfd..98f373ab66 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-transition.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-transition.md
@@ -38,6 +38,8 @@ function blur(
+
+
## crossfade
The `crossfade` function creates a pair of [transitions](https://svelte.dev/docs#template-syntax-element-directives-transition-fn) called `send` and `receive`. When an element is 'sent', it looks for a corresponding element being 'received', and generates a transition that transforms the element to its counterpart's position and fades it out. When an element is 'received', the reverse happens. If there is no counterpart, the `fallback` transition is used.
@@ -72,6 +74,8 @@ function crossfade({
+
+
## draw
Animates the stroke of an SVG element, like a snake in a tube. `in` transitions begin with the path invisible and draw the path to the screen over time. `out` transitions start in a visible state and gradually erase the path. `draw` only works with elements that have a `getTotalLength` method, like `` and ``.
@@ -94,6 +98,8 @@ function draw(
+
+
## fade
Animates the opacity of an element from 0 to the current opacity for `in` transitions and from the current opacity to 0 for `out` transitions.
@@ -109,6 +115,8 @@ function fade(
+
+
## fly
Animates the x and y positions and the opacity of an element. `in` transitions animate from the provided values, passed as parameters to the element's default values. `out` transitions animate from the element's default values to the provided values.
@@ -131,6 +139,8 @@ function fly(
+
+
## scale
Animates the opacity and scale of an element. `in` transitions animate from an element's current (default) values to the provided values, passed as parameters. `out` transitions animate from the provided values to an element's default values.
@@ -152,6 +162,8 @@ function scale(
+
+
## slide
Slides an element in and out.
@@ -172,6 +184,8 @@ function slide(
+
+
## BlurParams
@@ -223,8 +237,7 @@ opacity?: number;
```
-
-
+
## CrossfadeParams
@@ -259,8 +272,7 @@ easing?: EasingFunction;
```
-
-
+
## DrawParams
@@ -304,8 +316,7 @@ easing?: EasingFunction;
```
-
-
+
## EasingFunction
@@ -315,7 +326,6 @@ easing?: EasingFunction;
type EasingFunction = (t: number) => number;
```
-
## FadeParams
@@ -351,8 +361,7 @@ easing?: EasingFunction;
```
-
-
+
## FlyParams
@@ -414,8 +423,7 @@ opacity?: number;
```
-
-
+
## ScaleParams
@@ -468,8 +476,7 @@ opacity?: number;
```
-
-
+
## SlideParams
@@ -513,8 +520,7 @@ axis?: 'x' | 'y';
```
-
-
+
## TransitionConfig
@@ -567,7 +573,6 @@ tick?: (t: number, u: number) => void;
```
-
-
+
diff --git a/packages/site-kit/src/lib/components/Text.svelte b/packages/site-kit/src/lib/components/Text.svelte
index 089c62b9a8..fab5159887 100644
--- a/packages/site-kit/src/lib/components/Text.svelte
+++ b/packages/site-kit/src/lib/components/Text.svelte
@@ -409,8 +409,15 @@
--primary-hsl: var(--sk-text-warning-hsl);
--color: var(--primary-hsl);
- &::before {
- content: 'Deprecated';
+ p:first-child::before {
+ content: 'Deprecated ';
+ display: block;
+ /* text-transform: uppercase; */
+ font-style: normal;
+ /* font-family: var(--sk-font-ui); */
+ font-size: var(--sk-text-m);
+ font-weight: 500;
+ /* color: var(--sk-text-4); */
}
a {
diff --git a/packages/site-kit/src/lib/markdown/renderer.ts b/packages/site-kit/src/lib/markdown/renderer.ts
index 6c2309a3ba..e99588a39c 100644
--- a/packages/site-kit/src/lib/markdown/renderer.ts
+++ b/packages/site-kit/src/lib/markdown/renderer.ts
@@ -543,6 +543,10 @@ export async function replace_export_type_placeholders(content: string, modules:
EXPORTS: /> EXPORTS: (.+)/
};
+ if (REGEXES.EXPORTS.test(content)) {
+ throw new Error('yes');
+ }
+
if (!modules || modules.length === 0) {
return content
.replace(REGEXES.EXPANDED_TYPES, '')
@@ -573,7 +577,7 @@ export async function replace_export_type_placeholders(content: string, modules:
if (!type) throw new Error(`Could not find type ${name}#${id}`);
- return stringify_type(type);
+ return render_declaration(type, true);
}
let comment = '';
@@ -581,7 +585,9 @@ export async function replace_export_type_placeholders(content: string, modules:
comment += `${module.comment}\n\n`;
}
- return comment + module.types.map((t) => `## ${t.name}\n\n${stringify_type(t)}`).join('');
+ return (
+ comment + module.types.map((t) => `## ${t.name}\n\n${render_declaration(t, true)}`).join('')
+ );
});
content = await async_replace(content, REGEXES.EXPORT_SNIPPET, async ([_, name, id]) => {
@@ -594,15 +600,7 @@ export async function replace_export_type_placeholders(content: string, modules:
const exported = module.exports?.filter((t) => t.name === id);
- return (
- exported
- ?.map((declaration) =>
- declaration.overloads
- .map((overload) => `${fence(overload.snippet, 'dts')}
`)
- .join('\n\n')
- )
- .join('\n\n') ?? ''
- );
+ return exported?.map((d) => render_declaration(d, false)).join('\n\n') ?? '';
});
content = await async_replace(content, REGEXES.MODULE, async ([_, name]) => {
@@ -635,15 +633,8 @@ export async function replace_export_type_placeholders(content: string, modules:
return `## ${module.name}\n\n${import_block}\n\n${module.comment}\n\n${module.exports
.map((declaration) => {
- const markdown = declaration.overloads
- .map(
- (overload) =>
- `${fence(overload.snippet, 'dts')}` +
- overload.children?.map((v) => stringify(v)).join('\n\n') +
- `
`
- )
- .join('\n\n');
- return `### ${declaration.name}\n\n${declaration.comment}\n\n${markdown}`;
+ const markdown = render_declaration(declaration, true);
+ return `### ${declaration.name}\n\n${markdown}`;
})
.join('\n\n')}`;
})
@@ -673,15 +664,8 @@ export async function replace_export_type_placeholders(content: string, modules:
return `${import_block}\n\n${module.comment}\n\n${module.exports
.map((declaration) => {
- const markdown = declaration.overloads
- .map(
- (overload) =>
- `${fence(overload.snippet, 'dts')}` +
- overload.children?.map((val) => stringify(val, 'dts')).join('\n\n') +
- `
`
- )
- .join('\n\n');
- return `### ${declaration.name}\n\n${declaration.comment}\n\n${markdown}`;
+ const markdown = render_declaration(declaration, true);
+ return `### ${declaration.name}\n\n${markdown}`;
})
.join('\n\n')}`;
});
@@ -689,6 +673,31 @@ export async function replace_export_type_placeholders(content: string, modules:
return content;
}
+function render_declaration(declaration: Declaration, full: boolean) {
+ let content = '';
+
+ if (declaration.deprecated) {
+ content += `\n\n${declaration.deprecated}\n\n
\n\n`;
+ }
+
+ if (declaration.comment) {
+ content += declaration.comment + '\n\n';
+ }
+
+ return (
+ content +
+ declaration.overloads
+ .map((overload) => {
+ const children = full
+ ? overload.children?.map((val) => stringify(val, 'dts')).join('\n\n')
+ : '';
+
+ return `${fence(overload.snippet, 'dts')}${children}
\n\n`;
+ })
+ .join('')
+ );
+}
+
/**
* Takes a module and returns a markdown string.
*/
@@ -712,41 +721,12 @@ function stringify_module(module: Modules[0]) {
}
for (const declaration of module.exports || []) {
- const markdown = declaration.overloads
- .map(
- (overload) =>
- `${fence(overload.snippet, 'dts')}` +
- overload.children?.map((v) => stringify(v)).join('\n\n') +
- `
`
- )
- .join('\n\n');
- content += `## ${declaration.name}\n\n${declaration.comment}\n\n${markdown}\n\n`;
+ const markdown = render_declaration(declaration, true);
+ content += `## ${declaration.name}\n\n${markdown}\n\n`;
}
for (const t of module.types || []) {
- content += `## ${t.name}\n\n` + stringify_type(t);
- }
-
- return content;
-}
-
-function stringify_type(t: Declaration) {
- let content = '';
-
- if (t.deprecated) {
- content += `\n\n${t.deprecated}\n\n
\n\n`;
- }
-
- if (t.comment) {
- content += `${t.comment}\n\n`;
- }
-
- for (const overload of t.overloads) {
- if (overload.children || overload.snippet) {
- const children = overload.children?.map((val) => stringify(val, 'dts')).join('\n\n');
- content +=
- `${fence(overload.snippet, 'dts')}` + children + `\n
\n\n`;
- }
+ content += `## ${t.name}\n\n` + render_declaration(t, true);
}
return content;