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
49 changes: 24 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
"description": "UI-Router State Visualizer and Transition Visualizer",
"version": "7.2.1",
"scripts": {
"start": "npm run bundle && http-server . -o example",
"start": "npm run bundle && serve . --open /example",
"clean": "shx rm -rf lib lib-esm _bundles",
"compile": "tsc --outdir lib && tsc -m es6 --outdir lib-esm",
"bundle": "rollup -c",
"compile": "tsgo --outdir lib && tsgo -m es6 --outdir lib-esm",
"bundle": "rolldown -c rolldown.config.mjs",
"build": "npm run clean && npm run compile && npm run bundle",
"prepublishOnly": "npm run build",
"release": "release"
"release": "release",
"prepare": "husky"
},
"homepage": "https://github.com/ui-router/visualizer",
"contributors": [
Expand All @@ -33,26 +34,24 @@
},
"license": "MIT",
"dependencies": {
"d3-hierarchy": "^2.0.0",
"d3-interpolate": "=1.4.0",
"d3-hierarchy": "^3.1.2",
"d3-interpolate": "=3.0.1",
"preact": "^10.28.1"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-typescript": "^6.0.0",
"@types/d3-hierarchy": "^1.1.5",
"@types/d3-interpolate": "^1.3.0",
"@uirouter/core": "^6.0.6",
"@uirouter/publish-scripts": "2.5.5",
"http-server": "^0.12.3",
"husky": "^4.3.0",
"prettier": "^2.1.2",
"pretty-quick": "^3.0.2",
"rollup": "^2.27.1",
"rollup-plugin-postcss": "^3.1.8",
"serve": "^11.3.2",
"shx": "^0.3.2",
"tslib": "^2.0.1",
"@types/d3-hierarchy": "^3.1.7",
"@types/d3-interpolate": "^3.0.4",
"@uirouter/core": "^6.1.2",
"@uirouter/publish-scripts": "2.7.0",
"husky": "^9.1.7",
"prettier": "^3.7.4",
"pretty-quick": "^4.2.2",
"rolldown": "^1.0.0-beta.58",
"rollup-plugin-styles": "^4.0.0",
"serve": "^14.2.5",
"shx": "^0.4.0",
"@typescript/native-preview": "^7.0.0-dev.20250701",
"tslib": "^2.8.1",
"typescript": "^5.9.3"
},
"peerDependencies": {
Expand All @@ -61,9 +60,9 @@
"main": "_bundles/ui-router-visualizer.js",
"module": "_bundles/ui-router-visualizer.esm.js",
"typings": "artisinal.typings.d.ts",
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
"checkPeerDependencies": {
"ignore": [
"rollup"
]
}
}
33 changes: 33 additions & 0 deletions rolldown.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { defineConfig } from 'rolldown';
import styles from 'rollup-plugin-styles';

export default defineConfig({
input: 'src/visualizer.ts',
// Tell rolldown to let plugins handle CSS instead of its built-in extraction
moduleTypes: {
'.css': 'js',
},
plugins: [
// Inject CSS into the document <head> at runtime
styles({ mode: 'inject' }),
],
resolve: {
alias: {
// Redirect react jsx-runtime to preact's jsx-runtime
'react/jsx-runtime': 'preact/jsx-runtime',
},
},
output: [
{
file: '_bundles/ui-router-visualizer.js',
format: 'umd',
name: '@uirouter/visualizer',
sourcemap: true,
},
{
file: '_bundles/ui-router-visualizer.esm.js',
format: 'esm',
sourcemap: true,
},
],
});
26 changes: 0 additions & 26 deletions rollup.config.js

This file was deleted.

4 changes: 3 additions & 1 deletion src/statevis/StateVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ export class StateVisualizer extends Component<IProps, IState> {
>
<StateVisWindow
minimized={this.state.minimized}
ref={(windowRef) => (this.windowEl = (windowRef && windowRef.el) || this.windowEl)}
ref={(windowRef) => {
this.windowEl = (windowRef && windowRef.el) || this.windowEl;
}}
onResize={({ width, height }) => this.setState({ width, height })}
>
<div
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"compilerOptions": {
"jsx": "react",
"jsxFactory": "h",
"lib": ["es6", "dom"],
"lib": ["ES2018", "dom"],
"rootDir": ".",
"sourceRoot": "src",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"inlineSources": true
"inlineSources": true,
"skipLibCheck": true
}
}
Loading