From 68f86b0e69501d59717993eee5c1fa8babd42c8d Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:04:33 +0100 Subject: [PATCH 01/42] START introducing mxgraph tutorial --- .../website/docs/development/_category_.json | 2 +- packages/website/docs/known-issues.md | 2 +- .../website/docs/tutorial/_category_.json | 8 +++ .../docs/tutorial/the-hello-world-example.md | 48 ++++++++++++++ packages/website/docs/usage/_category_.json | 2 +- packages/website/old-mxgraph/tutorial.html | 63 +++++-------------- 6 files changed, 73 insertions(+), 52 deletions(-) create mode 100644 packages/website/docs/tutorial/_category_.json create mode 100644 packages/website/docs/tutorial/the-hello-world-example.md diff --git a/packages/website/docs/development/_category_.json b/packages/website/docs/development/_category_.json index f0bc30e91e..92ba297833 100644 --- a/packages/website/docs/development/_category_.json +++ b/packages/website/docs/development/_category_.json @@ -1,6 +1,6 @@ { "label": "Development", - "position": 13, + "position": 21, "link": { "type": "generated-index", "description": "Everything you need to know when you are developing maxGraph." diff --git a/packages/website/docs/known-issues.md b/packages/website/docs/known-issues.md index 527f7b8245..751211423a 100644 --- a/packages/website/docs/known-issues.md +++ b/packages/website/docs/known-issues.md @@ -1,5 +1,5 @@ --- -sidebar_position: 20 +sidebar_position: 100 --- # Known Issues diff --git a/packages/website/docs/tutorial/_category_.json b/packages/website/docs/tutorial/_category_.json new file mode 100644 index 0000000000..ced855da92 --- /dev/null +++ b/packages/website/docs/tutorial/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Tutorial", + "position": 12, + "link": { + "type": "generated-index", + "description": "Everything you need to know to use specific features of maxGraph." + } +} diff --git a/packages/website/docs/tutorial/the-hello-world-example.md b/packages/website/docs/tutorial/the-hello-world-example.md new file mode 100644 index 0000000000..84983e7d8a --- /dev/null +++ b/packages/website/docs/tutorial/the-hello-world-example.md @@ -0,0 +1,48 @@ +--- +sidebar_position: 1 +description: XXXX. +--- + +# The Hello World Example + + +

Hello, World!

+

+ The Hello, World! example of maxGraph ships in a + single HTML file, + which contains the required namespaces, the mxGraph library script + and the example code. The example can be viewed by pointing Firefox or + Internet Explorer to the link above either on the local + filesystem or on a webserver. To display the source of the example + press Control-U in Firefox or click Page, View Source in Internet Explorer. +

+ + +## Container + +

+ For the JavaScript to actually render the graph, the page + contains an DOM node which will display the graph. This + DOM node is either dynamically created or it is obtained via + an ID using document.getElementById as in the + Hello, World! example. The DOM node is passed to the main + function and is used to construct the graph instance as shown + below. +

+

+ If you want the container to have scrollbars, use the `overflow:auto` CSS + directive instead of overflow:hidden in the style of the container. +

+

Graph

+

+ The code constructs an empty graph model and passes the container + and the empty model to the graph constructor. For this example, + all default event handling is disabled in the last line. +

+
+const model = new GraphDataModel();
+const graph = new Graph(container, model);
+
+

+ If you want the graph to be read-only you can use graph.setEnabled(false). +

diff --git a/packages/website/docs/usage/_category_.json b/packages/website/docs/usage/_category_.json index 832aeaf284..69706e6416 100644 --- a/packages/website/docs/usage/_category_.json +++ b/packages/website/docs/usage/_category_.json @@ -1,6 +1,6 @@ { "label": "Usage", - "position": 12, + "position": 13, "link": { "type": "generated-index", "description": "Everything you need to know to use specific features of maxGraph." diff --git a/packages/website/old-mxgraph/tutorial.html b/packages/website/old-mxgraph/tutorial.html index 2a49c1c3af..811c6eb04e 100644 --- a/packages/website/old-mxgraph/tutorial.html +++ b/packages/website/old-mxgraph/tutorial.html @@ -1,15 +1,5 @@ - - - mxGraph Tutorial - - - - - -

mxGraph Tutorial

-

Table Of Contents

-
-
+ +

Overview

The mxGraph package contains a client software, written in JavaScript, and a series @@ -45,16 +35,11 @@

Overview

  • .NET
  • PHP
  • -

    Hello, World!

    -

    - The Hello, World! example of mxGraph ships in a - single HTML file, - which contains the required namespaces, the mxGraph library script - and the example code. The example can be viewed by pointing Firefox or - Internet Explorer to the link above either on the local - filesystem or on a webserver. To display the source of the example - press Control-U in Firefox or click Page, View Source in Internet Explorer. -

    + + + + +

    Library

    The HEAD part of the page contains the JavaScript code and dependencies. @@ -105,33 +90,13 @@

    Browser Check

    } ... -

    Container

    -

    - For the JavaScript to actually render the graph, the page - contains an DOM node which will display the graph. This - DOM node is either dynamically created or it is obtained via - an ID using document.getElementById as in the - Hello, World! example. The DOM node is passed to the main - function and is used to construct the graph instance as shown - below. -

    -

    - If you want the container to have scrollbars, use the overflow:auto CSS - directive instead of overflow:hidden in the style of the container. -

    -

    Graph

    -

    - The code constructs an empty graph model and passes the container - and the empty model to the graph constructor. For this example, - all default event handling is disabled in the last line. -

    -
    -let model = new mxGraphModel();
    -let graph = new mxGraph(container, model);
    -
    -

    - If you want the graph to be read-only you can use graph.setEnabled(false). -

    + + + + + + +

    Vertices and Edges

    To insert vertices and edges, beginUpdate and endUpdate From abc2fa409ca16ec56ad601c81dc301a1962fbc22 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:04:43 +0100 Subject: [PATCH 02/42] EXTRA package-lock.json --> to check --- package-lock.json | 1648 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 1276 insertions(+), 372 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e78fdcde3..eeb9d1c6ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3805,204 +3805,6 @@ "@docusaurus/types": "*" } }, - "node_modules/@docusaurus/faster/node_modules/@swc/core": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.8.0.tgz", - "integrity": "sha512-EF8C5lp1RKMp3426tAKwQyVbg4Zcn/2FDax3cz8EcOXYQJM/ctB687IvBm9Ciej1wMcQ/dMRg+OB4Xl8BGLBoA==", - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.14" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.8.0", - "@swc/core-darwin-x64": "1.8.0", - "@swc/core-linux-arm-gnueabihf": "1.8.0", - "@swc/core-linux-arm64-gnu": "1.8.0", - "@swc/core-linux-arm64-musl": "1.8.0", - "@swc/core-linux-x64-gnu": "1.8.0", - "@swc/core-linux-x64-musl": "1.8.0", - "@swc/core-win32-arm64-msvc": "1.8.0", - "@swc/core-win32-ia32-msvc": "1.8.0", - "@swc/core-win32-x64-msvc": "1.8.0" - }, - "peerDependencies": { - "@swc/helpers": "*" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-darwin-arm64": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.8.0.tgz", - "integrity": "sha512-TIus1/SE/Ud4g84hCnchcagu+LfyndSDy5r5qf64nflojejDidPU9Fp1InzQhQpEgIpntnZID/KFCP5rQnvsIw==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-darwin-x64": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.8.0.tgz", - "integrity": "sha512-yCb1FHCX/HUmNRGB1X3CFJ1WPKXMosZVUe3K2TrosCGvytwgaLoW5FS0bZg5Qv6cEUERQBg75cJnOUPwLLRCVg==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.8.0.tgz", - "integrity": "sha512-6TdjVdiLaSW+eGiHKEojMDlx673nowrPHa6nM6toWgRzy8tIZgjPOguVKJDoMnoHuvO7SkOLCUiMRw0rTskypA==", - "cpu": [ - "arm" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.8.0.tgz", - "integrity": "sha512-TU2YcTornnyZiJUabRuk7Xtvzaep11FwK77IkFomjN9/Os5s25B8ea652c2fAQMe9RsM84FPVmX303ohxavjKQ==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-arm64-musl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.8.0.tgz", - "integrity": "sha512-2CdPTEKxx2hJIj/B0fn8L8k2coo/FDS95smzXyi2bov5FcrP6Ohboq8roFBYgj38fkHusXjY8qt+cCH7yXWAdg==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-x64-gnu": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.8.0.tgz", - "integrity": "sha512-14StQBifCs/AMsySdU95OmwNJr9LOVqo6rcTFt2b7XaWpe/AyeuMJFxcndLgUewksJHpfepzCTwNdbcYmuNo6A==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-x64-musl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.8.0.tgz", - "integrity": "sha512-qemJnAQlYqKCfWNqVv5SG8uGvw8JotwU86cuFUkq35oTB+dsSFM3b83+B1giGTKKFOh2nfWT7bvPXTKk+aUjew==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.8.0.tgz", - "integrity": "sha512-fXt5vZbnrVdXZzGj2qRnZtY3uh+NtLCaFjS2uD9w8ssdbjhbDZYlJCj2JINOjv35ttEfAD2goiYmVa5P/Ypl+g==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.8.0.tgz", - "integrity": "sha512-W4FA2vSJ+bGYiTj6gspxghSdKQNLfLMo65AH07u797x7I+YJj8amnFY/fQRlroDv5Dez/FHTv14oPlTlNFUpIw==", - "cpu": [ - "ia32" - ], - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/faster/node_modules/@swc/core-win32-x64-msvc": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.8.0.tgz", - "integrity": "sha512-Il4y8XwKDV0Bnk0IpA00kGcSQC6I9XOIinW5egTutnwIDfDE+qsD0j+0isW5H76GetY3/Ze0lVxeOXLAUgpegA==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, "node_modules/@docusaurus/logger": { "version": "3.6.3", "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.6.3.tgz", @@ -6570,6 +6372,23 @@ "node": ">=12" } }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", + "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/netbsd-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", @@ -6586,6 +6405,23 @@ "node": ">=12" } }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", + "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/openbsd-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", @@ -8700,9 +8536,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", - "integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.29.1.tgz", + "integrity": "sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==", "cpu": [ "arm" ], @@ -8714,9 +8550,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", - "integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.29.1.tgz", + "integrity": "sha512-CaRfrV0cd+NIIcVVN/jx+hVLN+VRqnuzLRmfmlzpOzB87ajixsN/+9L5xNmkaUUvEbI5BmIKS+XTwXsHEb65Ew==", "cpu": [ "arm64" ], @@ -8728,9 +8564,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", - "integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.29.1.tgz", + "integrity": "sha512-2ORr7T31Y0Mnk6qNuwtyNmy14MunTAMx06VAPI6/Ju52W10zk1i7i5U3vlDRWjhOI5quBcrvhkCHyF76bI7kEw==", "cpu": [ "arm64" ], @@ -8742,9 +8578,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", - "integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.29.1.tgz", + "integrity": "sha512-j/Ej1oanzPjmN0tirRd5K2/nncAhS9W6ICzgxV+9Y5ZsP0hiGhHJXZ2JQ53iSSjj8m6cRY6oB1GMzNn2EUt6Ng==", "cpu": [ "x64" ], @@ -8755,10 +8591,52 @@ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.29.1.tgz", + "integrity": "sha512-91C//G6Dm/cv724tpt7nTyP+JdN12iqeXGFM1SqnljCmi5yTXriH7B1r8AD9dAZByHpKAumqP1Qy2vVNIdLZqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.29.1.tgz", + "integrity": "sha512-hEioiEQ9Dec2nIRoeHUP6hr1PSkXzQaCUyqBDQ9I9ik4gCXQZjJMIVzoNLBRGet+hIUb3CISMh9KXuCcWVW/8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", - "integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.29.1.tgz", + "integrity": "sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.29.1.tgz", + "integrity": "sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==", "cpu": [ "arm" ], @@ -8770,9 +8648,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", - "integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.29.1.tgz", + "integrity": "sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==", "cpu": [ "arm64" ], @@ -8784,9 +8662,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", - "integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.29.1.tgz", + "integrity": "sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==", "cpu": [ "arm64" ], @@ -8797,10 +8675,38 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.29.1.tgz", + "integrity": "sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.29.1.tgz", + "integrity": "sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", - "integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.29.1.tgz", + "integrity": "sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==", "cpu": [ "riscv64" ], @@ -8811,10 +8717,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.29.1.tgz", + "integrity": "sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", - "integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.29.1.tgz", + "integrity": "sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==", "cpu": [ "x64" ], @@ -8826,9 +8746,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", - "integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.29.1.tgz", + "integrity": "sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==", "cpu": [ "x64" ], @@ -8840,9 +8760,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", - "integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.29.1.tgz", + "integrity": "sha512-F2OiJ42m77lSkizZQLuC+jiZ2cgueWQL5YC9tjo3AgaEw+KJmVxHGSyQfDUoYR9cci0lAywv2Clmckzulcq6ig==", "cpu": [ "arm64" ], @@ -8854,9 +8774,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", - "integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.29.1.tgz", + "integrity": "sha512-rYRe5S0FcjlOBZQHgbTKNrqxCBUmgDJem/VQTCcTnA2KCabYSWQDrytOzX7avb79cAAweNmMUb/Zw18RNd4mng==", "cpu": [ "ia32" ], @@ -8868,9 +8788,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", - "integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.29.1.tgz", + "integrity": "sha512-+10CMg9vt1MoHj6x1pxyjPSMjHTIlqs8/tBztXvPAx24SKs9jwVnKqHJumlH/IzhaPUaj3T6T6wfZr8okdXaIg==", "cpu": [ "x64" ], @@ -9440,14 +9360,14 @@ } }, "node_modules/@swc/core": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.26.tgz", - "integrity": "sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.10.4.tgz", + "integrity": "sha512-ut3zfiTLORMxhr6y/GBxkHmzcGuVpwJYX4qyXWuBKkpw/0g0S5iO1/wW7RnLnZbAi8wS/n0atRZoaZlXWBkeJg==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.12" + "@swc/types": "^0.1.17" }, "engines": { "node": ">=10" @@ -9457,16 +9377,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.7.26", - "@swc/core-darwin-x64": "1.7.26", - "@swc/core-linux-arm-gnueabihf": "1.7.26", - "@swc/core-linux-arm64-gnu": "1.7.26", - "@swc/core-linux-arm64-musl": "1.7.26", - "@swc/core-linux-x64-gnu": "1.7.26", - "@swc/core-linux-x64-musl": "1.7.26", - "@swc/core-win32-arm64-msvc": "1.7.26", - "@swc/core-win32-ia32-msvc": "1.7.26", - "@swc/core-win32-x64-msvc": "1.7.26" + "@swc/core-darwin-arm64": "1.10.4", + "@swc/core-darwin-x64": "1.10.4", + "@swc/core-linux-arm-gnueabihf": "1.10.4", + "@swc/core-linux-arm64-gnu": "1.10.4", + "@swc/core-linux-arm64-musl": "1.10.4", + "@swc/core-linux-x64-gnu": "1.10.4", + "@swc/core-linux-x64-musl": "1.10.4", + "@swc/core-win32-arm64-msvc": "1.10.4", + "@swc/core-win32-ia32-msvc": "1.10.4", + "@swc/core-win32-x64-msvc": "1.10.4" }, "peerDependencies": { "@swc/helpers": "*" @@ -9478,9 +9398,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.26.tgz", - "integrity": "sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.10.4.tgz", + "integrity": "sha512-sV/eurLhkjn/197y48bxKP19oqcLydSel42Qsy2zepBltqUx+/zZ8+/IS0Bi7kaWVFxerbW1IPB09uq8Zuvm3g==", "cpu": [ "arm64" ], @@ -9489,15 +9409,14 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.26.tgz", - "integrity": "sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.10.4.tgz", + "integrity": "sha512-gjYNU6vrAUO4+FuovEo9ofnVosTFXkF0VDuo1MKPItz6e2pxc2ale4FGzLw0Nf7JB1sX4a8h06CN16/pLJ8Q2w==", "cpu": [ "x64" ], @@ -9506,15 +9425,14 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.26.tgz", - "integrity": "sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.10.4.tgz", + "integrity": "sha512-zd7fXH5w8s+Sfvn2oO464KDWl+ZX1MJiVmE4Pdk46N3PEaNwE0koTfgx2vQRqRG4vBBobzVvzICC3618WcefOA==", "cpu": [ "arm" ], @@ -9523,15 +9441,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.26.tgz", - "integrity": "sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.10.4.tgz", + "integrity": "sha512-+UGfoHDxsMZgFD3tABKLeEZHqLNOkxStu+qCG7atGBhS4Slri6h6zijVvf4yI5X3kbXdvc44XV/hrP/Klnui2A==", "cpu": [ "arm64" ], @@ -9540,15 +9457,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.26.tgz", - "integrity": "sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.10.4.tgz", + "integrity": "sha512-cDDj2/uYsOH0pgAnDkovLZvKJpFmBMyXkxEG6Q4yw99HbzO6QzZ5HDGWGWVq/6dLgYKlnnmpjZCPPQIu01mXEg==", "cpu": [ "arm64" ], @@ -9557,15 +9473,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.26.tgz", - "integrity": "sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.10.4.tgz", + "integrity": "sha512-qJXh9D6Kf5xSdGWPINpLGixAbB5JX8JcbEJpRamhlDBoOcQC79dYfOMEIxWPhTS1DGLyFakAx2FX/b2VmQmj0g==", "cpu": [ "x64" ], @@ -9574,15 +9489,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.26.tgz", - "integrity": "sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.10.4.tgz", + "integrity": "sha512-A76lIAeyQnHCVt0RL/pG+0er8Qk9+acGJqSZOZm67Ve3B0oqMd871kPtaHBM0BW3OZAhoILgfHW3Op9Q3mx3Cw==", "cpu": [ "x64" ], @@ -9591,15 +9505,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.26.tgz", - "integrity": "sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.10.4.tgz", + "integrity": "sha512-e6j5kBu4fIY7fFxFxnZI0MlEovRvp50Lg59Fw+DVbtqHk3C85dckcy5xKP+UoXeuEmFceauQDczUcGs19SRGSQ==", "cpu": [ "arm64" ], @@ -9608,15 +9521,14 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.26.tgz", - "integrity": "sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.10.4.tgz", + "integrity": "sha512-RSYHfdKgNXV/amY5Tqk1EWVsyQnhlsM//jeqMLw5Fy9rfxP592W9UTumNikNRPdjI8wKKzNMXDb1U29tQjN0dg==", "cpu": [ "ia32" ], @@ -9625,15 +9537,14 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.26.tgz", - "integrity": "sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.10.4.tgz", + "integrity": "sha512-1ujYpaqfqNPYdwKBlvJnOqcl+Syn3UrQ4XE0Txz6zMYgyh6cdU6a3pxqLqIUSJ12MtXRA9ZUhEz1ekU3LfLWXw==", "cpu": [ "x64" ], @@ -9642,7 +9553,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=10" } @@ -9838,9 +9748,9 @@ } }, "node_modules/@swc/jest": { - "version": "0.2.36", - "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.36.tgz", - "integrity": "sha512-8X80dp81ugxs4a11z1ka43FPhP+/e+mJNXJSxiNYk8gIX/jPBtY4gQTrKu/KIoco8bzKuPI5lUxjfLiGsfvnlw==", + "version": "0.2.37", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.37.tgz", + "integrity": "sha512-CR2BHhmXKGxTiFr21DYPRHQunLkX3mNIFGFkxBGji6r9uyIR5zftTOVYj1e0sFNMV2H7mf/+vpaglqaryBtqfQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9856,9 +9766,9 @@ } }, "node_modules/@swc/types": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.14.tgz", - "integrity": "sha512-PbSmTiYCN+GMrvfjrMo9bdY+f2COnwbdnoMw7rqU/PI5jXpKjxOGZ0qqZCImxnT81NkNsKnmEpvu+hRXLBeCJg==", + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.17.tgz", + "integrity": "sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==", "license": "Apache-2.0", "dependencies": { "@swc/counter": "^0.1.3" @@ -10039,9 +9949,10 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "license": "MIT" }, "node_modules/@types/estree-jsx": { "version": "1.0.5", @@ -28319,13 +28230,13 @@ } }, "node_modules/rollup": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz", - "integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.29.1.tgz", + "integrity": "sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -28335,67 +28246,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.20.0", - "@rollup/rollup-android-arm64": "4.20.0", - "@rollup/rollup-darwin-arm64": "4.20.0", - "@rollup/rollup-darwin-x64": "4.20.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.20.0", - "@rollup/rollup-linux-arm-musleabihf": "4.20.0", - "@rollup/rollup-linux-arm64-gnu": "4.20.0", - "@rollup/rollup-linux-arm64-musl": "4.20.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", - "@rollup/rollup-linux-riscv64-gnu": "4.20.0", - "@rollup/rollup-linux-s390x-gnu": "4.20.0", - "@rollup/rollup-linux-x64-gnu": "4.20.0", - "@rollup/rollup-linux-x64-musl": "4.20.0", - "@rollup/rollup-win32-arm64-msvc": "4.20.0", - "@rollup/rollup-win32-ia32-msvc": "4.20.0", - "@rollup/rollup-win32-x64-msvc": "4.20.0", + "@rollup/rollup-android-arm-eabi": "4.29.1", + "@rollup/rollup-android-arm64": "4.29.1", + "@rollup/rollup-darwin-arm64": "4.29.1", + "@rollup/rollup-darwin-x64": "4.29.1", + "@rollup/rollup-freebsd-arm64": "4.29.1", + "@rollup/rollup-freebsd-x64": "4.29.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.29.1", + "@rollup/rollup-linux-arm-musleabihf": "4.29.1", + "@rollup/rollup-linux-arm64-gnu": "4.29.1", + "@rollup/rollup-linux-arm64-musl": "4.29.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.29.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.29.1", + "@rollup/rollup-linux-riscv64-gnu": "4.29.1", + "@rollup/rollup-linux-s390x-gnu": "4.29.1", + "@rollup/rollup-linux-x64-gnu": "4.29.1", + "@rollup/rollup-linux-x64-musl": "4.29.1", + "@rollup/rollup-win32-arm64-msvc": "4.29.1", + "@rollup/rollup-win32-ia32-msvc": "4.29.1", + "@rollup/rollup-win32-x64-msvc": "4.29.1", "fsevents": "~2.3.2" } }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", - "integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", - "integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/rollup/node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", - "integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, "node_modules/rtl-detect": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/rtl-detect/-/rtl-detect-1.1.2.tgz", @@ -31625,12 +31497,6 @@ "integrity": "sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==", "dev": true }, - "node_modules/webpack/node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "license": "MIT" - }, "node_modules/webpack/node_modules/es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", @@ -32231,8 +32097,8 @@ "version": "0.14.0", "license": "Apache-2.0", "devDependencies": { - "@swc/core": "~1.7.26", - "@swc/jest": "~0.2.36", + "@swc/core": "~1.10.4", + "@swc/jest": "~0.2.37", "jest": "~29.7.0", "jest-environment-jsdom": "~29.7.0", "npm-run-all": "~4.1.5", @@ -34776,14 +34642,1052 @@ "name": "@maxgraph/ts-example-vite-custom-shapes", "license": "Apache-2.0", "devDependencies": { - "vite": "~5.4.11" + "vite": "~6.0.7" } }, "packages/ts-example-without-defaults": { "name": "@maxgraph/ts-example-vite-without-defaults", "license": "Apache-2.0", "devDependencies": { - "vite": "~5.4.11" + "vite": "~6.0.7" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/aix-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/android-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/android-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/android-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/darwin-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/darwin-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/freebsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/linux-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/linux-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/linux-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/linux-loong64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/linux-mips64el": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/linux-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/linux-riscv64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/linux-s390x": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/linux-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/netbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/openbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/sunos-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/win32-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/win32-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/@esbuild/win32-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example-without-defaults/node_modules/esbuild": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + } + }, + "packages/ts-example-without-defaults/node_modules/vite": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.7.tgz", + "integrity": "sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.24.2", + "postcss": "^8.4.49", + "rollup": "^4.23.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "packages/ts-example-without-defaults/node_modules/yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "dev": true, + "license": "ISC", + "optional": true, + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "packages/ts-example/node_modules/@esbuild/aix-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/android-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/android-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/android-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/darwin-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/darwin-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/freebsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/linux-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/linux-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/linux-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/linux-loong64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/linux-mips64el": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/linux-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/linux-riscv64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/linux-s390x": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/linux-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/netbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/openbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/sunos-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/win32-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/win32-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/@esbuild/win32-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "packages/ts-example/node_modules/esbuild": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + } + }, + "packages/ts-example/node_modules/vite": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.7.tgz", + "integrity": "sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.24.2", + "postcss": "^8.4.49", + "rollup": "^4.23.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "packages/ts-example/node_modules/yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "dev": true, + "license": "ISC", + "optional": true, + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" } }, "packages/ts-support": { From c4e49aa18ddcdbe692042908ce215d9de7890247 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:11:21 +0100 Subject: [PATCH 03/42] more content --- .../docs/tutorial/the-hello-world-example.md | 48 ++++++++++++++++++- packages/website/old-mxgraph/tutorial.html | 46 ++---------------- 2 files changed, 49 insertions(+), 45 deletions(-) diff --git a/packages/website/docs/tutorial/the-hello-world-example.md b/packages/website/docs/tutorial/the-hello-world-example.md index 84983e7d8a..36030508f9 100644 --- a/packages/website/docs/tutorial/the-hello-world-example.md +++ b/packages/website/docs/tutorial/the-hello-world-example.md @@ -39,10 +39,54 @@ description: XXXX. and the empty model to the graph constructor. For this example, all default event handling is disabled in the last line.

    -
    +
    +```javascript
     const model = new GraphDataModel();
     const graph = new Graph(container, model);
    -
    +``` +

    If you want the graph to be read-only you can use graph.setEnabled(false).

    + +

    Vertices and Edges

    +

    + To insert vertices and edges, beginUpdate and endUpdate + are used to create a transaction. The endUpdate should always go + into a finally-block to make sure it is always executed if the beginUpdate + was executed. However, the beginUpdate should not be part of the + try-block to make sure endUpdate is never executed if beginUpdate + fails. This is required for the model to remain in a consistent state, that is, for + each call to beginUpdate there should always be exactly one call to + endUpdate. +

    +

    + The part within the try-block creates the vertices and edges for the graph. + The default parent is obtained from the graph and is typically the first + child of the root cell in the model, which is created automatically when + using the graph model constructor with no arguments. +

    + +```javascript +// Gets the default parent for inserting new cells. This +// is normally the first child of the root (ie. layer 0). +let parent = graph.getDefaultParent(); + +// Adds cells to the model in a single step +model.beginUpdate(); +try { + const v1 = graph.insertVertex(parent, null, 'Hello,', 20, 20, 80, 30); + const v2 = graph.insertVertex(parent, null, 'World!', 200, 150, 80, 30); + graph.insertEdge(parent, null, '', v1, v2); +} +finally { + // Updates the display + model.endUpdate(); +} +``` + +

    + The use of beginUpdate and endUpdate does not + only improve the display performance, but it is also used to mark the + boundaries for undoable changes when undo/redo is used. +

    diff --git a/packages/website/old-mxgraph/tutorial.html b/packages/website/old-mxgraph/tutorial.html index 811c6eb04e..5e4a88c36d 100644 --- a/packages/website/old-mxgraph/tutorial.html +++ b/packages/website/old-mxgraph/tutorial.html @@ -39,7 +39,7 @@

    Overview

    - +

    Library

    The HEAD part of the page contains the JavaScript code and dependencies. @@ -90,54 +90,14 @@

    Browser Check

    } ... - + -

    Vertices and Edges

    -

    - To insert vertices and edges, beginUpdate and endUpdate - are used to create a transaction. The endUpdate should always go - into a finally-block to make sure it is always executed if the beginUpdate - was executed. However, the beginUpdate should not be part of the - try-block to make sure endUpdate is never executed if beginUpdate - fails. This is required for the model to remain in a consistent state, that is, for - each call to beginUpdate there should always be exactly one call to - endUpdate. -

    -

    - The part within the try-block creates the vertices and edges for the graph. - The default parent is obtained from the graph and is typically the first - child of the root cell in the model, which is created automatically when - using the graph model c'tor with no arguments. -

    -
    -// Gets the default parent for inserting new cells. This
    -// is normally the first child of the root (ie. layer 0).
    -let parent = graph.getDefaultParent();
     
    -// Adds cells to the model in a single step
    -model.beginUpdate();
    -try
    -{
    -  var v1 = graph.insertVertex(parent, null, 'Hello,', 20, 20, 80, 30);
    -  var v2 = graph.insertVertex(parent, null, 'World!', 200, 150, 80, 30);
    -  var e1 = graph.insertEdge(parent, null, '', v1, v2);
    -}
    -finally
    -{
    -  // Updates the display
    -  model.endUpdate();
    -}
    -
    -

    - The use of beginUpdate and endUpdate does not - only improve the display performance, but it is also used to mark the - boundaries for undoable changes when undo/redo is used. -

    Graphs

    Instantiate mxGraph @@ -272,7 +232,7 @@

    Appearance

    Due to the nature of the display, where all cells are created once and updated only if the model fires a notification for a change, you must - invoke view.invalidate(cell) for each cell who's image + invoke view.invalidate(cell) for each cell whose image has changed, and call view.validate to update the display.

    Editors

    From 875a45b300e2d8583bd8843140b0999a25dcd4cb Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:12:22 +0100 Subject: [PATCH 04/42] rename folder --- packages/website/docs/{tutorial => tutorials}/_category_.json | 2 +- .../docs/{tutorial => tutorials}/the-hello-world-example.md | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename packages/website/docs/{tutorial => tutorials}/_category_.json (86%) rename packages/website/docs/{tutorial => tutorials}/the-hello-world-example.md (100%) diff --git a/packages/website/docs/tutorial/_category_.json b/packages/website/docs/tutorials/_category_.json similarity index 86% rename from packages/website/docs/tutorial/_category_.json rename to packages/website/docs/tutorials/_category_.json index ced855da92..77b4fe8ba9 100644 --- a/packages/website/docs/tutorial/_category_.json +++ b/packages/website/docs/tutorials/_category_.json @@ -1,5 +1,5 @@ { - "label": "Tutorial", + "label": "Tutorials", "position": 12, "link": { "type": "generated-index", diff --git a/packages/website/docs/tutorial/the-hello-world-example.md b/packages/website/docs/tutorials/the-hello-world-example.md similarity index 100% rename from packages/website/docs/tutorial/the-hello-world-example.md rename to packages/website/docs/tutorials/the-hello-world-example.md From c2b767d1719688dcbb49bdde95ece29b7cc1ef39 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:19:08 +0100 Subject: [PATCH 05/42] graphs page --- .../tutorials/assets/graphs}/editor.png | Bin .../tutorials/assets/graphs}/graph.png | Bin .../tutorials/assets/graphs}/model.png | Bin packages/website/docs/tutorials/graphs.md | 268 ++++++++++++++++++ .../docs/tutorials/the-hello-world-example.md | 3 + packages/website/old-mxgraph/tutorial.html | 246 ---------------- 6 files changed, 271 insertions(+), 246 deletions(-) rename packages/website/{old-mxgraph/images => docs/tutorials/assets/graphs}/editor.png (100%) rename packages/website/{old-mxgraph/images => docs/tutorials/assets/graphs}/graph.png (100%) rename packages/website/{old-mxgraph/images => docs/tutorials/assets/graphs}/model.png (100%) create mode 100644 packages/website/docs/tutorials/graphs.md diff --git a/packages/website/old-mxgraph/images/editor.png b/packages/website/docs/tutorials/assets/graphs/editor.png similarity index 100% rename from packages/website/old-mxgraph/images/editor.png rename to packages/website/docs/tutorials/assets/graphs/editor.png diff --git a/packages/website/old-mxgraph/images/graph.png b/packages/website/docs/tutorials/assets/graphs/graph.png similarity index 100% rename from packages/website/old-mxgraph/images/graph.png rename to packages/website/docs/tutorials/assets/graphs/graph.png diff --git a/packages/website/old-mxgraph/images/model.png b/packages/website/docs/tutorials/assets/graphs/model.png similarity index 100% rename from packages/website/old-mxgraph/images/model.png rename to packages/website/docs/tutorials/assets/graphs/model.png diff --git a/packages/website/docs/tutorials/graphs.md b/packages/website/docs/tutorials/graphs.md new file mode 100644 index 0000000000..09e6a5e0d2 --- /dev/null +++ b/packages/website/docs/tutorials/graphs.md @@ -0,0 +1,268 @@ +--- +sidebar_position: 2 +description: XXXX. +--- + +[//]: # (TODO add mxGraph copyright) + +# Graphs + +

    + Instantiate mxGraph + in order to create a graph. This is the central class in the API. + Everything else is auxiliary. +

    + +![](assets/graphs/graph.png) + +

    + To create a new graph instance, a DOM node (typically a DIV) is + required: +

    +
    +let node = document.getElementById('id-of-graph-container');
    +let graph = new mxGraph(node);
    +
    +

    Model

    +

    + mxCell defines the + elements of the graph model, which is implemented by + mxGraphModel. +

    + +![](assets/graphs/model.png) + + + +

    + The graph model has the following properties: +

    + +

    + The graph and structural information is stored in the cells, as well as the + user objects, which are used to store the value associated with + the cells (aka business objects). +

    +

    + To create a new graph model with a root cell and a default layer (first child): +

    + +```javascript +const root = new Cell(); +root.insert(new Cell()); +const model = new GraphDataModel(root); +``` + + +

    Stylesheet

    +

    + The appearance of the cells in a graph is defined by the + stylesheet, which is an instance of + + mxStylesheet. + The stylesheet maps from stylenames to styles. + A style is an array of key, value pairs to be + used with the cells. The keys are defined in + + mxConstants and the values may be + strings and numbers or JavaScript objects or functions. +

    +

    + To modify the default styles for vertices and edges in an existing graph: +

    +
    +let vertexStyle = graph.getStylesheet().getDefaultVertexStyle();
    +vertexStyle[mxConstants.STYLE_ROUNDED] = true;
    +
    +let edgeStyle = graph.getStylesheet().getDefaultEdgeStyle();
    +edgeStyle[mxConstants.STYLE_EDGE] = mxEdgeStyle.TopToBottom;
    +
    +

    Styles

    +

    + The style information for a cell is stored in cell.style. + The style is part of the cell's state and is normally changed via + mxGraphModel.setStyle, which will update all views. + The cell style is a string of the form +

    +
    +[stylename;|key=value;]
    +
    +

    + which tells the graph to use the given named styles and override the + specified key, value pairs in the given order. For example, to use the + rounded + style and override the stroke- and fillColor, the style would be defined as: +

    +
    +rounded;strokeColor=red;fillColor=green
    +
    +

    + To use the above in Hello, World!, the stylename would be passed to the + insertVertex method as follows: +

    +
    +var v1 = graph.insertVertex(parent, null, 'Hello',
    +  20, 20, 80, 30, 'rounded;strokeColor=red;fillColor=green');
    +
    +

    Appearance

    +

    + In certain cases you may want to override specific attributes based on + dynamic properties of a cell (ie. it's value, aka. userobject), such as + the image, indicator shape, -image, -color or -gradient color), in + which case you can override getImage, + getIndicatorShape, getIndicatorImage, + getIndicatorColor and getIndicatorGradientColor + respectively. Note that these methods take a cell state as an argument, + which points to a "resolved" (that is, an array) version of the + cell's style. Hence, the default implementation for getImage + looks as follows: +

    +
    +mxGraph.prototype.getImage = function(state)
    +{
    +  if (state != null && state.style != null)
    +  {
    +    return state.style[mxConstants.STYLE_IMAGE];
    +  }
    +  return null;
    +}
    +
    +

    + This method may be overridden to return any image for the given state. + Typically, the image is defined by either state.cell, + which points to the graph cell associated with the state, or by + state.cell.value, which refers to the cell's user object. +

    +

    + Due to the nature of the display, where all cells are created once and + updated only if the model fires a notification for a change, you must + invoke view.invalidate(cell) for each cell whose image + has changed, and call view.validate to update the display. +

    +

    Editors

    +

    + Instantiate mxEditor in + order to create an editor. This is the central class in the editor + package. Everything else in this package is auxiliary. + To create a new editor instance and configure it using a config + file, you can pass the name of the config file to the + mxEditor constructor. +

    + + +![](assets/graphs/editor.png) + +

    + To create a new editor instance and configure it, the following code is used: +

    +
    +let config = mxUtils.load('editors/config/keyhandler-commons.xml').getDocumentElement();
    +let editor = new mxEditor(config);
    +
    +

    + TODO add link to the codecs page + The configuration file is an XML file that is passed to + mxCodec, which in + turn uses mxEditorCodec + and others to read the XML into the editor object hierarchy. This is normally + done at startup time to configure the editor, graph, model, toolbar, popupmenus + etc using the I/O subsystem. +

    + + +

    CSS

    +

    + The CSS stylesheet contains the style definitions for various + elements of the user interface, such as the rubberband selection, + the in-place editor or the popup menu. It also contains the directives + required to enable VML support in Internet Explorer, so it is substantial + that the stylesheet is included in the page. +

    +

    + Additional stylesheets may either be added programmatically using + mxClient.link('stylesheet', filename) or + via a stylesheet tag of the UI section in the editor configuration, eg.: +

    + + +
    +<mxEditor>
    +  <ui>
    +    <stylesheet name="examples/editors/css/process.css"/>
    +    ...
    +
    + + + +

    Templates

    +

    + To add new cell types, create a template in the templates array section of + the model in the config file (mxEditor/mxGraph/mxGraphModel/Array[as=templates]) + as follows: +

    +
    +<add as="symbol">
    +  <Symbol label="Symbol" customAttribute="whatever">
    +    <mxCell vertex="1" connectable="1" style="symbol;image=images/event.png">
    +      <mxGeometry as="geometry" width="32" height="32"/>
    +    </mxCell>
    +    <CustomChild customAttribute="whatever"/>
    +  </Symbol>
    +</add>
    +
    +

    + The as-attribute of the add-element contains the + name under which the template will be accessible for later use. The + Symbol-child element is a custom (ie workflow) element, and + can have any name and any number of child elements and custom attributes. + The label attribute is a special one that is used for the textual + representation of the cell in the graph. The mxCell element + is another special child node which contains the graphical information for + the cell, namely, the cell-type, -style, -size and -position. +

    +

    + See mxGraph.convertValueToString if you would like to use another + attribute or a combination of attributes for the textual representation, + and mxCell.valueChanged to handle in-place editing by storing + the new text value in the respective attribute(s). +

    + + +

    Toolbar

    +

    + To use the template in the graph, a toolbar item must be added which refers + to the template in the mxDefaultToolbar section of the config file + (mxEditor/mxDefaultToolbar[as=toolbar]) as follows: +

    +
    +<add as="symbolTool" template="symbol"
    +  style="symbol;image=wf/images/bpmn/special_event.png"
    +  icon="wf/images/bpmn/small_event.gif"/>
    +
    +

    + The as attribute specifies the tooltip to be displayed for the + icon in the toolbar, the template-attribute refers to the name + under which the template was previously added. The style- + attribute is optional, and may be used to override the style defined in the + template definition. Finally, the icon specifies the icon to be used for the + toolbar item. +

    +

    + Note that the as attribute is assumed to be the key for a language + resource, in this case symbolTool. If the resource is not defined + in mxResources, then the + attribute value is used as the label. +

    diff --git a/packages/website/docs/tutorials/the-hello-world-example.md b/packages/website/docs/tutorials/the-hello-world-example.md index 36030508f9..8daa56d932 100644 --- a/packages/website/docs/tutorials/the-hello-world-example.md +++ b/packages/website/docs/tutorials/the-hello-world-example.md @@ -3,6 +3,9 @@ sidebar_position: 1 description: XXXX. --- +[//]: # (TODO add mxGraph copyright) + + # The Hello World Example diff --git a/packages/website/old-mxgraph/tutorial.html b/packages/website/old-mxgraph/tutorial.html index 5e4a88c36d..e8e514c256 100644 --- a/packages/website/old-mxgraph/tutorial.html +++ b/packages/website/old-mxgraph/tutorial.html @@ -93,252 +93,6 @@

    Browser Check

    - - - - - -

    Graphs

    -

    - Instantiate mxGraph - in order to create a graph. This is the central class in the API. - Everything else is auxiliary. -

    - -

    - To create a new graph instance, a DOM node (typically a DIV) is - required: -

    -
    -let node = document.getElementById('id-of-graph-container');
    -let graph = new mxGraph(node);
    -
    -

    Model

    -

    - mxCell defines the - elements of the graph model, which is implemented by - mxGraphModel. -

    - -

    - The graph model has the following properties: -

    - -

    - The graph and structural information is stored in the cells, as well as the - user objects, which are used to store the value associated with - the cells (aka business objects). -

    -

    - To create a new graph model with a root cell and a default layer (first child): -

    -
    -let root = new mxCell();
    -root.insert(new mxCell());
    -let model = new mxGraphModel(root);
    -
    -

    Stylesheet

    -

    - The appearance of the cells in a graph is defined by the - stylesheet, which is an instance of - - mxStylesheet. - The stylesheet maps from stylenames to styles. - A style is an array of key, value pairs to be - used with the cells. The keys are defined in - - mxConstants and the values may be - strings and numbers or JavaScript objects or functions. -

    -

    - To modify the default styles for vertices and edges in an existing graph: -

    -
    -let vertexStyle = graph.getStylesheet().getDefaultVertexStyle();
    -vertexStyle[mxConstants.STYLE_ROUNDED] = true;
    -
    -let edgeStyle = graph.getStylesheet().getDefaultEdgeStyle();
    -edgeStyle[mxConstants.STYLE_EDGE] = mxEdgeStyle.TopToBottom;
    -
    -

    Styles

    -

    - The style information for a cell is stored in cell.style. - The style is part of the cell's state and is normally changed via - mxGraphModel.setStyle, which will update all views. - The cell style is a string of the form -

    -
    -[stylename;|key=value;]
    -
    -

    - which tells the graph to use the given named styles and override the - specified key, value pairs in the given order. For example, to use the - rounded - style and override the stroke- and fillColor, the style would be defined as: -

    -
    -rounded;strokeColor=red;fillColor=green
    -
    -

    - To use the above in Hello, World!, the stylename would be passed to the - insertVertex method as follows: -

    -
    -var v1 = graph.insertVertex(parent, null, 'Hello',
    -  20, 20, 80, 30, 'rounded;strokeColor=red;fillColor=green');
    -
    -

    Appearance

    -

    - In certain cases you may want to override specific attributes based on - dynamic properties of a cell (ie. it's value, aka. userobject), such as - the image, indicator shape, -image, -color or -gradient color), in - which case you can override getImage, - getIndicatorShape, getIndicatorImage, - getIndicatorColor and getIndicatorGradientColor - respectively. Note that these methods take a cell state as an argument, - which points to a "resolved" (that is, an array) version of the - cell's style. Hence, the default implementation for getImage - looks as follows: -

    -
    -mxGraph.prototype.getImage = function(state)
    -{
    -  if (state != null && state.style != null)
    -  {
    -    return state.style[mxConstants.STYLE_IMAGE];
    -  }
    -  return null;
    -}
    -
    -

    - This method may be overridden to return any image for the given state. - Typically, the image is defined by either state.cell, - which points to the graph cell associated with the state, or by - state.cell.value, which refers to the cell's user object. -

    -

    - Due to the nature of the display, where all cells are created once and - updated only if the model fires a notification for a change, you must - invoke view.invalidate(cell) for each cell whose image - has changed, and call view.validate to update the display. -

    -

    Editors

    -

    - Instantiate mxEditor in - order to create an editor. This is the central class in the editor - package. Everything else in this package is auxiliary. - To create a new editor instance and configure it using a config - file, you can pass the name of the config file to the - mxEditor constructor. -

    - -

    - To create a new editor instance and configure it, the following code is used: -

    -
    -let config = mxUtils.load('editors/config/keyhandler-commons.xml').getDocumentElement();
    -let editor = new mxEditor(config);
    -
    -

    - TODO add link to the codecs page - The configuration file is an XML file that is passed to - mxCodec, which in - turn uses mxEditorCodec - and others to read the XML into the editor object hierarchy. This is normally - done at startup time to configure the editor, graph, model, toolbar, popupmenus - etc using the I/O subsystem. -

    -

    CSS

    -

    - The CSS stylesheet contains the style definitions for various - elements of the user interface, such as the rubberband selection, - the in-place editor or the popup menu. It also contains the directives - required to enable VML support in Internet Explorer, so it is substantial - that the stylesheet is included in the page. -

    -

    - Additional stylesheets may either be added programmatically using - mxClient.link('stylesheet', filename) or - via a stylesheet tag of the UI section in the editor configuration, eg.: -

    -
    -<mxEditor>
    -  <ui>
    -    <stylesheet name="examples/editors/css/process.css"/>
    -    ...
    -
    -

    Templates

    -

    - To add new cell types, create a template in the templates array section of - the model in the config file (mxEditor/mxGraph/mxGraphModel/Array[as=templates]) - as follows: -

    -
    -<add as="symbol">
    -  <Symbol label="Symbol" customAttribute="whatever">
    -    <mxCell vertex="1" connectable="1" style="symbol;image=images/event.png">
    -      <mxGeometry as="geometry" width="32" height="32"/>
    -    </mxCell>
    -    <CustomChild customAttribute="whatever"/>
    -  </Symbol>
    -</add>
    -
    -

    - The as-attribute of the add-element contains the - name under which the template will be accessible for later use. The - Symbol-child element is a custom (ie workflow) element, and - can have any name and any number of child elements and custom attributes. - The label attribute is a special one that is used for the textual - representation of the cell in the graph. The mxCell element - is another special child node which contains the graphical information for - the cell, namely, the cell-type, -style, -size and -position. -

    -

    - See mxGraph.convertValueToString if you would like to use another - attribute or a combination of attributes for the textual representation, - and mxCell.valueChanged to handle in-place editing by storing - the new text value in the respective attribute(s). -

    -

    Toolbar

    -

    - To use the template in the graph, a toolbar item must be added which refers - to the template in the mxDefaultToolbar section of the config file - (mxEditor/mxDefaultToolbar[as=toolbar]) as follows: -

    -
    -<add as="symbolTool" template="symbol"
    -  style="symbol;image=wf/images/bpmn/special_event.png"
    -  icon="wf/images/bpmn/small_event.gif"/>
    -
    -

    - The as attribute specifies the tooltip to be displayed for the - icon in the toolbar, the template-attribute refers to the name - under which the template was previously added. The style- - attribute is optional, and may be used to override the style defined in the - template definition. Finally, the icon specifies the icon to be used for the - toolbar item. -

    -

    - Note that the as attribute is assumed to be the key for a language - resource, in this case symbolTool. If the resource is not defined - in mxResources, then the - attribute value is used as the label. -

    - - From 3f0c38f4433955195fabcdf64826fc5e7f5316ce Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:22:28 +0100 Subject: [PATCH 06/42] hello world: fix title --- packages/website/docs/tutorials/the-hello-world-example.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/website/docs/tutorials/the-hello-world-example.md b/packages/website/docs/tutorials/the-hello-world-example.md index 8daa56d932..14f719c869 100644 --- a/packages/website/docs/tutorials/the-hello-world-example.md +++ b/packages/website/docs/tutorials/the-hello-world-example.md @@ -3,11 +3,10 @@ sidebar_position: 1 description: XXXX. --- -[//]: # (TODO add mxGraph copyright) - - # The Hello World Example +[//]: # (TODO add mxGraph copyright) +

    Hello, World!

    From 45c00a28c660347ffcc47d744170381f427adae7 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:22:57 +0100 Subject: [PATCH 07/42] graphs: fix title + highlight js example --- packages/website/docs/tutorials/graphs.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/website/docs/tutorials/graphs.md b/packages/website/docs/tutorials/graphs.md index 09e6a5e0d2..54c40ea877 100644 --- a/packages/website/docs/tutorials/graphs.md +++ b/packages/website/docs/tutorials/graphs.md @@ -3,9 +3,10 @@ sidebar_position: 2 description: XXXX. --- +# Graphs + [//]: # (TODO add mxGraph copyright) -# Graphs

    Instantiate mxGraph @@ -71,25 +72,26 @@ const model = new GraphDataModel(root);

    The appearance of the cells in a graph is defined by the stylesheet, which is an instance of - - mxStylesheet. + mxStylesheet. The stylesheet maps from stylenames to styles. A style is an array of key, value pairs to be used with the cells. The keys are defined in - - mxConstants and the values may be + mxConstants and the values may be strings and numbers or JavaScript objects or functions.

    To modify the default styles for vertices and edges in an existing graph:

    -
    +
    +```javascript
     let vertexStyle = graph.getStylesheet().getDefaultVertexStyle();
     vertexStyle[mxConstants.STYLE_ROUNDED] = true;
     
     let edgeStyle = graph.getStylesheet().getDefaultEdgeStyle();
     edgeStyle[mxConstants.STYLE_EDGE] = mxEdgeStyle.TopToBottom;
    -
    +``` + +

    Styles

    The style information for a cell is stored in cell.style. @@ -130,7 +132,8 @@ var v1 = graph.insertVertex(parent, null, 'Hello', cell's style. Hence, the default implementation for getImage looks as follows:

    -
    +
    +```javascript
     mxGraph.prototype.getImage = function(state)
     {
       if (state != null && state.style != null)
    @@ -139,7 +142,8 @@ mxGraph.prototype.getImage = function(state)
       }
       return null;
     }
    -
    +``` +

    This method may be overridden to return any image for the given state. Typically, the image is defined by either state.cell, From 042c2d018fa23c50d2993475410895f071dedef6 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:29:02 +0100 Subject: [PATCH 08/42] input-output --- .../website/docs/tutorials/input-output.md | 80 ++++++++++++ packages/website/old-mxgraph/tutorial.html | 120 ------------------ 2 files changed, 80 insertions(+), 120 deletions(-) create mode 100644 packages/website/docs/tutorials/input-output.md diff --git a/packages/website/docs/tutorials/input-output.md b/packages/website/docs/tutorials/input-output.md new file mode 100644 index 0000000000..1bdafbb836 --- /dev/null +++ b/packages/website/docs/tutorials/input-output.md @@ -0,0 +1,80 @@ +--- +sidebar_position: 2 +description: XXXX. +--- + +# Input/Output + +[//]: # (TODO add mxGraph copyright) + + +## Codecs + +See the dedicated [codecs page](../usage/codecs.md) for more information on how to use codecs. + +

    + For encoding other objects, or if no editor instance is available, + the mxCodec can be + used to create and read XML data. +

    + + + +

    Files

    +

    + The save, open, readGraphModel and writeGraphModel functions + implement a standard mechanism for handling files in + mxEditor. +

    +

    + The default implementation of mxEditor.save is called + with an argument to indicate if the save was triggered by the user or + by the system. It then uses the urlPost variable of + the editor object to check if a post request should be issued. If + the variable is defined, the editor issues a post request to the + specified URL passing the XML along as a POST variable called xml. +

    +

    Post

    +

    + As an example, consider the following PHP file which is located + in the same directory as the HTML page. If the filename is server.php + then the urlPost variable must be set to server.php on the editor + in order to post the diagram to the server. The PHP file will get + the XML from the POST request and write it to a file called + diagram.xml. +

    +```php + +``` + +

    + To set the URL to post to, change the respective entry in the mxEditor node of the config file as follows: +

    + +```xml +<mxEditor urlPost="http://www.example.com/server.php" ... > +``` + +

    + Keep in mind that the JavaScript can only post to the server where it originated from, so we recommend + to use relative URLs, eg. server.php. +

    + +

    Form Fields

    +

    + If you need to read/write the graph from/to a string (eg. to fill a form-field), you can use the + following methods: +

    + + +```javascript +const data = editor.writeGraphModel(); +editor.readGraphModel(mxUtils.parseXml(data)); +``` diff --git a/packages/website/old-mxgraph/tutorial.html b/packages/website/old-mxgraph/tutorial.html index e8e514c256..68ed751540 100644 --- a/packages/website/old-mxgraph/tutorial.html +++ b/packages/website/old-mxgraph/tutorial.html @@ -93,128 +93,8 @@

    Browser Check

    - - - -

    Input/Output

    -TODO add link to the codecs page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Files

    -

    - The save, open, readGraphModel and writeGraphModel functions - implement a standard mechanism for handling files in - mxEditor. -

    -

    - The default implementation of mxEditor.save is called - with an argument to indicate if the save was triggered by the user or - by the system. It then uses the urlPost variable of - the editor object to check if a post request should be issued. If - the variable is defined, the editor issues a post request to the - specified URL passing the XML along as a POST variable called xml. -

    -

    Post

    -

    - As an example, consider the following PHP file which is located - in the same directory as the HTML page. If the filename is server.php - then the urlPost variable must be set to server.php on the editor - in order to post the diagram to the server. The PHP file will get - the XML from the POST request and write it to a file called - diagram.xml. -

    -
    -<?php
    -$xml = $HTTP_POST_VARS['xml'];
    -if ($xml != null) {
    -  $fh=fopen("diagram.xml","w");
    -  fputs($fh, stripslashes($xml));
    -  fclose($fh);
    -}
    -?>
    -
    -

    - To set the URL to post to, change the respective entry in the mxEditor node of the config file as follows: -

    -
    -<mxEditor urlPost="http://www.example.com/server.php" ... >
    -
    -

    - Keep in mind that the JavaScript can only post to the server where it originated from, so we recommend - to use relative URLs, eg. server.php. -

    -

    Form Fields

    -

    - If you need to read/write the graph from/to a string (eg. to fill a form-field), you can use the - following methods: -

    -
    -let data = editor.writeGraphModel();
    -editor.readGraphModel(mxUtils.parseXml(data));
    -
    -

    Codecs

    -

    - For encoding other objects, or if no editor instance is available, - the mxCodec can be - used to create and read XML data. -


    © 2006-2017 by JGraph Ltd. From 5de5e78dc07291b64cb176d97ad2e246590738a4 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:29:29 +0100 Subject: [PATCH 09/42] remove the tutorial page --- packages/website/old-mxgraph/tutorial.html | 101 --------------------- 1 file changed, 101 deletions(-) delete mode 100644 packages/website/old-mxgraph/tutorial.html diff --git a/packages/website/old-mxgraph/tutorial.html b/packages/website/old-mxgraph/tutorial.html deleted file mode 100644 index 68ed751540..0000000000 --- a/packages/website/old-mxgraph/tutorial.html +++ /dev/null @@ -1,101 +0,0 @@ - - -

    Overview

    -

    - The mxGraph package contains a client software, written in JavaScript, and a series - of backends for various languages. The client software is a graph component with - an optional application wrapper that is integrated into an existing web interface. - The client requires a webserver to deliver the required files to the client or - can be run from the local filesystem without a webserver. The backends may be used - as is, or they may be embedded into an existing server application in one of the - supported languages. -

    - -

    - If a backend exists, then the client may be configured to use this backend in - various ways, such as: -

    - -

    - The above scenarios maybe combined in various ways, such as sending an XML - description of each change to the backend as it happens, or autosaving of - the diagram to avoid loss of data on the client. The client can also operate in - offline mode, where it does not require a backend or a webserver. -

    -

    - Please have a look at the index files in the respective directories for - information on the various backends. -

    - - - - - - -

    Library

    -

    - The HEAD part of the page contains the JavaScript code and dependencies. - The library is loaded using the following code. The mxBasePath - variable is used to define the path where the library loads its resources - from. This variable must be defined prior to loading the library code and - should not include a trailing slash. -

    -
    -<script type="text/javascript">
    -  mxBasePath = 'javascript/src';
    -</script>
    -<script type="text/javascript" src="javascript/src/js/mxClient.js"></script>
    -
    -

    - mxClient.min.js - contains all required code in a single, minified, file. This is the file you - should use in production. During development, if you wish to change mxGraph - sources, use the bootstrapped mxClient.js file. -

    -

    Browser Check

    -

    - The next script tag in the HEAD part of the page contains the - Hello, World! example code. The first part of the code checks if the - browser that is displaying the page is supported by the library. It is - recommended to do this as the first step of the program and - display an error message if the browser is not supported. In your - document you may also want to include a NOSCRIPT directive for - browsers that have JavaScript disabled, however, in our examples this - directive is not used. -

    -

    - There is no convention for the name of the main function. The function - is invoked from the onload handler in the page and may have any name - and arguments. In this case, the argument is a DOM node that will contain - the graph. Note that the DOM node may have any ID and that the code - is independent of this ID. -

    -
    -<script type="text/javascript";>
    -function main(container)
    -{
    -  // Checks if the browser is supported
    -  if (!mxClient.isBrowserSupported())
    -  {
    -    // Displays an error message if the browser is not supported.
    -    mxUtils.error('Browser is not supported!', 200, false);
    -  }
    -  ...
    -
    - - - - - -
    -© 2006-2017 by JGraph Ltd. - - From 83d9f913eae6fd7cf8a199ede0869535f7c5ca46 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:31:11 +0100 Subject: [PATCH 10/42] add mxGraph source --- packages/website/docs/tutorials/graphs.md | 10 +++++++++- packages/website/docs/tutorials/input-output.md | 10 +++++++++- .../website/docs/tutorials/the-hello-world-example.md | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/packages/website/docs/tutorials/graphs.md b/packages/website/docs/tutorials/graphs.md index 54c40ea877..aaf5401591 100644 --- a/packages/website/docs/tutorials/graphs.md +++ b/packages/website/docs/tutorials/graphs.md @@ -5,7 +5,15 @@ description: XXXX. # Graphs -[//]: # (TODO add mxGraph copyright) +:::note + +This tutorial is licensed under [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/). \ +It is adapted from the original [mxGraph tutorial](https://github.com/jgraph/mxgraph/blob/v4.2.2/docs/tutorial.html). + +> Copyright 2021-present The maxGraph project Contributors \ +Copyright (c) JGraph Ltd 2006-2017 + +:::

    diff --git a/packages/website/docs/tutorials/input-output.md b/packages/website/docs/tutorials/input-output.md index 1bdafbb836..ad0c4e76aa 100644 --- a/packages/website/docs/tutorials/input-output.md +++ b/packages/website/docs/tutorials/input-output.md @@ -5,7 +5,15 @@ description: XXXX. # Input/Output -[//]: # (TODO add mxGraph copyright) +:::note + +This tutorial is licensed under [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/). \ +It is adapted from the original [mxGraph tutorial](https://github.com/jgraph/mxgraph/blob/v4.2.2/docs/tutorial.html). + +> Copyright 2021-present The maxGraph project Contributors \ +Copyright (c) JGraph Ltd 2006-2017 + +::: ## Codecs diff --git a/packages/website/docs/tutorials/the-hello-world-example.md b/packages/website/docs/tutorials/the-hello-world-example.md index 14f719c869..cf146bfa0f 100644 --- a/packages/website/docs/tutorials/the-hello-world-example.md +++ b/packages/website/docs/tutorials/the-hello-world-example.md @@ -5,7 +5,15 @@ description: XXXX. # The Hello World Example -[//]: # (TODO add mxGraph copyright) +:::note + +This tutorial is licensed under [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/). \ +It is adapted from the original [mxGraph tutorial](https://github.com/jgraph/mxgraph/blob/v4.2.2/docs/tutorial.html). + +> Copyright 2021-present The maxGraph project Contributors \ +Copyright (c) JGraph Ltd 2006-2017 + +:::

    Hello, World!

    From 92433754ae94f553199838ca293683f48019d924 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:32:59 +0100 Subject: [PATCH 11/42] graphs: improve js example --- packages/website/docs/tutorials/graphs.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/website/docs/tutorials/graphs.md b/packages/website/docs/tutorials/graphs.md index aaf5401591..b37736f1e5 100644 --- a/packages/website/docs/tutorials/graphs.md +++ b/packages/website/docs/tutorials/graphs.md @@ -28,10 +28,13 @@ Copyright (c) JGraph Ltd 2006-2017 To create a new graph instance, a DOM node (typically a DIV) is required:

    -
    -let node = document.getElementById('id-of-graph-container');
    -let graph = new mxGraph(node);
    -
    + + +```javascript +const node = document.getElementById('id-of-graph-container'); +const graph = new mxGraph(node); +``` +

    Model

    mxCell defines the From 7715e455ab38a2d82b4f9f66f811d95125f590ff Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:39:09 +0100 Subject: [PATCH 12/42] Revert "EXTRA package-lock.json --> to check" This reverts commit abc2fa409ca16ec56ad601c81dc301a1962fbc22. --- package-lock.json | 1648 ++++++++++----------------------------------- 1 file changed, 372 insertions(+), 1276 deletions(-) diff --git a/package-lock.json b/package-lock.json index eeb9d1c6ae..2e78fdcde3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3805,6 +3805,204 @@ "@docusaurus/types": "*" } }, + "node_modules/@docusaurus/faster/node_modules/@swc/core": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.8.0.tgz", + "integrity": "sha512-EF8C5lp1RKMp3426tAKwQyVbg4Zcn/2FDax3cz8EcOXYQJM/ctB687IvBm9Ciej1wMcQ/dMRg+OB4Xl8BGLBoA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.14" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.8.0", + "@swc/core-darwin-x64": "1.8.0", + "@swc/core-linux-arm-gnueabihf": "1.8.0", + "@swc/core-linux-arm64-gnu": "1.8.0", + "@swc/core-linux-arm64-musl": "1.8.0", + "@swc/core-linux-x64-gnu": "1.8.0", + "@swc/core-linux-x64-musl": "1.8.0", + "@swc/core-win32-arm64-msvc": "1.8.0", + "@swc/core-win32-ia32-msvc": "1.8.0", + "@swc/core-win32-x64-msvc": "1.8.0" + }, + "peerDependencies": { + "@swc/helpers": "*" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-darwin-arm64": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.8.0.tgz", + "integrity": "sha512-TIus1/SE/Ud4g84hCnchcagu+LfyndSDy5r5qf64nflojejDidPU9Fp1InzQhQpEgIpntnZID/KFCP5rQnvsIw==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-darwin-x64": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.8.0.tgz", + "integrity": "sha512-yCb1FHCX/HUmNRGB1X3CFJ1WPKXMosZVUe3K2TrosCGvytwgaLoW5FS0bZg5Qv6cEUERQBg75cJnOUPwLLRCVg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.8.0.tgz", + "integrity": "sha512-6TdjVdiLaSW+eGiHKEojMDlx673nowrPHa6nM6toWgRzy8tIZgjPOguVKJDoMnoHuvO7SkOLCUiMRw0rTskypA==", + "cpu": [ + "arm" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.8.0.tgz", + "integrity": "sha512-TU2YcTornnyZiJUabRuk7Xtvzaep11FwK77IkFomjN9/Os5s25B8ea652c2fAQMe9RsM84FPVmX303ohxavjKQ==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-arm64-musl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.8.0.tgz", + "integrity": "sha512-2CdPTEKxx2hJIj/B0fn8L8k2coo/FDS95smzXyi2bov5FcrP6Ohboq8roFBYgj38fkHusXjY8qt+cCH7yXWAdg==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-x64-gnu": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.8.0.tgz", + "integrity": "sha512-14StQBifCs/AMsySdU95OmwNJr9LOVqo6rcTFt2b7XaWpe/AyeuMJFxcndLgUewksJHpfepzCTwNdbcYmuNo6A==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-linux-x64-musl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.8.0.tgz", + "integrity": "sha512-qemJnAQlYqKCfWNqVv5SG8uGvw8JotwU86cuFUkq35oTB+dsSFM3b83+B1giGTKKFOh2nfWT7bvPXTKk+aUjew==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.8.0.tgz", + "integrity": "sha512-fXt5vZbnrVdXZzGj2qRnZtY3uh+NtLCaFjS2uD9w8ssdbjhbDZYlJCj2JINOjv35ttEfAD2goiYmVa5P/Ypl+g==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.8.0.tgz", + "integrity": "sha512-W4FA2vSJ+bGYiTj6gspxghSdKQNLfLMo65AH07u797x7I+YJj8amnFY/fQRlroDv5Dez/FHTv14oPlTlNFUpIw==", + "cpu": [ + "ia32" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@docusaurus/faster/node_modules/@swc/core-win32-x64-msvc": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.8.0.tgz", + "integrity": "sha512-Il4y8XwKDV0Bnk0IpA00kGcSQC6I9XOIinW5egTutnwIDfDE+qsD0j+0isW5H76GetY3/Ze0lVxeOXLAUgpegA==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, "node_modules/@docusaurus/logger": { "version": "3.6.3", "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.6.3.tgz", @@ -6372,23 +6570,6 @@ "node": ">=12" } }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", - "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@esbuild/netbsd-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", @@ -6405,23 +6586,6 @@ "node": ">=12" } }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", - "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@esbuild/openbsd-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", @@ -8536,9 +8700,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.29.1.tgz", - "integrity": "sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", + "integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", "cpu": [ "arm" ], @@ -8550,9 +8714,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.29.1.tgz", - "integrity": "sha512-CaRfrV0cd+NIIcVVN/jx+hVLN+VRqnuzLRmfmlzpOzB87ajixsN/+9L5xNmkaUUvEbI5BmIKS+XTwXsHEb65Ew==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", + "integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", "cpu": [ "arm64" ], @@ -8564,9 +8728,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.29.1.tgz", - "integrity": "sha512-2ORr7T31Y0Mnk6qNuwtyNmy14MunTAMx06VAPI6/Ju52W10zk1i7i5U3vlDRWjhOI5quBcrvhkCHyF76bI7kEw==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", + "integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", "cpu": [ "arm64" ], @@ -8578,9 +8742,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.29.1.tgz", - "integrity": "sha512-j/Ej1oanzPjmN0tirRd5K2/nncAhS9W6ICzgxV+9Y5ZsP0hiGhHJXZ2JQ53iSSjj8m6cRY6oB1GMzNn2EUt6Ng==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", + "integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", "cpu": [ "x64" ], @@ -8591,52 +8755,10 @@ "darwin" ] }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.29.1.tgz", - "integrity": "sha512-91C//G6Dm/cv724tpt7nTyP+JdN12iqeXGFM1SqnljCmi5yTXriH7B1r8AD9dAZByHpKAumqP1Qy2vVNIdLZqw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.29.1.tgz", - "integrity": "sha512-hEioiEQ9Dec2nIRoeHUP6hr1PSkXzQaCUyqBDQ9I9ik4gCXQZjJMIVzoNLBRGet+hIUb3CISMh9KXuCcWVW/8w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.29.1.tgz", - "integrity": "sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.29.1.tgz", - "integrity": "sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", + "integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", "cpu": [ "arm" ], @@ -8648,9 +8770,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.29.1.tgz", - "integrity": "sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", + "integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", "cpu": [ "arm64" ], @@ -8662,9 +8784,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.29.1.tgz", - "integrity": "sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", + "integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", "cpu": [ "arm64" ], @@ -8675,38 +8797,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.29.1.tgz", - "integrity": "sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.29.1.tgz", - "integrity": "sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.29.1.tgz", - "integrity": "sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", + "integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", "cpu": [ "riscv64" ], @@ -8717,24 +8811,10 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.29.1.tgz", - "integrity": "sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.29.1.tgz", - "integrity": "sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", + "integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", "cpu": [ "x64" ], @@ -8746,9 +8826,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.29.1.tgz", - "integrity": "sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", + "integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", "cpu": [ "x64" ], @@ -8760,9 +8840,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.29.1.tgz", - "integrity": "sha512-F2OiJ42m77lSkizZQLuC+jiZ2cgueWQL5YC9tjo3AgaEw+KJmVxHGSyQfDUoYR9cci0lAywv2Clmckzulcq6ig==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", + "integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", "cpu": [ "arm64" ], @@ -8774,9 +8854,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.29.1.tgz", - "integrity": "sha512-rYRe5S0FcjlOBZQHgbTKNrqxCBUmgDJem/VQTCcTnA2KCabYSWQDrytOzX7avb79cAAweNmMUb/Zw18RNd4mng==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", + "integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", "cpu": [ "ia32" ], @@ -8788,9 +8868,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.29.1.tgz", - "integrity": "sha512-+10CMg9vt1MoHj6x1pxyjPSMjHTIlqs8/tBztXvPAx24SKs9jwVnKqHJumlH/IzhaPUaj3T6T6wfZr8okdXaIg==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", + "integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==", "cpu": [ "x64" ], @@ -9360,14 +9440,14 @@ } }, "node_modules/@swc/core": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.10.4.tgz", - "integrity": "sha512-ut3zfiTLORMxhr6y/GBxkHmzcGuVpwJYX4qyXWuBKkpw/0g0S5iO1/wW7RnLnZbAi8wS/n0atRZoaZlXWBkeJg==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.26.tgz", + "integrity": "sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.17" + "@swc/types": "^0.1.12" }, "engines": { "node": ">=10" @@ -9377,16 +9457,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.10.4", - "@swc/core-darwin-x64": "1.10.4", - "@swc/core-linux-arm-gnueabihf": "1.10.4", - "@swc/core-linux-arm64-gnu": "1.10.4", - "@swc/core-linux-arm64-musl": "1.10.4", - "@swc/core-linux-x64-gnu": "1.10.4", - "@swc/core-linux-x64-musl": "1.10.4", - "@swc/core-win32-arm64-msvc": "1.10.4", - "@swc/core-win32-ia32-msvc": "1.10.4", - "@swc/core-win32-x64-msvc": "1.10.4" + "@swc/core-darwin-arm64": "1.7.26", + "@swc/core-darwin-x64": "1.7.26", + "@swc/core-linux-arm-gnueabihf": "1.7.26", + "@swc/core-linux-arm64-gnu": "1.7.26", + "@swc/core-linux-arm64-musl": "1.7.26", + "@swc/core-linux-x64-gnu": "1.7.26", + "@swc/core-linux-x64-musl": "1.7.26", + "@swc/core-win32-arm64-msvc": "1.7.26", + "@swc/core-win32-ia32-msvc": "1.7.26", + "@swc/core-win32-x64-msvc": "1.7.26" }, "peerDependencies": { "@swc/helpers": "*" @@ -9398,9 +9478,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.10.4.tgz", - "integrity": "sha512-sV/eurLhkjn/197y48bxKP19oqcLydSel42Qsy2zepBltqUx+/zZ8+/IS0Bi7kaWVFxerbW1IPB09uq8Zuvm3g==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.26.tgz", + "integrity": "sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==", "cpu": [ "arm64" ], @@ -9409,14 +9489,15 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.10.4.tgz", - "integrity": "sha512-gjYNU6vrAUO4+FuovEo9ofnVosTFXkF0VDuo1MKPItz6e2pxc2ale4FGzLw0Nf7JB1sX4a8h06CN16/pLJ8Q2w==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.26.tgz", + "integrity": "sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==", "cpu": [ "x64" ], @@ -9425,14 +9506,15 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.10.4.tgz", - "integrity": "sha512-zd7fXH5w8s+Sfvn2oO464KDWl+ZX1MJiVmE4Pdk46N3PEaNwE0koTfgx2vQRqRG4vBBobzVvzICC3618WcefOA==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.26.tgz", + "integrity": "sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==", "cpu": [ "arm" ], @@ -9441,14 +9523,15 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.10.4.tgz", - "integrity": "sha512-+UGfoHDxsMZgFD3tABKLeEZHqLNOkxStu+qCG7atGBhS4Slri6h6zijVvf4yI5X3kbXdvc44XV/hrP/Klnui2A==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.26.tgz", + "integrity": "sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==", "cpu": [ "arm64" ], @@ -9457,14 +9540,15 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.10.4.tgz", - "integrity": "sha512-cDDj2/uYsOH0pgAnDkovLZvKJpFmBMyXkxEG6Q4yw99HbzO6QzZ5HDGWGWVq/6dLgYKlnnmpjZCPPQIu01mXEg==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.26.tgz", + "integrity": "sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==", "cpu": [ "arm64" ], @@ -9473,14 +9557,15 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.10.4.tgz", - "integrity": "sha512-qJXh9D6Kf5xSdGWPINpLGixAbB5JX8JcbEJpRamhlDBoOcQC79dYfOMEIxWPhTS1DGLyFakAx2FX/b2VmQmj0g==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.26.tgz", + "integrity": "sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==", "cpu": [ "x64" ], @@ -9489,14 +9574,15 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.10.4.tgz", - "integrity": "sha512-A76lIAeyQnHCVt0RL/pG+0er8Qk9+acGJqSZOZm67Ve3B0oqMd871kPtaHBM0BW3OZAhoILgfHW3Op9Q3mx3Cw==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.26.tgz", + "integrity": "sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==", "cpu": [ "x64" ], @@ -9505,14 +9591,15 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.10.4.tgz", - "integrity": "sha512-e6j5kBu4fIY7fFxFxnZI0MlEovRvp50Lg59Fw+DVbtqHk3C85dckcy5xKP+UoXeuEmFceauQDczUcGs19SRGSQ==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.26.tgz", + "integrity": "sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==", "cpu": [ "arm64" ], @@ -9521,14 +9608,15 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.10.4.tgz", - "integrity": "sha512-RSYHfdKgNXV/amY5Tqk1EWVsyQnhlsM//jeqMLw5Fy9rfxP592W9UTumNikNRPdjI8wKKzNMXDb1U29tQjN0dg==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.26.tgz", + "integrity": "sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==", "cpu": [ "ia32" ], @@ -9537,14 +9625,15 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.10.4.tgz", - "integrity": "sha512-1ujYpaqfqNPYdwKBlvJnOqcl+Syn3UrQ4XE0Txz6zMYgyh6cdU6a3pxqLqIUSJ12MtXRA9ZUhEz1ekU3LfLWXw==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.26.tgz", + "integrity": "sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==", "cpu": [ "x64" ], @@ -9553,6 +9642,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -9748,9 +9838,9 @@ } }, "node_modules/@swc/jest": { - "version": "0.2.37", - "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.37.tgz", - "integrity": "sha512-CR2BHhmXKGxTiFr21DYPRHQunLkX3mNIFGFkxBGji6r9uyIR5zftTOVYj1e0sFNMV2H7mf/+vpaglqaryBtqfQ==", + "version": "0.2.36", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.36.tgz", + "integrity": "sha512-8X80dp81ugxs4a11z1ka43FPhP+/e+mJNXJSxiNYk8gIX/jPBtY4gQTrKu/KIoco8bzKuPI5lUxjfLiGsfvnlw==", "dev": true, "license": "MIT", "dependencies": { @@ -9766,9 +9856,9 @@ } }, "node_modules/@swc/types": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.17.tgz", - "integrity": "sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==", + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.14.tgz", + "integrity": "sha512-PbSmTiYCN+GMrvfjrMo9bdY+f2COnwbdnoMw7rqU/PI5jXpKjxOGZ0qqZCImxnT81NkNsKnmEpvu+hRXLBeCJg==", "license": "Apache-2.0", "dependencies": { "@swc/counter": "^0.1.3" @@ -9949,10 +10039,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "license": "MIT" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, "node_modules/@types/estree-jsx": { "version": "1.0.5", @@ -28230,13 +28319,13 @@ } }, "node_modules/rollup": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.29.1.tgz", - "integrity": "sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz", + "integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.6" + "@types/estree": "1.0.5" }, "bin": { "rollup": "dist/bin/rollup" @@ -28246,28 +28335,67 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.29.1", - "@rollup/rollup-android-arm64": "4.29.1", - "@rollup/rollup-darwin-arm64": "4.29.1", - "@rollup/rollup-darwin-x64": "4.29.1", - "@rollup/rollup-freebsd-arm64": "4.29.1", - "@rollup/rollup-freebsd-x64": "4.29.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.29.1", - "@rollup/rollup-linux-arm-musleabihf": "4.29.1", - "@rollup/rollup-linux-arm64-gnu": "4.29.1", - "@rollup/rollup-linux-arm64-musl": "4.29.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.29.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.29.1", - "@rollup/rollup-linux-riscv64-gnu": "4.29.1", - "@rollup/rollup-linux-s390x-gnu": "4.29.1", - "@rollup/rollup-linux-x64-gnu": "4.29.1", - "@rollup/rollup-linux-x64-musl": "4.29.1", - "@rollup/rollup-win32-arm64-msvc": "4.29.1", - "@rollup/rollup-win32-ia32-msvc": "4.29.1", - "@rollup/rollup-win32-x64-msvc": "4.29.1", + "@rollup/rollup-android-arm-eabi": "4.20.0", + "@rollup/rollup-android-arm64": "4.20.0", + "@rollup/rollup-darwin-arm64": "4.20.0", + "@rollup/rollup-darwin-x64": "4.20.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.20.0", + "@rollup/rollup-linux-arm-musleabihf": "4.20.0", + "@rollup/rollup-linux-arm64-gnu": "4.20.0", + "@rollup/rollup-linux-arm64-musl": "4.20.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", + "@rollup/rollup-linux-riscv64-gnu": "4.20.0", + "@rollup/rollup-linux-s390x-gnu": "4.20.0", + "@rollup/rollup-linux-x64-gnu": "4.20.0", + "@rollup/rollup-linux-x64-musl": "4.20.0", + "@rollup/rollup-win32-arm64-msvc": "4.20.0", + "@rollup/rollup-win32-ia32-msvc": "4.20.0", + "@rollup/rollup-win32-x64-msvc": "4.20.0", "fsevents": "~2.3.2" } }, + "node_modules/rollup/node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", + "integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/rollup/node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", + "integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/rollup/node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", + "integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/rtl-detect": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/rtl-detect/-/rtl-detect-1.1.2.tgz", @@ -31497,6 +31625,12 @@ "integrity": "sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==", "dev": true }, + "node_modules/webpack/node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "license": "MIT" + }, "node_modules/webpack/node_modules/es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", @@ -32097,8 +32231,8 @@ "version": "0.14.0", "license": "Apache-2.0", "devDependencies": { - "@swc/core": "~1.10.4", - "@swc/jest": "~0.2.37", + "@swc/core": "~1.7.26", + "@swc/jest": "~0.2.36", "jest": "~29.7.0", "jest-environment-jsdom": "~29.7.0", "npm-run-all": "~4.1.5", @@ -34642,1052 +34776,14 @@ "name": "@maxgraph/ts-example-vite-custom-shapes", "license": "Apache-2.0", "devDependencies": { - "vite": "~6.0.7" + "vite": "~5.4.11" } }, "packages/ts-example-without-defaults": { "name": "@maxgraph/ts-example-vite-without-defaults", "license": "Apache-2.0", "devDependencies": { - "vite": "~6.0.7" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/aix-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", - "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/android-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", - "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/android-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", - "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/android-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", - "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/darwin-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", - "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/darwin-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", - "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", - "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/freebsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", - "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/linux-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", - "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/linux-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", - "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/linux-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", - "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/linux-loong64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", - "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/linux-mips64el": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", - "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/linux-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", - "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/linux-riscv64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", - "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/linux-s390x": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", - "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/linux-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", - "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/netbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", - "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/openbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", - "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/sunos-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", - "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/win32-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", - "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/win32-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", - "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example-without-defaults/node_modules/esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" - } - }, - "packages/ts-example-without-defaults/node_modules/vite": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.7.tgz", - "integrity": "sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.24.2", - "postcss": "^8.4.49", - "rollup": "^4.23.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "packages/ts-example-without-defaults/node_modules/yaml": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", - "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "packages/ts-example/node_modules/@esbuild/aix-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", - "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/android-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", - "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/android-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", - "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/android-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", - "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/darwin-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", - "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/darwin-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", - "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", - "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/freebsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", - "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/linux-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", - "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/linux-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", - "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/linux-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", - "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/linux-loong64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", - "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/linux-mips64el": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", - "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/linux-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", - "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/linux-riscv64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", - "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/linux-s390x": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", - "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/linux-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", - "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/netbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", - "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/openbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", - "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/sunos-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", - "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/win32-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", - "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/win32-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", - "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "packages/ts-example/node_modules/esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" - } - }, - "packages/ts-example/node_modules/vite": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.7.tgz", - "integrity": "sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.24.2", - "postcss": "^8.4.49", - "rollup": "^4.23.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "packages/ts-example/node_modules/yaml": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", - "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" + "vite": "~5.4.11" } }, "packages/ts-support": { From dd3e92fee1b8c4abacbad3fe40fd9db74f4ad947 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 16:50:59 +0100 Subject: [PATCH 13/42] split editor out of the graph page --- packages/website/docs/tutorials/editor.md | 131 ++++++++++++++++++ .../docs/tutorials/{graphs.md => graph.md} | 115 +-------------- .../website/docs/tutorials/input-output.md | 2 +- 3 files changed, 133 insertions(+), 115 deletions(-) create mode 100644 packages/website/docs/tutorials/editor.md rename packages/website/docs/tutorials/{graphs.md => graph.md} (53%) diff --git a/packages/website/docs/tutorials/editor.md b/packages/website/docs/tutorials/editor.md new file mode 100644 index 0000000000..978cde70ec --- /dev/null +++ b/packages/website/docs/tutorials/editor.md @@ -0,0 +1,131 @@ +--- +sidebar_position: 3 +description: XXXX. +--- + +# Editor + +:::note + +This tutorial is licensed under [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/). \ +It is adapted from the original [mxGraph tutorial](https://github.com/jgraph/mxgraph/blob/v4.2.2/docs/tutorial.html). + +> Copyright 2021-present The maxGraph project Contributors \ +Copyright (c) JGraph Ltd 2006-2017 + +::: + + +

    + Instantiate mxEditor in + order to create an editor. This is the central class in the editor + package. Everything else in this package is auxiliary. + To create a new editor instance and configure it using a config + file, you can pass the name of the config file to the + mxEditor constructor. +

    + + +![](assets/graphs/editor.png) + +

    + To create a new editor instance and configure it, the following code is used: +

    +
    +let config = mxUtils.load('editors/config/keyhandler-commons.xml').getDocumentElement();
    +let editor = new mxEditor(config);
    +
    +

    + TODO add link to the codecs page + The configuration file is an XML file that is passed to + mxCodec, which in + turn uses mxEditorCodec + and others to read the XML into the editor object hierarchy. This is normally + done at startup time to configure the editor, graph, model, toolbar, popupmenus + etc using the I/O subsystem. +

    + + +

    CSS

    +

    + The CSS stylesheet contains the style definitions for various + elements of the user interface, such as the rubberband selection, + the in-place editor or the popup menu. It also contains the directives + required to enable VML support in Internet Explorer, so it is substantial + that the stylesheet is included in the page. +

    +

    + Additional stylesheets may either be added programmatically using + mxClient.link('stylesheet', filename) or + via a stylesheet tag of the UI section in the editor configuration, eg.: +

    + + +
    +<mxEditor>
    +  <ui>
    +    <stylesheet name="examples/editors/css/process.css"/>
    +    ...
    +
    + + + +

    Templates

    +

    + To add new cell types, create a template in the templates array section of + the model in the config file (mxEditor/mxGraph/mxGraphModel/Array[as=templates]) + as follows: +

    +
    +<add as="symbol">
    +  <Symbol label="Symbol" customAttribute="whatever">
    +    <mxCell vertex="1" connectable="1" style="symbol;image=images/event.png">
    +      <mxGeometry as="geometry" width="32" height="32"/>
    +    </mxCell>
    +    <CustomChild customAttribute="whatever"/>
    +  </Symbol>
    +</add>
    +
    +

    + The as-attribute of the add-element contains the + name under which the template will be accessible for later use. The + Symbol-child element is a custom (ie workflow) element, and + can have any name and any number of child elements and custom attributes. + The label attribute is a special one that is used for the textual + representation of the cell in the graph. The mxCell element + is another special child node which contains the graphical information for + the cell, namely, the cell-type, -style, -size and -position. +

    +

    + See mxGraph.convertValueToString if you would like to use another + attribute or a combination of attributes for the textual representation, + and mxCell.valueChanged to handle in-place editing by storing + the new text value in the respective attribute(s). +

    + + +

    Toolbar

    +

    + To use the template in the graph, a toolbar item must be added which refers + to the template in the mxDefaultToolbar section of the config file + (mxEditor/mxDefaultToolbar[as=toolbar]) as follows: +

    +
    +<add as="symbolTool" template="symbol"
    +  style="symbol;image=wf/images/bpmn/special_event.png"
    +  icon="wf/images/bpmn/small_event.gif"/>
    +
    +

    + The as attribute specifies the tooltip to be displayed for the + icon in the toolbar, the template-attribute refers to the name + under which the template was previously added. The style- + attribute is optional, and may be used to override the style defined in the + template definition. Finally, the icon specifies the icon to be used for the + toolbar item. +

    +

    + Note that the as attribute is assumed to be the key for a language + resource, in this case symbolTool. If the resource is not defined + in mxResources, then the + attribute value is used as the label. +

    diff --git a/packages/website/docs/tutorials/graphs.md b/packages/website/docs/tutorials/graph.md similarity index 53% rename from packages/website/docs/tutorials/graphs.md rename to packages/website/docs/tutorials/graph.md index b37736f1e5..6ee9fa73a3 100644 --- a/packages/website/docs/tutorials/graphs.md +++ b/packages/website/docs/tutorials/graph.md @@ -3,7 +3,7 @@ sidebar_position: 2 description: XXXX. --- -# Graphs +# Graph :::note @@ -167,117 +167,4 @@ mxGraph.prototype.getImage = function(state) invoke view.invalidate(cell) for each cell whose image has changed, and call view.validate to update the display.

    -

    Editors

    -

    - Instantiate mxEditor in - order to create an editor. This is the central class in the editor - package. Everything else in this package is auxiliary. - To create a new editor instance and configure it using a config - file, you can pass the name of the config file to the - mxEditor constructor. -

    - - -![](assets/graphs/editor.png) - -

    - To create a new editor instance and configure it, the following code is used: -

    -
    -let config = mxUtils.load('editors/config/keyhandler-commons.xml').getDocumentElement();
    -let editor = new mxEditor(config);
    -
    -

    - TODO add link to the codecs page - The configuration file is an XML file that is passed to - mxCodec, which in - turn uses mxEditorCodec - and others to read the XML into the editor object hierarchy. This is normally - done at startup time to configure the editor, graph, model, toolbar, popupmenus - etc using the I/O subsystem. -

    - - -

    CSS

    -

    - The CSS stylesheet contains the style definitions for various - elements of the user interface, such as the rubberband selection, - the in-place editor or the popup menu. It also contains the directives - required to enable VML support in Internet Explorer, so it is substantial - that the stylesheet is included in the page. -

    -

    - Additional stylesheets may either be added programmatically using - mxClient.link('stylesheet', filename) or - via a stylesheet tag of the UI section in the editor configuration, eg.: -

    - - -
    -<mxEditor>
    -  <ui>
    -    <stylesheet name="examples/editors/css/process.css"/>
    -    ...
    -
    - - -

    Templates

    -

    - To add new cell types, create a template in the templates array section of - the model in the config file (mxEditor/mxGraph/mxGraphModel/Array[as=templates]) - as follows: -

    -
    -<add as="symbol">
    -  <Symbol label="Symbol" customAttribute="whatever">
    -    <mxCell vertex="1" connectable="1" style="symbol;image=images/event.png">
    -      <mxGeometry as="geometry" width="32" height="32"/>
    -    </mxCell>
    -    <CustomChild customAttribute="whatever"/>
    -  </Symbol>
    -</add>
    -
    -

    - The as-attribute of the add-element contains the - name under which the template will be accessible for later use. The - Symbol-child element is a custom (ie workflow) element, and - can have any name and any number of child elements and custom attributes. - The label attribute is a special one that is used for the textual - representation of the cell in the graph. The mxCell element - is another special child node which contains the graphical information for - the cell, namely, the cell-type, -style, -size and -position. -

    -

    - See mxGraph.convertValueToString if you would like to use another - attribute or a combination of attributes for the textual representation, - and mxCell.valueChanged to handle in-place editing by storing - the new text value in the respective attribute(s). -

    - - -

    Toolbar

    -

    - To use the template in the graph, a toolbar item must be added which refers - to the template in the mxDefaultToolbar section of the config file - (mxEditor/mxDefaultToolbar[as=toolbar]) as follows: -

    -
    -<add as="symbolTool" template="symbol"
    -  style="symbol;image=wf/images/bpmn/special_event.png"
    -  icon="wf/images/bpmn/small_event.gif"/>
    -
    -

    - The as attribute specifies the tooltip to be displayed for the - icon in the toolbar, the template-attribute refers to the name - under which the template was previously added. The style- - attribute is optional, and may be used to override the style defined in the - template definition. Finally, the icon specifies the icon to be used for the - toolbar item. -

    -

    - Note that the as attribute is assumed to be the key for a language - resource, in this case symbolTool. If the resource is not defined - in mxResources, then the - attribute value is used as the label. -

    diff --git a/packages/website/docs/tutorials/input-output.md b/packages/website/docs/tutorials/input-output.md index ad0c4e76aa..abcb831298 100644 --- a/packages/website/docs/tutorials/input-output.md +++ b/packages/website/docs/tutorials/input-output.md @@ -1,5 +1,5 @@ --- -sidebar_position: 2 +sidebar_position: 4 description: XXXX. --- From 7e9db3f698c7246193b0b8c382ec7a0aa7da825e Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 16:55:08 +0100 Subject: [PATCH 14/42] add warning about the usage of the mxGraph code --- packages/website/docs/tutorials/editor.md | 7 +++++++ packages/website/docs/tutorials/graph.md | 7 +++++++ packages/website/docs/tutorials/input-output.md | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/packages/website/docs/tutorials/editor.md b/packages/website/docs/tutorials/editor.md index 978cde70ec..6f4873c974 100644 --- a/packages/website/docs/tutorials/editor.md +++ b/packages/website/docs/tutorials/editor.md @@ -5,6 +5,13 @@ description: XXXX. # Editor +:::warning + +The content of this page is a **work in progress**. +The original `mxGraph` tutorial was used to create this page which still contains `mxGraph` code to migrate to the maxGraph API. + +::: + :::note This tutorial is licensed under [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/). \ diff --git a/packages/website/docs/tutorials/graph.md b/packages/website/docs/tutorials/graph.md index 6ee9fa73a3..62345a8b58 100644 --- a/packages/website/docs/tutorials/graph.md +++ b/packages/website/docs/tutorials/graph.md @@ -5,6 +5,13 @@ description: XXXX. # Graph +:::warning + +The content of this page is a **work in progress**. +The original `mxGraph` tutorial was used to create this page which still contains `mxGraph` code to migrate to the maxGraph API. + +::: + :::note This tutorial is licensed under [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/). \ diff --git a/packages/website/docs/tutorials/input-output.md b/packages/website/docs/tutorials/input-output.md index abcb831298..351e51b75a 100644 --- a/packages/website/docs/tutorials/input-output.md +++ b/packages/website/docs/tutorials/input-output.md @@ -5,6 +5,13 @@ description: XXXX. # Input/Output +:::warning + +The content of this page is a **work in progress**. +The original `mxGraph` tutorial was used to create this page which still contains `mxGraph` code to migrate to the maxGraph API. + +::: + :::note This tutorial is licensed under [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/). \ From 0dfa11b999dbe8beb299e3ea0e4d11fe087ca309 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:02:09 +0100 Subject: [PATCH 15/42] hello world: add screenshot --- .../tutorials/assets/hello-world-example.png | Bin 0 -> 5224 bytes .../docs/tutorials/the-hello-world-example.md | 17 +++++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 packages/website/docs/tutorials/assets/hello-world-example.png diff --git a/packages/website/docs/tutorials/assets/hello-world-example.png b/packages/website/docs/tutorials/assets/hello-world-example.png new file mode 100644 index 0000000000000000000000000000000000000000..71cf6d0286b0eed16b48318722a8f06ed75cb07e GIT binary patch literal 5224 zcmcIoYgChGw#N31wH2f@c9~c%8S5OWgGN$@i$sDIFI5Ee;0;KEzzD-#3MAYDS_`%d z38EEL2pQ`D4hjK9E{RF7F+}Ai*KiA2G(s8zi6n%W5R&tLUjUgOXPsO7hsFB7H~ZcD z+536+-rx7f{0>=t^yxQwabiId9Vyd$0mc5jy+JbvTgH-AP{|M32|H+x=v>soKy zKIDoy=CXIR?^)b;Hh(C&fLV*$jA}t9J*<8DC%=16JFlMKQSE!AgljB*v@K&Gi|ZK^ zp}eJwWM~UHPGbw2hc1Pa;dPNFHM26rK>XTPkXV{dEH+hIVIu_7H|-vUukUY0zDH`O z4q>pT(xqYR1~Jf^GcsD`ZR$JH;Icu<@Jk30Ft2Ahyj_@oDM(y-5C z@s={V?%*oHY2!0+R7$%`}e`@8ozyQW!5#FJa zu(J?`bq%ziIYiB!at9F625d=^kaynaHpr| zVp~=AP1T^45P$6yVRneqKrW)q7bTArEy{u$<9!{y)K585MD!{zn~;BoFHDrRW?@E~ z7qC$ifvB%emuWclKlduXYK$$tXJ5&$jgsDt;%`w3-K)IEy`@;q`gQoH>t~RnqlcqO3)%P6wy&RAYjAUhXZYLLCZu0|2fsGX%c!$RzMfu+;ND|EY4Yz4QvHtX!X5iBWjPZ5r+*+0DaDxjm%q2qOWoSC~f z^R_sZC>$Gc*J@0YJkKuUv)CH9@5}@SEP6CEk4pETHOB_)72Sx+J!8|KnduJ||G(wR zsBC=@GgiZn;yo*TA-K17)ysq3qAzA?$-3`bE#mDV}#Ddas=u z>1kN};I{uASr47==F88;khGo( zcj}{85(^v+-p zQ}4uCu=WgC^q9K6^f*(h{;VVuDNd2k&qHB4R{=#m_H{9rreU0lM}ga`J2YQFnlspx zjLzLF6OG?3u-fd#r+*YK!teD>`WP+lyT7_TE z6l95X3CiCx&kl+}hy;a-=8fwtX0fso9s%;8(loR-?N};I z*c+@Xp}3&u`Jw2e!et*ptj?+-&6}sr8Id{itmaR zofRDHo^UQw1^VdP%fBS-f=k2>><*`T@mMM{||8NHxAv6P7dnLbqj@-7(=W&g4n2*6Td z0s_Msq}oB)n@ckG4$yR9H>ol7=dYO4&%SXdg&psM31c3UV@FvKU)1&w@5O*d`2do> z+Hjyd{@=A-p7n+4;>dzTOliIgPCaTK`yBTn7*@EdUA!ARJI1CV8gTGcqOyt$WqG==e|Bw+WyNEGfVvd1D0cDX0LU+tq1D(OJNMvjVW3;lGjI~#iXw>_=n|sf8RbUP^ByHM?JMYb@i(I+S8`P+jr%p zcQ$3lr0cju+B8gwm5WsGJ@>iOj8x%G`IjA7u7E-|Ddq*Ih=qFcMl8F->#Fe0;1r*# z_PW~1B9T27dv?m&Cq{Y$9UCeUL>%reJc4sjr#GM+D{Bf{%K#gq;yv8_6ka zAF(#ZiX~}i<1Yyn9b~V<_-4v!rXif$t2N-Syz>__s&Pv=(&o3odlABDHdfWo{oqz! zV$@W;5EPZ^V`TGo1#^qU+pc+`yh%!c5ndsdkzqCyEjJd}VrO#<(jJ1fDN-Z9k*zz_ z|Mhe7hdQBdy)Fl(o0yXLVo|=1ovD#Qb*~9gI$45mW9(?4C&v(w;1j}}o=(;YvdJ&Q z2AN8)DkKT7Rk(J4klMah*f!ZLxFuG>rHtZ?s`0%;;&!e;>y!whoTa8&mJ(a9I`0U z%%~Z+s^6VgEQHXvZLp^sDAMe=`B8F;|LMH(Nvn}6K{|qW!)J^Z&pFrjSGsbKDy%7~ zt1!8L2sO2k(awi+5AEs9fet~~V6yOO@(|rb3ZiuIWv%`9s{|ZFj=Fc)#qA&KaVnoE z!KGcLcuQ2Ow>WID!E`GcGs=u2YtAUcejy;!&~LAYJlMpeUJf}D!cB}5i^I{YDlHzj z$-At)(r`rc&3R*^&L9ttXMu%MG7~lAU^@Ho1!Mh#U~Zk>or|P&|1$xnORYt!$a_TR zJO15aVaB?Wo2KJQHu)~|&&@oY)i)a>6dv11E=eH^P=KOiKg1~KQlvK&QeUD~ShB)&ry0N=?BK1V&2 zxVAlWXKo@5Ub|Q53h@rC-oG6U&8he=xDUH^)cDh+r5pG@5nzNH4Lq`#xxO;8u7Spt zn|5Z3n7>h&TgU(9Flg-VRLRlJkRbdvA9_X?D(Gt4rSNdqRI-XUZ!+^wsPgxaLpqc2mi3ig3CCdxh_Jucg?N#gZz!yY| O!w3BK*X%p{&3^*D!w#kZ literal 0 HcmV?d00001 diff --git a/packages/website/docs/tutorials/the-hello-world-example.md b/packages/website/docs/tutorials/the-hello-world-example.md index cf146bfa0f..6d17c09189 100644 --- a/packages/website/docs/tutorials/the-hello-world-example.md +++ b/packages/website/docs/tutorials/the-hello-world-example.md @@ -15,17 +15,14 @@ Copyright (c) JGraph Ltd 2006-2017 ::: + +## Hello, World! -

    Hello, World!

    -

    - The Hello, World! example of maxGraph ships in a - single HTML file, - which contains the required namespaces, the mxGraph library script - and the example code. The example can be viewed by pointing Firefox or - Internet Explorer to the link above either on the local - filesystem or on a webserver. To display the source of the example - press Control-U in Firefox or click Page, View Source in Internet Explorer. -

    +The _Hello, World!_ example of `maxGraph` ships in a Storybook story called `HelloWorld` which is available in the `HelloWorld` page of the [maxGraph demo](https://maxgraph.github.io/maxGraph/demo/?path=/story/basic-helloworld--default). + +The source of the example is available in [HelloWorld.stories.js](https://github.com/maxGraph/maxGraph/blob/main/packages/html/stories/HelloWorld.stories.js). + +![Screenshot of the Hello World example](./assets/hello-world-example.png) ## Container From 73e30ad6aba557be38e04573263200f9f76cf06b Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:05:11 +0100 Subject: [PATCH 16/42] WIP the-hello-world-example.md migrate to markdown --- .../docs/tutorials/the-hello-world-example.md | 38 ++++++++----------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/packages/website/docs/tutorials/the-hello-world-example.md b/packages/website/docs/tutorials/the-hello-world-example.md index 6d17c09189..b35a61bf2b 100644 --- a/packages/website/docs/tutorials/the-hello-world-example.md +++ b/packages/website/docs/tutorials/the-hello-world-example.md @@ -1,6 +1,6 @@ --- sidebar_position: 1 -description: XXXX. +description: A step-by-step guide to display a simple Graph and understand the maxGraph concepts. --- # The Hello World Example @@ -27,34 +27,26 @@ The source of the example is available in [HelloWorld.stories.js](https://github ## Container -

    - For the JavaScript to actually render the graph, the page - contains an DOM node which will display the graph. This - DOM node is either dynamically created or it is obtained via - an ID using document.getElementById as in the - Hello, World! example. The DOM node is passed to the main - function and is used to construct the graph instance as shown - below. -

    -

    - If you want the container to have scrollbars, use the `overflow:auto` CSS - directive instead of overflow:hidden in the style of the container. -

    -

    Graph

    -

    - The code constructs an empty graph model and passes the container - and the empty model to the graph constructor. For this example, - all default event handling is disabled in the last line. -

    +For the JavaScript to actually render the graph, the page contains an DOM node which will display the graph. +This DOM node is either dynamically created or it is obtained via an ID using `document.getElementById` as in the _Hello, World!_ example. +The DOM node is passed to the main function and is used to construct the graph instance as shown below. + +If you want the container to have scrollbars, use the `overflow:auto` CSS directive instead of overflow:hidden in the style of the container. + + + +## Graph + +The code constructs an empty graph model and passes the container and the empty model to the graph constructor. +For this example, all default event handling is disabled in the last line. ```javascript const model = new GraphDataModel(); const graph = new Graph(container, model); ``` -

    - If you want the graph to be read-only you can use graph.setEnabled(false). -

    +If you want the graph to be read-only you can use graph.setEnabled(false). +

    Vertices and Edges

    From 5b0c50bc47e193bd92d74f2c4a401a44a473bfd9 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:07:51 +0100 Subject: [PATCH 17/42] WIP the-hello-world-example.md migrate to markdown --- .../docs/tutorials/the-hello-world-example.md | 47 ++++++++----------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/packages/website/docs/tutorials/the-hello-world-example.md b/packages/website/docs/tutorials/the-hello-world-example.md index b35a61bf2b..a2e8b8088b 100644 --- a/packages/website/docs/tutorials/the-hello-world-example.md +++ b/packages/website/docs/tutorials/the-hello-world-example.md @@ -45,31 +45,25 @@ const model = new GraphDataModel(); const graph = new Graph(container, model); ``` -If you want the graph to be read-only you can use graph.setEnabled(false). - - -

    Vertices and Edges

    -

    - To insert vertices and edges, beginUpdate and endUpdate - are used to create a transaction. The endUpdate should always go - into a finally-block to make sure it is always executed if the beginUpdate - was executed. However, the beginUpdate should not be part of the - try-block to make sure endUpdate is never executed if beginUpdate - fails. This is required for the model to remain in a consistent state, that is, for - each call to beginUpdate there should always be exactly one call to - endUpdate. -

    -

    - The part within the try-block creates the vertices and edges for the graph. - The default parent is obtained from the graph and is typically the first - child of the root cell in the model, which is created automatically when - using the graph model constructor with no arguments. -

    +If you want the graph to be read-only you can use `graph.setEnabled(false)`. + + + +## Vertices and Edges + +To insert vertices and edges, `beginUpdate` and `endUpdate` are used to create a transaction. +The `endUpdate` should always go into a finally-block to make sure it is always executed if the `beginUpdate` was executed. +However, the `beginUpdate` should not be part of the try-block to make sure `endUpdate` is never executed if `beginUpdate` fails. +This is required for the model to remain in a consistent state, that is, for each call to `beginUpdate` there should always be exactly one call to `endUpdate`. + +The part within the try-block creates the vertices and edges for the graph. +The default parent is obtained from the graph and is typically the first child of the root cell in the model, +which is created automatically when using the graph model constructor with no arguments. ```javascript -// Gets the default parent for inserting new cells. This -// is normally the first child of the root (ie. layer 0). -let parent = graph.getDefaultParent(); +// Gets the default parent for inserting new cells. +// This is normally the first child of the root (ie. layer 0). +const parent = graph.getDefaultParent(); // Adds cells to the model in a single step model.beginUpdate(); @@ -84,8 +78,5 @@ finally { } ``` -

    - The use of beginUpdate and endUpdate does not - only improve the display performance, but it is also used to mark the - boundaries for undoable changes when undo/redo is used. -

    +The use of `beginUpdate` and `endUpdate` does not only improve the display performance, +but it is also used to mark the boundaries for undoable changes when undo/redo is used. From b2506f293a372f21d7e4aa8a9fece7bae034d593 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:10:22 +0100 Subject: [PATCH 18/42] WIP input-output.md migrate to markdown --- .../website/docs/tutorials/input-output.md | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/packages/website/docs/tutorials/input-output.md b/packages/website/docs/tutorials/input-output.md index 351e51b75a..b80c53b9eb 100644 --- a/packages/website/docs/tutorials/input-output.md +++ b/packages/website/docs/tutorials/input-output.md @@ -27,15 +27,14 @@ Copyright (c) JGraph Ltd 2006-2017 See the dedicated [codecs page](../usage/codecs.md) for more information on how to use codecs. -

    For encoding other objects, or if no editor instance is available, the mxCodec can be used to create and read XML data. -

    -

    Files

    + +## Files

    The save, open, readGraphModel and writeGraphModel functions implement a standard mechanism for handling files in @@ -49,7 +48,11 @@ See the dedicated [codecs page](../usage/codecs.md) for more information on how the variable is defined, the editor issues a post request to the specified URL passing the XML along as a POST variable called xml.

    -

    Post

    + + + +## Post +

    As an example, consider the following PHP file which is located in the same directory as the HTML page. If the filename is server.php @@ -69,25 +72,18 @@ if ($xml != null) { ?> ``` -

    - To set the URL to post to, change the respective entry in the mxEditor node of the config file as follows: -

    +To set the URL to post to, change the respective entry in the `Editor` node of the config file as follows: ```xml -<mxEditor urlPost="http://www.example.com/server.php" ... > + ``` -

    - Keep in mind that the JavaScript can only post to the server where it originated from, so we recommend - to use relative URLs, eg. server.php. -

    +Keep in mind that the JavaScript can only post to the server where it originated from, so we recommend to use relative URLs, e.g. `server.php`. -

    Form Fields

    -

    - If you need to read/write the graph from/to a string (eg. to fill a form-field), you can use the - following methods: -

    + +## Form Fields +If you need to read/write the graph from/to a string (e.g. to fill a form-field), you can use the following methods: ```javascript const data = editor.writeGraphModel(); From 27c90bf2313ee631dabe3890d47d27e709fc0524 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:11:41 +0100 Subject: [PATCH 19/42] WIP input-output.md migrate to markdown --- packages/website/docs/tutorials/input-output.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/website/docs/tutorials/input-output.md b/packages/website/docs/tutorials/input-output.md index b80c53b9eb..d72aef6320 100644 --- a/packages/website/docs/tutorials/input-output.md +++ b/packages/website/docs/tutorials/input-output.md @@ -53,14 +53,10 @@ See the dedicated [codecs page](../usage/codecs.md) for more information on how ## Post -

    - As an example, consider the following PHP file which is located - in the same directory as the HTML page. If the filename is server.php - then the urlPost variable must be set to server.php on the editor - in order to post the diagram to the server. The PHP file will get - the XML from the POST request and write it to a file called - diagram.xml. -

    +As an example, consider the following PHP file which is located in the same directory as the HTML page. +If the filename is `server.php` then the `urlPost` variable must be set to `server.php` on the editor in order to post the diagram to the server. +The PHP file will get the XML from the POST request and write it to a file called `diagram.xml`. + ```php Date: Sun, 5 Jan 2025 17:16:16 +0100 Subject: [PATCH 20/42] WIP input-output.md migrate to markdown --- .../website/docs/tutorials/input-output.md | 34 +++++-------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/packages/website/docs/tutorials/input-output.md b/packages/website/docs/tutorials/input-output.md index d72aef6320..8cf65689ea 100644 --- a/packages/website/docs/tutorials/input-output.md +++ b/packages/website/docs/tutorials/input-output.md @@ -3,14 +3,7 @@ sidebar_position: 4 description: XXXX. --- -# Input/Output - -:::warning - -The content of this page is a **work in progress**. -The original `mxGraph` tutorial was used to create this page which still contains `mxGraph` code to migrate to the maxGraph API. - -::: +# Editor Input/Output :::note @@ -27,27 +20,18 @@ Copyright (c) JGraph Ltd 2006-2017 See the dedicated [codecs page](../usage/codecs.md) for more information on how to use codecs. - For encoding other objects, or if no editor instance is available, - the mxCodec can be - used to create and read XML data. +For encoding other objects, or if no editor instance is available, the [Codec](https://maxgraph.github.io/maxGraph/api-docs/classes/Codec.html) can be used to create and read XML data. ## Files -

    - The save, open, readGraphModel and writeGraphModel functions - implement a standard mechanism for handling files in - mxEditor. -

    -

    - The default implementation of mxEditor.save is called - with an argument to indicate if the save was triggered by the user or - by the system. It then uses the urlPost variable of - the editor object to check if a post request should be issued. If - the variable is defined, the editor issues a post request to the - specified URL passing the XML along as a POST variable called xml. -

    + +The `save`, `open`, `readGraphModel` and `writeGraphModel` functions implement a standard mechanism for handling files in [Editor]()https://maxgraph.github.io/maxGraph/api-docs/classes/Editor.html. + +The default implementation of `Editor.save` is called with an argument to indicate if the save was triggered by the user or by the system. +It then uses the `urlPost` variable of the editor object to check if a post request should be issued. +If the variable is defined, the editor issues a post request to the specified URL passing the XML along as a POST variable called xml. @@ -83,5 +67,5 @@ If you need to read/write the graph from/to a string (e.g. to fill a form-field) ```javascript const data = editor.writeGraphModel(); -editor.readGraphModel(mxUtils.parseXml(data)); +editor.readGraphModel(xmlUtils.parseXml(data)); ``` From 0def7ef41cc3bb7df95aef260141cf7a71793bd8 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:16:31 +0100 Subject: [PATCH 21/42] rename editor-input-output.md --- .../docs/tutorials/{input-output.md => editor-input-output.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/website/docs/tutorials/{input-output.md => editor-input-output.md} (100%) diff --git a/packages/website/docs/tutorials/input-output.md b/packages/website/docs/tutorials/editor-input-output.md similarity index 100% rename from packages/website/docs/tutorials/input-output.md rename to packages/website/docs/tutorials/editor-input-output.md From e67c9170db241b842054a3c495afc100acda624c Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:17:38 +0100 Subject: [PATCH 22/42] fix link --- packages/website/docs/tutorials/editor-input-output.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/website/docs/tutorials/editor-input-output.md b/packages/website/docs/tutorials/editor-input-output.md index 8cf65689ea..b2bfe33e14 100644 --- a/packages/website/docs/tutorials/editor-input-output.md +++ b/packages/website/docs/tutorials/editor-input-output.md @@ -23,11 +23,10 @@ See the dedicated [codecs page](../usage/codecs.md) for more information on how For encoding other objects, or if no editor instance is available, the [Codec](https://maxgraph.github.io/maxGraph/api-docs/classes/Codec.html) can be used to create and read XML data. - ## Files -The `save`, `open`, `readGraphModel` and `writeGraphModel` functions implement a standard mechanism for handling files in [Editor]()https://maxgraph.github.io/maxGraph/api-docs/classes/Editor.html. +The `save`, `open`, `readGraphModel` and `writeGraphModel` functions implement a standard mechanism for handling files in [Editor](https://maxgraph.github.io/maxGraph/api-docs/classes/Editor.html). The default implementation of `Editor.save` is called with an argument to indicate if the save was triggered by the user or by the system. It then uses the `urlPost` variable of the editor object to check if a post request should be issued. From 9acc2c65365f6afacbf788989417de9c1d2fd1fc Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:18:46 +0100 Subject: [PATCH 23/42] editor-input-output.md add description --- packages/website/docs/tutorials/editor-input-output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/docs/tutorials/editor-input-output.md b/packages/website/docs/tutorials/editor-input-output.md index b2bfe33e14..60ec30953e 100644 --- a/packages/website/docs/tutorials/editor-input-output.md +++ b/packages/website/docs/tutorials/editor-input-output.md @@ -1,6 +1,6 @@ --- sidebar_position: 4 -description: XXXX. +description: Learn how-to save and open Editor data stored in a XML file. --- # Editor Input/Output From fbe9243e347d6c3a39c101a86da995753313fffa Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:26:53 +0100 Subject: [PATCH 24/42] WIP graph.md migrate to markdown --- packages/website/docs/tutorials/graph.md | 87 +++++++++++------------- 1 file changed, 38 insertions(+), 49 deletions(-) diff --git a/packages/website/docs/tutorials/graph.md b/packages/website/docs/tutorials/graph.md index 62345a8b58..5a30dc3738 100644 --- a/packages/website/docs/tutorials/graph.md +++ b/packages/website/docs/tutorials/graph.md @@ -1,6 +1,6 @@ --- sidebar_position: 2 -description: XXXX. +description: Learn how to instantiate your first Graph. --- # Graph @@ -23,26 +23,21 @@ Copyright (c) JGraph Ltd 2006-2017 ::: -

    - Instantiate mxGraph - in order to create a graph. This is the central class in the API. - Everything else is auxiliary. -

    - -![](assets/graphs/graph.png) +Instantiate [Graph](https://maxgraph.github.io/maxGraph/api-docs/classes/Graph.html) in order to create a graph. This is the central class in the API. +Everything else is auxiliary. -

    - To create a new graph instance, a DOM node (typically a DIV) is - required: -

    +![The Graph class hierarchy](assets/graphs/graph.png) +To create a new graph instance, a DOM node (typically a DIV) is required: ```javascript const node = document.getElementById('id-of-graph-container'); const graph = new mxGraph(node); ``` -

    Model

    + +## Model +

    mxCell defines the elements of the graph model, which is implemented by @@ -86,12 +81,14 @@ const model = new GraphDataModel(root); ``` -

    Stylesheet

    + +## Stylesheet +

    The appearance of the cells in a graph is defined by the stylesheet, which is an instance of mxStylesheet. - The stylesheet maps from stylenames to styles. + The stylesheet maps from style names to styles. A style is an array of key, value pairs to be used with the cells. The keys are defined in mxConstants and the values may be @@ -110,11 +107,13 @@ edgeStyle[mxConstants.STYLE_EDGE] = mxEdgeStyle.TopToBottom; ``` -

    Styles

    + +## Styles +

    - The style information for a cell is stored in cell.style. + The style information for a cell is stored in `cell.style`. The style is part of the cell's state and is normally changed via - mxGraphModel.setStyle, which will update all views. + `mxGraphModel.setStyle`, which will update all views. The cell style is a string of the form

    @@ -137,41 +136,31 @@ rounded;strokeColor=red;fillColor=green
     var v1 = graph.insertVertex(parent, null, 'Hello',
       20, 20, 80, 30, 'rounded;strokeColor=red;fillColor=green');
     
    -

    Appearance

    -

    - In certain cases you may want to override specific attributes based on - dynamic properties of a cell (ie. it's value, aka. userobject), such as - the image, indicator shape, -image, -color or -gradient color), in - which case you can override getImage, - getIndicatorShape, getIndicatorImage, - getIndicatorColor and getIndicatorGradientColor - respectively. Note that these methods take a cell state as an argument, - which points to a "resolved" (that is, an array) version of the - cell's style. Hence, the default implementation for getImage - looks as follows: -

    -```javascript -mxGraph.prototype.getImage = function(state) -{ - if (state != null && state.style != null) - { - return state.style[mxConstants.STYLE_IMAGE]; + + +## Appearance + +In certain cases you may want to override specific attributes based on dynamic properties of a cell (i.e. it's value, aka. `UserObject`), such as +the image, indicator shape, -image, -color or -gradient color), in which case you can override +`getImage`, `getIndicatorShape`, `getIndicatorImage`, `getIndicatorColor` and `getIndicatorGradientColor` respectively. +Note that these methods take a cell state as an argument, which points to a "resolved" version of the cell's style. + +Hence, the default implementation for `getImage`looks as follows: + +```typescript +graph.getImage = function(state: CellState) { + if (state?.style) { + return state.style.image; } return null; } ``` -

    - This method may be overridden to return any image for the given state. - Typically, the image is defined by either state.cell, - which points to the graph cell associated with the state, or by - state.cell.value, which refers to the cell's user object. -

    -

    - Due to the nature of the display, where all cells are created once and - updated only if the model fires a notification for a change, you must - invoke view.invalidate(cell) for each cell whose image - has changed, and call view.validate to update the display. -

    +This method may be overridden to return any image for the given state. +Typically, the image is defined by either `state.cell`, which points to the graph cell associated with the state, or by `state.cell.value`, +which refers to the cell's user object. + +Due to the nature of the display, where all cells are created once and updated only if the model fires a notification for a change, +you must invoke `view.invalidate(cell)` for each cell whose image has changed, and call `view.validate` to update the display. From c9dc255fb82280d1d34238994ab9dd973fa97923 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:35:20 +0100 Subject: [PATCH 25/42] WIP graph.md migrate to markdown --- packages/website/docs/tutorials/graph.md | 48 +++++++++++------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/packages/website/docs/tutorials/graph.md b/packages/website/docs/tutorials/graph.md index 5a30dc3738..8f0d2285b4 100644 --- a/packages/website/docs/tutorials/graph.md +++ b/packages/website/docs/tutorials/graph.md @@ -110,32 +110,27 @@ edgeStyle[mxConstants.STYLE_EDGE] = mxEdgeStyle.TopToBottom; ## Styles -

    - The style information for a cell is stored in `cell.style`. - The style is part of the cell's state and is normally changed via - `mxGraphModel.setStyle`, which will update all views. - The cell style is a string of the form -

    -
    -[stylename;|key=value;]
    -
    -

    - which tells the graph to use the given named styles and override the - specified key, value pairs in the given order. For example, to use the - rounded - style and override the stroke- and fillColor, the style would be defined as: -

    -
    -rounded;strokeColor=red;fillColor=green
    -
    -

    - To use the above in Hello, World!, the stylename would be passed to the - insertVertex method as follows: -

    -
    -var v1 = graph.insertVertex(parent, null, 'Hello',
    -  20, 20, 80, 30, 'rounded;strokeColor=red;fillColor=green');
    -
    +The style information for a cell is stored in `cell.style`. +The style is part of the cell's state and is normally changed via `GraphDataModel.setStyle`, which will update all views. +The cell style is a [CellStateStyle object ](https://maxgraph.github.io/maxGraph/api-docs/types/CellStateStyle.html) which tells the graph to use the given named styles and override the specified keys. + +For example, use the [Stylesheet.putCellStyle](https://maxgraph.github.io/maxGraph/api-docs/classes/Stylesheet.html#putcellstyle) method to set to `rounded` style +and override the stroke and fill colors, the style would be defined as: + +```javascript +{ + baseStyleNames: ['rounded'], + strokeColor: 'red', + fillColor: 'green' +} +``` + +To use the above in Hello, World!, the stylename would be passed to the insertVertex method as follows: + +[//]: # (TODO migrate to the new insertVertex method using object and use maxGraph style object) +```javascript +const v1 = graph.insertVertex(parent, null, 'Hello', 20, 20, 80, 30, 'rounded;strokeColor=red;fillColor=green'); +``` @@ -163,4 +158,3 @@ which refers to the cell's user object. Due to the nature of the display, where all cells are created once and updated only if the model fires a notification for a change, you must invoke `view.invalidate(cell)` for each cell whose image has changed, and call `view.validate` to update the display. - From 986419e49128cba3ca9f6aa0f0c5db92402dc8a7 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:38:31 +0100 Subject: [PATCH 26/42] WIP graph.md migrate to markdown --- packages/website/docs/tutorials/graph.md | 36 +++++++++++------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/packages/website/docs/tutorials/graph.md b/packages/website/docs/tutorials/graph.md index 8f0d2285b4..ea0d6e4a2c 100644 --- a/packages/website/docs/tutorials/graph.md +++ b/packages/website/docs/tutorials/graph.md @@ -84,26 +84,18 @@ const model = new GraphDataModel(root); ## Stylesheet -

    - The appearance of the cells in a graph is defined by the - stylesheet, which is an instance of - mxStylesheet. - The stylesheet maps from style names to styles. - A style is an array of key, value pairs to be - used with the cells. The keys are defined in - mxConstants and the values may be - strings and numbers or JavaScript objects or functions. -

    -

    - To modify the default styles for vertices and edges in an existing graph: -

    +The appearance of the cells in a graph is defined by the stylesheet, which is an instance of [Stylesheet](https://maxgraph.github.io/maxGraph/api-docs/classes/Stylesheet.html). +The stylesheet maps from style names to styles. + +A style is a [CellStateStyle object ](https://maxgraph.github.io/maxGraph/api-docs/types/CellStateStyle.html), to be used with the cells. +To modify the default styles for vertices and edges in an existing graph: ```javascript -let vertexStyle = graph.getStylesheet().getDefaultVertexStyle(); -vertexStyle[mxConstants.STYLE_ROUNDED] = true; +const vertexStyle = graph.getStylesheet().getDefaultVertexStyle(); +vertexStyle.rounded = true; -let edgeStyle = graph.getStylesheet().getDefaultEdgeStyle(); -edgeStyle[mxConstants.STYLE_EDGE] = mxEdgeStyle.TopToBottom; +const edgeStyle = graph.getStylesheet().getDefaultEdgeStyle(); +edgeStyle.edgeStyle = EdgeStyle.TopToBottom; ``` @@ -127,9 +119,15 @@ and override the stroke and fill colors, the style would be defined as: To use the above in Hello, World!, the stylename would be passed to the insertVertex method as follows: -[//]: # (TODO migrate to the new insertVertex method using object and use maxGraph style object) +[//]: # (TODO migrate to the new insertVertex method using a single object parameter) ```javascript -const v1 = graph.insertVertex(parent, null, 'Hello', 20, 20, 80, 30, 'rounded;strokeColor=red;fillColor=green'); +const v1 = graph.insertVertex(parent, null, 'Hello', 20, 20, 80, 30, + { + baseStyleNames: ['rounded'], + strokeColor: 'red', + fillColor: 'green' + } +); ``` From cba12106cb31b8a751bc62c83c0ec6c5d1ad1858 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:40:05 +0100 Subject: [PATCH 27/42] WIP graph.md migrate to markdown --- packages/website/docs/tutorials/graph.md | 32 ++++++------------------ 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/packages/website/docs/tutorials/graph.md b/packages/website/docs/tutorials/graph.md index ea0d6e4a2c..413972fabf 100644 --- a/packages/website/docs/tutorials/graph.md +++ b/packages/website/docs/tutorials/graph.md @@ -46,33 +46,15 @@ const graph = new mxGraph(node); ![](assets/graphs/model.png) +The graph model has the following properties: +* The root element of the graph contains the layers. The parent of each layer is the root element. +* A layer may contain elements of the graph model, namely vertices, edges and groups. +* Groups may contain elements of the graph model, recursively. +The graph and structural information is stored in the cells, as well as the _user objects_, +which are used to store the _value_ associated with the cells (aka business objects). -

    - The graph model has the following properties: -

    -
      -
    • - The root element of the graph contains the layers. - The parent of each layer is the root element. -
    • -
    • - A layer may contain elements of the graph model, - namely vertices, edges and groups. -
    • -
    • - Groups may contain elements of the graph model, - recursively. -
    • -
    -

    - The graph and structural information is stored in the cells, as well as the - user objects, which are used to store the value associated with - the cells (aka business objects). -

    -

    - To create a new graph model with a root cell and a default layer (first child): -

    +To create a new graph model with a root cell and a default layer (first child): ```javascript const root = new Cell(); From e2d9e8f31d227863aeef62294f19ba1eb46c3a21 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:48:17 +0100 Subject: [PATCH 28/42] WIP graph.md migrate to markdown --- packages/website/docs/tutorials/graph.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/website/docs/tutorials/graph.md b/packages/website/docs/tutorials/graph.md index 413972fabf..69a3939054 100644 --- a/packages/website/docs/tutorials/graph.md +++ b/packages/website/docs/tutorials/graph.md @@ -8,7 +8,7 @@ description: Learn how to instantiate your first Graph. :::warning The content of this page is a **work in progress**. -The original `mxGraph` tutorial was used to create this page which still contains `mxGraph` code to migrate to the maxGraph API. +The original `mxGraph` tutorial was used to create this page which still contains `mxGraph` class diagrams to migrate to the maxGraph API. ::: @@ -38,11 +38,7 @@ const graph = new mxGraph(node); ## Model -

    - mxCell defines the - elements of the graph model, which is implemented by - mxGraphModel. -

    +[Cell](https://maxgraph.github.io/maxGraph/api-docs/classes/Cell.html) defines the elements of the graph model, which is implemented by [GraphDataModel](https://maxgraph.github.io/maxGraph/api-docs/classes/GraphDataModel.html). ![](assets/graphs/model.png) From 7efa324c85422d3faf246f76c29f7880a14b5c9c Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:55:29 +0100 Subject: [PATCH 29/42] WIP editor.md migrate to markdown --- packages/website/docs/tutorials/editor.md | 52 ++++++++++------------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/packages/website/docs/tutorials/editor.md b/packages/website/docs/tutorials/editor.md index 6f4873c974..47aa0a867e 100644 --- a/packages/website/docs/tutorials/editor.md +++ b/packages/website/docs/tutorials/editor.md @@ -8,7 +8,7 @@ description: XXXX. :::warning The content of this page is a **work in progress**. -The original `mxGraph` tutorial was used to create this page which still contains `mxGraph` code to migrate to the maxGraph API. +The original `mxGraph` tutorial was used to create this page which still contains `mxGraph` class diagrams to migrate to the maxGraph API. ::: @@ -23,37 +23,30 @@ Copyright (c) JGraph Ltd 2006-2017 ::: -

    - Instantiate mxEditor in - order to create an editor. This is the central class in the editor - package. Everything else in this package is auxiliary. - To create a new editor instance and configure it using a config - file, you can pass the name of the config file to the - mxEditor constructor. -

    +Instantiate [Editor](https://maxgraph.github.io/maxGraph/api-docs/classes/Editor.html) in order to create an editor. +This is the central class in the editor package. Everything else in this package is auxiliary. +To create a new editor instance and configure it using a config file, you can pass the name of the config file to the +[Editor constructor](https://maxgraph.github.io/maxGraph/api-docs/classes/Editor.html). ![](assets/graphs/editor.png) -

    - To create a new editor instance and configure it, the following code is used: -

    -
    -let config = mxUtils.load('editors/config/keyhandler-commons.xml').getDocumentElement();
    -let editor = new mxEditor(config);
    -
    -

    - TODO add link to the codecs page - The configuration file is an XML file that is passed to - mxCodec, which in - turn uses mxEditorCodec - and others to read the XML into the editor object hierarchy. This is normally - done at startup time to configure the editor, graph, model, toolbar, popupmenus - etc using the I/O subsystem. -

    +To create a new editor instance and configure it, the following code is used: +```javascript +const config = mxUtils.load('editors/config/keyhandler-commons.xml').getDocumentElement(); +const editor = new Editor(config); +``` + +The configuration file is an XML file that is passed to [Codec](https://maxgraph.github.io/maxGraph/api-docs/classes/Codec.html), +which in turn uses [EditorCodec](https://maxgraph.github.io/maxGraph/api-docs/classes/EditorCodec.html) and others to read the XML into the editor object hierarchy. + +This is normally done at startup time to configure the editor, graph, model, toolbar, popupmenus, etc. using the [I/O subsystem](./editor-input-output.md). + + + +## CSS -

    CSS

    The CSS stylesheet contains the style definitions for various elements of the user interface, such as the rubberband selection, @@ -68,13 +61,12 @@ let editor = new mxEditor(config);

    -
    -<mxEditor>
    +```xml
    +<Editor>
       <ui>
         <stylesheet name="examples/editors/css/process.css"/>
         ...
    -
    - +```

    Templates

    From 2ba4e52c20d0fea9501f0ed378cd739fd2a51445 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 18:04:55 +0100 Subject: [PATCH 30/42] WIP editor.md migrate to markdown --- packages/website/docs/tutorials/editor.md | 66 +++++++++++------------ 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/packages/website/docs/tutorials/editor.md b/packages/website/docs/tutorials/editor.md index 47aa0a867e..f711211c6f 100644 --- a/packages/website/docs/tutorials/editor.md +++ b/packages/website/docs/tutorials/editor.md @@ -47,44 +47,42 @@ This is normally done at startup time to configure the editor, graph, model, too ## CSS -

    - The CSS stylesheet contains the style definitions for various - elements of the user interface, such as the rubberband selection, - the in-place editor or the popup menu. It also contains the directives - required to enable VML support in Internet Explorer, so it is substantial - that the stylesheet is included in the page. -

    -

    - Additional stylesheets may either be added programmatically using - mxClient.link('stylesheet', filename) or - via a stylesheet tag of the UI section in the editor configuration, eg.: -

    +The CSS stylesheet contains the style definitions for various elements of the user interface, such as the rubberband selection, +the in-place editor or the popup menu. + +Additional stylesheets may either be added via a stylesheet tag of the UI section in the editor configuration, e.g.: ```xml -<Editor> - <ui> - <stylesheet name="examples/editors/css/process.css"/> - ... + + + + + ``` -

    Templates

    -

    - To add new cell types, create a template in the templates array section of - the model in the config file (mxEditor/mxGraph/mxGraphModel/Array[as=templates]) - as follows: -

    -
    -<add as="symbol">
    -  <Symbol label="Symbol" customAttribute="whatever">
    -    <mxCell vertex="1" connectable="1" style="symbol;image=images/event.png">
    -      <mxGeometry as="geometry" width="32" height="32"/>
    -    </mxCell>
    -    <CustomChild customAttribute="whatever"/>
    -  </Symbol>
    -</add>
    -
    + +## Templates + +To add new cell types, create a template in the templates array section of the model in the config file (Editor/Graph/GraphDataModel/Array[as=templates]) as follows: + +```xml + + + + + + + + + + + + + +``` +

    The as-attribute of the add-element contains the name under which the template will be accessible for later use. The @@ -110,9 +108,9 @@ This is normally done at startup time to configure the editor, graph, model, too (mxEditor/mxDefaultToolbar[as=toolbar]) as follows:

    -<add as="symbolTool" template="symbol"
    +
     

    The as attribute specifies the tooltip to be displayed for the From 778bb119c76c7f90ba04bfb4304ff486faeaeab8 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 18:06:45 +0100 Subject: [PATCH 31/42] WIP editor.md migrate to markdown --- packages/website/docs/tutorials/editor.md | 34 +++++++++-------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/packages/website/docs/tutorials/editor.md b/packages/website/docs/tutorials/editor.md index f711211c6f..994e4f53e2 100644 --- a/packages/website/docs/tutorials/editor.md +++ b/packages/website/docs/tutorials/editor.md @@ -83,22 +83,14 @@ To add new cell types, create a template in the templates array section of the m ``` -

    - The as-attribute of the add-element contains the - name under which the template will be accessible for later use. The - Symbol-child element is a custom (ie workflow) element, and - can have any name and any number of child elements and custom attributes. - The label attribute is a special one that is used for the textual - representation of the cell in the graph. The mxCell element - is another special child node which contains the graphical information for - the cell, namely, the cell-type, -style, -size and -position. -

    -

    - See mxGraph.convertValueToString if you would like to use another - attribute or a combination of attributes for the textual representation, - and mxCell.valueChanged to handle in-place editing by storing - the new text value in the respective attribute(s). -

    +The `as`-attribute of the `add`-element contains the name under which the template will be accessible for later use. +The `Symbol`-child element is a custom (ie workflow) element, and can have any name and any number of child elements and custom attributes. + +The label attribute is a special one that is used for the textual representation of the cell in the graph. +The `Cell` element is another special child node which contains the graphical information for the cell, namely, the cell-type, -style, -size and -position. + +See `Graph.convertValueToString` if you would like to use another attribute or a combination of attributes for the textual representation, +and `Cell.valueChanged` to handle in-place editing by storing the new text value in the respective attribute(s).

    Toolbar

    @@ -113,16 +105,16 @@ To add new cell types, create a template in the templates array section of the m icon="wf/images/bpmn/small_event.gif"/>

    - The as attribute specifies the tooltip to be displayed for the - icon in the toolbar, the template-attribute refers to the name - under which the template was previously added. The style- + The `as` attribute specifies the tooltip to be displayed for the + icon in the toolbar, the `template`-attribute refers to the name + under which the template was previously added. The `style`- attribute is optional, and may be used to override the style defined in the template definition. Finally, the icon specifies the icon to be used for the toolbar item.

    - Note that the as attribute is assumed to be the key for a language - resource, in this case symbolTool. If the resource is not defined + Note that the `as` attribute is assumed to be the key for a language + resource, in this case `symbolTool`. If the resource is not defined in mxResources, then the attribute value is used as the label.

    From 048ce24816907179bb49115619a1acfc528f6f9c Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 18:10:41 +0100 Subject: [PATCH 32/42] WIP editor.md migrate to markdown --- packages/website/docs/tutorials/editor.md | 40 ++++++++++------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/packages/website/docs/tutorials/editor.md b/packages/website/docs/tutorials/editor.md index 994e4f53e2..efc4f12702 100644 --- a/packages/website/docs/tutorials/editor.md +++ b/packages/website/docs/tutorials/editor.md @@ -1,6 +1,6 @@ --- sidebar_position: 3 -description: XXXX. +description: Learn how to use the maxGraph Editor. --- # Editor @@ -93,28 +93,22 @@ See `Graph.convertValueToString` if you would like to use another attribute or a and `Cell.valueChanged` to handle in-place editing by storing the new text value in the respective attribute(s). -

    Toolbar

    -

    - To use the template in the graph, a toolbar item must be added which refers - to the template in the mxDefaultToolbar section of the config file - (mxEditor/mxDefaultToolbar[as=toolbar]) as follows: -

    -
    +
    +## Toolbar
    +
    +
    +To use the template in the graph, a toolbar item must be added which refers to the template in the `DefaultToolbar` section
    +of the config file (Editor/DefaultToolbar[as=toolbar]) as follows:
    +
    +```xml
     
    -
    -

    - The `as` attribute specifies the tooltip to be displayed for the - icon in the toolbar, the `template`-attribute refers to the name - under which the template was previously added. The `style`- - attribute is optional, and may be used to override the style defined in the - template definition. Finally, the icon specifies the icon to be used for the - toolbar item. -

    -

    - Note that the `as` attribute is assumed to be the key for a language - resource, in this case `symbolTool`. If the resource is not defined - in mxResources, then the - attribute value is used as the label. -

    +``` + +The `as` attribute specifies the tooltip to be displayed for the icon in the toolbar, the `template`-attribute refers to the name under which the template was previously added. +The `style`- attribute is optional, and may be used to override the style defined in the template definition. +Finally, the icon specifies the icon to be used for the toolbar item. + +Note that the `as` attribute is assumed to be the key for a language resource, in this case `symbolTool`. +If the resource is not defined in [Translations resources](https://maxgraph.github.io/maxGraph/api-docs/classes/Translations.html#resources), then the attribute value is used as the label. From d7e9e734593ec22b38063b4f2c2f877e3d0109ee Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 18:11:15 +0100 Subject: [PATCH 33/42] editor-input-output.md: update description --- packages/website/docs/tutorials/editor-input-output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/docs/tutorials/editor-input-output.md b/packages/website/docs/tutorials/editor-input-output.md index 60ec30953e..945d87a6aa 100644 --- a/packages/website/docs/tutorials/editor-input-output.md +++ b/packages/website/docs/tutorials/editor-input-output.md @@ -1,6 +1,6 @@ --- sidebar_position: 4 -description: Learn how-to save and open Editor data stored in a XML file. +description: Learn how to save and open Editor data stored in a XML file. --- # Editor Input/Output From 286ffd395b4c45710cfd6e8f65f6a5fa4914c4a0 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 18:12:31 +0100 Subject: [PATCH 34/42] remove the warning about the mxGraph doc migration in the announcement bar --- packages/website/docusaurus.config.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/website/docusaurus.config.ts b/packages/website/docusaurus.config.ts index 75cb79351e..9cf8f719fe 100644 --- a/packages/website/docusaurus.config.ts +++ b/packages/website/docusaurus.config.ts @@ -61,12 +61,12 @@ const config: Config = { themeConfig: { // Replace with your project's social card // image: 'img/docusaurus-social-card.jpg', - announcementBar: { - content: - '⚠️ This is a work in progress, the content of the original mxGraph documentation will be progressively migrated here ⚠️', - backgroundColor: 'rgb(255, 248, 230)', - isCloseable: false, - }, + // announcementBar: { + // content: + // '⚠️ This is a work in progress, the content of the original mxGraph documentation will be progressively migrated here ⚠️', + // backgroundColor: 'rgb(255, 248, 230)', + // isCloseable: false, + // }, docs: { sidebar: { hideable: true, From bae4b359c64df208b19728d8e7b75c73ec94e2b4 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 18:13:11 +0100 Subject: [PATCH 35/42] remove warning in the doc intro page --- packages/website/docs/intro.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/website/docs/intro.md b/packages/website/docs/intro.md index 66562c1990..c999c8fab0 100644 --- a/packages/website/docs/intro.md +++ b/packages/website/docs/intro.md @@ -18,14 +18,6 @@ which requires finer-grained customization of functionality than off-the-shelf p ## About this documentation -:::warning - -This documentation is a **work in progress**. - -Please be patient, as content will be gradually updated, especially the content of the original `mxGraph` documentation. - -::: - :::tip The documentation hosted at https://maxgraph.github.io/maxGraph includes the latest development changes. From ce755ce01b6212975eb3a0d06a067c92663cc22d Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 5 Jan 2025 18:14:20 +0100 Subject: [PATCH 36/42] README: remove warning about mxGraph documentation migration --- README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index 6f7b72bd9b..d60c5a7768 100644 --- a/README.md +++ b/README.md @@ -129,16 +129,7 @@ You will see something like in the following _maxGraph panning_ demo: The maxGraph documentation is available on the [maxGraph website](https://maxgraph.github.io/maxGraph). > [!WARNING] -> This is a **work in progress**, the content of the original _mxGraph_ documentation will be progressively migrated there. -> For more details, see [#345](https://github.com/maxGraph/maxGraph/issues/345). - -Documentation partially migrated: -- https://maxgraph.github.io/maxGraph/docs/manual/ - -Documentation to be migrated: -- https://jgraph.github.io/mxgraph/docs/tutorial.html - -> Be aware that the maxGraph API doesn't fully match the mxGraph API (see the paragraph below about "[Migrating from mxGraph](#migrate-from-mxgraph)"). +> This is a **work in progress**, the content will be progressively improved. ## Examples From f8abd9f3174b12315c61cdced43fa668059ae78d Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:07:48 +0100 Subject: [PATCH 37/42] graph.md: use maxGraph api instead of mxGraph api --- packages/website/docs/tutorials/graph.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/docs/tutorials/graph.md b/packages/website/docs/tutorials/graph.md index 69a3939054..290e5bf775 100644 --- a/packages/website/docs/tutorials/graph.md +++ b/packages/website/docs/tutorials/graph.md @@ -32,7 +32,7 @@ To create a new graph instance, a DOM node (typically a DIV) is required: ```javascript const node = document.getElementById('id-of-graph-container'); -const graph = new mxGraph(node); +const graph = new Graph(node); ``` From 6eb032f014edcd7c5d45c300bdc5b8c889ee9613 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:09:18 +0100 Subject: [PATCH 38/42] graph.md: fix typo --- packages/website/docs/tutorials/graph.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/docs/tutorials/graph.md b/packages/website/docs/tutorials/graph.md index 290e5bf775..8a57894b9f 100644 --- a/packages/website/docs/tutorials/graph.md +++ b/packages/website/docs/tutorials/graph.md @@ -95,7 +95,7 @@ and override the stroke and fill colors, the style would be defined as: } ``` -To use the above in Hello, World!, the stylename would be passed to the insertVertex method as follows: +To use the above in Hello, World!, the style name would be passed to the insertVertex method as follows: [//]: # (TODO migrate to the new insertVertex method using a single object parameter) ```javascript From c49718e1cfaeb01684bcb966a42478ff6c1ce170 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:10:19 +0100 Subject: [PATCH 39/42] editor.md: add image alt directive --- packages/website/docs/tutorials/editor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/docs/tutorials/editor.md b/packages/website/docs/tutorials/editor.md index efc4f12702..10159c06ed 100644 --- a/packages/website/docs/tutorials/editor.md +++ b/packages/website/docs/tutorials/editor.md @@ -29,7 +29,7 @@ This is the central class in the editor package. Everything else in this package To create a new editor instance and configure it using a config file, you can pass the name of the config file to the [Editor constructor](https://maxgraph.github.io/maxGraph/api-docs/classes/Editor.html). -![](assets/graphs/editor.png) +![Class diagram showing the Editor class hierarchy and its relationships](assets/graphs/editor.png) To create a new editor instance and configure it, the following code is used: From 59212bfe8b919277d5c8043e77cc7c9408978d05 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:13:59 +0100 Subject: [PATCH 40/42] editor-input-output.md: improve the php code example (validation + more modern api usage) --- .../docs/tutorials/editor-input-output.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/website/docs/tutorials/editor-input-output.md b/packages/website/docs/tutorials/editor-input-output.md index 945d87a6aa..793c03f4b6 100644 --- a/packages/website/docs/tutorials/editor-input-output.md +++ b/packages/website/docs/tutorials/editor-input-output.md @@ -42,11 +42,22 @@ The PHP file will get the XML from the POST request and write it to a file calle ```php ``` From 35020ba0e3f3ecbee7120d7112035925d6588032 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:38:53 +0100 Subject: [PATCH 41/42] graph.md: add image alt directive --- packages/website/docs/tutorials/graph.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/docs/tutorials/graph.md b/packages/website/docs/tutorials/graph.md index 8a57894b9f..ca9d5508b9 100644 --- a/packages/website/docs/tutorials/graph.md +++ b/packages/website/docs/tutorials/graph.md @@ -40,7 +40,7 @@ const graph = new Graph(node); [Cell](https://maxgraph.github.io/maxGraph/api-docs/classes/Cell.html) defines the elements of the graph model, which is implemented by [GraphDataModel](https://maxgraph.github.io/maxGraph/api-docs/classes/GraphDataModel.html). -![](assets/graphs/model.png) +![Class diagram showing the relationship between Cell and GraphDataModel classes](assets/graphs/model.png) The graph model has the following properties: * The root element of the graph contains the layers. The parent of each layer is the root element. From 2ec206b80fd8ef3f74ce03a2104dbe3469bf0f8e Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:54:24 +0100 Subject: [PATCH 42/42] editor.md: fix call to the "load" function and update related documentation of the "load" function --- packages/core/src/util/MaxXmlRequest.ts | 46 ++++++++----------- packages/website/docs/tutorials/editor.md | 3 +- .../docs/usage/migrate-from-mxgraph.md | 5 +- 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/packages/core/src/util/MaxXmlRequest.ts b/packages/core/src/util/MaxXmlRequest.ts index 2cd50a6738..8f5852f047 100644 --- a/packages/core/src/util/MaxXmlRequest.ts +++ b/packages/core/src/util/MaxXmlRequest.ts @@ -344,7 +344,7 @@ class MaxXmlRequest { const params = this.params; const pars = params.indexOf('&') > 0 ? params.split('&') : params.split(' '); - // Adds the parameters as textareas to the form + // Adds the parameters as text areas to the form for (let i = 0; i < pars.length; i += 1) { const pos = pars[i].indexOf('='); @@ -378,57 +378,51 @@ class MaxXmlRequest { } /** - * Loads the specified URL *synchronously* and returns the . - * Throws an exception if the file cannot be loaded. See {@link Utils#get} for - * an asynchronous implementation. + * Loads the specified URL *synchronously* and returns the {@link MaxXmlRequest}. + * Throws an exception if the file cannot be loaded. + * See {@link get} for an asynchronous implementation. * * Example: * * ```javascript - * try - * { - * let req = mxUtils.load(filename); - * let root = req.getDocumentElement(); + * try { + * const req = load(filename); + * cont root = req.getDocumentElement(); * // Process XML DOM... - * } - * catch (ex) - * { - * mxUtils.alert('Cannot load '+filename+': '+ex); + * } catch (e) { + * console.error(`Cannot load $filename`, e); * } * ``` * * @param url URL to get the data from. */ -export const load = (url: string) => { +export const load = (url: string): MaxXmlRequest => { const req = new MaxXmlRequest(url, null, 'GET', false); req.send(); return req; }; /** - * Loads the specified URL *asynchronously* and invokes the given functions - * depending on the request status. Returns the in use. Both - * functions take the as the only parameter. See - * {@link Utils#load} for a synchronous implementation. + * Loads the specified URL *asynchronously* and invokes the given functions depending on the request status. + * Returns the {@link MaxXmlRequest} in use. + * Both functions take the {@link MaxXmlRequest} as the only parameter. + * See {@link load} for a synchronous implementation. * * Example: * * ```javascript - * mxUtils.get(url, (req)=> - * { - * let node = req.getDocumentElement(); + * get(url, (req) => { + * const node = req.getDocumentElement(); * // Process XML DOM... * }); * ``` * - * So for example, to load a diagram into an existing graph model, the - * following code is used. + * So for example, to load a diagram into an existing graph model, the following code is used. * * ```javascript - * mxUtils.get(url, (req)=> - * { - * let node = req.getDocumentElement(); - * let dec = new Codec(node.ownerDocument); + * get(url, (req) => { + * const node = req.getDocumentElement(); + * const dec = new Codec(node.ownerDocument); * dec.decode(node, graph.getDataModel()); * }); * ``` diff --git a/packages/website/docs/tutorials/editor.md b/packages/website/docs/tutorials/editor.md index 10159c06ed..28a8b7db08 100644 --- a/packages/website/docs/tutorials/editor.md +++ b/packages/website/docs/tutorials/editor.md @@ -34,7 +34,8 @@ To create a new editor instance and configure it using a config file, you can pa To create a new editor instance and configure it, the following code is used: ```javascript -const config = mxUtils.load('editors/config/keyhandler-commons.xml').getDocumentElement(); +import { load } from '@maxgraph/core'; +const config = load('editors/config/keyhandler-commons.xml').getDocumentElement(); const editor = new Editor(config); ``` diff --git a/packages/website/docs/usage/migrate-from-mxgraph.md b/packages/website/docs/usage/migrate-from-mxgraph.md index aff1fcfa5a..1c2eef02aa 100644 --- a/packages/website/docs/usage/migrate-from-mxgraph.md +++ b/packages/website/docs/usage/migrate-from-mxgraph.md @@ -173,9 +173,12 @@ Here are a few examples of the methods that have been moved. - `convertPoint()`: Update your code to use `styleUtils.convertPoint()` instead of `mxUtils.convertPoint()`. #### `xmlUtils` -- `getXml`(): Update your code to use `xmlUtils.getXml()` instead of `mxUtils.getXml()`. +- `getXml()`: Update your code to use `xmlUtils.getXml()` instead of `mxUtils.getXml()`. - `createXmlDocument()`: Update your code to use `xmlUtils.createXmlDocument()` instead of `mxUtils.createXmlDocument()`. +#### In the default namespace +- `get()`: Update your code to use `get()` instead of `mxUtils.get()`. +- `load()`: Update your code to use `load()` instead of `mxUtils.load()`. ### Removed methods from `mxUtils`