From f705cb5a0ca7932ea88480b1793b915f47b52146 Mon Sep 17 00:00:00 2001 From: Hammy <58985301+sgoudham@users.noreply.github.com> Date: Sun, 22 Sep 2024 22:12:00 +0100 Subject: [PATCH] feat!: deprecate rust plugin & update sass files (#112) --- Cargo.lock | 801 ++------------ Cargo.toml | 13 +- README.md | 11 +- example/book.toml | 7 +- example/theme/catppuccin-admonish.css | 2 +- example/theme/catppuccin.css | 2 +- example/theme/index.hbs | 6 +- flake.lock | 6 +- flake.nix | 10 +- .../dist}/catppuccin-admonish.css | 422 ++++---- .../assets => palette/dist}/catppuccin.css | 984 +++++++++--------- palette/package-lock.json | 29 +- palette/package.json | 10 +- src/bin/assets/index.hbs | 348 ------- src/bin/mdbook-catppuccin.rs | 292 ------ src/lib.rs | 91 -- src/main.rs | 54 + src/toml.rs | 89 -- 18 files changed, 897 insertions(+), 2280 deletions(-) rename {src/bin/assets => palette/dist}/catppuccin-admonish.css (100%) rename {src/bin/assets => palette/dist}/catppuccin.css (100%) delete mode 100644 src/bin/assets/index.hbs delete mode 100644 src/bin/mdbook-catppuccin.rs delete mode 100644 src/lib.rs create mode 100644 src/main.rs delete mode 100644 src/toml.rs diff --git a/Cargo.lock b/Cargo.lock index e1eac71..eaf7c9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,28 +4,13 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - [[package]] name = "anstream" version = "0.6.4" @@ -61,7 +46,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -71,81 +56,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", - "windows-sys", -] - -[[package]] -name = "anyhow" -version = "1.0.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bstr" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" -dependencies = [ - "memchr", - "regex-automata", - "serde", -] - -[[package]] -name = "bumpalo" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -167,7 +78,6 @@ dependencies = [ "anstyle", "clap_lex", "strsim", - "terminal_size", ] [[package]] @@ -191,46 +101,11 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cpufeatures" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -239,74 +114,11 @@ dependencies = [ "termcolor", ] -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "fastrand" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "handlebars" -version = "4.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" -dependencies = [ - "log", - "pest", - "pest_derive", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" - [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "humantime" @@ -314,76 +126,22 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "iana-time-zone" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "indexmap" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" -dependencies = [ - "equivalent", - "hashbrown", -] - [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ "hermit-abi", - "rustix", - "windows-sys", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "js-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" -dependencies = [ - "wasm-bindgen", + "libc", + "windows-sys 0.52.0", ] [[package]] name = "libc" -version = "0.2.147" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[package]] -name = "linux-raw-sys" -version = "0.4.3" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "log" @@ -391,175 +149,27 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "mdbook" -version = "0.4.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c3f88addd34930bc5f01b9dc19f780447e51c92bf2536e3ded058018271775d" -dependencies = [ - "anyhow", - "chrono", - "clap", - "clap_complete", - "env_logger", - "handlebars", - "log", - "memchr", - "once_cell", - "opener", - "pulldown-cmark", - "regex", - "serde", - "serde_json", - "shlex", - "tempfile", - "toml", - "topological-sort", -] - [[package]] name = "mdbook-catppuccin" -version = "2.2.0" +version = "3.0.0" dependencies = [ "clap", "clap_complete", "env_logger", "log", - "mdbook", - "semver", - "serde_json", - "toml_edit", - "version-compare", ] [[package]] name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "normpath" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec60c60a693226186f5d6edf073232bfb6464ed97eb22cf3b01c1e8198fd97f5" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "num-traits" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "opener" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c62dcb6174f9cb326eac248f07e955d5d559c272730b6c03e396b443b562788" -dependencies = [ - "bstr", - "normpath", - "winapi", -] - -[[package]] -name = "pest" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d2d1d55045829d65aad9d389139882ad623b33b904e7c9f1b10c5b8927298e5" -dependencies = [ - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f94bca7e7a599d89dea5dfa309e217e7906c3c007fb9c3299c40b10d6a315d3" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d490fe7e8556575ff6911e45567ab95e71617f43781e5c05490dc8d75c965c" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pest_meta" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674c66ebb4b4d9036012091b537aae5878970d6999f81a265034d85b136b341" -dependencies = [ - "once_cell", - "pest", - "sha2", -] - -[[package]] -name = "proc-macro2" -version = "1.0.66" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "pulldown-cmark" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" -dependencies = [ - "bitflags 1.3.2", - "memchr", - "unicase", -] - -[[package]] -name = "quote" -version = "1.0.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "regex" -version = "1.9.1" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -569,9 +179,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -580,82 +190,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" - -[[package]] -name = "rustix" -version = "0.38.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" -dependencies = [ - "bitflags 2.3.3", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "semver" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" - -[[package]] -name = "serde" -version = "1.0.178" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60363bdd39a7be0266a520dab25fdc9241d2f987b08a01e01f0ec6d06a981348" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.178" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28482318d6641454cb273da158647922d1be6b5a2fcc6165cd89ebdd7ed576b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha2" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "1.1.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "strsim" @@ -663,128 +200,15 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "syn" -version = "2.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys", -] - [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" -dependencies = [ - "rustix", - "windows-sys", -] - -[[package]] -name = "thiserror" -version = "1.0.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" - -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "topological-sort" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea68304e134ecd095ac6c3574494fc62b909f416c4fca77e440530221e549d3d" - -[[package]] -name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-ident" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" - [[package]] name = "utf8parse" version = "0.2.1" @@ -792,164 +216,128 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] -name = "version-compare" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasm-bindgen" -version = "0.2.87" +name = "winapi-util" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "cfg-if", - "wasm-bindgen-macro", + "windows-sys 0.48.0", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.87" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", + "windows-targets 0.48.1", ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.87" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "quote", - "wasm-bindgen-macro-support", + "windows-targets 0.52.6", ] [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.87" +name = "windows-targets" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" - -[[package]] -name = "winapi" -version = "0.3.9" +name = "windows-targets" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows_aarch64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] -name = "winapi-util" -version = "0.1.5" +name = "windows_aarch64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows_aarch64_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] -name = "windows" -version = "0.48.0" +name = "windows_aarch64_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets", -] +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] -name = "windows-sys" +name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] -name = "windows-targets" -version = "0.48.1" +name = "windows_i686_gnu" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] -name = "windows_aarch64_msvc" +name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] -name = "windows_i686_gnu" -version = "0.48.0" +name = "windows_i686_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] -name = "windows_i686_msvc" +name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -957,6 +345,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_msvc" version = "0.48.0" @@ -964,10 +358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] -name = "winnow" -version = "0.5.1" +name = "windows_x86_64_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b5872fa2e10bd067ae946f927e726d7d603eaeb6e02fa6a350e0722d2b8c11" -dependencies = [ - "memchr", -] +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/Cargo.toml b/Cargo.toml index 4ce7dc4..a8967d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "mdbook-catppuccin" authors = ["Goudham Suresh ", "winston "] description = "🎊 Soothing pastel theme for mdBook" -version = "2.2.0" +version = "3.0.0" edition = "2021" license = "MIT" readme = "README.md" @@ -12,22 +12,13 @@ include = ["/src", "/assets", "/README.md", "/LICENSE"] [[bin]] name = "mdbook-catppuccin" -path = "src/bin/mdbook-catppuccin.rs" - -[lib] -name = "mdbook_catppuccin" -path = "src/lib.rs" +path = "src/main.rs" [dependencies] clap = { version = "4.4.7", features = ["cargo"] } clap_complete = "4.4.4" -mdbook = { version = "0.4.35", default_features = false } env_logger = "0.10.0" log = "0.4.20" -serde_json = "1.0.108" -semver = "1.0.20" -toml_edit = "0.20.7" -version-compare = "0.1.1" [profile.release] lto = true diff --git a/README.md b/README.md index 55c01a5..26f8302 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,13 @@ ## Usage +> [!IMPORTANT] +> The `mdbook-catppuccin` rust package has been deprecated. For further information +> on why this decision was made, please refer to +> [catppuccin/mdBook#107](https://github.com/catppuccin/mdBook/issues/107) +> +> Please follow the instructions below to install the Catppuccin theme for mdBook. + 1. Initialise your mdBook with the theme files: ```shell @@ -55,8 +62,8 @@ 3. Download the following CSS assets from this repository to the `theme` directory: - - [catppuccin.css](src/bin/assets/catppuccin.css) - - [catppuccin-admonish.css](src/bin/assets/catppuccin-admonish.css) (**Only + - [catppuccin.css](palette/dist/catppuccin.css) + - [catppuccin-admonish.css](palette/dist/catppuccin-admonish.css) (**Only required if you are using [mdbook-admonish](https://github.com/tommilligan/mdbook-admonish)**) diff --git a/example/book.toml b/example/book.toml index 48c8d50..594689b 100644 --- a/example/book.toml +++ b/example/book.toml @@ -5,14 +5,9 @@ multilingual = false src = "src" title = "Catppuccin's mdBook" -[preprocessor] - -[preprocessor.catppuccin] -assets_version = "2.1.0" # DO NOT EDIT: Managed by `mdbook-catppuccin install` - [preprocessor.admonish] command = "mdbook-admonish" -assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install` +assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install` [output.html] default-theme = "mocha" diff --git a/example/theme/catppuccin-admonish.css b/example/theme/catppuccin-admonish.css index 889b9e3..d799259 120000 --- a/example/theme/catppuccin-admonish.css +++ b/example/theme/catppuccin-admonish.css @@ -1 +1 @@ -../../src/bin/assets/catppuccin-admonish.css \ No newline at end of file +../../palette/dist/catppuccin-admonish.css \ No newline at end of file diff --git a/example/theme/catppuccin.css b/example/theme/catppuccin.css index a1646c8..fb3bfde 120000 --- a/example/theme/catppuccin.css +++ b/example/theme/catppuccin.css @@ -1 +1 @@ -../../src/bin/assets/catppuccin.css \ No newline at end of file +../../palette/dist/catppuccin.css \ No newline at end of file diff --git a/example/theme/index.hbs b/example/theme/index.hbs index bbf5d11..964cb1a 100644 --- a/example/theme/index.hbs +++ b/example/theme/index.hbs @@ -112,7 +112,9 @@ - + @@ -345,4 +347,4 @@ - \ No newline at end of file + diff --git a/flake.lock b/flake.lock index 804f0a9..e812d6f 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1699099776, - "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", + "lastModified": 1726755586, + "narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", + "rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c4b7f1a..3b21e33 100644 --- a/flake.nix +++ b/flake.nix @@ -16,19 +16,11 @@ }); packages = forAllSystems (pkgs: rec { - mdbook-catppuccin = pkgs.rustPlatform.buildRustPackage rec { + mdbook-catppuccin = pkgs.rustPlatform.buildRustPackage { pname = "mdbook-catppuccin"; inherit version; src = pkgs.nix-gitignore.gitignoreSource [] ./.; cargoLock.lockFile = ./Cargo.lock; - - nativeBuildInputs = with pkgs; [installShellFiles]; - postInstall = '' - installShellCompletion --cmd ${pname} \ - --bash <($out/bin/${pname} completion bash) \ - --fish <($out/bin/${pname} completion fish) \ - --zsh <($out/bin/${pname} completion zsh) - ''; }; default = mdbook-catppuccin; }); diff --git a/src/bin/assets/catppuccin-admonish.css b/palette/dist/catppuccin-admonish.css similarity index 100% rename from src/bin/assets/catppuccin-admonish.css rename to palette/dist/catppuccin-admonish.css index 2a30e9f..d223ee9 100644 --- a/src/bin/assets/catppuccin-admonish.css +++ b/palette/dist/catppuccin-admonish.css @@ -1,183 +1,92 @@ -.mocha :is(.admonition):is(.admonish-hint, .admonish-important, .admonish-tip) { - border-color: #f9e2af; -} -.mocha :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(249, 226, 175, 0.2); -} -.mocha :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #f9e2af; -} -.mocha :is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { - border-color: #f2cdcd; -} -.mocha :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(242, 205, 205, 0.2); -} -.mocha :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #f2cdcd; -} -.mocha :is(.admonition):is(.admonish-example) { - border-color: #cba6f7; -} -.mocha :is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(203, 166, 247, 0.2); -} -.mocha :is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #cba6f7; -} -.mocha :is(.admonition):is(.admonish-info, .admonish-todo) { - border-color: #89dceb; -} -.mocha :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(137, 220, 235, 0.2); -} -.mocha :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #89dceb; -} -.mocha :is(.admonition):is(.admonish-check, .admonish-done, .admonish-success) { - border-color: #a6e3a1; -} -.mocha :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(166, 227, 161, 0.2); -} -.mocha :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #a6e3a1; -} -.mocha :is(.admonition):is(.admonish-note) { - border-color: #89b4fa; -} -.mocha :is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(137, 180, 250, 0.2); -} -.mocha :is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #89b4fa; -} -.mocha :is(.admonition):is(.admonish-attention, .admonish-caution, .admonish-warning) { - border-color: #fab387; -} -.mocha :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(250, 179, 135, 0.2); -} -.mocha :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #fab387; -} -.mocha :is(.admonition):is(.admonish-faq, .admonish-help, .admonish-question) { - border-color: #94e2d5; -} -.mocha :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(148, 226, 213, 0.2); -} -.mocha :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #94e2d5; -} -.mocha :is(.admonition):is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) { - border-color: #f38ba8; -} -.mocha :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(243, 139, 168, 0.2); -} -.mocha :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #f38ba8; -} -.mocha :is(.admonition):is(.admonish-cite, .admonish-quote) { - border-color: #f5c2e7; -} -.mocha :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(245, 194, 231, 0.2); -} -.mocha :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #f5c2e7; -} - -.macchiato :is(.admonition):is(.admonish-hint, .admonish-important, .admonish-tip) { - border-color: #eed49f; +.latte :is(.admonition):is(.admonish-hint, .admonish-important, .admonish-tip) { + border-color: #df8e1d; } -.macchiato :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(238, 212, 159, 0.2); +.latte :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(223, 142, 29, 0.2); } -.macchiato :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #eed49f; +.latte :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #df8e1d; } -.macchiato :is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { - border-color: #f0c6c6; +.latte :is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { + border-color: #dd7878; } -.macchiato :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(240, 198, 198, 0.2); +.latte :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(221, 120, 120, 0.2); } -.macchiato :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #f0c6c6; +.latte :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #dd7878; } -.macchiato :is(.admonition):is(.admonish-example) { - border-color: #c6a0f6; +.latte :is(.admonition):is(.admonish-example) { + border-color: #8839ef; } -.macchiato :is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(198, 160, 246, 0.2); +.latte :is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(136, 57, 239, 0.2); } -.macchiato :is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #c6a0f6; +.latte :is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #8839ef; } -.macchiato :is(.admonition):is(.admonish-info, .admonish-todo) { - border-color: #91d7e3; +.latte :is(.admonition):is(.admonish-info, .admonish-todo) { + border-color: #04a5e5; } -.macchiato :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(145, 215, 227, 0.2); +.latte :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(4, 165, 229, 0.2); } -.macchiato :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #91d7e3; +.latte :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #04a5e5; } -.macchiato :is(.admonition):is(.admonish-check, .admonish-done, .admonish-success) { - border-color: #a6da95; +.latte :is(.admonition):is(.admonish-check, .admonish-done, .admonish-success) { + border-color: #40a02b; } -.macchiato :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(166, 218, 149, 0.2); +.latte :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(64, 160, 43, 0.2); } -.macchiato :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #a6da95; +.latte :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #40a02b; } -.macchiato :is(.admonition):is(.admonish-note) { - border-color: #8aadf4; +.latte :is(.admonition):is(.admonish-note) { + border-color: #1e66f5; } -.macchiato :is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(138, 173, 244, 0.2); +.latte :is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(30, 102, 245, 0.2); } -.macchiato :is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #8aadf4; +.latte :is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #1e66f5; } -.macchiato :is(.admonition):is(.admonish-attention, .admonish-caution, .admonish-warning) { - border-color: #f5a97f; +.latte :is(.admonition):is(.admonish-attention, .admonish-caution, .admonish-warning) { + border-color: #fe640b; } -.macchiato :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(245, 169, 127, 0.2); +.latte :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(254, 100, 11, 0.2); } -.macchiato :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #f5a97f; +.latte :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #fe640b; } -.macchiato :is(.admonition):is(.admonish-faq, .admonish-help, .admonish-question) { - border-color: #8bd5ca; +.latte :is(.admonition):is(.admonish-faq, .admonish-help, .admonish-question) { + border-color: #179299; } -.macchiato :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(139, 213, 202, 0.2); +.latte :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(23, 146, 153, 0.2); } -.macchiato :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #8bd5ca; +.latte :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #179299; } -.macchiato :is(.admonition):is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) { - border-color: #ed8796; +.latte :is(.admonition):is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) { + border-color: #d20f39; } -.macchiato :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(237, 135, 150, 0.2); +.latte :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(210, 15, 57, 0.2); } -.macchiato :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #ed8796; +.latte :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #d20f39; } -.macchiato :is(.admonition):is(.admonish-cite, .admonish-quote) { - border-color: #f5bde6; +.latte :is(.admonition):is(.admonish-cite, .admonish-quote) { + border-color: #ea76cb; } -.macchiato :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(245, 189, 230, 0.2); +.latte :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(234, 118, 203, 0.2); } -.macchiato :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #f5bde6; +.latte :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #ea76cb; } .frappe :is(.admonition):is(.admonish-hint, .admonish-important, .admonish-tip) { @@ -271,93 +180,184 @@ background-color: #f4b8e4; } -.latte :is(.admonition):is(.admonish-hint, .admonish-important, .admonish-tip) { - border-color: #df8e1d; +.macchiato :is(.admonition):is(.admonish-hint, .admonish-important, .admonish-tip) { + border-color: #eed49f; } -.latte :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(223, 142, 29, 0.2); +.macchiato :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(238, 212, 159, 0.2); } -.latte :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #df8e1d; +.macchiato :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #eed49f; } -.latte :is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { - border-color: #dd7878; +.macchiato :is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { + border-color: #f0c6c6; } -.latte :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(221, 120, 120, 0.2); +.macchiato :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(240, 198, 198, 0.2); } -.latte :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #dd7878; +.macchiato :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #f0c6c6; } -.latte :is(.admonition):is(.admonish-example) { - border-color: #8839ef; +.macchiato :is(.admonition):is(.admonish-example) { + border-color: #c6a0f6; } -.latte :is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(136, 57, 239, 0.2); +.macchiato :is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(198, 160, 246, 0.2); } -.latte :is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #8839ef; +.macchiato :is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #c6a0f6; } -.latte :is(.admonition):is(.admonish-info, .admonish-todo) { - border-color: #04a5e5; +.macchiato :is(.admonition):is(.admonish-info, .admonish-todo) { + border-color: #91d7e3; } -.latte :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(4, 165, 229, 0.2); +.macchiato :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(145, 215, 227, 0.2); } -.latte :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #04a5e5; +.macchiato :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #91d7e3; } -.latte :is(.admonition):is(.admonish-check, .admonish-done, .admonish-success) { - border-color: #40a02b; +.macchiato :is(.admonition):is(.admonish-check, .admonish-done, .admonish-success) { + border-color: #a6da95; } -.latte :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(64, 160, 43, 0.2); +.macchiato :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(166, 218, 149, 0.2); } -.latte :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #40a02b; +.macchiato :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #a6da95; } -.latte :is(.admonition):is(.admonish-note) { - border-color: #1e66f5; +.macchiato :is(.admonition):is(.admonish-note) { + border-color: #8aadf4; } -.latte :is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(30, 102, 245, 0.2); +.macchiato :is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(138, 173, 244, 0.2); } -.latte :is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #1e66f5; +.macchiato :is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #8aadf4; } -.latte :is(.admonition):is(.admonish-attention, .admonish-caution, .admonish-warning) { - border-color: #fe640b; +.macchiato :is(.admonition):is(.admonish-attention, .admonish-caution, .admonish-warning) { + border-color: #f5a97f; } -.latte :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(254, 100, 11, 0.2); +.macchiato :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(245, 169, 127, 0.2); } -.latte :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #fe640b; +.macchiato :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #f5a97f; } -.latte :is(.admonition):is(.admonish-faq, .admonish-help, .admonish-question) { - border-color: #179299; +.macchiato :is(.admonition):is(.admonish-faq, .admonish-help, .admonish-question) { + border-color: #8bd5ca; } -.latte :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(23, 146, 153, 0.2); +.macchiato :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(139, 213, 202, 0.2); } -.latte :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #179299; +.macchiato :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #8bd5ca; } -.latte :is(.admonition):is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) { - border-color: #d20f39; +.macchiato :is(.admonition):is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) { + border-color: #ed8796; } -.latte :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(210, 15, 57, 0.2); +.macchiato :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(237, 135, 150, 0.2); } -.latte :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #d20f39; +.macchiato :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #ed8796; } -.latte :is(.admonition):is(.admonish-cite, .admonish-quote) { - border-color: #ea76cb; +.macchiato :is(.admonition):is(.admonish-cite, .admonish-quote) { + border-color: #f5bde6; } -.latte :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title) { - background-color: rgba(234, 118, 203, 0.2); +.macchiato :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(245, 189, 230, 0.2); } -.latte :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title)::before { - background-color: #ea76cb; +.macchiato :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #f5bde6; +} + +.mocha :is(.admonition):is(.admonish-hint, .admonish-important, .admonish-tip) { + border-color: #f9e2af; +} +.mocha :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(249, 226, 175, 0.2); +} +.mocha :is(.admonish-hint, .admonish-important, .admonish-tip) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #f9e2af; +} +.mocha :is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { + border-color: #f2cdcd; +} +.mocha :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(242, 205, 205, 0.2); +} +.mocha :is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #f2cdcd; +} +.mocha :is(.admonition):is(.admonish-example) { + border-color: #cba6f7; +} +.mocha :is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(203, 166, 247, 0.2); +} +.mocha :is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #cba6f7; +} +.mocha :is(.admonition):is(.admonish-info, .admonish-todo) { + border-color: #89dceb; +} +.mocha :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(137, 220, 235, 0.2); +} +.mocha :is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #89dceb; +} +.mocha :is(.admonition):is(.admonish-check, .admonish-done, .admonish-success) { + border-color: #a6e3a1; +} +.mocha :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(166, 227, 161, 0.2); +} +.mocha :is(.admonish-check, .admonish-done, .admonish-success) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #a6e3a1; +} +.mocha :is(.admonition):is(.admonish-note) { + border-color: #89b4fa; +} +.mocha :is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(137, 180, 250, 0.2); +} +.mocha :is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #89b4fa; +} +.mocha :is(.admonition):is(.admonish-attention, .admonish-caution, .admonish-warning) { + border-color: #fab387; +} +.mocha :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(250, 179, 135, 0.2); +} +.mocha :is(.admonish-attention, .admonish-caution, .admonish-warning) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #fab387; +} +.mocha :is(.admonition):is(.admonish-faq, .admonish-help, .admonish-question) { + border-color: #94e2d5; +} +.mocha :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(148, 226, 213, 0.2); +} +.mocha :is(.admonish-faq, .admonish-help, .admonish-question) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #94e2d5; +} +.mocha :is(.admonition):is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) { + border-color: #f38ba8; +} +.mocha :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(243, 139, 168, 0.2); +} +.mocha :is(.admonish-bug, .admonish-danger, .admonish-error, .admonish-fail, .admonish-failure, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #f38ba8; +} +.mocha :is(.admonition):is(.admonish-cite, .admonish-quote) { + border-color: #f5c2e7; +} +.mocha :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title) { + background-color: rgba(245, 194, 231, 0.2); +} +.mocha :is(.admonish-cite, .admonish-quote) > :is(.admonition-title, summary.admonition-title)::before { + background-color: #f5c2e7; } diff --git a/src/bin/assets/catppuccin.css b/palette/dist/catppuccin.css similarity index 100% rename from src/bin/assets/catppuccin.css rename to palette/dist/catppuccin.css index 1ac8146..7cb4c4a 100644 --- a/src/bin/assets/catppuccin.css +++ b/palette/dist/catppuccin.css @@ -1,360 +1,195 @@ -.mocha.hljs { - color: #cdd6f4; - background: #1e1e2e; +.latte.hljs { + color: #4c4f69; + background: #eff1f5; } -.mocha .hljs-keyword { - color: #cba6f7; +.latte .hljs-keyword { + color: #8839ef; } -.mocha .hljs-built_in { - color: #f38ba8; +.latte .hljs-built_in { + color: #d20f39; } -.mocha .hljs-type { - color: #f9e2af; +.latte .hljs-type { + color: #df8e1d; } -.mocha .hljs-literal { - color: #fab387; +.latte .hljs-literal { + color: #fe640b; } -.mocha .hljs-number { - color: #fab387; +.latte .hljs-number { + color: #fe640b; } -.mocha .hljs-operator { - color: #94e2d5; +.latte .hljs-operator { + color: #179299; } -.mocha .hljs-punctuation { - color: #bac2de; +.latte .hljs-punctuation { + color: #5c5f77; } -.mocha .hljs-property { - color: #94e2d5; +.latte .hljs-property { + color: #179299; } -.mocha .hljs-regexp { - color: #f5c2e7; +.latte .hljs-regexp { + color: #ea76cb; } -.mocha .hljs-string { - color: #a6e3a1; +.latte .hljs-string { + color: #40a02b; } -.mocha .hljs-char.escape_ { - color: #a6e3a1; +.latte .hljs-char.escape_ { + color: #40a02b; } -.mocha .hljs-subst { - color: #a6adc8; +.latte .hljs-subst { + color: #6c6f85; } -.mocha .hljs-symbol { - color: #f2cdcd; +.latte .hljs-symbol { + color: #dd7878; } -.mocha .hljs-variable { - color: #cba6f7; +.latte .hljs-variable { + color: #8839ef; } -.mocha .hljs-variable.language_ { - color: #cba6f7; +.latte .hljs-variable.language_ { + color: #8839ef; } -.mocha .hljs-variable.constant_ { - color: #fab387; +.latte .hljs-variable.constant_ { + color: #fe640b; } -.mocha .hljs-title { - color: #89b4fa; +.latte .hljs-title { + color: #1e66f5; } -.mocha .hljs-title.class_ { - color: #f9e2af; +.latte .hljs-title.class_ { + color: #df8e1d; } -.mocha .hljs-title.function_ { - color: #89b4fa; +.latte .hljs-title.function_ { + color: #1e66f5; } -.mocha .hljs-params { - color: #cdd6f4; +.latte .hljs-params { + color: #4c4f69; } -.mocha .hljs-comment { - color: #585b70; +.latte .hljs-comment { + color: #acb0be; } -.mocha .hljs-doctag { - color: #f38ba8; +.latte .hljs-doctag { + color: #d20f39; } -.mocha .hljs-meta { - color: #fab387; +.latte .hljs-meta { + color: #fe640b; } -.mocha .hljs-section { - color: #89b4fa; +.latte .hljs-section { + color: #1e66f5; } -.mocha .hljs-tag { - color: #a6adc8; +.latte .hljs-tag { + color: #6c6f85; } -.mocha .hljs-name { - color: #cba6f7; +.latte .hljs-name { + color: #8839ef; } -.mocha .hljs-attr { - color: #89b4fa; +.latte .hljs-attr { + color: #1e66f5; } -.mocha .hljs-attribute { - color: #a6e3a1; +.latte .hljs-attribute { + color: #40a02b; } -.mocha .hljs-bullet { - color: #94e2d5; +.latte .hljs-bullet { + color: #179299; } -.mocha .hljs-code { - color: #a6e3a1; +.latte .hljs-code { + color: #40a02b; } -.mocha .hljs-emphasis { - color: #f38ba8; +.latte .hljs-emphasis { + color: #d20f39; font-style: italic; } -.mocha .hljs-strong { - color: #f38ba8; +.latte .hljs-strong { + color: #d20f39; font-weight: bold; } -.mocha .hljs-formula { - color: #94e2d5; +.latte .hljs-formula { + color: #179299; } -.mocha .hljs-link { - color: #74c7ec; +.latte .hljs-link { + color: #209fb5; font-style: italic; } -.mocha .hljs-quote { - color: #a6e3a1; +.latte .hljs-quote { + color: #40a02b; font-style: italic; } -.mocha .hljs-selector-tag { - color: #f9e2af; +.latte .hljs-selector-tag { + color: #df8e1d; } -.mocha .hljs-selector-id { - color: #89b4fa; +.latte .hljs-selector-id { + color: #1e66f5; } -.mocha .hljs-selector-class { - color: #94e2d5; +.latte .hljs-selector-class { + color: #179299; } -.mocha .hljs-selector-attr { - color: #cba6f7; +.latte .hljs-selector-attr { + color: #8839ef; } -.mocha .hljs-selector-pseudo { - color: #94e2d5; +.latte .hljs-selector-pseudo { + color: #179299; } -.mocha .hljs-template-tag { - color: #f2cdcd; +.latte .hljs-template-tag { + color: #dd7878; } -.mocha .hljs-template-variable { - color: #f2cdcd; +.latte .hljs-template-variable { + color: #dd7878; } -.mocha .hljs-addition { - color: #a6e3a1; - background: rgba(166, 227, 161, 0.15); +.latte .hljs-addition { + color: #40a02b; + background: rgba(64, 160, 43, 0.15); } -.mocha .hljs-deletion { - color: #f38ba8; - background: rgba(243, 139, 168, 0.15); +.latte .hljs-deletion { + color: #d20f39; + background: rgba(210, 15, 57, 0.15); } -.mocha code { - color: #cdd6f4; - background: #181825; +.latte code { + color: #4c4f69; + background: #e6e9ef; } -.mocha blockquote blockquote { - border-top: 0.1em solid #585b70; - border-bottom: 0.1em solid #585b70; +.latte blockquote blockquote { + border-top: 0.1em solid #acb0be; + border-bottom: 0.1em solid #acb0be; } -.mocha hr { - color: #585b70; +.latte hr { + color: #acb0be; } -.mocha del { - color: #9399b2; +.latte del { + color: #7c7f93; } -.mocha .ace_gutter { - color: #7f849c; - background: #181825; +.latte .ace_gutter { + color: #8c8fa1; + background: #e6e9ef; } -.mocha .ace_gutter-active-line.ace_gutter-cell { - color: #f5c2e7; - background: #181825; +.latte .ace_gutter-active-line.ace_gutter-cell { + color: #ea76cb; + background: #e6e9ef; } -.macchiato.hljs { - color: #cad3f5; - background: #24273a; +.frappe.hljs { + color: #c6d0f5; + background: #303446; } -.macchiato .hljs-keyword { - color: #c6a0f6; +.frappe .hljs-keyword { + color: #ca9ee6; } -.macchiato .hljs-built_in { - color: #ed8796; +.frappe .hljs-built_in { + color: #e78284; } -.macchiato .hljs-type { - color: #eed49f; +.frappe .hljs-type { + color: #e5c890; } -.macchiato .hljs-literal { - color: #f5a97f; +.frappe .hljs-literal { + color: #ef9f76; } -.macchiato .hljs-number { - color: #f5a97f; +.frappe .hljs-number { + color: #ef9f76; } -.macchiato .hljs-operator { - color: #8bd5ca; +.frappe .hljs-operator { + color: #81c8be; } -.macchiato .hljs-punctuation { - color: #b8c0e0; +.frappe .hljs-punctuation { + color: #b5bfe2; } -.macchiato .hljs-property { - color: #8bd5ca; -} -.macchiato .hljs-regexp { - color: #f5bde6; -} -.macchiato .hljs-string { - color: #a6da95; -} -.macchiato .hljs-char.escape_ { - color: #a6da95; -} -.macchiato .hljs-subst { - color: #a5adcb; -} -.macchiato .hljs-symbol { - color: #f0c6c6; -} -.macchiato .hljs-variable { - color: #c6a0f6; -} -.macchiato .hljs-variable.language_ { - color: #c6a0f6; -} -.macchiato .hljs-variable.constant_ { - color: #f5a97f; -} -.macchiato .hljs-title { - color: #8aadf4; -} -.macchiato .hljs-title.class_ { - color: #eed49f; -} -.macchiato .hljs-title.function_ { - color: #8aadf4; -} -.macchiato .hljs-params { - color: #cad3f5; -} -.macchiato .hljs-comment { - color: #5b6078; -} -.macchiato .hljs-doctag { - color: #ed8796; -} -.macchiato .hljs-meta { - color: #f5a97f; -} -.macchiato .hljs-section { - color: #8aadf4; -} -.macchiato .hljs-tag { - color: #a5adcb; -} -.macchiato .hljs-name { - color: #c6a0f6; -} -.macchiato .hljs-attr { - color: #8aadf4; -} -.macchiato .hljs-attribute { - color: #a6da95; -} -.macchiato .hljs-bullet { - color: #8bd5ca; -} -.macchiato .hljs-code { - color: #a6da95; -} -.macchiato .hljs-emphasis { - color: #ed8796; - font-style: italic; -} -.macchiato .hljs-strong { - color: #ed8796; - font-weight: bold; -} -.macchiato .hljs-formula { - color: #8bd5ca; -} -.macchiato .hljs-link { - color: #7dc4e4; - font-style: italic; -} -.macchiato .hljs-quote { - color: #a6da95; - font-style: italic; -} -.macchiato .hljs-selector-tag { - color: #eed49f; -} -.macchiato .hljs-selector-id { - color: #8aadf4; -} -.macchiato .hljs-selector-class { - color: #8bd5ca; -} -.macchiato .hljs-selector-attr { - color: #c6a0f6; -} -.macchiato .hljs-selector-pseudo { - color: #8bd5ca; -} -.macchiato .hljs-template-tag { - color: #f0c6c6; -} -.macchiato .hljs-template-variable { - color: #f0c6c6; -} -.macchiato .hljs-addition { - color: #a6da95; - background: rgba(166, 218, 149, 0.15); -} -.macchiato .hljs-deletion { - color: #ed8796; - background: rgba(237, 135, 150, 0.15); -} -.macchiato code { - color: #cad3f5; - background: #1e2030; -} -.macchiato blockquote blockquote { - border-top: 0.1em solid #5b6078; - border-bottom: 0.1em solid #5b6078; -} -.macchiato hr { - color: #5b6078; -} -.macchiato del { - color: #939ab7; -} -.macchiato .ace_gutter { - color: #8087a2; - background: #1e2030; -} -.macchiato .ace_gutter-active-line.ace_gutter-cell { - color: #f5bde6; - background: #1e2030; -} - -.frappe.hljs { - color: #c6d0f5; - background: #303446; -} -.frappe .hljs-keyword { - color: #ca9ee6; -} -.frappe .hljs-built_in { - color: #e78284; -} -.frappe .hljs-type { - color: #e5c890; -} -.frappe .hljs-literal { - color: #ef9f76; -} -.frappe .hljs-number { - color: #ef9f76; -} -.frappe .hljs-operator { - color: #81c8be; -} -.frappe .hljs-punctuation { - color: #b5bfe2; -} -.frappe .hljs-property { - color: #81c8be; +.frappe .hljs-property { + color: #81c8be; } .frappe .hljs-regexp { color: #f4b8e4; @@ -493,233 +328,366 @@ background: #292c3c; } -.latte.hljs { - color: #4c4f69; - background: #eff1f5; +.macchiato.hljs { + color: #cad3f5; + background: #24273a; } -.latte .hljs-keyword { - color: #8839ef; +.macchiato .hljs-keyword { + color: #c6a0f6; } -.latte .hljs-built_in { - color: #d20f39; +.macchiato .hljs-built_in { + color: #ed8796; } -.latte .hljs-type { - color: #df8e1d; +.macchiato .hljs-type { + color: #eed49f; } -.latte .hljs-literal { - color: #fe640b; +.macchiato .hljs-literal { + color: #f5a97f; } -.latte .hljs-number { - color: #fe640b; +.macchiato .hljs-number { + color: #f5a97f; } -.latte .hljs-operator { - color: #179299; +.macchiato .hljs-operator { + color: #8bd5ca; } -.latte .hljs-punctuation { - color: #5c5f77; +.macchiato .hljs-punctuation { + color: #b8c0e0; } -.latte .hljs-property { - color: #179299; +.macchiato .hljs-property { + color: #8bd5ca; } -.latte .hljs-regexp { - color: #ea76cb; +.macchiato .hljs-regexp { + color: #f5bde6; } -.latte .hljs-string { - color: #40a02b; +.macchiato .hljs-string { + color: #a6da95; } -.latte .hljs-char.escape_ { - color: #40a02b; +.macchiato .hljs-char.escape_ { + color: #a6da95; } -.latte .hljs-subst { - color: #6c6f85; +.macchiato .hljs-subst { + color: #a5adcb; } -.latte .hljs-symbol { - color: #dd7878; +.macchiato .hljs-symbol { + color: #f0c6c6; } -.latte .hljs-variable { - color: #8839ef; +.macchiato .hljs-variable { + color: #c6a0f6; } -.latte .hljs-variable.language_ { - color: #8839ef; +.macchiato .hljs-variable.language_ { + color: #c6a0f6; } -.latte .hljs-variable.constant_ { - color: #fe640b; +.macchiato .hljs-variable.constant_ { + color: #f5a97f; } -.latte .hljs-title { - color: #1e66f5; +.macchiato .hljs-title { + color: #8aadf4; } -.latte .hljs-title.class_ { - color: #df8e1d; +.macchiato .hljs-title.class_ { + color: #eed49f; } -.latte .hljs-title.function_ { - color: #1e66f5; +.macchiato .hljs-title.function_ { + color: #8aadf4; } -.latte .hljs-params { - color: #4c4f69; +.macchiato .hljs-params { + color: #cad3f5; } -.latte .hljs-comment { - color: #acb0be; +.macchiato .hljs-comment { + color: #5b6078; } -.latte .hljs-doctag { - color: #d20f39; +.macchiato .hljs-doctag { + color: #ed8796; } -.latte .hljs-meta { - color: #fe640b; +.macchiato .hljs-meta { + color: #f5a97f; } -.latte .hljs-section { - color: #1e66f5; +.macchiato .hljs-section { + color: #8aadf4; } -.latte .hljs-tag { - color: #6c6f85; +.macchiato .hljs-tag { + color: #a5adcb; } -.latte .hljs-name { - color: #8839ef; +.macchiato .hljs-name { + color: #c6a0f6; } -.latte .hljs-attr { - color: #1e66f5; +.macchiato .hljs-attr { + color: #8aadf4; } -.latte .hljs-attribute { - color: #40a02b; +.macchiato .hljs-attribute { + color: #a6da95; } -.latte .hljs-bullet { - color: #179299; +.macchiato .hljs-bullet { + color: #8bd5ca; } -.latte .hljs-code { - color: #40a02b; +.macchiato .hljs-code { + color: #a6da95; } -.latte .hljs-emphasis { - color: #d20f39; +.macchiato .hljs-emphasis { + color: #ed8796; font-style: italic; } -.latte .hljs-strong { - color: #d20f39; +.macchiato .hljs-strong { + color: #ed8796; font-weight: bold; } -.latte .hljs-formula { - color: #179299; +.macchiato .hljs-formula { + color: #8bd5ca; } -.latte .hljs-link { - color: #209fb5; +.macchiato .hljs-link { + color: #7dc4e4; font-style: italic; } -.latte .hljs-quote { - color: #40a02b; +.macchiato .hljs-quote { + color: #a6da95; font-style: italic; } -.latte .hljs-selector-tag { - color: #df8e1d; +.macchiato .hljs-selector-tag { + color: #eed49f; } -.latte .hljs-selector-id { - color: #1e66f5; +.macchiato .hljs-selector-id { + color: #8aadf4; } -.latte .hljs-selector-class { - color: #179299; +.macchiato .hljs-selector-class { + color: #8bd5ca; } -.latte .hljs-selector-attr { - color: #8839ef; +.macchiato .hljs-selector-attr { + color: #c6a0f6; } -.latte .hljs-selector-pseudo { - color: #179299; +.macchiato .hljs-selector-pseudo { + color: #8bd5ca; } -.latte .hljs-template-tag { - color: #dd7878; +.macchiato .hljs-template-tag { + color: #f0c6c6; } -.latte .hljs-template-variable { - color: #dd7878; +.macchiato .hljs-template-variable { + color: #f0c6c6; } -.latte .hljs-addition { - color: #40a02b; - background: rgba(64, 160, 43, 0.15); +.macchiato .hljs-addition { + color: #a6da95; + background: rgba(166, 218, 149, 0.15); } -.latte .hljs-deletion { - color: #d20f39; - background: rgba(210, 15, 57, 0.15); +.macchiato .hljs-deletion { + color: #ed8796; + background: rgba(237, 135, 150, 0.15); } -.latte code { - color: #4c4f69; - background: #e6e9ef; +.macchiato code { + color: #cad3f5; + background: #1e2030; } -.latte blockquote blockquote { - border-top: 0.1em solid #acb0be; - border-bottom: 0.1em solid #acb0be; +.macchiato blockquote blockquote { + border-top: 0.1em solid #5b6078; + border-bottom: 0.1em solid #5b6078; } -.latte hr { - color: #acb0be; +.macchiato hr { + color: #5b6078; } -.latte del { - color: #7c7f93; +.macchiato del { + color: #939ab7; } -.latte .ace_gutter { - color: #8c8fa1; - background: #e6e9ef; +.macchiato .ace_gutter { + color: #8087a2; + background: #1e2030; } -.latte .ace_gutter-active-line.ace_gutter-cell { - color: #ea76cb; - background: #e6e9ef; +.macchiato .ace_gutter-active-line.ace_gutter-cell { + color: #f5bde6; + background: #1e2030; } -.mocha { - --bg: #1e1e2e; - --fg: #cdd6f4; - --sidebar-bg: #181825; - --sidebar-fg: #cdd6f4; - --sidebar-non-existant: #6c7086; - --sidebar-active: #89b4fa; - --sidebar-spacer: #6c7086; - --scrollbar: #6c7086; - --icons: #6c7086; - --icons-hover: #7f849c; - --links: #89b4fa; - --inline-code-color: #fab387; - --theme-popup-bg: #181825; - --theme-popup-border: #6c7086; - --theme-hover: #6c7086; - --quote-bg: #181825; - --quote-border: #11111b; - --table-border-color: #11111b; - --table-header-bg: #181825; - --table-alternate-bg: #181825; - --searchbar-border-color: #11111b; - --searchbar-bg: #181825; - --searchbar-fg: #cdd6f4; - --searchbar-shadow-color: #11111b; - --searchresults-header-fg: #cdd6f4; - --searchresults-border-color: #11111b; - --searchresults-li-bg: #1e1e2e; - --search-mark-bg: #fab387; - --warning-border: #fab387; +.mocha.hljs { + color: #cdd6f4; + background: #1e1e2e; +} +.mocha .hljs-keyword { + color: #cba6f7; +} +.mocha .hljs-built_in { + color: #f38ba8; +} +.mocha .hljs-type { + color: #f9e2af; +} +.mocha .hljs-literal { + color: #fab387; +} +.mocha .hljs-number { + color: #fab387; +} +.mocha .hljs-operator { + color: #94e2d5; +} +.mocha .hljs-punctuation { + color: #bac2de; +} +.mocha .hljs-property { + color: #94e2d5; +} +.mocha .hljs-regexp { + color: #f5c2e7; +} +.mocha .hljs-string { + color: #a6e3a1; +} +.mocha .hljs-char.escape_ { + color: #a6e3a1; +} +.mocha .hljs-subst { + color: #a6adc8; +} +.mocha .hljs-symbol { + color: #f2cdcd; +} +.mocha .hljs-variable { + color: #cba6f7; +} +.mocha .hljs-variable.language_ { + color: #cba6f7; +} +.mocha .hljs-variable.constant_ { + color: #fab387; +} +.mocha .hljs-title { + color: #89b4fa; +} +.mocha .hljs-title.class_ { + color: #f9e2af; +} +.mocha .hljs-title.function_ { + color: #89b4fa; +} +.mocha .hljs-params { + color: #cdd6f4; +} +.mocha .hljs-comment { + color: #585b70; +} +.mocha .hljs-doctag { + color: #f38ba8; +} +.mocha .hljs-meta { + color: #fab387; +} +.mocha .hljs-section { + color: #89b4fa; +} +.mocha .hljs-tag { + color: #a6adc8; +} +.mocha .hljs-name { + color: #cba6f7; +} +.mocha .hljs-attr { + color: #89b4fa; +} +.mocha .hljs-attribute { + color: #a6e3a1; +} +.mocha .hljs-bullet { + color: #94e2d5; +} +.mocha .hljs-code { + color: #a6e3a1; +} +.mocha .hljs-emphasis { + color: #f38ba8; + font-style: italic; +} +.mocha .hljs-strong { + color: #f38ba8; + font-weight: bold; +} +.mocha .hljs-formula { + color: #94e2d5; +} +.mocha .hljs-link { + color: #74c7ec; + font-style: italic; +} +.mocha .hljs-quote { + color: #a6e3a1; + font-style: italic; +} +.mocha .hljs-selector-tag { + color: #f9e2af; +} +.mocha .hljs-selector-id { + color: #89b4fa; +} +.mocha .hljs-selector-class { + color: #94e2d5; +} +.mocha .hljs-selector-attr { + color: #cba6f7; +} +.mocha .hljs-selector-pseudo { + color: #94e2d5; +} +.mocha .hljs-template-tag { + color: #f2cdcd; +} +.mocha .hljs-template-variable { + color: #f2cdcd; +} +.mocha .hljs-addition { + color: #a6e3a1; + background: rgba(166, 227, 161, 0.15); +} +.mocha .hljs-deletion { + color: #f38ba8; + background: rgba(243, 139, 168, 0.15); +} +.mocha code { + color: #cdd6f4; + background: #181825; +} +.mocha blockquote blockquote { + border-top: 0.1em solid #585b70; + border-bottom: 0.1em solid #585b70; +} +.mocha hr { + color: #585b70; +} +.mocha del { + color: #9399b2; +} +.mocha .ace_gutter { + color: #7f849c; + background: #181825; +} +.mocha .ace_gutter-active-line.ace_gutter-cell { + color: #f5c2e7; + background: #181825; } -.macchiato { - --bg: #24273a; - --fg: #cad3f5; - --sidebar-bg: #1e2030; - --sidebar-fg: #cad3f5; - --sidebar-non-existant: #6e738d; - --sidebar-active: #8aadf4; - --sidebar-spacer: #6e738d; - --scrollbar: #6e738d; - --icons: #6e738d; - --icons-hover: #8087a2; - --links: #8aadf4; - --inline-code-color: #f5a97f; - --theme-popup-bg: #1e2030; - --theme-popup-border: #6e738d; - --theme-hover: #6e738d; - --quote-bg: #1e2030; - --quote-border: #181926; - --table-border-color: #181926; - --table-header-bg: #1e2030; - --table-alternate-bg: #1e2030; - --searchbar-border-color: #181926; - --searchbar-bg: #1e2030; - --searchbar-fg: #cad3f5; - --searchbar-shadow-color: #181926; - --searchresults-header-fg: #cad3f5; - --searchresults-border-color: #181926; - --searchresults-li-bg: #24273a; - --search-mark-bg: #f5a97f; - --warning-border: #f5a97f; +.latte { + --bg: #eff1f5; + --fg: #4c4f69; + --sidebar-bg: #e6e9ef; + --sidebar-fg: #4c4f69; + --sidebar-non-existant: #9ca0b0; + --sidebar-active: #1e66f5; + --sidebar-spacer: #9ca0b0; + --scrollbar: #9ca0b0; + --icons: #9ca0b0; + --icons-hover: #8c8fa1; + --links: #1e66f5; + --inline-code-color: #fe640b; + --theme-popup-bg: #e6e9ef; + --theme-popup-border: #9ca0b0; + --theme-hover: #9ca0b0; + --quote-bg: #e6e9ef; + --quote-border: #dce0e8; + --table-border-color: #dce0e8; + --table-header-bg: #e6e9ef; + --table-alternate-bg: #e6e9ef; + --searchbar-border-color: #dce0e8; + --searchbar-bg: #e6e9ef; + --searchbar-fg: #4c4f69; + --searchbar-shadow-color: #dce0e8; + --searchresults-header-fg: #4c4f69; + --searchresults-border-color: #dce0e8; + --searchresults-li-bg: #eff1f5; + --search-mark-bg: #fe640b; + --warning-border: #fe640b; } .frappe { @@ -754,34 +722,66 @@ --warning-border: #ef9f76; } -.latte { - --bg: #eff1f5; - --fg: #4c4f69; - --sidebar-bg: #e6e9ef; - --sidebar-fg: #4c4f69; - --sidebar-non-existant: #9ca0b0; - --sidebar-active: #1e66f5; - --sidebar-spacer: #9ca0b0; - --scrollbar: #9ca0b0; - --icons: #9ca0b0; - --icons-hover: #8c8fa1; - --links: #1e66f5; - --inline-code-color: #fe640b; - --theme-popup-bg: #e6e9ef; - --theme-popup-border: #9ca0b0; - --theme-hover: #9ca0b0; - --quote-bg: #e6e9ef; - --quote-border: #dce0e8; - --table-border-color: #dce0e8; - --table-header-bg: #e6e9ef; - --table-alternate-bg: #e6e9ef; - --searchbar-border-color: #dce0e8; - --searchbar-bg: #e6e9ef; - --searchbar-fg: #4c4f69; - --searchbar-shadow-color: #dce0e8; - --searchresults-header-fg: #4c4f69; - --searchresults-border-color: #dce0e8; - --searchresults-li-bg: #eff1f5; - --search-mark-bg: #fe640b; - --warning-border: #fe640b; +.macchiato { + --bg: #24273a; + --fg: #cad3f5; + --sidebar-bg: #1e2030; + --sidebar-fg: #cad3f5; + --sidebar-non-existant: #6e738d; + --sidebar-active: #8aadf4; + --sidebar-spacer: #6e738d; + --scrollbar: #6e738d; + --icons: #6e738d; + --icons-hover: #8087a2; + --links: #8aadf4; + --inline-code-color: #f5a97f; + --theme-popup-bg: #1e2030; + --theme-popup-border: #6e738d; + --theme-hover: #6e738d; + --quote-bg: #1e2030; + --quote-border: #181926; + --table-border-color: #181926; + --table-header-bg: #1e2030; + --table-alternate-bg: #1e2030; + --searchbar-border-color: #181926; + --searchbar-bg: #1e2030; + --searchbar-fg: #cad3f5; + --searchbar-shadow-color: #181926; + --searchresults-header-fg: #cad3f5; + --searchresults-border-color: #181926; + --searchresults-li-bg: #24273a; + --search-mark-bg: #f5a97f; + --warning-border: #f5a97f; +} + +.mocha { + --bg: #1e1e2e; + --fg: #cdd6f4; + --sidebar-bg: #181825; + --sidebar-fg: #cdd6f4; + --sidebar-non-existant: #6c7086; + --sidebar-active: #89b4fa; + --sidebar-spacer: #6c7086; + --scrollbar: #6c7086; + --icons: #6c7086; + --icons-hover: #7f849c; + --links: #89b4fa; + --inline-code-color: #fab387; + --theme-popup-bg: #181825; + --theme-popup-border: #6c7086; + --theme-hover: #6c7086; + --quote-bg: #181825; + --quote-border: #11111b; + --table-border-color: #11111b; + --table-header-bg: #181825; + --table-alternate-bg: #181825; + --searchbar-border-color: #11111b; + --searchbar-bg: #181825; + --searchbar-fg: #cdd6f4; + --searchbar-shadow-color: #11111b; + --searchresults-header-fg: #cdd6f4; + --searchresults-border-color: #11111b; + --searchresults-li-bg: #1e1e2e; + --search-mark-bg: #fab387; + --warning-border: #fab387; } diff --git a/palette/package-lock.json b/palette/package-lock.json index f2634b5..ede754c 100644 --- a/palette/package-lock.json +++ b/palette/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "devDependencies": { "@catppuccin/highlightjs": "^0.1.3", - "@catppuccin/palette": "^0.1.6", + "@catppuccin/palette": "^1.4.0", "sass": "^1.58.3" } }, @@ -31,9 +31,9 @@ ] }, "node_modules/@catppuccin/palette": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@catppuccin/palette/-/palette-0.1.6.tgz", - "integrity": "sha512-Jf4UD510Q0n1CadMY0OoSJU0wBpphWDGAvToGrb/1mub9v2/ZSGUBMfvAKyOdKB4yyfkN8Ym1n8+1bNAW18doA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@catppuccin/palette/-/palette-1.4.0.tgz", + "integrity": "sha512-Npdg/QFeMAEbRVlnJqc1xE3i7NI4liSq4tTTXk4U/L3vPEiqw3bZQJRLYjuP0Vq2AEDNS5H5Li+lk27c38sP4g==", "dev": true, "funding": [ { @@ -44,7 +44,8 @@ "type": "github", "url": "https://github.com/sponsors/catppuccin" } - ] + ], + "license": "MIT" }, "node_modules/anymatch": { "version": "3.1.3", @@ -69,12 +70,13 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -108,10 +110,11 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -189,6 +192,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -257,6 +261,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, diff --git a/palette/package.json b/palette/package.json index 66353a5..b824c48 100644 --- a/palette/package.json +++ b/palette/package.json @@ -3,7 +3,7 @@ "version": "2.2.0", "description": "Soothing pastel theme for mdBook", "scripts": { - "build": "sass -I node_modules --no-charset --no-source-map catppuccin.scss:../src/bin/assets/catppuccin.css catppuccin-admonish.scss:../src/bin/assets/catppuccin-admonish.css" + "build": "sass -I node_modules --no-charset --no-source-map catppuccin.scss:dist/catppuccin.css catppuccin-admonish.scss:dist/catppuccin-admonish.css" }, "repository": { "type": "git", @@ -16,8 +16,8 @@ }, "homepage": "https://github.com/catppuccin/mdBook#readme", "devDependencies": { - "@catppuccin/highlightjs": "^0.1.3", - "@catppuccin/palette": "^0.1.6", - "sass": "^1.58.3" + "@catppuccin/highlightjs": "^1.0.0", + "@catppuccin/palette": "^1.4.0", + "sass": "^1.79.3" } -} +} \ No newline at end of file diff --git a/src/bin/assets/index.hbs b/src/bin/assets/index.hbs deleted file mode 100644 index bbf5d11..0000000 --- a/src/bin/assets/index.hbs +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - {{ title }} - {{#if is_print }} - - {{/if}} - {{#if base_url}} - - {{/if}} - - - - {{> head}} - - - - - - {{#if favicon_svg}} - - {{/if}} - {{#if favicon_png}} - - {{/if}} - - - - {{#if print_enable}} - - {{/if}} - - - - {{#if copy_fonts}} - - {{/if}} - - - - - - - - {{#each additional_css}} - - {{/each}} - - {{#if mathjax_support}} - - - {{/if}} - - -
- - - - - - - - - - - - - - - - - - - -
- -
- {{> header}} - - - - {{#if search_enabled}} - - {{/if}} - - - - -
-
- {{{ content }}} -
- - -
-
- - - -
- - {{#if live_reload_endpoint}} - - - {{/if}} - - {{#if google_analytics}} - - - {{/if}} - - {{#if playground_line_numbers}} - - {{/if}} - - {{#if playground_copyable}} - - {{/if}} - - {{#if playground_js}} - - - - - - {{/if}} - - {{#if search_js}} - - - - {{/if}} - - - - - - - {{#each additional_js}} - - {{/each}} - - {{#if is_print}} - {{#if mathjax_support}} - - {{else}} - - {{/if}} - {{/if}} - -
- - \ No newline at end of file diff --git a/src/bin/mdbook-catppuccin.rs b/src/bin/mdbook-catppuccin.rs deleted file mode 100644 index a913f84..0000000 --- a/src/bin/mdbook-catppuccin.rs +++ /dev/null @@ -1,292 +0,0 @@ -use std::{io, process}; - -use clap::{ - command, crate_authors, crate_description, crate_version, value_parser, Arg, ArgAction, - ArgMatches, Command, -}; -use clap_complete::{generate, Generator, Shell}; -use log::warn; -use mdbook::errors::Error; -use mdbook::preprocess::{CmdPreprocessor, Preprocessor}; -use semver::{Version, VersionReq}; - -use mdbook_catppuccin::Catppuccin; - -fn main() { - env_logger::init_from_env(env_logger::Env::default().default_filter_or("info")); - - warn!( - r#"mdbook-catppuccin will no longer support automatic tracking of assets in the next release and this package will be deprecated. -Please uninstall this preprocessor by running 'cargo uninstall mdbook-catppuccin' and remove '[preprocessor.catppuccin]' from your 'book.toml' file. -For further information on why this package will no longer work, please refer to https://github.com/catppuccin/mdBook/issues/107. -"# - ); - - let matches = make_app().get_matches(); - - if let Some(generator) = matches.subcommand_matches("completion") { - let generator = generator - .get_one::("shell") - .expect("Shell argument is required"); - let mut cmd = make_app(); - eprintln!("Generating completion file for {generator}..."); - print_completions(*generator, &mut cmd); - return; - } - - let preprocessor = Catppuccin::new(); - - if let Some(sub_args) = matches.subcommand_matches("supports") { - handle_supports(&preprocessor, sub_args); - } else if let Some(sub_args) = matches.subcommand_matches("install") { - install::handle_install(sub_args) - } else if let Err(e) = handle_preprocessing(&preprocessor) { - eprintln!("{}", e); - process::exit(1); - } -} - -fn print_completions(gen: G, cmd: &mut Command) { - generate(gen, cmd, cmd.get_name().to_string(), &mut io::stdout()); -} - -pub fn make_app() -> Command { - command!() - .name("mdbook-catppuccin") - .about(crate_description!()) - .author(crate_authors!()) - .version(crate_version!()) - .subcommand( - command!("supports") - .arg( - Arg::new("renderer").required(true) - ) - .about("Check whether a renderer is supported by this preprocessor"), - ) - .subcommand( - command!("install") - .arg( - Arg::new("dir") - .default_value(".") - .help("Root directory for the book, this should contain the configuration file `book.toml`") - ) - .arg( - Arg::new("force") - .long("force") - .short('f') - .action(ArgAction::SetTrue) - .help("Forcefully overwrite the existing 'index.hbs' file") - ) - .about("Install the necessary files needed and update the config to include them"), - ) - .subcommand( - command!("completion") - .arg( - Arg::new("shell") - .action(ArgAction::Set) - .required(true) - .value_parser(value_parser!(Shell)) - ) - .about("Generate shell completion scripts") - ) -} - -fn handle_preprocessing(pre: &Catppuccin) -> Result<(), Error> { - let (ctx, book) = CmdPreprocessor::parse_input(io::stdin())?; - - let book_version = Version::parse(&ctx.mdbook_version)?; - let version_req = VersionReq::parse(mdbook::MDBOOK_VERSION)?; - - if !version_req.matches(&book_version) { - eprintln!( - "Warning: The {} plugin was built against version {} of mdbook, \ - but we're being called from version {}", - pre.name(), - mdbook::MDBOOK_VERSION, - ctx.mdbook_version - ); - } - - let processed_book = pre.run(&ctx, book)?; - serde_json::to_writer(io::stdout(), &processed_book)?; - - Ok(()) -} - -fn handle_supports(pre: &Catppuccin, sub_args: &ArgMatches) -> ! { - let renderer = sub_args - .get_one::("renderer") - .expect("Required argument"); - - if pre.supports_renderer(renderer) { - process::exit(0); - } else { - process::exit(1); - } -} - -mod install { - use mdbook_catppuccin::log_major_version_difference; - use std::fs::File; - use std::io::{ErrorKind, Write}; - use std::path::Path; - use std::{fs, path::PathBuf}; - - use clap::ArgMatches; - use log::{error, info, warn}; - use mdbook_catppuccin::toml::ItemExt; - use toml_edit::{Document, Value}; - - use mdbook_catppuccin::{ - toml::{ArrayExt, DocumentExt, TableExt}, - TomlPath, - }; - - const VERSION: &str = env!("CARGO_PKG_VERSION"); - const CATPPUCCIN_ASSETS: &[(&str, TomlPath, &[u8])] = &[ - ( - "catppuccin.css", - TomlPath::Path("additional-css"), - include_bytes!("./assets/catppuccin.css"), - ), - ( - "catppuccin-admonish.css", - TomlPath::Path("additional-css"), - include_bytes!("./assets/catppuccin-admonish.css"), - ), - ( - "index.hbs", - TomlPath::None, - include_bytes!("./assets/index.hbs"), - ), - ]; - - pub(crate) fn handle_install(sub_args: &ArgMatches) { - let dir = sub_args.get_one::("dir").unwrap(); - let project_dir = PathBuf::from(dir); - let toml_config = project_dir.join("book.toml"); - let is_force = sub_args.get_flag("force"); - - if !toml_config.exists() { - error!( - "Configuration TOML file '{}' is missing!", - toml_config.display() - ); - return; - } - - let (toml, mut document) = read_configuration_file(&toml_config); - let theme_dir = populate_theme_directory(&document, &project_dir); - copy_assets(&mut document, &theme_dir, is_force); - update_configuration_file(document, toml, toml_config); - - info!("mdbook-catppuccin is now installed. Build your book with `mdbook build` to try out your new catppuccin colour palettes!"); - } - - fn read_configuration_file(toml_config: &PathBuf) -> (String, Document) { - info!("Reading configuration file '{}'", toml_config.display()); - let toml = fs::read_to_string(toml_config).expect("Can't read configuration file"); - let document = toml - .parse::() - .expect("Configuration is not valid TOML"); - (toml, document) - } - - fn populate_theme_directory(document: &Document, project_dir: &Path) -> PathBuf { - let mut theme_dir = project_dir.join("theme"); - - if let Ok(output_html) = document.get_output_html() { - if let Ok(theme) = output_html.theme() { - theme_dir = project_dir.join(theme) - } - } else { - warn!("Unexpected configuration, defaulting to default 'theme' directory for transfering assets"); - } - - if let Err(err) = fs::create_dir_all(&theme_dir) { - if err.kind() == ErrorKind::PermissionDenied { - warn!("Permission to create '{}' denied", theme_dir.display()) - } - } - - theme_dir - } - - fn copy_assets(document: &mut Document, theme_dir: &Path, is_force: bool) { - if let Ok(preprocessor) = document.insert_into_preprocessor("catppuccin") { - let latest_assets_version = toml_edit::value(Value::from(VERSION.trim()).decorated( - " ", - " # DO NOT EDIT: Managed by `mdbook-catppuccin install`", - )); - if let Ok(existing_assets_version) = preprocessor.get_assets_version() { - log_major_version_difference(existing_assets_version, VERSION.trim()); - } - preprocessor["assets_version"] = latest_assets_version; - } else { - warn!("Unexpected configuration, not updating pre-processor configuration"); - }; - - for (name, entry, content) in CATPPUCCIN_ASSETS { - let path = theme_dir.join(name); - let path_str = path.to_str().expect("Non-UTF8 Filepath"); - - if let TomlPath::Path(path) = entry { - if let Ok(additional_key) = document.insert_into_output_html(path) { - if !additional_key.contains_str(path_str) { - info!("Adding '{path_str}' to '{path}'"); - additional_key.push(path_str); - } - } else { - warn!("Unexpected configuration, not updating '{path}'"); - } - } - - if *name == "index.hbs" { - let file_exists = Path::new(path_str).try_exists(); - if let Ok(val) = file_exists { - if val { - if is_force { - info!( - "Force flag detected. Overwriting existing '{}'", - path.display() - ); - } else { - info!( - "'{}' already exists and therefore will not be overwritten", - path.display() - ); - break; - } - } - } else { - error!("Unexpected error, cannot determine if 'index.hbs' exists"); - break; - } - } - - info!("Copying '{name}' to '{path_str}'"); - let mut file = File::create(path_str).expect("Can't open file for writing"); - file.write_all(content) - .expect("Can't write content to file"); - } - } - - fn update_configuration_file(document: Document, toml: String, toml_config: PathBuf) { - let new_toml = document.to_string(); - if new_toml != toml { - info!( - "Saving changed configuration to '{}'", - toml_config.display() - ); - let mut file = - File::create(toml_config).expect("Can't open configuration file for writing."); - file.write_all(new_toml.as_bytes()) - .expect("Can't write configuration"); - } else { - info!( - "Configuration '{}' already up to date", - toml_config.display() - ); - } - } -} diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index fb171aa..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,91 +0,0 @@ -pub mod toml; - -use version_compare::{compare, Cmp}; - -use log::{error, warn}; -use mdbook::book::Book; -use mdbook::errors::Result; -use mdbook::preprocess::{Preprocessor, PreprocessorContext}; - -pub struct Catppuccin; - -pub enum TomlPath { - Path(&'static str), - None, -} - -const LATEST_ASSETS_VERSION: &str = env!("CARGO_PKG_VERSION"); -const TOML_KEY: &str = "preprocessor.catppuccin.assets_version"; - -fn get_major_version(version: &str) -> i32 { - version - .split_once('.') - .unwrap() - .0 - .parse::() - .unwrap_or_else(|_| { - panic!("Major version from '{version}' cannot be converted to an integer") - }) -} - -pub fn log_major_version_difference(existing_version: &str, latest_version: &str) { - let existing_major_version = get_major_version(existing_version); - let latest_major_version = get_major_version(latest_version); - if latest_major_version != existing_major_version { - warn!( - r#"Difference in Major Version Detected. -Please see the version compatibility table to understand if you need to update your 'index.hbs' --> https://github.com/catppuccin/mdBook?tab=readme-ov-file#version-compatibility <- -You can overwrite the 'index.hbs' by running `mdbook-catppuccin install --force'"# - ); - } -} - -impl Catppuccin { - pub fn new() -> Self { - Catppuccin - } -} - -impl Default for Catppuccin { - fn default() -> Self { - Self::new() - } -} - -impl Preprocessor for Catppuccin { - fn name(&self) -> &str { - "catppuccin" - } - - fn run(&self, ctx: &PreprocessorContext, book: Book) -> Result { - match ctx.config.get(TOML_KEY).and_then(|key| key.as_str()) { - Some(current_assets_version) => { - if let Ok(cmp) = compare(LATEST_ASSETS_VERSION, current_assets_version) { - match cmp { - Cmp::Lt => error!( - r#"mdbook-catppuccin with version '{LATEST_ASSETS_VERSION}' is out of date with current asset version '{current_assets_version}': -Please upgrade by running 'cargo install --force mdbook-catppuccin' and then re-run 'mdbook-catppuccin install'"# - ), - Cmp::Gt => error!( - r#"Outdated asset version '{current_assets_version}' found: -Please update your version of 'mdbook-catppuccin' to '{LATEST_ASSETS_VERSION}' -Then run 'mdbook-catppuccin install' to install the latest assets."# - ), - _ => {} - } - } - log_major_version_difference(current_assets_version, LATEST_ASSETS_VERSION); - } - None => { - error!("Unable to check assets_version, key '{TOML_KEY}' is not a string"); - } - } - - Ok(book) - } - - fn supports_renderer(&self, renderer: &str) -> bool { - renderer == "html" - } -} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..8d559dd --- /dev/null +++ b/src/main.rs @@ -0,0 +1,54 @@ +use std::process; + +use clap::{ + command, crate_authors, crate_description, crate_version, Arg, ArgAction, Command, +}; +use log::error; + +fn main() { + env_logger::init_from_env(env_logger::Env::default().default_filter_or("info")); + + error!( + r#" +This preprocessor is no longer supported and no new versions will be released. +Instructions on how to apply Catppuccin to your mdBook can be found at https://github.com/catppuccin/mdBook. + +Please uninstall this preprocessor by running 'cargo uninstall mdbook-catppuccin' and remove '[preprocessor.catppuccin]' from your 'book.toml' file. +For further information on why this package no longer works, please refer to https://github.com/catppuccin/mdBook/issues/107. + +Exiting..."# + ); + + make_app().get_matches(); + + process::exit(1); +} + +pub fn make_app() -> Command { + command!() + .name("mdbook-catppuccin") + .about(crate_description!()) + .author(crate_authors!()) + .version(crate_version!()) + .subcommand( + command!("supports") + .arg(Arg::new("renderer").required(true)) + .about("Check whether a renderer is supported by this preprocessor"), + ) + .subcommand( + command!("install") + .arg( + Arg::new("dir") + .default_value(".") + .help("Root directory for the book, this should contain the configuration file `book.toml`") + ) + .arg( + Arg::new("force") + .long("force") + .short('f') + .action(ArgAction::SetTrue) + .help("Forcefully overwrite the existing 'index.hbs' file") + ) + .about("Install the necessary files needed and update the config to include them"), + ) +} diff --git a/src/toml.rs b/src/toml.rs deleted file mode 100644 index b535948..0000000 --- a/src/toml.rs +++ /dev/null @@ -1,89 +0,0 @@ -use toml_edit::{Array, Document, Item, Table, Value}; - -pub trait DocumentExt { - fn get_output_html(&self) -> Result<&Table, String>; - fn insert_into_output_html(&mut self, entry: &str) -> Result<&mut Array, String>; - fn insert_into_preprocessor(&mut self, entry: &str) -> Result<&mut Item, &str>; -} - -impl DocumentExt for Document { - fn get_output_html(&self) -> Result<&Table, String> { - self.get("output") - .ok_or_else(|| "No key 'output'".to_owned())? - .as_table() - .ok_or_else(|| "'output' is not a table".to_owned())? - .get("html") - .ok_or_else(|| "No key 'output.html'".to_owned())? - .as_table() - .ok_or_else(|| "'output.html' is not a table".into()) - } - - fn insert_into_output_html(&mut self, entry: &str) -> Result<&mut Array, String> { - let empty_table = Item::Table(Table::default()); - let empty_array = Item::Value(Value::Array(Array::default())); - - self.entry("output") - .or_insert(empty_table.clone()) - .as_table_mut() - .and_then(|item| { - item.entry("html") - .or_insert(empty_table) - .as_table_mut()? - .entry(entry) - .or_insert(empty_array) - .as_value_mut()? - .as_array_mut() - }) - .ok_or(format!("Could not insert 'output.html.{}'", entry)) - } - - fn insert_into_preprocessor(&mut self, entry: &str) -> Result<&mut Item, &str> { - let empty_table = Item::Table(Table::default()); - let table = self - .entry("preprocessor") - .or_insert(empty_table.clone()) - .as_table_mut() - .ok_or("'No table 'preprocessor' found")? - .entry(entry) - .or_insert(empty_table); - Ok(table) - } -} - -pub trait TableExt { - fn theme(&self) -> Result<&'_ str, &str>; -} - -impl TableExt for Table { - fn theme(&self) -> Result<&'_ str, &str> { - self.get("theme") - .and_then(|item| item.as_str()) - .ok_or("'theme' not found") - } -} - -pub trait ArrayExt { - fn contains_str(&self, value: &str) -> bool; -} - -impl ArrayExt for Array { - fn contains_str(&self, value: &str) -> bool { - self.iter().any(|element| match element.as_str() { - None => false, - Some(element_str) => element_str == value, - }) - } -} - -pub trait ItemExt { - fn get_assets_version(&self) -> Result<&str, &str>; -} - -impl ItemExt for Item { - fn get_assets_version(&self) -> Result<&str, &str> { - self.get("assets_version") - .ok_or("assets_version not found")? - .as_str() - .ok_or("assets_version is not a string") - } -}