Skip to content

Releases: BattlefieldDuck/xterm-svelte

2.3.0

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 17 May 18:08

What's Changed

  • Bump the npm-minor-and-patch group across 1 directory with 10 updates by @dependabot[bot] in #246
  • Bump the npm-minor-and-patch group across 1 directory with 9 updates by @dependabot[bot] in #253
  • Bump the npm-majors group with 2 updates by @dependabot[bot] in #248
  • Bump the npm-minor-and-patch group across 1 directory with 11 updates by @dependabot[bot] in #258
  • Bump rollup from 4.54.0 to 4.59.0 by @dependabot[bot] in #255
  • Bump flatted from 3.3.3 to 3.4.2 by @dependabot[bot] in #262
  • Bump the npm-minor-and-patch group with 5 updates by @dependabot[bot] in #260
  • Bump the npm-minor-and-patch group across 1 directory with 4 updates by @dependabot[bot] in #263
  • Bump vite from 7.3.1 to 7.3.2 by @dependabot[bot] in #266
  • Bump picomatch from 4.0.3 to 4.0.4 by @dependabot[bot] in #264
  • Bump postcss from 8.5.6 to 8.5.14 by @dependabot[bot] in #268
  • Bump svelte from 5.54.1 to 5.55.7 by @dependabot[bot] in #269

Full Changelog: 2.2.1...2.3.0

2.2.1

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 18 Jan 18:58

What's Changed

  • Bump the npm-minor-and-patch group across 1 directory with 2 updates by @dependabot[bot] in #236
  • Bump globals from 16.5.0 to 17.0.0 in the npm-majors group by @dependabot[bot] in #238
  • Bump svelte from 5.46.1 to 5.46.4 by @dependabot[bot] in #241
  • Bump devalue from 5.6.1 to 5.6.2 by @dependabot[bot] in #240
  • Bump @sveltejs/kit from 2.49.2 to 2.49.5 by @dependabot[bot] in #239
  • Bump the npm-minor-and-patch group across 1 directory with 8 updates by @dependabot[bot] in #243

Full Changelog: 2.2.0...2.2.1

2.2.0

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 23 Dec 23:21

Update xterm.js addons and types for v6 compatibility.

What's Changed

  • Bump the npm-minor-and-patch group across 1 directory with 14 updates by @dependabot[bot] in #224
  • Bump js-yaml from 4.1.0 to 4.1.1 by @dependabot[bot] in #225
  • Bump actions/setup-node from 5 to 6 in the actions-majors group by @dependabot[bot] in #222
  • Bump actions/checkout from 5 to 6 in the actions-majors group by @dependabot[bot] in #229
  • Bump the npm-majors group with 2 updates by @dependabot[bot] in #228
  • Bump the npm-minor-and-patch group across 1 directory with 13 updates by @dependabot[bot] in #232
  • Bump @types/node from 24.10.0 to 25.0.3 in the npm-majors group by @dependabot[bot] in #234
  • Bump the npm-minor-and-patch group with 2 updates by @dependabot[bot] in #233

Full Changelog: 2.1.1...2.2.0

2.1.1

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 28 Sep 14:19

Updated xterm-svelte example

$state + Type-Safe options + Null-Safe Calls

<script lang="ts">
	import { Xterm, XtermAddon } from '@battlefieldduck/xterm-svelte';
	import type {
		ITerminalOptions,
		ITerminalInitOnlyOptions,
		Terminal
	} from '@battlefieldduck/xterm-svelte';

+	let terminal = $state<Terminal>();
-	let terminal: Terminal;

+	const options: ITerminalOptions & ITerminalInitOnlyOptions = {
-	let options: ITerminalOptions & ITerminalInitOnlyOptions = {
		fontFamily: 'Consolas'
	};

	async function onLoad() {
		console.log('Child component has loaded');

		// FitAddon Usage
		const fitAddon = new (await XtermAddon.FitAddon()).FitAddon();
+		terminal?.loadAddon(fitAddon);
- 		terminal.loadAddon(fitAddon);
		fitAddon.fit();

+		terminal?.write('Hello World');
-		terminal.write('Hello World');
	}

	function onData(data: string) {
		console.log('onData()', data);
	}

	function onKey(data: { key: string; domEvent: KeyboardEvent }) {
		console.log('onKey()', data);
	}
</script>

<Xterm bind:terminal {options} {onLoad} {onData} {onKey} />

What's Changed

Full Changelog: 2.1.0...2.1.1

2.1.0

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 17 Nov 19:30
a7d2420

Support Terminal Bindable

To bind the terminal in Svelte, you can use the following code:

<script lang="ts">
  // ... imports

  let terminal: Terminal;
</script>

<Xterm bind:terminal />

This allows you to bind the terminal variable to the Xterm component when the terminal is initialized.

What's Changed

Full Changelog: 2.0.1...2.1.0

2.0.1

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 10 Nov 15:49
  • Fix peerDependencies error while installation

What's Changed

Full Changelog: 2.0.0...2.0.1

2.0.0

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 04 Nov 08:06
e03b811

Svelte 5 migration guide

Deprecating createEventDispatcher and the on: directive in favour of callback props and normal element properties

Component events

In Svelte 4, components could emit events by creating a dispatcher with createEventDispatcher.

This function is deprecated in Svelte 5. Instead, components should accept callback props - which means you then pass functions as properties to these components:

- <Xterm {options} on:load={onLoad} on:data={onData} on:key={onKey} />
+ <Xterm {options} {onLoad} {onData} {onKey} />
- async function onLoad(event: CustomEvent<{ terminal: Terminal }>) {
+ async function onLoad(terminal: Terminal) {
    console.log('Child component has loaded');
-   const terminal = event.detail.terminal;
    
    // FitAddon Usage
    const fitAddon = new (await XtermAddon.FitAddon()).FitAddon();
    terminal.loadAddon(fitAddon);
    fitAddon.fit();
    
    terminal.write('Hello World');
}
- function onData(event: CustomEvent<string>) {
+ function onData(data: string) {
-   const data = event.detail;
    console.log('onData()', data);
}
- function onKey(event: CustomEvent<{ key: string; domEvent: KeyboardEvent }>) {
+ function onKey(data: { key: string; domEvent: KeyboardEvent }) {
-   const data = event.detail;
    console.log('onKey()', data);
}

What's Changed

New Contributors

Full Changelog: 1.0.1...2.0.0

1.0.1

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 04 Nov 03:21

What's Changed

Full Changelog: 1.0.0...1.0.1

1.0.0

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 08 May 11:24
4e74aaa

What's Changed

Full Changelog: 0.1.0...1.0.0

0.1.0

Choose a tag to compare

@BattlefieldDuck BattlefieldDuck released this 30 Apr 06:04

Full Changelog: 0.0.5...0.1.0