Skip to content

Commit a58eaf3

Browse files
committed
Update for yFiles for HTML 3.0
1 parent f6e4fdc commit a58eaf3

File tree

8 files changed

+27
-27
lines changed

8 files changed

+27
-27
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ module.exports = {
99
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
1010
plugins: ['react-refresh'],
1111
rules: {
12-
'react-refresh/only-export-components': 'warn'
12+
'react-refresh/only-export-components': 'warn',
1313
},
1414
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ This sample application serves as a basic scaffold of how to integrate [yFiles f
88

99
## Version Information
1010

11-
- create vite v9.5.1
12-
- yFiles for HTML 2.6
11+
- React 19
12+
- yFiles for HTML 3.0
1313

1414
## Getting Started
1515

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

integration-howto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Adding yFiles as a dependency is almost as easy as installing an external librar
2424
```
2525
"dependencies": {
2626
...
27-
"yfiles": "../yFiles-for-HTML-Complete-2.6.0.4-Evaluation/lib-dev/yfiles-26.0.4+eval-dev.tgz"
27+
"@yfiles/yfiles": "../yFiles-for-HTML-Complete-3.0-Evaluation/lib-dev/yfiles-30.0.0+eval-dev.tgz"
2828
},
2929
```
3030

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
{
2-
"name": "yfiles-react-integration-basic",
3-
"version": "26.0.4",
2+
"name": "@yfiles/yfiles-react-integration-basic",
3+
"version": "30.0.0",
44
"author": "yWorks GmbH <[email protected]>",
55
"private": true,
66
"type": "module",
77
"scripts": {
88
"dev": "vite",
99
"build": "tsc && vite build",
10-
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
1110
"preview": "vite preview",
1211
"postinstall": "npm run copy-eval-license",
13-
"copy-eval-license": "node -e \"require('fs').copyFileSync('../yFiles-for-HTML-Complete-2.6.0.4-Evaluation/lib/license.json','./src/license.json')\""
12+
"copy-eval-license": "node -e \"require('fs').copyFileSync('../yFiles-for-HTML-Complete-3.0-Evaluation/lib/license.json','./src/license.json')\""
1413
},
1514
"dependencies": {
16-
"react": "^18.2.0",
17-
"react-dom": "^18.2.0",
18-
"yfiles": "../yFiles-for-HTML-Complete-2.6.0.4-Evaluation/lib-dev/yfiles-26.0.4+eval-dev.tgz"
15+
"react": "^19.0.0",
16+
"react-dom": "^19.0.0",
17+
"@yfiles/yfiles": "../yFiles-for-HTML-Complete-3.0-Evaluation/lib-dev/yfiles-30.0.3+eval-dev.tgz"
1918
},
2019
"devDependencies": {
21-
"@types/react": "^18.2.38",
22-
"@types/react-dom": "^18.2.17",
23-
"@typescript-eslint/eslint-plugin": "^6.12.0",
24-
"@typescript-eslint/parser": "^6.12.0",
25-
"@vitejs/plugin-react": "^4.2.0",
26-
"eslint": "^8.54.0",
27-
"eslint-plugin-react-hooks": "^4.6.0",
28-
"eslint-plugin-react-refresh": "^0.4.4",
29-
"typescript": "~5.3.2",
30-
"vite": "^5.0.4"
20+
"@eslint/js": "^9.19.0",
21+
"@types/react": "^19.0.8",
22+
"@types/react-dom": "^19.0.3",
23+
"@vitejs/plugin-react": "^4.3.4",
24+
"eslint": "^9.19.0",
25+
"eslint-plugin-react-hooks": "^5.0.0",
26+
"eslint-plugin-react-refresh": "^0.4.18",
27+
"globals": "^15.14.0",
28+
"typescript": "~5.7.2",
29+
"typescript-eslint": "^8.22.0",
30+
"vite": "^6.1.0"
3131
}
3232
}

src/components/ReactGraphComponent.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { useRef, useMemo, useLayoutEffect } from 'react'
2-
import { GraphComponent, GraphEditorInputMode, IGraph, License, Point, Rect } from 'yfiles'
1+
import { useLayoutEffect, useMemo, useRef } from 'react'
2+
import { GraphComponent, GraphEditorInputMode, IGraph, License, Point, Rect } from '@yfiles/yfiles'
33
import licenseData from '../license.json'
44

55
License.value = licenseData
@@ -40,7 +40,7 @@ export function ReactGraphComponent() {
4040

4141
useLayoutEffect(() => {
4242
const gcContainer = graphComponentContainer.current!
43-
gcContainer.appendChild(graphComponent.div)
43+
gcContainer.appendChild(graphComponent.htmlElement)
4444
return () => {
4545
gcContainer.innerHTML = ''
4646
}

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import './index.css'
66
ReactDOM.createRoot(document.querySelector<HTMLElement>('#root')!).render(
77
<React.StrictMode>
88
<App />
9-
</React.StrictMode>
9+
</React.StrictMode>,
1010
)

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import react from '@vitejs/plugin-react'
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
6-
plugins: [react()],
6+
plugins: [react()]
77
})

0 commit comments

Comments
 (0)