svelte 4.0.4 → 4.0.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/compiler.cjs +1 -1
- package/package.json +1 -1
- package/src/shared/version.js +1 -1
- package/types/index.d.ts +16 -16
package/compiler.cjs
CHANGED
|
@@ -43708,7 +43708,7 @@ function is_used_as_reference(node, parent) {
|
|
|
43708
43708
|
* https://svelte.dev/docs/svelte-compiler#svelte-version
|
|
43709
43709
|
* @type {string}
|
|
43710
43710
|
*/
|
|
43711
|
-
const VERSION = '4.0.
|
|
43711
|
+
const VERSION = '4.0.5';
|
|
43712
43712
|
|
|
43713
43713
|
const regex_leading_directory_separator = /^[/\\]/;
|
|
43714
43714
|
const regex_starts_with_term_export = /^Export/;
|
package/package.json
CHANGED
package/src/shared/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ declare module 'svelte' {
|
|
|
110
110
|
|
|
111
111
|
$destroy(): void;
|
|
112
112
|
|
|
113
|
-
$on<K extends Extract<keyof Events, string>>(type: K, callback: (e: Events[K]) => void): () => void;
|
|
113
|
+
$on<K extends Extract<keyof Events, string>>(type: K, callback: ((e: Events[K]) => void) | null | undefined): () => void;
|
|
114
114
|
|
|
115
115
|
$set(props: Partial<Props>): void;
|
|
116
116
|
}
|
|
@@ -772,8 +772,8 @@ declare module 'svelte/compiler' {
|
|
|
772
772
|
* https://svelte.dev/docs/svelte-compiler#svelte-preprocess
|
|
773
773
|
* */
|
|
774
774
|
export function preprocess(source: string, preprocessor: PreprocessorGroup | PreprocessorGroup[], options?: {
|
|
775
|
-
filename?: string;
|
|
776
|
-
}): Promise<Processed>;
|
|
775
|
+
filename?: string | undefined;
|
|
776
|
+
} | undefined): Promise<Processed>;
|
|
777
777
|
/**
|
|
778
778
|
* The current version, as set in package.json.
|
|
779
779
|
*
|
|
@@ -1576,13 +1576,13 @@ declare module 'svelte/motion' {
|
|
|
1576
1576
|
*
|
|
1577
1577
|
* https://svelte.dev/docs/svelte-motion#spring
|
|
1578
1578
|
* */
|
|
1579
|
-
export function spring<T = any>(value?: T, opts?: SpringOpts): Spring<T>;
|
|
1579
|
+
export function spring<T = any>(value?: T | undefined, opts?: SpringOpts | undefined): Spring<T>;
|
|
1580
1580
|
/**
|
|
1581
1581
|
* A tweened store in Svelte is a special type of store that provides smooth transitions between state values over time.
|
|
1582
1582
|
*
|
|
1583
1583
|
* https://svelte.dev/docs/svelte-motion#tweened
|
|
1584
1584
|
* */
|
|
1585
|
-
export function tweened<T>(value?: T, defaults?: TweenedOptions<T>): Tweened<T>;
|
|
1585
|
+
export function tweened<T>(value?: T | undefined, defaults?: TweenedOptions<T> | undefined): Tweened<T>;
|
|
1586
1586
|
}
|
|
1587
1587
|
|
|
1588
1588
|
declare module 'svelte/store' {
|
|
@@ -1652,16 +1652,16 @@ declare module 'svelte/store' {
|
|
|
1652
1652
|
* https://svelte.dev/docs/svelte-store#readable
|
|
1653
1653
|
* @param value initial value
|
|
1654
1654
|
* */
|
|
1655
|
-
export function readable<T>(value?: T, start?: StartStopNotifier<T>): Readable<T>;
|
|
1655
|
+
export function readable<T>(value?: T | undefined, start?: StartStopNotifier<T> | undefined): Readable<T>;
|
|
1656
1656
|
/**
|
|
1657
1657
|
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
1658
1658
|
*
|
|
1659
1659
|
* https://svelte.dev/docs/svelte-store#writable
|
|
1660
1660
|
* @param value initial value
|
|
1661
1661
|
* */
|
|
1662
|
-
export function writable<T>(value?: T, start?: StartStopNotifier<T>): Writable<T>;
|
|
1663
|
-
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>, set: (value: T) => void, update: (fn: Updater<T>) => void) => Unsubscriber | void, initial_value?: T): Readable<T>;
|
|
1664
|
-
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>) => T, initial_value?: T): Readable<T>;
|
|
1662
|
+
export function writable<T>(value?: T | undefined, start?: StartStopNotifier<T> | undefined): Writable<T>;
|
|
1663
|
+
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>, set: (value: T) => void, update: (fn: Updater<T>) => void) => Unsubscriber | void, initial_value?: T | undefined): Readable<T>;
|
|
1664
|
+
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>) => T, initial_value?: T | undefined): Readable<T>;
|
|
1665
1665
|
/**
|
|
1666
1666
|
* Takes a store and returns a new one derived from the old one that is readable.
|
|
1667
1667
|
*
|
|
@@ -1743,31 +1743,31 @@ declare module 'svelte/transition' {
|
|
|
1743
1743
|
*
|
|
1744
1744
|
* https://svelte.dev/docs/svelte-transition#blur
|
|
1745
1745
|
* */
|
|
1746
|
-
export function blur(node: Element, { delay, duration, easing, amount, opacity }?: BlurParams): TransitionConfig;
|
|
1746
|
+
export function blur(node: Element, { delay, duration, easing, amount, opacity }?: BlurParams | undefined): TransitionConfig;
|
|
1747
1747
|
/**
|
|
1748
1748
|
* 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.
|
|
1749
1749
|
*
|
|
1750
1750
|
* https://svelte.dev/docs/svelte-transition#fade
|
|
1751
1751
|
* */
|
|
1752
|
-
export function fade(node: Element, { delay, duration, easing }?: FadeParams): TransitionConfig;
|
|
1752
|
+
export function fade(node: Element, { delay, duration, easing }?: FadeParams | undefined): TransitionConfig;
|
|
1753
1753
|
/**
|
|
1754
1754
|
* 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.
|
|
1755
1755
|
*
|
|
1756
1756
|
* https://svelte.dev/docs/svelte-transition#fly
|
|
1757
1757
|
* */
|
|
1758
|
-
export function fly(node: Element, { delay, duration, easing, x, y, opacity }?: FlyParams): TransitionConfig;
|
|
1758
|
+
export function fly(node: Element, { delay, duration, easing, x, y, opacity }?: FlyParams | undefined): TransitionConfig;
|
|
1759
1759
|
/**
|
|
1760
1760
|
* Slides an element in and out.
|
|
1761
1761
|
*
|
|
1762
1762
|
* https://svelte.dev/docs/svelte-transition#slide
|
|
1763
1763
|
* */
|
|
1764
|
-
export function slide(node: Element, { delay, duration, easing, axis }?: SlideParams): TransitionConfig;
|
|
1764
|
+
export function slide(node: Element, { delay, duration, easing, axis }?: SlideParams | undefined): TransitionConfig;
|
|
1765
1765
|
/**
|
|
1766
1766
|
* 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.
|
|
1767
1767
|
*
|
|
1768
1768
|
* https://svelte.dev/docs/svelte-transition#scale
|
|
1769
1769
|
* */
|
|
1770
|
-
export function scale(node: Element, { delay, duration, easing, start, opacity }?: ScaleParams): TransitionConfig;
|
|
1770
|
+
export function scale(node: Element, { delay, duration, easing, start, opacity }?: ScaleParams | undefined): TransitionConfig;
|
|
1771
1771
|
/**
|
|
1772
1772
|
* 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 `<path>` and `<polyline>`.
|
|
1773
1773
|
*
|
|
@@ -1775,14 +1775,14 @@ declare module 'svelte/transition' {
|
|
|
1775
1775
|
* */
|
|
1776
1776
|
export function draw(node: SVGElement & {
|
|
1777
1777
|
getTotalLength(): number;
|
|
1778
|
-
}, { delay, speed, duration, easing }?: DrawParams): TransitionConfig;
|
|
1778
|
+
}, { delay, speed, duration, easing }?: DrawParams | undefined): TransitionConfig;
|
|
1779
1779
|
/**
|
|
1780
1780
|
* The `crossfade` function creates a pair of [transitions](/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.
|
|
1781
1781
|
*
|
|
1782
1782
|
* https://svelte.dev/docs/svelte-transition#crossfade
|
|
1783
1783
|
* */
|
|
1784
1784
|
export function crossfade({ fallback, ...defaults }: CrossfadeParams & {
|
|
1785
|
-
fallback?: (node: Element, params: CrossfadeParams, intro: boolean) => TransitionConfig;
|
|
1785
|
+
fallback?: ((node: Element, params: CrossfadeParams, intro: boolean) => TransitionConfig) | undefined;
|
|
1786
1786
|
}): [(node: any, params: CrossfadeParams & {
|
|
1787
1787
|
key: any;
|
|
1788
1788
|
}) => () => TransitionConfig, (node: any, params: CrossfadeParams & {
|