fix: rebase afterbase
This commit is contained in:
parent
26c699ca92
commit
fec5e33de5
84 changed files with 2711 additions and 1149 deletions
599
package-lock.json
generated
599
package-lock.json
generated
|
|
@ -11,6 +11,9 @@
|
|||
"packages/*",
|
||||
"packages-node/*"
|
||||
],
|
||||
"dependencies": {
|
||||
"lit": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/lit": "^4.3.0",
|
||||
"@astrojs/mdx": "^4.0.8",
|
||||
|
|
@ -64,7 +67,6 @@
|
|||
"gray-matter": "^4.0.3",
|
||||
"husky": "^9.1.6",
|
||||
"lint-staged": "^15.2.10",
|
||||
"lit": "^3.2.1",
|
||||
"looks-same": "^9.0.1",
|
||||
"markdownlint-cli": "^0.42.0",
|
||||
"mocha": "^10.7.3",
|
||||
|
|
@ -1550,6 +1552,23 @@
|
|||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/@astrojs/markdown-remark/node_modules/remark-parse": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz",
|
||||
"integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^4.0.0",
|
||||
"mdast-util-from-markdown": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0",
|
||||
"unified": "^11.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/@astrojs/markdown-remark/node_modules/remark-stringify": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz",
|
||||
|
|
@ -2868,6 +2887,23 @@
|
|||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/@astrojs/mdx/node_modules/remark-parse": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz",
|
||||
"integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^4.0.0",
|
||||
"mdast-util-from-markdown": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0",
|
||||
"unified": "^11.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/@astrojs/mdx/node_modules/remark-stringify": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz",
|
||||
|
|
@ -7022,6 +7058,22 @@
|
|||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdjs/core/node_modules/remark-parse": {
|
||||
"version": "10.0.2",
|
||||
"resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.2.tgz",
|
||||
"integrity": "sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^3.0.0",
|
||||
"mdast-util-from-markdown": "^1.0.0",
|
||||
"unified": "^10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdjs/core/node_modules/slash": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
|
||||
|
|
@ -7184,6 +7236,16 @@
|
|||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/@types/mdast": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz",
|
||||
"integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/@types/unist": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
|
||||
|
|
@ -7225,6 +7287,525 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/mdast-util-from-markdown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz",
|
||||
"integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^4.0.0",
|
||||
"@types/unist": "^3.0.0",
|
||||
"decode-named-character-reference": "^1.0.0",
|
||||
"devlop": "^1.0.0",
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"micromark": "^4.0.0",
|
||||
"micromark-util-decode-numeric-character-reference": "^2.0.0",
|
||||
"micromark-util-decode-string": "^2.0.0",
|
||||
"micromark-util-normalize-identifier": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0",
|
||||
"unist-util-stringify-position": "^4.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/mdast-util-to-string": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz",
|
||||
"integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^4.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz",
|
||||
"integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/debug": "^4.0.0",
|
||||
"debug": "^4.0.0",
|
||||
"decode-named-character-reference": "^1.0.0",
|
||||
"devlop": "^1.0.0",
|
||||
"micromark-core-commonmark": "^2.0.0",
|
||||
"micromark-factory-space": "^2.0.0",
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-chunked": "^2.0.0",
|
||||
"micromark-util-combine-extensions": "^2.0.0",
|
||||
"micromark-util-decode-numeric-character-reference": "^2.0.0",
|
||||
"micromark-util-encode": "^2.0.0",
|
||||
"micromark-util-normalize-identifier": "^2.0.0",
|
||||
"micromark-util-resolve-all": "^2.0.0",
|
||||
"micromark-util-sanitize-uri": "^2.0.0",
|
||||
"micromark-util-subtokenize": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-core-commonmark": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz",
|
||||
"integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"decode-named-character-reference": "^1.0.0",
|
||||
"devlop": "^1.0.0",
|
||||
"micromark-factory-destination": "^2.0.0",
|
||||
"micromark-factory-label": "^2.0.0",
|
||||
"micromark-factory-space": "^2.0.0",
|
||||
"micromark-factory-title": "^2.0.0",
|
||||
"micromark-factory-whitespace": "^2.0.0",
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-chunked": "^2.0.0",
|
||||
"micromark-util-classify-character": "^2.0.0",
|
||||
"micromark-util-html-tag-name": "^2.0.0",
|
||||
"micromark-util-normalize-identifier": "^2.0.0",
|
||||
"micromark-util-resolve-all": "^2.0.0",
|
||||
"micromark-util-subtokenize": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-factory-destination": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz",
|
||||
"integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-factory-label": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz",
|
||||
"integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"devlop": "^1.0.0",
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-factory-space": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz",
|
||||
"integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-factory-title": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz",
|
||||
"integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-factory-space": "^2.0.0",
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-factory-whitespace": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz",
|
||||
"integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-factory-space": "^2.0.0",
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-character": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
|
||||
"integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-chunked": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz",
|
||||
"integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-symbol": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-classify-character": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz",
|
||||
"integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-combine-extensions": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz",
|
||||
"integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-chunked": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-decode-numeric-character-reference": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz",
|
||||
"integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-symbol": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-decode-string": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz",
|
||||
"integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"decode-named-character-reference": "^1.0.0",
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-decode-numeric-character-reference": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-encode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
|
||||
"integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-html-tag-name": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz",
|
||||
"integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-normalize-identifier": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz",
|
||||
"integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-symbol": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-resolve-all": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz",
|
||||
"integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-sanitize-uri": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
|
||||
"integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-encode": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-subtokenize": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz",
|
||||
"integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"devlop": "^1.0.0",
|
||||
"micromark-util-chunked": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-symbol": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
|
||||
"integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/micromark-util-types": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz",
|
||||
"integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/remark-parse": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz",
|
||||
"integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^4.0.0",
|
||||
"mdast-util-from-markdown": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0",
|
||||
"unified": "^11.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/@mdx-js/mdx/node_modules/trough": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz",
|
||||
|
|
@ -35125,6 +35706,22 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/remark/node_modules/remark-parse": {
|
||||
"version": "10.0.2",
|
||||
"resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.2.tgz",
|
||||
"integrity": "sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^3.0.0",
|
||||
"mdast-util-from-markdown": "^1.0.0",
|
||||
"unified": "^10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/remark/node_modules/remark-stringify": {
|
||||
"version": "10.0.3",
|
||||
"resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-10.0.3.tgz",
|
||||
|
|
|
|||
|
|
@ -204,7 +204,6 @@
|
|||
"@mdjs/core": "^0.21.1",
|
||||
"@mdjs/mdjs-story": "^0.4.0",
|
||||
"remark-rehype": "^8",
|
||||
"remark-parse": "9",
|
||||
"@mdjs/mdjs-preview": {
|
||||
".": "^0.6.0",
|
||||
"@lion/ui": "^0.15.0"
|
||||
|
|
|
|||
|
|
@ -2,9 +2,14 @@
|
|||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { expect } from 'chai';
|
||||
import { mdjsProcess } from '@mdjs/core';
|
||||
// we need to have "defaultMetaPlugins" because node can install
|
||||
// packages as sub node_modules
|
||||
// in this case, even if the version is the same (which is not in our case)
|
||||
// it won't be able to detect plugin
|
||||
// accessing the plugins by index is dangerous
|
||||
// @mdjs/core needs to export all the package it uses as plugins
|
||||
import { mdjsProcess, defaultMetaPlugins } from '@mdjs/core';
|
||||
import { addPlugin } from 'plugins-manager';
|
||||
import markdownPkg from 'remark-parse';
|
||||
|
||||
import { remarkExtendLionDocsTransformJs } from '../src/remarkExtendLionDocsTransformJs.js';
|
||||
|
||||
|
|
@ -57,7 +62,7 @@ async function execute(input) {
|
|||
// @ts-ignore
|
||||
{ extendDocsConfig },
|
||||
{
|
||||
location: markdownPkg,
|
||||
location: defaultMetaPlugins[0].plugin,
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
|
|||
27
patches/@mdjs+core+0.21.1.patch
Normal file
27
patches/@mdjs+core+0.21.1.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
diff --git a/node_modules/@mdjs/core/index.js b/node_modules/@mdjs/core/index.js
|
||||
index d1b2d32..5575106 100644
|
||||
--- a/node_modules/@mdjs/core/index.js
|
||||
+++ b/node_modules/@mdjs/core/index.js
|
||||
@@ -6,7 +6,7 @@ import { mdjsParse } from './src/mdjsParse.js';
|
||||
import { mdjsSetupCode } from './src/mdjsSetupCode.js';
|
||||
import { mdjsStoryParse } from './src/mdjsStoryParse.js';
|
||||
import { mdjsDocPage } from './src/mdjsDocPage.js';
|
||||
-import { mdjsProcess } from './src/mdjsProcess.js';
|
||||
+import { mdjsProcess, defaultMetaPlugins } from './src/mdjsProcess.js';
|
||||
import { isMdjsContent } from './src/isMdjsContent.js';
|
||||
|
||||
-export { mdjsParse, mdjsStoryParse, mdjsDocPage, mdjsProcess, isMdjsContent, mdjsSetupCode };
|
||||
+export { mdjsParse, mdjsStoryParse, mdjsDocPage, mdjsProcess, isMdjsContent, mdjsSetupCode, defaultMetaPlugins };
|
||||
diff --git a/node_modules/@mdjs/core/src/mdjsProcess.js b/node_modules/@mdjs/core/src/mdjsProcess.js
|
||||
index 26806e8..e40637e 100644
|
||||
--- a/node_modules/@mdjs/core/src/mdjsProcess.js
|
||||
+++ b/node_modules/@mdjs/core/src/mdjsProcess.js
|
||||
@@ -24,7 +24,7 @@ import { mdjsStoryParse } from './mdjsStoryParse.js';
|
||||
import { mdjsSetupCode } from './mdjsSetupCode.js';
|
||||
|
||||
/** @type {MdjsProcessPlugin[]} */
|
||||
-const defaultMetaPlugins = [
|
||||
+export const defaultMetaPlugins = [
|
||||
{ plugin: markdown, options: {} },
|
||||
{ plugin: gfm, options: {} },
|
||||
{ plugin: mdjsParse, options: {} },
|
||||
BIN
public/blog/images/accessibility.png
Normal file
BIN
public/blog/images/accessibility.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 MiB |
BIN
public/blog/images/controlling-exports-cover-image.jpg
Normal file
BIN
public/blog/images/controlling-exports-cover-image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
BIN
public/blog/images/ing-open-sources-lion-side-by-side.png
Normal file
BIN
public/blog/images/ing-open-sources-lion-side-by-side.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 247 KiB |
BIN
public/blog/images/introducing-lions-website-cover-image.jpg
Normal file
BIN
public/blog/images/introducing-lions-website-cover-image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
23
public/logo.svg
Normal file
23
public/logo.svg
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 366.11 271.02">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="103.79" y1="8.91" x2="201.41" y2="205.47" gradientTransform="matrix(1, 0.03, -0.03, 1, -4.72, 2.36)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.01" stop-color="#c19d3a"/>
|
||||
<stop offset="1" stop-color="#786124"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="b" x1="44.31" y1="236.36" x2="54.67" y2="267.4" xlink:href="#a"/>
|
||||
<linearGradient id="c" x1="162.62" y1="-5.22" x2="205.42" y2="122.98" xlink:href="#a"/>
|
||||
<linearGradient id="d" x1="166.43" y1="89.41" x2="224.05" y2="176.82" xlink:href="#a"/>
|
||||
<linearGradient id="e" x1="179.91" y1="80.85" x2="275.73" y2="246.39" xlink:href="#a"/>
|
||||
<linearGradient id="f" x1="162.62" y1="265.01" x2="226.06" y2="278.6" gradientTransform="matrix(1, -0.03, 0.03, 1, 7.04, -13.2)" xlink:href="#a"/>
|
||||
<linearGradient id="g" x1="339.88" y1="311.72" x2="206.79" y2="275.48" gradientTransform="matrix(1, -0.03, 0.03, 1, 7.04, -13.2)" xlink:href="#a"/>
|
||||
</defs>
|
||||
<polygon points="0 269.85 73.2 270.98 72.86 251.17 83.1 236.15 115 245.13 83.98 268.58 81.25 270.31 366.11 271.02 360.19 259.06 327.97 229.45 299.73 199.19 274.73 170.19 241.73 117.19 232.73 110.19 215.73 85.19 204.73 78.19 195.73 65.19 185.73 49.19 182.73 48.19 159.73 5.19 145.92 0.2 134.93 9.8 134.63 20.59 131.88 23.22 136.47 115.18 133.64 120.5 137.31 213.34 28.13 189.6 18.16 194.72 18.09 197.42 21.56 201.12 39.13 211.51 39.92 215.14 45.23 217.09 46.02 220.71 63.64 229.3 26.18 259.77 17.28 258.63 0 269.85" style="fill:#775e25"/>
|
||||
<polygon points="145.92 0.2 165.72 219.53 137.31 213.34 133.64 120.5 136.47 115.18 131.88 23.22 134.63 20.59 134.93 9.8 145.92 0.2" style="fill:url(#a)"/>
|
||||
<polygon points="63.64 229.3 72.51 231.35 46.72 270.57 0 269.85 17.28 258.63 26.18 259.77 63.64 229.3" style="fill:url(#b)"/>
|
||||
<polygon points="185.73 49.19 182.73 48.19 172.73 100.19 157.31 126.41 161.65 174.44 194.46 149.41 212.73 126.19 241.73 117.19 232.73 110.19 215.73 85.19 204.73 78.19 195.73 65.19 185.73 49.19" style="fill:url(#c)"/>
|
||||
<polygon points="182.73 48.19 172.73 100.19 157.31 126.41 145.92 0 159.73 5.19 182.73 48.19" style="fill:#775e25"/>
|
||||
<polygon points="161.65 174.44 194.46 149.41 212.73 126.19 241.73 117.19 274.73 170.19 246.73 182.19 199.54 191.56 165.72 219.53 163.61 198.77 161.65 174.44" style="fill:url(#d)"/>
|
||||
<polygon points="165.72 219.53 165.72 219.53 199.54 191.56 246.73 182.19 274.73 170.19 299.73 199.19 327.73 229.19 271.73 227.19 231.73 219.19 165.72 219.53" style="fill:url(#e)"/>
|
||||
<polygon points="171.04 265.24 185.34 237.55 208.32 224.43 230.4 230.98 215.53 253.33 214.71 263.79 177.08 270.61 161.73 270.49 171.04 265.24" style="fill:url(#f)"/>
|
||||
<polygon points="214.7 263.74 215.53 253.28 230.39 230.93 241.59 242.75 248.49 262.62 253.73 270.69 177.47 270.59 214.7 263.74" style="fill:url(#g)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/styles/Inter/Inter-VariableFont_slnt,wght.ttf
Normal file
BIN
public/styles/Inter/Inter-VariableFont_slnt,wght.ttf
Normal file
Binary file not shown.
93
public/styles/Inter/OFL.txt
Normal file
93
public/styles/Inter/OFL.txt
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
72
public/styles/Inter/README.txt
Normal file
72
public/styles/Inter/README.txt
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
Inter Variable Font
|
||||
===================
|
||||
|
||||
This download contains Inter as both a variable font and static fonts.
|
||||
|
||||
Inter is a variable font with these axes:
|
||||
slnt
|
||||
wght
|
||||
|
||||
This means all the styles are contained in a single file:
|
||||
Inter-VariableFont_slnt,wght.ttf
|
||||
|
||||
If your app fully supports variable fonts, you can now pick intermediate styles
|
||||
that aren’t available as static fonts. Not all apps support variable fonts, and
|
||||
in those cases you can use the static font files for Inter:
|
||||
static/Inter-Thin.ttf
|
||||
static/Inter-ExtraLight.ttf
|
||||
static/Inter-Light.ttf
|
||||
static/Inter-Regular.ttf
|
||||
static/Inter-Medium.ttf
|
||||
static/Inter-SemiBold.ttf
|
||||
static/Inter-Bold.ttf
|
||||
static/Inter-ExtraBold.ttf
|
||||
static/Inter-Black.ttf
|
||||
|
||||
Get started
|
||||
-----------
|
||||
|
||||
1. Install the font files you want to use
|
||||
|
||||
2. Use your app's font picker to view the font family and all the
|
||||
available styles
|
||||
|
||||
Learn more about variable fonts
|
||||
-------------------------------
|
||||
|
||||
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
|
||||
https://variablefonts.typenetwork.com
|
||||
https://medium.com/variable-fonts
|
||||
|
||||
In desktop apps
|
||||
|
||||
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
|
||||
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
|
||||
|
||||
Online
|
||||
|
||||
https://developers.google.com/fonts/docs/getting_started
|
||||
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
|
||||
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
|
||||
|
||||
Installing fonts
|
||||
|
||||
MacOS: https://support.apple.com/en-us/HT201749
|
||||
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
|
||||
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
|
||||
|
||||
Android Apps
|
||||
|
||||
https://developers.google.com/fonts/docs/android
|
||||
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
|
||||
|
||||
License
|
||||
-------
|
||||
Please read the full license text (OFL.txt) to understand the permissions,
|
||||
restrictions and requirements for usage, redistribution, and modification.
|
||||
|
||||
You can use them in your products & projects – print or digital,
|
||||
commercial or otherwise.
|
||||
|
||||
This isn't legal advice, please consider consulting a lawyer and see the full
|
||||
license for all details.
|
||||
BIN
public/styles/Inter/static/Inter-Black.ttf
Normal file
BIN
public/styles/Inter/static/Inter-Black.ttf
Normal file
Binary file not shown.
BIN
public/styles/Inter/static/Inter-Bold.ttf
Normal file
BIN
public/styles/Inter/static/Inter-Bold.ttf
Normal file
Binary file not shown.
BIN
public/styles/Inter/static/Inter-ExtraBold.ttf
Normal file
BIN
public/styles/Inter/static/Inter-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
public/styles/Inter/static/Inter-ExtraLight.ttf
Normal file
BIN
public/styles/Inter/static/Inter-ExtraLight.ttf
Normal file
Binary file not shown.
BIN
public/styles/Inter/static/Inter-Light.ttf
Normal file
BIN
public/styles/Inter/static/Inter-Light.ttf
Normal file
Binary file not shown.
BIN
public/styles/Inter/static/Inter-Medium.ttf
Normal file
BIN
public/styles/Inter/static/Inter-Medium.ttf
Normal file
Binary file not shown.
BIN
public/styles/Inter/static/Inter-Regular.ttf
Normal file
BIN
public/styles/Inter/static/Inter-Regular.ttf
Normal file
Binary file not shown.
BIN
public/styles/Inter/static/Inter-SemiBold.ttf
Normal file
BIN
public/styles/Inter/static/Inter-SemiBold.ttf
Normal file
Binary file not shown.
BIN
public/styles/Inter/static/Inter-Thin.ttf
Normal file
BIN
public/styles/Inter/static/Inter-Thin.ttf
Normal file
Binary file not shown.
202
public/styles/Roboto/LICENSE.txt
Normal file
202
public/styles/Roboto/LICENSE.txt
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
BIN
public/styles/Roboto/Roboto-Black.ttf
Normal file
BIN
public/styles/Roboto/Roboto-Black.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-BlackItalic.ttf
Normal file
BIN
public/styles/Roboto/Roboto-BlackItalic.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-Bold.ttf
Normal file
BIN
public/styles/Roboto/Roboto-Bold.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-BoldItalic.ttf
Normal file
BIN
public/styles/Roboto/Roboto-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-Italic.ttf
Normal file
BIN
public/styles/Roboto/Roboto-Italic.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-Light.ttf
Normal file
BIN
public/styles/Roboto/Roboto-Light.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-LightItalic.ttf
Normal file
BIN
public/styles/Roboto/Roboto-LightItalic.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-Medium.ttf
Normal file
BIN
public/styles/Roboto/Roboto-Medium.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-MediumItalic.ttf
Normal file
BIN
public/styles/Roboto/Roboto-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-Regular.ttf
Normal file
BIN
public/styles/Roboto/Roboto-Regular.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-Thin.ttf
Normal file
BIN
public/styles/Roboto/Roboto-Thin.ttf
Normal file
Binary file not shown.
BIN
public/styles/Roboto/Roboto-ThinItalic.ttf
Normal file
BIN
public/styles/Roboto/Roboto-ThinItalic.ttf
Normal file
Binary file not shown.
27
public/styles/global.css
Normal file
27
public/styles/global.css
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
@font-face {
|
||||
font-family: 'Inter';
|
||||
src: url('Inter/Inter-VariableFont_slnt,wght.ttf');
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Inter;
|
||||
}
|
||||
|
||||
/* Default light background */
|
||||
.astro-code,
|
||||
.astro-code span {
|
||||
background-color: #f6f8fa !important;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.astro-code,
|
||||
.astro-code span {
|
||||
color: var(--shiki-dark) !important;
|
||||
background-color: var(--shiki-dark-bg) !important;
|
||||
/* Optional, if you also want font styles */
|
||||
font-style: var(--shiki-dark-font-style) !important;
|
||||
font-weight: var(--shiki-dark-font-weight) !important;
|
||||
text-decoration: var(--shiki-dark-text-decoration) !important;
|
||||
}
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@ body {
|
|||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-size: 16px;
|
||||
color: var(--primary-text-color);
|
||||
color: var(--text-color);
|
||||
background-color: var(--page-background);
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
|
@ -149,14 +149,14 @@ body[data-layout='layout-home'] #main-header {
|
|||
|
||||
#main-header a {
|
||||
text-decoration: none;
|
||||
color: var(--primary-text-color);
|
||||
color: var(--text-color);
|
||||
transition: color 0.3s ease-in-out;
|
||||
font-weight: bold;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#main-header a:hover {
|
||||
color: var(--primary-color);
|
||||
color: var(--secondary-color-lighter);
|
||||
}
|
||||
|
||||
body[data-layout='layout-home'] #main-header a:hover {
|
||||
|
|
@ -274,7 +274,7 @@ rocket-navigation .light-dark-switch::part(label) {
|
|||
|
||||
rocket-navigation a {
|
||||
text-decoration: none;
|
||||
color: var(--primary-text-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
rocket-navigation a:hover {
|
||||
|
|
@ -286,7 +286,7 @@ rocket-navigation > ul > li > ul li.current ul li.anchor.current::before {
|
|||
content: '';
|
||||
height: 1.6em;
|
||||
width: 3px;
|
||||
background: var(--primary-color);
|
||||
background: var(--secondary-color);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
margin-top: -2px;
|
||||
|
|
@ -358,7 +358,7 @@ rocket-navigation > ul {
|
|||
|
||||
/* same as header */
|
||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
|
||||
color: var(--primary-text-color);
|
||||
color: var(--text-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
|
@ -511,7 +511,6 @@ main > * {
|
|||
font-weight: bold;
|
||||
vertical-align: middle;
|
||||
padding: 8px 24px;
|
||||
border: 1px solid var(--primary-color);
|
||||
border-radius: 24px;
|
||||
background: var(--contrast-color-dark);
|
||||
color: var(--contrast-color-light, #fff);
|
||||
|
|
@ -569,7 +568,7 @@ body[data-layout='layout-home'] section {
|
|||
body[data-layout='layout-home'] .banner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: var(--primary-color);
|
||||
background-color: var(--secondary-color);
|
||||
padding-block-start: 96px;
|
||||
}
|
||||
|
||||
|
|
@ -581,7 +580,7 @@ body[data-layout='layout-home'] .page-title--container {
|
|||
}
|
||||
|
||||
body[data-layout='layout-home'] .page-title {
|
||||
color: var(--primary-text-color);
|
||||
color: var(--text-color);
|
||||
font-size: 64px;
|
||||
}
|
||||
|
||||
|
|
@ -597,6 +596,10 @@ body[data-layout='layout-home'] .page-logo {
|
|||
align-self: flex-end;
|
||||
}
|
||||
|
||||
html.dark body[data-layout='layout-home'] .page-logo {
|
||||
filter: brightness(0.8);
|
||||
}
|
||||
|
||||
body[data-layout='layout-home'] .page-title,
|
||||
body[data-layout='layout-home'] .reason-header,
|
||||
body[data-layout='layout-home'] .page-slogan {
|
||||
|
|
|
|||
|
|
@ -354,6 +354,7 @@
|
|||
.markdown-body h4,
|
||||
.markdown-body h5,
|
||||
.markdown-body h6 {
|
||||
color: var(--text-color);
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
margin-bottom: 1rem;
|
||||
|
|
@ -366,7 +367,7 @@
|
|||
|
||||
.markdown-body h1,
|
||||
.markdown-body h2 {
|
||||
border-bottom: 1px solid #eaecef;
|
||||
border-bottom: 1px solid var(--primary-lines-color);
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
|
||||
|
|
|
|||
15
public/styles/lion/style.css
Normal file
15
public/styles/lion/style.css
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/* feel free to override this file for your page - add a file docs/_assets/style.css */
|
||||
|
||||
body[layout^='layout-home'] .markdown-body .call-to-action:nth-of-type(2) {
|
||||
--primary-color: #222;
|
||||
--primary-color-lighter: #333;
|
||||
--primary-color-darker: #000;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1024px) {
|
||||
body[layout='layout-home-background'] .page-background {
|
||||
top: -210px;
|
||||
right: -463px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +1,18 @@
|
|||
html {
|
||||
/* Base colors */
|
||||
--dandilion-100: #fff6cc;
|
||||
--dandilion-300: #ffe366;
|
||||
--dandilion-500: #ffd100;
|
||||
--dandilion-700: #997d00;
|
||||
--dandilion-900: #332a00;
|
||||
--dandelion-100: #fff6cc;
|
||||
--dandelion-300: #ffe366;
|
||||
--dandelion-500: #ffd100;
|
||||
--dandelion-700: #997d00;
|
||||
--dandelion-900: #332a00;
|
||||
|
||||
--blue-100: #b4c1ff;
|
||||
--blue-300: #8197ff;
|
||||
--blue-500: #002eff;
|
||||
--blue-700: #0025cc;
|
||||
--blue-900: #0020b3;
|
||||
|
||||
--green-500: #00ff51;
|
||||
--green-700: #8bcc00;
|
||||
|
||||
--black: #080700;
|
||||
--white: #ffffff;
|
||||
|
|
@ -17,27 +21,33 @@ html {
|
|||
--gray-300: #b3b3b3;
|
||||
--gray-500: #808080;
|
||||
--gray-700: #4d4d4d;
|
||||
--gray-800: #282828;
|
||||
--gray-900: #1a1a1a;
|
||||
|
||||
/* Alias tokens */
|
||||
--primary-color: var(--dandilion-500);
|
||||
--secondary-color: var(--blue-500);
|
||||
--primary-color-lighter: var(--dandilion-300);
|
||||
--primary-color-darker: var(--dandilion-700);
|
||||
--primary-text-color: var(--black);
|
||||
--primary-icon-color: var(--dandilion-900);
|
||||
--primary-lines-color: var(--gray-300);
|
||||
--primary-color: var(--blue-500);
|
||||
--primary-color-lighter: var(--blue-300);
|
||||
--primary-color-darker: var(--blue-700);
|
||||
--secondary-color: var(--dandelion-500);
|
||||
--secondary-color-lighter: var(--dandelion-300);
|
||||
--secondary-color-darker: var(--dandelion-700);
|
||||
--neutral-color: var(--gray-500);
|
||||
--neutral-color-lightest: var(--gray-100);
|
||||
--neutral-color-lighter: var(--gray-300);
|
||||
--neutral-color-darker: var(--gray-700);
|
||||
--neutral-color-darkest: var(--gray-900);
|
||||
--primary-icon-color: var(--dandelion-900);
|
||||
--primary-lines-color: var(--gray-100);
|
||||
--primary-text-inverse-color: var(--gray-100);
|
||||
--markdown-link-color: var(--blue-500);
|
||||
|
||||
/* Contrast colors */
|
||||
--contrast-color-light: var(--white);
|
||||
--contrast-color-dark: var(--dandilion-900);
|
||||
--contrast-color-dark: var(--dandelion-900);
|
||||
|
||||
/* background-colors */
|
||||
--page-background: var(--white);
|
||||
--secondary-background: var(--gray-100);
|
||||
--footer-background: rgba(0, 0, 0, 0.1);
|
||||
--footer-background: var(--neutral-color-lighter);
|
||||
|
||||
/* typography */
|
||||
--text-color: var(--black);
|
||||
|
|
@ -47,15 +57,36 @@ html {
|
|||
'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', 'Courier', monospace;
|
||||
|
||||
/* controls */
|
||||
--switch-unselected-color: var(--gray-500);
|
||||
--switch-selected-color: var(--green-500);
|
||||
--switch-unselected-color: var(--neutral-color);
|
||||
--switch-selected-color: var(--green-700);
|
||||
|
||||
--sidebar-tag-background-color: var(--secondary-color);
|
||||
--sidebar-tag-color: var(--text-color);
|
||||
|
||||
/* markdown */
|
||||
--markdown-body: var(--text-color);
|
||||
--markdown-link-color: var(--primary-color);
|
||||
--markdown-octicon-link: var(--primary-color);
|
||||
--markdown-syntax-background-color: var(--neutral-color);
|
||||
--markdown-link-color: var(--primary-color);
|
||||
--markdown-blockquote-color: var(--secondary-color-darker);
|
||||
}
|
||||
|
||||
html.dark {
|
||||
--primary-color: #e63946;
|
||||
--primary-color-lighter: #e25761;
|
||||
--primary-color-darker: #a22831;
|
||||
--primary-text-color: var(--white);
|
||||
--primary-color: var(--blue-100);
|
||||
--primary-color-lighter: var(--blue-300);
|
||||
--primary-color-darker: var(--blue-100);
|
||||
--secondary-color: var(--dandelion-700);
|
||||
--secondary-color-lighter: var(--dandelion-900);
|
||||
--secondary-color-darker: var(--dandelion-500);
|
||||
--neutral-color: var(--gray-700);
|
||||
--neutral-color-lightest: var(--gray-900);
|
||||
--neutral-color-lighter: var(--gray-800);
|
||||
--neutral-color-darker: var(--gray-500);
|
||||
--neutral-color-darkest: var(--gray-300);
|
||||
|
||||
--text-color: var(--white);
|
||||
--primary-icon-color: var(--dandelion-100);
|
||||
--primary-text-inverse-color: #2c3e50;
|
||||
|
||||
/* Contrast colors */
|
||||
|
|
@ -63,19 +94,11 @@ html.dark {
|
|||
--contrast-color-dark: #1d3557;
|
||||
|
||||
/* background-colors */
|
||||
--page-background: #333;
|
||||
--footer-background: #4f4f4f;
|
||||
|
||||
--page-background: var(--gray-700);
|
||||
--footer-background: var(--gray-900);
|
||||
/* typography */
|
||||
--text-color: white;
|
||||
|
||||
/* controls */
|
||||
--switch-unselected-color: #808080;
|
||||
--switch-selected-color: #42b983;
|
||||
|
||||
/* markdown */
|
||||
--markdown-octicon-link: white;
|
||||
--markdown-syntax-background-color: #a0a0a0;
|
||||
--markdown-link-color: #fb7881;
|
||||
--markdown-blockquote-color: #c9e3ff;
|
||||
}
|
||||
|
|
|
|||
1141
public/styles/open-props@1.6.11.min.css
vendored
Normal file
1141
public/styles/open-props@1.6.11.min.css
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="m256-83-12-92 128-352q15 17 34.5 26.5T446-487L323-148l-67 65Zm449 0-68-65-125-338q20-4 40-13.5t35-26.5l129 351-11 92ZM480-503q-56.5 0-96.75-40.25T343-640q0-48 27-84t69-46.76V-862h82v91q42 11 69 47t27 84q0 56.5-40.25 96.75T480-503Zm.105-83Q502-586 518-602.105q16-16.106 16-38Q534-662 517.895-678q-16.106-16-38-16Q458-694 442-677.895q-16 16.106-16 38Q426-618 442.105-602q16.106 16 38 16Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="m269-120-9-66 127-350q11 11 24.5 18t28.5 12L317-167l-48 47Zm422 0-48-47-125-338q15-5 29-12t25-18l128 349-9 66ZM480-520q-50 0-85-35t-35-85q0-42 24.5-74.5T450-756v-84h60v84q41 9 65.5 41.5T600-640q0 50-35 85t-85 35Zm0-60q25 0 42.5-17.5T540-640q0-25-17.5-42.5T480-700q-25 0-42.5 17.5T420-640q0 25 17.5 42.5T480-580Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M265.5-287q12.5 0 21.5-8.5t9-21q0-12.5-9-21.5t-21-9q-13 0-21.5 9t-8.5 21q0 13 8.5 21.5t21 8.5ZM236-452h60v-227h-60v227Zm214 170h275v-60H450v60Zm0-170h275v-60H450v60Zm0-167h275v-60H450v60ZM141-95q-39.05 0-66.525-27.475Q47-149.95 47-189v-582q0-39.463 27.475-67.231Q101.95-866 141-866h678q39.463 0 67.231 27.769Q914-810.463 914-771v582q0 39.05-27.769 66.525Q858.463-95 819-95H141Zm0-94h678v-582H141v582Zm0 0v-582 582Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M261-282q12 0 21-9t9-21q0-12-9-21t-21-9q-12 0-21 9t-9 21q0 12 9 21t21 9Zm-30-170h60v-231h-60v231Zm219 175h279v-60H450v60Zm0-175h279v-60H450v60Zm0-171h279v-60H450v60ZM132-120q-24 0-42-18t-18-42v-600q0-24 18-42t42-18h696q24 0 42 18t18 42v600q0 24-18 42t-42 18H132Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M741-439v-82h185v82H741Zm74 302L666-248l50-66 148 110-49 67Zm-96-510-50-66 146-110 49 66-145 110ZM164-175v-160h-47q-35.75-4-59.375-31.188Q34-393.375 34-429v-102q0-39.188 27.906-67.094Q89.813-626 129-626h163l233-139v570L292-335h-29v160h-99Zm266-186v-238l-115 68H129v102h186l115 68Zm135 40v-319q38 27 60.5 69t22.5 91q0 49-22.3 90.903Q603.4-347.194 565-321ZM280-480Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M730-450v-60h150v60H730Zm50 290-121-90 36-48 121 90-36 48Zm-82-503-36-48 118-89 36 48-118 89ZM210-200v-160h-70q-25 0-42.5-17.5T80-420v-120q0-25 17.5-42.5T140-600h180l200-120v480L320-360h-50v160h-60Zm350-146v-268q27 24 43.5 58.5T620-480q0 41-16.5 75.5T560-346Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M309-218 44-482l267-267 68 67-199 199 197 197-68 68Zm340 3-67-67 199-199-197-197 67-68 265 264-267 267Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="m379-343 45-44-93-93 91-91-45-44-135 135.5L379-343Zm202 0 137-137-137-137-45 44 93 93-93 93 45 44ZM189-95q-39.05 0-66.525-27.475Q95-149.95 95-189v-582q0-39.463 27.475-67.231Q149.95-866 189-866h582q39.463 0 67.231 27.769Q866-810.463 866-771v582q0 39.05-27.769 66.525Q810.463-95 771-95H189Zm0-94h582v-582H189v582Zm0-582v582-582Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M437-172v-283.625L189-599v283.625L437-172Zm87 0 247-143.375V-600L524-455.787V-172Zm-44-358 244-142-244-141-244 141 244 142ZM142-233q-23.25-13.426-35.125-35.42T95-315v-330q0-24.586 11.875-46.58T142-727l291-168q22.328-12 47.164-12Q505-907 527-895l291 168q23.25 13.426 35.625 35.42T866-645v330q0 24.586-12.375 46.58T818-233L527-66q-22.328 13-47.164 13Q455-53 433-66L142-233Zm338-247Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M705.604-95q-9.604 0-18.647-2-9.044-2-16.957-7l-123-72q-16.69-9.863-26.345-26.231Q511-218.6 511-238v-144q0-19.714 9.655-36.347Q530.31-434.98 547-445l124-71q8.205-4.333 17.154-6.167Q697.103-524 705.761-524t16.903 1.667q8.245 1.666 17.501 6.441L863-445q16.133 9.98 26.567 26.626Q900-401.728 900-382v144q0 19.305-10.133 35.594Q879.733-186.118 863-176l-123 72q-8.158 4.667-16.714 6.833Q714.731-95 705.604-95ZM399.796-498q-77.203 0-126-48.796Q225-595.593 225-672.796 225-750 273.796-799q48.797-49 126-49Q477-848 526.5-799T576-672.796q0 77.203-49.5 126Q477-498 399.796-498ZM55-126v-121q0-46 24.5-79t57.5-49q72-32 139-47t124-15h39q-8 15-17 43t-11 52h-8.68q-52.32 0-107.154 10.468-54.835 10.467-114.048 39.152-16.053 7.912-24.085 21.146Q149-258 149-243v23h259q5 26 20 52t30 42H55Zm344.796-466Q435-592 458-614.846t23-58.119q0-35.685-22.796-58.36-22.797-22.675-58-22.675Q365-754 342-731.279t-23 57.819q0 35.51 22.796 58.485 22.797 22.975 58 22.975Zm.204-81Zm8 453Zm204-185 94 54 93-54-93-54-94 54Zm126 225 96-53.704V-344l-96 57v107Zm-161-54 96 56v-108.148L577-342v108Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="m343-533 83-83-59-58-51 50-46-46 52-51-68-66-82 84 171 170Zm360 362 83-84-69-68-51 51-45-46 51-51-58-59-84 84 173 173Zm4-607 70 71-70-71ZM284-95H95v-190l189-190L55-704l198-201 232 231 172-172q10-10 22.5-15t25.5-5q13 0 25.5 5t22.5 15l93 92q10 10 15 22.5t5 25.5q0 14-5 26.5T846-657L674-486l232 232L706-56 474-287 284-95Zm-106-83h71l360-362-70-71-361 361v72Zm396-398-35-35 70 71-35-36Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M135-95v-131l613-613q12-13 25.333-20 13.334-7 27.667-7 13.644 0 27.822 7Q843-852 856-839l25 23q12 11 18.5 25t6.5 28q0 13.563-5.836 27.627-5.837 14.063-19.509 27.714L267-95H135Zm72-71h32l460-461-15.965-16.035L668-659 207-198v32Zm627-596-32-32 32 32ZM683.035-643.035 668-659l31 32-15.965-16.035ZM545-95q81 0 143.5-37.869 62.5-37.87 62.5-107.745Q751-282 721-316.5 691-351 628-371l-56 56q51 12 79.5 33t28.5 41q0 31-39.108 53-39.109 22-95.892 22-14.15 0-24.575 9.925Q510-146.15 510-131q0 15 10.425 25.5T545-95ZM241-419l60-60q-70-14-102.5-28.776-32.5-14.777-32.5-32.54Q166-553 185.5-567.5 205-582 273-604q84-27 113.5-57.5T416-739q0-58-42.5-92.5T261-866q-44 0-79 15.5t-53 38.222Q120-801 120.5-787q.5 14 13.746 24 11.247 9 25.319 8 14.073-1 24.435-12 14-14 32-20.5t45-6.5q43.025 0 63.513 16.3Q345-761.4 345-739q0 20-18.5 35T244-670q-99 33-124 63.5T95-540q0 41.338 33 73.169Q161-435 241-419Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M370-95H180q-34.312 0-59.656-25.344T95-180v-190q35-4 59.5-30.377 24.5-26.378 24.5-62.5Q179-499 154.5-525.5T95-557v-189q0-34.025 25.344-60.013Q145.688-832 180-832h155q19-44 53-71.5t77-27.5q43 0 77 27.5t53 71.5h151q34.025 0 60.013 25.987Q832-780.025 832-746v151q44 19 70 55t26 79q0 43-26 75.5T832-334v154q0 34.312-25.987 59.656Q780.025-95 746-95H557q-6-43-32.485-69-26.486-26-61.75-26-35.265 0-61.515 26T370-95Zm-181-94h123q22-50 62.888-73t88.5-23Q508-285 549.5-262q41.5 23 65.94 73H737v-225.571h50.182q19.818 0 32.818-13.065 13-13.064 13-33.15 0-20.085-13-33.15Q807-507 787.182-507H737v-230H511.429v-53.182q0-19.818-13.065-32.818-13.064-13-33.15-13-20.085 0-33.15 13Q419-810 419-790.182V-737H189v119q39.15 26.817 62.075 67.186Q274-510.445 274-462.812 274-416 251.5-374.5T189-308v119Zm276-272Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M189-149v-124h-86v-94h86v-102H50l430-386 430 386H771v102h86v94h-86v124h-94v-124H527v124h-94v-124H283v124h-94Zm94-218h150v-319L283-552v185Zm244 0h150v-185L527-686v319Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M229-189h124v-258h254v258h124v-377L480-754 229-565.667V-189Zm-94 94v-518l345-259 346 259v518H524v-269h-88v269H135Zm345-377Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M479.965-34Q443-34 416.5-62.5T390-133h180q0 42-26.535 70.5-26.536 28.5-63.5 28.5ZM311-201v-72h338v72H311Zm5-139q-72-47-116.5-117.794Q155-528.587 155-617.997q0-131.753 96.206-228.378T479.706-943Q612-943 709-846.375T806-618q0 89-44 160T644-340H316Zm33.303-94H612q45.957-30.762 72.479-78.881Q711-561 711-617.781 711-713 643-780.5T480-848q-95 0-163 67.5t-68 162.719Q249-561 276-513q27 48 73.303 79ZM480-434Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M149-95q-39.05 0-66.525-27.475Q55-149.95 55-189v-582q0-39.463 27.475-67.231Q109.95-866 149-866h662q39.463 0 67.231 27.769Q906-810.463 906-771v582q0 39.05-27.769 66.525Q850.463-95 811-95H149Zm0-94h662v-582H149v582Zm105-102h453v-60H254v60Zm0-161h155v-218H254v218Zm254 0h199v-60H508v60Zm0-158h199v-60H508v60ZM149-189v-582 582Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="M189-95q-39.8 0-66.9-27.1Q95-149.2 95-189v-526q0-14.804 5-28.022 5-13.218 15-23.978l57-73q9.457-13 23.152-19.5Q208.848-866 224-866h513q15.152 0 28.848 7 13.695 7 24.152 19l57 73q8 11.532 13.5 24.2T866-715v526q0 39.8-27.394 66.9Q811.213-95 771-95H189Zm9-631h565l-36.409-45H234l-36 45Zm-9 537h582v-477H189v477Zm397-108 130-130-130-130-40 40 90 90-90 90 40 40Zm-211 4 40-40-90-90 90-90-40-40-130 130 130 130ZM189-189v-477 477Z"
|
||||
/>
|
||||
</svg>`;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { html } from 'lit';
|
||||
|
||||
export default html`<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="48"
|
||||
viewBox="0 -960 960 960"
|
||||
width="48"
|
||||
>
|
||||
<path
|
||||
d="m504-267 355-355-63-62-354 355 62 62Zm-287 70q-102-6-154-44T11-349q0-63 50.5-103T205-505q49-7 67.5-16t18.5-26q0-23-30.5-37T164-605l7-86q99 10 153 47.5t54 96.5q0 48-40.5 81.5T225-420q-63 8-95 26t-32 46q0 27 31.5 43.5T221-284l-4 87Zm313 27L344-356l407-406q20-20 46-19.5t46 19.5l94 94q20 20 20 46.5T937-575L530-170Zm-163 34q-25 5-43.5-13.5T310-192l34-164 186 186-163 34Z"
|
||||
/>
|
||||
</svg>`;
|
||||
36
src/components/iconset-portal/iconset-portal.js
Normal file
36
src/components/iconset-portal/iconset-portal.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
// https://fonts.google.com/icons?selected=Material+Symbols+Outlined:newsmode:FILL@0;wght@700;GRAD@0;opsz@48&icon.query=news&icon.platform=web
|
||||
export { default as architecture } from './icons/architecture_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as breakingNews } from './icons/breaking_news_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as campaign } from './icons/campaign_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as codeBlocks } from './icons/code_blocks_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as code } from './icons/code_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as deployedCodeAccount } from './icons/deployed_code_account_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as deployedCode } from './icons/deployed_code_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as designServices } from './icons/design_services_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as draw } from './icons/draw_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as extension } from './icons/extension_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as foundation } from './icons/foundation_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as home } from './icons/home_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as lightbulb } from './icons/lightbulb_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as newsmode } from './icons/newsmode_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as sdk } from './icons/sdk_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as stylusNote } from './icons/stylus_note_FILL0_wght700_GRAD0_opsz48.svg.js';
|
||||
export { default as search } from './icons/search_FILL0_wght400_GRAD0_opsz48.svg.js';
|
||||
|
||||
export { default as architectureFilled } from './icons/architecture_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as breakingNewsFilled } from './icons/breaking_news_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as campaignFilled } from './icons/campaign_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as codeBlocksFilled } from './icons/code_blocks_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as codeFilled } from './icons/code_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as deployedCodeAccountFilled } from './icons/deployed_code_account_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as deployedCodeFilled } from './icons/deployed_code_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as designServicesFilled } from './icons/design_services_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as drawFilled } from './icons/draw_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as extensionFilled } from './icons/extension_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as foundationFilled } from './icons/foundation_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as homeFilled } from './icons/home_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as lightbulbFilled } from './icons/lightbulb_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as newsmodeFilled } from './icons/newsmode_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as sdkFilled } from './icons/sdk_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as stylusNoteFilled } from './icons/stylus_note_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
export { default as searchFilled } from './icons/search_FILL1_wght400_GRAD0_opsz48.svg.js';
|
||||
|
|
@ -29,7 +29,7 @@ export class UIPortalFooter extends LitElement {
|
|||
#main-footer {
|
||||
padding-inline: 96px;
|
||||
}
|
||||
|
||||
|
||||
#footer-menu .content-area {
|
||||
flex-direction: row;
|
||||
text-align: left;
|
||||
|
|
@ -43,10 +43,14 @@ export class UIPortalFooter extends LitElement {
|
|||
|
||||
#footer-menu a {
|
||||
text-decoration: none;
|
||||
color: var(--primary-text-color);
|
||||
color: var(--text-color);
|
||||
padding: 5px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#footer-menu a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,14 @@ import { css, html, nothing } from 'lit';
|
|||
import '@lion/ui/define/lion-icon.js';
|
||||
import { UIBaseElement } from './shared/UIBaseElement.js';
|
||||
import { addIconResolverForPortal } from './iconset-portal/addIconResolverForPortal.js';
|
||||
import { navItemDirective } from '../directives/nav-item.js';
|
||||
import uiPortalMainNavBurgerCss from './ui-portal-main-nav-burger.css.js';
|
||||
|
||||
addIconResolverForPortal();
|
||||
try {
|
||||
addIconResolverForPortal();
|
||||
} catch (e) {
|
||||
// do nothing
|
||||
// icons can be registered by somebody else?
|
||||
}
|
||||
|
||||
// TODO: apply https://web.dev/website-navigation/ (aria-current="page" etc.)
|
||||
|
||||
|
|
@ -23,13 +28,31 @@ export class UIPortalMainNav extends UIBaseElement {
|
|||
* @type {NavItem[]}
|
||||
*/
|
||||
this.navData = [];
|
||||
this.layoutWide = false;
|
||||
this.getLink = item =>
|
||||
html`<a href="${item.redirect || item.url}" aria-current=${item.active ? 'page' : ''}
|
||||
>${item.name}</a
|
||||
>`;
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (window) {
|
||||
// only on the client
|
||||
window.setTimeout(() => {
|
||||
// remove the second navigation
|
||||
// its rendered twice due to lack of lit/ssr
|
||||
// https://github.com/lit/lit/issues/4472
|
||||
const $navs = this.renderRoot.querySelectorAll('[data-part="nav"]');
|
||||
if ($navs.length > 1) {
|
||||
$navs[1].remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
get templateContext() {
|
||||
return {
|
||||
...super.templateContext,
|
||||
directives: { navItem: navItemDirective },
|
||||
data: { navData: this.navData },
|
||||
};
|
||||
}
|
||||
|
|
@ -41,7 +64,7 @@ export class UIPortalMainNav extends UIBaseElement {
|
|||
return html` <nav>${templates.navLevel(context, { children: data.navData })}</nav> `;
|
||||
},
|
||||
navLevel(context, { children }) {
|
||||
const { templates, directives } = context;
|
||||
const { templates } = context;
|
||||
|
||||
return html`<ul>
|
||||
${children.map(
|
||||
|
|
@ -53,7 +76,7 @@ export class UIPortalMainNav extends UIBaseElement {
|
|||
<li>
|
||||
${item.children.map(
|
||||
child1 => html`
|
||||
<a ${directives.navItem(child1)}>${child1.name}</a>
|
||||
${this.getLink(child1)}
|
||||
${child1.children?.length
|
||||
? html` collapsible
|
||||
<ul>
|
||||
|
|
@ -74,22 +97,9 @@ export class UIPortalMainNav extends UIBaseElement {
|
|||
</ul>`;
|
||||
},
|
||||
navItem(context, { item }) {
|
||||
const { directives } = context;
|
||||
|
||||
return html`<a ${directives.navItem(item)}>${item.name}</a>`;
|
||||
return this.getLink(item);
|
||||
},
|
||||
};
|
||||
|
||||
attributeChangedCallback(attrName, oldVal, newVal) {
|
||||
super.attributeChangedCallback(attrName, oldVal, newVal);
|
||||
if (attrName === 'nav-data') {
|
||||
if (this.navData.find(item => item.active)?.url !== '/') {
|
||||
this.setAttribute('data-wide', 'true');
|
||||
} else {
|
||||
this.removeAttribute('data-wide');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export const tagName = 'ui-portal-main-nav';
|
||||
|
||||
|
|
@ -113,23 +123,62 @@ const baseUINavMarkup = {
|
|||
|
||||
return html`
|
||||
<nav data-part="nav">
|
||||
${data.shouldToggleL1
|
||||
? html`<button popovertarget="l1-wrapper" data-part="l1-invoker">Open Menu</button>`
|
||||
: nothing}
|
||||
<input type="checkbox" id="burger-toggle" hidden />
|
||||
<label for="burger-toggle" class="burger">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</label>
|
||||
|
||||
<div ?popover="${data.shouldToggleL1}" id="l1-wrapper" data-part="l1-wrapper">
|
||||
${templates.navLevel(context, { children: data.navData, level: 1 })}
|
||||
<div id="l1-wrapper" data-part="l1-wrapper">
|
||||
${templates.navRootLevel(context, { children: data.navData, level: 1 })}
|
||||
${templates.navNestedLevel(context, {
|
||||
children: data.navData.find(item => item.active)?.children,
|
||||
level: 2,
|
||||
})}
|
||||
</div>
|
||||
</nav>
|
||||
`;
|
||||
},
|
||||
navLevel(context, { children, level, hasActiveChild = false }) {
|
||||
navRootLevel(context, { children, level, hasActiveChild = false }) {
|
||||
const { templates } = context;
|
||||
|
||||
return html`<div
|
||||
data-part="level"
|
||||
data-level="${level}"
|
||||
?data-:has-active-child="${hasActiveChild}"
|
||||
data-has-active-child="${hasActiveChild}"
|
||||
>
|
||||
<ul data-part="list" data-level="${level}">
|
||||
${children.map(
|
||||
item =>
|
||||
html`<li data-part="listitem" data-level="${level}" ?data-:active="${item.active}">
|
||||
${templates.navItem(context, { item, level })}
|
||||
</li>`,
|
||||
)}
|
||||
</ul>
|
||||
<div class="nav-item-last">
|
||||
<a href="/search" data-part="anchor" data-level="${level}">
|
||||
<lion-icon
|
||||
data-part="icon"
|
||||
data-level="${level}"
|
||||
icon-id="lion-portal:portal:search"
|
||||
></lion-icon>
|
||||
<span>Search</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>`;
|
||||
},
|
||||
navNestedLevel(context, { children, level, hasActiveChild = false }) {
|
||||
const { templates } = context;
|
||||
|
||||
if (!children?.length) {
|
||||
return nothing;
|
||||
}
|
||||
|
||||
return html`<div
|
||||
data-part="level"
|
||||
data-level="${level}"
|
||||
data-has-active-child="${hasActiveChild}"
|
||||
>
|
||||
<ul data-part="list" data-level="${level}">
|
||||
${children.map(
|
||||
|
|
@ -137,7 +186,7 @@ const baseUINavMarkup = {
|
|||
html`<li data-part="listitem" data-level="${level}" ?data-:active="${item.active}">
|
||||
${templates.navItem(context, { item, level })}
|
||||
${item.children?.length
|
||||
? templates.navLevel(context, {
|
||||
? templates.navNestedLevel(context, {
|
||||
level: level + 1,
|
||||
children: item.children,
|
||||
hasActiveChild: item.hasActiveChild,
|
||||
|
|
@ -148,39 +197,12 @@ const baseUINavMarkup = {
|
|||
</ul>
|
||||
</div>`;
|
||||
},
|
||||
navLevel3(context, { children, level, item }) {
|
||||
const { templates, directives } = context;
|
||||
|
||||
return html`<div>
|
||||
<a ${directives.navItem(item)} class="second-level-title">${item.name}</a>
|
||||
<ul data-part="list" class="second-level-list">
|
||||
${children.map(
|
||||
child =>
|
||||
html`<li ?data-:active="${child.active}">
|
||||
${templates.navItem(context, { child, level })}
|
||||
</li>`,
|
||||
)}
|
||||
</ul>
|
||||
</div>`;
|
||||
|
||||
// accordion with all the links
|
||||
// return html`<lion-accordion>
|
||||
// <h3 slot="invoker"><button>${item.name}</button></h3>
|
||||
// <div slot="content">
|
||||
// <ul>
|
||||
// ${children.map(
|
||||
// item => html`<li ?data-:active="${item.isActive}">
|
||||
// ${templates.navItem(context, { item, level })}
|
||||
//
|
||||
// </li>`)}
|
||||
// </ul>
|
||||
// </div>
|
||||
// </div>`;
|
||||
},
|
||||
navItem(context, { item, level }) {
|
||||
const { directives } = context;
|
||||
|
||||
return html`<a data-part="anchor" data-level="${level}" ${directives.navItem(item)}
|
||||
return html`<a
|
||||
data-part="anchor"
|
||||
data-level="${level}"
|
||||
href="${item.redirect || item.url}"
|
||||
aria-current=${item.active ? 'page' : ''}
|
||||
>${level === 1
|
||||
? html`<lion-icon
|
||||
data-part="icon"
|
||||
|
|
@ -201,100 +223,94 @@ UIPortalMainNav.provideStylesAndMarkup({
|
|||
/** 2 columns */
|
||||
styles: () => [
|
||||
sharedGlobalStyles,
|
||||
uiPortalMainNavBurgerCss,
|
||||
css`
|
||||
:host([data-layout='inline-columns']) {
|
||||
--_width-l0: var(--size-12);
|
||||
--_width-l1: var(--size-13);
|
||||
:host {
|
||||
height: 100vh;
|
||||
/** Make this the positioning parent of l0 and l1 */
|
||||
position: relative;
|
||||
width: var(--_width-l0);
|
||||
display: block;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns'][data-wide='true']) {
|
||||
width: calc(var(--_width-l0) + var(--_width-l1));
|
||||
#l1-wrapper {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='nav'] {
|
||||
:host [data-part='nav'] {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='level'][data-level='1'],
|
||||
:host([data-layout='inline-columns']) [data-part='level'][data-level='2'] {
|
||||
:host [data-part='level'][data-level='1'],
|
||||
:host [data-part='level'][data-level='2'] {
|
||||
padding-block-start: var(--size-6);
|
||||
padding-inline: var(--size-2);
|
||||
overflow-y: scroll;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='level'][data-level='1'] {
|
||||
width: var(--_width-l0);
|
||||
height: 100vh;
|
||||
:host [data-part='level'][data-level='1'] {
|
||||
width: 160px;
|
||||
border-right: 1px solid #ccc;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
:host [data-part='level'][data-level='2'] {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
/**
|
||||
* When a l0 child is active, or a l1 child => open correct l1
|
||||
*/
|
||||
:host([data-layout='inline-columns'])
|
||||
:host
|
||||
[data-part='listitem']:not([data-\:active])
|
||||
[data-part='level'][data-level='2']:not([data-\:has-active-child]) {
|
||||
[data-part='level'][data-level='2']:not([data-has-active-child]) {
|
||||
/** TODO: sr-only, because we want to present all links to the screen reader */
|
||||
display: none;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='level'][data-level='2'] {
|
||||
width: var(--_width-l1);
|
||||
position: absolute;
|
||||
left: var(--_width-l0);
|
||||
top: 0;
|
||||
/* padding-inline: var(--size-6); */
|
||||
border-right: 1px solid #ccc;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='list'] {
|
||||
:host [data-part='list'] {
|
||||
list-style-type: none;
|
||||
margin: 4px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='1'] {
|
||||
:host [data-part='anchor'][data-level='1'] {
|
||||
display: block;
|
||||
padding-block: var(--size-6);
|
||||
padding-inline: var(--size-6);
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='2'] {
|
||||
:host [data-part='anchor'][data-level='2'] {
|
||||
display: block;
|
||||
padding-block: var(--size-3);
|
||||
padding-inline: var(--size-6);
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='2'][aria-current='page'] {
|
||||
|
||||
:host [data-part='anchor'][data-level='2'][aria-current='page']:not(:last-child) {
|
||||
padding-block: var(--size-2);
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='icon'][data-level='1'] {
|
||||
:host [data-part='icon'][data-level='1'] {
|
||||
display: block;
|
||||
width: var(--size-7);
|
||||
height: var(--size-7);
|
||||
margin-bottom: var(--size-1);
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='1'] {
|
||||
:host [data-part='anchor'][data-level='1'] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-block-end: 6px;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'] {
|
||||
:host [data-part='anchor'] {
|
||||
display: block;
|
||||
color: inherit;
|
||||
color: var(--text-color);
|
||||
text-decoration: inherit;
|
||||
font-size: 1rem;
|
||||
fill: var(--primary-icon-color);
|
||||
|
|
@ -302,36 +318,30 @@ UIPortalMainNav.provideStylesAndMarkup({
|
|||
border-radius: var(--radius-4);
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][aria-current='page'] {
|
||||
:host [data-part='anchor'][aria-current='page'][data-level='1'],
|
||||
:host [data-part='anchor'][aria-current='page'][data-level='3']:last-child,
|
||||
:host [data-part='anchor'][aria-current='page'][data-level='4'] {
|
||||
font-weight: bold;
|
||||
background-color: var(--primary-color-lighter);
|
||||
background-color: var(--secondary-color);
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor']:hover {
|
||||
:host [data-part='anchor']:hover {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.3em;
|
||||
background-color: var(--primary-color);
|
||||
background-color: var(--secondary-color-lighter);
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor']:focus {
|
||||
:host [data-part='anchor']:focus {
|
||||
outline: 2px solid var(--contrast-color-dark);
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='2']:focus,
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='2']:focus {
|
||||
:host [data-part='anchor'][data-level='2']:focus,
|
||||
:host [data-part='anchor'][data-level='2']:focus {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='level'][data-level='2'] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-\\:active] [data-part='level'][data-level='2'] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='level'][data-level='2'] {
|
||||
color: var(--primary-text-color, #333);
|
||||
:host [data-part='level'][data-level='2'] {
|
||||
color: var(--text-color, #333);
|
||||
|
||||
/* 14px/Regular */
|
||||
font-family: 'ING Me';
|
||||
|
|
@ -342,19 +352,19 @@ UIPortalMainNav.provideStylesAndMarkup({
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='listitem'][data-level='2'][data-\\:active] {
|
||||
:host [data-part='listitem'][data-level='2'][data-\\:active] {
|
||||
border-radius: var(--radius-4);
|
||||
background: var(--primary-color-lighter, #f0f0f0);
|
||||
padding-block-end: 12px;
|
||||
background: var(--neutral-color-lightest);
|
||||
margin-block: 6px;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='level'][data-level='3'] {
|
||||
:host [data-part='level'][data-level='3'] {
|
||||
overflow: hidden;
|
||||
padding-block-end: 12px;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='3'],
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='4'] {
|
||||
:host [data-part='anchor'][data-level='3'],
|
||||
:host [data-part='anchor'][data-level='4'] {
|
||||
/* 14px/Regular */
|
||||
font-family: 'ING Me';
|
||||
font-size: 0.875rem;
|
||||
|
|
@ -362,132 +372,22 @@ UIPortalMainNav.provideStylesAndMarkup({
|
|||
font-weight: 400;
|
||||
line-height: 20px; /* 142.857% */
|
||||
text-decoration: none;
|
||||
margin-left: var(--size-8);
|
||||
padding-inline: var(--size-2);
|
||||
margin-left: var(--size-7);
|
||||
padding-inline: var(--size-3);
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='3'][aria-current='page'],
|
||||
:host([data-layout='inline-columns']) [data-part='anchor'][data-level='4'][aria-current='page'] {
|
||||
:host [data-part='anchor'][data-level='3'][aria-current='page'],
|
||||
:host [data-part='anchor'][data-level='4'][aria-current='page'] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-level='2'] > [aria-current='page'] {
|
||||
:host [data-level='2'] > [aria-current='page'] {
|
||||
background: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
:host([data-layout='inline-columns']) [data-part='list'][data-level='4'] {
|
||||
margin-left: var(--size-4);
|
||||
}
|
||||
`,
|
||||
css`
|
||||
/* ----------------------------
|
||||
* part: root
|
||||
*/
|
||||
|
||||
:host([data-layout='floating-toggle']) {
|
||||
--_width-l0: var(--size-11);
|
||||
--_width-l1: var(--size-13);
|
||||
height: 100vh;
|
||||
/** Make this the positioning parent of l0 and l1 */
|
||||
position: relative;
|
||||
width: calc(var(--_width-l0) + var(--_width-l1));
|
||||
display: block;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* ----------------------------
|
||||
* part: nav
|
||||
*/
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='nav'] {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* ----------------------------
|
||||
* part: l1-wrapper
|
||||
*/
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='l1-wrapper'] {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* ----------------------------
|
||||
* part: level
|
||||
*/
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='level'] {
|
||||
padding-top: var(--size-6);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='level'][data-level='1'] {
|
||||
width: var(--_width-l0);
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--primary-lines-color);
|
||||
}
|
||||
|
||||
/**
|
||||
* When a l0 child is active, or a l1 child => open correct l1
|
||||
*/
|
||||
|
||||
:host([data-layout='floating-toggle'])
|
||||
[data-part='listitem']:not([data-\:active])
|
||||
[data-part='level'][data-level='2']:not([data-\:has-active-child]) {
|
||||
/** TODO: sr-only, because we want to present all links to the screen reader */
|
||||
display: none;
|
||||
}
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='level'][data-level='2'] {
|
||||
width: var(--_width-l1);
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: var(--page-background);
|
||||
padding-inline: var(--size-6);
|
||||
border-right: 1px solid var(--primary-lines-color);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='list'] {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='listitem'] {
|
||||
display: block;
|
||||
margin-bottom: var(--size-6);
|
||||
}
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='icon'][data-level='1'] {
|
||||
display: block;
|
||||
width: var(--size-7);
|
||||
height: var(--size-7);
|
||||
margin-bottom: var(--size-1);
|
||||
}
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='anchor'][data-level='1'] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='anchor'] {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
font-size: 0.875rem;
|
||||
fill: var(--primary-icon-color);
|
||||
}
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='anchor']:hover {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.3em;
|
||||
}
|
||||
|
||||
:host([data-layout='floating-toggle']) [data-part='listitem'][data-\:active] {
|
||||
:host [data-part='list'][data-level='4'] {
|
||||
margin-left: var(--size-3);
|
||||
}
|
||||
`,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
import { getCollection } from 'astro:content';
|
||||
import {
|
||||
isBlogEntry,
|
||||
isComponentInfoEntry,
|
||||
isComponentPageEntry,
|
||||
isFundamentalsEntry,
|
||||
isGuideEntry
|
||||
} from './content/config';
|
||||
|
||||
export const allPages = await getCollection('docs');
|
||||
export const componentInfoEntries = allPages.filter(isComponentInfoEntry);
|
||||
export const componentPageEntries = allPages.filter(isComponentPageEntry);
|
||||
export const blogEntries = allPages.filter(isBlogEntry);
|
||||
export const guideEntries = allPages.filter(isGuideEntry);
|
||||
export const fundamentalsEntries = allPages.filter(isFundamentalsEntry);
|
||||
export const getInfoParentSlug = entry => entry.slug.split('/info')[0];
|
||||
|
||||
|
||||
export const getComponentEntries = (componentName) => {
|
||||
return componentPageEntries.filter(componentEntry => componentEntry.data.component === componentName);
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
import { z, defineCollection } from "astro:content";
|
||||
|
||||
const componentSchema = z.object({
|
||||
component: z.string(),
|
||||
title: z.string().optional(),
|
||||
description: z.string().optional()
|
||||
});
|
||||
|
||||
const anySchema = z.object({
|
||||
any: z.string().optional(),
|
||||
});
|
||||
|
||||
const blogSchema = z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
published: z.boolean(),
|
||||
});
|
||||
|
||||
export const docsCollectionSchema = z.union([
|
||||
blogSchema,
|
||||
componentSchema,
|
||||
anySchema,
|
||||
]);
|
||||
|
||||
const docs = defineCollection({
|
||||
schema: docsCollectionSchema,
|
||||
});
|
||||
|
||||
export const isComponentInfoEntry = (entry) => entry.slug.startsWith('components') && entry.slug.endsWith('/info');
|
||||
export const isComponentPageEntry = (entry) => entry.slug.startsWith('components') && !entry.slug.endsWith('/info');
|
||||
export const isBlogEntry = (entry) => entry.slug.startsWith('blog');
|
||||
export const isFundamentalsEntry = (entry) => entry.slug.startsWith('fundamentals');
|
||||
export const isGuideEntry = (entry) => entry.slug.startsWith('guides');
|
||||
|
||||
export const collections = { docs };
|
||||
7
src/layouts/ComponentsLayout.astro
Normal file
7
src/layouts/ComponentsLayout.astro
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
import MainLayout from './MainLayout.astro';
|
||||
---
|
||||
<MainLayout>
|
||||
<slot />
|
||||
</MainLayout>
|
||||
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
---
|
||||
import { glob } from 'glob'
|
||||
import * as fs from 'fs';
|
||||
import * as process from 'process';
|
||||
import MainLayout from '../../layouts/MainLayout.astro';
|
||||
import { UIPortalInpageNav } from "../../components/ui-portal-inpage-nav.js";
|
||||
import * as path from 'path';
|
||||
import { fundamentalsEntries, allPages } from '../../content';
|
||||
import { blogEntries } from '../../content';
|
||||
import { guideEntries } from '../../content';
|
||||
import { maxDepthForNonComponentsNavigation } from '../../../config.mjs';
|
||||
import { getPages, getInPageNavData, getPagesByDir, getPathForMdjsStroriesFile } from '../../utils/pages/render-entries.ts';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const fundamentalsArr = fundamentalsEntries.map(entry => ({
|
||||
params: {
|
||||
top: 'fundamentals',
|
||||
slug: entry.slug.split('fundamentals/')[1]
|
||||
},
|
||||
props: { entry },
|
||||
}));
|
||||
|
||||
const blogArr = blogEntries.map(entry => ({
|
||||
params: {
|
||||
top: 'blog',
|
||||
slug: entry.slug.split('blog/')[1]
|
||||
},
|
||||
props: { entry },
|
||||
}));
|
||||
|
||||
const guideArr = guideEntries .map(entry => ({
|
||||
params: {
|
||||
top: 'guides',
|
||||
slug: entry.slug.split('guides/')[1]
|
||||
},
|
||||
props: { entry },
|
||||
}));
|
||||
|
||||
const dirArr = allPages
|
||||
.filter(entry => {
|
||||
const separator = '/';
|
||||
const dirPath = path.dirname(entry.slug);
|
||||
const dirParts = dirPath.split(separator);
|
||||
|
||||
return dirParts.length >= maxDepthForNonComponentsNavigation && dirParts[0] !== 'components';
|
||||
})
|
||||
.map(entry => {
|
||||
const separator = '/';
|
||||
const dirPath = path.dirname(entry.slug);
|
||||
const dirParts = dirPath.split(separator);
|
||||
dirParts.splice(maxDepthForNonComponentsNavigation);
|
||||
const result = {
|
||||
params: {
|
||||
top: dirParts.shift(),
|
||||
slug: dirParts.join(separator)
|
||||
},
|
||||
};
|
||||
return result;
|
||||
});
|
||||
|
||||
const uniqueDirArr = [];
|
||||
dirArr.forEach(route => {
|
||||
if (!uniqueDirArr.find(uniqueRoute => uniqueRoute.params.top === route.params.top && uniqueRoute.params.slug === route.params.slug)) {
|
||||
uniqueDirArr.push(route);
|
||||
}
|
||||
});
|
||||
|
||||
return [...fundamentalsArr, ...blogArr, ...guideArr, ...dirArr];
|
||||
}
|
||||
|
||||
const { entry } = Astro.props;
|
||||
|
||||
// URL path as a base for in-page navigation. It is used to add anchors to. F.e. "host://urlPath#header1"
|
||||
const urlPath = entry ? entry.slug : path.join(Astro.params.top, Astro.params.slug);
|
||||
const pages = entry ? await getPages([entry]) : await getPagesByDir(urlPath);
|
||||
const pathForMdjsStroriesFile = await getPathForMdjsStroriesFile(!entry, urlPath);
|
||||
---
|
||||
|
||||
<MainLayout title={entry?.slug}>
|
||||
<UIPortalInpageNav nav-data={JSON.stringify(getInPageNavData(pages, urlPath))} />
|
||||
{
|
||||
pages.map((page) => (
|
||||
<page.Content />
|
||||
))
|
||||
}
|
||||
<script is:inline src="/docs/_assets/scoped-custom-element-registry.min.js"></script>
|
||||
{pathForMdjsStroriesFile && <script type="module" src={pathForMdjsStroriesFile} mdjs-setup></script>}
|
||||
</MainLayout>
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
---
|
||||
import MainLayout from "../../layouts/MainLayout.astro";
|
||||
import { fundamentalsEntries } from "../../content";
|
||||
import { blogEntries } from "../../content";
|
||||
import { guideEntries } from "../../content";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return [{
|
||||
params: { top: 'fundamentals' },
|
||||
props: { entries: fundamentalsEntries },
|
||||
}, {
|
||||
params: { top: 'blog' },
|
||||
props: { entries: blogEntries },
|
||||
}, {
|
||||
params: { top: 'guides' },
|
||||
props: { entries: guideEntries },
|
||||
}];
|
||||
}
|
||||
|
||||
const entries = Astro.props.entries;
|
||||
---
|
||||
|
||||
<MainLayout>
|
||||
<div class="ui-portal-collection">
|
||||
{
|
||||
entries.map((entry) => (
|
||||
<article class="ui-portal-card">
|
||||
<h2>{entry.data.title}</h2>
|
||||
<p>{entry.slug}</p>
|
||||
<p>{entry.data.description}</p>
|
||||
<a href={entry.slug}>View blog</a>
|
||||
</article>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</MainLayout>
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
---
|
||||
import * as path from 'path';
|
||||
import { componentInfoEntries, getComponentEntries } from '../../content';
|
||||
import MainLayout from "../../layouts/MainLayout.astro";
|
||||
import ComponentLayout from "../../layouts/partials/ComponentPartial.astro";
|
||||
import { UIPortalInpageNav } from "../../components/ui-portal-inpage-nav.js";
|
||||
import { getPages, getInPageNavData, getPagesByDir, getPathForMdjsStroriesFile } from '../../utils/pages/render-entries.ts';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return componentInfoEntries.map((entry) => ({
|
||||
params: {
|
||||
component: entry.data.component
|
||||
},
|
||||
props: { entry }
|
||||
}));
|
||||
}
|
||||
|
||||
const { entry } = Astro.props;
|
||||
const urlPath = path.dirname(entry.slug);
|
||||
const pages = await getPagesByDir(urlPath);
|
||||
const pathForMdjsStroriesFile = await getPathForMdjsStroriesFile(true, urlPath);
|
||||
---
|
||||
|
||||
<MainLayout title={entry.slug}>
|
||||
<ComponentLayout frontmatter={entry.data}>
|
||||
<UIPortalInpageNav nav-data={JSON.stringify(getInPageNavData(pages, urlPath))} />
|
||||
{
|
||||
pages.map((page) => (
|
||||
<page.Content />
|
||||
))
|
||||
}
|
||||
<script is:inline src="/docs/_assets/scoped-custom-element-registry.min.js"></script>
|
||||
{pathForMdjsStroriesFile && <script type="module" src={pathForMdjsStroriesFile} mdjs-setup></script>}
|
||||
</ComponentLayout>
|
||||
</MainLayout>
|
||||
12
src/pages/fundamentals/index.astro
Normal file
12
src/pages/fundamentals/index.astro
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
import { getEntry, render } from "astro:content";
|
||||
import MainLayout from "../../layouts/MainLayout.astro";
|
||||
|
||||
const entry = await getEntry('lionFundamentals','index');
|
||||
|
||||
const { Content, headings } = await render(entry);
|
||||
---
|
||||
|
||||
<MainLayout>
|
||||
<Content />
|
||||
</MainLayout>
|
||||
12
src/pages/guides/index.astro
Normal file
12
src/pages/guides/index.astro
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
import { getEntry, render } from "astro:content";
|
||||
import MainLayout from "../../layouts/MainLayout.astro";
|
||||
|
||||
const entry = await getEntry('lionGuides','index');
|
||||
|
||||
const { Content, headings } = await render(entry);
|
||||
---
|
||||
|
||||
<MainLayout>
|
||||
<Content />
|
||||
</MainLayout>
|
||||
|
|
@ -24,7 +24,7 @@ const {
|
|||
))}
|
||||
</div>
|
||||
</div>
|
||||
<img class="page-logo" src="/logo.svg" alt="{title} Logo"/>
|
||||
<img class="page-logo" src=`${import.meta.env.BASE_URL}/logo.svg`" alt="{title} Logo"/>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
|
|
|||
|
|
@ -1,240 +0,0 @@
|
|||
const path = require('path');
|
||||
const fs = require('fs/promises');
|
||||
const process = require('process');
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const imageExtensions = require('image-extensions');
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const findNodeModules = require('find-node-modules');
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const { init, parse } = require('es-module-lexer');
|
||||
const childProcess = require('child_process');
|
||||
|
||||
const sourceDocsPath = 'docs';
|
||||
const contentPathForDocs = 'src/content';
|
||||
const contentDocsPath = `${contentPathForDocs}/docs`;
|
||||
const publicPathForDocs = 'public';
|
||||
const publicDocsPath = `${publicPathForDocs}/docs`;
|
||||
const rootPath = process.cwd();
|
||||
const isDistBuild = process.env.PROD === 'true';
|
||||
|
||||
async function processImportsForFile(filePath) {
|
||||
if (filePath.includes('__mdjs-stories')) {
|
||||
return;
|
||||
}
|
||||
const source = await fs.readFile(filePath, 'utf8');
|
||||
if (source === '' || !source.includes('import')) {
|
||||
return;
|
||||
}
|
||||
const fileExtName = path.extname(filePath);
|
||||
if (fileExtName !== '.js' && fileExtName !== '.mjs' && fileExtName !== '.ts') {
|
||||
return;
|
||||
}
|
||||
let newSource = '';
|
||||
let lastPos = 0;
|
||||
await init;
|
||||
const [imports] = parse(source);
|
||||
for (const importObj of imports) {
|
||||
newSource += source.substring(lastPos, importObj.s);
|
||||
const importSrc = source.substring(importObj.s, importObj.e);
|
||||
const isDynamicImport = importObj.d > -1;
|
||||
|
||||
if (
|
||||
importSrc.startsWith('.') ||
|
||||
importSrc.startsWith('/') ||
|
||||
isDynamicImport ||
|
||||
importSrc.startsWith('import.')
|
||||
) {
|
||||
newSource += importSrc;
|
||||
} else {
|
||||
const nodeModulesLocation = findNodeModules(filePath)[0];
|
||||
const nodeModulesLocation1 = path.join(filePath, nodeModulesLocation);
|
||||
const resolvedImportPath = require.resolve(importSrc, { paths: [nodeModulesLocation1] });
|
||||
const lastNodeModulesDirectoryIndex = resolvedImportPath.lastIndexOf('nodeModulesText');
|
||||
const nodeModulesPath = resolvedImportPath.substring(0, lastNodeModulesDirectoryIndex);
|
||||
const dependencyPath = resolvedImportPath.substring(lastNodeModulesDirectoryIndex);
|
||||
if (nodeModulesPath === rootPath) {
|
||||
newSource += dependencyPath;
|
||||
} else {
|
||||
newSource += resolvedImportPath.split(rootPath)[1];
|
||||
}
|
||||
}
|
||||
|
||||
lastPos = importObj.e;
|
||||
}
|
||||
newSource += source.substring(lastPos, source.length);
|
||||
await fs.writeFile(filePath, newSource);
|
||||
}
|
||||
|
||||
async function createInfoMd(componentDirectoryPath) {
|
||||
const componentName = path.basename(componentDirectoryPath);
|
||||
const infoMd = `---
|
||||
component: ${componentName}
|
||||
title: ${componentName} title
|
||||
description: ${componentName} description
|
||||
---\n`;
|
||||
const infoMdFilePath = path.join(componentDirectoryPath, 'info.md');
|
||||
await fs.mkdir(componentDirectoryPath, { recursive: true });
|
||||
await fs.writeFile(infoMdFilePath, infoMd);
|
||||
}
|
||||
|
||||
function getFrontmatter(text) {
|
||||
const result = {};
|
||||
if (!text.startsWith('---')) {
|
||||
return result;
|
||||
}
|
||||
const frontmatterRegex = /---\n(.+?)\n---/gs;
|
||||
const match = text.matchAll(frontmatterRegex);
|
||||
const matchResult = [...match]?.[0]?.[1] || '';
|
||||
if (matchResult) {
|
||||
matchResult.split('\n').forEach(pair => {
|
||||
const pairArr = pair.split(':');
|
||||
const key = pairArr[0].trim();
|
||||
const value = pairArr[1].trim();
|
||||
result[key] = value;
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function getContent(text) {
|
||||
if (Object.keys(getFrontmatter(text)).length === 0) {
|
||||
return text;
|
||||
}
|
||||
const frontmatterRegex = /---\n(.+?)\n---\n(.*)/gs;
|
||||
const match = text.matchAll(frontmatterRegex);
|
||||
return [...match]?.[0]?.[2] || text;
|
||||
}
|
||||
|
||||
function frontmatterToString(frontmatter) {
|
||||
const prefix = '---\n';
|
||||
let result = prefix;
|
||||
Object.keys(frontmatter).forEach(key => {
|
||||
result += `${key}: ${frontmatter[key]}\n`;
|
||||
});
|
||||
if (result === prefix) {
|
||||
return '';
|
||||
}
|
||||
return `${result}---\n\n`;
|
||||
}
|
||||
|
||||
function addFrontmatter(fileContent, key, value) {
|
||||
const frontmatter = getFrontmatter(fileContent);
|
||||
const content = getContent(fileContent);
|
||||
if (value) {
|
||||
frontmatter[key] = value;
|
||||
}
|
||||
return frontmatterToString(frontmatter) + content;
|
||||
}
|
||||
|
||||
function getOrder(fileContent) {
|
||||
const orderRegexp = /#.+\|\|(\d+)/gm;
|
||||
const match = fileContent.matchAll(orderRegexp);
|
||||
return [...match]?.[0]?.[1];
|
||||
}
|
||||
|
||||
async function copyDocs(currentPath = '') {
|
||||
const files = await fs.readdir(path.join(sourceDocsPath, currentPath));
|
||||
|
||||
for (const file of files) {
|
||||
const sourceDocsFilePath = path.join(sourceDocsPath, currentPath, file);
|
||||
const contentDocsFilePath =
|
||||
file === 'index.md'
|
||||
? path.join(contentDocsPath, currentPath, 'dir-index.md')
|
||||
: path.join(contentDocsPath, currentPath, file);
|
||||
const publicDocsFilePath = path.join(publicDocsPath, currentPath, file);
|
||||
const stats = await fs.lstat(sourceDocsFilePath);
|
||||
|
||||
if (stats.isDirectory()) {
|
||||
if (currentPath === 'components') {
|
||||
await createInfoMd(contentDocsFilePath);
|
||||
}
|
||||
await copyDocs(path.join(currentPath, file));
|
||||
} else {
|
||||
if (
|
||||
(path.extname(file) === '.md' && sourceDocsFilePath !== `${sourceDocsPath}/index.md`) ||
|
||||
imageExtensions.includes(path.extname(file).split('.')[1])
|
||||
) {
|
||||
await fs.mkdir(path.join(contentDocsPath, currentPath), { recursive: true });
|
||||
await fs.copyFile(sourceDocsFilePath, contentDocsFilePath);
|
||||
if (path.extname(file) === '.md') {
|
||||
const fileContent = await fs.readFile(contentDocsFilePath, 'utf8');
|
||||
let updatedFileContent = fileContent;
|
||||
if (contentDocsFilePath.includes('/components')) {
|
||||
const parentComponent = path.basename(currentPath);
|
||||
updatedFileContent = addFrontmatter(fileContent, 'component', parentComponent);
|
||||
}
|
||||
const order = getOrder(fileContent);
|
||||
updatedFileContent = addFrontmatter(updatedFileContent, 'order', order);
|
||||
await fs.writeFile(contentDocsFilePath, updatedFileContent);
|
||||
}
|
||||
}
|
||||
if (path.extname(file) !== '.md') {
|
||||
await fs.mkdir(path.join(publicDocsPath, currentPath), { recursive: true });
|
||||
await fs.copyFile(sourceDocsFilePath, publicDocsFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function copyDocsByFileArray(files) {
|
||||
for (const file of files) {
|
||||
const currentPath = path.dirname(file);
|
||||
const contentDocsFilePath = path.join(contentPathForDocs, file);
|
||||
const publicDocsFilePath = path.join(publicPathForDocs, file);
|
||||
if (path.extname(file) === '.md' && file !== 'index.md') {
|
||||
await fs.mkdir(path.join(contentPathForDocs, currentPath), { recursive: true });
|
||||
await fs.copyFile(file, contentDocsFilePath);
|
||||
|
||||
if (file.includes('/components')) {
|
||||
const fileContent = await fs.readFile(contentDocsFilePath, 'utf8');
|
||||
const parentComponent = path.basename(currentPath);
|
||||
let updatedFileContent = fileContent;
|
||||
updatedFileContent = addFrontmatter(fileContent, 'component', parentComponent);
|
||||
const order = getOrder(fileContent);
|
||||
updatedFileContent = addFrontmatter(updatedFileContent, 'order', order);
|
||||
await fs.writeFile(contentDocsFilePath, updatedFileContent);
|
||||
}
|
||||
}
|
||||
if (path.extname(file) !== '.md') {
|
||||
await fs.mkdir(path.join(publicPathForDocs, currentPath), { recursive: true });
|
||||
await fs.copyFile(file, publicDocsFilePath);
|
||||
await processImportsForFile(publicDocsFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function processImports(currentPath = '') {
|
||||
if (isDistBuild) {
|
||||
return;
|
||||
}
|
||||
const files = await fs.readdir(path.join(publicDocsPath, currentPath));
|
||||
|
||||
for (const file of files) {
|
||||
const publicDocsFilePath = path.join(publicDocsPath, currentPath, file);
|
||||
const stats = await fs.stat(publicDocsFilePath);
|
||||
|
||||
if (stats.isDirectory()) {
|
||||
if (!file.startsWith('_')) {
|
||||
await processImports(path.join(currentPath, file));
|
||||
}
|
||||
} else {
|
||||
await processImportsForFile(publicDocsFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function watch() {
|
||||
const diffStr = childProcess.execSync('git diff --name-only "docs"').toString();
|
||||
const diffArr = diffStr.split('\n').filter(value => value);
|
||||
if (diffArr.length) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Files have been changed: ', diffArr);
|
||||
}
|
||||
await copyDocsByFileArray(diffArr);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
copyDocs,
|
||||
processImports,
|
||||
watch,
|
||||
};
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
const { copyDocs, processImports, watch } = require('./copy-docs.js');
|
||||
|
||||
module.exports = {
|
||||
copyDocs,
|
||||
processImports,
|
||||
watch,
|
||||
};
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
|
|
@ -1,197 +0,0 @@
|
|||
import { glob } from 'glob'
|
||||
import * as fs from 'fs';
|
||||
import * as process from 'process';
|
||||
import * as path from 'path';
|
||||
import { fundamentalsEntries, allPages } from '../../content';
|
||||
import { maxDepthForNonComponentsNavigation } from '../../../config.mjs';
|
||||
|
||||
const convertHeadingsToInPageNavData = (headings, urlPath) => {
|
||||
return headings.map(header => {
|
||||
const anchor = header.slug;
|
||||
return {
|
||||
name: header.text,
|
||||
url: `/${urlPath}#${anchor}`
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
const parseEntries = async (entries) => {
|
||||
const contents = [];
|
||||
for (const componentEntry of entries) {
|
||||
const { Content, headings, remarkPluginFrontmatter } = await componentEntry.render();
|
||||
const order = remarkPluginFrontmatter.order;
|
||||
const slug = componentEntry.slug;
|
||||
const content = {Content, headings, order, slug};
|
||||
contents.push(content);
|
||||
}
|
||||
return contents;
|
||||
};
|
||||
|
||||
export const getInPageNavData = (contentItems, urlPath) => {
|
||||
const inPageNavData = [];
|
||||
const parentDirToNavDataMap = new Map();
|
||||
const arePagesConcatenated = contentItems.length > 1;
|
||||
for (const contentItem of contentItems) {
|
||||
const headersH2 = contentItem.headings.filter(header => header.depth === 2);
|
||||
const parentDirName = path.dirname(contentItem.slug);
|
||||
if (headersH2.length !== 0) {
|
||||
const entryInPageNavData = convertHeadingsToInPageNavData(headersH2, urlPath)[0];
|
||||
const headersH3 = contentItem.headings.filter(header => header.depth === 3);
|
||||
if (headersH3.length !== 0) {
|
||||
entryInPageNavData.children = convertHeadingsToInPageNavData(headersH3, urlPath);
|
||||
}
|
||||
inPageNavData.push(entryInPageNavData);
|
||||
parentDirToNavDataMap.set(parentDirName, entryInPageNavData);
|
||||
} else {
|
||||
const headersH3 = contentItem.headings.filter(header => header.depth === 3);
|
||||
if (headersH3.length !== 0) {
|
||||
const entryInPageNavData = parentDirToNavDataMap.get(parentDirName);
|
||||
if (entryInPageNavData) {
|
||||
entryInPageNavData.children = entryInPageNavData.children || [];
|
||||
entryInPageNavData.children = [...entryInPageNavData.children, ...convertHeadingsToInPageNavData(headersH3, urlPath)];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return inPageNavData;
|
||||
};
|
||||
|
||||
function getContentsWithParentDepth(contents, parentDepth) {
|
||||
return contents.filter(content => {
|
||||
const dirDepth = path.dirname(content.slug).split('/').length;
|
||||
return dirDepth >= parentDepth;
|
||||
});
|
||||
}
|
||||
|
||||
function getSlugForParentDepth(slug, depth) {
|
||||
const slugParts = slug.split('/');
|
||||
const slugPartsForParentDepth = slugParts.slice(0, depth);
|
||||
return slugPartsForParentDepth.join('/');
|
||||
}
|
||||
|
||||
function getUniqueParentDirs(contents, parentDepth) {
|
||||
const dirs = new Set();
|
||||
contents.forEach(content => {
|
||||
dirs.add(getSlugForParentDepth(content.slug, parentDepth));
|
||||
});
|
||||
return [...dirs];
|
||||
}
|
||||
|
||||
function sortDirs(dirs, contents) {
|
||||
dirs.sort((a, b) => {
|
||||
const aDirOrder = contents.find(content => content.slug === path.join(a, 'dir-index')).order;
|
||||
const bDirOrder = contents.find(content => content.slug === path.join(b, 'dir-index')).order;
|
||||
return aDirOrder < bDirOrder ? -1 : 1;
|
||||
});
|
||||
}
|
||||
|
||||
function sortDirectoriesForParentDepth(contents, parentDepth) {
|
||||
|
||||
const reducedContents = getContentsWithParentDepth(contents, parentDepth);
|
||||
|
||||
const uniqueParentDirs = getUniqueParentDirs(reducedContents, parentDepth);
|
||||
|
||||
sortDirs(uniqueParentDirs, reducedContents);
|
||||
contents.sort((a, b) => {
|
||||
const aParentDir = getSlugForParentDepth(a.slug, parentDepth);
|
||||
const bParentDir = getSlugForParentDepth(b.slug, parentDepth);
|
||||
if (uniqueParentDirs.indexOf(aParentDir) > uniqueParentDirs.indexOf(bParentDir)) {
|
||||
return 1;
|
||||
} else if (uniqueParentDirs.indexOf(aParentDir) < uniqueParentDirs.indexOf(bParentDir)) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function sortDirectories(contents) {
|
||||
let parentDepth = maxDepthForNonComponentsNavigation + 1;
|
||||
let hasParentWithDepth = contents.some(content => path.dirname(content.slug).split('/').length === parentDepth);
|
||||
|
||||
while(hasParentWithDepth) {
|
||||
sortDirectoriesForParentDepth(contents, parentDepth);
|
||||
parentDepth++;
|
||||
hasParentWithDepth = contents.some(content => path.dirname(content.slug).split('/').length === parentDepth);
|
||||
}
|
||||
}
|
||||
|
||||
function sort(contents) {
|
||||
contents.sort((a, b) => {
|
||||
// Get paths with fewer depth first
|
||||
if (a.slug.split('/').length < b.slug.split('/').length) {
|
||||
return -1;
|
||||
} else if (a.slug.split('/').length > b.slug.split('/').length) {
|
||||
return 1;
|
||||
}
|
||||
// same depth
|
||||
else {
|
||||
// same parent
|
||||
if (path.dirname(a.slug) === path.dirname(b.slug)) {
|
||||
if (path.basename(a.slug) === 'dir-index') {
|
||||
return -1;
|
||||
} else if (path.basename(b.slug) === 'dir-index') {
|
||||
return 1;
|
||||
} else {
|
||||
return a.order < b.order ? -1 : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export async function getPages(entries) {
|
||||
const contents = await parseEntries(entries);
|
||||
sortDirectories(contents);
|
||||
sort(contents);
|
||||
return contents;
|
||||
}
|
||||
|
||||
export const getPagesByDir = async (directoryPath) => {
|
||||
const entries = getEntriesByDir(directoryPath);
|
||||
return await getPages(entries);
|
||||
};
|
||||
|
||||
const getEntriesByDir = (dirname) => {
|
||||
return allPages.filter(childEntry => {
|
||||
return childEntry.slug.startsWith(dirname)});
|
||||
};
|
||||
|
||||
const getMdjsStories = (fullDirPath) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
glob(fullDirPath + '/**/__mdjs-stories--*.js', {}, (err, files)=>{
|
||||
const relativePaths = files.map(file => {
|
||||
return path.relative(fullDirPath, file);
|
||||
});
|
||||
resolve(relativePaths);
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {boolean} isUrlPathADirectory `True` if the `urlPath` paramter is a url path to a directory with multiple md files.
|
||||
* `false` if the `urlPath` paramter is a url path to a single md file
|
||||
*/
|
||||
export async function getPathForMdjsStroriesFile(isUrlPathADirectory, urlPath) {
|
||||
if (!isUrlPathADirectory) {
|
||||
const mdjsStroriesFileDirectory = path.dirname(urlPath);
|
||||
return `/docs/${mdjsStroriesFileDirectory}/__mdjs-stories--${path.basename(urlPath)}.js`;
|
||||
}
|
||||
if (urlPath) {
|
||||
let mdjsStoriesJsPath = '';
|
||||
const fullDirPath = path.join(process.cwd(), 'public/docs', urlPath);
|
||||
const files = await getMdjsStories(fullDirPath);
|
||||
let imports = '';
|
||||
files.forEach(file => {
|
||||
imports += `import('./${file}');\n`
|
||||
});
|
||||
if (imports) {
|
||||
mdjsStoriesJsPath = path.join(fullDirPath, '__mdjs-stories.js');
|
||||
fs.writeFileSync(mdjsStoriesJsPath, imports, 'utf8');
|
||||
}
|
||||
if (mdjsStoriesJsPath) {
|
||||
return '/docs' + mdjsStoriesJsPath.split('/docs')[1];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
const { postBuildDist } = require('./post-build-dist.js');
|
||||
|
||||
module.exports = {
|
||||
postBuildDist,
|
||||
};
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
const { execSync } = require('child_process');
|
||||
const fs = require('fs');
|
||||
|
||||
const distDocs = 'dist/docs';
|
||||
|
||||
const getAllFiles = (dirPath, arrayOfFiles) => {
|
||||
const files = fs.readdirSync(dirPath);
|
||||
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
arrayOfFiles = arrayOfFiles || [];
|
||||
|
||||
files.forEach(file => {
|
||||
if (fs.statSync(`${dirPath}/${file}`).isDirectory()) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
arrayOfFiles = getAllFiles(`${dirPath}/${file}`, arrayOfFiles);
|
||||
} else if (file === '__mdjs-stories.js') {
|
||||
execSync(
|
||||
`npx rollup ${dirPath}/__mdjs-stories.js --config rollup.config-test.js --dir ${dirPath}/`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
return arrayOfFiles;
|
||||
};
|
||||
|
||||
const postBuildDist = () => {
|
||||
getAllFiles(distDocs);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
postBuildDist,
|
||||
};
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const { init } = require('es-module-lexer');
|
||||
const path = require('path');
|
||||
|
||||
let isToBeConcatenated;
|
||||
let maxDepthForNonComponentsNavigation;
|
||||
let docsDirName;
|
||||
let visit;
|
||||
(async () => {
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const result = await import('unist-util-visit');
|
||||
visit = result.visit;
|
||||
|
||||
const config = await import('../../../../config.mjs');
|
||||
isToBeConcatenated = config.isToBeConcatenated;
|
||||
maxDepthForNonComponentsNavigation = config.maxDepthForNonComponentsNavigation;
|
||||
docsDirName = config.docsDirName;
|
||||
})();
|
||||
|
||||
// function addOverviewTitleToIndexMd(tree, isIndexMd) {
|
||||
// let h1Index = null;
|
||||
// tree.children.forEach((item, index) => {
|
||||
// if (item.depth === 1 && item.type === 'heading' && isIndexMd) {
|
||||
// h1Index = index;
|
||||
// }
|
||||
// });
|
||||
// if (h1Index !== null) {
|
||||
// tree.children.splice(1, 0, {
|
||||
// type: 'heading',
|
||||
// depth: 2,
|
||||
// children: [
|
||||
// {
|
||||
// type: 'text',
|
||||
// value: 'Index',
|
||||
// },
|
||||
// ],
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
function cleanupRocketMetadata() {
|
||||
/**
|
||||
* @param {Node} tree
|
||||
*/
|
||||
async function transformer(tree, file) {
|
||||
const filePath = file.history[0];
|
||||
const isIndexMd = path.basename(filePath) === 'dir-index.md';
|
||||
const filePathFromProjectRoot = filePath.split(docsDirName)[1];
|
||||
const depthDelta =
|
||||
path.dirname(filePathFromProjectRoot).split('/').length - maxDepthForNonComponentsNavigation;
|
||||
|
||||
/**
|
||||
* @param {UnistNode} _node
|
||||
*/
|
||||
async function nodeCodeVisitor(_node, index, parent) {
|
||||
if (parent.type === 'heading' && isToBeConcatenated(filePath)) {
|
||||
if (parent.depth === 1) {
|
||||
const splitByOrder = _node.value.split('||');
|
||||
const splitByArrows = splitByOrder[0].split('>>');
|
||||
const title = splitByArrows[splitByArrows.length - 1].trim();
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
_node.value = title;
|
||||
if (isIndexMd) {
|
||||
if (depthDelta > 0) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
parent.depth += depthDelta;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
parent.depth += 1 + depthDelta;
|
||||
}
|
||||
}
|
||||
|
||||
// unifiedjs expects node changes to be made on the given node...
|
||||
await init;
|
||||
visit(tree, ['text', 'inlineCode'], nodeCodeVisitor);
|
||||
// addOverviewTitleToIndexMd(tree, isIndexMd);
|
||||
return tree;
|
||||
}
|
||||
|
||||
return transformer;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
cleanupRocketMetadata,
|
||||
};
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
const { cleanupRocketMetadata } = require('./cleanupRocketMetadata.js');
|
||||
|
||||
module.exports = {
|
||||
cleanupRocketMetadata,
|
||||
};
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
const { updateMainTagsForMdjsStories } = require('./updateMainTagsForMdjsStories.js');
|
||||
|
||||
module.exports = {
|
||||
updateMainTagsForMdjsStories,
|
||||
};
|
||||
|
|
@ -1 +0,0 @@
|
|||
{}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const { init, parse } = require('es-module-lexer');
|
||||
const path = require('path');
|
||||
|
||||
let visit;
|
||||
(async () => {
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const result = await import('unist-util-visit');
|
||||
visit = result.visit;
|
||||
})();
|
||||
|
||||
/**
|
||||
* @param {string} code
|
||||
* @param {{type: StoryTypes}} options
|
||||
* @returns {Story}
|
||||
*/
|
||||
function extractStoryData(code, { type = 'js' } = { type: 'js' }) {
|
||||
const parsed = parse(code);
|
||||
const key = parsed[1][0];
|
||||
const name = key;
|
||||
return { key, name, code, type };
|
||||
}
|
||||
|
||||
function updateMainTagsForMdjsStories() {
|
||||
let parsedPath = '';
|
||||
|
||||
/**
|
||||
* @param {UnistNode} _node
|
||||
*/
|
||||
const nodeCodeVisitor = _node => {
|
||||
const node = /** @type {UnistNode & {[key: string]: unknown}} */ (_node);
|
||||
if (node.lang === 'js' && node.meta === 'preview-story' && typeof node.value === 'string') {
|
||||
const storyData = extractStoryData(node.value);
|
||||
const mainTagName = storyData.name;
|
||||
let mdFileName = path.basename(parsedPath);
|
||||
mdFileName = mdFileName.replaceAll('-', '_');
|
||||
node.value = node.value.replace(mainTagName, `${mainTagName}__${mdFileName}`);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Node} tree
|
||||
* @param {VFileOptions} file
|
||||
*/
|
||||
async function transformer(tree, file) {
|
||||
const currentMarkdownFile = file.history[0];
|
||||
|
||||
if (currentMarkdownFile) {
|
||||
const leftSideParsedPath = currentMarkdownFile.split('src/content/')[1];
|
||||
// eslint-disable-next-line prefer-destructuring
|
||||
parsedPath = leftSideParsedPath.split('.md')[0];
|
||||
}
|
||||
|
||||
// unifiedjs expects node changes to be made on the given node...
|
||||
await init;
|
||||
// @ts-ignore
|
||||
visit(tree, 'code', nodeCodeVisitor);
|
||||
|
||||
return tree;
|
||||
}
|
||||
|
||||
return transformer;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
updateMainTagsForMdjsStories,
|
||||
};
|
||||
Loading…
Reference in a new issue