From f449132b4c446e3c1659d26578156e7668ed5752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 14 Aug 2024 20:38:38 +0200 Subject: [PATCH 01/22] wrap correctly --- client/homebrew/editor/editor.less | 1 + client/homebrew/editor/snippetbar/snippetbar.less | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.less b/client/homebrew/editor/editor.less index f8dc249d6..b2e96683e 100644 --- a/client/homebrew/editor/editor.less +++ b/client/homebrew/editor/editor.less @@ -2,6 +2,7 @@ .editor { position : relative; width : 100%; + container: editor / inline-size; .codeEditor { height : 100%; diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index e0a24fac9..19d4c3d4f 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -2,11 +2,18 @@ @import (less) '././././themes/fonts/5e/fonts.less'; .snippetBar { - @menuHeight : 25px; + @menuHeight : 25px; position : relative; height : @menuHeight; color : black; background-color : #DDDDDD; + min-width : 331px; + + @container editor (width < 538px) { + display : flex; + flex-wrap : wrap; + height : 50px; + } .editors { position : absolute; @@ -15,6 +22,11 @@ display : flex; justify-content : space-between; height : @menuHeight; + + @container editor (width < 538px) { + position : static; + } + & > div { width : @menuHeight; height : @menuHeight; From bbe56bf4435b3f68550e3387b2812a78cb725304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 14 Aug 2024 20:39:15 +0200 Subject: [PATCH 02/22] linting --- client/homebrew/editor/snippetbar/snippetbar.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 19d4c3d4f..86e4c9ffc 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -4,10 +4,10 @@ .snippetBar { @menuHeight : 25px; position : relative; + min-width : 331px; height : @menuHeight; color : black; background-color : #DDDDDD; - min-width : 331px; @container editor (width < 538px) { display : flex; @@ -139,11 +139,11 @@ cursor : pointer; .animate(background-color); i { + min-width : 25px; height : 1.2em; margin-right : 8px; font-size : 1.2em; - min-width: 25px; - text-align: center; + text-align : center; & ~ i { margin-right : 0; margin-left : 5px; From cc76ff147843fccb7f1f9c5c40140bf2b2e04f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Thu, 15 Aug 2024 12:07:55 +0200 Subject: [PATCH 03/22] relocated container query --- .../editor/snippetbar/snippetbar.less | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 86e4c9ffc..7180da562 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -9,12 +9,6 @@ color : black; background-color : #DDDDDD; - @container editor (width < 538px) { - display : flex; - flex-wrap : wrap; - height : 50px; - } - .editors { position : absolute; top : 0px; @@ -22,10 +16,6 @@ display : flex; justify-content : space-between; height : @menuHeight; - - @container editor (width < 538px) { - position : static; - } & > div { width : @menuHeight; @@ -201,4 +191,17 @@ } } } +} + +@container editor (width < 538px) { + + .snippetBar { + display : flex; + flex-wrap : wrap; + height : 50px; + + .editors { + position : static; + } + } } \ No newline at end of file From 1f41745d2b47267db25ee5105f220f68e0c41998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Fri, 23 Aug 2024 13:37:12 +0200 Subject: [PATCH 04/22] "Refactored Snippetbar component: updated JSX structure, added div wrapper for snippets, changed CSS styles for editors and snippets" --- .../homebrew/editor/snippetbar/snippetbar.jsx | 64 ++++++++++--------- .../editor/snippetbar/snippetbar.less | 10 ++- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index af493c961..dd45f0773 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -125,19 +125,23 @@ const Snippetbar = createClass({ renderSnippetGroups : function(){ const snippets = this.state.snippets.filter((snippetGroup)=>snippetGroup.view === this.props.view); - return _.map(snippets, (snippetGroup)=>{ - return ; - }); + return
+ {_.map(snippets, (snippetGroup)=>{ + return ; + }) + } +
}, + renderEditorButtons : function(){ if(!this.props.showEditButtons) return; @@ -158,23 +162,6 @@ const Snippetbar = createClass({ } return
-
- -
-
- -
-
- {foldButtons} -
- - {this.state.themeSelector && this.renderThemeSelector()} -
- -
this.props.onViewChange('text')}> @@ -186,14 +173,33 @@ const Snippetbar = createClass({
this.props.onViewChange('meta')}> +
+
+ {foldButtons} +
+ + {this.state.themeSelector && this.renderThemeSelector()}
+ +
+
+ +
+
+ +
+
; }, render : function(){ return
- {this.renderSnippetGroups()} {this.renderEditorButtons()} + {this.renderSnippetGroups()} +
; } }); diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 7180da562..7b0754a07 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -8,11 +8,15 @@ height : @menuHeight; color : black; background-color : #DDDDDD; + display: flex; - .editors { + .snippets { position : absolute; top : 0px; right : 0px; + } + + .editors { display : flex; justify-content : space-between; height : @menuHeight; @@ -107,7 +111,7 @@ .tooltipLeft('Edit Brew Properties'); } .snippetGroup { - border-right : 1px solid currentColor; + border-left : 1px solid currentColor; &:hover { & > .dropdown { visibility : visible; } } @@ -200,7 +204,7 @@ flex-wrap : wrap; height : 50px; - .editors { + .snippets { position : static; } } From 1aabb84731e64e8227be66e90ba75ceaf1c3148a Mon Sep 17 00:00:00 2001 From: David Bolack Date: Thu, 10 Oct 2024 17:40:32 -0500 Subject: [PATCH 05/22] Revert --experimental-vm-modules Code works but does not work with jest as expected. --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f8007c608..cd4fda141 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "url": "git://github.com/naturalcrit/homebrewery.git" }, "scripts": { - "dev": "node --experimental-require-module scripts/dev.js", - "quick": "node --experimental-require-module scripts/quick.js", - "build": "node --experimental-require-module scripts/buildHomebrew.js && node --experimental-require-module scripts/buildAdmin.js", - "builddev": "node --experimental-require-module scripts/buildHomebrew.js --dev", + "dev": "node scripts/dev.js", + "quick": "node scripts/quick.js", + "build": "node scripts/buildHomebrew.js && node scripts/buildAdmin.js", + "builddev": "node scripts/buildHomebrew.js --dev", "lint": "eslint --fix", "lint:dry": "eslint", "stylelint": "stylelint --fix **/*.{less}", @@ -38,10 +38,10 @@ "test:hard-breaks": "jest tests/markdown/hard-breaks.test.js --verbose --noStackTrace", "test:emojis": "jest tests/markdown/emojis.test.js --verbose --noStackTrace", "test:route": "jest tests/routes/static-pages.test.js --verbose", - "phb": "node --experimental-require-module scripts/phb.js", + "phb": "node scripts/phb.js", "prod": "set NODE_ENV=production && npm run build", "postinstall": "npm run build", - "start": "node --experimental-require-module server.js" + "start": "node server.js" }, "author": "stolksdorf", "license": "MIT", From 9506be6b65f687e095e95278c3362121b425656c Mon Sep 17 00:00:00 2001 From: David Bolack Date: Thu, 10 Oct 2024 17:41:40 -0500 Subject: [PATCH 06/22] Revert "Revert --experimental-vm-modules" This reverts commit 1aabb84731e64e8227be66e90ba75ceaf1c3148a. --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index cd4fda141..f8007c608 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "url": "git://github.com/naturalcrit/homebrewery.git" }, "scripts": { - "dev": "node scripts/dev.js", - "quick": "node scripts/quick.js", - "build": "node scripts/buildHomebrew.js && node scripts/buildAdmin.js", - "builddev": "node scripts/buildHomebrew.js --dev", + "dev": "node --experimental-require-module scripts/dev.js", + "quick": "node --experimental-require-module scripts/quick.js", + "build": "node --experimental-require-module scripts/buildHomebrew.js && node --experimental-require-module scripts/buildAdmin.js", + "builddev": "node --experimental-require-module scripts/buildHomebrew.js --dev", "lint": "eslint --fix", "lint:dry": "eslint", "stylelint": "stylelint --fix **/*.{less}", @@ -38,10 +38,10 @@ "test:hard-breaks": "jest tests/markdown/hard-breaks.test.js --verbose --noStackTrace", "test:emojis": "jest tests/markdown/emojis.test.js --verbose --noStackTrace", "test:route": "jest tests/routes/static-pages.test.js --verbose", - "phb": "node scripts/phb.js", + "phb": "node --experimental-require-module scripts/phb.js", "prod": "set NODE_ENV=production && npm run build", "postinstall": "npm run build", - "start": "node server.js" + "start": "node --experimental-require-module server.js" }, "author": "stolksdorf", "license": "MIT", From bec830c3b8e1d04dec6efa5d94b5328a941d34b1 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 12 Oct 2024 08:09:51 +1300 Subject: [PATCH 07/22] Tweak color of Brew Renderer background text --- client/homebrew/brewRenderer/brewRenderer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 48f155820..17a7d9345 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -176,7 +176,7 @@ const BrewRenderer = (props)=>{ const styleObject = {}; if(global.config.deployment) { - styleObject.backgroundImage = `url("data:image/svg+xml;utf8,${global.config.deployment}")`; + styleObject.backgroundImage = `url("data:image/svg+xml;utf8,${global.config.deployment}")`; } return ( From 10283e6e45a642ffc5984bd008e518a98f4ffa53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 03:49:21 +0000 Subject: [PATCH 08/22] Bump stylelint from 16.9.0 to 16.10.0 Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.9.0 to 16.10.0. - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/16.9.0...16.10.0) --- updated-dependencies: - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 152 +++++++++++++++++----------------------------- package.json | 2 +- 2 files changed, 56 insertions(+), 98 deletions(-) diff --git a/package-lock.json b/package-lock.json index c37ddd676..900182fec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,7 +59,7 @@ "jest": "^29.7.0", "jest-expect-message": "^1.1.3", "postcss-less": "^6.0.0", - "stylelint": "^16.9.0", + "stylelint": "^16.10.0", "stylelint-config-recess-order": "^5.1.1", "stylelint-config-recommended": "^14.0.1", "supertest": "^7.0.0" @@ -5037,23 +5037,21 @@ } }, "node_modules/css-functions-list": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", - "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.3.tgz", + "integrity": "sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12 || >=16" } }, "node_modules/css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.0.0.tgz", + "integrity": "sha512-o88DVQ6GzsABn1+6+zo2ct801dBO5OASVyxbbvA2W20ue2puSh/VOuqUj90eUeMSX/xqGqBmOKiRQN7tJOuBXw==", "dev": true, - "license": "MIT", "dependencies": { - "mdn-data": "2.0.30", + "mdn-data": "2.10.0", "source-map-js": "^1.0.1" }, "engines": { @@ -5134,12 +5132,11 @@ } }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", - "license": "MIT", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -10358,11 +10355,10 @@ } }, "node_modules/mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", - "dev": true, - "license": "CC0-1.0" + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.10.0.tgz", + "integrity": "sha512-qq7C3EtK3yJXMwz1zAab65pjl+UhohqMOctTgcqjLOWABqmwj+me02LSsCuEUxnst9X1lCBpoE0WArGKgdGDzw==", + "dev": true }, "node_modules/media-typer": { "version": "0.3.0", @@ -10787,12 +10783,6 @@ } } }, - "node_modules/mongoose/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, "node_modules/mpath": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", @@ -10815,10 +10805,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "license": "MIT" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/nan": { "version": "2.20.0", @@ -11539,10 +11528,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "license": "ISC" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -11665,9 +11653,9 @@ } }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -11685,8 +11673,8 @@ ], "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -11712,9 +11700,9 @@ "dev": true }, "node_modules/postcss-safe-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.0.tgz", - "integrity": "sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.1.tgz", + "integrity": "sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==", "dev": true, "funding": [ { @@ -11730,7 +11718,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "engines": { "node": ">=18.0" }, @@ -12624,11 +12611,6 @@ "node": ">= 0.8" } }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, "node_modules/serve-static": { "version": "1.16.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", @@ -13032,11 +13014,10 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -13418,9 +13399,9 @@ "license": "ISC" }, "node_modules/stylelint": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.9.0.tgz", - "integrity": "sha512-31Nm3WjxGOBGpQqF43o3wO9L5AC36TPIe6030Lnm13H3vDMTcS21DrLh69bMX+DBilKqMMVLian4iG6ybBoNRQ==", + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.10.0.tgz", + "integrity": "sha512-z/8X2rZ52dt2c0stVwI9QL2AFJhLhbPkyfpDFcizs200V/g7v+UYY6SNcB9hKOLcDDX/yGLDsY/pX08sLkz9xQ==", "dev": true, "funding": [ { @@ -13441,17 +13422,17 @@ "balanced-match": "^2.0.0", "colord": "^2.9.3", "cosmiconfig": "^9.0.0", - "css-functions-list": "^3.2.2", - "css-tree": "^2.3.1", - "debug": "^4.3.6", + "css-functions-list": "^3.2.3", + "css-tree": "^3.0.0", + "debug": "^4.3.7", "fast-glob": "^3.3.2", "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^9.0.0", + "file-entry-cache": "^9.1.0", "global-modules": "^2.0.0", "globby": "^11.1.0", "globjoin": "^0.1.4", "html-tags": "^3.3.1", - "ignore": "^5.3.2", + "ignore": "^6.0.2", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", "known-css-properties": "^0.34.0", @@ -13460,14 +13441,13 @@ "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "picocolors": "^1.0.1", - "postcss": "^8.4.41", + "postcss": "^8.4.47", "postcss-resolve-nested-selector": "^0.1.6", - "postcss-safe-parser": "^7.0.0", + "postcss-safe-parser": "^7.0.1", "postcss-selector-parser": "^6.1.2", "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", "string-width": "^4.2.3", - "strip-ansi": "^7.1.0", "supports-hyperlinks": "^3.1.0", "svg-tags": "^1.0.0", "table": "^6.8.2", @@ -13529,19 +13509,6 @@ "stylelint": "^14.0.0 || ^15.0.0 || ^16.0.1" } }, - "node_modules/stylelint/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, "node_modules/stylelint/node_modules/balanced-match": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", @@ -13550,11 +13517,10 @@ "license": "MIT" }, "node_modules/stylelint/node_modules/file-entry-cache": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.0.0.tgz", - "integrity": "sha512-6MgEugi8p2tiUhqO7GnPsmbCCzj0YRCwwaTbpGRyKZesjRSzkqkAE9fPp7V2yMs5hwfgbQLgdvSSkGNg1s5Uvw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz", + "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==", "dev": true, - "license": "MIT", "dependencies": { "flat-cache": "^5.0.0" }, @@ -13567,7 +13533,6 @@ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", "dev": true, - "license": "MIT", "dependencies": { "flatted": "^3.3.1", "keyv": "^4.5.4" @@ -13576,6 +13541,15 @@ "node": ">=18" } }, + "node_modules/stylelint/node_modules/ignore": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", + "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/stylelint/node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -13599,22 +13573,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/stylelint/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/stylelint/node_modules/write-file-atomic": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", diff --git a/package.json b/package.json index 5e7191353..32dea87c8 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "jest": "^29.7.0", "jest-expect-message": "^1.1.3", "postcss-less": "^6.0.0", - "stylelint": "^16.9.0", + "stylelint": "^16.10.0", "stylelint-config-recess-order": "^5.1.1", "stylelint-config-recommended": "^14.0.1", "supertest": "^7.0.0" From 6d137d9ca8f2e1ab13ce9367aa8c2269d11753cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 14:38:35 +0000 Subject: [PATCH 09/22] Bump react-router-dom from 6.26.2 to 6.27.0 Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.26.2 to 6.27.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/react-router-dom@6.27.0/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.27.0/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 26 +++++++++++++------------- package.json | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 900182fec..e3fb0ad29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-frame-component": "^4.1.3", - "react-router-dom": "6.26.2", + "react-router-dom": "6.27.0", "sanitize-filename": "1.6.3", "superagent": "^10.1.0", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" @@ -2900,9 +2900,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.2.tgz", - "integrity": "sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.20.0.tgz", + "integrity": "sha512-mUnk8rPJBI9loFDZ+YzPGdeniYK+FTmRD1TMCz7ev2SNIozyKKpnGgsxO34u6Z4z/t0ITuu7voi/AshfsGsgFg==", "engines": { "node": ">=14.0.0" } @@ -12060,11 +12060,11 @@ "license": "MIT" }, "node_modules/react-router": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.26.2.tgz", - "integrity": "sha512-tvN1iuT03kHgOFnLPfLJ8V95eijteveqdOSk+srqfePtQvqCExB8eHOYnlilbOcyJyKnYkr1vJvf7YqotAJu1A==", + "version": "6.27.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.27.0.tgz", + "integrity": "sha512-YA+HGZXz4jaAkVoYBE98VQl+nVzI+cVI2Oj/06F5ZM+0u3TgedN9Y9kmMRo2mnkSK2nCpNQn0DVob4HCsY/WLw==", "dependencies": { - "@remix-run/router": "1.19.2" + "@remix-run/router": "1.20.0" }, "engines": { "node": ">=14.0.0" @@ -12074,12 +12074,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.2.tgz", - "integrity": "sha512-z7YkaEW0Dy35T3/QKPYB1LjMK2R1fxnHO8kWpUMTBdfVzZrWOiY9a7CtN8HqdWtDUWd5FY6Dl8HFsqVwH4uOtQ==", + "version": "6.27.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.27.0.tgz", + "integrity": "sha512-+bvtFWMC0DgAFrfKXKG9Fc+BcXWRUO1aJIihbB79xaeq0v5UzfvnM5houGUm1Y461WVRcgAQ+Clh5rdb1eCx4g==", "dependencies": { - "@remix-run/router": "1.19.2", - "react-router": "6.26.2" + "@remix-run/router": "1.20.0", + "react-router": "6.27.0" }, "engines": { "node": ">=14.0.0" diff --git a/package.json b/package.json index 32dea87c8..a4c6ee38a 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-frame-component": "^4.1.3", - "react-router-dom": "6.26.2", + "react-router-dom": "6.27.0", "sanitize-filename": "1.6.3", "superagent": "^10.1.0", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" From 36af1cdb7f150b28cdf15fc97977cbe9cb21451a Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 15 Oct 2024 21:47:27 -0400 Subject: [PATCH 10/22] Update brewRenderer.jsx --- client/homebrew/brewRenderer/brewRenderer.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 48f155820..689339349 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -1,7 +1,7 @@ /*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/ require('./brewRenderer.less'); const React = require('react'); -const { useState, useRef, useCallback } = React; +const { useState, useRef, useCallback, useMemo } = React; const _ = require('lodash'); const MarkdownLegacy = require('naturalcrit/markdownLegacy.js'); @@ -44,7 +44,7 @@ const BrewPage = (props)=>{ //v=====--------------------< Brew Renderer Component >-------------------=====v// -const renderedPages = []; +let renderedPages = []; let rawPages = []; const BrewRenderer = (props)=>{ @@ -110,6 +110,8 @@ const BrewRenderer = (props)=>{ return
${cleanStyle} ` }} />; }; + const renderedStyle = useMemo(()=> renderStyle(), [props.style.length, props.themeBundle]); + const renderPage = (pageText, index)=>{ if(props.renderer == 'legacy') { const html = MarkdownLegacy.render(pageText); @@ -122,6 +124,7 @@ const BrewRenderer = (props)=>{ }; const renderPages = ()=>{ + console.log("renderPages") if(props.errors && props.errors.length) return renderedPages; @@ -139,6 +142,8 @@ const BrewRenderer = (props)=>{ return renderedPages; }; + renderedPages = useMemo(() => renderPages(), [props.text.length]); + const handleControlKeys = (e)=>{ if(!(e.ctrlKey || e.metaKey)) return; const P_KEY = 80; @@ -214,9 +219,9 @@ const BrewRenderer = (props)=>{ {state.isMounted && <> - {renderStyle()} + {renderedStyle}
- {renderPages()} + {renderedPages}
} From 321bbba4b8b02077b42732f03c95d2c88c919043 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 15 Oct 2024 22:07:41 -0400 Subject: [PATCH 11/22] Rearrange --- client/homebrew/brewRenderer/brewRenderer.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 689339349..8f8752a5b 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -110,8 +110,6 @@ const BrewRenderer = (props)=>{ return
${cleanStyle} ` }} />; }; - const renderedStyle = useMemo(()=> renderStyle(), [props.style.length, props.themeBundle]); - const renderPage = (pageText, index)=>{ if(props.renderer == 'legacy') { const html = MarkdownLegacy.render(pageText); @@ -142,8 +140,6 @@ const BrewRenderer = (props)=>{ return renderedPages; }; - renderedPages = useMemo(() => renderPages(), [props.text.length]); - const handleControlKeys = (e)=>{ if(!(e.ctrlKey || e.metaKey)) return; const P_KEY = 80; @@ -184,6 +180,9 @@ const BrewRenderer = (props)=>{ styleObject.backgroundImage = `url("data:image/svg+xml;utf8,${global.config.deployment}")`; } + const renderedStyle = useMemo(()=> renderStyle(), [props.style.length, props.themeBundle]); + renderedPages = useMemo(() => renderPages(), [props.text.length]); + return ( <> {/*render dummy page while iFrame is mounting.*/} From f1aeea18d48cdcb405f2d07a5668188399f7c5e5 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 15 Oct 2024 22:07:55 -0400 Subject: [PATCH 12/22] Only jump when on `text` panel --- client/homebrew/editor/editor.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 13c22fb81..9fef72cbb 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -314,7 +314,7 @@ const Editor = createClass({ }, brewJump : function(targetPage=this.props.currentEditorCursorPageNum, smooth=true){ - if(!window || isJumping) + if(!window || !this.isText() || isJumping) return; // Get current brewRenderer scroll position and calculate target position @@ -355,7 +355,7 @@ const Editor = createClass({ }, sourceJump : function(targetPage=this.props.currentBrewRendererPageNum, smooth=true){ - if(!this.isText || isJumping) + if(!this.isText() || isJumping) return; const textSplit = this.props.renderer == 'V3' ? /^\\page$/gm : /\\page/; From 2aa60f793d2bd48dec196fb7e86402470005fc8b Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 15 Oct 2024 22:39:13 -0400 Subject: [PATCH 13/22] Fix /new /new starts with no `text` so it will crash without `?.` --- client/homebrew/brewRenderer/brewRenderer.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 8f8752a5b..0abf7e09f 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -122,7 +122,6 @@ const BrewRenderer = (props)=>{ }; const renderPages = ()=>{ - console.log("renderPages") if(props.errors && props.errors.length) return renderedPages; @@ -180,8 +179,8 @@ const BrewRenderer = (props)=>{ styleObject.backgroundImage = `url("data:image/svg+xml;utf8,${global.config.deployment}")`; } - const renderedStyle = useMemo(()=> renderStyle(), [props.style.length, props.themeBundle]); - renderedPages = useMemo(() => renderPages(), [props.text.length]); + const renderedStyle = useMemo(()=> renderStyle(), [props.style?.length, props.themeBundle]); + renderedPages = useMemo(() => renderPages(), [props.text?.length]); return ( <> From f2f06b23fd3c80ce518393abf5593ffe3acfc0e0 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 17 Oct 2024 16:42:57 -0400 Subject: [PATCH 14/22] Disable Global ToC Snippet --- .../homebrew/editor/snippetbar/snippetbar.jsx | 3 +- .../editor/snippetbar/snippetbar.less | 1 + themes/V3/5ePHB/snippets.js | 39 ++++++++++--------- themes/V3/5ePHB/style.less | 21 +++++----- 4 files changed, 36 insertions(+), 28 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index d457d92f2..3b8520284 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -291,8 +291,9 @@ const SnippetGroup = createClass({ return _.map(snippets, (snippet)=>{ return
this.handleSnippetClick(e, snippet)}> - {snippet.name} + {snippet.name} {snippet.experimental && beta} + {snippet.disabled && disabled} {snippet.subsnippets && <>
diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index c50d9df4c..434ee4beb 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -179,6 +179,7 @@ } } .name { margin-right : auto; } + .disabled { text-decoration: line-through; } .beta { align-self : center; padding : 4px 6px; diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index c3094abc4..543b1cf5c 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -157,24 +157,27 @@ module.exports = [ { name : 'Table of Contents Toggles', icon : 'fas fa-book', - gen : `{{tocGlobalH4}}\n\n`, - subsnippets : [ - { - name : 'Enable H1-H4 all pages', - icon : 'fas fa-dice-four', - gen : `{{tocGlobalH4}}\n\n`, - }, - { - name : 'Enable H1-H5 all pages', - icon : 'fas fa-dice-five', - gen : `{{tocGlobalH5}}\n\n`, - }, - { - name : 'Enable H1-H6 all pages', - icon : 'fas fa-dice-six', - gen : `{{tocGlobalH6}}\n\n`, - }, - ] + //gen : `{{tocGlobalH4}}\n\n`, + disabled : true + // RELIES ON .PAGES:HAS() WHICH IS VERY SLOW + // WILL BE MOVED TO STYLE TAB SNIPPETS + // subsnippets : [ + // { + // name : 'Enable H1-H4 all pages', + // icon : 'fas fa-dice-four', + // gen : `{{tocGlobalH4}}\n\n`, + // }, + // { + // name : 'Enable H1-H5 all pages', + // icon : 'fas fa-dice-five', + // gen : `{{tocGlobalH5}}\n\n`, + // }, + // { + // name : 'Enable H1-H6 all pages', + // icon : 'fas fa-dice-six', + // gen : `{{tocGlobalH6}}\n\n`, + // }, + // ] } ] }, diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 5a2b5cf3f..1216d0370 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -812,17 +812,20 @@ h6, // Brew level default inclusion changes. // These add Headers 'back' to inclusion. -.pages:has(.tocGlobalH4) { - h4 {--TOC: include; } -} -.pages:has(.tocGlobalH5) { - h4, h5 {--TOC: include; } -} +//NOTE: DO NOT USE :HAS WITH .PAGES!!! EXTREMELY SLOW TO RENDER ON LARGE DOCS! +//WILL BE MOVED TO A STYLE TAB SNIPPET INSTEAD +// .pages:has(.tocGlobalH4) { +// h4 {--TOC: include; } +// } -.pages:has(.tocGlobalH6) { - h4, h5, h6 {--TOC: include; } -} +// .pages:has(.tocGlobalH5) { +// h4, h5 {--TOC: include; } +// } + +// .pages:has(.tocGlobalH6) { +// h4, h5, h6 {--TOC: include; } +// } // Block level inclusion changes // These include either a single (include) or a range (depth) From 5a75182affeada869e75a177124a749143231037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Fri, 18 Oct 2024 00:52:26 +0200 Subject: [PATCH 15/22] changes as requested, wrapping of editor tools, and linting --- .../homebrew/editor/snippetbar/snippetbar.jsx | 95 ++++----- .../editor/snippetbar/snippetbar.less | 194 ++++++++++-------- 2 files changed, 145 insertions(+), 144 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index fc6bc6db6..8e643a837 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -151,7 +151,7 @@ const Snippetbar = createClass({ renderSnippetGroups : function(){ const snippets = this.state.snippets.filter((snippetGroup)=>snippetGroup.view === this.props.view); - return
+ return
{_.map(snippets, (snippetGroup)=>{ return ; - }) + />; + }) } -
+
; }, replaceContent : function(item){ @@ -223,66 +223,53 @@ const Snippetbar = createClass({ } return
-
- - { this.state.showHistory && this.renderHistoryItems() } +
+
+ + { this.state.showHistory && this.renderHistoryItems() } +
+
+ +
+
+ +
-
- -
-
- -
-
- {foldButtons} -
- - {this.state.themeSelector && this.renderThemeSelector()} +
+ {foldButtons} +
+ + {this.state.themeSelector && this.renderThemeSelector()} +
-
-
this.props.onViewChange('text')}> - -
-
this.props.onViewChange('style')}> - -
-
this.props.onViewChange('meta')}> - -
-
- {foldButtons} -
- - {this.state.themeSelector && this.renderThemeSelector()} + +
+
this.props.onViewChange('text')}> + +
+
this.props.onViewChange('style')}> + +
+
this.props.onViewChange('meta')}> + +
-
-
- -
-
- -
-
; }, render : function(){ return
- {this.renderEditorButtons()} {this.renderSnippetGroups()} - + {this.renderEditorButtons()}
; } }); @@ -315,7 +302,7 @@ const SnippetGroup = createClass({ {snippet.name} {snippet.experimental && beta} - {snippet.disabled && disabled} + {snippet.disabled && disabled} {snippet.subsnippets && <>
diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 852a95c98..780ae7a2c 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -5,102 +5,113 @@ @menuHeight : 25px; position : relative; min-width : 331px; - height : @menuHeight; + height : auto; color : black; background-color : #DDDDDD; display: flex; + justify-content: space-between; + flex-wrap:wrap-reverse; .snippets { - position : absolute; - top : 0px; - right : 0px; + display : flex; + justify-content : space-between; } .editors { display : flex; justify-content : space-between; - height : @menuHeight; - - & > div { - width : @menuHeight; - height : @menuHeight; - line-height : @menuHeight; - text-align : center; - cursor : pointer; - &:hover,&.selected { background-color : #999999; } - &.text { - .tooltipLeft('Brew Editor'); + >div { + display:flex; + justify-content: space-around; + flex:1; + border-left:1px solid; + + &:first-child { + border-left: none; } - &.style { - .tooltipLeft('Style Editor'); - } - &.meta { - .tooltipLeft('Properties'); - } - &.undo { - .tooltipLeft('Undo'); - font-size : 0.75em; - color : grey; - &.active { color : inherit; } - } - &.redo { - .tooltipLeft('Redo'); - font-size : 0.75em; - color : grey; - &.active { color : inherit; } - } - &.foldAll { - .tooltipLeft('Fold All'); - font-size : 0.75em; - color : inherit; - } - &.unfoldAll { - .tooltipLeft('Unfold All'); - font-size : 0.75em; - color : inherit; - } - &.history { - .tooltipLeft('History'); - font-size : 0.75em; - color : grey; - position : relative; - &.active { - color : inherit; + + & > div { + width : @menuHeight; + height : @menuHeight; + line-height : @menuHeight; + text-align : center; + cursor : pointer; + &:hover,&.selected { background-color : #999999; } + &.text { + .tooltipLeft('Brew Editor'); } - &>.dropdown{ - right : -1px; - &>.snippet{ - padding-right : 10px; + &.style { + .tooltipLeft('Style Editor'); + } + &.meta { + .tooltipLeft('Properties'); + } + &.undo { + .tooltipLeft('Undo'); + font-size : 0.75em; + color : grey; + &.active { color : inherit; } + } + &.redo { + .tooltipLeft('Redo'); + font-size : 0.75em; + color : grey; + &.active { color : inherit; } + } + &.foldAll { + .tooltipLeft('Fold All'); + font-size : 0.75em; + color : inherit; + } + &.unfoldAll { + .tooltipLeft('Unfold All'); + font-size : 0.75em; + color : inherit; + } + &.history { + .tooltipLeft('History'); + font-size : 0.75em; + color : grey; + position : relative; + border:none; + &.active { + color : inherit; + } + &>.dropdown{ + right : -1px; + &>.snippet{ + padding-right : 10px; + } } } - } - &.editorTheme { - .tooltipLeft('Editor Themes'); - font-size : 0.75em; - color : black; - &.active { - position : relative; - background-color : #999999; + &.editorTheme { + .tooltipLeft('Editor Themes'); + font-size : 0.75em; + color : black; + &.active { + position : relative; + background-color : #999999; + } + } + &.divider { + width : 5px; + background : linear-gradient(currentColor, currentColor) no-repeat center/1px 100%; + &:hover { background-color : inherit; } } } - &.divider { - width : 5px; - background : linear-gradient(currentColor, currentColor) no-repeat center/1px 100%; - &:hover { background-color : inherit; } + .themeSelector { + position : absolute; + top : 25px; + right : 0; + z-index : 10; + display : flex; + align-items : center; + justify-content : center; + width : 170px; + height : inherit; + background-color : inherit; } - } - .themeSelector { - position : absolute; - top : 25px; - right : 0; - z-index : 10; - display : flex; - align-items : center; - justify-content : center; - width : 170px; - height : inherit; - background-color : inherit; - } + } } .snippetBarButton { display : inline-block; @@ -111,6 +122,7 @@ line-height : @menuHeight; text-transform : uppercase; cursor : pointer; + text-wrap: nowrap; &:hover, &.selected { background-color : #999999; } i { margin-right : 3px; @@ -126,7 +138,8 @@ .tooltipLeft('Edit Brew Properties'); } .snippetGroup { - border-left : 1px solid currentColor; + border-right : 1px solid currentColor; + &:hover { & > .dropdown { visibility : visible; } } @@ -213,15 +226,16 @@ } } -@container editor (width < 538px) { +@container editor (width < 568px) { - .snippetBar { - display : flex; - flex-wrap : wrap; - height : 50px; - - .snippets { - position : static; - } + .editors,.snippets { + width:332.59px; } -} \ No newline at end of file + .editors { + border-right:1px solid; + } + .snippetBar .editors>div.history>.dropdown { + right:unset; + } + +} From 631ef795b75239505a2812ed046f2b108cb8c2eb Mon Sep 17 00:00:00 2001 From: David Bolack Date: Thu, 17 Oct 2024 18:30:31 -0500 Subject: [PATCH 16/22] Fix .tocGlobalH? Based on OH DEAR GOD THE LAG! discoveries related to the global toggles, these are being moved from a markup tag to a styles tab insert. --- themes/V3/5ePHB/snippets.js | 47 +++++++++++++++++-------------------- themes/V3/5ePHB/style.less | 12 ---------- 2 files changed, 22 insertions(+), 37 deletions(-) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 543b1cf5c..798a36193 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -154,31 +154,6 @@ module.exports = [ ] }, - { - name : 'Table of Contents Toggles', - icon : 'fas fa-book', - //gen : `{{tocGlobalH4}}\n\n`, - disabled : true - // RELIES ON .PAGES:HAS() WHICH IS VERY SLOW - // WILL BE MOVED TO STYLE TAB SNIPPETS - // subsnippets : [ - // { - // name : 'Enable H1-H4 all pages', - // icon : 'fas fa-dice-four', - // gen : `{{tocGlobalH4}}\n\n`, - // }, - // { - // name : 'Enable H1-H5 all pages', - // icon : 'fas fa-dice-five', - // gen : `{{tocGlobalH5}}\n\n`, - // }, - // { - // name : 'Enable H1-H6 all pages', - // icon : 'fas fa-dice-six', - // gen : `{{tocGlobalH6}}\n\n`, - // }, - // ] - } ] }, { @@ -217,6 +192,28 @@ module.exports = [ line-height: 1em; }\n\n` }, + { + name : 'Table of Contents Toggles', + icon : 'fas fa-book', + disabled : false, + subsnippets : [ + { + name : 'Enable H1-H4 all pages', + icon : 'fas fa-dice-four', + gen : `\n.pages {\n h4 {--TOC: include; }\n}\n\n`, + }, + { + name : 'Enable H1-H5 all pages', + icon : 'fas fa-dice-five', + gen : `\n.pages {\n h4, h5 {--TOC: include; }\n}\n\n`, + }, + { + name : 'Enable H1-H6 all pages', + icon : 'fas fa-dice-six', + gen : `\n.pages {\n h4, h5, h6 {--TOC: include; }\n}\n\n`, + }, + ] + } ] }, diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 1216d0370..ba975e58a 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -814,18 +814,6 @@ h6, // These add Headers 'back' to inclusion. //NOTE: DO NOT USE :HAS WITH .PAGES!!! EXTREMELY SLOW TO RENDER ON LARGE DOCS! -//WILL BE MOVED TO A STYLE TAB SNIPPET INSTEAD -// .pages:has(.tocGlobalH4) { -// h4 {--TOC: include; } -// } - -// .pages:has(.tocGlobalH5) { -// h4, h5 {--TOC: include; } -// } - -// .pages:has(.tocGlobalH6) { -// h4, h5, h6 {--TOC: include; } -// } // Block level inclusion changes // These include either a single (include) or a range (depth) From cd09408aa89d5e2598fecd1da14d24f98e28e8dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 03:37:53 +0000 Subject: [PATCH 17/22] Bump mongoose from 8.7.1 to 8.7.2 Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.7.1 to 8.7.2. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md) - [Commits](https://github.com/Automattic/mongoose/compare/8.7.1...8.7.2) --- updated-dependencies: - dependency-name: mongoose dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index e3fb0ad29..76c6e2dd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", - "mongoose": "^8.7.1", + "mongoose": "^8.7.2", "nanoid": "3.3.4", "nconf": "^0.12.1", "react": "^18.3.1", @@ -10661,9 +10661,9 @@ } }, "node_modules/mongoose": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.1.tgz", - "integrity": "sha512-RpNMyhyzLVCVbf8xTVbrf/18G3MqQzNw5pJdvOJ60fzbCa3cOZzz9L+8XpqzBXtRlgZGWv0T7MmOtvrT8ocp1Q==", + "version": "8.7.2", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.2.tgz", + "integrity": "sha512-Ok4VzMds9p5G3ZSUhmvBm1GdxanbzhS29jpSn02SPj+IXEVFnIdfwAlHHXWkyNscZKlcn8GuMi68FH++jo0flg==", "dependencies": { "bson": "^6.7.0", "kareem": "2.6.3", diff --git a/package.json b/package.json index a4c6ee38a..d25c1b1d1 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", - "mongoose": "^8.7.1", + "mongoose": "^8.7.2", "nanoid": "3.3.4", "nconf": "^0.12.1", "react": "^18.3.1", From ac766f3b37428f9d0029840d00d11807689b61c2 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 18 Oct 2024 10:23:56 -0400 Subject: [PATCH 18/22] Update brewRenderer.jsx --- client/homebrew/brewRenderer/brewRenderer.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index dba99638b..b9b9f5589 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -179,8 +179,8 @@ const BrewRenderer = (props)=>{ styleObject.backgroundImage = `url("data:image/svg+xml;utf8,${global.config.deployment}")`; } - const renderedStyle = useMemo(()=> renderStyle(), [props.style?.length, props.themeBundle]); - renderedPages = useMemo(() => renderPages(), [props.text?.length]); + const renderedStyle = useMemo(()=> renderStyle(), [props.style, props.themeBundle]); + renderedPages = useMemo(() => renderPages(), [props.text]); return ( <> From 9d81f50b609dc551375af031639fe4db386d7da1 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 18 Oct 2024 10:46:59 -0400 Subject: [PATCH 19/22] Remove `disabled = false` Don't need that tag at all when it's false. --- themes/V3/5ePHB/snippets.js | 1 - 1 file changed, 1 deletion(-) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 798a36193..f06064895 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -195,7 +195,6 @@ module.exports = [ { name : 'Table of Contents Toggles', icon : 'fas fa-book', - disabled : false, subsnippets : [ { name : 'Enable H1-H4 all pages', From d53a271c9ff8be2c736b2bb8720ead0a74747b2b Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 18 Oct 2024 10:53:16 -0400 Subject: [PATCH 20/22] Change to `.page` and tweak spacing/newlines to match other snippets All of our "global" style snippets are just set at `.page`, not `.pages`. This still applies globally but is consistent with our current approach. --- themes/V3/5ePHB/snippets.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index f06064895..dbcdc6f2a 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -199,17 +199,17 @@ module.exports = [ { name : 'Enable H1-H4 all pages', icon : 'fas fa-dice-four', - gen : `\n.pages {\n h4 {--TOC: include; }\n}\n\n`, + gen : `.page {\n\th4 {--TOC: include; }\n}\n\n`, }, { name : 'Enable H1-H5 all pages', icon : 'fas fa-dice-five', - gen : `\n.pages {\n h4, h5 {--TOC: include; }\n}\n\n`, + gen : `.page {\n\th4, h5 {--TOC: include; }\n}\n\n`, }, { name : 'Enable H1-H6 all pages', icon : 'fas fa-dice-six', - gen : `\n.pages {\n h4, h5, h6 {--TOC: include; }\n}\n\n`, + gen : `.page {\n\th4, h5, h6 {--TOC: include; }\n}\n\n`, }, ] } From 1d663ef38d6ec9a2ab6222bd22eea0cb03bcba59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sun, 20 Oct 2024 12:19:38 +0200 Subject: [PATCH 21/22] last iteration --- .../editor/snippetbar/snippetbar.less | 53 +++++++------------ 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 780ae7a2c..b766e7fe1 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -4,33 +4,31 @@ .snippetBar { @menuHeight : 25px; position : relative; + display : flex; + flex-wrap : wrap-reverse; + justify-content : space-between; min-width : 331px; height : auto; color : black; background-color : #DDDDDD; - display: flex; - justify-content: space-between; - flex-wrap:wrap-reverse; .snippets { display : flex; - justify-content : space-between; + justify-content : space-evenly; } .editors { display : flex; justify-content : space-between; >div { - display:flex; - justify-content: space-around; - flex:1; - border-left:1px solid; + display : flex; + flex : 1; + justify-content : space-around; - &:first-child { - border-left: none; - } + &:first-child { border-left : none; } & > div { + position : relative; width : @menuHeight; height : @menuHeight; line-height : @menuHeight; @@ -70,18 +68,14 @@ } &.history { .tooltipLeft('History'); + position : relative; font-size : 0.75em; color : grey; - position : relative; - border:none; - &.active { - color : inherit; - } - &>.dropdown{ + border : none; + &.active { color : inherit; } + & > .dropdown { right : -1px; - &>.snippet{ - padding-right : 10px; - } + & > .snippet { padding-right : 10px; } } } &.editorTheme { @@ -121,8 +115,8 @@ font-weight : 800; line-height : @menuHeight; text-transform : uppercase; + text-wrap : nowrap; cursor : pointer; - text-wrap: nowrap; &:hover, &.selected { background-color : #999999; } i { margin-right : 3px; @@ -138,7 +132,6 @@ .tooltipLeft('Edit Brew Properties'); } .snippetGroup { - border-right : 1px solid currentColor; &:hover { & > .dropdown { visibility : visible; } @@ -198,7 +191,7 @@ } } .name { margin-right : auto; } - .disabled { text-decoration: line-through; } + .disabled { text-decoration : line-through; } .beta { align-self : center; padding : 4px 6px; @@ -226,16 +219,10 @@ } } -@container editor (width < 568px) { +@container editor (width < 553px) { - .editors,.snippets { - width:332.59px; - } - .editors { - border-right:1px solid; - } - .snippetBar .editors>div.history>.dropdown { - right:unset; - } + .editors,.snippets { flex:1; } + .editors { border-bottom:1px solid} + .snippetBar .editors > div.history > .dropdown { right : unset; } } From 0e9021049c9c50c132e88d3d545f6b61bd7fd221 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 20 Oct 2024 13:00:05 -0400 Subject: [PATCH 22/22] lint --- client/homebrew/editor/snippetbar/snippetbar.less | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index b766e7fe1..a4d273bbf 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -2,7 +2,7 @@ @import (less) '././././themes/fonts/5e/fonts.less'; .snippetBar { - @menuHeight : 25px; + @menuHeight : 25px; position : relative; display : flex; flex-wrap : wrap-reverse; @@ -74,7 +74,7 @@ border : none; &.active { color : inherit; } & > .dropdown { - right : -1px; + right : -1px; & > .snippet { padding-right : 10px; } } } @@ -220,9 +220,7 @@ } @container editor (width < 553px) { - - .editors,.snippets { flex:1; } - .editors { border-bottom:1px solid} + .editors,.snippets { flex : 1; } + .editors { border-bottom : 1px solid;} .snippetBar .editors > div.history > .dropdown { right : unset; } - }