diff --git a/docs/website/package.json b/docs/website/package.json index 8e1f1de..efa1558 100644 --- a/docs/website/package.json +++ b/docs/website/package.json @@ -11,9 +11,11 @@ "docs:update-package": "pnpm dlx vp-update" }, "devDependencies": { - "@vuepress/client": "^2.0.0-rc.2", "@vuepress/bundler-vite": "^2.0.0-rc.2", + "@vuepress/client": "^2.0.0-rc.2", + "@vuepress/plugin-copy-code": "2.0.0-rc.14", "@vuepress/theme-default": "^2.0.0-rc.2", + "highlight.js": "^11.9.0", "vue": "^3.4.0", "vuepress": "^2.0.0-rc.2" } diff --git a/docs/website/pnpm-lock.yaml b/docs/website/pnpm-lock.yaml index dac456c..c46b3cd 100644 --- a/docs/website/pnpm-lock.yaml +++ b/docs/website/pnpm-lock.yaml @@ -11,9 +11,15 @@ devDependencies: '@vuepress/client': specifier: ^2.0.0-rc.2 version: 2.0.0-rc.2 + '@vuepress/plugin-copy-code': + specifier: 2.0.0-rc.14 + version: 2.0.0-rc.14(vuepress@2.0.0-rc.2) '@vuepress/theme-default': specifier: ^2.0.0-rc.2 version: 2.0.0-rc.2(vuepress@2.0.0-rc.2) + highlight.js: + specifier: ^11.9.0 + version: 11.9.0 vue: specifier: ^3.4.0 version: 3.4.15 @@ -537,6 +543,16 @@ packages: source-map-js: 1.0.2 dev: true + /@vue/compiler-core@3.4.19: + resolution: {integrity: sha512-gj81785z0JNzRcU0Mq98E56e4ltO1yf8k5PQ+tV/7YHnbZkrM0fyFyuttnN8ngJZjbpofWE/m4qjKBiLl8Ju4w==} + dependencies: + '@babel/parser': 7.23.9 + '@vue/shared': 3.4.19 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: true + /@vue/compiler-dom@3.4.15: resolution: {integrity: sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==} dependencies: @@ -544,6 +560,13 @@ packages: '@vue/shared': 3.4.15 dev: true + /@vue/compiler-dom@3.4.19: + resolution: {integrity: sha512-vm6+cogWrshjqEHTzIDCp72DKtea8Ry/QVpQRYoyTIg9k7QZDX6D8+HGURjtmatfgM8xgCFtJJaOlCaRYRK3QA==} + dependencies: + '@vue/compiler-core': 3.4.19 + '@vue/shared': 3.4.19 + dev: true + /@vue/compiler-sfc@3.4.15: resolution: {integrity: sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==} dependencies: @@ -558,6 +581,20 @@ packages: source-map-js: 1.0.2 dev: true + /@vue/compiler-sfc@3.4.19: + resolution: {integrity: sha512-LQ3U4SN0DlvV0xhr1lUsgLCYlwQfUfetyPxkKYu7dkfvx7g3ojrGAkw0AERLOKYXuAGnqFsEuytkdcComei3Yg==} + dependencies: + '@babel/parser': 7.23.9 + '@vue/compiler-core': 3.4.19 + '@vue/compiler-dom': 3.4.19 + '@vue/compiler-ssr': 3.4.19 + '@vue/shared': 3.4.19 + estree-walker: 2.0.2 + magic-string: 0.30.7 + postcss: 8.4.33 + source-map-js: 1.0.2 + dev: true + /@vue/compiler-ssr@3.4.15: resolution: {integrity: sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==} dependencies: @@ -565,6 +602,13 @@ packages: '@vue/shared': 3.4.15 dev: true + /@vue/compiler-ssr@3.4.19: + resolution: {integrity: sha512-P0PLKC4+u4OMJ8sinba/5Z/iDT84uMRRlrWzadgLA69opCpI1gG4N55qDSC+dedwq2fJtzmGald05LWR5TFfLw==} + dependencies: + '@vue/compiler-dom': 3.4.19 + '@vue/shared': 3.4.19 + dev: true + /@vue/devtools-api@6.5.1: resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==} dev: true @@ -575,6 +619,12 @@ packages: '@vue/shared': 3.4.15 dev: true + /@vue/reactivity@3.4.19: + resolution: {integrity: sha512-+VcwrQvLZgEclGZRHx4O2XhyEEcKaBi50WbxdVItEezUf4fqRh838Ix6amWTdX0CNb/b6t3Gkz3eOebfcSt+UA==} + dependencies: + '@vue/shared': 3.4.19 + dev: true + /@vue/runtime-core@3.4.15: resolution: {integrity: sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw==} dependencies: @@ -582,6 +632,13 @@ packages: '@vue/shared': 3.4.15 dev: true + /@vue/runtime-core@3.4.19: + resolution: {integrity: sha512-/Z3tFwOrerJB/oyutmJGoYbuoadphDcJAd5jOuJE86THNZji9pYjZroQ2NFsZkTxOq0GJbb+s2kxTYToDiyZzw==} + dependencies: + '@vue/reactivity': 3.4.19 + '@vue/shared': 3.4.19 + dev: true + /@vue/runtime-dom@3.4.15: resolution: {integrity: sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw==} dependencies: @@ -590,6 +647,14 @@ packages: csstype: 3.1.3 dev: true + /@vue/runtime-dom@3.4.19: + resolution: {integrity: sha512-IyZzIDqfNCF0OyZOauL+F4yzjMPN2rPd8nhqPP2N1lBn3kYqJpPHHru+83Rkvo2lHz5mW+rEeIMEF9qY3PB94g==} + dependencies: + '@vue/runtime-core': 3.4.19 + '@vue/shared': 3.4.19 + csstype: 3.1.3 + dev: true + /@vue/server-renderer@3.4.15(vue@3.4.15): resolution: {integrity: sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw==} peerDependencies: @@ -600,10 +665,24 @@ packages: vue: 3.4.15 dev: true + /@vue/server-renderer@3.4.19(vue@3.4.19): + resolution: {integrity: sha512-eAj2p0c429RZyyhtMRnttjcSToch+kTWxFPHlzGMkR28ZbF1PDlTcmGmlDxccBuqNd9iOQ7xPRPAGgPVj+YpQw==} + peerDependencies: + vue: 3.4.19 + dependencies: + '@vue/compiler-ssr': 3.4.19 + '@vue/shared': 3.4.19 + vue: 3.4.19 + dev: true + /@vue/shared@3.4.15: resolution: {integrity: sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==} dev: true + /@vue/shared@3.4.19: + resolution: {integrity: sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw==} + dev: true + /@vuepress/bundler-vite@2.0.0-rc.2: resolution: {integrity: sha512-bjkn0krtucciUkGGdckCkGGg+wlv3Pj7s1lO/ChACLQncDwc3GgMTuMm0JyaCDKzTXE8sufjHHGWMftRL8qFOg==} dependencies: @@ -678,6 +757,21 @@ packages: - typescript dev: true + /@vuepress/helper@2.0.0-rc.14(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-w4H8IV3xgwSyypks7PR9hXX5sw6eN8tJGSkZ8Ru56sf4W7x2b9I9+++5Drgb8nPSoWA1sIuU++XC8NbdtoVmRQ==} + peerDependencies: + vuepress: 2.0.0-rc.7 + dependencies: + '@vue/shared': 3.4.19 + cheerio: 1.0.0-rc.12 + fflate: 0.8.2 + gray-matter: 4.0.3 + vue: 3.4.19 + vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(vue@3.4.15) + transitivePeerDependencies: + - typescript + dev: true + /@vuepress/markdown@2.0.0-rc.2: resolution: {integrity: sha512-5/RmJnap+MGKxDhSO+Mv6zB8PoPHhhBujnNKKO3PnyfPrj0LyL0AuTm8m3Ea271wMp9956WINjw8jlpn+Z1sBg==} dependencies: @@ -737,6 +831,20 @@ packages: vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(vue@3.4.15) dev: true + /@vuepress/plugin-copy-code@2.0.0-rc.14(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-qiLdCEmHNhdE+IhsN/YPpzA3SSZgH6m8L1Q+mwLueYFlBIW8tIdXAi5UTgKWLavJOoIFZGvqKWy0jRBCBfIopQ==} + peerDependencies: + vuepress: 2.0.0-rc.7 + dependencies: + '@vuepress/helper': 2.0.0-rc.14(vuepress@2.0.0-rc.2) + '@vueuse/core': 10.7.2(vue@3.4.19) + vue: 3.4.19 + vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(vue@3.4.15) + transitivePeerDependencies: + - '@vue/composition-api' + - typescript + dev: true + /@vuepress/plugin-external-link-icon@2.0.0-rc.1(vuepress@2.0.0-rc.2): resolution: {integrity: sha512-6zGt5qAnPn+sFJdOpSYAQfq/OV8vRfynTfwtSZVU0QiLVk1GDTTssGjZ32GKxmPPilXF0tiSMTcITfFllnNUmA==} peerDependencies: @@ -876,6 +984,18 @@ packages: - vue dev: true + /@vueuse/core@10.7.2(vue@3.4.19): + resolution: {integrity: sha512-AOyAL2rK0By62Hm+iqQn6Rbu8bfmbgaIMXcE3TSr7BdQ42wnSFlwIdPjInO62onYsEMK/yDMU8C6oGfDAtZ2qQ==} + dependencies: + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 10.7.2 + '@vueuse/shared': 10.7.2(vue@3.4.19) + vue-demi: 0.14.6(vue@3.4.19) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true + /@vueuse/metadata@10.7.2: resolution: {integrity: sha512-kCWPb4J2KGrwLtn1eJwaJD742u1k5h6v/St5wFe8Quih90+k2a0JP8BS4Zp34XUuJqS2AxFYMb1wjUL8HfhWsQ==} dev: true @@ -889,6 +1009,15 @@ packages: - vue dev: true + /@vueuse/shared@10.7.2(vue@3.4.19): + resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==} + dependencies: + vue-demi: 0.14.6(vue@3.4.19) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true + /ansi-regex@6.0.1: resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} engines: {node: '>=12'} @@ -933,6 +1062,10 @@ packages: engines: {node: '>=8'} dev: true + /boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + dev: true + /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -965,6 +1098,30 @@ packages: engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} dev: true + /cheerio-select@2.1.0: + resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} + dependencies: + boolbase: 1.0.0 + css-select: 5.1.0 + css-what: 6.1.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + dev: true + + /cheerio@1.0.0-rc.12: + resolution: {integrity: sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==} + engines: {node: '>= 6'} + dependencies: + cheerio-select: 2.1.0 + dom-serializer: 2.0.0 + domhandler: 5.0.3 + domutils: 3.1.0 + htmlparser2: 8.0.2 + parse5: 7.1.2 + parse5-htmlparser2-tree-adapter: 7.0.0 + dev: true + /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -1006,6 +1163,21 @@ packages: which: 2.0.2 dev: true + /css-select@5.1.0: + resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} + dependencies: + boolbase: 1.0.0 + css-what: 6.1.0 + domhandler: 5.0.3 + domutils: 3.1.0 + nth-check: 2.1.1 + dev: true + + /css-what@6.1.0: + resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} + engines: {node: '>= 6'} + dev: true + /csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} dev: true @@ -1022,6 +1194,33 @@ packages: ms: 2.1.2 dev: true + /dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + dev: true + + /domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + dev: true + + /domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + dependencies: + domelementtype: 2.3.0 + dev: true + + /domutils@3.1.0: + resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + dev: true + /electron-to-chromium@1.4.648: resolution: {integrity: sha512-EmFMarXeqJp9cUKu/QEciEApn0S/xRcpZWuAm32U7NgoZCimjsilKXHRO9saeEW55eHZagIDg6XTUOv32w9pjg==} dev: true @@ -1126,6 +1325,10 @@ packages: reusify: 1.0.4 dev: true + /fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + dev: true + /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -1201,6 +1404,20 @@ packages: resolution: {integrity: sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==} dev: true + /highlight.js@11.9.0: + resolution: {integrity: sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==} + engines: {node: '>=12.0.0'} + dev: true + + /htmlparser2@8.0.2: + resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + entities: 4.5.0 + dev: true + /human-signals@5.0.0: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} @@ -1315,6 +1532,13 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /magic-string@0.30.7: + resolution: {integrity: sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /markdown-it-anchor@8.6.7(@types/markdown-it@13.0.7)(markdown-it@14.0.0): resolution: {integrity: sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==} peerDependencies: @@ -1411,6 +1635,12 @@ packages: path-key: 4.0.0 dev: true + /nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + dependencies: + boolbase: 1.0.0 + dev: true + /onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -1440,6 +1670,19 @@ packages: strip-ansi: 7.1.0 dev: true + /parse5-htmlparser2-tree-adapter@7.0.0: + resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==} + dependencies: + domhandler: 5.0.3 + parse5: 7.1.2 + dev: true + + /parse5@7.1.2: + resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + dependencies: + entities: 4.5.0 + dev: true + /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -1741,6 +1984,21 @@ packages: vue: 3.4.15 dev: true + /vue-demi@0.14.6(vue@3.4.19): + resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + peerDependencies: + '@vue/composition-api': ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + dependencies: + vue: 3.4.19 + dev: true + /vue-router@4.2.5(vue@3.4.15): resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==} peerDependencies: @@ -1765,6 +2023,21 @@ packages: '@vue/shared': 3.4.15 dev: true + /vue@3.4.19: + resolution: {integrity: sha512-W/7Fc9KUkajFU8dBeDluM4sRGc/aa4YJnOYck8dkjgZoXtVsn3OeTGni66FV1l3+nvPA7VBFYtPioaGKUmEADw==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@vue/compiler-dom': 3.4.19 + '@vue/compiler-sfc': 3.4.19 + '@vue/runtime-dom': 3.4.19 + '@vue/server-renderer': 3.4.19(vue@3.4.19) + '@vue/shared': 3.4.19 + dev: true + /vuepress@2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(vue@3.4.15): resolution: {integrity: sha512-OEHfXx4Q3IzkXqcY9bKZqHXYAnSR82AGrmWYX5R1I3+ntzjaAbUhUKbG/jjMzLg40XqAHS++pM/zzMBNrcY3rg==} engines: {node: '>=18.16.0'} diff --git a/docs/website/src/.vuepress/config.js b/docs/website/src/.vuepress/config.js index ae9f857..935e98b 100644 --- a/docs/website/src/.vuepress/config.js +++ b/docs/website/src/.vuepress/config.js @@ -1,17 +1,41 @@ import { defaultTheme } from '@vuepress/theme-default' import { defineUserConfig } from 'vuepress/cli' import { viteBundler } from '@vuepress/bundler-vite' +import {highlightjsPlugin} from "./hljs/highlightjsPlugin"; export default defineUserConfig({ lang: 'en-US', description: 'A general purpose application launcher for X and wayland inspired by rofi/wofi and alfred, build with iced and pop-launcher.', title: " ", + markdown: { + code: { + lineNumbers: false + } + }, + + plugins: [ + highlightjsPlugin, + copyCodePlugin({ + // options + }), + ], theme: defaultTheme({ logo: '/onagre.png', repo: 'https://github.com/onagre-launcher/onagre', docsRepo: 'https://github.com/onagre-launcher/onagre', - navbar: ['/', '/get-started', "/theming-reference"], + navbar: ['/', '/get-started', "/theming-reference", "/gallery"], }), - bundler: viteBundler(), + head: [ + ['link', { rel: 'icon', href: '/favicon.png' }], + ['meta', {name: 'theme-color', content: '#ff9595'}], + ['meta', {name: 'apple-mobile-web-app-capable', content: 'yes'}], + ['meta', {name: 'apple-mobile-web-app-status-bar-style', content: 'black'}], + ['meta', {property: 'og:title', content: 'Onagre'}], + ['meta', {property: 'og:image', content: 'https://onagre-launcher.github.io/onagre/onagre.png'}], + ['meta', {property: 'twitter:card', content: 'https://onagre-launcher.github.io/onagre/onagre.png'}], + ['meta', {property: 'og:description', content: 'A general purpose application launcher for X and wayland inspired by rofi/wofi and alfred, build with iced and pop-launcher.'}], + ['meta', {property: 'og:width', content: '100'}], + ], + }) diff --git a/docs/website/src/.vuepress/hljs/bash_with_onagre.js b/docs/website/src/.vuepress/hljs/bash_with_onagre.js new file mode 100644 index 0000000..0af1b12 --- /dev/null +++ b/docs/website/src/.vuepress/hljs/bash_with_onagre.js @@ -0,0 +1,106 @@ +/** @type LanguageFn */ +export default function(hljs) { + const regex = hljs.regex; + const VAR = {}; + const BRACED_VAR = { + begin: /\$\{/, + end:/\}/, + contains: [ + "self", + { + begin: /:-/, + contains: [ VAR ] + } // default values + ] + }; + Object.assign(VAR,{ + className: 'variable', + variants: [ + {begin: regex.concat(/\$[\w\d#@][\w\d_]*/, + // negative look-ahead tries to avoid matching patterns that are not + // Perl at all like $ident$, @ident@, etc. + `(?![\\w\\d])(?![$])`) }, + BRACED_VAR + ] + }); + + const SUBST = { + className: 'subst', + begin: /\$\(/, end: /\)/, + contains: [hljs.BACKSLASH_ESCAPE] + }; + const HERE_DOC = { + begin: /<<-?\s*(?=\w+)/, + starts: { + contains: [ + hljs.END_SAME_AS_BEGIN({ + begin: /(\w+)/, + end: /(\w+)/, + className: 'string' + }) + ] + } + }; + const QUOTE_STRING = { + className: 'string', + begin: /"/, end: /"/, + contains: [ + hljs.BACKSLASH_ESCAPE, + VAR, + SUBST + ] + }; + SUBST.contains.push(QUOTE_STRING); + const ESCAPED_QUOTE = { + className: '', + begin: /\\"/ + + }; + const APOS_STRING = { + className: 'string', + begin: /'/, end: /'/ + }; + + const ARITHMETIC = { + begin: /\$\(\(/, + end: /\)\)/, + contains: [ + { begin: /\d+#[0-9a-f]+/, className: "number" }, + hljs.NUMBER_MODE, + VAR + ] + }; + + // to consume paths to prevent keyword matches inside them + const PATH_MODE = { + match: /(\/[a-z._-]+)+/ + }; + + const COMMANDS = [ + "cargo", + "yay", + "onagre", + "git", + ]; + + return { + name: 'Bash', + aliases: ['sh'], + keywords: { + $pattern: /\b[a-z._-]+\b/, + built_in:[ + ...COMMANDS + ] + }, + contains: [ + ARITHMETIC, + hljs.HASH_COMMENT_MODE, + HERE_DOC, + PATH_MODE, + QUOTE_STRING, + ESCAPED_QUOTE, + APOS_STRING, + VAR + ] + }; +} diff --git a/docs/website/src/.vuepress/hljs/highlightjsPlugin.js b/docs/website/src/.vuepress/hljs/highlightjsPlugin.js new file mode 100644 index 0000000..3e55a6f --- /dev/null +++ b/docs/website/src/.vuepress/hljs/highlightjsPlugin.js @@ -0,0 +1,21 @@ +import hljs from 'highlight.js/lib/core'; +import bash from './bash_with_onagre.js'; +import ron from './ron.js'; +import scss from 'highlight.js/lib/languages/scss'; + +hljs.registerLanguage('bash', bash); +hljs.registerLanguage('scss', scss); +hljs.registerLanguage('ron', ron); + +export const highlightjsPlugin = () => ({ + name: '@vuepress/plugin-highlightjs', + async extendsMarkdown(md) { + md.options.highlight = (code, lang) => { + if (lang === "text") { + return code.value; + } else { + return hljs.highlight(code, {language: lang, ignoreIllegals: true}).value + } + } + }, +}) diff --git a/docs/website/src/.vuepress/hljs/ron.js b/docs/website/src/.vuepress/hljs/ron.js new file mode 100644 index 0000000..89411aa --- /dev/null +++ b/docs/website/src/.vuepress/hljs/ron.js @@ -0,0 +1,45 @@ +/** @type LanguageFn */ +export default function(hljs) { + const ATTRIBUTE = { + className: 'attr', + begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/, + relevance: 1.01 + }; + const PUNCTUATION = { + match: /[{}[\],:]/, + className: "punctuation", + relevance: 0 + }; + const LITERALS = [ + "true", + "false", + "null" + ]; + + // NOTE: normally we would rely on `keywords` for this but using a mode here allows us + // - to use the very tight `illegal: \S` rule later to flag any other character + // - as illegal indicating that despite looking like JSON we do not truly have + // - JSON and thus improve false-positively greatly since JSON will try and claim + // - all sorts of JSON looking stuff + const LITERALS_MODE = { + scope: "literal", + beginKeywords: LITERALS.join(" "), + }; + + return { + name: 'RON', + keywords:{ + literal: LITERALS, + }, + contains: [ + ATTRIBUTE, + PUNCTUATION, + hljs.QUOTE_STRING_MODE, + LITERALS_MODE, + hljs.C_NUMBER_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ], + illegal: '\\S' + }; +} \ No newline at end of file diff --git a/docs/screenshots/not-adwaita.png b/docs/website/src/.vuepress/public/not-adwaita.png similarity index 100% rename from docs/screenshots/not-adwaita.png rename to docs/website/src/.vuepress/public/not-adwaita.png diff --git a/docs/website/src/.vuepress/public/onagre-export.webm b/docs/website/src/.vuepress/public/onagre-export.webm index 7e0caa5..37f716e 100644 Binary files a/docs/website/src/.vuepress/public/onagre-export.webm and b/docs/website/src/.vuepress/public/onagre-export.webm differ diff --git a/docs/screenshots/darcula.png b/docs/website/src/.vuepress/public/screenshots/darcula.png similarity index 100% rename from docs/screenshots/darcula.png rename to docs/website/src/.vuepress/public/screenshots/darcula.png diff --git a/docs/screenshots/default-theme.png b/docs/website/src/.vuepress/public/screenshots/default-theme.png similarity index 100% rename from docs/screenshots/default-theme.png rename to docs/website/src/.vuepress/public/screenshots/default-theme.png diff --git a/docs/screenshots/murz.png b/docs/website/src/.vuepress/public/screenshots/murz.png similarity index 100% rename from docs/screenshots/murz.png rename to docs/website/src/.vuepress/public/screenshots/murz.png diff --git a/docs/screenshots/nord-rounded.png b/docs/website/src/.vuepress/public/screenshots/nord-rounded.png similarity index 100% rename from docs/screenshots/nord-rounded.png rename to docs/website/src/.vuepress/public/screenshots/nord-rounded.png diff --git a/docs/website/src/.vuepress/public/screenshots/not-adwaita.png b/docs/website/src/.vuepress/public/screenshots/not-adwaita.png new file mode 100644 index 0000000..fe83c3e Binary files /dev/null and b/docs/website/src/.vuepress/public/screenshots/not-adwaita.png differ diff --git a/docs/screenshots/solarized.png b/docs/website/src/.vuepress/public/screenshots/solarized.png similarity index 100% rename from docs/screenshots/solarized.png rename to docs/website/src/.vuepress/public/screenshots/solarized.png diff --git a/docs/theme_examples/murz.scss b/docs/website/src/.vuepress/public/theme_examples/murz.scss similarity index 100% rename from docs/theme_examples/murz.scss rename to docs/website/src/.vuepress/public/theme_examples/murz.scss diff --git a/docs/theme_examples/nord-rounded.scss b/docs/website/src/.vuepress/public/theme_examples/nord-rounded.scss similarity index 100% rename from docs/theme_examples/nord-rounded.scss rename to docs/website/src/.vuepress/public/theme_examples/nord-rounded.scss diff --git a/docs/theme_examples/not-adwaita.scss b/docs/website/src/.vuepress/public/theme_examples/not-adwaita.scss similarity index 100% rename from docs/theme_examples/not-adwaita.scss rename to docs/website/src/.vuepress/public/theme_examples/not-adwaita.scss diff --git a/docs/theme_examples/simmple.scss b/docs/website/src/.vuepress/public/theme_examples/simmple.scss similarity index 100% rename from docs/theme_examples/simmple.scss rename to docs/website/src/.vuepress/public/theme_examples/simmple.scss diff --git a/docs/theme_examples/solarized.scss b/docs/website/src/.vuepress/public/theme_examples/solarized.scss similarity index 100% rename from docs/theme_examples/solarized.scss rename to docs/website/src/.vuepress/public/theme_examples/solarized.scss diff --git a/docs/website/src/.vuepress/styles/highlight.scss b/docs/website/src/.vuepress/styles/highlight.scss new file mode 100644 index 0000000..f572d34 --- /dev/null +++ b/docs/website/src/.vuepress/styles/highlight.scss @@ -0,0 +1,243 @@ +pre code.hljs { + display: block; + overflow-x: auto; + padding: 1em +} + +code.hljs { + padding: 3px 5px +} + +.hljs { + background: #2e3440 +} + +.hljs, .hljs-subst { + color: #d8dee9 +} + +.hljs-selector-tag { + color: #81a1c1 +} + +.hljs-selector-id { + color: #8fbcbb; + font-weight: 700 +} + +.hljs-selector-attr, .hljs-selector-class { + color: #8fbcbb +} + +.hljs-property, .hljs-selector-pseudo { + color: #88c0d0 +} + +.hljs-addition { + background-color: rgba(163, 190, 140, .5) +} + +.hljs-deletion { + background-color: rgba(191, 97, 106, .5) +} + +.hljs-built_in, .hljs-class, .hljs-type { + color: #8fbcbb +} + +.hljs-function, .hljs-function > .hljs-title, .hljs-title.hljs-function { + color: #88c0d0 +} + +.hljs-keyword, .hljs-literal, .hljs-symbol { + color: #81a1c1 +} + +.hljs-number { + color: #b48ead +} + +.hljs-regexp { + color: #ebcb8b +} + +.hljs-string { + color: #a3be8c +} + +.hljs-title { + color: #8fbcbb +} + +.hljs-params { + color: #d8dee9 +} + +.hljs-bullet { + color: #81a1c1 +} + +.hljs-code { + color: #8fbcbb +} + +.hljs-emphasis { + font-style: italic +} + +.hljs-formula { + color: #8fbcbb +} + +.hljs-strong { + font-weight: 700 +} + +.hljs-link:hover { + text-decoration: underline +} + +.hljs-comment, .hljs-quote { + color: #4c566a +} + +.hljs-doctag { + color: #8fbcbb +} + +.hljs-meta, .hljs-meta .hljs-keyword { + color: #5e81ac +} + +.hljs-meta .hljs-string { + color: #a3be8c +} + +.hljs-attr { + color: #8fbcbb +} + +.hljs-attribute { + color: #d8dee9 +} + +.hljs-name { + color: #81a1c1 +} + +.hljs-section { + color: #88c0d0 +} + +.hljs-tag { + color: #81a1c1 +} + +.hljs-template-variable, .hljs-variable { + color: #d8dee9 +} + +.hljs-template-tag { + color: #5e81ac +} + +.language-abnf .hljs-attribute { + color: #88c0d0 +} + +.language-abnf .hljs-symbol { + color: #ebcb8b +} + +.language-apache .hljs-attribute { + color: #88c0d0 +} + +.language-apache .hljs-section { + color: #81a1c1 +} + +.language-arduino .hljs-built_in { + color: #88c0d0 +} + +.language-aspectj .hljs-meta { + color: #d08770 +} + +.language-aspectj > .hljs-title { + color: #88c0d0 +} + +.language-bnf .hljs-attribute { + color: #8fbcbb +} + +.language-clojure .hljs-name { + color: #88c0d0 +} + +.language-clojure .hljs-symbol { + color: #ebcb8b +} + +.language-coq .hljs-built_in { + color: #88c0d0 +} + +.language-cpp .hljs-meta .hljs-string { + color: #8fbcbb +} + +.language-css .hljs-built_in { + color: #88c0d0 +} + +.language-css .hljs-keyword { + color: #d08770 +} + +.language-diff .hljs-meta, .language-ebnf .hljs-attribute { + color: #8fbcbb +} + +.language-glsl .hljs-built_in { + color: #88c0d0 +} + +.language-groovy .hljs-meta:not(:first-child), .language-haxe .hljs-meta, .language-java .hljs-meta { + color: #d08770 +} + +.language-ldif .hljs-attribute { + color: #8fbcbb +} + +.language-lisp .hljs-name, .language-lua .hljs-built_in, .language-moonscript .hljs-built_in, .language-nginx .hljs-attribute { + color: #88c0d0 +} + +.language-nginx .hljs-section { + color: #5e81ac +} + +.language-pf .hljs-built_in, .language-processing .hljs-built_in { + color: #88c0d0 +} + +.language-scss .hljs-keyword, .language-stylus .hljs-keyword { + color: #81a1c1 +} + +.language-swift .hljs-meta { + color: #d08770 +} + +.language-vim .hljs-built_in { + color: #88c0d0; + font-style: italic +} + +.language-yaml .hljs-meta { + color: #d08770 +} \ No newline at end of file diff --git a/docs/website/src/.vuepress/styles/index.scss b/docs/website/src/.vuepress/styles/index.scss new file mode 100644 index 0000000..a02471e --- /dev/null +++ b/docs/website/src/.vuepress/styles/index.scss @@ -0,0 +1,132 @@ +@import "highlight"; + +:root { + // brand colors + --c-brand: #f77063; + --c-brand-light: #fc5b85; + + // background colors + --c-bg: #ffffff; + --c-bg-light: #f3f4f5; + --c-bg-lighter: #eeeeee; + --c-bg-navbar: var(--c-bg); + --c-bg-sidebar: var(--c-bg); + --c-bg-arrow: #cccccc; + + // text colors + --c-text: #2c3e50; + --c-text-accent: var(--c-brand); + --c-text-light: #3a5169; + --c-text-lighter: #4e6e8e; + --c-text-lightest: #6a8bad; + --c-text-quote: #999999; + + // border colors + --c-border: #eaecef; + --c-border-dark: #dfe2e5; + + // custom container colors + --c-tip: #42b983; + --c-tip-bg: var(--c-bg-light); + --c-tip-title: var(--c-text); + --c-tip-text: var(--c-text); + --c-tip-text-accent: var(--c-text-accent); + --c-warning: #e7c000; + --c-warning-bg: #fffae3; + --c-warning-title: #ad9000; + --c-warning-text: #746000; + --c-warning-text-accent: var(--c-text); + --c-danger: #cc0000; + --c-danger-bg: #ffe0e0; + --c-danger-title: #990000; + --c-danger-text: #660000; + --c-danger-text-accent: var(--c-text); + --c-details-bg: #eeeeee; + + // badge component colors + --c-badge-tip: var(--c-tip); + --c-badge-warning: var(--c-warning); + --c-badge-danger: var(--c-danger); + + // transition vars + --t-color: 0.3s ease; + --t-transform: 0.3s ease; + + // code blocks vars + --code-bg-color: #282c34; + --code-hl-bg-color: rgba(0, 0, 0, 0.66); + --code-ln-color: #9e9e9e; + --code-ln-wrapper-width: 3.5rem; + + // font vars + --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, + Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + --font-family-code: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + + // layout vars + --navbar-height: 3.6rem; + --navbar-padding-v: 0.7rem; + --navbar-padding-h: 1.5rem; + --sidebar-width: 20rem; + --sidebar-width-mobile: calc(var(--sidebar-width) * 0.82); + --content-width: 740px; + --homepage-width: 960px; +} + +// plugin-back-to-top +.back-to-top { + --back-to-top-color: var(--c-brand); + --back-to-top-color-hover: var(--c-brand-light); +} + +// plugin-docsearch +.DocSearch { + --docsearch-primary-color: var(--c-brand); + --docsearch-text-color: var(--c-text); + --docsearch-highlight-color: var(--c-brand); + --docsearch-muted-color: var(--c-text-quote); + --docsearch-container-background: rgba(9, 10, 17, 0.8); + --docsearch-modal-background: var(--c-bg-light); + --docsearch-searchbox-background: var(--c-bg-lighter); + --docsearch-searchbox-focus-background: var(--c-bg); + --docsearch-searchbox-shadow: inset 0 0 0 2px var(--c-brand); + --docsearch-hit-color: var(--c-text-light); + --docsearch-hit-active-color: var(--c-bg); + --docsearch-hit-background: var(--c-bg); + --docsearch-hit-shadow: 0 1px 3px 0 var(--c-border-dark); + --docsearch-footer-background: var(--c-bg); +} + +// plugin-medium-zoom +.medium-zoom-overlay { + --medium-zoom-bg-color: var(--c-bg); +} + +// plugin-nprogress +#nprogress { + --nprogress-color: var(--c-brand); +} + +// plugin-pwa-popup +.pwa-popup { + --pwa-popup-text-color: var(--c-text); + --pwa-popup-bg-color: var(--c-bg); + --pwa-popup-border-color: var(--c-brand); + --pwa-popup-shadow: 0 4px 16px var(--c-brand); + --pwa-popup-btn-text-color: var(--c-bg); + --pwa-popup-btn-bg-color: var(--c-brand); + --pwa-popup-btn-hover-bg-color: var(--c-brand-light); +} + +// plugin-search +.search-box { + --search-bg-color: var(--c-bg); + --search-accent-color: var(--c-brand); + --search-text-color: var(--c-text); + --search-border-color: var(--c-border); + + --search-item-text-color: var(--c-text-lighter); + --search-item-focus-bg-color: var(--c-bg-light); +} + +.token.keyword.keyword-if { color: blueviolet } \ No newline at end of file diff --git a/docs/website/src/.vuepress/styles/palette.scss b/docs/website/src/.vuepress/styles/palette.scss new file mode 100644 index 0000000..66ad58c --- /dev/null +++ b/docs/website/src/.vuepress/styles/palette.scss @@ -0,0 +1,2 @@ +// code languages +$codeLang: 'sh' 'shell' 'md' 'git' 'toml' 'editor' !default; \ No newline at end of file diff --git a/docs/website/src/.vuepress/theme/Layout.vue b/docs/website/src/.vuepress/theme/Layout.vue new file mode 100644 index 0000000..5981727 --- /dev/null +++ b/docs/website/src/.vuepress/theme/Layout.vue @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/docs/website/src/.vuepress/theme/client.js b/docs/website/src/.vuepress/theme/client.js new file mode 100644 index 0000000..c818aa7 --- /dev/null +++ b/docs/website/src/.vuepress/theme/client.js @@ -0,0 +1,8 @@ +import { defineClientConfig } from '@vuepress/client' +import Layout from './layouts/Layout.vue' + +export default defineClientConfig({ + layouts: { + Layout, + }, +}) diff --git a/docs/website/src/.vuepress/theme/index.js b/docs/website/src/.vuepress/theme/index.js new file mode 100644 index 0000000..1a5f39a --- /dev/null +++ b/docs/website/src/.vuepress/theme/index.js @@ -0,0 +1,13 @@ +import { getDirname, path } from '@vuepress/utils' + +const __dirname = getDirname(import.meta.url) + +const localTheme = (options) => { + return { + name: 'vuepress-theme-local', + extends: '@vuepress/theme-default', + layouts: { + Layout: path.resolve(__dirname, 'layouts/Layout.vue'), + }, + } +} diff --git a/docs/website/src/README.md b/docs/website/src/README.md index 65cfcc1..10d149c 100644 --- a/docs/website/src/README.md +++ b/docs/website/src/README.md @@ -1,15 +1,14 @@ --- home: true -title: Home +title: Onagre heroImage: onagre.png actions: - text: Get Started - link: /getting-started.html + link: /get-started.html + type: primary + - text: Gallery + link: /get-started.html type: primary - - - text: Introduction - link: https://vuejs.press/guide/introduction.html - type: secondary features: - title: Fast @@ -21,7 +20,7 @@ features: - title: Customizable themes details: Fully customizable theme using sass like configuration. - title: Good default - details: Commes with a set of preinstalled plugins (calc, files, recent, terminal, desktop entries, find, pulse, scripts, web, etc). + details: Comes with a set of preinstalled plugins (calc, files, recent, terminal, desktop entries, find, pulse, scripts, web, etc). - title: Extensible details: Write your own plugins using your favorite language, or use plugins from the community. @@ -31,7 +30,3 @@ footer: MIT Licensed | Copyright © 2024 Paul Delafosse - -This is the content of home page. Check [Home Page Docs][default-theme-home] for more details. - -[default-theme-home]: https://vuejs.press/reference/default-theme/frontmatter.html#home-page diff --git a/docs/website/src/gallery.md b/docs/website/src/gallery.md index e69de29..7c3c2a6 100644 --- a/docs/website/src/gallery.md +++ b/docs/website/src/gallery.md @@ -0,0 +1,342 @@ +# Gallery + +Don't hesitate to send a PR with your fancy theme, we would be happy to share it to the community. + +## Default theme + +murz-theme-screenshot + +--- + +## Murz + +simple-theme-screenshot + +::: details expand theme.scss + +credit to [murz](https://github.com/Murzchnvok/rofi-collection) + +```scss +.onagre { + --exit-unfocused: false; + height: 250px; + width: 400px; + --font-family: "Iosevka,Iosevka Nerd Font"; + font-size: 12px; + background: #18181b; + color: #a0a0ab; + border-color: #5d5e72; + border-width: 4px; + padding: 10px; + + .container { + .search { + --spacing: 1; + background: #d8dee9; + border-radius: 0; + color: #18181b; + padding: 4px; + --height: fill-portion 1; + .plugin-hint { + font-size: 9px; + color: #d8dee9; + padding: 4px; + border-width: 2px; + border-color: #5d5e72; + background: #18181b; + --align-x: center; + --align-y: center; + --width: fill-portion 2; + --height: fill; + } + + .input { + --width: fill-portion 11; + } + + } + + .rows { + --height: fill-portion 6; + .row-selected { + background: #20212c; + color: #5d5e72; + --spacing: 3px; + } + } + + .scrollable { + .scroller { + color: #A0A0AB; + border-color: #18181b; + } + } + } +} +``` +::: + +--- + +## Nord + +simple-theme-screenshot + +::: details expand theme.scss + +```scss +.onagre { + --exit-unfocused: false; + height: 250px; + width: 400px; + --icon-theme: "Papirus"; + --icon-size: 22px; + --font-family: "Iosevka Nerd Font Mono"; + font-size: 12px; + background: #2E3440; + color: #81a1c1; + border-color: #2E3440; + border-radius: 25%; + border-width: 4px; + padding: 10px; + + .container { + .search { + --spacing: 1; + background: #3b4252; + color: #d8dee9; + padding: 4px; + --height: fill-portion 1; + .plugin-hint { + font-size: 9px; + color: #bf616a; + padding: 4px; + border-width: 2px; + border-color: #bf616a; + border-radius: 5%; + background: #4c566a; + --align-x: center; + --align-y: center; + --width: fill-portion 2; + --height: fill; + } + + .input { + --width: fill-portion 11; + } + + } + + .rows { + --height: fill-portion 5; + .row-selected { + background: #2E3440; + color: #ebcb8b; + --spacing: 3px; + --align-y: center; + } + } + + .scrollable { + .scroller { + color: #4c566a; + } + } + } +} +``` + +::: + +--- + +## Not-Adwaita + +simple-theme-screenshot + +::: details expand theme.scss + +```scss +.onagre { + background: #d6d6d6; + color: #000000; + --icon-theme: "Papirus"; + --font-family: "DejaVuSans"; + --icon-size: 24; + border-radius: 8%; + border-color: #d6d6d6; + border-width: 4px; + padding: 5px; + + .container { + .rows { + --height: fill-portion 6; + .row { + --width: 392; + + .icon { + padding-top: 4px; + } + + .category-icon { + padding-left: 5px; + --icon-size: 11; + } + + .title { + font-size: 18px; + } + + .description { + font-size: 12px; + } + } + + .row-selected { + --width: 392; + border-radius: 8%; + background: #c0c0c0; + + .icon { + padding-top: 4px; + } + + .category-icon { + padding-left: 5px; + --icon-size: 11; + } + + .title { + font-size: 20px; + } + + .description { + font-size: 12px; + } + } + } + + .search { + border-radius: 5%; + background: #ffffff; + --height: fill-portion 1; + padding: 4px; + .input { + font-size: 20px; + } + } + + .scrollable { + width: 2px; + border-radius: 5%; + background: #c0c0c0; + .scroller { + width: 4px; + color: #a1a1a1; + } + } + } +} +``` + +::: + +--- + +## Solarized + +simple-theme-screenshot + +::: details expand theme.scss + +```scss +.onagre { + background: #fdf6e3; + color: #657b83; + --icon-theme: "Papirus"; + --font-family: "Monaco"; + --icon-size: 24; + border-radius: 0; + border-color: #a9b7c6; + border-width: 0; + height: 250px; + width: 440px; + + .container { + .rows { + --height: fill-portion 6; + .row { + + .icon { + padding-top: 4px; + } + + .title { + font-size: 18px; + } + + .description { + font-size: 12px; + } + } + + .row-selected { + --width: 435; + color: #268bd2; + + .icon { + padding-top: 4px; + } + + .title { + font-size: 20px; + } + + .description { + font-size: 12px; + } + } + } + + .search { + background: #fdf6e3; + --height: fill-portion 1; + border-radius: 0; + border-color: #073642; + border-width: 3px; + padding: 4px; + .input { + color: #002b36; + --placeholder-color: #657b83; + --selection-color: #2aa198; + font-size: 20px; + --width: fill-portion 13; + } + .plugin-hint { + font-size: 11px; + color: #002b36; + padding: 6px; + border-color: #859900; + background: #fdf6e3; + border-width: 3px; + --align-x: center; + --align-y: center; + --width: fill-portion 2; + --height: fill; + } + } + + .scrollable { + width: 2px; + background: #839496; + .scroller { + border-radius: 0; + width: 2px; + color: #268bd2; + } + } + } +} +``` + +::: diff --git a/docs/website/src/get-started.md b/docs/website/src/get-started.md index cfbbd16..8708641 100644 --- a/docs/website/src/get-started.md +++ b/docs/website/src/get-started.md @@ -19,18 +19,18 @@ If you want to use the default calculator plugin you will need [Qalculate](http: ### Building from source -If there are no distro package available for Onagre in your preferred manager, +If there is no Onagre package available for your linux distribution, you can build it from source with [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html). **Latest stable release:** -```shell +```bash cargo install onagre ``` **Latest upstream:** -```shell +```bash cargo install --git https://github.com/onagre-launcher/onagre ``` @@ -49,8 +49,7 @@ cargo install --git https://github.com/onagre-launcher/onagre Onagre has three distinct modes: *desktop entries*, *history* and *plugin*. By default, it will start in the *history* -mode which will display previous the most used desktop entry. - +mode which will display the most previously used desktop entries. **2. Plugins:** @@ -60,6 +59,10 @@ For instance the `file` plugin will match `^(/|~).*`, typing `~/` would enable t Plugin with no prefix are enabled by default, there entry will be mixed in the search results. +:::tip +To get help about a plugin usage, just type "?" in Onagre to display the bundled help plugin. +::: + **Default plugins:** | Mode | Description | Prefix | Configuration | @@ -78,6 +81,103 @@ Plugin with no prefix are enabled by default, there entry will be mixed in the s ## Configuration and Theming +Onagre will look for a theme file in `$XDG_CONFIG_DIR/onagre/theme.scss` and will fall back to the default theme if none +is found or if your theme contains syntax errors. To ensure your theme is correctly formatted run `onagre` from the terminal. + +A `.scss` extension is used for configuration in order to get syntax highlighting, +but only a small subset of scss is supported along with some custom properties prefixed with `--`. + + +**Example**: + +![not-adwaita.png](.vuepress%2Fpublic%2Fnot-adwaita.png) + +```scss +.onagre { + background: #d6d6d6; + color: #000000; + --icon-theme: "Papirus"; + --font-family: "DejaVuSans"; + --icon-size: 24; + border-radius: 8%; + border-color: #d6d6d6; + border-width: 4px; + padding: 5px; + + .container { + .rows { + --height: fill-portion 6; + .row { + --width: 392; + + .icon { + padding-top: 4px; + } + + .category-icon { + padding-left: 5px; + --icon-size: 11; + } + + .title { + font-size: 18px; + } + + .description { + font-size: 12px; + } + } + + .row-selected { + --width: 392; + border-radius: 8%; + background: #c0c0c0; + + .icon { + padding-top: 4px; + } + + .category-icon { + padding-left: 5px; + --icon-size: 11; + } + + .title { + font-size: 20px; + } + + .description { + font-size: 12px; + } + } + } + + .search { + border-radius: 5%; + background: #ffffff; + --height: fill-portion 1; + padding: 4px; + .input { + font-size: 20px; + } + } + + .scrollable { + width: 2px; + border-radius: 5%; + background: #c0c0c0; + .scroller { + width: 4px; + color: #a1a1a1; + } + } + } +} +``` + +See [Theming -> Reference](theming-reference.md) a detailed explanation of each available property. + + ## CLi @@ -88,7 +188,7 @@ a specific plugin. **Example:** -```shell +```bash onagre --mode "run " ``` @@ -102,7 +202,7 @@ for most plugin a whitespace is expected after the prefix keyword. Depending on your desktop environment, screen size, DPI scale it could be usefull to resize onagre without editing your whole theme file. To do so use the `--scale` flag. -```shell +```bash onagre --scale 1.2 ``` @@ -110,12 +210,84 @@ onagre --scale 1.2 You can provide a custom location for Onagre theme: -```shell +```bash onagre --theme "/home/me/my_custom_theme.scss" ``` -### Theme examples +## Plugins + +`pop-launcher` plugins can reside in any of these directories: + +- User-local plugins: `~/.local/share/pop-launcher/plugins/{plugin}/` +- System-wide installation: `/etc/pop-launcher/plugins/{plugin}/` +- Distribution packaging: `/usr/lib/pop-launcher/plugins/{plugin}/` + +Every plugin directory is composed of an executable, meant to be called by pop-launcher backend, +and a config file. + + +### Configure existing plugin + +Plugin configurations are written with the [Rusty Object Notation](https://github.com/ron-rs/ron) format (aka `.ron`). + +For instance, you might customize the default find plugin by editing its config file (`/usr/lib/pop-launcher/plugins/find/plugin.ron)`: + +```ron +( + // Title of the plugin displayed in the `help` plugin (`?`). + name: "File search", + // Description of the plugin displayed in the `help` plugin + description: "Syntax: find \nExample: find my-document.odt", + query: ( + // Regex which will activate the plugin when matching search input. + regex: "^(find )+", + // Syntax example displayed in the `help` plugin. + help: "find ", + // Should this plugin mix it's results with the default desktop entry results. + isolate: true, + ), + // Path of the executable plugin, relative the the plugin directory (you probably don't want to edit this) + bin: (path: "find"), + // The icon displayed + icon: Name("system-file-manager") +) +``` + +:::tip +Some plugins may require additional configuration files. +For instance, the `web` plugin needs a `config.ron` file which allow you to +configure custom shorthand for web search. + +**Example:** + +The following example add the `qw` shorthand to make a web search using Qwant search engine. +```ron + ( + matches: [ "qw" ], + queries: [ (name: "Qwant", query: "https://www.qwant.com/?q=" )] + ), + // .. +``` + +::: + +### Install plugins + +A variety of plugins are available for Onagre, offering extended functionality and customization options. +You can explore both community maintained and official plugins on the [awesome-pop-launcher](https://github.com/lucas-dclrcq/awesome-pop-launcher) +repository. + +The installation process can vary but most of the time plugin maintainers provide a makefile or a justfile. +It often boils down to copying the plugin executable and configuration to `~/.local/share/pop-launcher/plugins/{plugin}/`. + +### Write your own plugin + +Since `pop-launcher` works with JSON IPC over stdin and stdout pipes, you can write your plugin in any language. +To get started I would suggest looking at a simple example, such as the [emoji plugin](https://github.com/pbui/pop-launcher-scripts) +written in Python by [pbui](https://github.com/pbui). +If you want to build more complex stuff, you might want to take a look at [this blog post](https://oknozor.github.io/blog/write-a-pop-launcher-plugin/) +about writing a Stackoverflow plugin with Rust and the official [onagre-launcher-toolkit](https://docs.rs/onagre-launcher-toolkit/0.1.1/onagre_launcher_toolkit/) crate. -## Plugins \ No newline at end of file +Please if you write your own plugin send a PR to [awesome-pop-launcher](https://github.com/lucas-dclrcq/awesome-pop-launcher) 😊 ! diff --git a/docs/website/src/theming-reference.md b/docs/website/src/theming-reference.md index f3140a4..feb2905 100644 --- a/docs/website/src/theming-reference.md +++ b/docs/website/src/theming-reference.md @@ -1 +1,293 @@ -# Configuration reference \ No newline at end of file +# Configuration reference + +## Classes + +### `.onagre` + +- **Description:** Root class for styling the Onagre interface. +- **Allowed Attributes:** + - [`--exit-unfocused`](#exit-unfocused), [`--font-family`](#font-family), [`font-size`](#font-size), + [`--icon-theme`](#icon-theme), [`--icon-size`](#icon-size), [`height`](#height), [`width`](#width), + [`background`](#background), [`color`](#color), [`border-color`](#border-color), + [`border-width`](#border-width), [`border-radius`](#border-radius), [`padding`](#padding), + [`padding-left`](#padding-left), [`padding-top`](#padding-top), [`padding-right`](#padding-right), + [`padding-bottom`](#padding-bottom) +- **Inner Classes:** + - [`.container`](#container) + +### `.container` + +- **Description:** Inner class within `.onagre`, defining styles for the main container. +- **Allowed Attributes:** + - [`background`](#background), [`color`](#color), [`border-color`](#border-color), [`border-width`](#border-width), + [`border-radius`](#border-radius), [`padding`](#padding), [`padding-left`](#padding-left), [`padding-top`](#padding-top), + [`padding-right`](#padding-right), [`padding-bottom`](#padding-bottom) +- **Inner Classes:** + - [`.rows`](#rows) + - [`.search`](#search) + - [`.scrollable`](#scrollable) + +### `.search` + +- **Description:** Class for styling the search bar. +- **Allowed Attributes:** + - [`background`](#background), [`color`](#color), [`border-color`](#border-color), [`border-radius`](#border-radius), + [`border-width`](#border-width), [`padding`](#padding), [`padding-left`](#padding-left), [`padding-right`](#padding-right), + [`padding-bottom`](#padding-bottom), [`padding-top`](#padding-top), [`spacing`](#spacing), [`--width`](#--width), + [`--height`](#--height), [`--align-x`](#align-x), [`--align-y`](#align-y) +- **Inner Classes:** + - [`.plugin-hint`](#plugin-hint) + - [`.bar`](#bar) + +### `.plugin-hint` + +- **Description:** Class for styling plugin hints. +- **Allowed Attributes:** + - [`background`](#background), [`color`](#color), [`border-color`](#border-color), + [`border-radius`](#border-radius), [`border-width`](#border-width), [`padding`](#padding), + [`padding-left`](#padding-left), [`padding-right`](#padding-right), [`padding-bottom`](#padding-bottom), + [`padding-top`](#padding-top), [`--width`](#--width), [`--height`](#--height), [`--align-x`](#align-x), + [`--align-y`](#align-y), [`font-size`](#font-size) + +### `.bar` + +- **Description:** Class for styling the input bar. +- **Allowed Attributes:** + - [`background`](#background), [`color`](#color), [`border-color`](#border-color), + [`border-radius`](#border-radius), [`border-width`](#border-width), [`text-width`](#text-width), + [`selection-color`](#selection-color), [`placeholder-color`](#placeholder-color), [`font-size`](#font-size), + [`padding`](#padding), [`padding-left`](#padding-left), [`padding-right`](#padding-right), + [`padding-bottom`](#padding-bottom), [`padding-top`](#padding-top), [`--align-x`](#align-x), + [`--align-y`](#align-y), [`--width`](#--width), [`--height`](#--height) + +### `.rows` + +- **Description:** Class for styling rows within a container. +- **Allowed Attributes:** + - [`background`](#background), [`color`](#color), [`border-color`](#border-color), + [`border-radius`](#border-radius), [`border-width`](#border-width), [`padding`](#padding), + [`padding-left`](#padding-left), [`padding-top`](#padding-top), [`padding-right`](#padding-right), + [`padding-bottom`](#padding-bottom), [`--width`](#--width), [`--height`](#--height) +- **Inner Classes:** + - [`.row-selected`](#row-selected) + - [`.row`](#row) + +### `.row-selected` + +- **Description:** Class for styling the selected row. +- **Allowed Attributes:** + - [`background`](#background), [`color`](#color), [`border-color`](#border-color), + [`border-radius`](#border-radius), [`border-width`](#border-width), [`padding`](#padding), + [`padding-left`](#padding-left), [`padding-right`](#padding-right), [`padding-bottom`](#padding-bottom), + [`padding-top`](#padding-top), [`--width`](#--width), [`--height`](#--height), [`--align-x`](#align-x), + [`--align-y`](#align-y) +- **Inner Classes:** + - [`.description`](#description) + - [`.title`](#title) + - [`.category-icon`](#category-icon) + - [`.icon`](#icon) + +### `.row` + +- **Description:** Class for styling default rows. +- **Allowed Attributes:** + - Similar to `.row-selected` with variations. +- **Inner Classes:** + - Similar inner classes as `.row-selected` + +### `.description` + +- **Description:** Class for styling the description section within a row. +- **Allowed Attributes:** + - Attributes similar to `.row-selected` or `.row`, focused on font size, color, and spacing. + +### `.title` + +- **Description:** Class for styling the title section within a row. +- **Allowed Attributes:** + - Attributes similar to `.row-selected` or `.row`, with emphasis on font size and bold styling. + +### `.icon` and `.category-icon` + +- **Description:** Classes for styling icons within rows. +- **Allowed Attributes:** + - [`background`](#background), [`color`](#color), [`border-color`](#border-color), + [`border-radius`](#border-radius), [`border-width`](#border-width), [`--align-x`](#align-x), + [`--align-y`](#align-y), [`--width`](#--width), [`--height`](#--height), [`icon-size`](#icon-size) + +### `.scrollable` + +- **Description:** Class for styling scrollable areas. +- **Allowed Attributes:** + - [`background`](#background), [`border-color`](#border-color), [`border-width`](#border-width), [`border-radius`](#border-radius), [`scrollbar-width`](#scrollbar-width), [`scroller`](#scroller), [`scrollbar-margin`](#scrollbar-margin) + - **Inner Classes:** + - [`.scroller`](#scroller) + +### `.scroller` + +- **Description:** Class for styling the scroller within scrollable areas. +- **Allowed Attributes:** + - [`color`](#color), [`border-color`](#border-color), [`border-width`](#border-width), [`border-radius`](#border-radius), [`scroller-width`](#scroller-width) + + +## Attributes + +### `--exit-unfocused` + +- **Descritpion**: weither or not Onagre should exit when it looses focus +- **Value**: Boolean + +### `--exit-unfocused` + +- **Description:** Whether or not Onagre should exit when it loses focus. +- **Value:** Boolean + +### `--font-family` + +- **Description:** Defines the font family for styling. +- **Value:** String + +### `font-size` + +- **Description:** Sets the font size. +- **Value:** Pixel value + +### `--icon-theme` + +- **Description:** Specifies the theme for icons. +- **Value:** String + +### `--icon-size` + +- **Description:** Sets the size of icons. +- **Value:** Pixel value + +### `height` + +- **Description:** Specifies the height on the main window. +- **Value:** Pixel value + +### `width` + +- **Description:** Specifies the width on the main window. +- **Value:** Pixel value + +### `--height` + +- **Description:** Specifies the height, with options for pixel value, `fill-portion {int}`, `fill`, or `shrink`. +- **Value:** Pixel value | `fill-portion {int}` | `fill` | `shrink` + +### `--width` + +- **Description:** Specifies the width, with options for pixel value, `fill-portion`, `fill`, or `shrink`. +- **Value:** Pixel value | `fill-portion` | `fill` | `shrink` + +### `background` + +- **Description:** Sets the background color. +- **Value:** Color + +### `color` + +- **Description:** Sets the text color. +- **Value:** Color + +### `border-color` + +- **Description:** Sets the border color. +- **Value:** Color + +### `border-width` + +- **Description:** Sets the width of the border. +- **Value:** Pixel value + +### `border-radius` + +- **Description:** Sets the radius of the border corners. +- **Value:** Percent value + +### `padding` + +- **Description:** Sets padding. +- **Value:** Pixel value + +### `padding-left` + +- **Description:** Sets left padding. +- **Value:** Pixel value + +### `padding-top` + +- **Description:** Sets top padding. +- **Value:** Pixel value + +### `padding-right` + +- **Description:** Sets right padding. +- **Value:** Pixel value + +### `padding-bottom` + +- **Description:** Sets bottom padding. +- **Value:** Pixel value + +### `spacing` + +- **Description:** Sets spacing. +- **Value:** Pixel value + +### `--width` + +- **Description:** Sets width as a length value. +- **Value:** Length value + +### `--height` + +- **Description:** Sets height as a length value. +- **Value:** Length value + +### `--align-x` + +- **Description:** Sets horizontal alignment. +- **Value:** `left` | `center` | `right` + +### `--align-y` + +- **Description:** Sets vertical alignment. +- **Value:** `top` | `center` | `bottom` + +### `--selection-color` + +- **Description:** Sets the color for text selection. +- **Value:** Color + +### `--placeholder-color` + +- **Description:** Sets the color for placeholder text. +- **Value:** Color + +### `--text-width` + +- **Description:** Sets the width of the text area as a length value. +- **Value:** Length value + +### `--scrollbar-width` + +- **Description:** Sets the width of the scrollbar in pixels. +- **Value:** Pixel value + +### `--scroller` + +- **Description:** Specific block for scroller styles. +- **Value:** Varies + +### `--scrollbar-margin` + +- **Description:** Sets the margin around the scrollbar in pixels. +- **Value:** Pixel value + +### `--scroller-width` + +- **Description:** Sets the width of the scroller in pixels. +- **Value:** Pixel value \ No newline at end of file