From cde611eed5bebe778717d6cd6dbadf826d76ac3f Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 3 May 2022 11:50:04 +1200 Subject: [PATCH 01/53] Add ID to iFrame --- 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 2da7123cc..787423528 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -188,7 +188,7 @@ const BrewRenderer = createClass({ : null} -
Date: Tue, 3 May 2022 13:36:03 +1200 Subject: [PATCH 02/53] Add brewJump and sourceJump functions --- client/homebrew/editor/editor.jsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index fce116fcc..04251bd91 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -174,9 +174,16 @@ const Editor = createClass({ } }, - brewJump : function(){ - const currentPage = this.getCurrentPage(); - window.location.hash = `p${currentPage}`; + brewJump : function(page=this.getCurrentPage()){ + if(!document) return; + window.frames['BrewRenderer'].contentDocument.getElementById(`p${page}`).scrollIntoView({ behaviour: 'auto', block: 'start' }); + // const hashPage = (page != 1) ? `p${page}` : ''; + // window.location.hash = hashPage; + }, + + sourceJump : function(line=1){ + if(!this.isText || !this.isStyle) return; + this.refs.codeEditor.setCursorPosition(line, 1); }, //Called when there are changes to the editor's dimensions @@ -250,6 +257,8 @@ const Editor = createClass({ renderer={this.props.renderer} undo={this.undo} redo={this.redo} + brewJump={this.brewJump} + sourceJump={this.sourceJump} historySize={this.historySize()} /> {this.renderEditor()} From 010309b04f948e4ba4ff0d9ae5e159307cdf24d1 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 3 May 2022 13:36:27 +1200 Subject: [PATCH 03/53] Add `toTop` button to SnippetBar --- client/homebrew/editor/snippetbar/snippetbar.jsx | 9 +++++++++ client/homebrew/editor/snippetbar/snippetbar.less | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index 0c6b5cc38..2be9e4775 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -60,10 +60,19 @@ const Snippetbar = createClass({ }); }, + toTop : function(){ + this.props.brewJump(1); + this.props.sourceJump(1); + }, + renderEditorButtons : function(){ if(!this.props.showEditButtons) return; return
+
+ +
diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 371f51fda..fe374f594 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -46,6 +46,14 @@ color : black; } } + &.toTop{ + .tooltipLeft('Back to Top'); + font-size : 0.75em; + color : grey; + &.active{ + color : black; + } + } &.divider { background: linear-gradient(#000, #000) no-repeat center/1px 100%; width: 5px; From f202e45e49f0f3a92bc6157a4dcff05e01c88725 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 3 May 2022 13:48:19 +1200 Subject: [PATCH 04/53] Shift to `[].includes` --- client/homebrew/editor/snippetbar/snippetbar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index 2be9e4775..f16ebbbb4 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -69,7 +69,7 @@ const Snippetbar = createClass({ if(!this.props.showEditButtons) return; return
-
From 451f06ca7408deccaebeeb4decfbe5888b8806a9 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 3 May 2022 17:24:37 +1200 Subject: [PATCH 05/53] Fix `getCurrentPage` --- client/homebrew/editor/editor.jsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 04251bd91..c8d3339f4 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -96,7 +96,7 @@ const Editor = createClass({ }, getCurrentPage : function(){ - const lines = this.props.brew.text.split('\n').slice(0, this.cursorPosition.line + 1); + const lines = this.props.brew.text.split('\n').slice(0, this.refs.codeEditor.getCursorPosition().line + 1); return _.reduce(lines, (r, line)=>{ if(line.indexOf('\\page') !== -1) r++; return r; @@ -174,16 +174,17 @@ const Editor = createClass({ } }, - brewJump : function(page=this.getCurrentPage()){ - if(!document) return; - window.frames['BrewRenderer'].contentDocument.getElementById(`p${page}`).scrollIntoView({ behaviour: 'auto', block: 'start' }); + brewJump : function(targetPage=this.getCurrentPage()){ + if(!window || this.isMeta()) return; + window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).scrollIntoView({ behaviour: 'auto', block: 'start' }); // const hashPage = (page != 1) ? `p${page}` : ''; // window.location.hash = hashPage; }, - sourceJump : function(line=1){ - if(!this.isText || !this.isStyle) return; - this.refs.codeEditor.setCursorPosition(line, 1); + sourceJump : function(targetLine=1){ + if(this.isText() || this.isStyle()) { + this.refs.codeEditor.setCursorPosition(targetLine, 0); + } }, //Called when there are changes to the editor's dimensions From a56601196dfd121b237e33bf1654f578e2077d00 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 3 May 2022 17:24:58 +1200 Subject: [PATCH 06/53] Add divider buttons --- shared/naturalcrit/splitPane/splitPane.jsx | 24 +++++++++++++++------ shared/naturalcrit/splitPane/splitPane.less | 23 +++++++++++++++++++- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 4d138e30b..691cf058f 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -85,13 +85,25 @@ const SplitPane = createClass({ }, */ renderDivider : function(){ - return
-
- - - + return <> +
console.log('left')} > +
-
; +
console.log('right')} > + +
+
+
+ + + +
+
+ ; }, render : function(){ diff --git a/shared/naturalcrit/splitPane/splitPane.less b/shared/naturalcrit/splitPane/splitPane.less index 0e9095193..7e3f819aa 100644 --- a/shared/naturalcrit/splitPane/splitPane.less +++ b/shared/naturalcrit/splitPane/splitPane.less @@ -13,7 +13,7 @@ .divider{ display : table; height : 100%; - width : 12px; + width : 15px; cursor : ew-resize; background-color : #bbb; text-align : center; @@ -32,4 +32,25 @@ background-color: #999; } } + .arrow{ + position : absolute; + width : 25px; + height : 25px; + border : 2px solid black; + border-radius : 15px; + text-align : center; + font-size : 1.2em; + cursor : pointer; + background-color : #bbb; + z-index : 999; + &.left{ + top : 30px; + } + &.right{ + top : 60px; + } + &:hover{ + background-color: #666; + } + } } From 7034f1d2d53e3d2cdfc527d71f5fab333cd2c079 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 3 May 2022 22:32:30 +1200 Subject: [PATCH 07/53] Add sourceJump function --- client/homebrew/editor/editor.jsx | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index c8d3339f4..ab264437b 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -181,8 +181,30 @@ const Editor = createClass({ // window.location.hash = hashPage; }, - sourceJump : function(targetLine=1){ + sourceJump : function(targetLine=null){ if(this.isText() || this.isStyle()) { + if(targetLine == null) { + const brewPosition = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer').item(0).scrollTop; + const pageCollection = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('page'); + + let currentPage = 0; + let currentPagePosition = 0; + while (currentPagePosition < brewPosition && currentPage < pageCollection.length) { + currentPagePosition = currentPagePosition + pageCollection[currentPage].scrollHeight; + currentPage++; + }; + + const textArray = this.props.brew.text.split('\n'); + let lineCount = 0; + let linePosition = 0; + while (linePosition < currentPage-1 && lineCount < textArray.length) { + // console.log(`${lineCount}: ${textArray[lineCount].toString()}`); + if(textArray[lineCount].toString().includes('\\page')) { linePosition++; } + lineCount++; + } + targetLine = lineCount; + } + // Math.floor(target.scrollTop / target.scrollHeight * prevState.pages.length); this.refs.codeEditor.setCursorPosition(targetLine, 0); } }, From af3a403971b343f5e9cbccbf97c38754d9476b3d Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 3 May 2022 22:33:05 +1200 Subject: [PATCH 08/53] Add moveBrew and moveSource function calls --- .../homebrew/editor/snippetbar/snippetbar.jsx | 18 +++++++++++++++++- .../homebrew/editor/snippetbar/snippetbar.less | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index f16ebbbb4..849a9c642 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -61,18 +61,34 @@ const Snippetbar = createClass({ }, toTop : function(){ + this.props.sourceJump(0); this.props.brewJump(1); - this.props.sourceJump(1); + }, + + moveBrew : function(){ + this.props.brewJump(); + }, + + moveSource : function(){ + this.props.sourceJump(); }, renderEditorButtons : function(){ if(!this.props.showEditButtons) return; return
+
+ +
+
+ +
diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index fe374f594..923568e28 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -10,7 +10,7 @@ top : 0px; right : 0px; height : @menuHeight; - width : 125px; + width : 175px; justify-content : space-between; &>div{ height : @menuHeight; @@ -54,6 +54,22 @@ color : black; } } + &.toBrew{ + .tooltipLeft('Match Brew to Source'); + font-size : 0.75em; + color : grey; + &.active{ + color : black; + } + } + &.fromBrew{ + .tooltipLeft('Match Source to Brew'); + font-size : 0.75em; + color : grey; + &.active{ + color : black; + } + } &.divider { background: linear-gradient(#000, #000) no-repeat center/1px 100%; width: 5px; From e84f68aa150fa42bc2a6f876652da9058f236de0 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 4 May 2022 07:54:15 +1200 Subject: [PATCH 09/53] Minor styling adjustments --- shared/naturalcrit/splitPane/splitPane.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/naturalcrit/splitPane/splitPane.less b/shared/naturalcrit/splitPane/splitPane.less index 7e3f819aa..5c15db5df 100644 --- a/shared/naturalcrit/splitPane/splitPane.less +++ b/shared/naturalcrit/splitPane/splitPane.less @@ -41,8 +41,9 @@ text-align : center; font-size : 1.2em; cursor : pointer; - background-color : #bbb; + background-color : #ddd; z-index : 999; + box-shadow : 0 4px 5px #0000007f; &.left{ top : 30px; } From 3d9704a392f1bdeb6cdcec83f9fbd5661056a5ac Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 9 May 2022 19:47:04 +1200 Subject: [PATCH 10/53] Fix typo Co-authored-by: Trevor Buckner --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index ab264437b..462122670 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -176,7 +176,7 @@ const Editor = createClass({ brewJump : function(targetPage=this.getCurrentPage()){ if(!window || this.isMeta()) return; - window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).scrollIntoView({ behaviour: 'auto', block: 'start' }); + window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).scrollIntoView({ behavior: 'auto', block: 'start' }); // const hashPage = (page != 1) ? `p${page}` : ''; // window.location.hash = hashPage; }, From 3c36b7f32816411aeffae507158cde72c7d002e9 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 9 May 2022 20:23:39 +1200 Subject: [PATCH 11/53] Limit Style tab source jumping --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 462122670..968a967de 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -182,7 +182,7 @@ const Editor = createClass({ }, sourceJump : function(targetLine=null){ - if(this.isText() || this.isStyle()) { + if(this.isText() || (this.isStyle() && targetLine == 0)) { if(targetLine == null) { const brewPosition = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer').item(0).scrollTop; const pageCollection = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('page'); From be0b1abe41e6d410a90a06ff269f4abd4f797f0c Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 9 May 2022 20:57:43 +1200 Subject: [PATCH 12/53] Adjust \page check for renderer --- client/homebrew/editor/editor.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 968a967de..826ea6da3 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -98,7 +98,11 @@ const Editor = createClass({ getCurrentPage : function(){ const lines = this.props.brew.text.split('\n').slice(0, this.refs.codeEditor.getCursorPosition().line + 1); return _.reduce(lines, (r, line)=>{ - if(line.indexOf('\\page') !== -1) r++; + if( + (this.props.renderer == 'legacy' && line.indexOf('\\page') !== -1) + || + (this.props.renderer == 'V3' && line.match(/^\\page$/)) + ) r++; return r; }, 1); }, From b26ff9eb00f9442eb4a2ff1ab0547db78513400d Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 9 May 2022 22:20:35 +1200 Subject: [PATCH 13/53] Shift to getBoundingClientRect().height --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 826ea6da3..a6ceb5094 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -194,7 +194,7 @@ const Editor = createClass({ let currentPage = 0; let currentPagePosition = 0; while (currentPagePosition < brewPosition && currentPage < pageCollection.length) { - currentPagePosition = currentPagePosition + pageCollection[currentPage].scrollHeight; + currentPagePosition = currentPagePosition + pageCollection[currentPage].getBoundingClientRect().height; currentPage++; }; From 02c8bf72921e3496bce8320fc7edcb15f934c32e Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 9 May 2022 22:21:00 +1200 Subject: [PATCH 14/53] Change to smooth scrolling from auto --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index a6ceb5094..cdfa96f31 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -180,7 +180,7 @@ const Editor = createClass({ brewJump : function(targetPage=this.getCurrentPage()){ if(!window || this.isMeta()) return; - window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).scrollIntoView({ behavior: 'auto', block: 'start' }); + window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).scrollIntoView({ behavior: 'smooth', block: 'start' }); // const hashPage = (page != 1) ? `p${page}` : ''; // window.location.hash = hashPage; }, From 7c0e702ead3c328596487cade33e7f3b05cedd4e Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 9 May 2022 23:20:16 +1200 Subject: [PATCH 15/53] Remove a loop from sourceJump --- client/homebrew/editor/editor.jsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index cdfa96f31..9ecacb48f 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -180,6 +180,7 @@ const Editor = createClass({ brewJump : function(targetPage=this.getCurrentPage()){ if(!window || this.isMeta()) return; + // console.log(`Scroll to: p${targetPage}`); window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).scrollIntoView({ behavior: 'smooth', block: 'start' }); // const hashPage = (page != 1) ? `p${page}` : ''; // window.location.hash = hashPage; @@ -198,15 +199,15 @@ const Editor = createClass({ currentPage++; }; - const textArray = this.props.brew.text.split('\n'); - let lineCount = 0; - let linePosition = 0; - while (linePosition < currentPage-1 && lineCount < textArray.length) { - // console.log(`${lineCount}: ${textArray[lineCount].toString()}`); - if(textArray[lineCount].toString().includes('\\page')) { linePosition++; } - lineCount++; + targetLine = 0; + + if(currentPage > 1){ + const textString = this.props.brew.text.split('\\page').slice(0, currentPage-1).join('\\page'); + const textPosition = textString.length; + const lineCount = textString.slice(0, textPosition).split('\n').length; + + targetLine = lineCount; } - targetLine = lineCount; } // Math.floor(target.scrollTop / target.scrollHeight * prevState.pages.length); this.refs.codeEditor.setCursorPosition(targetLine, 0); From 412ac5f331a5c5a1841d2266765ff89015f7f0ac Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 9 May 2022 23:39:04 +1200 Subject: [PATCH 16/53] Change to getBoundingClientRect().bottom --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 9ecacb48f..d557d40b4 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -195,7 +195,7 @@ const Editor = createClass({ let currentPage = 0; let currentPagePosition = 0; while (currentPagePosition < brewPosition && currentPage < pageCollection.length) { - currentPagePosition = currentPagePosition + pageCollection[currentPage].getBoundingClientRect().height; + currentPagePosition = currentPagePosition + pageCollection[currentPage].getBoundingClientRect().bottom; currentPage++; }; From 9f7ee39b0961143e443ef126a4ad0d1685ae2155 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 11 May 2022 10:46:49 +1200 Subject: [PATCH 17/53] Use BoundingRect.bottom to determine page --- client/homebrew/editor/editor.jsx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index d557d40b4..d15714bae 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -189,18 +189,20 @@ const Editor = createClass({ sourceJump : function(targetLine=null){ if(this.isText() || (this.isStyle() && targetLine == 0)) { if(targetLine == null) { - const brewPosition = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer').item(0).scrollTop; - const pageCollection = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('page'); - - let currentPage = 0; - let currentPagePosition = 0; - while (currentPagePosition < brewPosition && currentPage < pageCollection.length) { - currentPagePosition = currentPagePosition + pageCollection[currentPage].getBoundingClientRect().bottom; - currentPage++; - }; - targetLine = 0; + const pageCollection = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('page'); + const brewRendererHeight = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer').item(0).getBoundingClientRect().height; + + let currentPage = 1; + for (const page of pageCollection) { + if(page.getBoundingClientRect().bottom > (brewRendererHeight / 2)) { + const pageId = page.id; + currentPage = parseInt(pageId.slice(1, pageId.length)) || 1; + break; + } + } + if(currentPage > 1){ const textString = this.props.brew.text.split('\\page').slice(0, currentPage-1).join('\\page'); const textPosition = textString.length; From 80fa48e5927f436c906e2562de8a3a6142be0d07 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 11 May 2022 15:48:03 +1200 Subject: [PATCH 18/53] Remove redundant variable Co-authored-by: Trevor Buckner --- client/homebrew/editor/editor.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index d15714bae..73c4d3a21 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -197,8 +197,7 @@ const Editor = createClass({ let currentPage = 1; for (const page of pageCollection) { if(page.getBoundingClientRect().bottom > (brewRendererHeight / 2)) { - const pageId = page.id; - currentPage = parseInt(pageId.slice(1, pageId.length)) || 1; + currentPage = parseInt(page.id.slice(1)) || 1; break; } } From 9ebe5fa989306520e62b3e0ad39e3a971ac4dedd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 03:32:33 +0000 Subject: [PATCH 19/53] Bump @babel/preset-env from 7.18.0 to 7.18.2 Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.0 to 7.18.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.18.2/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 114 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2aabd74f5..bc903a4b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@babel/core": "^7.18.0", "@babel/plugin-transform-runtime": "^7.18.0", - "@babel/preset-env": "^7.18.0", + "@babel/preset-env": "^7.18.2", "@babel/preset-react": "^7.17.12", "body-parser": "^1.20.0", "classnames": "^2.3.1", @@ -187,9 +187,9 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz", - "integrity": "sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz", + "integrity": "sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==", "dependencies": { "@babel/compat-data": "^7.17.10", "@babel/helper-validator-option": "^7.16.7", @@ -426,11 +426,11 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", - "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz", + "integrity": "sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ==", "dependencies": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.18.2" }, "engines": { "node": ">=6.9.0" @@ -1204,9 +1204,9 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.17.12.tgz", - "integrity": "sha512-76lTwYaCxw8ldT7tNmye4LLwSoKDbRCBzu6n/DcK/P3FOR29+38CIIaVIZfwol9By8W/QHORYEnYSLuvcQKrsg==", + "version": "7.18.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.1.tgz", + "integrity": "sha512-+TTB5XwvJ5hZbO8xvl2H4XaMDOAK57zF4miuC9qQJgysPNEAZZ9Z69rdF5LJkozGdZrjBIUAIyKUWRMmebI7vg==", "dependencies": { "@babel/helper-plugin-utils": "^7.17.12" }, @@ -1278,13 +1278,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.0.tgz", - "integrity": "sha512-cCeR0VZWtfxWS4YueAK2qtHtBPJRSaJcMlbS8jhSIm/A3E2Kpro4W1Dn4cqJtp59dtWfXjQwK7SPKF8ghs7rlw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.2.tgz", + "integrity": "sha512-f5A865gFPAJAEE0K7F/+nm5CmAE3y8AWlMBG9unu5j9+tk50UQVK0QS8RNxSp7MJf0wh97uYyLWt3Zvu71zyOQ==", "dependencies": { "@babel/helper-module-transforms": "^7.18.0", "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-simple-access": "^7.17.7", + "@babel/helper-simple-access": "^7.18.2", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -1560,9 +1560,9 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.17.12.tgz", - "integrity": "sha512-kAKJ7DX1dSRa2s7WN1xUAuaQmkTpN+uig4wCKWivVXIObqGbVTUlSavHyfI2iZvz89GFAMGm9p2DBJ4Y1Tp0hw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.2.tgz", + "integrity": "sha512-/cmuBVw9sZBGZVOMkpAEaVLwm4JmK2GZ1dFKOGGpMzEHWFmyZZ59lUU0PdRr8YNYeQdNzTDwuxP2X2gzydTc9g==", "dependencies": { "@babel/helper-plugin-utils": "^7.17.12" }, @@ -1617,12 +1617,12 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.0.tgz", - "integrity": "sha512-cP74OMs7ECLPeG1reiCQ/D/ypyOxgfm8uR6HRYV23vTJ7Lu1nbgj9DQDo/vH59gnn7GOAwtTDPPYV4aXzsMKHA==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.2.tgz", + "integrity": "sha512-PfpdxotV6afmXMU47S08F9ZKIm2bJIQ0YbAAtDfIENX7G1NUAXigLREh69CWDjtgUy7dYn7bsMzkgdtAlmS68Q==", "dependencies": { "@babel/compat-data": "^7.17.10", - "@babel/helper-compilation-targets": "^7.17.10", + "@babel/helper-compilation-targets": "^7.18.2", "@babel/helper-plugin-utils": "^7.17.12", "@babel/helper-validator-option": "^7.16.7", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.17.12", @@ -1667,12 +1667,12 @@ "@babel/plugin-transform-dotall-regex": "^7.16.7", "@babel/plugin-transform-duplicate-keys": "^7.17.12", "@babel/plugin-transform-exponentiation-operator": "^7.16.7", - "@babel/plugin-transform-for-of": "^7.17.12", + "@babel/plugin-transform-for-of": "^7.18.1", "@babel/plugin-transform-function-name": "^7.16.7", "@babel/plugin-transform-literals": "^7.17.12", "@babel/plugin-transform-member-expression-literals": "^7.16.7", "@babel/plugin-transform-modules-amd": "^7.18.0", - "@babel/plugin-transform-modules-commonjs": "^7.18.0", + "@babel/plugin-transform-modules-commonjs": "^7.18.2", "@babel/plugin-transform-modules-systemjs": "^7.18.0", "@babel/plugin-transform-modules-umd": "^7.18.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.17.12", @@ -1685,12 +1685,12 @@ "@babel/plugin-transform-shorthand-properties": "^7.16.7", "@babel/plugin-transform-spread": "^7.17.12", "@babel/plugin-transform-sticky-regex": "^7.16.7", - "@babel/plugin-transform-template-literals": "^7.17.12", + "@babel/plugin-transform-template-literals": "^7.18.2", "@babel/plugin-transform-typeof-symbol": "^7.17.12", "@babel/plugin-transform-unicode-escapes": "^7.16.7", "@babel/plugin-transform-unicode-regex": "^7.16.7", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.18.0", + "@babel/types": "^7.18.2", "babel-plugin-polyfill-corejs2": "^0.3.0", "babel-plugin-polyfill-corejs3": "^0.5.0", "babel-plugin-polyfill-regenerator": "^0.3.0", @@ -1820,9 +1820,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/@babel/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.0.tgz", - "integrity": "sha512-vhAmLPAiC8j9K2GnsnLPCIH5wCrPpYIVBCWRBFDCB7Y/BXLqi/O+1RSTTM2bsmg6U/551+FCf9PNPxjABmxHTw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.2.tgz", + "integrity": "sha512-0On6B8A4/+mFUto5WERt3EEuG1NznDirvwca1O8UwXQHVY8g3R7OzYgxXdOfMwLO08UrpUD/2+3Bclyq+/C94Q==", "dependencies": { "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" @@ -12792,9 +12792,9 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz", - "integrity": "sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz", + "integrity": "sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==", "requires": { "@babel/compat-data": "^7.17.10", "@babel/helper-validator-option": "^7.16.7", @@ -12967,11 +12967,11 @@ } }, "@babel/helper-simple-access": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", - "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz", + "integrity": "sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ==", "requires": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.18.2" } }, "@babel/helper-skip-transparent-expression-wrappers": { @@ -13476,9 +13476,9 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.17.12.tgz", - "integrity": "sha512-76lTwYaCxw8ldT7tNmye4LLwSoKDbRCBzu6n/DcK/P3FOR29+38CIIaVIZfwol9By8W/QHORYEnYSLuvcQKrsg==", + "version": "7.18.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.1.tgz", + "integrity": "sha512-+TTB5XwvJ5hZbO8xvl2H4XaMDOAK57zF4miuC9qQJgysPNEAZZ9Z69rdF5LJkozGdZrjBIUAIyKUWRMmebI7vg==", "requires": { "@babel/helper-plugin-utils": "^7.17.12" } @@ -13520,13 +13520,13 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.0.tgz", - "integrity": "sha512-cCeR0VZWtfxWS4YueAK2qtHtBPJRSaJcMlbS8jhSIm/A3E2Kpro4W1Dn4cqJtp59dtWfXjQwK7SPKF8ghs7rlw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.2.tgz", + "integrity": "sha512-f5A865gFPAJAEE0K7F/+nm5CmAE3y8AWlMBG9unu5j9+tk50UQVK0QS8RNxSp7MJf0wh97uYyLWt3Zvu71zyOQ==", "requires": { "@babel/helper-module-transforms": "^7.18.0", "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-simple-access": "^7.17.7", + "@babel/helper-simple-access": "^7.18.2", "babel-plugin-dynamic-import-node": "^2.3.3" } }, @@ -13693,9 +13693,9 @@ } }, "@babel/plugin-transform-template-literals": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.17.12.tgz", - "integrity": "sha512-kAKJ7DX1dSRa2s7WN1xUAuaQmkTpN+uig4wCKWivVXIObqGbVTUlSavHyfI2iZvz89GFAMGm9p2DBJ4Y1Tp0hw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.2.tgz", + "integrity": "sha512-/cmuBVw9sZBGZVOMkpAEaVLwm4JmK2GZ1dFKOGGpMzEHWFmyZZ59lUU0PdRr8YNYeQdNzTDwuxP2X2gzydTc9g==", "requires": { "@babel/helper-plugin-utils": "^7.17.12" } @@ -13726,12 +13726,12 @@ } }, "@babel/preset-env": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.0.tgz", - "integrity": "sha512-cP74OMs7ECLPeG1reiCQ/D/ypyOxgfm8uR6HRYV23vTJ7Lu1nbgj9DQDo/vH59gnn7GOAwtTDPPYV4aXzsMKHA==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.2.tgz", + "integrity": "sha512-PfpdxotV6afmXMU47S08F9ZKIm2bJIQ0YbAAtDfIENX7G1NUAXigLREh69CWDjtgUy7dYn7bsMzkgdtAlmS68Q==", "requires": { "@babel/compat-data": "^7.17.10", - "@babel/helper-compilation-targets": "^7.17.10", + "@babel/helper-compilation-targets": "^7.18.2", "@babel/helper-plugin-utils": "^7.17.12", "@babel/helper-validator-option": "^7.16.7", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.17.12", @@ -13776,12 +13776,12 @@ "@babel/plugin-transform-dotall-regex": "^7.16.7", "@babel/plugin-transform-duplicate-keys": "^7.17.12", "@babel/plugin-transform-exponentiation-operator": "^7.16.7", - "@babel/plugin-transform-for-of": "^7.17.12", + "@babel/plugin-transform-for-of": "^7.18.1", "@babel/plugin-transform-function-name": "^7.16.7", "@babel/plugin-transform-literals": "^7.17.12", "@babel/plugin-transform-member-expression-literals": "^7.16.7", "@babel/plugin-transform-modules-amd": "^7.18.0", - "@babel/plugin-transform-modules-commonjs": "^7.18.0", + "@babel/plugin-transform-modules-commonjs": "^7.18.2", "@babel/plugin-transform-modules-systemjs": "^7.18.0", "@babel/plugin-transform-modules-umd": "^7.18.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.17.12", @@ -13794,12 +13794,12 @@ "@babel/plugin-transform-shorthand-properties": "^7.16.7", "@babel/plugin-transform-spread": "^7.17.12", "@babel/plugin-transform-sticky-regex": "^7.16.7", - "@babel/plugin-transform-template-literals": "^7.17.12", + "@babel/plugin-transform-template-literals": "^7.18.2", "@babel/plugin-transform-typeof-symbol": "^7.17.12", "@babel/plugin-transform-unicode-escapes": "^7.16.7", "@babel/plugin-transform-unicode-regex": "^7.16.7", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.18.0", + "@babel/types": "^7.18.2", "babel-plugin-polyfill-corejs2": "^0.3.0", "babel-plugin-polyfill-corejs3": "^0.5.0", "babel-plugin-polyfill-regenerator": "^0.3.0", @@ -13902,9 +13902,9 @@ } }, "@babel/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.0.tgz", - "integrity": "sha512-vhAmLPAiC8j9K2GnsnLPCIH5wCrPpYIVBCWRBFDCB7Y/BXLqi/O+1RSTTM2bsmg6U/551+FCf9PNPxjABmxHTw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.2.tgz", + "integrity": "sha512-0On6B8A4/+mFUto5WERt3EEuG1NznDirvwca1O8UwXQHVY8g3R7OzYgxXdOfMwLO08UrpUD/2+3Bclyq+/C94Q==", "requires": { "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" diff --git a/package.json b/package.json index 0e43905c4..00edb633b 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "dependencies": { "@babel/core": "^7.18.0", "@babel/plugin-transform-runtime": "^7.18.0", - "@babel/preset-env": "^7.18.0", + "@babel/preset-env": "^7.18.2", "@babel/preset-react": "^7.17.12", "body-parser": "^1.20.0", "classnames": "^2.3.1", From 53367579f4aaf62881895c0e60a2e9152d3a40ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 03:33:29 +0000 Subject: [PATCH 20/53] Bump @babel/core from 7.18.0 to 7.18.2 Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.0 to 7.18.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.18.2/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 136 ++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 66 insertions(+), 72 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2aabd74f5..59ca80f2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "@babel/core": "^7.18.0", + "@babel/core": "^7.18.2", "@babel/plugin-transform-runtime": "^7.18.0", "@babel/preset-env": "^7.18.0", "@babel/preset-react": "^7.17.12", @@ -85,20 +85,20 @@ } }, "node_modules/@babel/core": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.0.tgz", - "integrity": "sha512-Xyw74OlJwDijToNi0+6BBI5mLLR5+5R3bcSH80LXzjzEGEUlvNzujEE71BaD/ApEZHAvFI/Mlmp4M5lIkdeeWw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.2.tgz", + "integrity": "sha512-A8pri1YJiC5UnkdrWcmfZTJTV85b4UXTAfImGmCfYmax4TR9Cw8sDS0MOk++Gp2mE/BefVJ5nwy5yzqNJbP/DQ==", "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.0", - "@babel/helper-compilation-targets": "^7.17.10", + "@babel/generator": "^7.18.2", + "@babel/helper-compilation-targets": "^7.18.2", "@babel/helper-module-transforms": "^7.18.0", - "@babel/helpers": "^7.18.0", + "@babel/helpers": "^7.18.2", "@babel/parser": "^7.18.0", "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.0", - "@babel/types": "^7.18.0", + "@babel/traverse": "^7.18.2", + "@babel/types": "^7.18.2", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -151,11 +151,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.0.tgz", - "integrity": "sha512-81YO9gGx6voPXlvYdZBliFXAZU8vZ9AZ6z+CjlmcnaeOcYSFbMTpdeDUO9xD9dh/68Vq03I8ZspfUTPfitcDHg==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", + "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", "dependencies": { - "@babel/types": "^7.18.0", + "@babel/types": "^7.18.2", "@jridgewell/gen-mapping": "^0.3.0", "jsesc": "^2.5.1" }, @@ -187,9 +187,9 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz", - "integrity": "sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz", + "integrity": "sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==", "dependencies": { "@babel/compat-data": "^7.17.10", "@babel/helper-validator-option": "^7.16.7", @@ -294,12 +294,9 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", - "dependencies": { - "@babel/types": "^7.16.7" - }, + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", + "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==", "engines": { "node": ">=6.9.0" } @@ -489,13 +486,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.0.tgz", - "integrity": "sha512-AE+HMYhmlMIbho9nbvicHyxFwhrO+xhKB6AhRxzl8w46Yj0VXTZjEsAoBVC7rB2I0jzX+yWyVybnO08qkfx6kg==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.2.tgz", + "integrity": "sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg==", "dependencies": { "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.0", - "@babel/types": "^7.18.0" + "@babel/traverse": "^7.18.2", + "@babel/types": "^7.18.2" }, "engines": { "node": ">=6.9.0" @@ -1776,18 +1773,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.0.tgz", - "integrity": "sha512-oNOO4vaoIQoGjDQ84LgtF/IAlxlyqL4TUuoQ7xLkQETFaHkY1F7yazhB4Kt3VcZGL0ZF/jhrEpnXqUb0M7V3sw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", + "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", "dependencies": { "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.0", - "@babel/helper-environment-visitor": "^7.16.7", + "@babel/generator": "^7.18.2", + "@babel/helper-environment-visitor": "^7.18.2", "@babel/helper-function-name": "^7.17.9", "@babel/helper-hoist-variables": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7", "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.0", + "@babel/types": "^7.18.2", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1820,9 +1817,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/@babel/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.0.tgz", - "integrity": "sha512-vhAmLPAiC8j9K2GnsnLPCIH5wCrPpYIVBCWRBFDCB7Y/BXLqi/O+1RSTTM2bsmg6U/551+FCf9PNPxjABmxHTw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.2.tgz", + "integrity": "sha512-0On6B8A4/+mFUto5WERt3EEuG1NznDirvwca1O8UwXQHVY8g3R7OzYgxXdOfMwLO08UrpUD/2+3Bclyq+/C94Q==", "dependencies": { "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" @@ -12715,20 +12712,20 @@ "integrity": "sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==" }, "@babel/core": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.0.tgz", - "integrity": "sha512-Xyw74OlJwDijToNi0+6BBI5mLLR5+5R3bcSH80LXzjzEGEUlvNzujEE71BaD/ApEZHAvFI/Mlmp4M5lIkdeeWw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.2.tgz", + "integrity": "sha512-A8pri1YJiC5UnkdrWcmfZTJTV85b4UXTAfImGmCfYmax4TR9Cw8sDS0MOk++Gp2mE/BefVJ5nwy5yzqNJbP/DQ==", "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.0", - "@babel/helper-compilation-targets": "^7.17.10", + "@babel/generator": "^7.18.2", + "@babel/helper-compilation-targets": "^7.18.2", "@babel/helper-module-transforms": "^7.18.0", - "@babel/helpers": "^7.18.0", + "@babel/helpers": "^7.18.2", "@babel/parser": "^7.18.0", "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.0", - "@babel/types": "^7.18.0", + "@babel/traverse": "^7.18.2", + "@babel/types": "^7.18.2", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -12765,11 +12762,11 @@ } }, "@babel/generator": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.0.tgz", - "integrity": "sha512-81YO9gGx6voPXlvYdZBliFXAZU8vZ9AZ6z+CjlmcnaeOcYSFbMTpdeDUO9xD9dh/68Vq03I8ZspfUTPfitcDHg==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", + "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", "requires": { - "@babel/types": "^7.18.0", + "@babel/types": "^7.18.2", "@jridgewell/gen-mapping": "^0.3.0", "jsesc": "^2.5.1" } @@ -12792,9 +12789,9 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz", - "integrity": "sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz", + "integrity": "sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==", "requires": { "@babel/compat-data": "^7.17.10", "@babel/helper-validator-option": "^7.16.7", @@ -12868,12 +12865,9 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", - "requires": { - "@babel/types": "^7.16.7" - } + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", + "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==" }, "@babel/helper-explode-assignable-expression": { "version": "7.16.7", @@ -13012,13 +13006,13 @@ } }, "@babel/helpers": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.0.tgz", - "integrity": "sha512-AE+HMYhmlMIbho9nbvicHyxFwhrO+xhKB6AhRxzl8w46Yj0VXTZjEsAoBVC7rB2I0jzX+yWyVybnO08qkfx6kg==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.2.tgz", + "integrity": "sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg==", "requires": { "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.0", - "@babel/types": "^7.18.0" + "@babel/traverse": "^7.18.2", + "@babel/types": "^7.18.2" } }, "@babel/highlight": { @@ -13865,18 +13859,18 @@ } }, "@babel/traverse": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.0.tgz", - "integrity": "sha512-oNOO4vaoIQoGjDQ84LgtF/IAlxlyqL4TUuoQ7xLkQETFaHkY1F7yazhB4Kt3VcZGL0ZF/jhrEpnXqUb0M7V3sw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", + "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", "requires": { "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.0", - "@babel/helper-environment-visitor": "^7.16.7", + "@babel/generator": "^7.18.2", + "@babel/helper-environment-visitor": "^7.18.2", "@babel/helper-function-name": "^7.17.9", "@babel/helper-hoist-variables": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7", "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.0", + "@babel/types": "^7.18.2", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -13902,9 +13896,9 @@ } }, "@babel/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.0.tgz", - "integrity": "sha512-vhAmLPAiC8j9K2GnsnLPCIH5wCrPpYIVBCWRBFDCB7Y/BXLqi/O+1RSTTM2bsmg6U/551+FCf9PNPxjABmxHTw==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.2.tgz", + "integrity": "sha512-0On6B8A4/+mFUto5WERt3EEuG1NznDirvwca1O8UwXQHVY8g3R7OzYgxXdOfMwLO08UrpUD/2+3Bclyq+/C94Q==", "requires": { "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" diff --git a/package.json b/package.json index 0e43905c4..e023d38db 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ ] }, "dependencies": { - "@babel/core": "^7.18.0", + "@babel/core": "^7.18.2", "@babel/plugin-transform-runtime": "^7.18.0", "@babel/preset-env": "^7.18.0", "@babel/preset-react": "^7.17.12", From 160cfcce4dd830235b9437aee117c9cf120daab7 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 13:48:36 +1200 Subject: [PATCH 21/53] Change for line consistency when moving to page 1 --- client/homebrew/editor/editor.jsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 73c4d3a21..3caf229fc 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -202,15 +202,14 @@ const Editor = createClass({ } } - if(currentPage > 1){ - const textString = this.props.brew.text.split('\\page').slice(0, currentPage-1).join('\\page'); - const textPosition = textString.length; - const lineCount = textString.slice(0, textPosition).split('\n').length; + const textSplit = this.props.renderer == 'V3' ? '\n\\page\n' : '\\page'; + const textString = this.props.brew.text.split(textSplit).slice(0, currentPage-1).join(textSplit); + const textPosition = textString.length; + const lineCount = textString.match('\n') ? textString.slice(0, textPosition).split('\n').length : 0; - targetLine = lineCount; - } + targetLine = lineCount; } - // Math.floor(target.scrollTop / target.scrollHeight * prevState.pages.length); + this.refs.codeEditor.setCursorPosition(targetLine, 0); } }, From db5e4fc36cdb9cdecadef5f4d65f8223c06f2547 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 13:49:08 +1200 Subject: [PATCH 22/53] Fix button position with default divider position --- shared/naturalcrit/splitPane/splitPane.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 691cf058f..bc7e73905 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -29,6 +29,10 @@ const SplitPane = createClass({ userSetDividerPos : dividerPos, windowWidth : window.innerWidth }); + } else { + this.setState({ + currentDividerPos : window.innerWidth / 2 + }); } window.addEventListener('resize', this.handleWindowResize); }, @@ -83,7 +87,8 @@ const SplitPane = createClass({ window.getSelection().removeAllRanges(); } }, -*/ + */ + renderDivider : function(){ return <>
Date: Sat, 28 May 2022 22:57:31 -0400 Subject: [PATCH 23/53] Fetch `published` prop for brew on user page --- server/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/app.js b/server/app.js index c04e9b370..dc7b388da 100644 --- a/server/app.js +++ b/server/app.js @@ -199,6 +199,7 @@ app.get('/user/:username', async (req, res, next)=>{ 'pageCount', 'description', 'authors', + 'published', 'views', 'shareId', 'editId', From eca39369defb2910228a458bd236cd125488811d Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 15:18:35 +1200 Subject: [PATCH 24/53] Initial pass at split pane button functionality --- client/homebrew/editor/editor.jsx | 8 +++++++- shared/naturalcrit/splitPane/splitPane.jsx | 18 ++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 3caf229fc..a40c656c7 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -61,8 +61,14 @@ const Editor = createClass({ window.removeEventListener('resize', this.updateEditorSize); }, - componentDidUpdate : function() { + componentDidUpdate : function(prevProps, prevState, snapshot) { this.highlightCustomMarkdown(); + if(prevProps.moveBrew !== this.props.moveBrew) { + this.brewJump(); + }; + if(prevProps.moveSource !== this.props.moveSource) { + this.sourceJump(); + }; }, updateEditorSize : function() { diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index bc7e73905..c19ffe3ac 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -17,7 +17,9 @@ const SplitPane = createClass({ return { currentDividerPos : null, windowWidth : 0, - isDragging : false + isDragging : false, + moveSource : false, + moveBrew : false }; }, @@ -93,12 +95,12 @@ const SplitPane = createClass({ return <>
console.log('left')} > + onClick={()=>this.setState({ moveSource: !this.state.moveSource })} >
console.log('right')} > + onClick={()=>this.setState({ moveBrew: !this.state.moveBrew })} >
@@ -113,7 +115,15 @@ const SplitPane = createClass({ render : function(){ return
- {this.props.children[0]} + + {React.cloneElement(this.props.children[0], { + moveBrew : this.state.moveBrew, + moveSource : this.state.moveSource + })} + {this.renderDivider()} {this.props.children[1]}
; From 4e5daf583a17e63e7805796f55cc21613a402e63 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 15:24:02 +1200 Subject: [PATCH 25/53] Remove from snippet bar --- client/homebrew/editor/editor.jsx | 2 -- .../homebrew/editor/snippetbar/snippetbar.jsx | 20 ------------------- .../editor/snippetbar/snippetbar.less | 2 +- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index a40c656c7..42fd6c970 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -291,8 +291,6 @@ const Editor = createClass({ renderer={this.props.renderer} undo={this.undo} redo={this.redo} - brewJump={this.brewJump} - sourceJump={this.sourceJump} historySize={this.historySize()} /> {this.renderEditor()} diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index 849a9c642..28a55ec20 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -65,30 +65,10 @@ const Snippetbar = createClass({ this.props.brewJump(1); }, - moveBrew : function(){ - this.props.brewJump(); - }, - - moveSource : function(){ - this.props.sourceJump(); - }, - renderEditorButtons : function(){ if(!this.props.showEditButtons) return; return
-
- -
-
- -
-
- -
diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 923568e28..7703c6ab7 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -10,7 +10,7 @@ top : 0px; right : 0px; height : @menuHeight; - width : 175px; + width : 125px; justify-content : space-between; &>div{ height : @menuHeight; From 03bcbee1fce2ff4ec24f0915c769032c295d622e Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 15:27:02 +1200 Subject: [PATCH 26/53] Apply suggested regex Co-authored-by: Trevor Buckner --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 42fd6c970..8296478dd 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -208,7 +208,7 @@ const Editor = createClass({ } } - const textSplit = this.props.renderer == 'V3' ? '\n\\page\n' : '\\page'; + const textSplit = this.props.renderer == 'V3' ? `/^\\page$/gm` : '\\page'; const textString = this.props.brew.text.split(textSplit).slice(0, currentPage-1).join(textSplit); const textPosition = textString.length; const lineCount = textString.match('\n') ? textString.slice(0, textPosition).split('\n').length : 0; From 7b2486e4113015335e1b5419e863bf33d1983806 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 15:31:57 +1200 Subject: [PATCH 27/53] Use RegEx for text.split --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 8296478dd..8ddf4d6b8 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -208,7 +208,7 @@ const Editor = createClass({ } } - const textSplit = this.props.renderer == 'V3' ? `/^\\page$/gm` : '\\page'; + const textSplit = this.props.renderer == 'V3' ? /^\\page$/gm : /\\page/; const textString = this.props.brew.text.split(textSplit).slice(0, currentPage-1).join(textSplit); const textPosition = textString.length; const lineCount = textString.match('\n') ? textString.slice(0, textPosition).split('\n').length : 0; From 08db2e84920b6aca8f0a19c8562aa7618e949566 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 15:49:37 +1200 Subject: [PATCH 28/53] Hide divider arrows when not required --- client/homebrew/editor/editor.jsx | 3 ++ shared/naturalcrit/splitPane/splitPane.jsx | 44 +++++++++++++++------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 8ddf4d6b8..cab7eea12 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -232,6 +232,7 @@ const Editor = createClass({ renderEditor : function(){ if(this.isText()){ + this.props.setMoveArrows(true); return <> ; } if(this.isStyle()){ + this.props.setMoveArrows(false); return <> ; } if(this.isMeta()){ + this.props.setMoveArrows(false); return <> +
this.setState({ moveSource: !this.state.moveSource })} > + +
+
this.setState({ moveBrew: !this.state.moveBrew })} > + +
+ ; + } + }, + renderDivider : function(){ return <> -
this.setState({ moveSource: !this.state.moveSource })} > - -
-
this.setState({ moveBrew: !this.state.moveBrew })} > - -
+ {this.renderMoveArrows()}
@@ -120,8 +137,9 @@ const SplitPane = createClass({ width={this.state.currentDividerPos} > {React.cloneElement(this.props.children[0], { - moveBrew : this.state.moveBrew, - moveSource : this.state.moveSource + moveBrew : this.state.moveBrew, + moveSource : this.state.moveSource, + setMoveArrows : this.setMoveArrows })} {this.renderDivider()} From 4cc3dd93e2b3d8ab7de96d24728c05de3d3b9a8e Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 16:16:48 +1200 Subject: [PATCH 29/53] Move state change to `handleViewChange` --- client/homebrew/editor/editor.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index cab7eea12..1304df5db 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -96,6 +96,7 @@ const Editor = createClass({ }, handleViewChange : function(newView){ + this.props.setMoveArrows(newView === 'text'); this.setState({ view : newView }, this.updateEditorSize); //TODO: not sure if updateeditorsize needed @@ -232,7 +233,6 @@ const Editor = createClass({ renderEditor : function(){ if(this.isText()){ - this.props.setMoveArrows(true); return <> ; } if(this.isStyle()){ - this.props.setMoveArrows(false); return <> ; } if(this.isMeta()){ - this.props.setMoveArrows(false); return <> Date: Sun, 29 May 2022 16:19:58 +1200 Subject: [PATCH 30/53] Fall back to current divider position on resizing --- shared/naturalcrit/splitPane/splitPane.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 5dc8d6e31..d6acedc6f 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -47,7 +47,7 @@ const SplitPane = createClass({ handleWindowResize : function() { // Allow divider to increase in size to last user-set position // Limit current position to between 10% and 90% of visible space - const newLoc = this.limitPosition(this.state.userSetDividerPos, 0.1*(window.innerWidth-13), 0.9*(window.innerWidth-13)); + const newLoc = this.limitPosition(this.state.userSetDividerPos || this.state.currentDividerPos, 0.1*(window.innerWidth-13), 0.9*(window.innerWidth-13)); this.setState({ currentDividerPos : newLoc, From bb1fba27c2e9503e316c1cdb77a9e97b762b4b7c Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 16:26:30 +1200 Subject: [PATCH 31/53] Set a default userSetDividerPos --- shared/naturalcrit/splitPane/splitPane.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index d6acedc6f..f7ad4bed4 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -34,7 +34,8 @@ const SplitPane = createClass({ }); } else { this.setState({ - currentDividerPos : window.innerWidth / 2 + currentDividerPos : window.innerWidth / 2, + userSetDividerPos : window.innerWidth / 2 }); } window.addEventListener('resize', this.handleWindowResize); @@ -47,7 +48,7 @@ const SplitPane = createClass({ handleWindowResize : function() { // Allow divider to increase in size to last user-set position // Limit current position to between 10% and 90% of visible space - const newLoc = this.limitPosition(this.state.userSetDividerPos || this.state.currentDividerPos, 0.1*(window.innerWidth-13), 0.9*(window.innerWidth-13)); + const newLoc = this.limitPosition(this.state.userSetDividerPos, 0.1*(window.innerWidth-13), 0.9*(window.innerWidth-13)); this.setState({ currentDividerPos : newLoc, From 7de747b26404749505f7319890311634b7af8b8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 29 May 2022 15:58:02 +0000 Subject: [PATCH 32/53] Bump @babel/plugin-transform-runtime from 7.18.0 to 7.18.2 Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.18.0 to 7.18.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.18.2/packages/babel-plugin-transform-runtime) --- updated-dependencies: - dependency-name: "@babel/plugin-transform-runtime" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c94187e4..55c7dcfdd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@babel/core": "^7.18.2", - "@babel/plugin-transform-runtime": "^7.18.0", + "@babel/plugin-transform-runtime": "^7.18.2", "@babel/preset-env": "^7.18.2", "@babel/preset-react": "^7.17.12", "body-parser": "^1.20.0", @@ -1487,9 +1487,9 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.0.tgz", - "integrity": "sha512-7kM/jJ3DD/y1hDPn0jov12DoUIFsxLiItprhNydUSibxaywaxNqKwq+ODk72J9ePn4LWobIc5ik6TAJhVl8IkQ==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.2.tgz", + "integrity": "sha512-mr1ufuRMfS52ttq+1G1PD8OJNqgcTFjq3hwn8SZ5n1x1pBhi0E36rYMdTK0TsKtApJ4lDEdfXJwtGobQMHSMPg==", "dependencies": { "@babel/helper-module-imports": "^7.16.7", "@babel/helper-plugin-utils": "^7.17.12", @@ -13642,9 +13642,9 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.0.tgz", - "integrity": "sha512-7kM/jJ3DD/y1hDPn0jov12DoUIFsxLiItprhNydUSibxaywaxNqKwq+ODk72J9ePn4LWobIc5ik6TAJhVl8IkQ==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.2.tgz", + "integrity": "sha512-mr1ufuRMfS52ttq+1G1PD8OJNqgcTFjq3hwn8SZ5n1x1pBhi0E36rYMdTK0TsKtApJ4lDEdfXJwtGobQMHSMPg==", "requires": { "@babel/helper-module-imports": "^7.16.7", "@babel/helper-plugin-utils": "^7.17.12", diff --git a/package.json b/package.json index 8866f1356..eee33136f 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ }, "dependencies": { "@babel/core": "^7.18.2", - "@babel/plugin-transform-runtime": "^7.18.0", + "@babel/plugin-transform-runtime": "^7.18.2", "@babel/preset-env": "^7.18.2", "@babel/preset-react": "^7.17.12", "body-parser": "^1.20.0", From bce9cc2586852b4ae905aea978bec67d31bc33a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 29 May 2022 15:58:06 +0000 Subject: [PATCH 33/53] Bump eslint from 8.15.0 to 8.16.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.15.0 to 8.16.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.15.0...v8.16.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 50 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c94187e4..1c6e2103d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.15.0", + "eslint": "^8.16.0", "eslint-plugin-react": "^7.30.0", "jest": "^28.1.0", "supertest": "^6.2.3" @@ -1835,15 +1835,15 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", - "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.3.2", - "globals": "^13.9.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -4859,12 +4859,12 @@ } }, "node_modules/eslint": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", - "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", + "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.3", + "@eslint/eslintrc": "^1.3.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -4882,7 +4882,7 @@ "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", - "globals": "^13.6.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -5925,9 +5925,9 @@ } }, "node_modules/globals": { - "version": "13.14.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.14.0.tgz", - "integrity": "sha512-ERO68sOYwm5UuLvSJTY7w7NP2c8S4UcXs3X1GBX8cwOr+ShOcDBbCY5mH4zxz0jsYCdJ8ve8Mv9n2YGJMB1aeg==", + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -13911,15 +13911,15 @@ "dev": true }, "@eslint/eslintrc": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", - "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.3.2", - "globals": "^13.9.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -16351,12 +16351,12 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", - "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", + "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.3", + "@eslint/eslintrc": "^1.3.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -16374,7 +16374,7 @@ "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", - "globals": "^13.6.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -17161,9 +17161,9 @@ } }, "globals": { - "version": "13.14.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.14.0.tgz", - "integrity": "sha512-ERO68sOYwm5UuLvSJTY7w7NP2c8S4UcXs3X1GBX8cwOr+ShOcDBbCY5mH4zxz0jsYCdJ8ve8Mv9n2YGJMB1aeg==", + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", "dev": true, "requires": { "type-fest": "^0.20.2" diff --git a/package.json b/package.json index 8866f1356..1fd4a5508 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.15.0", + "eslint": "^8.16.0", "eslint-plugin-react": "^7.30.0", "jest": "^28.1.0", "supertest": "^6.2.3" From 24248c2dc6f4010d5e5bfc988d13aae874906da0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 May 2022 03:01:02 +0000 Subject: [PATCH 34/53] Bump codemirror from 5.65.4 to 5.65.5 Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.65.4 to 5.65.5. - [Release notes](https://github.com/codemirror/CodeMirror/releases) - [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md) - [Commits](https://github.com/codemirror/CodeMirror/compare/5.65.4...5.65.5) --- updated-dependencies: - dependency-name: codemirror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef17cdd44..456bf3050 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@babel/preset-react": "^7.17.12", "body-parser": "^1.20.0", "classnames": "^2.3.1", - "codemirror": "^5.65.4", + "codemirror": "^5.65.5", "cookie-parser": "^1.4.6", "create-react-class": "^15.7.0", "dedent-tabs": "^0.10.1", @@ -4077,9 +4077,9 @@ } }, "node_modules/codemirror": { - "version": "5.65.4", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.4.tgz", - "integrity": "sha512-tytrSm5Rh52b6j36cbDXN+FHwHCl9aroY4BrDZB2NFFL3Wjfq9nuYVLFFhaOYOczKAg3JXTr8BuT8LcE5QY4Iw==" + "version": "5.65.5", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.5.tgz", + "integrity": "sha512-HNyhvGLnYz5c+kIsB9QKVitiZUevha3ovbIYaQiGzKo7ECSL/elWD9RXt3JgNr0NdnyqE9/Rc/7uLfkJQL638w==" }, "node_modules/collect-v8-coverage": { "version": "1.0.1", @@ -15707,9 +15707,9 @@ "dev": true }, "codemirror": { - "version": "5.65.4", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.4.tgz", - "integrity": "sha512-tytrSm5Rh52b6j36cbDXN+FHwHCl9aroY4BrDZB2NFFL3Wjfq9nuYVLFFhaOYOczKAg3JXTr8BuT8LcE5QY4Iw==" + "version": "5.65.5", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.5.tgz", + "integrity": "sha512-HNyhvGLnYz5c+kIsB9QKVitiZUevha3ovbIYaQiGzKo7ECSL/elWD9RXt3JgNr0NdnyqE9/Rc/7uLfkJQL638w==" }, "collect-v8-coverage": { "version": "1.0.1", diff --git a/package.json b/package.json index 018338895..0cf5a0bb7 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@babel/preset-react": "^7.17.12", "body-parser": "^1.20.0", "classnames": "^2.3.1", - "codemirror": "^5.65.4", + "codemirror": "^5.65.5", "cookie-parser": "^1.4.6", "create-react-class": "^15.7.0", "dedent-tabs": "^0.10.1", From 6c307856e1ed7374f3198ac3e0a794e22fc69e26 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 May 2022 03:01:45 +0000 Subject: [PATCH 35/53] Bump mongoose from 6.3.4 to 6.3.5 Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.4 to 6.3.5. - [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/6.3.4...6.3.5) --- updated-dependencies: - dependency-name: mongoose dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef17cdd44..7cc25e3a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "marked-extended-tables": "^1.0.3", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.29.3", - "mongoose": "^6.3.4", + "mongoose": "^6.3.5", "nanoid": "3.3.4", "nconf": "^0.12.0", "query-string": "7.1.1", @@ -9039,9 +9039,9 @@ } }, "node_modules/mongoose": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.4.tgz", - "integrity": "sha512-UP0azyGMdY+2YNbJUHeHhnVw5vPzCqs4GQDUwHkilif/rwmSZktUQhQWMp1pUgRNeF2JC30vWGLrInZxD7K/Qw==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.5.tgz", + "integrity": "sha512-Ho3b/MK3lFyb87NjzyVwrjCqQ5DuLsIPSMFYDuZjaIJNhZfHNPQIcUDR1RLZ0/l+uznwo0VBu3WSwdu8EfAZTA==", "dependencies": { "bson": "^4.6.2", "kareem": "2.3.5", @@ -19512,9 +19512,9 @@ } }, "mongoose": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.4.tgz", - "integrity": "sha512-UP0azyGMdY+2YNbJUHeHhnVw5vPzCqs4GQDUwHkilif/rwmSZktUQhQWMp1pUgRNeF2JC30vWGLrInZxD7K/Qw==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.5.tgz", + "integrity": "sha512-Ho3b/MK3lFyb87NjzyVwrjCqQ5DuLsIPSMFYDuZjaIJNhZfHNPQIcUDR1RLZ0/l+uznwo0VBu3WSwdu8EfAZTA==", "requires": { "bson": "^4.6.2", "kareem": "2.3.5", diff --git a/package.json b/package.json index 018338895..14ec7f1cb 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "marked-extended-tables": "^1.0.3", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.29.3", - "mongoose": "^6.3.4", + "mongoose": "^6.3.5", "nanoid": "3.3.4", "nconf": "^0.12.0", "query-string": "7.1.1", From 0c0d817cc272fdcab713036916157765fdf4fe21 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Thu, 2 Jun 2022 13:49:27 +1200 Subject: [PATCH 36/53] Add scrollPastEnd to CodeMirror --- shared/naturalcrit/codeEditor/codeEditor.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index 42076ed76..e09ea34a9 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -30,6 +30,8 @@ if(typeof navigator !== 'undefined'){ // require('codemirror/addon/edit/trailingspace.js'); //Active line highlighting // require('codemirror/addon/selection/active-line.js'); + //Scroll past last line + require('codemirror/addon/scroll/scrollpastend.js'); //Auto-closing //XML code folding is a requirement of the auto-closing tag feature and is not enabled require('codemirror/addon/fold/xml-fold.js'); @@ -98,7 +100,10 @@ const CodeEditor = createClass({ indentWithTabs : true, tabSize : 2, historyEventDelay : 250, + scrollPastEnd : true, extraKeys : { + // 'Alt-Left' : this.moveSource, + // 'Alt-Right' : this.moveBrew, 'Ctrl-B' : this.makeBold, 'Cmd-B' : this.makeBold, 'Ctrl-I' : this.makeItalic, From e9adc4de8225e9d13da9bff40ea307d0395173b7 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Thu, 2 Jun 2022 13:50:37 +1200 Subject: [PATCH 37/53] Highlight target line during moveSource --- client/homebrew/editor/editor.jsx | 7 ++++++- shared/naturalcrit/codeEditor/codeEditor.less | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 1304df5db..77c520431 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -19,6 +19,8 @@ const DEFAULT_STYLE_TEXT = dedent` color: black; }`; +const sourceMoveHighlightClass = 'sourceMoveFlash'; + const splice = function(str, index, inject){ return str.slice(0, index) + inject + str.slice(index); }; @@ -131,6 +133,7 @@ const Editor = createClass({ //reset custom line styles codeMirror.removeLineClass(lineNumber, 'background', 'pageLine'); codeMirror.removeLineClass(lineNumber, 'text'); + codeMirror.removeLineClass(lineNumber, 'wrap', sourceMoveHighlightClass); // Styling for \page breaks if((this.props.renderer == 'legacy' && line.includes('\\page')) || @@ -217,7 +220,9 @@ const Editor = createClass({ targetLine = lineCount; } - this.refs.codeEditor.setCursorPosition(targetLine, 0); + // this.refs.codeEditor.codeMirror.scrollIntoView({ line: targetLine, ch: 0 }, 30); + this.refs.codeEditor.setCursorPosition({ line: targetLine, ch: 0 }); + this.refs.codeEditor.codeMirror.addLineClass(targetLine, 'wrap', sourceMoveHighlightClass); } }, diff --git a/shared/naturalcrit/codeEditor/codeEditor.less b/shared/naturalcrit/codeEditor/codeEditor.less index bf36293ed..9f437e90b 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.less +++ b/shared/naturalcrit/codeEditor/codeEditor.less @@ -10,6 +10,11 @@ font-weight: 600; } + .flash .CodeMirror-line{ + background-color: #0000fc; + color: #ffffff; + } + //.cm-tab { // background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAQAAACOs/baAAAARUlEQVR4nGJgIAG8JkXxUAcCtDWemcGR1lY4MvgzCEKY7jSBjgxBDAG09UEQzAe0AMwMHrSOAwEGRtpaMIwAAAAA//8DAG4ID9EKs6YqAAAAAElFTkSuQmCC) no-repeat right; //} From 0dbe84a91a0f24992ccc2c890a0c6b19366441bb Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Thu, 2 Jun 2022 14:09:41 +1200 Subject: [PATCH 38/53] Update style --- shared/naturalcrit/codeEditor/codeEditor.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/codeEditor/codeEditor.less b/shared/naturalcrit/codeEditor/codeEditor.less index 9f437e90b..53be7e5f5 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.less +++ b/shared/naturalcrit/codeEditor/codeEditor.less @@ -10,7 +10,7 @@ font-weight: 600; } - .flash .CodeMirror-line{ + .sourceMoveFlash .CodeMirror-line{ background-color: #0000fc; color: #ffffff; } From bd681dffaed25c0af828efcabbe5a7288099ac85 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 2 Jun 2022 23:24:41 -0400 Subject: [PATCH 39/53] Fix scrollpastend not working Since the `require('codemirror/addon/scroll/scrollpastend.js');` line is inside of an `if()` block, it doesn't get compiled in the same way. We have to specify it in the `libs` array of our build script so our bundler can allow it to be loaded dynamically. --- scripts/project.json | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/project.json b/scripts/project.json index 07acdda48..5a0289ad0 100644 --- a/scripts/project.json +++ b/scripts/project.json @@ -15,6 +15,7 @@ "codemirror/addon/fold/foldcode.js", "codemirror/addon/fold/foldgutter.js", "codemirror/addon/fold/xml-fold.js", + "codemirror/addon/scroll/scrollpastend.js", "codemirror/addon/search/search.js", "codemirror/addon/search/searchcursor.js", "codemirror/addon/search/jump-to-line.js", From df41b584410d1368fa28f1bd1d65e233100b29ca Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 3 Jun 2022 13:32:04 -0400 Subject: [PATCH 40/53] Smooth scroll editor Panel, and flash target line --- client/homebrew/editor/editor.jsx | 31 ++++++++++++++----- shared/naturalcrit/codeEditor/codeEditor.less | 11 +++++-- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 77c520431..77c655163 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -19,8 +19,6 @@ const DEFAULT_STYLE_TEXT = dedent` color: black; }`; -const sourceMoveHighlightClass = 'sourceMoveFlash'; - const splice = function(str, index, inject){ return str.slice(0, index) + inject + str.slice(index); }; @@ -133,7 +131,7 @@ const Editor = createClass({ //reset custom line styles codeMirror.removeLineClass(lineNumber, 'background', 'pageLine'); codeMirror.removeLineClass(lineNumber, 'text'); - codeMirror.removeLineClass(lineNumber, 'wrap', sourceMoveHighlightClass); + codeMirror.removeLineClass(lineNumber, 'wrap', 'sourceMoveFlash'); // Styling for \page breaks if((this.props.renderer == 'legacy' && line.includes('\\page')) || @@ -217,12 +215,29 @@ const Editor = createClass({ const textPosition = textString.length; const lineCount = textString.match('\n') ? textString.slice(0, textPosition).split('\n').length : 0; - targetLine = lineCount; - } + targetLine = lineCount - 1; //Scroll to `\page`, which is one line back. - // this.refs.codeEditor.codeMirror.scrollIntoView({ line: targetLine, ch: 0 }, 30); - this.refs.codeEditor.setCursorPosition({ line: targetLine, ch: 0 }); - this.refs.codeEditor.codeMirror.addLineClass(targetLine, 'wrap', sourceMoveHighlightClass); + let currentY = this.refs.codeEditor.codeMirror.getScrollInfo().top; + let targetY = this.refs.codeEditor.codeMirror.heightAtLine(targetLine, 'local', true); + + //Scroll 1/10 of the way every 10ms until 1px off. + const incrementalScroll = setInterval(()=>{ + currentY += (targetY - currentY) / 10; + this.refs.codeEditor.codeMirror.scrollTo(null, currentY); + + // Update target: target height is not accurate until within +-10 lines of the visible window + if(Math.abs(targetY - currentY > 100)) + targetY = this.refs.codeEditor.codeMirror.heightAtLine(targetLine, 'local', true); + + // End when close enough + if(Math.abs(targetY - currentY) < 1) { + this.refs.codeEditor.codeMirror.scrollTo(null, targetY); // Scroll any remaining difference + this.refs.codeEditor.setCursorPosition({ line: targetLine + 1, ch: 0 }); + this.refs.codeEditor.codeMirror.addLineClass(targetLine + 1, 'wrap', 'sourceMoveFlash'); + clearInterval(incrementalScroll); + } + }, 10); + } } }, diff --git a/shared/naturalcrit/codeEditor/codeEditor.less b/shared/naturalcrit/codeEditor/codeEditor.less index 53be7e5f5..c929e0d21 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.less +++ b/shared/naturalcrit/codeEditor/codeEditor.less @@ -3,6 +3,11 @@ @import (less) 'codemirror/addon/search/matchesonscrollbar.css'; @import (less) 'codemirror/addon/dialog/dialog.css'; +@keyframes sourceMoveAnimation { + 50% {background-color: red; color: white;} + 100% {background-color: unset; color: unset;} +} + .codeEditor{ .CodeMirror-foldmarker { font-family: inherit; @@ -11,8 +16,8 @@ } .sourceMoveFlash .CodeMirror-line{ - background-color: #0000fc; - color: #ffffff; + animation-name: sourceMoveAnimation; + animation-duration: 0.4s; } //.cm-tab { @@ -24,4 +29,4 @@ // background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAQAgMAAABW5NbuAAAACVBMVEVHcEwAAAAAAAAWawmTAAAAA3RSTlMAPBJ6PMxpAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAFUlEQVQI12NgwACcCQysASAEZGAAACMuAX06aCQUAAAAAElFTkSuQmCC) no-repeat right; // } //} -} \ No newline at end of file +} From c9a182f1e2558fe64e29dbae12cf052a6ffce226 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 3 Jun 2022 15:38:26 -0400 Subject: [PATCH 41/53] Add Tooltips to arrow buttons --- shared/naturalcrit/splitPane/splitPane.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/naturalcrit/splitPane/splitPane.less b/shared/naturalcrit/splitPane/splitPane.less index 5c15db5df..470d9abbc 100644 --- a/shared/naturalcrit/splitPane/splitPane.less +++ b/shared/naturalcrit/splitPane/splitPane.less @@ -36,7 +36,7 @@ position : absolute; width : 25px; height : 25px; - border : 2px solid black; + border : 2px solid #bbb; border-radius : 15px; text-align : center; font-size : 1.2em; @@ -45,9 +45,11 @@ z-index : 999; box-shadow : 0 4px 5px #0000007f; &.left{ + .tooltipLeft('Jump to locaton in Editor'); top : 30px; } &.right{ + .tooltipRight('Jump to location in Preview'); top : 60px; } &:hover{ From 4e8cbf621b9d2437e62d4ef832b9b465c29dddc0 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 4 Jun 2022 16:38:32 +1200 Subject: [PATCH 42/53] Add brew bounce animation --- client/homebrew/editor/editor.jsx | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 77c655163..470220379 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -43,7 +43,8 @@ const Editor = createClass({ }, getInitialState : function() { return { - view : 'text' //'text', 'style', 'meta' + view : 'text', //'text', 'style', 'meta' + isBrewScrolling : false }; }, @@ -189,7 +190,28 @@ const Editor = createClass({ brewJump : function(targetPage=this.getCurrentPage()){ if(!window || this.isMeta()) return; // console.log(`Scroll to: p${targetPage}`); - window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).scrollIntoView({ behavior: 'smooth', block: 'start' }); + const currentPos = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer')[0].scrollTop; + const targetPos = window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).getBoundingClientRect().top; + const interimPos = targetPos >= 0 ? -30 : 30; + + const bounceDelay = 100; + const scrollDelay = 500; + + if(!this.state.isBrewScrolling) { + this.setState({ + isBrewScrolling : true + }); + window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer')[0].scrollTo({ top: currentPos + interimPos, behavior: 'smooth' }); + setTimeout(()=>{ + window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer')[0].scrollTo({ top: currentPos + targetPos, behavior: 'smooth', block: 'start' }); + }, bounceDelay); + setTimeout(()=>{ + this.setState({ + isBrewScrolling : false + }); + }, scrollDelay); + } + // const hashPage = (page != 1) ? `p${page}` : ''; // window.location.hash = hashPage; }, From 1d0cceda044fc2e89d4ea966a407edcfbb5c2600 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 4 Jun 2022 17:09:25 +1200 Subject: [PATCH 43/53] Eliminate unnecessary `window.frames` calls --- client/homebrew/editor/editor.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 470220379..9b0a0d594 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -190,7 +190,8 @@ const Editor = createClass({ brewJump : function(targetPage=this.getCurrentPage()){ if(!window || this.isMeta()) return; // console.log(`Scroll to: p${targetPage}`); - const currentPos = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer')[0].scrollTop; + const brewRenderer = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer')[0]; + const currentPos = brewRenderer.scrollTop; const targetPos = window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).getBoundingClientRect().top; const interimPos = targetPos >= 0 ? -30 : 30; @@ -201,9 +202,9 @@ const Editor = createClass({ this.setState({ isBrewScrolling : true }); - window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer')[0].scrollTo({ top: currentPos + interimPos, behavior: 'smooth' }); + brewRenderer.scrollTo({ top: currentPos + interimPos, behavior: 'smooth' }); setTimeout(()=>{ - window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer')[0].scrollTo({ top: currentPos + targetPos, behavior: 'smooth', block: 'start' }); + brewRenderer.scrollTo({ top: currentPos + targetPos, behavior: 'smooth', block: 'start' }); }, bounceDelay); setTimeout(()=>{ this.setState({ From ff2268871d5d2d560caf1c1cccddefc3fdc5a07f Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 4 Jun 2022 17:54:35 +1200 Subject: [PATCH 44/53] Throttle brew move function --- client/homebrew/editor/editor.jsx | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 9b0a0d594..81fcba9e6 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -43,8 +43,7 @@ const Editor = createClass({ }, getInitialState : function() { return { - view : 'text', //'text', 'style', 'meta' - isBrewScrolling : false + view : 'text' //'text', 'style', 'meta' }; }, @@ -198,20 +197,15 @@ const Editor = createClass({ const bounceDelay = 100; const scrollDelay = 500; - if(!this.state.isBrewScrolling) { - this.setState({ - isBrewScrolling : true - }); - brewRenderer.scrollTo({ top: currentPos + interimPos, behavior: 'smooth' }); - setTimeout(()=>{ - brewRenderer.scrollTo({ top: currentPos + targetPos, behavior: 'smooth', block: 'start' }); - }, bounceDelay); - setTimeout(()=>{ - this.setState({ - isBrewScrolling : false - }); - }, scrollDelay); - } + if(!this.throttleBrewMove) { + this.throttleBrewMove = _.throttle((currentPos, interimPos, targetPos)=>{ + brewRenderer.scrollTo({ top: currentPos + interimPos, behavior: 'smooth' }); + setTimeout(()=>{ + brewRenderer.scrollTo({ top: currentPos + targetPos, behavior: 'smooth', block: 'start' }); + }, bounceDelay); + }, scrollDelay, { leading: true }); + }; + this.throttleBrewMove(currentPos, interimPos, targetPos); // const hashPage = (page != 1) ? `p${page}` : ''; // window.location.hash = hashPage; From ee3c52109485a19f70871fd4e2e11171683f3d37 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 4 Jun 2022 18:35:22 +1200 Subject: [PATCH 45/53] Change throttle options --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 81fcba9e6..06d9f6b59 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -203,7 +203,7 @@ const Editor = createClass({ setTimeout(()=>{ brewRenderer.scrollTo({ top: currentPos + targetPos, behavior: 'smooth', block: 'start' }); }, bounceDelay); - }, scrollDelay, { leading: true }); + }, scrollDelay, { leading: true, trailing: false }); }; this.throttleBrewMove(currentPos, interimPos, targetPos); From ae6ad1eaffdcaa6dc7b8102c06be946859e1a7a4 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 4 Jun 2022 18:40:05 +1200 Subject: [PATCH 46/53] Prune unnecessary styles --- .../editor/snippetbar/snippetbar.less | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 7703c6ab7..371f51fda 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -46,30 +46,6 @@ color : black; } } - &.toTop{ - .tooltipLeft('Back to Top'); - font-size : 0.75em; - color : grey; - &.active{ - color : black; - } - } - &.toBrew{ - .tooltipLeft('Match Brew to Source'); - font-size : 0.75em; - color : grey; - &.active{ - color : black; - } - } - &.fromBrew{ - .tooltipLeft('Match Source to Brew'); - font-size : 0.75em; - color : grey; - &.active{ - color : black; - } - } &.divider { background: linear-gradient(#000, #000) no-repeat center/1px 100%; width: 5px; From 6c8cdffd8fd924caa9f120549a0c43e3024e8322 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 4 Jun 2022 19:52:41 +1200 Subject: [PATCH 47/53] Fix typo --- shared/naturalcrit/splitPane/splitPane.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/splitPane/splitPane.less b/shared/naturalcrit/splitPane/splitPane.less index 470d9abbc..700d383d5 100644 --- a/shared/naturalcrit/splitPane/splitPane.less +++ b/shared/naturalcrit/splitPane/splitPane.less @@ -45,7 +45,7 @@ z-index : 999; box-shadow : 0 4px 5px #0000007f; &.left{ - .tooltipLeft('Jump to locaton in Editor'); + .tooltipLeft('Jump to location in Editor'); top : 30px; } &.right{ From 6bc5edd33fbbff3c278811e0ad9c15d90da5f920 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 5 Jun 2022 10:03:03 +1200 Subject: [PATCH 48/53] Remove unnecessary isMeta check --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 06d9f6b59..6366d0520 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -187,7 +187,7 @@ const Editor = createClass({ }, brewJump : function(targetPage=this.getCurrentPage()){ - if(!window || this.isMeta()) return; + if(!window) return; // console.log(`Scroll to: p${targetPage}`); const brewRenderer = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer')[0]; const currentPos = brewRenderer.scrollTop; From d04df9aeb004735646efc64e9aaacfb42b7cb05f Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 5 Jun 2022 10:10:59 +1200 Subject: [PATCH 49/53] Remove redundant isStyle check --- client/homebrew/editor/editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 6366d0520..fd9f850d3 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -212,7 +212,7 @@ const Editor = createClass({ }, sourceJump : function(targetLine=null){ - if(this.isText() || (this.isStyle() && targetLine == 0)) { + if(this.isText()) { if(targetLine == null) { targetLine = 0; From 2ac9c190a9965a217177fe24de481ee9b4652b20 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 5 Jun 2022 11:11:58 +1200 Subject: [PATCH 50/53] Remove commented out shortcut keys --- shared/naturalcrit/codeEditor/codeEditor.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index e09ea34a9..6340a58fe 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -102,8 +102,6 @@ const CodeEditor = createClass({ historyEventDelay : 250, scrollPastEnd : true, extraKeys : { - // 'Alt-Left' : this.moveSource, - // 'Alt-Right' : this.moveBrew, 'Ctrl-B' : this.makeBold, 'Cmd-B' : this.makeBold, 'Ctrl-I' : this.makeItalic, From 4f69b1e7e0e6bda6893f9ea24c8ef36cddc5b1ac Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 5 Jun 2022 11:13:35 +1200 Subject: [PATCH 51/53] Remove unused toTop function --- client/homebrew/editor/snippetbar/snippetbar.jsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index 28a55ec20..0c6b5cc38 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -60,11 +60,6 @@ const Snippetbar = createClass({ }); }, - toTop : function(){ - this.props.sourceJump(0); - this.props.brewJump(1); - }, - renderEditorButtons : function(){ if(!this.props.showEditButtons) return; From 4b5774527574713c6a1981f06036f01161150e51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 03:01:42 +0000 Subject: [PATCH 52/53] Bump eslint from 8.16.0 to 8.17.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.16.0 to 8.17.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.16.0...v8.17.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a532aab3..e5514df1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.16.0", + "eslint": "^8.17.0", "eslint-plugin-react": "^7.30.0", "jest": "^28.1.0", "supertest": "^6.2.3" @@ -4859,9 +4859,9 @@ } }, "node_modules/eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", - "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.17.0.tgz", + "integrity": "sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -16351,9 +16351,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", - "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.17.0.tgz", + "integrity": "sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", diff --git a/package.json b/package.json index fdd0a6786..041abd506 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.16.0", + "eslint": "^8.17.0", "eslint-plugin-react": "^7.30.0", "jest": "^28.1.0", "supertest": "^6.2.3" From a60b8f9accad3a4760a394da56c496ed6c1e8c75 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 6 Jun 2022 00:44:29 -0400 Subject: [PATCH 53/53] Up version to 3.1.0 --- changelog.md | 26 ++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 9fed601f8..79b397060 100644 --- a/changelog.md +++ b/changelog.md @@ -39,6 +39,32 @@ pre { ## changelog For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery). +### Monday 06/06/2022 - v3.1.0 +{{taskList + +##### G-Ambatte: + +* [x] "Jump to Preview/Editor" buttons added to the divider bar. Easily sync between the editor and preview panels! + + Fixes issues: [#1756](https://github.com/naturalcrit/homebrewery/issues/1756) + +* [x] Speedups to the user page for users with large and/or many brews. + + Fixes issues: [#2147](https://github.com/naturalcrit/homebrewery/issues/2147) + +* [x] Search text on the user page is saved to the URL for easy bookmarking in your browser + + Fixes issues: [#1858](https://github.com/naturalcrit/homebrewery/issues/1858) + +* [x] Added easy login system for offline installs. + + Fixes issues: [#269](https://github.com/naturalcrit/homebrewery/issues/269) + +* [x] New **THUMBNAIL** option in the {{fa,fa-info-circle}} **Properties** menu. This image will show up in social media links. + + Fixes issues: [#820](https://github.com/naturalcrit/homebrewery/issues/820) +}} + ### Wednesday 27/03/2022 - v3.0.8 {{taskList * [x] Style updates to user page. diff --git a/package-lock.json b/package-lock.json index 9a532aab3..cde205b5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "homebrewery", - "version": "3.0.8", + "version": "3.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "3.0.8", + "version": "3.1.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index fdd0a6786..40f32b51f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "homebrewery", "description": "Create authentic looking D&D homebrews using only markdown", - "version": "3.0.8", + "version": "3.1.0", "engines": { "node": "16.11.x" },