Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lucky-toes-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

chore: remove internal functions from `svelte/transition` exports
4 changes: 2 additions & 2 deletions packages/svelte/src/transition/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ function cubic_out(t) {
* @param {number} t
* @returns {number}
*/
export function cubic_in_out(t) {
function cubic_in_out(t) {
return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;
}

/** @param {number | string} value
* @returns {[number, string]}
*/
export function split_css_unit(value) {
function split_css_unit(value) {
const split = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
return split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];
}
Expand Down
6 changes: 0 additions & 6 deletions packages/svelte/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2079,12 +2079,6 @@ declare module 'svelte/transition' {
duration?: number | ((len: number) => number);
easing?: EasingFunction;
}
/**
* https://svelte.dev/docs/svelte-easing
* */
export function cubic_in_out(t: number): number;

export function split_css_unit(value: number | string): [number, string];
/**
* Animates a `blur` filter alongside an element's opacity.
*
Expand Down