diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index cf762974e..c4e26830c 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -346,6 +346,14 @@ const Editor = createClass({ return this.refs.codeEditor?.undo(); }, + foldCode : function(){ + return this.refs.codeEditor?.foldAllCode(); + }, + + unfoldCode : function(){ + return this.refs.codeEditor?.unfoldAllCode(); + }, + render : function(){ return (
@@ -359,6 +367,8 @@ const Editor = createClass({ theme={this.props.brew.theme} undo={this.undo} redo={this.redo} + foldCode={this.foldCode} + unfoldCode={this.unfoldCode} historySize={this.historySize()} currentEditorTheme={this.state.editorTheme} updateEditorTheme={this.updateEditorTheme} diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index 246d534a9..d60e51388 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -37,6 +37,8 @@ const Snippetbar = createClass({ undo : ()=>{}, redo : ()=>{}, historySize : ()=>{}, + foldCode : ()=>{}, + unfoldCode : ()=>{}, updateEditorTheme : ()=>{}, cursorPos : {} }; @@ -144,6 +146,22 @@ const Snippetbar = createClass({ renderEditorButtons : function(){ if(!this.props.showEditButtons) return; + let foldButtons; + if(this.props.view == 'text'){ + foldButtons = + <> +
+ +
+
+ +
+ + + } + return
@@ -154,6 +172,7 @@ const Snippetbar = createClass({
+ {foldButtons}
diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index ed2dcebce..8dc6a8b9d 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -10,7 +10,6 @@ top : 0px; right : 0px; height : @menuHeight; - width : 125px; justify-content : space-between; &>div{ height : @menuHeight; @@ -46,6 +45,22 @@ color : black; } } + &.foldAll{ + .tooltipLeft('Fold All'); + font-size : 0.75em; + color : grey; + &.active{ + color : black; + } + } + &.unfoldAll{ + .tooltipLeft('Unfold All'); + font-size : 0.75em; + color : grey; + &.active{ + color : black; + } + } &.editorTheme{ .tooltipLeft('Editor Themes'); font-size : 0.75em; diff --git a/faq.md b/faq.md index 72e6a7d1f..c7254952b 100644 --- a/faq.md +++ b/faq.md @@ -102,7 +102,7 @@ The best way to avoid this is to leave space at the end of a column equal to one ### Why do I need to manually create a new page? Why doesn't text flow between pages? -A Homebrewery document is at it's core an HTML & CSS document, and currently limited by the specs of those technologies. It is currently not possible to flow content from inside one box ("page") to the inside of another box. It seems likely that someday CSS will add this capability, and if/when that happens, Homebrewery will adopt it as soon as possible. +A Homebrewery document is at its core an HTML & CSS document, and currently limited by the specs of those technologies. It is currently not possible to flow content from inside one box ("page") to the inside of another box. It seems likely that someday CSS will add this capability, and if/when that happens, Homebrewery will adopt it as soon as possible. ### Where do I get images? The Homebrewery does not provide images for use besides some page elements and example images for snippets. You will need to find your own images for use and be sure you are following the appropriate license requirements. @@ -126,4 +126,4 @@ The Homebrewery defaults to creating US Letter page sizes. If you are printing ### Typing `#### Adhesion` in the text editor doesn't show the header at all in the completed page? -Your ad-blocking software is mistakenly assuming your text to be an ad. Whitelist homebrewery.naturalcrit.com in your ad-blocking software. \ No newline at end of file +Your ad-blocking software is mistakenly assuming your text to be an ad. Whitelist homebrewery.naturalcrit.com in your ad-blocking software. diff --git a/package-lock.json b/package-lock.json index 09d5a4cce..715116874 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,19 +35,19 @@ "marked-smartypants-lite": "^1.0.1", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.29.4", - "mongoose": "^7.6.4", + "mongoose": "^8.0.0", "nanoid": "3.3.4", "nconf": "^0.12.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-frame-component": "^4.1.3", - "react-router-dom": "6.17.0", + "react-router-dom": "6.18.0", "sanitize-filename": "1.6.3", "superagent": "^8.1.2", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.52.0", + "eslint": "^8.53.0", "eslint-plugin-jest": "^27.6.0", "eslint-plugin-react": "^7.33.2", "jest": "^29.7.0", @@ -60,7 +60,7 @@ "supertest": "^6.3.3" }, "engines": { - "node": ">=20.8.x", + "node": "^20.8.x", "npm": "^10.2.x" } }, @@ -1892,9 +1892,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1915,9 +1915,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1942,9 +1942,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", - "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", + "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2779,10 +2779,9 @@ } }, "node_modules/@mongodb-js/saslprep": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.0.tgz", - "integrity": "sha512-Xfijy7HvfzzqiOAhAepF4SGN5e9leLkMvg/OPOF97XemjfVCYN/oWa75wnkc6mltMSTwY+XlbhWgUOJmkFspSw==", - "optional": true, + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.1.tgz", + "integrity": "sha512-t7c5K033joZZMspnHg/gWPE4kandgc2OxE74aYOtGKfgB9VPuVJPix0H6fhmm2erj5PBJ21mqcx34lpIGtUCsQ==", "dependencies": { "sparse-bitfield": "^3.0.3" } @@ -2823,9 +2822,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.10.0.tgz", - "integrity": "sha512-Lm+fYpMfZoEucJ7cMxgt4dYt8jLfbpwRCzAjm9UgSLOkmlqo9gupxt6YX3DY0Fk155NT9l17d/ydi+964uS9Lw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.11.0.tgz", + "integrity": "sha512-BHdhcWgeiudl91HvVa2wxqZjSHbheSgIiDvxrF1VjFzBzpTtuDPkOdOi3Iqvc08kXtFkLjhbS+ML9aM8mJS+wQ==", "engines": { "node": ">=14.0.0" } @@ -2964,9 +2963,9 @@ "dev": true }, "node_modules/@types/webidl-conversions": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.1.tgz", - "integrity": "sha512-8hKOnOan+Uu+NgMaCouhg3cT9x5fFZ92Jwf+uDLXLu/MFRbXxlWwGeQY7KVHkeSft6RvY+tdxklUBuyY9eIEKg==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" }, "node_modules/@types/whatwg-url": { "version": "8.2.2", @@ -3204,9 +3203,9 @@ } }, "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -4253,11 +4252,11 @@ } }, "node_modules/bson": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.0.tgz", - "integrity": "sha512-B+QB4YmDx9RStKv8LLSl/aVIEV3nYJc3cJNNTK2Cd1TL+7P+cNpw9mAPeCgc5K+j01Dv6sxUzcITXDx7ZU3F0w==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz", + "integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==", "engines": { - "node": ">=14.20.1" + "node": ">=16.20.1" } }, "node_modules/buffer": { @@ -5573,15 +5572,15 @@ } }, "node_modules/eslint": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", - "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", + "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.52.0", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.53.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -7356,11 +7355,6 @@ "node": ">= 0.4" } }, - "node_modules/ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" - }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -10118,8 +10112,7 @@ "node_modules/memory-pager": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" }, "node_modules/meow": { "version": "10.1.5", @@ -10445,47 +10438,103 @@ } }, "node_modules/mongoose": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.6.4.tgz", - "integrity": "sha512-kadPkS/f5iZJrrMxxOvSoOAErXmdnb28lMvHmuYgmV1ZQTpRqpp132PIPHkJMbG4OC2H0eSXYw/fNzYTH+LUcw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.0.0.tgz", + "integrity": "sha512-PzwkLgm1Jhj0NQdgGfnFsu0QP9V1sBFgbavEgh/IPAUzKAagzvEhuaBuAQOQGjczVWnpIU9tBqyd02cOTgsPlA==", "dependencies": { - "bson": "^5.5.0", + "bson": "^6.2.0", "kareem": "2.5.1", - "mongodb": "5.9.0", + "mongodb": "6.2.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", "sift": "16.0.1" }, "engines": { - "node": ">=14.20.1" + "node": ">=16.20.1" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mongoose" } }, - "node_modules/mongoose/node_modules/mongodb": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.0.tgz", - "integrity": "sha512-g+GCMHN1CoRUA+wb1Agv0TI4YTSiWr42B5ulkiAfLLHitGK1R+PkSAf3Lr5rPZwi/3F04LiaZEW0Kxro9Fi2TA==", + "node_modules/mongoose/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "optional": true, + "peer": true, "dependencies": { - "bson": "^5.5.0", - "mongodb-connection-string-url": "^2.6.0", - "socks": "^2.7.1" + "debug": "4" }, "engines": { - "node": ">=14.20.1" + "node": ">= 6.0.0" + } + }, + "node_modules/mongoose/node_modules/gaxios": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz", + "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==", + "optional": true, + "peer": true, + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.9" }, - "optionalDependencies": { - "@mongodb-js/saslprep": "^1.1.0" + "engines": { + "node": ">=12" + } + }, + "node_modules/mongoose/node_modules/gcp-metadata": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz", + "integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==", + "optional": true, + "peer": true, + "dependencies": { + "gaxios": "^5.0.0", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mongoose/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "optional": true, + "peer": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mongoose/node_modules/mongodb": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.2.0.tgz", + "integrity": "sha512-d7OSuGjGWDZ5usZPqfvb36laQ9CPhnWkAGHT61x5P95p/8nMVeH8asloMwW6GcYFeB0Vj4CB/1wOTDG2RA9BFA==", + "dependencies": { + "@mongodb-js/saslprep": "^1.1.0", + "bson": "^6.2.0", + "mongodb-connection-string-url": "^2.6.0" + }, + "engines": { + "node": ">=16.20.1" }, "peerDependencies": { "@aws-sdk/credential-providers": "^3.188.0", - "@mongodb-js/zstd": "^1.0.0", - "kerberos": "^1.0.0 || ^2.0.0", - "mongodb-client-encryption": ">=2.3.0 <3", - "snappy": "^7.2.2" + "@mongodb-js/zstd": "^1.1.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" }, "peerDependenciesMeta": { "@aws-sdk/credential-providers": { @@ -10494,6 +10543,9 @@ "@mongodb-js/zstd": { "optional": true }, + "gcp-metadata": { + "optional": true + }, "kerberos": { "optional": true }, @@ -10502,6 +10554,9 @@ }, "snappy": { "optional": true + }, + "socks": { + "optional": true } } }, @@ -11803,11 +11858,11 @@ "dev": true }, "node_modules/react-router": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.17.0.tgz", - "integrity": "sha512-YJR3OTJzi3zhqeJYADHANCGPUu9J+6fT5GLv82UWRGSxu6oJYCKVmxUcaBQuGm9udpWmPsvpme/CdHumqgsoaA==", + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.18.0.tgz", + "integrity": "sha512-vk2y7Dsy8wI02eRRaRmOs9g2o+aE72YCx5q9VasT1N9v+lrdB79tIqrjMfByHiY5+6aYkH2rUa5X839nwWGPDg==", "dependencies": { - "@remix-run/router": "1.10.0" + "@remix-run/router": "1.11.0" }, "engines": { "node": ">=14.0.0" @@ -11817,12 +11872,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.17.0.tgz", - "integrity": "sha512-qWHkkbXQX+6li0COUUPKAUkxjNNqPJuiBd27dVwQGDNsuFBdMbrS6UZ0CLYc4CsbdLYTckn4oB4tGDuPZpPhaQ==", + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.18.0.tgz", + "integrity": "sha512-Ubrue4+Ercc/BoDkFQfc6og5zRQ4A8YxSO3Knsne+eRbZ+IepAsK249XBH/XaFuOYOYr3L3r13CXTLvYt5JDjw==", "dependencies": { - "@remix-run/router": "1.10.0", - "react-router": "6.17.0" + "@remix-run/router": "1.11.0", + "react-router": "6.18.0" }, "engines": { "node": ">=14.0.0" @@ -12624,15 +12679,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, "node_modules/snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -12761,19 +12807,6 @@ "node": ">=0.10.0" } }, - "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -12824,7 +12857,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", - "optional": true, "dependencies": { "memory-pager": "^1.0.2" } diff --git a/package.json b/package.json index 9ff32cc1c..cd2b446ba 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "3.10.0", "engines": { "npm": "^10.2.x", - "node": ">=20.8.x" + "node": "^20.8.x" }, "repository": { "type": "git", @@ -104,19 +104,19 @@ "marked-smartypants-lite": "^1.0.1", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.29.4", - "mongoose": "^7.6.4", + "mongoose": "^8.0.0", "nanoid": "3.3.4", "nconf": "^0.12.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-frame-component": "^4.1.3", - "react-router-dom": "6.17.0", + "react-router-dom": "6.18.0", "sanitize-filename": "1.6.3", "superagent": "^8.1.2", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.52.0", + "eslint": "^8.53.0", "eslint-plugin-jest": "^27.6.0", "eslint-plugin-react": "^7.33.2", "jest": "^29.7.0", diff --git a/scripts/buildHomebrew.js b/scripts/buildHomebrew.js index e78759168..f072b0359 100644 --- a/scripts/buildHomebrew.js +++ b/scripts/buildHomebrew.js @@ -101,7 +101,10 @@ fs.emptyDirSync('./build'); //v==---------------------------MOVE CM EDITOR THEMES -----------------------------==v// - editorThemeFiles = fs.readdirSync('./node_modules/codemirror/theme'); + const editorThemesBuildDir = './build/homebrew/cm-themes'; + await fs.copy('./node_modules/codemirror/theme', editorThemesBuildDir); + await fs.copy('./themes/codeMirror/customThemes', editorThemesBuildDir); + editorThemeFiles = fs.readdirSync(editorThemesBuildDir); const editorThemeFile = './themes/codeMirror/editorThemes.json'; if(fs.existsSync(editorThemeFile)) fs.rmSync(editorThemeFile); @@ -114,7 +117,7 @@ fs.emptyDirSync('./build'); stream.write('\n]\n'); stream.end(); - await fs.copy('./node_modules/codemirror/theme', './build/homebrew/cm-themes'); + await fs.copy('./themes/codeMirror', './build/homebrew/codeMirror'); //v==----------------------------- BUNDLE PACKAGES --------------------------------==v// @@ -151,14 +154,14 @@ fs.emptyDirSync('./build'); // build(bundles); // -})().catch(console.error); + //In development, set up LiveReload (refreshes browser), and Nodemon (restarts server) + if(isDev){ + livereload('./build'); // Install the Chrome extension LiveReload to automatically refresh the browser + watchFile('./server.js', { // Restart server when change detected to this file or any nested directory from here + ignore : ['./build', './client', './themes'], // Ignore folders that are not running server code / avoids unneeded restarts + ext : 'js json' // Extensions to watch (only .js/.json by default) + //watch : ['./server', './themes'], // Watch additional folders if needed + }); + } -//In development, set up LiveReload (refreshes browser), and Nodemon (restarts server) -if(isDev){ - livereload('./build'); // Install the Chrome extension LiveReload to automatically refresh the browser - watchFile('./server.js', { // Restart server when change detected to this file or any nested directory from here - ignore : ['./build', './client', './themes'], // Ignore folders that are not running server code / avoids unneeded restarts - ext : 'js json' // Extensions to watch (only .js/.json by default) - //watch : ['./server', './themes'], // Watch additional folders if needed - }); -} +})().catch(console.error); \ No newline at end of file diff --git a/themes/codeMirror/customThemes/darkbrewery-v301.css b/themes/codeMirror/customThemes/darkbrewery-v301.css new file mode 100644 index 000000000..267c377f6 --- /dev/null +++ b/themes/codeMirror/customThemes/darkbrewery-v301.css @@ -0,0 +1,129 @@ +/* Main BG color and normal text color */ +.CodeMirror { + background: #293134; + color: #91A6AA; +} + +/* Brew BG */ +.brewRenderer { + background-color: #293134; +} +/* Blinking cursor */ +.CodeMirror-cursor { + border-left: 1px solid #e0e2e4; +} + +/* HB DARK NAV START*/ + +/* Bars at the top */ +.snippetBar { + background-color: #2F393C; + color: white; +} +nav { + background-color: #293134; +} +nav .navItem { + background-color: #293134; +} +/* Fix for Homebrewery custom Snippet icons */ +.snippetBar .fac { + filter: invert(1); +} +.snippetBar .snippetGroup .dropdown { + background-color: #2F393C; +} +/* HB DARK NAV END */ + +/* Line number stuff */ +.CodeMirror-gutter-elt { + color: #81969A; +} +.CodeMirror-linenumber { + background-color: #293134; +} +.CodeMirror-gutter { + background-color: #293134; +} +/* column splits */ +.editor .codeEditor .columnSplit { + font-style: italic; + color: inherit; + background-color:#1f5763; + border-bottom: #299 solid 1px; +} + +/* Colors for headings and such */ +/* ###Headings */ +.cm-s-default .cm-header { + color: #c51b1b; + -webkit-text-stroke-width: 0.1px; + -webkit-text-stroke-color: #000; +} +/* bold points */ +.cm-header, .cm-strong { + font-weight: bold; + color: #309dd2; +} +/* Link headings */ +.cm-s-default .cm-link { + color: #dd6300; +} +/* links */ +.cm-s-default .cm-string { + color: #aa8261; +} +/*@import*/ +.cm-s-default .cm-def { + color:#2986cc; +} +/* Bullets and such */ +.cm-s-default .cm-variable-2 { + color: #3cbf30; +} +/* blocks */ +.editor .codeEditor .block:not(.cm-comment) { + color: #e3e3e3; +} +/* inline blocks */ +.editor .codeEditor .inline-block { + color: #e3e3e3; +} +/* Tags (divs) */ +.cm-s-default .cm-tag { + color: #e3ff00; +} +.cm-s-default .cm-attribute { + color: #e3ff00; +} +.cm-s-default .cm-atom { + color:#000; +} +.cm-s-default .cm-qualifier{ + color:#ee1919; +} +.cm-s-default .cm-comment{ + color:#bbc700; +} +.cm-s-default .cm-keyword { + color:#c302df; + background-color:#b1b1b1; +} +.cm-s-default .cm-property.cm-error { + color:#c50202; +} + +.CodeMirror-foldmarker { + color:#f0ff00; +} + +/* New page */ +.editor .codeEditor .pageLine { + background: #000; + color:#000; + border-bottom: 1px solid #fff; +} + +.cm-s-default .cm-builtin { + color:#fff; +} \ No newline at end of file diff --git a/themes/codeMirror/editorThemes.json b/themes/codeMirror/editorThemes.json index a4dd74470..384ce4602 100644 --- a/themes/codeMirror/editorThemes.json +++ b/themes/codeMirror/editorThemes.json @@ -15,6 +15,7 @@ "cobalt", "colorforth", "darcula", +"darkbrewery-v301", "dracula", "duotone-dark", "duotone-light",