Skip to content

chore: replace non-breaking spaces #14098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 1, 2024
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
2 changes: 1 addition & 1 deletion documentation/docs/03-template-syntax/11-bind.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ All visible elements have the following readonly bindings, measured with a `Resi
bind:this={dom_node}
```

To get a reference to a DOM node, use `bind:this`. The value will be `undefined` until the component is mounted — in other words, you should read it inside an effect or an event handler, but not during component initialisation:
To get a reference to a DOM node, use `bind:this`. The value will be `undefined` until the component is mounted — in other words, you should read it inside an effect or an event handler, but not during component initialisation:

```svelte
<script>
Expand Down
3 changes: 1 addition & 2 deletions documentation/docs/03-template-syntax/13-transition.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ transition = (node: HTMLElement, params: any, options: { direction: 'in' | 'out'

Transitions can use custom functions. If the returned object has a `css` function, Svelte will generate keyframes for a [web animation](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API).

The `t` argument passed to `css` is a value between `0` and `1` after the `easing` function has been applied. _In_ transitions run from `0` to `1`, _out_ transitions run from `1` to `0` — in other words, `1` is the element's natural state, as though no transition had been applied. The `u` argument is equal to `1 - t`.
The `t` argument passed to `css` is a value between `0` and `1` after the `easing` function has been applied. _In_ transitions run from `0` to `1`, _out_ transitions run from `1` to `0` — in other words, `1` is the element's natural state, as though no transition had been applied. The `u` argument is equal to `1 - t`.

The function is called repeatedly _before_ the transition begins, with different `t` and `u` arguments.

Expand Down Expand Up @@ -169,4 +169,3 @@ An element with transitions will dispatch the following events in addition to an
</p>
{/if}
```

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In legacy mode, any top-level statement (i.e. not inside a block or a function)
// when `a`, `b` or `sum` change
$: console.log(`${a} + ${b} = ${sum}`);

// this is a 'reactive assignment' — `sum` will be
// this is a 'reactive assignment' — `sum` will be
// recalculated when `a` or `b` change. It is
// not necessary to declare `sum` separately
$: sum = a + b;
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/99-legacy/40-legacy-component-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In Svelte 3 and 4, the API for interacting with a component is different than in
const component = new Component(options);
```

A client-side component — that is, a component compiled with `generate: 'dom'` (or the `generate` option left unspecified) is a JavaScript class.
A client-side component — that is, a component compiled with `generate: 'dom'` (or the `generate` option left unspecified) is a JavaScript class.

```ts
// @noErrors
Expand Down
4 changes: 2 additions & 2 deletions packages/svelte/src/ambient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ declare namespace $state {
| BigInt64Array
| BigUint64Array;

/** The things that `structuredClone` can handle — https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm */
/** The things that `structuredClone` can handle — https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm */
export type Cloneable =
| ArrayBuffer
| DataView
Expand Down Expand Up @@ -358,7 +358,7 @@ declare function $props(): any;
declare function $bindable<T>(fallback?: T): T;

/**
* Inspects one or more values whenever they, or the properties they contain, change. Example:
* Inspects one or more values whenever they, or the properties they contain, change. Example:
*
* ```ts
* $inspect(someValue, someOtherValue)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { writable } from 'svelte/store';
const foo = writable('div');
import { writable } from 'svelte/store';
const foo = writable('div');
</script>

<svelte:element this={$foo}></svelte:element>
<svelte:element this={$foo}></svelte:element>
4 changes: 2 additions & 2 deletions packages/svelte/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2354,7 +2354,7 @@ declare namespace $state {
| BigInt64Array
| BigUint64Array;

/** The things that `structuredClone` can handle — https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm */
/** The things that `structuredClone` can handle — https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm */
export type Cloneable =
| ArrayBuffer
| DataView
Expand Down Expand Up @@ -2665,7 +2665,7 @@ declare function $props(): any;
declare function $bindable<T>(fallback?: T): T;

/**
* Inspects one or more values whenever they, or the properties they contain, change. Example:
* Inspects one or more values whenever they, or the properties they contain, change. Example:
*
* ```ts
* $inspect(someValue, someOtherValue)
Expand Down