mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 19:44:21 +00:00
🧹 Fix some thingies
This commit is contained in:
parent
5ae52afed2
commit
3713b3d009
38 changed files with 383 additions and 247 deletions
325
package-lock.json
generated
325
package-lock.json
generated
|
@ -1,33 +1,34 @@
|
|||
{
|
||||
"name": "bluelib",
|
||||
"version": "1.1.1",
|
||||
"version": "2.1.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bluelib",
|
||||
"version": "1.1.1",
|
||||
"version": "2.1.1",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@babel/preset-react": "^7.12.10",
|
||||
"@matejmazur/react-katex": "^3.1.3",
|
||||
"@reach/router": "^1.3.4",
|
||||
"classnames": "^2.2.6",
|
||||
"color": "^3.1.3",
|
||||
"katex": "^0.12.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "16.x",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-router": "^5.2.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"react-syntax-highlighter": "^15.4.3",
|
||||
"strip-indent": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nwb": "0.25.x",
|
||||
"react-styleguidist": "^11.1.5"
|
||||
"react-styleguidist": "^11.1.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "16.x"
|
||||
"react": "^17.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/cli": {
|
||||
|
@ -1456,17 +1457,6 @@
|
|||
"integrity": "sha512-cPqjjzuFWNK3BSKLm0abspP0sp/IGOli4p5I5fKFAzdS8fvjdOwDCfZqAaIiXd9lPkOWi3SUUfZof3hEb7J/uw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@reach/router": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@reach/router/-/router-1.3.4.tgz",
|
||||
"integrity": "sha512-+mtn9wjlB9NN2CNnnC/BRYtwdKBfSyyasPYraNAyvaV1occr/5NnB4CVzjEZipNHwYebQwcndGUmpFzxAUoqSA==",
|
||||
"dependencies": {
|
||||
"create-react-context": "0.3.0",
|
||||
"invariant": "^2.2.3",
|
||||
"prop-types": "^15.6.1",
|
||||
"react-lifecycles-compat": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@tippyjs/react": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@tippyjs/react/-/react-4.1.0.tgz",
|
||||
|
@ -4042,15 +4032,6 @@
|
|||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/create-react-context": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.3.0.tgz",
|
||||
"integrity": "sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==",
|
||||
"dependencies": {
|
||||
"gud": "^1.0.0",
|
||||
"warning": "^4.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz",
|
||||
|
@ -6510,11 +6491,6 @@
|
|||
"node": ">=4.x"
|
||||
}
|
||||
},
|
||||
"node_modules/gud": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz",
|
||||
"integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw=="
|
||||
},
|
||||
"node_modules/gzip-size": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz",
|
||||
|
@ -6758,6 +6734,19 @@
|
|||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/history": {
|
||||
"version": "4.10.1",
|
||||
"resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz",
|
||||
"integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"loose-envify": "^1.2.0",
|
||||
"resolve-pathname": "^3.0.0",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0",
|
||||
"value-equal": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
|
@ -6769,6 +6758,14 @@
|
|||
"minimalistic-crypto-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/hoist-non-react-statics": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
|
||||
"integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
|
||||
"dependencies": {
|
||||
"react-is": "^16.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/hpack.js": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
|
||||
|
@ -7298,6 +7295,7 @@
|
|||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
|
||||
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
|
@ -9143,6 +9141,19 @@
|
|||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/mini-create-react-context": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz",
|
||||
"integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.1",
|
||||
"tiny-warning": "^1.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.0.0",
|
||||
"react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mini-css-extract-plugin": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz",
|
||||
|
@ -12211,14 +12222,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "16.14.0",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz",
|
||||
"integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==",
|
||||
"version": "17.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
|
||||
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"prop-types": "^15.6.2"
|
||||
"object-assign": "^4.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
@ -12599,11 +12609,6 @@
|
|||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||
},
|
||||
"node_modules/react-lifecycles-compat": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
|
||||
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
|
||||
},
|
||||
"node_modules/react-refresh": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.2.tgz",
|
||||
|
@ -12613,6 +12618,56 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz",
|
||||
"integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"history": "^4.9.0",
|
||||
"hoist-non-react-statics": "^3.1.0",
|
||||
"loose-envify": "^1.3.1",
|
||||
"mini-create-react-context": "^0.4.0",
|
||||
"path-to-regexp": "^1.7.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"react-is": "^16.6.0",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=15"
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz",
|
||||
"integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"history": "^4.9.0",
|
||||
"loose-envify": "^1.3.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"react-router": "5.2.0",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=15"
|
||||
}
|
||||
},
|
||||
"node_modules/react-router/node_modules/isarray": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
|
||||
},
|
||||
"node_modules/react-router/node_modules/path-to-regexp": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
|
||||
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
|
||||
"dependencies": {
|
||||
"isarray": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-simple-code-editor": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/react-simple-code-editor/-/react-simple-code-editor-0.10.0.tgz",
|
||||
|
@ -12620,9 +12675,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/react-styleguidist": {
|
||||
"version": "11.1.5",
|
||||
"resolved": "https://registry.npmjs.org/react-styleguidist/-/react-styleguidist-11.1.5.tgz",
|
||||
"integrity": "sha512-19svre3SvBfhiVWuZoKHUmiodW5IZcXSr1JgalGgWrOy0JXOQOR3d3iFH7WMKzUWqi2JK4CJ17LTGqpjCXQb5w==",
|
||||
"version": "11.1.6",
|
||||
"resolved": "https://registry.npmjs.org/react-styleguidist/-/react-styleguidist-11.1.6.tgz",
|
||||
"integrity": "sha512-ZO4tS8/cPwpabz5S3kZ6hRFcvdgsJwWnus6MC23BiNXCpTvoiRlnF8C90gry63acgVqeaZZb35+P/MZ4AVRdUg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@tippyjs/react": "4.1.0",
|
||||
|
@ -12694,6 +12749,14 @@
|
|||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/styleguidist"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=16.8",
|
||||
"react-dom": ">=16.8"
|
||||
}
|
||||
},
|
||||
"node_modules/react-styleguidist/node_modules/commander": {
|
||||
|
@ -13332,6 +13395,11 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve-pathname": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz",
|
||||
"integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng=="
|
||||
},
|
||||
"node_modules/resolve-url": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
|
||||
|
@ -14969,11 +15037,15 @@
|
|||
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/tiny-invariant": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.1.0.tgz",
|
||||
"integrity": "sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw=="
|
||||
},
|
||||
"node_modules/tiny-warning": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
|
||||
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
|
||||
},
|
||||
"node_modules/tippy.js": {
|
||||
"version": "6.2.7",
|
||||
|
@ -15586,6 +15658,11 @@
|
|||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/value-equal": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz",
|
||||
"integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw=="
|
||||
},
|
||||
"node_modules/vary": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||
|
@ -15661,14 +15738,6 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/warning": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
|
||||
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/watchpack": {
|
||||
"version": "1.7.5",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz",
|
||||
|
@ -18161,17 +18230,6 @@
|
|||
"integrity": "sha512-cPqjjzuFWNK3BSKLm0abspP0sp/IGOli4p5I5fKFAzdS8fvjdOwDCfZqAaIiXd9lPkOWi3SUUfZof3hEb7J/uw==",
|
||||
"dev": true
|
||||
},
|
||||
"@reach/router": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@reach/router/-/router-1.3.4.tgz",
|
||||
"integrity": "sha512-+mtn9wjlB9NN2CNnnC/BRYtwdKBfSyyasPYraNAyvaV1occr/5NnB4CVzjEZipNHwYebQwcndGUmpFzxAUoqSA==",
|
||||
"requires": {
|
||||
"create-react-context": "0.3.0",
|
||||
"invariant": "^2.2.3",
|
||||
"prop-types": "^15.6.1",
|
||||
"react-lifecycles-compat": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"@tippyjs/react": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@tippyjs/react/-/react-4.1.0.tgz",
|
||||
|
@ -20446,15 +20504,6 @@
|
|||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"create-react-context": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.3.0.tgz",
|
||||
"integrity": "sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==",
|
||||
"requires": {
|
||||
"gud": "^1.0.0",
|
||||
"warning": "^4.0.3"
|
||||
}
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz",
|
||||
|
@ -22546,11 +22595,6 @@
|
|||
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
|
||||
"dev": true
|
||||
},
|
||||
"gud": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz",
|
||||
"integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw=="
|
||||
},
|
||||
"gzip-size": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz",
|
||||
|
@ -22755,6 +22799,19 @@
|
|||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.5.0.tgz",
|
||||
"integrity": "sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw=="
|
||||
},
|
||||
"history": {
|
||||
"version": "4.10.1",
|
||||
"resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz",
|
||||
"integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"loose-envify": "^1.2.0",
|
||||
"resolve-pathname": "^3.0.0",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0",
|
||||
"value-equal": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
|
@ -22766,6 +22823,14 @@
|
|||
"minimalistic-crypto-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"hoist-non-react-statics": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
|
||||
"integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
|
||||
"requires": {
|
||||
"react-is": "^16.7.0"
|
||||
}
|
||||
},
|
||||
"hpack.js": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
|
||||
|
@ -23212,6 +23277,7 @@
|
|||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
|
||||
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
|
@ -24725,6 +24791,15 @@
|
|||
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
|
||||
"integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg=="
|
||||
},
|
||||
"mini-create-react-context": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz",
|
||||
"integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.12.1",
|
||||
"tiny-warning": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"mini-css-extract-plugin": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz",
|
||||
|
@ -27343,14 +27418,13 @@
|
|||
}
|
||||
},
|
||||
"react": {
|
||||
"version": "16.14.0",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz",
|
||||
"integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==",
|
||||
"version": "17.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
|
||||
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"prop-types": "^15.6.2"
|
||||
"object-assign": "^4.1.1"
|
||||
}
|
||||
},
|
||||
"react-dev-utils": {
|
||||
|
@ -27652,17 +27726,58 @@
|
|||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||
},
|
||||
"react-lifecycles-compat": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
|
||||
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
|
||||
},
|
||||
"react-refresh": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.2.tgz",
|
||||
"integrity": "sha512-n8GXxo3DwM2KtFEL69DAVhGc4A1THn2qjmfvSo3nze0NLCoPbywazeJPqdp0RdSGLmyhQzeyA+XPXOobbYlkzg==",
|
||||
"dev": true
|
||||
},
|
||||
"react-router": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz",
|
||||
"integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"history": "^4.9.0",
|
||||
"hoist-non-react-statics": "^3.1.0",
|
||||
"loose-envify": "^1.3.1",
|
||||
"mini-create-react-context": "^0.4.0",
|
||||
"path-to-regexp": "^1.7.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"react-is": "^16.6.0",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"isarray": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
|
||||
},
|
||||
"path-to-regexp": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
|
||||
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
|
||||
"requires": {
|
||||
"isarray": "0.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-router-dom": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz",
|
||||
"integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"history": "^4.9.0",
|
||||
"loose-envify": "^1.3.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"react-router": "5.2.0",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"react-simple-code-editor": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/react-simple-code-editor/-/react-simple-code-editor-0.10.0.tgz",
|
||||
|
@ -27670,9 +27785,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"react-styleguidist": {
|
||||
"version": "11.1.5",
|
||||
"resolved": "https://registry.npmjs.org/react-styleguidist/-/react-styleguidist-11.1.5.tgz",
|
||||
"integrity": "sha512-19svre3SvBfhiVWuZoKHUmiodW5IZcXSr1JgalGgWrOy0JXOQOR3d3iFH7WMKzUWqi2JK4CJ17LTGqpjCXQb5w==",
|
||||
"version": "11.1.6",
|
||||
"resolved": "https://registry.npmjs.org/react-styleguidist/-/react-styleguidist-11.1.6.tgz",
|
||||
"integrity": "sha512-ZO4tS8/cPwpabz5S3kZ6hRFcvdgsJwWnus6MC23BiNXCpTvoiRlnF8C90gry63acgVqeaZZb35+P/MZ4AVRdUg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tippyjs/react": "4.1.0",
|
||||
|
@ -28273,6 +28388,11 @@
|
|||
"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
|
||||
"dev": true
|
||||
},
|
||||
"resolve-pathname": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz",
|
||||
"integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng=="
|
||||
},
|
||||
"resolve-url": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
|
||||
|
@ -29694,11 +29814,15 @@
|
|||
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==",
|
||||
"optional": true
|
||||
},
|
||||
"tiny-invariant": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.1.0.tgz",
|
||||
"integrity": "sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw=="
|
||||
},
|
||||
"tiny-warning": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
|
||||
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
|
||||
},
|
||||
"tippy.js": {
|
||||
"version": "6.2.7",
|
||||
|
@ -30217,6 +30341,11 @@
|
|||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||
"dev": true
|
||||
},
|
||||
"value-equal": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz",
|
||||
"integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw=="
|
||||
},
|
||||
"vary": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||
|
@ -30282,14 +30411,6 @@
|
|||
"integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=",
|
||||
"dev": true
|
||||
},
|
||||
"warning": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
|
||||
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
|
||||
"requires": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"watchpack": {
|
||||
"version": "1.7.5",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz",
|
||||
|
|
|
@ -20,22 +20,23 @@
|
|||
"@babel/preset-env": "^7.12.11",
|
||||
"@babel/preset-react": "^7.12.10",
|
||||
"@matejmazur/react-katex": "^3.1.3",
|
||||
"@reach/router": "^1.3.4",
|
||||
"classnames": "^2.2.6",
|
||||
"color": "^3.1.3",
|
||||
"katex": "^0.12.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "16.x",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-router": "^5.2.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"react-syntax-highlighter": "^15.4.3",
|
||||
"strip-indent": "^3.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "16.x"
|
||||
"react": "^17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nwb": "0.25.x",
|
||||
"react-styleguidist": "^11.1.5"
|
||||
"react-styleguidist": "^11.1.6"
|
||||
},
|
||||
"author": "Stefano Pigozzi <me@steffo.eu>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
|
||||
|
||||
export default function Align({children, className, value, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Anchor({children, className, href, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Aside({children, className, ...props}) {
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import { Link, useMatch } from "@reach/router"
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
import {Link, useRouteMatch} from "react-router-dom"
|
||||
|
||||
|
||||
export default function BaseLink({children, className, href, disabled, ...props}) {
|
||||
const locationMatch = useMatch(href);
|
||||
const locationMatch = useRouteMatch(href)
|
||||
|
||||
const activeClassNames = useBluelibClassNames("style-bold", className)
|
||||
const disabledClassNames = useBluelibClassNames("element-anchor status-disabled", className)
|
||||
const enabledClassNames = useBluelibClassNames("element-anchor", className)
|
||||
|
||||
const activeClassNames = useBluelibClassNames("style-bold", className);
|
||||
if (locationMatch) {
|
||||
return (
|
||||
<span className={activeClassNames} {...props}>
|
||||
|
@ -16,7 +19,6 @@ export default function BaseLink({children, className, href, disabled, ...props}
|
|||
)
|
||||
}
|
||||
|
||||
const disabledClassNames = useBluelibClassNames("element-anchor status-disabled", className);
|
||||
if (disabled) {
|
||||
return (
|
||||
<span className={disabledClassNames} {...props}>
|
||||
|
@ -25,7 +27,6 @@ export default function BaseLink({children, className, href, disabled, ...props}
|
|||
)
|
||||
}
|
||||
|
||||
const enabledClassNames = useBluelibClassNames("element-anchor", className)
|
||||
return (
|
||||
<Link to={href} className={enabledClassNames} {...props}>
|
||||
{children}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Blockquote({children, className, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function BluelibContainer({children, className}) {
|
||||
|
|
|
@ -3,4 +3,5 @@ A provider for the `ContextBluelibSkin` context.
|
|||
A skin can be selected by passing either a CSS module or a string to the `skin` prop.
|
||||
|
||||
Valid strings are:
|
||||
|
||||
- `"rygblue"`
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import React from "react";
|
||||
import React from "react"
|
||||
|
||||
import skinRygblue from "../../../bluelib/src/targets/rygblue.module.css";
|
||||
import ContextBluelibSkin from "../../../contexts/ContextBluelibSkin";
|
||||
import isString from "../../../utils/isString";
|
||||
import PropTypes from "prop-types";
|
||||
import skinRygblue from "../../../bluelib/src/targets/rygblue.module.css"
|
||||
import ContextBluelibSkin from "../../../contexts/ContextBluelibSkin"
|
||||
import isString from "../../../utils/isString"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
const builtinSkins = {
|
||||
|
|
|
@ -6,6 +6,7 @@ The main component for Bluelib, composed by a [`<BluelibContainer>`](#bluelibcon
|
|||
A skin can be selected by passing either a CSS module or a string to the `skin` prop.
|
||||
|
||||
Valid strings are:
|
||||
|
||||
- `"rygblue"`
|
||||
|
||||
```jsx
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import BluelibProvider from "./BluelibProvider";
|
||||
import BluelibContainer from "./BluelibContainer";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import BluelibProvider from "./BluelibProvider"
|
||||
import BluelibContainer from "./BluelibContainer"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Bluelib({className, children, skin}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Bold({children, className, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Box({children, className, ...props}) {
|
||||
|
|
|
@ -5,7 +5,16 @@ import classNames from "classnames"
|
|||
|
||||
export default function Button({children, className, disabled, ...props}) {
|
||||
return (
|
||||
<button className={useBluelibClassNames(classNames("button", disabled ? "status-disabled" : "status-clickable"), className)} {...props}>
|
||||
<button
|
||||
className={useBluelibClassNames(
|
||||
classNames(
|
||||
"button",
|
||||
disabled ? "status-disabled" : "status-clickable"
|
||||
),
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import React, {useContext} from "react";
|
||||
import SyntaxHighlighter from "react-syntax-highlighter";
|
||||
import ContextCodeLanguage from "../../contexts/ContextCodeLanguage";
|
||||
import ContextCodeSkin from "../../contexts/ContextCodeSkin";
|
||||
import stripIndent from "strip-indent";
|
||||
import React, {useContext} from "react"
|
||||
import SyntaxHighlighter from "react-syntax-highlighter"
|
||||
import ContextCodeLanguage from "../../contexts/ContextCodeLanguage"
|
||||
import ContextCodeSkin from "../../contexts/ContextCodeSkin"
|
||||
import stripIndent from "strip-indent"
|
||||
|
||||
|
||||
export default function Code({children, style, language, skin, ...props}) {
|
||||
let ctxLanguage = useContext(ContextCodeLanguage);
|
||||
let ctxSkin = useContext(ContextCodeSkin);
|
||||
let ctxLanguage = useContext(ContextCodeLanguage)
|
||||
let ctxSkin = useContext(ContextCodeSkin)
|
||||
|
||||
return (
|
||||
<SyntaxHighlighter
|
||||
|
|
|
@ -3,6 +3,7 @@ Change the **bluelib color** of the contained elements.
|
|||
The color can chosen through either the `builtin` prop or the `custom` prop.
|
||||
|
||||
By using the `builtin` prop, the color will automatically adapt itself to the theme. Possible builtin colors are:
|
||||
|
||||
- `"red"`
|
||||
- `"orange"`
|
||||
- `"yellow"`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, {Fragment} from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
import classNames from "classnames"
|
||||
import color from "color"
|
||||
|
||||
|
@ -12,15 +12,15 @@ export default function Color({children, builtin, custom}) {
|
|||
throw new Error("<Color> tags may only have one prop between `builtin` and `custom`.")
|
||||
}
|
||||
|
||||
let extraClassName = "";
|
||||
let extraStyle = {};
|
||||
let extraClassName = ""
|
||||
let extraStyle = {}
|
||||
|
||||
if (builtin !== undefined) {
|
||||
extraClassName = potentialClassName
|
||||
|
||||
}
|
||||
if (custom !== undefined) {
|
||||
let c = color(custom);
|
||||
let c = color(custom)
|
||||
extraStyle["--bluelib-color-r"] = c.red()
|
||||
extraStyle["--bluelib-color-g"] = c.green()
|
||||
extraStyle["--bluelib-color-b"] = c.blue()
|
||||
|
@ -28,7 +28,7 @@ export default function Color({children, builtin, custom}) {
|
|||
|
||||
children = React.Children.map(children, child => {
|
||||
if (!child.props) {
|
||||
return child;
|
||||
return child
|
||||
}
|
||||
return React.cloneElement(child, {
|
||||
className: classNames(child.props.className, extraClassName),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Help({children, className, text, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Italic({children, className, ...props}) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import "katex/dist/katex.css";
|
||||
import TeX from '@matejmazur/react-katex';
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import "katex/dist/katex.css"
|
||||
import TeX from '@matejmazur/react-katex'
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function LatexMath({children, block, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function ListItem({children, className, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Main({children, className, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Paragraph({children, className, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Separator({className, ...props}) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
Change the **size** of the contained text.
|
||||
|
||||
The size can be configured with the `value` prop:
|
||||
|
||||
- `xxl`
|
||||
- `xl`
|
||||
- `l`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Size({children, className, value, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Split({children, className, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Spoiler({children, className, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Strike({children, className, ...props}) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
Format the text like a **title**, changing its font and centering it.
|
||||
|
||||
The size can be configured with the `size` prop:
|
||||
|
||||
- `xxl`
|
||||
- `xl` (equivalent to `<h1>` and `<h2>`)
|
||||
- `l` (equivalent to `<h3>`)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Title({children, className, size, ...props}) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import useBluelibClassNames from "../../hooks/useBluelibClassNames"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
export default function Underline({children, className, ...props}) {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import React from "react";
|
||||
import VisualLog from "../VisualLog";
|
||||
import React from "react"
|
||||
import VisualLog from "../VisualLog"
|
||||
|
||||
|
||||
export default class VisualErrorBoundary extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {"error": null, "errorInfo": null};
|
||||
super(props)
|
||||
this.state = {"error": null, "errorInfo": null}
|
||||
}
|
||||
|
||||
componentDidCatch(error, errorInfo) {
|
||||
this.setState({"error": error, "errorInfo": errorInfo});
|
||||
this.setState({"error": error, "errorInfo": errorInfo})
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -17,9 +17,8 @@ export default class VisualErrorBoundary extends React.Component {
|
|||
return (
|
||||
<VisualLog level={"error"}>{this.state.error.toString()}</VisualLog>
|
||||
)
|
||||
}
|
||||
else {
|
||||
return this.props.children;
|
||||
} else {
|
||||
return this.props.children
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import Color from "../Color";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react"
|
||||
import Color from "../Color"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
|
||||
const COLORS = {
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
export {default as Align} from "./Align";
|
||||
export {default as Anchor} from "./Anchor";
|
||||
export {default as Aside} from "./Aside";
|
||||
export {default as Blockquote} from "./Blockquote";
|
||||
export {default as Bluelib} from "./Bluelib";
|
||||
export {default as Bold} from "./Bold";
|
||||
export {default as Box} from "./Box";
|
||||
export {default as Code} from "./Code";
|
||||
export {default as Color} from "./Color";
|
||||
export {default as Help} from "./Help";
|
||||
export {default as Italic} from "./Italic";
|
||||
export {default as Align} from "./Align"
|
||||
export {default as Anchor} from "./Anchor"
|
||||
export {default as Aside} from "./Aside"
|
||||
export {default as Blockquote} from "./Blockquote"
|
||||
export {default as Bluelib} from "./Bluelib"
|
||||
export {default as Bold} from "./Bold"
|
||||
export {default as Box} from "./Box"
|
||||
export {default as Code} from "./Code"
|
||||
export {default as Color} from "./Color"
|
||||
export {default as Help} from "./Help"
|
||||
export {default as Italic} from "./Italic"
|
||||
// export {default as LatexMath} from "./LatexMath"; // Do not export this, it should use dynamic load if imported
|
||||
export {default as ListItem} from "./ListItem";
|
||||
export {default as Main} from "./Main";
|
||||
export {default as Paragraph} from "./Paragraph";
|
||||
export {default as Separator} from "./Separator";
|
||||
export {default as Size} from "./Size";
|
||||
export {default as Split} from "./Split";
|
||||
export {default as Spoiler} from "./Spoiler";
|
||||
export {default as Strike} from "./Strike";
|
||||
export {default as Title} from "./Title";
|
||||
export {default as Underline} from "./Underline";
|
||||
export {default as BaseLink} from "./BaseLink";
|
||||
export {default as VisualErrorBoundary} from "./VisualErrorBoundary";
|
||||
export {default as VisualLog} from "./VisualLog";
|
||||
export {default as Button} from "./Button";
|
||||
export {default as ButtonToggle} from "./ButtonToggle";
|
||||
export {default as ListItem} from "./ListItem"
|
||||
export {default as Main} from "./Main"
|
||||
export {default as Paragraph} from "./Paragraph"
|
||||
export {default as Separator} from "./Separator"
|
||||
export {default as Size} from "./Size"
|
||||
export {default as Split} from "./Split"
|
||||
export {default as Spoiler} from "./Spoiler"
|
||||
export {default as Strike} from "./Strike"
|
||||
export {default as Title} from "./Title"
|
||||
export {default as Underline} from "./Underline"
|
||||
export {default as BaseLink} from "./BaseLink"
|
||||
export {default as VisualErrorBoundary} from "./VisualErrorBoundary"
|
||||
export {default as VisualLog} from "./VisualLog"
|
||||
export {default as Button} from "./Button"
|
||||
export {default as ButtonToggle} from "./ButtonToggle"
|
||||
|
|
Loading…
Reference in a new issue