Skip to content

Commit 71b03fc

Browse files
committed
refactor: rename devtool to toolbar
1 parent a294bbc commit 71b03fc

File tree

11 files changed

+15
-22
lines changed

11 files changed

+15
-22
lines changed

packages/svelte/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@
102102
"types": "./types/index.d.ts",
103103
"default": "./src/events/index.js"
104104
},
105-
"./devtool": {
105+
"./toolbar": {
106106
"types": "./types/index.d.ts",
107-
"default": "./src/devtool/index.js"
107+
"default": "./src/toolbar/index.js"
108108
}
109109
},
110110
"imports": {

packages/svelte/scripts/check-treeshakeability.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ for (const key in pkg.exports) {
5959
if (key === './internal/disclose-version') continue;
6060
if (key === './internal/flags/legacy') continue;
6161
if (key === './internal/flags/tracing') continue;
62-
if (key === './devtool') continue;
62+
if (key === './toolbar') continue;
6363

6464
for (const type of ['browser', 'default']) {
6565
if (!pkg.exports[key][type]) continue;

packages/svelte/scripts/generate-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ await createBundle({
4545
[`${pkg.name}/store`]: `${dir}/src/store/public.d.ts`,
4646
[`${pkg.name}/transition`]: `${dir}/src/transition/public.d.ts`,
4747
[`${pkg.name}/events`]: `${dir}/src/events/public.d.ts`,
48-
[`${pkg.name}/devtool`]: `${dir}/src/devtool/public.d.ts`,
48+
[`${pkg.name}/toolbar`]: `${dir}/src/toolbar/public.d.ts`,
4949

5050
// TODO remove in Svelte 6
5151
[`${pkg.name}/types/compiler/preprocess`]: `${dir}/src/compiler/preprocess/legacy-public.d.ts`,

packages/svelte/src/devtool/DevTool.svelte.d.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
22
let props = $props()
33
</script>
4-
<h1>devtools</h1>
4+
<h1>toolbar</h1>
55
<pre>
66
{JSON.stringify(props,null,2)}
77
</pre>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO figure out generating type for this

packages/svelte/src/devtool/configure.js renamed to packages/svelte/src/toolbar/configure.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* devtools config
2+
* toolbar config
33
* @type {import('./public.d.ts').Config}
44
*/
55
const config = {};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export {default as DevTool} from './DevTool.svelte'
1+
export {default as ToolBar} from './ToolBar.svelte'
22
export * from './configure.js'
33
export {mountUI as default} from './runtime.js'
File renamed without changes.

packages/svelte/src/devtool/runtime.js renamed to packages/svelte/src/toolbar/runtime.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import DevTool from './DevTool.svelte';
1+
import ToolBar from './ToolBar.svelte';
22
import { mount } from 'svelte';
3-
function create_devtool_host() {
4-
const id = 'svelte-devtool-host';
3+
function create_toolbar_host() {
4+
const id = 'svelte-toolbar-host';
55
if (document.getElementById(id) != null) {
6-
console.debug('svelte-devtool-host already exists, skipping');
6+
console.debug('svelte-toolbar-host already exists, skipping');
77
return;
88
}
99
const el = document.createElement('div');
@@ -14,7 +14,7 @@ function create_devtool_host() {
1414
}
1515
export function mountUI(){
1616
if(typeof window !== 'undefined') {
17-
mount(DevTool, { target: create_devtool_host() });
17+
mount(ToolBar, { target: create_toolbar_host() });
1818
}
1919
}
2020

0 commit comments

Comments
 (0)