diff --git a/.github/actions/configure-workflow/package-lock.json b/.github/actions/configure-workflow/package-lock.json index 454475032..44a2cdbce 100644 --- a/.github/actions/configure-workflow/package-lock.json +++ b/.github/actions/configure-workflow/package-lock.json @@ -125,28 +125,20 @@ } }, "node_modules/@babel/generator": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", - "integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.15.6", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", @@ -165,39 +157,35 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", - "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" - }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", - "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", - "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -246,15 +234,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-optimise-call-expression": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", @@ -304,21 +283,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", - "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", - "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -348,13 +336,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -362,9 +350,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz", - "integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -536,44 +524,46 @@ } }, "node_modules/@babel/template": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", - "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", - "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -582,39 +572,32 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/types": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", - "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -1414,6 +1397,54 @@ "node": ">=8" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", @@ -8506,22 +8537,15 @@ } }, "@babel/generator": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", - "integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.15.6", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" } }, "@babel/helper-compilation-targets": { @@ -8536,33 +8560,29 @@ "semver": "^6.3.0" } }, - "@babel/helper-function-name": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", - "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" - } + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true }, - "@babel/helper-get-function-arity": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", - "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", - "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.22.5" } }, "@babel/helper-member-expression-to-functions": { @@ -8597,14 +8617,6 @@ "@babel/template": "^7.15.4", "@babel/traverse": "^7.15.4", "@babel/types": "^7.15.6" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true - } } }, "@babel/helper-optimise-call-expression": { @@ -8644,18 +8656,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", - "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.22.5" } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, "@babel/helper-validator-identifier": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", - "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -8676,20 +8694,20 @@ } }, "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz", - "integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -8810,71 +8828,67 @@ } }, "@babel/template": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", - "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "dependencies": { "@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } } } }, "@babel/traverse": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", - "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, "dependencies": { "@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } } } }, "@babel/types": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", - "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true - } } }, "@bcoe/v8-coverage": { @@ -9488,6 +9502,45 @@ } } }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", diff --git a/attic.md b/attic.md new file mode 100644 index 000000000..6db8f86a0 --- /dev/null +++ b/attic.md @@ -0,0 +1,11 @@ +# Historical Code Archive + +This document catalogs code that was previously part of PlantUML but has since been deprecated and removed due to its lack of use. +It serves as a historical reference to ensure we remember and understand past decisions. + +- [logo language](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/logo) +- [basic language](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/jasic) +- [mjpeg export](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/mjpeg) +- [animation](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/anim) +- [ditherer quantization](https://github.com/plantuml/plantuml/tree/v1.2023.12/src/net/sourceforge/plantuml/quantization) +- [syntax suggestion](https://github.com/plantuml/plantuml/blob/v1.2023.12/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java) diff --git a/gradle.properties b/gradle.properties index 11d4e612e..39994fd2b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ # Warning, "version" should be the same in gradle.properties and Version.java # Any idea anyone how to magically synchronize those :-) ? -version = 1.2023.12beta1 +version = 1.2023.13beta1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/atmp/CucaDiagram.java b/src/net/atmp/CucaDiagram.java index 39cd59929..22ac06271 100644 --- a/src/net/atmp/CucaDiagram.java +++ b/src/net/atmp/CucaDiagram.java @@ -46,6 +46,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; @@ -84,10 +85,12 @@ import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.skin.UmlDiagramType; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.statediagram.StateDiagram; +import net.sourceforge.plantuml.stereo.Stereotype; import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; import net.sourceforge.plantuml.svek.CucaDiagramFileMaker; import net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek; import net.sourceforge.plantuml.text.BackSlash; +import net.sourceforge.plantuml.text.Guillemet; import net.sourceforge.plantuml.xmi.CucaDiagramXmiMaker; import net.sourceforge.plantuml.xmlsc.StateDiagramScxmlMaker; @@ -523,6 +526,41 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return result; } + @Override + public List getVisibleStereotypeLabels(Entity entity) { + Stereotype stereotype = entity.getStereotype(); + + if (stereotype == null) { + return null; + } + + List commands = new ArrayList<>(); + for (EntityHideOrShow hideOrShowEntry : hideOrShows) { + if (hideOrShowEntry.portion == EntityPortion.STEREOTYPE) { + commands.add(hideOrShowEntry); + } + } + + List visibleStereotypeLabels = new ArrayList<>(); + for (String stereoTypeLabel: entity.getStereotype().getLabels(Guillemet.DOUBLE_COMPARATOR)) { + if (isHiddenStereotypeLabel(stereoTypeLabel, commands)) { + visibleStereotypeLabels.add(stereoTypeLabel); + } + } + + return visibleStereotypeLabels; + } + + private boolean isHiddenStereotypeLabel(String stereoTypeLabel, List commands) { + for (EntityHideOrShow cmd : commands) { + String gender = cmd.gender.getGender(); + if (gender != null && gender.equals(stereoTypeLabel)) { + return false; + } + } + return true; + } + public final void hideOrShow(EntityGender gender, EntityPortion portions, boolean show) { for (EntityPortion portion : portions.asSet()) this.hideOrShows.add(new EntityHideOrShow(gender, portion, show)); diff --git a/src/net/atmp/ImageBuilder.java b/src/net/atmp/ImageBuilder.java index 3ce84f890..078a00562 100644 --- a/src/net/atmp/ImageBuilder.java +++ b/src/net/atmp/ImageBuilder.java @@ -37,8 +37,6 @@ package net.atmp; import java.awt.Color; import java.awt.Graphics2D; -import java.awt.Image; -import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -46,22 +44,16 @@ import java.io.OutputStream; import java.util.Random; import java.util.Set; -import javax.swing.ImageIcon; - import com.plantuml.api.cheerpj.WasmLog; -import net.sourceforge.plantuml.AnimatedGifEncoder; import net.sourceforge.plantuml.AnnotatedBuilder; import net.sourceforge.plantuml.AnnotatedWorker; import net.sourceforge.plantuml.EmptyImageBuilder; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; -import net.sourceforge.plantuml.FileUtils; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.Scale; import net.sourceforge.plantuml.TitledDiagram; -import net.sourceforge.plantuml.anim.AffineTransformation; -import net.sourceforge.plantuml.anim.Animation; import net.sourceforge.plantuml.api.ImageDataComplex; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.braille.UGraphicBraille; @@ -87,14 +79,10 @@ import net.sourceforge.plantuml.klimt.drawing.tikz.UGraphicTikz; import net.sourceforge.plantuml.klimt.drawing.txt.UGraphicTxt; import net.sourceforge.plantuml.klimt.drawing.visio.UGraphicVdx; import net.sourceforge.plantuml.klimt.font.StringBounder; -import net.sourceforge.plantuml.klimt.geom.MinMax; import net.sourceforge.plantuml.klimt.geom.XDimension2D; import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.klimt.shape.UDrawable; import net.sourceforge.plantuml.klimt.shape.URectangle; -import net.sourceforge.plantuml.mjpeg.MJPEGGenerator; -import net.sourceforge.plantuml.security.SFile; -import net.sourceforge.plantuml.security.SImageIO; import net.sourceforge.plantuml.skin.ColorParam; import net.sourceforge.plantuml.skin.CornerParam; import net.sourceforge.plantuml.skin.LineParam; @@ -113,9 +101,6 @@ import net.sourceforge.plantuml.url.Url; public class ImageBuilder { - // ::comment when __CORE__ - private Animation animation; - // ::done private boolean annotations; private HColor backcolor = getDefaultHBackColor(); @@ -223,9 +208,6 @@ public class ImageBuilder { public ImageBuilder styled(TitledDiagram diagram) { skinParam = diagram.getSkinParam(); stringBounder = fileFormatOption.getDefaultStringBounder(skinParam); - // ::comment when __CORE__ - animation = diagram.getAnimation(); - // ::done annotations = true; backcolor = diagram.calculateBackColor(); margin = calculateMargin(diagram); @@ -246,21 +228,7 @@ public class ImageBuilder { udrawable = annotatedWorker.addAdd((TextBlock) udrawable); } - // ::comment when __CORE__ - switch (fileFormatOption.getFileFormat()) { - case MJPEG: - return writeImageMjpeg(os); - case ANIMATED_GIF: - return writeImageAnimatedGif(os); - default: - return writeImageInternal(os, animation); - // ::done - // ::uncomment when __CORE__ - // return writeImageInternal(os); - // ::done - // ::comment when __CORE__ - } - // ::done + return writeImageInternal(os); } public byte[] writeByteArray() throws IOException { @@ -270,34 +238,16 @@ public class ImageBuilder { } } - // ::revert when __CORE__ - private ImageData writeImageInternal(OutputStream os, Animation animationArg) throws IOException { - // private ImageData writeImageInternal(OutputStream os) throws IOException { - // ::done + private ImageData writeImageInternal(OutputStream os) throws IOException { XDimension2D dim = getFinalDimension(); - double dx = 0; - double dy = 0; - // ::comment when __CORE__ - if (animationArg != null) { - final MinMax minmax = animationArg.getMinMax(dim); - animationArg.setDimension(dim); - dim = minmax.getDimension(); - dx = -minmax.getMinX(); - dy = -minmax.getMinY(); - } - // ::done final Scale scale = titledDiagram == null ? null : titledDiagram.getScale(); final double scaleFactor = (scale == null ? 1 : scale.getScale(dim.getWidth(), dim.getHeight())) * getDpi() / 96.0; if (scaleFactor <= 0) throw new IllegalStateException("Bad scaleFactor"); WasmLog.log("...image drawing..."); - // ::revert when __CORE__ - UGraphic ug = createUGraphic(dim, animationArg, dx, dy, scaleFactor, + UGraphic ug = createUGraphic(dim, scaleFactor, titledDiagram == null ? new Pragma() : titledDiagram.getPragma()); - // UGraphic ug = createUGraphic(dim, dx, dy, scaleFactor, - // titledDiagram == null ? new Pragma() : titledDiagram.getPragma()); - // ::done maybeDrawBorder(ug, dim); if (randomPixel) drawRandomPoint(ug); @@ -330,9 +280,9 @@ public class ImageBuilder { if (stroke == null) return; - final URectangle rectangle = URectangle.build(dim.getWidth() - stroke.getThickness(), - dim.getHeight() - stroke.getThickness()) - .rounded(skinParam.getRoundCorner(CornerParam.diagramBorder, null)); + final URectangle rectangle = URectangle + .build(dim.getWidth() - stroke.getThickness(), dim.getHeight() - stroke.getThickness()) + .rounded(skinParam.getRoundCorner(CornerParam.diagramBorder, null)); ug.apply(color == null ? HColors.BLACK : color).apply(stroke).draw(rectangle); } @@ -364,83 +314,13 @@ public class ImageBuilder { return ug; } - // ::comment when __CORE__ - private ImageData writeImageMjpeg(OutputStream os) throws IOException { - - final XDimension2D dim = getFinalDimension(); - - final SFile f = new SFile("c:/tmp.avi"); - - final int nbframe = 100; - - final MJPEGGenerator m = new MJPEGGenerator(f, getAviImage(null).getWidth(null), - getAviImage(null).getHeight(null), 12.0, nbframe); - for (int i = 0; i < nbframe; i++) { - // AffineTransform at = AffineTransform.getRotateInstance(1.0); - AffineTransform at = AffineTransform.getTranslateInstance(dim.getWidth() / 2, dim.getHeight() / 2); - at.rotate(90.0 * Math.PI / 180.0 * i / 100); - at.translate(-dim.getWidth() / 2, -dim.getHeight() / 2); - // final AffineTransform at = AffineTransform.getTranslateInstance(i, 0); - // final ImageIcon ii = new ImageIcon(getAviImage(at)); - // m.addImage(ii.getImage()); - throw new UnsupportedOperationException(); - } - m.finishAVI(); - - FileUtils.copyToStream(f, os); - - return createImageData(dim); - } - - private ImageData writeImageAnimatedGif(OutputStream os) throws IOException { - - final XDimension2D dim = getFinalDimension(); - - final MinMax minmax = animation.getMinMax(dim); - - final AnimatedGifEncoder e = new AnimatedGifEncoder(); - // e.setQuality(1); - e.setRepeat(0); - e.start(os); - // e.setDelay(1000); // 1 frame per sec - // e.setDelay(100); // 10 frame per sec - e.setDelay(60); // 16 frame per sec - // e.setDelay(50); // 20 frame per sec - - for (AffineTransformation at : animation.getAll()) { - final ImageIcon ii = new ImageIcon(getAviImage(at)); - e.addFrame((BufferedImage) ii.getImage()); - } - e.finish(); - return createImageData(dim); - } - - private Image getAviImage(AffineTransformation affineTransform) throws IOException { - final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - writeImageInternal(baos, Animation.singleton(affineTransform)); - baos.close(); - return SImageIO.read(baos.toByteArray()); - } - // ::done - - // ::revert when __CORE__ - private UGraphic createUGraphic(final XDimension2D dim, Animation animationArg, double dx, double dy, - double scaleFactor, Pragma pragma) { - // private UGraphic createUGraphic(final XDimension2D dim, double dx, double dy, - // double scaleFactor, Pragma pragma) { - // ::done + private UGraphic createUGraphic(final XDimension2D dim, double scaleFactor, Pragma pragma) { final ColorMapper colorMapper = fileFormatOption.getColorMapper(); switch (fileFormatOption.getFileFormat()) { case PNG: case RAW: - // ::comment when __CORE__ - return createUGraphicPNG(scaleFactor, dim, animationArg, dx, dy, fileFormatOption.getWatermark(), + return createUGraphicPNG(scaleFactor, dim, fileFormatOption.getWatermark(), fileFormatOption.getFileFormat()); - // ::done - // ::uncomment when __CORE__ - // return createUGraphicPNG(scaleFactor, dim, dx, dy, - // fileFormatOption.getWatermark(), fileFormatOption.getFileFormat()); - // ::done case SVG: return createUGraphicSVG(scaleFactor, dim, pragma); // ::comment when __CORE__ @@ -492,14 +372,8 @@ public class ImageBuilder { } - // ::uncomment when __CORE__ - // private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D - // dim, double dx, double dy, String watermark, FileFormat format) { - // ::done - // ::comment when __CORE__ - private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D dim, Animation affineTransforms, - double dx, double dy, String watermark, FileFormat format) { - // ::done + private UGraphic createUGraphicPNG(double scaleFactor, final XDimension2D dim, String watermark, + FileFormat format) { Color pngBackColor = new Color(0, 0, 0, 0); if (this.backcolor instanceof HColorSimple) @@ -513,15 +387,9 @@ public class ImageBuilder { (int) (dim.getHeight() * scaleFactor), pngBackColor, stringBounder); final Graphics2D graphics2D = builder.getGraphics2D(); - // ::comment when __CORE__ final UGraphicG2d ug = new UGraphicG2d(backcolor, fileFormatOption.getColorMapper(), stringBounder, graphics2D, - scaleFactor, dx, dy, format, affineTransforms == null ? null : affineTransforms.getFirst()); - // ::done - // ::uncomment when __CORE__ - // final UGraphicG2d ug = new UGraphicG2d(backcolor, - // fileFormatOption.getColorMapper(), stringBounder, graphics2D, - // scaleFactor, dx, dy, format); - // ::done + scaleFactor, format); + ug.setBufferedImage(builder.getBufferedImage()); final BufferedImage im = ug.getBufferedImage(); if (this.backcolor instanceof HColorGradient) diff --git a/src/net/sourceforge/plantuml/FileFormat.java b/src/net/sourceforge/plantuml/FileFormat.java index 2de98c84e..bff8ddeb9 100644 --- a/src/net/sourceforge/plantuml/FileFormat.java +++ b/src/net/sourceforge/plantuml/FileFormat.java @@ -76,8 +76,6 @@ public enum FileFormat { SCXML("application/scxml+xml"), // GRAPHML("application/graphml+xml"), // PDF("application/pdf"), // - MJPEG("video/x-msvideo"), // - ANIMATED_GIF("image/gif"), // HTML("text/html"), // HTML5("text/html"), // VDX("application/vnd.visio.xml"), // @@ -112,15 +110,9 @@ public enum FileFormat { if (name().startsWith("XMI")) return ".xmi"; - if (this == MJPEG) - return ".avi"; - if (this == LATEX || this == LATEX_NO_PREAMBLE) return ".tex"; - if (this == ANIMATED_GIF) - return ".gif"; - if (this == BRAILLE_PNG) return ".braille.png"; diff --git a/src/net/sourceforge/plantuml/OptionFlags.java b/src/net/sourceforge/plantuml/OptionFlags.java index 6c2bf5bac..bd0e912f4 100644 --- a/src/net/sourceforge/plantuml/OptionFlags.java +++ b/src/net/sourceforge/plantuml/OptionFlags.java @@ -83,7 +83,7 @@ public class OptionFlags { static public void setMaxPixel(int max) { } - static public final boolean USE_HECTOR = false; + // static public final boolean USE_HECTOR = false; static public boolean ADD_NICE_FOR_DOT = false; // static public final boolean USE_IF_VERTICAL = true; diff --git a/src/net/sourceforge/plantuml/PSystemBuilder.java b/src/net/sourceforge/plantuml/PSystemBuilder.java index cf47b9009..e1e2a3e7b 100644 --- a/src/net/sourceforge/plantuml/PSystemBuilder.java +++ b/src/net/sourceforge/plantuml/PSystemBuilder.java @@ -70,6 +70,7 @@ import net.sourceforge.plantuml.eggs.PSystemWelcomeFactory; import net.sourceforge.plantuml.emoji.PSystemListEmojiFactory; import net.sourceforge.plantuml.error.PSystemError; import net.sourceforge.plantuml.error.PSystemErrorUtils; +import net.sourceforge.plantuml.error.PSystemUnsupported; import net.sourceforge.plantuml.filesdiagram.FilesDiagramFactory; import net.sourceforge.plantuml.flowdiagram.FlowDiagramFactory; import net.sourceforge.plantuml.font.PSystemListFontsFactory; @@ -146,6 +147,9 @@ public class PSystemBuilder { } final DiagramType diagramType = umlSource.getDiagramType(); + if (diagramType == DiagramType.UNKNOWN) + return new PSystemUnsupported(umlSource); + final List errors = new ArrayList<>(); for (PSystemFactory systemFactory : factories) { if (diagramType != systemFactory.getDiagramType()) @@ -159,6 +163,8 @@ public class PSystemBuilder { } errors.add((PSystemError) sys); } + if (errors.size() == 0) + return new PSystemUnsupported(umlSource); result = PSystemErrorUtils.merge(errors); return result; diff --git a/src/net/sourceforge/plantuml/TitledDiagram.java b/src/net/sourceforge/plantuml/TitledDiagram.java index 380bf6f4f..f5faeba59 100644 --- a/src/net/sourceforge/plantuml/TitledDiagram.java +++ b/src/net/sourceforge/plantuml/TitledDiagram.java @@ -42,8 +42,6 @@ import java.util.Map; import net.atmp.ImageBuilder; import net.sourceforge.plantuml.abel.DisplayPositioned; import net.sourceforge.plantuml.abel.DisplayPositionned; -import net.sourceforge.plantuml.anim.Animation; -import net.sourceforge.plantuml.anim.AnimationDecoder; import net.sourceforge.plantuml.api.ApiStable; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.Diagram; @@ -88,10 +86,6 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, private final SkinParam skinParam; - // ::comment when __CORE__ - private Animation animation; - // ::done - private final Pragma pragma = new Pragma(); public Pragma getPragma() { @@ -218,21 +212,6 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, return ClockwiseTopRightBottomLeft.same(10); } - // ::comment when __CORE__ - final public void setAnimation(Iterable animationData) { -// try { - final AnimationDecoder animationDecoder = new AnimationDecoder(animationData); - this.animation = Animation.create(animationDecoder.decode()); -// } catch (ScriptException e) { -// Logme.error(e); -// } - } - - final public Animation getAnimation() { - return animation; - } - // ::done - @Override public ImageBuilder createImageBuilder(FileFormatOption fileFormatOption) throws IOException { return super.createImageBuilder(fileFormatOption).styled(this); diff --git a/src/net/sourceforge/plantuml/UmlDiagram.java b/src/net/sourceforge/plantuml/UmlDiagram.java index 67860d2cb..0025f7843 100644 --- a/src/net/sourceforge/plantuml/UmlDiagram.java +++ b/src/net/sourceforge/plantuml/UmlDiagram.java @@ -38,10 +38,8 @@ package net.sourceforge.plantuml; import static net.atmp.ImageBuilder.plainImageBuilder; import java.awt.Color; -import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import java.io.BufferedOutputStream; -import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; @@ -74,10 +72,8 @@ import net.sourceforge.plantuml.klimt.shape.TextBlock; import net.sourceforge.plantuml.klimt.shape.UDrawable; import net.sourceforge.plantuml.klimt.shape.UImage; import net.sourceforge.plantuml.log.Logme; -import net.sourceforge.plantuml.mjpeg.MJPEGGenerator; import net.sourceforge.plantuml.pdf.PdfConverter; import net.sourceforge.plantuml.security.SFile; -import net.sourceforge.plantuml.security.SImageIO; import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.skin.UmlDiagramType; import net.sourceforge.plantuml.style.NoStyleAvailableException; @@ -258,27 +254,6 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot } // ::comment when __CORE__ - private void exportDiagramInternalMjpeg(OutputStream os) throws IOException { - final SFile f = new SFile("c:/test.avi"); - final int nb = 150; - final double framerate = 30; - final MJPEGGenerator m = new MJPEGGenerator(f, 640, 480, framerate, nb); - - for (int i = 0; i < nb; i++) { - final AffineTransform at = new AffineTransform(); - final double coef = (nb - 1 - i) * 1.0 / nb; - at.setToShear(coef, coef); - final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - // exportDiagramTOxxBEREMOVED(baos, null, 0, new - // FileFormatOption(FileFormat.PNG, at)); - baos.close(); - final BufferedImage im = SImageIO.read(baos.toByteArray()); - m.addImage(im); - } - m.finishAVI(); - - } - private ImageData exportDiagramInternalPdf(OutputStream os, int index) throws IOException { final File svg = FileUtils.createTempFileLegacy("pdf", ".svf"); final File pdfFile = FileUtils.createTempFileLegacy("pdf", ".pdf"); diff --git a/src/net/sourceforge/plantuml/abel/EntityGender.java b/src/net/sourceforge/plantuml/abel/EntityGender.java index 52fbfcf2f..fcfd43f2a 100644 --- a/src/net/sourceforge/plantuml/abel/EntityGender.java +++ b/src/net/sourceforge/plantuml/abel/EntityGender.java @@ -37,4 +37,6 @@ package net.sourceforge.plantuml.abel; public interface EntityGender { public boolean contains(Entity test); + + public String getGender(); } diff --git a/src/net/sourceforge/plantuml/abel/EntityGenderUtils.java b/src/net/sourceforge/plantuml/abel/EntityGenderUtils.java index cea3074a3..4561c98f3 100644 --- a/src/net/sourceforge/plantuml/abel/EntityGenderUtils.java +++ b/src/net/sourceforge/plantuml/abel/EntityGenderUtils.java @@ -44,6 +44,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return test.getLeafType() == type; } + + @Override + public String getGender() { + return type.name(); + } }; } @@ -52,6 +57,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return test.getUid().equals(entity.getUid()); } + + @Override + public String getGender() { + return entity.getUid(); + } }; } @@ -61,7 +71,19 @@ public class EntityGenderUtils { if (test.getStereotype() == null) { return false; } - return stereotype.equals(test.getStereotype().getLabel(Guillemet.DOUBLE_COMPARATOR)); + + for (String label : test.getStereotype().getLabels(Guillemet.DOUBLE_COMPARATOR)) { + if (label.equals(stereotype)) { + return true; + } + } + + return false; + } + + @Override + public String getGender() { + return stereotype; } }; } @@ -80,6 +102,11 @@ public class EntityGenderUtils { } return false; } + + @Override + public String getGender() { + return null; + } }; } @@ -88,6 +115,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return g1.contains(test) && g2.contains(test); } + + @Override + public String getGender() { + return null; + } }; } @@ -96,6 +128,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return true; } + + @Override + public String getGender() { + return null; + } }; } @@ -104,6 +141,11 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return test.getBodier().getMethodsToDisplay().size() == 0; } + + @Override + public String getGender() { + return null; + } }; } @@ -112,7 +154,26 @@ public class EntityGenderUtils { public boolean contains(Entity test) { return test.getBodier().getFieldsToDisplay().size() == 0; } + + @Override + public String getGender() { + return null; + } + }; } + static public EntityGender byClassName(String className) { + return new EntityGender() { + @Override + public boolean contains(Entity test) { + return className.equals(test.getName()); + } + + @Override + public String getGender() { + return className; + } + }; + } } diff --git a/src/net/sourceforge/plantuml/anim/AffineTransformation.java b/src/net/sourceforge/plantuml/anim/AffineTransformation.java deleted file mode 100644 index beda401ea..000000000 --- a/src/net/sourceforge/plantuml/anim/AffineTransformation.java +++ /dev/null @@ -1,157 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2024, Arnaud Roques - * - * Project Info: https://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * https://plantuml.com/patreon (only 1$ per month!) - * https://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.anim; - -import java.awt.geom.AffineTransform; -import java.util.Objects; -import java.util.StringTokenizer; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.klimt.geom.MinMax; -import net.sourceforge.plantuml.klimt.geom.XDimension2D; -import net.sourceforge.plantuml.klimt.geom.XPoint2D; - -public class AffineTransformation { - // ::remove folder when __HAXE__ - // ::remove folder when __CORE__ - - static private final Pattern rotate = Pattern.compile("rotate\\s+(-?\\d+\\.?\\d*)"); - static private final Pattern shear = Pattern.compile("shear\\s+(-?\\d+\\.?\\d*)\\s+(-?\\d+\\.?\\d*)"); - static private final Pattern translate = Pattern.compile("translate\\s+(-?\\d+\\.?\\d*)\\s+(-?\\d+\\.?\\d*)"); - static private final Pattern scale = Pattern.compile("scale\\s+(-?\\d+\\.?\\d*)\\s+(-?\\d+\\.?\\d*)"); - static private final Pattern color = Pattern.compile("color\\s+.*"); - - private final AffineTransform affineTransform; - private XDimension2D dimension; - - private AffineTransformation(AffineTransform affineTransform) { - this.affineTransform = Objects.requireNonNull(affineTransform); - } - - private AffineTransformation compose(AffineTransformation other) { - final AffineTransform tmp = new AffineTransform(this.affineTransform); - tmp.concatenate(other.affineTransform); - return new AffineTransformation(tmp); - } - - public static AffineTransformation from(AffineTransform affineTransform) { - return new AffineTransformation(affineTransform); - } - - static AffineTransformation create(String value) { - final StringTokenizer st = new StringTokenizer(value, "|"); - AffineTransformation result = null; - while (st.hasMoreTokens()) { - final String s = st.nextToken(); - final AffineTransformation tmp = createSimple(s); - if (tmp != null) { - if (result == null) { - result = tmp; - } else { - result = result.compose(tmp); - } - } - } - return result; - } - - private static AffineTransformation createSimple(String value) { - Matcher m = rotate.matcher(StringUtils.trin(value)); - if (m.find()) { - final double angle = Double.parseDouble(m.group(1)); - return new AffineTransformation(AffineTransform.getRotateInstance(angle * Math.PI / 180.0)); - } - m = shear.matcher(value); - if (m.find()) { - final double shx = Double.parseDouble(m.group(1)); - final double shy = Double.parseDouble(m.group(2)); - return new AffineTransformation(AffineTransform.getShearInstance(shx, shy)); - } - m = translate.matcher(value); - if (m.find()) { - final double tx = Double.parseDouble(m.group(1)); - final double ty = Double.parseDouble(m.group(2)); - return new AffineTransformation(AffineTransform.getTranslateInstance(tx, ty)); - } - m = scale.matcher(value); - if (m.find()) { - final double scalex = Double.parseDouble(m.group(1)); - final double scaley = Double.parseDouble(m.group(2)); - return new AffineTransformation(AffineTransform.getScaleInstance(scalex, scaley)); - } - m = color.matcher(value); - if (m.find()) { - return new AffineTransformation(new AffineTransform()); - } - return null; - } - - public final AffineTransform getAffineTransform() { - return getAffineTransform(dimension); - } - - private AffineTransform getAffineTransform(XDimension2D dimension) { - if (dimension == null) { - throw new IllegalStateException(); - } - final AffineTransform at = AffineTransform.getTranslateInstance(dimension.getWidth() / 2, - dimension.getHeight() / 2); - at.concatenate(affineTransform); - at.translate(-dimension.getWidth() / 2, -dimension.getHeight() / 2); - - return at; - } - - public void setDimension(XDimension2D dim) { - this.dimension = dim; - - } - - public MinMax getMinMax(XDimension2D rect) { - MinMax result = MinMax.getEmpty(false); - final AffineTransform tmp = getAffineTransform(rect); - - result = result.addPoint(new XPoint2D(0, 0).transform(tmp)); - result = result.addPoint(new XPoint2D(0, rect.getHeight()).transform(tmp)); - result = result.addPoint(new XPoint2D(rect.getWidth(), 0).transform(tmp)); - result = result.addPoint(new XPoint2D(rect.getWidth(), rect.getHeight()).transform(tmp)); - - return result; - } - -} diff --git a/src/net/sourceforge/plantuml/anim/Animation.java b/src/net/sourceforge/plantuml/anim/Animation.java deleted file mode 100644 index 77165f891..000000000 --- a/src/net/sourceforge/plantuml/anim/Animation.java +++ /dev/null @@ -1,99 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2024, Arnaud Roques - * - * Project Info: https://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * https://plantuml.com/patreon (only 1$ per month!) - * https://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.anim; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import net.sourceforge.plantuml.klimt.geom.MinMax; -import net.sourceforge.plantuml.klimt.geom.XDimension2D; - -public class Animation { - - private final List all; - - private Animation(List all) { - if (all.size() == 0) { - throw new IllegalArgumentException(); - } - this.all = all; - } - - public static Animation singleton(AffineTransformation affineTransformation) { - if (affineTransformation == null) { - return null; - } - return new Animation(Collections.singletonList(affineTransformation)); - } - - public static Animation create(List descriptions) { - final List all = new ArrayList<>(); - for (String s : descriptions) { - final AffineTransformation tmp = AffineTransformation.create(s); - if (tmp != null) { - all.add(tmp); - } - } - return new Animation(all); - } - - public Collection getAll() { - return Collections.unmodifiableCollection(all); - } - - public void setDimension(XDimension2D dim) { - for (AffineTransformation affineTransform : all) { - affineTransform.setDimension(dim); - } - - } - - public AffineTransformation getFirst() { - return all.get(0); - } - - public MinMax getMinMax(XDimension2D dim) { - MinMax result = MinMax.getEmpty(false); - for (AffineTransformation affineTransform : all) { - final MinMax m = affineTransform.getMinMax(dim); - result = result.addMinMax(m); - } - return result; - } - -} diff --git a/src/net/sourceforge/plantuml/anim/AnimationDecoder.java b/src/net/sourceforge/plantuml/anim/AnimationDecoder.java deleted file mode 100644 index 9328169e5..000000000 --- a/src/net/sourceforge/plantuml/anim/AnimationDecoder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2024, Arnaud Roques - * - * Project Info: https://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * https://plantuml.com/patreon (only 1$ per month!) - * https://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.anim; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.StringTokenizer; - -public class AnimationDecoder { - - private final List result = new ArrayList<>(); - - public AnimationDecoder(Iterable data) { - - for (final Iterator it = data.iterator(); it.hasNext();) { - String line = it.next().toString(); - if (line.matches("^\\s*\\[script\\]\\s*$")) { - final StringBuilder scriptText = new StringBuilder(); - while (true) { - line = it.next().toString(); - if (line.matches("^\\s*\\[/script\\]\\s*$")) { - final AnimationScript script = new AnimationScript(); - final String out = script.eval(scriptText.toString()); - for (final StringTokenizer st = new StringTokenizer(out, "\n"); st.hasMoreTokens();) { - result.add(st.nextToken()); - } - break; - } else { - scriptText.append(line); - scriptText.append("\n"); - } - } - } else { - result.add(line); - } - } - } - - public List decode() { - return Collections.unmodifiableList(result); - } - -} diff --git a/src/net/sourceforge/plantuml/anim/AnimationScript.java b/src/net/sourceforge/plantuml/anim/AnimationScript.java deleted file mode 100644 index 610120639..000000000 --- a/src/net/sourceforge/plantuml/anim/AnimationScript.java +++ /dev/null @@ -1,71 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2024, Arnaud Roques - * - * Project Info: https://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * https://plantuml.com/patreon (only 1$ per month!) - * https://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.anim; - -public class AnimationScript { - -// private final ScriptEngine engine; - - public AnimationScript() { - -// final ScriptEngineManager manager = new ScriptEngineManager(); -// engine = manager.getEngineByName("js"); - - // ScriptEngineManager manager = new ScriptEngineManager(); - // List factories = manager.getEngineFactories(); - // for (ScriptEngineFactory factory : factories) { - // System.out.println("Name : " + factory.getEngineName()); - // System.out.println("Version : " + factory.getEngineVersion()); - // System.out.println("Language name : " + factory.getLanguageName()); - // System.out.println("Language version : " + factory.getLanguageVersion()); - // System.out.println("Extensions : " + factory.getExtensions()); - // System.out.println("Mime types : " + factory.getMimeTypes()); - // System.out.println("Names : " + factory.getNames()); - // - // } - - } - - public String eval(String line) { - throw new UnsupportedOperationException(); -// final ScriptContext context = engine.getContext(); -// final StringWriter sw = new StringWriter(); -// context.setWriter(new PrintWriter(sw)); -// engine.eval(line, context); -// final String result = sw.toString(); -// return result; - } -} diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java index 6e9e22219..e31829dad 100644 --- a/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java +++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java @@ -190,30 +190,35 @@ public class CommandHideShowByGender extends SingleLineCommand2 { } else { arg1 = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg1); final Quark quark = diagram.quarkInContext(true, diagram.cleanId(arg1)); - Entity entity = quark.getData(); - if (entity == null) - return CommandExecutionResult.error("No such element " + quark.getName()); - gender = EntityGenderUtils.byEntityAlone(entity); - } - if (gender != null) { - final boolean empty = arg.get("EMPTY", 0) != null; - final boolean emptyMembers = empty && portion == EntityPortion.MEMBER; - if (empty == true && emptyMembers == false) - gender = EntityGenderUtils.and(gender, emptyByGender(portion)); - - if (diagram.getCurrentGroup().isRoot() == false) - gender = EntityGenderUtils.and(gender, EntityGenderUtils.byPackage(diagram.getCurrentGroup())); - - if (emptyMembers) { - diagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(EntityPortion.FIELD)), - EntityPortion.FIELD, arg.get("COMMAND", 0).equalsIgnoreCase("show")); - diagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(EntityPortion.METHOD)), - EntityPortion.METHOD, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + if (quark == null) { + return CommandExecutionResult.error("No such quark " + arg1); + } + if (portion == EntityPortion.METHOD) { + gender = EntityGenderUtils.byClassName(arg1); } else { - diagram.hideOrShow(gender, portion, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + Entity entity = quark.getData(); + if (entity == null) + return CommandExecutionResult.error("No such element " + quark.getName()); + gender = EntityGenderUtils.byEntityAlone(entity); } } - return CommandExecutionResult.ok(); + final boolean empty = arg.get("EMPTY", 0) != null; + final boolean emptyMembers = empty && portion == EntityPortion.MEMBER; + if (empty && !emptyMembers) + gender = EntityGenderUtils.and(gender, emptyByGender(portion)); + + if (!diagram.getCurrentGroup().isRoot()) + gender = EntityGenderUtils.and(gender, EntityGenderUtils.byPackage(diagram.getCurrentGroup())); + + if (emptyMembers) { + diagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(EntityPortion.FIELD)), + EntityPortion.FIELD, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + diagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(EntityPortion.METHOD)), + EntityPortion.METHOD, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + } else { + diagram.hideOrShow(gender, portion, arg.get("COMMAND", 0).equalsIgnoreCase("show")); + } + return CommandExecutionResult.ok(); } private EntityPortion getEntityPortion(String s) { diff --git a/src/net/sourceforge/plantuml/command/CommandAffineTransform.java b/src/net/sourceforge/plantuml/command/CommandAffineTransform.java deleted file mode 100644 index 210639cd8..000000000 --- a/src/net/sourceforge/plantuml/command/CommandAffineTransform.java +++ /dev/null @@ -1,71 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2024, Arnaud Roques - * - * Project Info: https://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * https://plantuml.com/patreon (only 1$ per month!) - * https://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.command; - -import java.util.Collections; - -import net.sourceforge.plantuml.UmlDiagram; -import net.sourceforge.plantuml.regex.IRegex; -import net.sourceforge.plantuml.regex.RegexConcat; -import net.sourceforge.plantuml.regex.RegexLeaf; -import net.sourceforge.plantuml.regex.RegexResult; -import net.sourceforge.plantuml.utils.LineLocation; - -public class CommandAffineTransform extends SingleLineCommand2 { - - public static final CommandAffineTransform ME = new CommandAffineTransform(); - - private CommandAffineTransform() { - super(getRegexConcat()); - } - - static IRegex getRegexConcat() { - return RegexConcat.build(CommandAffineTransform.class.getName(), RegexLeaf.start(), // - new RegexLeaf("!transformation"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("ANIMATION", "([^{}]*)"), RegexLeaf.end()); // - } - - @Override - protected CommandExecutionResult executeArg(UmlDiagram diagram, LineLocation location, RegexResult arg) { - final CharSequence value = arg.get("ANIMATION", 0); - // ::comment when __CORE__ - diagram.setAnimation(Collections.singletonList(value)); - // ::done - return CommandExecutionResult.ok(); - } - -} diff --git a/src/net/sourceforge/plantuml/command/CommandAffineTransformMultiline.java b/src/net/sourceforge/plantuml/command/CommandAffineTransformMultiline.java deleted file mode 100644 index 5b3aa6744..000000000 --- a/src/net/sourceforge/plantuml/command/CommandAffineTransformMultiline.java +++ /dev/null @@ -1,60 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2024, Arnaud Roques - * - * Project Info: https://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * https://plantuml.com/patreon (only 1$ per month!) - * https://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.command; - -import net.sourceforge.plantuml.TitledDiagram; -import net.sourceforge.plantuml.utils.BlocLines; - -public class CommandAffineTransformMultiline extends CommandMultilines { - - public static final CommandAffineTransformMultiline ME = new CommandAffineTransformMultiline(); - - private CommandAffineTransformMultiline() { - super("^!transformation[%s]+\\{[%s]*$"); - } - - @Override - public String getPatternEnd() { - return "^[%s]*!\\}[%s]*$"; - } - - public CommandExecutionResult execute(final TitledDiagram diagram, BlocLines lines) { - // lines = lines.subExtract(1, 1); - // diagram.setAnimation(lines); - return CommandExecutionResult.error("Not yet implemented"); - } - -} diff --git a/src/net/sourceforge/plantuml/command/CommonCommands.java b/src/net/sourceforge/plantuml/command/CommonCommands.java index 707dd49b3..0f569dea3 100644 --- a/src/net/sourceforge/plantuml/command/CommonCommands.java +++ b/src/net/sourceforge/plantuml/command/CommonCommands.java @@ -73,8 +73,6 @@ public final class CommonCommands { cmds.add(CommandScaleMaxWidth.ME); cmds.add(CommandScaleMaxHeight.ME); cmds.add(CommandScaleMaxWidthAndHeight.ME); - cmds.add(CommandAffineTransform.ME); - cmds.add(CommandAffineTransformMultiline.ME); final CommandFactorySprite factorySpriteCommand = new CommandFactorySprite(); cmds.add(factorySpriteCommand.createMultiLine(false)); cmds.add(factorySpriteCommand.createSingleLine()); diff --git a/src/net/sourceforge/plantuml/core/DiagramType.java b/src/net/sourceforge/plantuml/core/DiagramType.java index 2b0e4a4e7..7a045e588 100644 --- a/src/net/sourceforge/plantuml/core/DiagramType.java +++ b/src/net/sourceforge/plantuml/core/DiagramType.java @@ -39,7 +39,7 @@ import net.sourceforge.plantuml.utils.StartUtils; public enum DiagramType { // ::remove folder when __HAXE__ - UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, JUNGLE, CUTE, MATH, LATEX, DEFINITION, GANTT, NW, + UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, MATH, LATEX, DEFINITION, GANTT, NW, MINDMAP, WBS, WIRE, JSON, GIT, BOARD, YAML, HCL, EBNF, REGEX, FILES, UNKNOWN; static public DiagramType getTypeFromArobaseStart(String s) { @@ -59,11 +59,15 @@ public enum DiagramType { if (StartUtils.startsWithSymbolAnd("startdot", s)) return DOT; + // ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or __LGPL__ if (StartUtils.startsWithSymbolAnd("startjcckit", s)) return JCCKIT; + // ::done + // ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ if (StartUtils.startsWithSymbolAnd("startditaa", s)) return DITAA; + // ::done if (StartUtils.startsWithSymbolAnd("startproject", s)) return PROJECT; @@ -77,12 +81,6 @@ public enum DiagramType { if (StartUtils.startsWithSymbolAnd("startcreole", s)) return CREOLE; - if (StartUtils.startsWithSymbolAnd("starttree", s)) - return JUNGLE; - - if (StartUtils.startsWithSymbolAnd("startcute", s)) - return CUTE; - if (StartUtils.startsWithSymbolAnd("startmath", s)) return MATH; diff --git a/src/net/sourceforge/plantuml/core/UmlSource.java b/src/net/sourceforge/plantuml/core/UmlSource.java index bda5c52e2..97b5ccc7b 100755 --- a/src/net/sourceforge/plantuml/core/UmlSource.java +++ b/src/net/sourceforge/plantuml/core/UmlSource.java @@ -45,7 +45,6 @@ import net.sourceforge.plantuml.klimt.creole.Display; import net.sourceforge.plantuml.regex.Matcher2; import net.sourceforge.plantuml.regex.MyPattern; import net.sourceforge.plantuml.regex.Pattern2; -import net.sourceforge.plantuml.text.BackSlash; import net.sourceforge.plantuml.text.StringLocated; import net.sourceforge.plantuml.utils.LineLocation; import net.sourceforge.plantuml.utils.StartUtils; diff --git a/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java b/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java index c3d2a375e..0cb7cb926 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java +++ b/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java @@ -38,7 +38,11 @@ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.abel.Entity; import net.sourceforge.plantuml.abel.EntityPortion; +import java.util.List; + public interface PortionShower { boolean showPortion(EntityPortion portion, Entity entity); + + List getVisibleStereotypeLabels(Entity entity); } diff --git a/src/net/sourceforge/plantuml/dot/DotData.java b/src/net/sourceforge/plantuml/dot/DotData.java index 5b35c7ad0..95a30aaab 100644 --- a/src/net/sourceforge/plantuml/dot/DotData.java +++ b/src/net/sourceforge/plantuml/dot/DotData.java @@ -37,6 +37,7 @@ package net.sourceforge.plantuml.dot; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -101,6 +102,11 @@ final public class DotData implements PortionShower { public boolean showPortion(EntityPortion portion, Entity entity) { return true; } + + public List getVisibleStereotypeLabels(Entity entity) { + return Collections.emptyList(); + } + }, entityFactory, isHideEmptyDescriptionForState, dotMode, namespaceSeparator, pragma); } @@ -136,6 +142,10 @@ final public class DotData implements PortionShower { return portionShower.showPortion(portion, entity); } + public List getVisibleStereotypeLabels(Entity entity) { + return portionShower.getVisibleStereotypeLabels(entity); + } + public Entity getRootGroup() { return entityFactory.getRootGroup(); } diff --git a/src/net/sourceforge/plantuml/dot/GraphvizLinux.java b/src/net/sourceforge/plantuml/dot/GraphvizLinux.java index a1db5a1bd..c3282131d 100644 --- a/src/net/sourceforge/plantuml/dot/GraphvizLinux.java +++ b/src/net/sourceforge/plantuml/dot/GraphvizLinux.java @@ -48,10 +48,10 @@ class GraphvizLinux extends AbstractGraphviz { @Override protected File specificDotExe() { - final File all[] = new File[] { new File("/usr/local/bin/dot"), new File("/usr/bin/dot"), - new File("/opt/homebrew/bin/dot") }; + final File all[] = new File[] { new File("/usr/local/bin/dot"), new File("/opt/homebrew/bin/dot"), + new File("/opt/homebrew/opt/graphviz/bin/dot"), new File("/usr/bin/dot") }; for (File f : all) - if (f.exists()) + if (f.exists() && f.canRead() && f.canExecute()) return f; return new File("/opt/local/bin/dot"); } diff --git a/src/net/sourceforge/plantuml/logo/PSystemLogoFactory.java b/src/net/sourceforge/plantuml/error/PSystemUnsupported.java similarity index 51% rename from src/net/sourceforge/plantuml/logo/PSystemLogoFactory.java rename to src/net/sourceforge/plantuml/error/PSystemUnsupported.java index 68ced376c..a75a587ac 100644 --- a/src/net/sourceforge/plantuml/logo/PSystemLogoFactory.java +++ b/src/net/sourceforge/plantuml/error/PSystemUnsupported.java @@ -5,12 +5,12 @@ * (C) Copyright 2009-2024, Arnaud Roques * * Project Info: https://plantuml.com - * + * * If you like this project or if you find it useful, you can support us at: - * + * * https://plantuml.com/patreon (only 1$ per month!) * https://plantuml.com/paypal - * + * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it @@ -30,31 +30,47 @@ * * * Original Author: Arnaud Roques - * + * * */ -package net.sourceforge.plantuml.logo; +package net.sourceforge.plantuml.error; -import net.sourceforge.plantuml.command.PSystemBasicFactory; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import net.sourceforge.plantuml.FileFormatOption; +import net.sourceforge.plantuml.PlainDiagram; +import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.UmlSource; +import net.sourceforge.plantuml.klimt.shape.GraphicStrings; +import net.sourceforge.plantuml.klimt.shape.TextBlock; +import net.sourceforge.plantuml.klimt.shape.UDrawable; +import net.sourceforge.plantuml.version.License; +import net.sourceforge.plantuml.version.Version; -public class PSystemLogoFactory extends PSystemBasicFactory { +public class PSystemUnsupported extends PlainDiagram { - @Override - public PSystemLogo initDiagram(UmlSource source, String startLine) { - return null; + private final List strings = new ArrayList<>(); + + public PSystemUnsupported(UmlSource source) { + super(source); + strings.add("Diagram not supported by this release of PlantUML"); + strings.add(Version.fullDescription()); + strings.add("License " + new License().toString()); } @Override - public PSystemLogo executeLine(UmlSource source, PSystemLogo system, String line) { - if (system == null && line.equalsIgnoreCase("logo")) { - return new PSystemLogo(source); - } - if (system == null) { - return null; - } - system.doCommandLine(line); - return system; + protected UDrawable getRootDrawable(FileFormatOption fileFormatOption) throws IOException { + return getGraphicStrings(); + } + + public TextBlock getGraphicStrings() { + return GraphicStrings.createBlackOnWhite(strings); + } + + public DiagramDescription getDescription() { + return new DiagramDescription("(Unsupported)"); } } diff --git a/src/net/sourceforge/plantuml/jasic/Jasic.java b/src/net/sourceforge/plantuml/jasic/Jasic.java deleted file mode 100644 index 3bc1b359d..000000000 --- a/src/net/sourceforge/plantuml/jasic/Jasic.java +++ /dev/null @@ -1,829 +0,0 @@ -package net.sourceforge.plantuml.jasic; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/* - Jasic uses the MIT License: - - Copyright (c) 2010 Robert Nystrom - - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the "Software"), to deal in - the Software without restriction, including without limitation the rights to - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - the Software, and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -/* - * This defines a single class that contains an entire interpreter for a language very similar to the original BASIC. - * Everything is here (albeit in very simplified form): tokenizing, parsing, and interpretation. The file is organized - * in phases, with each appearing roughly in the order that they occur when a program is run. You should be able to read - * this top-down to walk through the entire process of loading and running a program. - * - * Jasic language syntax --------------------- - * - * Comments start with ' and proceed to the end of the line: - * - * print "hi there" ' this is a comment - * - * Numbers and strings are supported. Strings should be in "double quotes", and only positive integers can be parsed - * (though numbers are double internally). - * - * Variables are identified by name which must start with a letter and can contain letters or numbers. Case is - * significant for names and keywords. - * - * Each statement is on its own line. Optionally, a line may have a label before the statement. A label is a name that - * ends with a colon: - * - * foo: - * - * - * The following statements are supported: - * - * = Evaluates the expression and assigns the result to the given named variable. All variables are - * globally scoped. - * - * pi = (314159 / 10000) - * - * print Evaluates the expression and prints the result. - * - * print "hello, " + "world" - * - * input Reads in a line of input from the user and stores it in the variable with the given name. - * - * input guess - * - * goto