From ce1ba8289c4e7d0a162ed99750f40a153771514f Mon Sep 17 00:00:00 2001 From: David Bolack Date: Mon, 6 Nov 2023 22:30:26 -0600 Subject: [PATCH 01/77] Add Multi-line Dictionary Definition (
) rows. Expands the existing syntax to allow/expect the option of multiple definitions by adding any number of ``` :: Definition``` to an a DT/DD set. --- shared/naturalcrit/markdown.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 114229887..900475986 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -218,8 +218,9 @@ const definitionLists = { while (match = regex.exec(src)) { definitions.push({ dt : this.lexer.inlineTokens(match[1].trim()), - dd : this.lexer.inlineTokens(match[2].trim()) + dd : match[2].split('::').map((s)=>this.lexer.inlineTokens(s.trim())) }); + console.log(match.splice(2).map((s)=>s.trim())); endIndex = regex.lastIndex; } if(definitions.length) { @@ -232,8 +233,9 @@ const definitionLists = { }, renderer(token) { return `
${token.definitions.reduce((html, def)=>{ - return `${html}
${this.parser.parseInline(def.dt)}
` - + `
${this.parser.parseInline(def.dd)}
\n`; + const dds = def.dd.map((s)=>`
${this.parser.parseInline(s)}
`).join('\n'); + return `${html}
${this.parser.parseInline(def.dt)}
+ ${dds}`; }, '')}
`; } }; From e6428a3b18220c30ac2c244a069e4f8118e022f1 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 7 Nov 2023 18:07:11 -0600 Subject: [PATCH 02/77] Update Editor highlighting for Definition Lists Fixes syntax highlighting to account for multiple definitions on a definition list. --- client/homebrew/editor/editor.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index b4f1fc824..cf762974e 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -154,9 +154,14 @@ const Editor = createClass({ const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym; let match; while ((match = regex.exec(line)) != null){ + codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'define' }); codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[1]) }, { line: lineNumber, ch: line.indexOf(match[1]) + match[1].length }, { className: 'term' }); - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[2]) }, { line: lineNumber, ch: line.indexOf(match[2]) + match[2].length }, { className: 'definition' }); + const matches = match[2].split('::').map((s)=>(s.trim())); + matches.forEach((m)=>{ + codeMirror.markText({ line: lineNumber, ch: line.indexOf(m) }, { line: lineNumber, ch: line.indexOf(m) + m.length }, { className: 'definition' }); + }); + // codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[2]) }, { line: lineNumber, ch: line.indexOf(match[2]) + match[2].length }, { className: 'definition' }); } } From d1152dcbb5e825ca16564b2442fac8a263eb997d Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 7 Nov 2023 21:04:03 -0600 Subject: [PATCH 03/77] Add Change log --- changelog.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/changelog.md b/changelog.md index 9f4a07ab2..081bd85ea 100644 --- a/changelog.md +++ b/changelog.md @@ -80,6 +80,32 @@ pre { ## changelog For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery). +### Tuesday 07/11/2023 + +{{ taskList + +##### abquintic + +* [x] Add user requested feature for definition lists with multiple definitions. + +This implements issue [#2340](https://github.com/naturalcrit/homebrewery/issues/2340) by extending the existing syntax pattern. Additional definitions must be on the same line. + +``` +Dictionary Term :: Definition One :: Definition Two :: Definition Three +``` +Example: +``` +Egg::Came before the Chicken::Python Packaging Format::Over Easy isn't + +Egg + Came before the Chicken + Python Packaging Format + Over Easy isn't +``` + + +}} + ### Friday 13/10/2023 - v3.10.0 {{taskList From 827fdd3cff641c5e171df80a09d10d38cef1844d Mon Sep 17 00:00:00 2001 From: David Bolack Date: Fri, 10 Nov 2023 00:43:45 -0600 Subject: [PATCH 04/77] REmove a console message. --- shared/naturalcrit/markdown.js | 1 - 1 file changed, 1 deletion(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 900475986..ff262b244 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -220,7 +220,6 @@ const definitionLists = { dt : this.lexer.inlineTokens(match[1].trim()), dd : match[2].split('::').map((s)=>this.lexer.inlineTokens(s.trim())) }); - console.log(match.splice(2).map((s)=>s.trim())); endIndex = regex.lastIndex; } if(definitions.length) { From c78dcbfe0563d03321a47ef6688df8eb5811999c Mon Sep 17 00:00:00 2001 From: David Bolack Date: Fri, 10 Nov 2023 23:19:55 -0600 Subject: [PATCH 05/77] Remove Line-break Remove the linbreak between the and the first
--- shared/naturalcrit/markdown.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index ff262b244..ab4a0447f 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -233,8 +233,7 @@ const definitionLists = { renderer(token) { return `
${token.definitions.reduce((html, def)=>{ const dds = def.dd.map((s)=>`
${this.parser.parseInline(s)}
`).join('\n'); - return `${html}
${this.parser.parseInline(def.dt)}
- ${dds}`; + return `${html}
${this.parser.parseInline(def.dt)}
${dds}`; }, '')}
`; } }; From 0624f8a0b962f3b1c8e397d4c4762e1863691e18 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Wed, 22 Nov 2023 13:13:58 -0600 Subject: [PATCH 06/77] Add basic tests for Dictionary lists. --- package.json | 1 + tests/markdown/marked-extensions.test.js | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/markdown/marked-extensions.test.js diff --git a/package.json b/package.json index cd2b446ba..2ee0c8c12 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "test:mustache-syntax:inline": "jest '.*(mustache-syntax).*' -t '^Inline:.*' --verbose --noStackTrace", "test:mustache-syntax:block": "jest '.*(mustache-syntax).*' -t '^Block:.*' --verbose --noStackTrace", "test:mustache-syntax:injection": "jest '.*(mustache-syntax).*' -t '^Injection:.*' --verbose --noStackTrace", + "test:marked-extensions": "jest '.*(marked-extensions).*' --verbose --noStackTrace", "test:route": "jest tests/routes/static-pages.test.js --verbose", "phb": "node scripts/phb.js", "prod": "set NODE_ENV=production && npm run build", diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js new file mode 100644 index 000000000..52f2da38f --- /dev/null +++ b/tests/markdown/marked-extensions.test.js @@ -0,0 +1,24 @@ +/* eslint-disable max-lines */ + +const Markdown = require('naturalcrit/markdown.js'); + +describe('Dictionary Terms', ()=>{ + test('Single Definition', function() { + const source = 'My term :: My First Definition'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); + }); + + test('Two Definitions', function() { + const source = 'My term :: My First Definition :: My Second Definition'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
'); + }); + + test('Three Definitions', function() { + const source = 'My term :: My First Definition :: My Second Definition :: My Third Definition'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
\n
My Third Definition
'); + }); + +}); From 96d973528c3fb12bbc46f044b78c0927b79da033 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Wed, 20 Dec 2023 22:57:37 -0600 Subject: [PATCH 07/77] Updated and reworked to handle more definition* Updated to allow multiple definition terms and definitions per term :: :::: :: ``` **Example** :: ::V3 uses HTML *definition lists* to create "lists" with hanging indents. ::Three I'm a term::Four **Hello**::I\'m a different ::List : ``` --- shared/naturalcrit/markdown.js | 45 +++++++++++++++--------- tests/markdown/marked-extensions.test.js | 18 ++++++---- themes/V3/5ePHB/style.less | 2 +- 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 1fc14b534..7a584a927 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -237,32 +237,45 @@ const superSubScripts = { const definitionLists = { name : 'definitionLists', level : 'block', - start(src) { return src.match(/^.*?::.*/m)?.index; }, // Hint to Marked.js to stop and check for a match + start(src) { return src.match(/^.*?::.*\n\n/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { - const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym; + const regex = /^([^\n:]*?)::(.*)(?:\n|$)/ym; let match; - let endIndex = 0; - const definitions = []; + const endIndex = src.match(`\n\n`)?.index + 2; + const allDefinitions = []; + let currentDefinition = []; while (match = regex.exec(src)) { - definitions.push({ - dt : this.lexer.inlineTokens(match[1].trim()), - dd : match[2].split('::').map((s)=>this.lexer.inlineTokens(s.trim())) - }); - endIndex = regex.lastIndex; + if(match[1].trim()?.length) { + if(currentDefinition?.dt?.length) { + allDefinitions.push(currentDefinition); + currentDefinition = []; + } + currentDefinition = { + dt : this.lexer.inlineTokens(match[1].trim()), + dd : [] + }; + } + currentDefinition.dd = currentDefinition.dd.concat(match[2].split('::').filter((item)=>item).map((s)=>this.lexer.inlineTokens(s.trim()))); + if(!currentDefinition.dd?.length) { + currentDefinition.dd = [this.lexer.inlineTokens('')]; + } } - if(definitions.length) { + if(currentDefinition.hasOwnProperty('dt')) { allDefinitions.push(currentDefinition); } + if(allDefinitions.length) { return { - type : 'definitionLists', - raw : src.slice(0, endIndex), - definitions + type : 'definitionLists', + raw : src.slice(0, endIndex), + definitions : allDefinitions }; } }, renderer(token) { - return `
${token.definitions.reduce((html, def)=>{ + let returnVal = `
`; + token.definitions.forEach((def)=>{ const dds = def.dd.map((s)=>`
${this.parser.parseInline(s)}
`).join('\n'); - return `${html}
${this.parser.parseInline(def.dt)}
${dds}`; - }, '')}
`; + returnVal += `
${this.parser.parseInline(def.dt)}
${dds}
`; + }); + return `${returnVal}
`; } }; diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js index 52f2da38f..5f8c7718e 100644 --- a/tests/markdown/marked-extensions.test.js +++ b/tests/markdown/marked-extensions.test.js @@ -4,21 +4,27 @@ const Markdown = require('naturalcrit/markdown.js'); describe('Dictionary Terms', ()=>{ test('Single Definition', function() { - const source = 'My term :: My First Definition'; + const source = 'My term :: My First Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); }); test('Two Definitions', function() { - const source = 'My term :: My First Definition :: My Second Definition'; + const source = 'My term :: My First Definition :: My Second Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
'); }); test('Three Definitions', function() { - const source = 'My term :: My First Definition :: My Second Definition :: My Third Definition'; + const source = 'My term :: My First Definition :: My Second Definition :: My Third Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
\n
My Third Definition
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
\n
My Third Definition
'); + }); + + test('Multiline Definitions', function() { + const source = '**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.\n::Three\n::Four\n\nHello::I\'m a different\n::List\n\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Example
V3 uses HTML definition lists to create “lists” with hanging indents.
\n
Three
\n
Four
Hello
I\’m a different
\n
List
'); }); }); diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 2a2c49772..fbb00c670 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -968,7 +968,7 @@ body { counter-reset : phb-page-numbers; } & + * { margin-top : 0.17cm; } } p + dl { margin-top : 0.17cm; } - dt { + dt { display : inline; margin-right : 5px; margin-left : -1em; From 993ae295afb42efdb12aa3ec8e8f91b825bee888 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Sun, 7 Jan 2024 15:40:05 -0600 Subject: [PATCH 08/77] Update editor pattern match for DLs --- client/homebrew/editor/editor.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index cd74b0af5..ad773c25a 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -151,7 +151,8 @@ const Editor = createClass({ // definition lists if(line.includes('::')){ - const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym; + // const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym; + const regex = /^([^\n:]*?)::(.*)(?:\n|$)/ym; let match; while ((match = regex.exec(line)) != null){ From 20b76bdeadeca3860cd686d533c50fdd785672b0 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Sat, 13 Jan 2024 11:55:43 -0600 Subject: [PATCH 09/77] Fix issue when pattern matches a DD without DT ``` Test ::One ``` WOuld previously break the browser. --- shared/naturalcrit/markdown.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index f016218ba..935313d0f 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -243,17 +243,19 @@ const definitionLists = { let match; const endIndex = src.match(`\n\n`)?.index + 2; const allDefinitions = []; - let currentDefinition = []; + let currentDefinition = {}; while (match = regex.exec(src)) { if(match[1].trim()?.length) { if(currentDefinition?.dt?.length) { allDefinitions.push(currentDefinition); - currentDefinition = []; + currentDefinition = {}; } currentDefinition = { dt : this.lexer.inlineTokens(match[1].trim()), dd : [] }; + } else if(_.isEmpty(currentDefinition)) { + return; } currentDefinition.dd = currentDefinition.dd.concat(match[2].split('::').filter((item)=>item).map((s)=>this.lexer.inlineTokens(s.trim()))); if(!currentDefinition.dd?.length) { @@ -273,7 +275,7 @@ const definitionLists = { let returnVal = `
`; token.definitions.forEach((def)=>{ const dds = def.dd.map((s)=>`
${this.parser.parseInline(s)}
`).join('\n'); - returnVal += `
${this.parser.parseInline(def.dt)}
${dds}
`; + returnVal += `
${this.parser.parseInline(def.dt)}
\n${dds}\n`; }); return `${returnVal}
`; } From d076d6c71999f14476e65baabd9cd229f496447e Mon Sep 17 00:00:00 2001 From: David Bolack Date: Sat, 13 Jan 2024 18:58:59 -0600 Subject: [PATCH 10/77] Update tests for previous changes. --- tests/markdown/marked-extensions.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js index 5f8c7718e..003934d63 100644 --- a/tests/markdown/marked-extensions.test.js +++ b/tests/markdown/marked-extensions.test.js @@ -6,25 +6,25 @@ describe('Dictionary Terms', ()=>{ test('Single Definition', function() { const source = 'My term :: My First Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
\n
My First Definition
\n
'); }); test('Two Definitions', function() { const source = 'My term :: My First Definition :: My Second Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
\n
My First Definition
\n
My Second Definition
\n
'); }); test('Three Definitions', function() { const source = 'My term :: My First Definition :: My Second Definition :: My Third Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
My Second Definition
\n
My Third Definition
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
\n
My First Definition
\n
My Second Definition
\n
My Third Definition
\n
'); }); test('Multiline Definitions', function() { const source = '**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.\n::Three\n::Four\n\nHello::I\'m a different\n::List\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Example
V3 uses HTML definition lists to create “lists” with hanging indents.
\n
Three
\n
Four
Hello
I\’m a different
\n
List
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Example
\n
V3 uses HTML definition lists to create “lists” with hanging indents.
\n
Three
\n
Four
\n
Hello
\n
I\’m a different
\n
List
\n
'); }); }); From 4c2211c428fe901597f8d37d8f964f5e07707321 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Sun, 14 Jan 2024 13:30:52 -0600 Subject: [PATCH 11/77] Updated rendering to follow input line breaks Updated and additional tests. --- shared/naturalcrit/markdown.js | 15 ++++++++++----- tests/markdown/marked-extensions.test.js | 11 +++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 935313d0f..b434e62b0 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -257,9 +257,12 @@ const definitionLists = { } else if(_.isEmpty(currentDefinition)) { return; } - currentDefinition.dd = currentDefinition.dd.concat(match[2].split('::').filter((item)=>item).map((s)=>this.lexer.inlineTokens(s.trim()))); - if(!currentDefinition.dd?.length) { - currentDefinition.dd = [this.lexer.inlineTokens('')]; + const newDefinitions = match[2].split('::').filter((item)=>item).map((s)=>this.lexer.inlineTokens(s.trim())); + console.log(newDefinitions); + if(newDefinitions?.length) { + currentDefinition.dd.push(newDefinitions); + } else { + currentDefinition.dd.push([this.lexer.inlineTokens('')]); } } if(currentDefinition.hasOwnProperty('dt')) { allDefinitions.push(currentDefinition); } @@ -274,8 +277,10 @@ const definitionLists = { renderer(token) { let returnVal = `
`; token.definitions.forEach((def)=>{ - const dds = def.dd.map((s)=>`
${this.parser.parseInline(s)}
`).join('\n'); - returnVal += `
${this.parser.parseInline(def.dt)}
\n${dds}\n`; + const dds = def.dd.map((ddef)=>{ + return ddef.map((s)=>`
${this.parser.parseInline(s)}
`).join(''); + }).join('\n'); + returnVal += `
${this.parser.parseInline(def.dt)}
${dds.indexOf('\n') > -1 ? '\n' : ''}${dds}\n`; }); return `${returnVal}
`; } diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js index 003934d63..d4446de68 100644 --- a/tests/markdown/marked-extensions.test.js +++ b/tests/markdown/marked-extensions.test.js @@ -6,25 +6,24 @@ describe('Dictionary Terms', ()=>{ test('Single Definition', function() { const source = 'My term :: My First Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
\n
My First Definition
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
'); }); test('Two Definitions', function() { const source = 'My term :: My First Definition :: My Second Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
\n
My First Definition
\n
My Second Definition
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
My Second Definition
\n
'); }); test('Three Definitions', function() { const source = 'My term :: My First Definition :: My Second Definition :: My Third Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
\n
My First Definition
\n
My Second Definition
\n
My Third Definition
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
My Second Definition
My Third Definition
\n
'); }); - test('Multiline Definitions', function() { - const source = '**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.\n::Three\n::Four\n\nHello::I\'m a different\n::List\n\n'; + test('Multiple Definition Terms, multiple mixed-line definitions', function() { + const source = 'Term 1::Definition 1 of Term 1\n::Definition 2 of Term 1::Definition 3 of Term 1\nTerm 2::Definition of Term 2'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Example
\n
V3 uses HTML definition lists to create “lists” with hanging indents.
\n
Three
\n
Four
\n
Hello
\n
I\’m a different
\n
List
\n
'); }); }); From d09dc11f5f8ac22b7b21877642b822b4b784e088 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Sun, 14 Jan 2024 13:38:01 -0600 Subject: [PATCH 12/77] The remainder of the tests --- tests/markdown/marked-extensions.test.js | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js index d4446de68..71bb47a30 100644 --- a/tests/markdown/marked-extensions.test.js +++ b/tests/markdown/marked-extensions.test.js @@ -21,9 +21,34 @@ describe('Dictionary Terms', ()=>{ expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
My Second Definition
My Third Definition
\n
'); }); + test('Multiline Definitions', function() { + const source = '**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.\n::Two::\nThree\n::Four\n\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Example
\n
V3 uses HTML definition lists to create “lists” with hanging indents.
\n
TwoThree
\n
Four
\n
'); + }); + + test('Multiple Definition Terms, single line, single definition', function() { + const source = 'Term 1::Definition of Term 1\nTerm 2::Definition of Term 2'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
Term 2>
Definition of Term 2
\n
'); + }); + + test('Multiple Definition Terms, single line, multiple definitions', function() { + const source = 'Term 1::Definition 1 of Term 1::Definition 2 of Term 1\nTerm 2::Definition 1 of Term 2::Definition 2 of Term 2'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
Term 2>
Definition of Term 2
\n
'); + }); + + test('Multiple Definition Terms, single definitions, multiple lines', function() { + const source = 'Term 1::Definition 1 of Term 1\n::Definition 2 of Term 1\nTerm 2::Definition of Term 2'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
Term 2>
Definition of Term 2
\n
'); + }); + test('Multiple Definition Terms, multiple mixed-line definitions', function() { const source = 'Term 1::Definition 1 of Term 1\n::Definition 2 of Term 1::Definition 3 of Term 1\nTerm 2::Definition of Term 2'; const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
Term 2>
Definition of Term 2
\n
'); }); }); From 0470d13ae011701ddcecb69bb88abcaf847ab941 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 1 Oct 2023 13:03:37 +1300 Subject: [PATCH 13/77] Add optimized NC logo --- themes/assets/naturalCritLogo.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 themes/assets/naturalCritLogo.svg diff --git a/themes/assets/naturalCritLogo.svg b/themes/assets/naturalCritLogo.svg new file mode 100644 index 000000000..88faa64fa --- /dev/null +++ b/themes/assets/naturalCritLogo.svg @@ -0,0 +1 @@ + \ No newline at end of file From fe0cfcb2b6dd29f5365c03ebd31798f391a539b1 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 1 Oct 2023 14:11:07 +1300 Subject: [PATCH 14/77] New file was unnecessary --- themes/assets/naturalCritLogo.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 themes/assets/naturalCritLogo.svg diff --git a/themes/assets/naturalCritLogo.svg b/themes/assets/naturalCritLogo.svg deleted file mode 100644 index 88faa64fa..000000000 --- a/themes/assets/naturalCritLogo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From c9c5176f1b6f54b3540bdc9d78859de7d04be18b Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 1 Oct 2023 14:13:01 +1300 Subject: [PATCH 15/77] Add Credits styling to 5ePHB theme --- themes/V3/5ePHB/style.less | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 6c6634ce7..28873c795 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -940,3 +940,28 @@ } } } + +//***************************** +//* CREDITS +//*****************************/ +.page .homebreweryCredits { + font-family: "NodestoCapsWide"; + font-size: .4cm; + line-height: 1em; + color: #FFFFFF; + text-align: center; + text-indent: 0; + letter-spacing: .08em; + } + .page .homebreweryCredits .homebreweryIcon { + margin: 10px auto; + display: block; + height: 75px; + mask: url(/assets/naturalCritLogoWhite.svg) center / contain no-repeat; + -webkit-mask: url(/assets/naturalCritLogoWhite.svg) center / contain no-repeat; + background-color: red; + } + .page .homebreweryCredits .homebreweryIcon.gold { + background-image: linear-gradient(to top left, brown 22.5%, gold 40%, white 60%, gold 67.5%, brown 82.5%); + } + \ No newline at end of file From 2f383d59b611940fe542fbf60c3372804ad01c57 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 1 Oct 2023 14:15:58 +1300 Subject: [PATCH 16/77] Add HB Credit snippet --- themes/V3/5ePHB/snippets.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index c0933d70d..91cbe07b8 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -212,6 +212,21 @@ module.exports = [ }} \n`; }, + }, + { + name : 'Homebrewery Credit', + icon : 'fas fa-dice-d20', + gen : function(){ + return dedent` + {{homebreweryCredits + Made With + + {{homebreweryIcon,gold}} + + Homebrewery.Naturalcrit.com + }} + \n`; + }, } ] }, From d0ccc4a15ac567ed4355d17906ffa7d06cd614e4 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 1 Oct 2023 15:29:46 +1300 Subject: [PATCH 17/77] Capitalize C in NaturalCrit.com --- themes/V3/5ePHB/snippets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 91cbe07b8..a56d8e979 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -223,7 +223,7 @@ module.exports = [ {{homebreweryIcon,gold}} - Homebrewery.Naturalcrit.com + Homebrewery.NaturalCrit.com }} \n`; }, From 033776168eb03900deee7bf3cd9f715e8d5b8df2 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 1 Oct 2023 19:52:17 +1300 Subject: [PATCH 18/77] Change the text to include URL link --- themes/V3/5ePHB/snippets.js | 3 ++- themes/V3/5ePHB/style.less | 15 +++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index a56d8e979..9676647ca 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -223,7 +223,8 @@ module.exports = [ {{homebreweryIcon,gold}} - Homebrewery.NaturalCrit.com + The Homebrewery + [Homebrewery.NaturalCrit.com](https://homebrewery.naturalcrit.com) }} \n`; }, diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 28873c795..3d0c79351 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -948,20 +948,23 @@ font-family: "NodestoCapsWide"; font-size: .4cm; line-height: 1em; - color: #FFFFFF; text-align: center; text-indent: 0; letter-spacing: .08em; - } - .page .homebreweryCredits .homebreweryIcon { +} +.page .homebreweryCredits a { + color: inherit; + text-decoration: none; +} +.page .homebreweryCredits .homebreweryIcon { margin: 10px auto; display: block; height: 75px; mask: url(/assets/naturalCritLogoWhite.svg) center / contain no-repeat; -webkit-mask: url(/assets/naturalCritLogoWhite.svg) center / contain no-repeat; background-color: red; - } - .page .homebreweryCredits .homebreweryIcon.gold { +} +.page .homebreweryCredits .homebreweryIcon.gold { background-image: linear-gradient(to top left, brown 22.5%, gold 40%, white 60%, gold 67.5%, brown 82.5%); - } +} \ No newline at end of file From e56ff93db1601c566efbc90ef1d011fff059484d Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 1 Oct 2023 19:58:57 +1300 Subject: [PATCH 19/77] Add underline on hover to link in credit --- themes/V3/5ePHB/style.less | 3 +++ 1 file changed, 3 insertions(+) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 3d0c79351..cf5067d41 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -956,6 +956,9 @@ color: inherit; text-decoration: none; } +.page .homebreweryCredits a:hover { + text-decoration: underline; +} .page .homebreweryCredits .homebreweryIcon { margin: 10px auto; display: block; From c0cabbb56383a5458f88a1b775c11f6b19b3cebf Mon Sep 17 00:00:00 2001 From: David Bolack Date: Mon, 15 Jan 2024 21:35:19 -0600 Subject: [PATCH 20/77] Move Credits snippet to Blank --- themes/V3/5ePHB/snippets.js | 16 ---------------- themes/V3/5ePHB/style.less | 31 ------------------------------- 2 files changed, 47 deletions(-) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 9676647ca..c0933d70d 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -212,22 +212,6 @@ module.exports = [ }} \n`; }, - }, - { - name : 'Homebrewery Credit', - icon : 'fas fa-dice-d20', - gen : function(){ - return dedent` - {{homebreweryCredits - Made With - - {{homebreweryIcon,gold}} - - The Homebrewery - [Homebrewery.NaturalCrit.com](https://homebrewery.naturalcrit.com) - }} - \n`; - }, } ] }, diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index cf5067d41..6c6634ce7 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -940,34 +940,3 @@ } } } - -//***************************** -//* CREDITS -//*****************************/ -.page .homebreweryCredits { - font-family: "NodestoCapsWide"; - font-size: .4cm; - line-height: 1em; - text-align: center; - text-indent: 0; - letter-spacing: .08em; -} -.page .homebreweryCredits a { - color: inherit; - text-decoration: none; -} -.page .homebreweryCredits a:hover { - text-decoration: underline; -} -.page .homebreweryCredits .homebreweryIcon { - margin: 10px auto; - display: block; - height: 75px; - mask: url(/assets/naturalCritLogoWhite.svg) center / contain no-repeat; - -webkit-mask: url(/assets/naturalCritLogoWhite.svg) center / contain no-repeat; - background-color: red; -} -.page .homebreweryCredits .homebreweryIcon.gold { - background-image: linear-gradient(to top left, brown 22.5%, gold 40%, white 60%, gold 67.5%, brown 82.5%); -} - \ No newline at end of file From c747c5577e5aeddbe24e15116b6fac57932eb68e Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 16 Jan 2024 02:01:55 -0600 Subject: [PATCH 21/77] Add PANdoc style lists ( using :: not : ) Includes new tests and fixes broken old tests --- shared/naturalcrit/markdown.js | 7 ++-- tests/markdown/marked-extensions.test.js | 51 ++++++++++++++++++------ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index c191c081f..8b54ece57 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -239,7 +239,7 @@ const definitionLists = { level : 'block', start(src) { return src.match(/^.*?::.*\n\n/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { - const regex = /^([^\n:]*?)::(.*)(?:\n|$)/ym; + const regex = /^([^:\n]*?)[\n]?::(.*)(?:\n|$)/ym; let match; const endIndex = src.match(`\n\n`)?.index + 2; const allDefinitions = []; @@ -258,7 +258,6 @@ const definitionLists = { return; } const newDefinitions = match[2].split('::').filter((item)=>item).map((s)=>this.lexer.inlineTokens(s.trim())); - console.log(newDefinitions); if(newDefinitions?.length) { currentDefinition.dd.push(newDefinitions); } else { @@ -277,11 +276,13 @@ const definitionLists = { renderer(token) { let returnVal = `
`; token.definitions.forEach((def)=>{ - const dds = def.dd.map((ddef)=>{ + let dds = def.dd.map((ddef)=>{ return ddef.map((s)=>`
${this.parser.parseInline(s)}
`).join(''); }).join('\n'); + dds = dds.trim(); returnVal += `
${this.parser.parseInline(def.dt)}
${dds.indexOf('\n') > -1 ? '\n' : ''}${dds}\n`; }); + returnVal = returnVal.trim(); return `${returnVal}
`; } }; diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js index 71bb47a30..814aea993 100644 --- a/tests/markdown/marked-extensions.test.js +++ b/tests/markdown/marked-extensions.test.js @@ -6,49 +6,74 @@ describe('Dictionary Terms', ()=>{ test('Single Definition', function() { const source = 'My term :: My First Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); }); test('Two Definitions', function() { const source = 'My term :: My First Definition :: My Second Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
My Second Definition
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
My Second Definition
'); }); test('Three Definitions', function() { const source = 'My term :: My First Definition :: My Second Definition :: My Third Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
My Second Definition
My Third Definition
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
My Second Definition
My Third Definition
'); }); test('Multiline Definitions', function() { - const source = '**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.\n::Two::\nThree\n::Four\n\n'; + const source = '**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.\n::Two\n::Three\n::Four\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Example
\n
V3 uses HTML definition lists to create “lists” with hanging indents.
\n
TwoThree
\n
Four
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Example
\n
V3 uses HTML definition lists to create “lists” with hanging indents.
\n
Two
\n
Three
\n
Four
'); }); test('Multiple Definition Terms, single line, single definition', function() { - const source = 'Term 1::Definition of Term 1\nTerm 2::Definition of Term 2'; + const source = 'Term 1::Definition of Term 1\nTerm 2::Definition of Term 2\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
Term 2>
Definition of Term 2
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
\n
Term 2
Definition of Term 2
'); }); test('Multiple Definition Terms, single line, multiple definitions', function() { - const source = 'Term 1::Definition 1 of Term 1::Definition 2 of Term 1\nTerm 2::Definition 1 of Term 2::Definition 2 of Term 2'; + const source = 'Term 1::Definition 1 of Term 1::Definition 2 of Term 1\nTerm 2::Definition 1 of Term 2::Definition 2 of Term 2\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
Term 2>
Definition of Term 2
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition 1 of Term 1
Definition 2 of Term 1
\n
Term 2
Definition 1 of Term 2
Definition 2 of Term 2
'); }); test('Multiple Definition Terms, single definitions, multiple lines', function() { - const source = 'Term 1::Definition 1 of Term 1\n::Definition 2 of Term 1\nTerm 2::Definition of Term 2'; + const source = 'Term 1::Definition 1 of Term 1\n::Definition 2 of Term 1\nTerm 2::Definition of Term 2\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
Term 2>
Definition of Term 2
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 of Term 1
\n
Definition 2 of Term 1
\n
Term 2
Definition of Term 2
'); }); test('Multiple Definition Terms, multiple mixed-line definitions', function() { - const source = 'Term 1::Definition 1 of Term 1\n::Definition 2 of Term 1::Definition 3 of Term 1\nTerm 2::Definition of Term 2'; + const source = 'Term 1::Definition 1 of Term 1\n::Definition 2 of Term 1::Definition 3 of Term 1\nTerm 2::Definition of Term 2\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
Term 2>
Definition of Term 2
\n
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 of Term 1
\n
Definition 2 of Term 1
Definition 3 of Term 1
\n
Term 2
Definition of Term 2
'); }); + test('PANdoc style list - Single Term, Single Definition', function() { + const source = 'Term 1\n::Definition 1\n\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition 1
'); + }); + + test('PANdoc style list - Single Term, Plural Definitions', function() { + const source = 'Term 1\n::Definition 1\n::Definition 2\n\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Definition 2
'); + }); + + test('PANdoc style list - Multiple Term, Single Definitions', function() { + const source = 'Term 1\n::Definition 1\nTerm 2\n::Definition 1\n\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition 1
\n
Term 2
Definition 1
'); + }); + + test('PANdoc style list - Multiple Term, Plural Definitions', function() { + const source = 'Term 1\n::Definition 1\n::Definition 2\nTerm 2\n::Definition 1\n::Definition 2\n\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Definition 2
\n
Term 2
\n
Definition 1
\n
Definition 2
'); + }); + + }); From e1ad05eb3a427bf023223e9fa550c50fd61b124e Mon Sep 17 00:00:00 2001 From: David Bolack Date: Mon, 29 Jan 2024 23:42:13 -0600 Subject: [PATCH 22/77] Solve regression with monster template. Was not handling "weak" Definition list endings well ( places were it was \n instead of \n\n. --- shared/naturalcrit/markdown.js | 3 ++- themes/V3/5ePHB/style.less | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 46de16960..151d7e958 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -263,10 +263,11 @@ const definitionLists = { tokenizer(src, tokens) { const regex = /^([^:\n]*?)[\n]?::(.*)(?:\n|$)/ym; let match; - const endIndex = src.match(`\n\n`)?.index + 2; + let endIndex = 0; const allDefinitions = []; let currentDefinition = {}; while (match = regex.exec(src)) { + endIndex += match[0].length; if(match[1].trim()?.length) { if(currentDefinition?.dt?.length) { allDefinitions.push(currentDefinition); diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index ff8bd286c..865cfef5a 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -320,6 +320,30 @@ padding : 0px; margin-bottom : 0.325cm; + dl { + padding: 0px; + } + + dt::before { + display: block; + } + + dt:nth-child(1n+2)::before { + content: ""; + display: block; + } + + dt { + display: inline; + margin-right : 5px; + margin-left : 0em; + padding: 0px; + } + + dd { + display: inline; + } + //Headers h2 { margin : 0; @@ -869,6 +893,8 @@ dl { line-height : 1.25em; & + * { margin-top : 0.17cm; } + white-space: normal !important; + } p + dl { margin-top : 0.17cm; } dt { From f1c3507a9f345a513b4c5883eec0e2ec59a85530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 31 Jan 2024 15:45:27 +0100 Subject: [PATCH 23/77] initial commit --- client/homebrew/brewRenderer/brewRenderer.jsx | 10 +++++----- client/homebrew/pages/basePages/listPage/listPage.jsx | 4 ++-- client/homebrew/pages/printPage/printPage.jsx | 6 +++--- client/template.js | 4 ++-- shared/naturalcrit/codeEditor/codeEditor.jsx | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 9208a2b90..ab08eecb9 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -20,9 +20,9 @@ const PAGE_HEIGHT = 1056; const INITIAL_CONTENT = dedent` - + - +
`; @@ -206,11 +206,11 @@ const BrewRenderer = (props)=>{ - + {baseThemePath && - + } - + {/* Apply CSS from Style tab and render pages from Markdown tab */} {state.isMounted diff --git a/client/homebrew/pages/basePages/listPage/listPage.jsx b/client/homebrew/pages/basePages/listPage/listPage.jsx index d0cd11ec6..b2086939f 100644 --- a/client/homebrew/pages/basePages/listPage/listPage.jsx +++ b/client/homebrew/pages/basePages/listPage/listPage.jsx @@ -220,8 +220,8 @@ const ListPage = createClass({ render : function(){ return
{/**/} - - + + {this.props.navItems} {this.renderSortOptions()} diff --git a/client/homebrew/pages/printPage/printPage.jsx b/client/homebrew/pages/printPage/printPage.jsx index 37376d4b2..7d7fc437b 100644 --- a/client/homebrew/pages/printPage/printPage.jsx +++ b/client/homebrew/pages/printPage/printPage.jsx @@ -93,11 +93,11 @@ const PrintPage = createClass({ return
- + {baseThemePath && - + } - + {/* Apply CSS from Style tab */} {this.renderStyle()}
diff --git a/client/template.js b/client/template.js index e8ac8e22f..f72238eed 100644 --- a/client/template.js +++ b/client/template.js @@ -12,9 +12,9 @@ const template = async function(name, title='', props = {}){ - + - + ${ogMetaTags} diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index 0a99570db..a5232a42b 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -436,7 +436,7 @@ const CodeEditor = createClass({ render : function(){ return <> - +
; } From 283c2b5ae19d074d74391b769e5841770b425396 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Mon, 5 Feb 2024 21:18:36 -0600 Subject: [PATCH 24/77] Empty Tag multiline input --- shared/naturalcrit/markdown.js | 105 +++++++++++++++++++++++++-------- 1 file changed, 81 insertions(+), 24 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 151d7e958..b466ec8fb 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -256,41 +256,96 @@ const superSubScripts = { } }; -const definitionLists = { - name : 'definitionLists', +const inlineDefinitionLists = { + name : 'inlineDefinitionLists', // Inline because the styles for *this* set should be display: inline + level : 'block', + start(src) { return src.match(/^.*?::.*/m)?.index; }, // Hint to Marked.js to stop and check for a match + tokenizer(src, tokens) { + const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym; + let match; + let endIndex = 0; + const definitions = []; + while (match = regex.exec(src)) { + definitions.push({ + dt : this.lexer.inlineTokens(match[1].trim()), + dd : this.lexer.inlineTokens(match[2].trim()) + }); + endIndex = regex.lastIndex; + } + if(definitions.length) { + return { + type : 'inlineDefinitionLists', + raw : src.slice(0, endIndex), + definitions + }; + } + }, + renderer(token) { + return `
${token.definitions.reduce((html, def)=>{ + return `${html}
${this.parser.parseInline(def.dt)}
` + + `
${this.parser.parseInline(def.dd)}
\n`; + }, '')}
`; + } +}; + +const blockDefinitionLists = { + name : 'blockDefinitionLists', // Block because style display: block level : 'block', start(src) { return src.match(/^.*?::.*\n\n/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { - const regex = /^([^:\n]*?)[\n]?::(.*)(?:\n|$)/ym; + const regex = /^([^:\n]*?)[\n]?::(.*)(?:\n|$)|^.*(?:\n|$)/ym; let match; let endIndex = 0; const allDefinitions = []; let currentDefinition = {}; + let inList = false; + let lastEmpty = false; while (match = regex.exec(src)) { endIndex += match[0].length; - if(match[1].trim()?.length) { - if(currentDefinition?.dt?.length) { - allDefinitions.push(currentDefinition); - currentDefinition = {}; + if(match[0].indexOf(':') > -1) { + inList = true; + if(match[1].trim()?.length) { + if(currentDefinition?.dt?.length) { + allDefinitions.push(currentDefinition); + currentDefinition = {}; + } + currentDefinition = { + dt : this.lexer.inlineTokens(match[1].trim()), + dd : [], + ddo : [] + }; + } else if(_.isEmpty(currentDefinition)) { + return; + } + const newDefinitions = _.flatten(match[2].split('::').filter((item)=>item).map((s)=>s.trim())); + if(newDefinitions?.length) { + currentDefinition.dd = currentDefinition.dd.concat(newDefinitions); + } else { + currentDefinition.dd.push(''); + } + lastEmpty = false; + } else if(inList) { + if(match[0].trim().length == 0) { + if(lastEmpty) { + break; + } else { + lastEmpty = true; + } + } else { + lastEmpty = false; + currentDefinition.dd[currentDefinition.dd.length - 1] = `${currentDefinition.dd[ currentDefinition.dd.length - 1 ]} ${match[0].trim()}`; } - currentDefinition = { - dt : this.lexer.inlineTokens(match[1].trim()), - dd : [] - }; - } else if(_.isEmpty(currentDefinition)) { - return; - } - const newDefinitions = match[2].split('::').filter((item)=>item).map((s)=>this.lexer.inlineTokens(s.trim())); - if(newDefinitions?.length) { - currentDefinition.dd.push(newDefinitions); - } else { - currentDefinition.dd.push([this.lexer.inlineTokens('')]); } } - if(currentDefinition.hasOwnProperty('dt')) { allDefinitions.push(currentDefinition); } + if(currentDefinition.hasOwnProperty('dt')) { + currentDefinition.dd.forEach((dd)=>{ + currentDefinition.ddo.push(this.lexer.inlineTokens(dd)); + }); + allDefinitions.push(currentDefinition); + } if(allDefinitions.length) { return { - type : 'definitionLists', + type : 'blockDefinitionLists', raw : src.slice(0, endIndex), definitions : allDefinitions }; @@ -299,18 +354,20 @@ const definitionLists = { renderer(token) { let returnVal = `
`; token.definitions.forEach((def)=>{ - let dds = def.dd.map((ddef)=>{ - return ddef.map((s)=>`
${this.parser.parseInline(s)}
`).join(''); + console.log(def.ddo); + let dds = def.ddo.map((s)=>{ + return `
${this.parser.parseInline(s)}
`; }).join('\n'); dds = dds.trim(); returnVal += `
${this.parser.parseInline(def.dt)}
${dds.indexOf('\n') > -1 ? '\n' : ''}${dds}\n`; }); returnVal = returnVal.trim(); + console.log(returnVal); return `${returnVal}
`; } }; -Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists, superSubScripts] }); +Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, blockDefinitionLists, superSubScripts] }); Marked.use(mustacheInjectBlock); Marked.use({ renderer: renderer, mangle: false }); Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite()); From 703e207970d1c09b8a8581ec6117d7160c0bcd68 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 6 Feb 2024 21:47:15 -0600 Subject: [PATCH 25/77] I think I have all the desired modes in place. I feel like this is ugly code and maybe there are prettier ways to do it, but it functions as I *believe* is currently desired. --- shared/naturalcrit/markdown.js | 52 ++++++++++++++++++++++++++-------- themes/V3/5ePHB/style.less | 19 +++++++++++++ 2 files changed, 59 insertions(+), 12 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index b466ec8fb..f888cade8 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -300,12 +300,23 @@ const blockDefinitionLists = { let currentDefinition = {}; let inList = false; let lastEmpty = false; + let inlineDefinitions = false; while (match = regex.exec(src)) { + // If we aren't actively in a DL and we match just text, bail. + // If the last loop bailed with lastEmpty and we match just text, bail + if(((!inList) || (lastEmpty)) && (typeof match[1] == 'undefined') && (typeof match[2] == 'undefined')) { + break; + } endIndex += match[0].length; - if(match[0].indexOf(':') > -1) { + // Check to see if this a match containing the start of a DD. + if(match[0].indexOf('::') > -1) { inList = true; - if(match[1].trim()?.length) { + // Check for a DT value. + if(match[1]?.trim()?.length>0) { if(currentDefinition?.dt?.length) { + currentDefinition.dd.forEach((dd)=>{ + currentDefinition.ddo.push(this.lexer.inlineTokens(dd)); + }); allDefinitions.push(currentDefinition); currentDefinition = {}; } @@ -317,23 +328,42 @@ const blockDefinitionLists = { } else if(_.isEmpty(currentDefinition)) { return; } - const newDefinitions = _.flatten(match[2].split('::').filter((item)=>item).map((s)=>s.trim())); - if(newDefinitions?.length) { - currentDefinition.dd = currentDefinition.dd.concat(newDefinitions); + // Test for a DD value. + if(match[2].trim().length>0) { + if((match[1]?.length > 0) && (match[0].indexOf('\n') > match[1]?.length)) { // Inline Style DD + currentDefinition.dd = currentDefinition.dd.concat([match[2].trim()]); + currentDefinition.dd.forEach((dd)=>{ + currentDefinition.ddo.push(this.lexer.inlineTokens(dd)); + }); + allDefinitions.push(currentDefinition); + inlineDefinitions = true; + currentDefinition = {}; + continue; + } + // Multi-line style DDs + const newDefinitions = _.flatten(match[2].split('::').filter((item)=>item).map((s)=>s.trim())); + if(newDefinitions?.length) { + currentDefinition.dd = currentDefinition.dd.concat(newDefinitions); + } } else { currentDefinition.dd.push(''); } lastEmpty = false; - } else if(inList) { + } else if(inList) { // Regular line that might mark the end of a line. + if(inlineDefinitions) { + endIndex -= match[0].length; + break; + } if(match[0].trim().length == 0) { if(lastEmpty) { - break; + continue; } else { lastEmpty = true; } } else { lastEmpty = false; - currentDefinition.dd[currentDefinition.dd.length - 1] = `${currentDefinition.dd[ currentDefinition.dd.length - 1 ]} ${match[0].trim()}`; + const lastPos = typeof currentDefinition.dd.length !== 'undefined' ? currentDefinition.dd.length - 1 : 0; + currentDefinition.dd[lastPos] = `${currentDefinition.dd[lastPos]} ${match[0].trim()}`; } } } @@ -347,22 +377,20 @@ const blockDefinitionLists = { return { type : 'blockDefinitionLists', raw : src.slice(0, endIndex), + inlineDefinitions, definitions : allDefinitions }; } }, renderer(token) { - let returnVal = `
`; + let returnVal = ``; token.definitions.forEach((def)=>{ - console.log(def.ddo); let dds = def.ddo.map((s)=>{ return `
${this.parser.parseInline(s)}
`; }).join('\n'); - dds = dds.trim(); returnVal += `
${this.parser.parseInline(def.dt)}
${dds.indexOf('\n') > -1 ? '\n' : ''}${dds}\n`; }); returnVal = returnVal.trim(); - console.log(returnVal); return `${returnVal}
`; } }; diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 865cfef5a..16a0b1e4f 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -896,7 +896,13 @@ white-space: normal !important; } + + dd { + display: block + } + p + dl { margin-top : 0.17cm; } + dt { display : inline; margin-right : 5px; @@ -904,6 +910,19 @@ } } +// ***************************** +// * Inline Definition Lists +// *****************************/ +.inlineDL dd { + display: inline !important + } + + .inlineDL dd:after{ + display: block; + content: ''; + } + + // ***************************** // * WIDE // *****************************/ From 3ee9fe1c3fa5322d9617c8c87f894568b5203f0a Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 6 Feb 2024 22:13:44 -0600 Subject: [PATCH 26/77] Update tests. Prune no lionger valid cases. --- client/homebrew/editor/editor.jsx | 22 +++++----- client/homebrew/editor/editor.less | 10 +++++ tests/markdown/marked-extensions.test.js | 53 +++++++----------------- 3 files changed, 36 insertions(+), 49 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index ad773c25a..0d1378439 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -151,21 +151,21 @@ const Editor = createClass({ // definition lists if(line.includes('::')){ - // const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym; - const regex = /^([^\n:]*?)::(.*)(?:\n|$)/ym; + if(/^:*$/.test(line) == true){ return }; + const regex = /^([^\n:]*?)(::[^\n]*)(?:\n|$)/ymd; // the `d` flag, for match indices, throws an ESLint error. let match; while ((match = regex.exec(line)) != null){ - - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'define' }); - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[1]) }, { line: lineNumber, ch: line.indexOf(match[1]) + match[1].length }, { className: 'term' }); - const matches = match[2].split('::').map((s)=>(s.trim())); - matches.forEach((m)=>{ - codeMirror.markText({ line: lineNumber, ch: line.indexOf(m) }, { line: lineNumber, ch: line.indexOf(m) + m.length }, { className: 'definition' }); - }); - // codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[2]) }, { line: lineNumber, ch: line.indexOf(match[2]) + match[2].length }, { className: 'definition' }); + codeMirror.markText({ line: lineNumber, ch: match.indices[0][0] }, { line: lineNumber, ch: match.indices[0][1] }, { className: 'dl-highlight' }); + codeMirror.markText({ line: lineNumber, ch: match.indices[1][0] }, { line: lineNumber, ch: match.indices[1][1] }, { className: 'dt-highlight' }); + codeMirror.markText({ line: lineNumber, ch: match.indices[2][0] }, { line: lineNumber, ch: match.indices[2][1] }, { className: 'dd-highlight' }); + const ddIndex = match.indices[2][0]; + let colons = /::/g; + let colonMatches; + while((colonMatches = colons.exec(match[2])) !== null){ + codeMirror.markText({ line: lineNumber, ch: colonMatches.index + ddIndex }, { line: lineNumber, ch: colonMatches.index + colonMatches[0].length + ddIndex }, { className: 'dl-colon-highlight'} ) + } } } - // Superscript if(line.includes('\^')) { const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; diff --git a/client/homebrew/editor/editor.less b/client/homebrew/editor/editor.less index b165f91db..d7950ead3 100644 --- a/client/homebrew/editor/editor.less +++ b/client/homebrew/editor/editor.less @@ -55,6 +55,16 @@ vertical-align : sub; font-size : 0.9em; } + .dl-highlight { + &.dl-colon-highlight { + font-weight : bold; + color : #949494; + background : #E5E5E5; + border-radius : 3px; + } + &.dt-highlight { color : rgb(96, 117, 143); } + &.dd-highlight { color : rgb(97, 57, 178); } + } } .brewJump { diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js index 814aea993..5a8603ab8 100644 --- a/tests/markdown/marked-extensions.test.js +++ b/tests/markdown/marked-extensions.test.js @@ -6,49 +6,13 @@ describe('Dictionary Terms', ()=>{ test('Single Definition', function() { const source = 'My term :: My First Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); - }); - - test('Two Definitions', function() { - const source = 'My term :: My First Definition :: My Second Definition\n\n'; - const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
My Second Definition
'); - }); - - test('Three Definitions', function() { - const source = 'My term :: My First Definition :: My Second Definition :: My Third Definition\n\n'; - const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
My Second Definition
My Third Definition
'); - }); - - test('Multiline Definitions', function() { - const source = '**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.\n::Two\n::Three\n::Four\n\n'; - const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Example
\n
V3 uses HTML definition lists to create “lists” with hanging indents.
\n
Two
\n
Three
\n
Four
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); }); test('Multiple Definition Terms, single line, single definition', function() { const source = 'Term 1::Definition of Term 1\nTerm 2::Definition of Term 2\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
\n
Term 2
Definition of Term 2
'); - }); - - test('Multiple Definition Terms, single line, multiple definitions', function() { - const source = 'Term 1::Definition 1 of Term 1::Definition 2 of Term 1\nTerm 2::Definition 1 of Term 2::Definition 2 of Term 2\n\n'; - const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition 1 of Term 1
Definition 2 of Term 1
\n
Term 2
Definition 1 of Term 2
Definition 2 of Term 2
'); - }); - - test('Multiple Definition Terms, single definitions, multiple lines', function() { - const source = 'Term 1::Definition 1 of Term 1\n::Definition 2 of Term 1\nTerm 2::Definition of Term 2\n\n'; - const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 of Term 1
\n
Definition 2 of Term 1
\n
Term 2
Definition of Term 2
'); - }); - - test('Multiple Definition Terms, multiple mixed-line definitions', function() { - const source = 'Term 1::Definition 1 of Term 1\n::Definition 2 of Term 1::Definition 3 of Term 1\nTerm 2::Definition of Term 2\n\n'; - const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 of Term 1
\n
Definition 2 of Term 1
Definition 3 of Term 1
\n
Term 2
Definition of Term 2
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
\n
Term 2
Definition of Term 2
'); }); test('PANdoc style list - Single Term, Single Definition', function() { @@ -75,5 +39,18 @@ describe('Dictionary Terms', ()=>{ expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Definition 2
\n
Term 2
\n
Definition 1
\n
Definition 2
'); }); + test('PANdoc style list - Single Term, Single multiple line definition', function() { + const source = 'Term 1\n::Definition 1\nand more and\nmore and more\n\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition 1 and more and more and more
'); + + }); + + test('PANdoc style list - Multiple Term, Single multiple line definition', function() { + const source = 'Term 1\n::Definition 1\nand more and\nmore and more\n\n::Definition 2\n\n::Definition 3\n\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more and more
\n
Definition 2
\n
Definition 3
'); + + }); }); From 13fbcd0eb1b0991b9fa7798af946287882ddffa1 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 6 Feb 2024 23:29:59 -0600 Subject: [PATCH 27/77] Improve Regex to permit DTs with a final : --- shared/naturalcrit/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index f888cade8..9d981fd47 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -293,7 +293,7 @@ const blockDefinitionLists = { level : 'block', start(src) { return src.match(/^.*?::.*\n\n/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { - const regex = /^([^:\n]*?)[\n]?::(.*)(?:\n|$)|^.*(?:\n|$)/ym; + const regex = /^([^\n]*?:?)\n?::(.*)(?:\n|$)|^.*(?:\n|$)/ym; let match; let endIndex = 0; const allDefinitions = []; From 9e8570c19ba00409d6d26b6a2cdd348752a4c79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 7 Feb 2024 22:42:55 +0100 Subject: [PATCH 28/77] page counter rename --- themes/V3/5ePHB/style.less | 2 +- themes/V3/Blank/style.less | 23 ++++++++++++++++++++++- themes/V3/Journal/style.less | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 6c6634ce7..59e010c91 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -411,7 +411,7 @@ color : var(--HB_Color_Footnotes); text-align : center; text-indent : 0; - &.auto::after { content : counter(phb-page-numbers); } + &.auto::after { content : counter(page-numbers); } } .footnote { position : absolute; diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index d31919fab..118ce0ef5 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -47,7 +47,7 @@ body { counter-reset : phb-page-numbers; } height : 279.4mm; padding : 1.4cm 1.9cm 1.7cm; overflow : hidden; - counter-increment : phb-page-numbers; + counter-increment : page-numbers; background-color : var(--HB_Color_Background); text-rendering : optimizeLegibility; contain : size; @@ -460,3 +460,24 @@ body { counter-reset : phb-page-numbers; } .homebreweryIcon.red { background-color : red; } .homebreweryIcon.gold { background-image : linear-gradient(to top left, brown 22.5%, gold 40%, white 60%, gold 67.5%, brown 82.5%); } } +//***************************** +//* Page Number +//*****************************/ + +.page { + + + .pageNumber { + position : absolute; + right : 2px; + bottom : 22px; + width : 50px; + font-size : 0.9em; + text-align : center; + &.auto::after { content : counter(page-numbers); } + } + + &:nth-child(even) { + .pageNumber { left : 2px; } + } +} diff --git a/themes/V3/Journal/style.less b/themes/V3/Journal/style.less index 2e2ada5c8..b9d83b3f1 100644 --- a/themes/V3/Journal/style.less +++ b/themes/V3/Journal/style.less @@ -383,7 +383,7 @@ text-align : center; text-indent : 0; &.auto::after { - content : counter(phb-page-numbers); + content : counter(page-numbers); } } .footnote{ From c9fc976c72da39193d6569b58b3fc79a5fa5fd72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 7 Feb 2024 22:43:43 +0100 Subject: [PATCH 29/77] counter left --- themes/V3/Blank/style.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index 118ce0ef5..4a84167ba 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -8,7 +8,7 @@ } @page { margin : 0; } -body { counter-reset : phb-page-numbers; } +body { counter-reset : page-numbers; } * { -webkit-print-color-adjust : exact; } //***************************** From 5e97121e5a567f83a4fa9e7a27472ccdd2c73262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 7 Feb 2024 22:48:32 +0100 Subject: [PATCH 30/77] pageNumber to blank --- themes/V3/5ePHB/style.less | 6 ------ themes/V3/Blank/style.less | 8 +++----- themes/V3/Journal/style.less | 8 -------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 59e010c91..bb406b152 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -403,15 +403,9 @@ } } .pageNumber { - position : absolute; right : 2px; bottom : 22px; - width : 50px; - font-size : 0.9em; color : var(--HB_Color_Footnotes); - text-align : center; - text-indent : 0; - &.auto::after { content : counter(page-numbers); } } .footnote { position : absolute; diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index 4a84167ba..1d6b1b0aa 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -465,12 +465,10 @@ body { counter-reset : page-numbers; } //*****************************/ .page { - - .pageNumber { position : absolute; - right : 2px; - bottom : 22px; + right : 30px; + bottom : 30px; width : 50px; font-size : 0.9em; text-align : center; @@ -478,6 +476,6 @@ body { counter-reset : page-numbers; } } &:nth-child(even) { - .pageNumber { left : 2px; } + .pageNumber { left : 30px; } } } diff --git a/themes/V3/Journal/style.less b/themes/V3/Journal/style.less index b9d83b3f1..b8ed3ce8f 100644 --- a/themes/V3/Journal/style.less +++ b/themes/V3/Journal/style.less @@ -374,17 +374,9 @@ } .pageNumber{ font-family : FrederickaTheGreat; - position : absolute; right : 3cm; bottom : 1.25cm; - width : 50px; - font-size : 0.9em; color : var(--HB_Color_HeaderText); - text-align : center; - text-indent : 0; - &.auto::after { - content : counter(page-numbers); - } } .footnote{ position : absolute; From 7f8b87bb852280374074d0dc849f6a6dfc69ae52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 7 Feb 2024 22:52:44 +0100 Subject: [PATCH 31/77] watermark now visible --- themes/V3/Blank/style.less | 1 - 1 file changed, 1 deletion(-) diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index 1d6b1b0aa..f8289bbee 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -166,7 +166,6 @@ body { counter-reset : page-numbers; } margin : 0; font-size : 120px; text-transform : uppercase; - mix-blend-mode : overlay; opacity : 30%; transform : rotate(-45deg); p { margin-bottom : none; } From f3148ed53cb5b283398278585c0d091f1f659565 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Wed, 7 Feb 2024 20:23:19 -0600 Subject: [PATCH 32/77] Fix Syntax Highlighting Update changelog to match PR target shifts. --- changelog.md | 33 ++++++++++++++++++++++--------- client/homebrew/editor/editor.jsx | 4 ++-- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/changelog.md b/changelog.md index 081bd85ea..fe3076059 100644 --- a/changelog.md +++ b/changelog.md @@ -80,7 +80,7 @@ pre { ## changelog For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery). -### Tuesday 07/11/2023 +### Tuesday 02/07/2024 {{ taskList @@ -88,22 +88,37 @@ For a full record of development, visit our [Github Page](https://github.com/nat * [x] Add user requested feature for definition lists with multiple definitions. -This implements issue [#2340](https://github.com/naturalcrit/homebrewery/issues/2340) by extending the existing syntax pattern. Additional definitions must be on the same line. +This implements issue [#2340](https://github.com/naturalcrit/homebrewery/issues/2340) by extending the existing syntax pattern. + +Multiple Definition Description (\) terms must go on the following line with a blank line between definition sets. Additionally, Descriptions may be multi-line, if desired. Multi-line descriptions will be concatenated into a single Description on render. + +The previous, inline system has not been removed, however, the two forms may not be intermixed. ``` -Dictionary Term :: Definition One :: Definition Two :: Definition Three +Dictionary Term +:: Definition One +:: Definition Two +:: Definition Three ``` Example: ``` -Egg::Came before the Chicken::Python Packaging Format::Over Easy isn't - Egg - Came before the Chicken - Python Packaging Format - Over Easy isn't +::Came before the Chicken +::Python Packaging Format +::Over +Easy +isn't ``` - +Results: +``` +
+
Egg
+
Came before the Chicken
+
Python Packaging Format
+
Over Easy isn't
+
+``` }} ### Friday 13/10/2023 - v3.10.0 diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 0d1378439..7a5f433f5 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -160,8 +160,8 @@ const Editor = createClass({ codeMirror.markText({ line: lineNumber, ch: match.indices[2][0] }, { line: lineNumber, ch: match.indices[2][1] }, { className: 'dd-highlight' }); const ddIndex = match.indices[2][0]; let colons = /::/g; - let colonMatches; - while((colonMatches = colons.exec(match[2])) !== null){ + let colonMatches = colons.exec(match[2]); + if(colonMatches !== null){ codeMirror.markText({ line: lineNumber, ch: colonMatches.index + ddIndex }, { line: lineNumber, ch: colonMatches.index + colonMatches[0].length + ddIndex }, { className: 'dl-colon-highlight'} ) } } From 26a41e6262dfb43a971da8d5e0540a50a68ff8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Thu, 8 Feb 2024 11:33:11 +0100 Subject: [PATCH 33/77] FA to 6.5.1 --- client/homebrew/brewRenderer/brewRenderer.jsx | 2 +- client/template.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 9208a2b90..c32d5fa52 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -20,7 +20,7 @@ const PAGE_HEIGHT = 1056; const INITIAL_CONTENT = dedent` - + diff --git a/client/template.js b/client/template.js index e8ac8e22f..43e17b27d 100644 --- a/client/template.js +++ b/client/template.js @@ -12,7 +12,7 @@ const template = async function(name, title='', props = {}){ - + From 32b5bebbc46e88b4e7e6b1e94032c11201e5b7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Fri, 9 Feb 2024 00:18:39 +0100 Subject: [PATCH 34/77] full functionality --- client/homebrew/navbar/newbrew.navitem.jsx | 100 +++++++++++++++++++-- 1 file changed, 93 insertions(+), 7 deletions(-) diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index cc833013d..94aa9fb85 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -1,12 +1,98 @@ const React = require('react'); +const _ = require('lodash'); const Nav = require('naturalcrit/nav/nav.jsx'); +const yaml = require('js-yaml'); +const { useRef } = React; + +const BREWKEY = 'homebrewery-new'; +const STYLEKEY = 'homebrewery-new-style'; +const METAKEY = 'homebrewery-new-meta'; + +const splitTextStyleAndMetadata = (brew)=>{ + brew.text = brew.text.replaceAll('\r\n', '\n'); + if(brew.text.startsWith('```metadata')) { + const index = brew.text.indexOf('```\n\n'); + const metadataSection = brew.text.slice(12, index - 1); + const metadata = yaml.load(metadataSection); + Object.assign(brew, _.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang'])); + brew.text = brew.text.slice(index + 5); + } + if(brew.text.startsWith('```css')) { + const index = brew.text.indexOf('```\n\n'); + brew.style = brew.text.slice(7, index - 1); + brew.text = brew.text.slice(index + 5); + } +}; + + +const handleFileChange = (e) => { + const file = e.target.files[0]; + if (file) { + const reader = new FileReader(); + reader.onload = (e) => { + const fileContent = e.target.result; + + const brew = { + text :fileContent, + style : '' + } + splitTextStyleAndMetadata(brew); + console.log(brew); + localStorage.setItem(BREWKEY, brew.text); + localStorage.setItem(STYLEKEY, brew.style); + localStorage.setItem(METAKEY, JSON.stringify({ + 'title': brew.title, + 'description': brew.description, + 'tags': brew.tags, + 'systems': brew.systems, + 'renderer': brew.renderer, + 'theme': brew.theme, + 'lang': brew.lang + })); + + //window.location.href = '/new'; + }; + reader.readAsText(file); + } +}; + module.exports = function(props){ - return - new - ; + const inputRef = useRef(null); + + return + + new + + + new + + + { inputRef.current.click(); }}> + + New From Local File + + + ; + }; + +/* + + new cloned + +*/ \ No newline at end of file From 2b81c26cffb38c76cce3cdf78becf70d2144569f Mon Sep 17 00:00:00 2001 From: David Bolack Date: Thu, 8 Feb 2024 19:23:33 -0600 Subject: [PATCH 35/77] Working, but ugly --- shared/naturalcrit/markdown.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 9d981fd47..46b1ff59e 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -301,6 +301,7 @@ const blockDefinitionLists = { let inList = false; let lastEmpty = false; let inlineDefinitions = false; + let appending = false; while (match = regex.exec(src)) { // If we aren't actively in a DL and we match just text, bail. // If the last loop bailed with lastEmpty and we match just text, bail @@ -308,9 +309,17 @@ const blockDefinitionLists = { break; } endIndex += match[0].length; + // Check to see if this a match containing the start of a DD. if(match[0].indexOf('::') > -1) { inList = true; + // Check and see if we are currently in line appending mode + if(appending) { + const lastPos = typeof currentDefinition.dd.length !== 'undefined' ? currentDefinition.dd.length - 1 : 0; + currentDefinition.dd[lastPos] = `${currentDefinition.dd[lastPos]} ${match[1]?.trim()}`; + match[1] = ''; + } + appending = false; // Check for a DT value. if(match[1]?.trim()?.length>0) { if(currentDefinition?.dt?.length) { @@ -341,7 +350,7 @@ const blockDefinitionLists = { continue; } // Multi-line style DDs - const newDefinitions = _.flatten(match[2].split('::').filter((item)=>item).map((s)=>s.trim())); + const newDefinitions = _.flatten(match[2].split('\n::').filter((item)=>item).map((s)=>s.trim())); if(newDefinitions?.length) { currentDefinition.dd = currentDefinition.dd.concat(newDefinitions); } @@ -364,6 +373,7 @@ const blockDefinitionLists = { lastEmpty = false; const lastPos = typeof currentDefinition.dd.length !== 'undefined' ? currentDefinition.dd.length - 1 : 0; currentDefinition.dd[lastPos] = `${currentDefinition.dd[lastPos]} ${match[0].trim()}`; + appending = true; } } } From 67b11d62ea20f63e65a64ef2e1690da6b4df4635 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Thu, 8 Feb 2024 19:35:43 -0600 Subject: [PATCH 36/77] Small DD appending mode fix --- shared/naturalcrit/markdown.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 46b1ff59e..5289dd645 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -313,7 +313,8 @@ const blockDefinitionLists = { // Check to see if this a match containing the start of a DD. if(match[0].indexOf('::') > -1) { inList = true; - // Check and see if we are currently in line appending mode + // Check and see if we are currently in line appending mode, if so, match[1] should be + // appended to the last entry instead of being used as the next DT. if(appending) { const lastPos = typeof currentDefinition.dd.length !== 'undefined' ? currentDefinition.dd.length - 1 : 0; currentDefinition.dd[lastPos] = `${currentDefinition.dd[lastPos]} ${match[1]?.trim()}`; @@ -359,6 +360,7 @@ const blockDefinitionLists = { } lastEmpty = false; } else if(inList) { // Regular line that might mark the end of a line. + appending = false; if(inlineDefinitions) { endIndex -= match[0].length; break; From 705d170b6e1fa922e1d820370e326e336e60520a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Fri, 9 Feb 2024 10:22:55 +0100 Subject: [PATCH 37/77] alert if wrong file, redirect if good --- client/homebrew/navbar/newbrew.navitem.jsx | 171 ++++++++++----------- 1 file changed, 84 insertions(+), 87 deletions(-) diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index 94aa9fb85..6e63e7a8f 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -1,98 +1,95 @@ const React = require('react'); +const { useState, useRef } = React; const _ = require('lodash'); const Nav = require('naturalcrit/nav/nav.jsx'); const yaml = require('js-yaml'); -const { useRef } = React; const BREWKEY = 'homebrewery-new'; const STYLEKEY = 'homebrewery-new-style'; const METAKEY = 'homebrewery-new-meta'; -const splitTextStyleAndMetadata = (brew)=>{ - brew.text = brew.text.replaceAll('\r\n', '\n'); - if(brew.text.startsWith('```metadata')) { - const index = brew.text.indexOf('```\n\n'); - const metadataSection = brew.text.slice(12, index - 1); - const metadata = yaml.load(metadataSection); - Object.assign(brew, _.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang'])); - brew.text = brew.text.slice(index + 5); - } - if(brew.text.startsWith('```css')) { - const index = brew.text.indexOf('```\n\n'); - brew.style = brew.text.slice(7, index - 1); - brew.text = brew.text.slice(index + 5); - } +const NewBrew = () => { + const inputRef = useRef(null); + + const [brew, setBrew] = useState({ + text: '', + style: '' + }); + + const splitTextStyleAndMetadata = (brewContent) => { + let updatedBrew = { ...brewContent }; + updatedBrew.text = updatedBrew.text.replaceAll('\r\n', '\n'); + if (updatedBrew.text.startsWith('```metadata')) { + const index = updatedBrew.text.indexOf('```\n\n'); + const metadataSection = updatedBrew.text.slice(12, index - 1); + const metadata = yaml.load(metadataSection); + updatedBrew = { + ...updatedBrew, + ..._.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang']) + }; + updatedBrew.text = updatedBrew.text.slice(index + 5); + } + if (updatedBrew.text.startsWith('```css')) { + const index = updatedBrew.text.indexOf('```\n\n'); + updatedBrew.style = updatedBrew.text.slice(7, index - 1); + updatedBrew.text = updatedBrew.text.slice(index + 5); + } + return updatedBrew; + }; + + + const handleFileChange = (e) => { + const file = e.target.files[0]; + if (file) { + const reader = new FileReader(); + reader.onload = (e) => { + const fileContent = e.target.result; + const newBrew = { + text: fileContent, + style: '' + }; + if(fileContent.startsWith('```metadata')) { + const updatedBrew = splitTextStyleAndMetadata(newBrew); + console.log(updatedBrew); + setBrew(updatedBrew); + localStorage.setItem(BREWKEY, updatedBrew.text); + localStorage.setItem(STYLEKEY, updatedBrew.style); + localStorage.setItem(METAKEY, JSON.stringify(_.pick(updatedBrew, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang']))); + + window.location.href = '/new'; + } else { + alert('This file is invalid, please, enter a valid file'); + } + }; + reader.readAsText(file); + } + }; + + return ( + + + new + + + new + + + { inputRef.current.click(); }}> + + New From Local File + + + ); }; - -const handleFileChange = (e) => { - const file = e.target.files[0]; - if (file) { - const reader = new FileReader(); - reader.onload = (e) => { - const fileContent = e.target.result; - - const brew = { - text :fileContent, - style : '' - } - splitTextStyleAndMetadata(brew); - console.log(brew); - localStorage.setItem(BREWKEY, brew.text); - localStorage.setItem(STYLEKEY, brew.style); - localStorage.setItem(METAKEY, JSON.stringify({ - 'title': brew.title, - 'description': brew.description, - 'tags': brew.tags, - 'systems': brew.systems, - 'renderer': brew.renderer, - 'theme': brew.theme, - 'lang': brew.lang - })); - - //window.location.href = '/new'; - }; - reader.readAsText(file); - } -}; - - -module.exports = function(props){ - const inputRef = useRef(null); - - return - - new - - - new - - - { inputRef.current.click(); }}> - - New From Local File - - - ; - -}; - -/* - - new cloned - -*/ \ No newline at end of file +module.exports = NewBrew; From 19bb9705b67f99defcc797be4e4daec2aa286eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Fri, 9 Feb 2024 13:33:41 +0100 Subject: [PATCH 38/77] initial commit --- shared/naturalcrit/nav/nav.less | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shared/naturalcrit/nav/nav.less b/shared/naturalcrit/nav/nav.less index e3a58a33a..8ac29f420 100644 --- a/shared/naturalcrit/nav/nav.less +++ b/shared/naturalcrit/nav/nav.less @@ -87,10 +87,15 @@ nav{ position : relative; display : block; width : 100%; - vertical-align : middle; - padding : 8px 5px; + padding : 5px 20px 5px 12px; border : 1px solid #888; border-bottom : 0; + i:before { + position:absolute; + right:12px; + top:50%; + translate: 0 -50%; + } } } } From 323d84974c09a72cc151f537f0046686e3d5dfd1 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Sat, 10 Feb 2024 22:29:16 -0600 Subject: [PATCH 39/77] Combine nav and navbar styles - moves all the nav.less styling to navbar.less in the `client` directory - deletes nav.less - changes the nav.jsx import of styles to navbar.less - stylelint navbar.less - added a couple comments about easy future changes. --- client/homebrew/navbar/navbar.less | 584 ++++++++++++++++------------- shared/naturalcrit/nav/nav.jsx | 2 +- shared/naturalcrit/nav/nav.less | 97 ----- 3 files changed, 332 insertions(+), 351 deletions(-) delete mode 100644 shared/naturalcrit/nav/nav.less diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 036f52cf4..73671abbb 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -1,65 +1,339 @@ @import "naturalcrit/styles/colors.less"; + @navbarHeight : 28px; + @keyframes pinkColoring { - 0% {color : pink;} - 50% {color : pink;} - 75% {color : red;} - 100% {color : pink;} + 0% { color : pink; } + 50% { color : pink; } + 75% { color : red; } + 100% { color : pink; } } -.homebrew nav { - .homebrewLogo { - .animate(color); - font-family : CodeBold; - font-size : 12px; - color : white; - div { - margin-top : 2px; - margin-bottom : -2px; - } - &:hover { - color : @blue; - } + +@keyframes glideDropDown { + 0% { + background-color : #333333; + opacity : 0; + transform : translate(0px, -100%); } - .editTitle.navItem { - padding : 2px 12px; - input { - font-family : "Open Sans", sans-serif; - font-size : 12px; - font-weight : 800; - width : 250px; - margin : 0; - padding : 2px; - text-align : center; - color : white; - border : 1px solid @blue; - outline : none; - background-color : transparent; - } - .charCount { - display : inline-block; - margin-left : 8px; - text-align : right; - vertical-align : bottom; - color : #666; - &.max { - color : @red; + 100% { + background-color : #333333; + opacity : 1; + transform : translate(0px, 0px); + } +} + +.homebrew nav { + background-color : #333333; + .navContent { + position : relative; + z-index : 2; + display : flex; + justify-content : space-between; + .navSection { + display : flex; + align-items : center; + // "NaturalCrit" logo + .navLogo { + display : block; + margin-top : 0px; + margin-right : 8px; + margin-left : 8px; + color : white; + text-decoration : none; + &:hover { + .name { color : @orange; } + svg { fill : @orange; } + } + svg { + height : 13px; + margin-right : 0.2em; + cursor : pointer; + fill : white; + } + span.name { + font-family : 'CodeLight'; + font-size : 15px; + span.crit { font-family : 'CodeBold'; } + small { + font-family : 'Open Sans'; + font-size : 0.3em; + font-weight : 800; + text-transform : uppercase; + } + } + } + &:last-child .navItem { border-left : 1px solid #666666; } + .navItem { + #backgroundColorsHover; + .animate(background-color); + padding : 8px 12px; + font-size : 10px; + font-weight : 800; + line-height : 13px; + color : white; + text-decoration : none; + text-transform : uppercase; + cursor : pointer; + background-color : #333333; + i { + float : right; + margin-left : 5px; + font-size : 13px; + } + &.patreon { + border-right : 1px solid #666666; + border-left : 1px solid #666666; + &:hover i { color : red; } + i { + color : pink; + .animate(color); + animation-name : pinkColoring; + animation-duration : 2s; + } + } + &.editTitle { // this is not needed at all currently - you used to be able to edit the title via the navbar. + padding : 2px 12px; + input { + width : 250px; + padding : 2px; + margin : 0; + font-family : 'Open Sans', sans-serif; + font-size : 12px; + font-weight : 800; + color : white; + text-align : center; + background-color : transparent; + border : 1px solid @blue; + outline : none; + } + .charCount { + display : inline-block; + margin-left : 8px; + color : #666666; + text-align : right; + vertical-align : bottom; + &.max { color : @red; } + } + } + &.brewTitle { + flex-grow : 1; + font-size : 12px; + font-weight : 800; + color : white; + text-align : center; + text-transform : initial; + background-color : transparent; + } + // "The Homebrewery" logo + &.homebrewLogo { + .animate(color); + font-family : 'CodeBold'; + font-size : 12px; + color : white; + div { + margin-top : 2px; + margin-bottom : -2px; + } + &:hover { color : @blue; } + } + &.metadata { + position : relative; + display : flex; + flex-grow : 1; + align-items : center; + height : 100%; + padding : 0; + i { margin-right : 10px;} + .window { + position : absolute; + bottom : 0; + left : 50%; + z-index : -1; + display : flex; + flex-flow : row wrap; + align-content : baseline; + justify-content : flex-start; + width : 440px; + max-height : ~"calc(100vh - 28px)"; + padding : 0 10px 5px; + margin : 0 auto; + background-color : #333333; + border : 3px solid #444444; + border-top : unset; + border-radius : 0 0 5px 5px; + box-shadow : inset 0 7px 9px -7px #111111; + transition : transform 0.4s, opacity 0.4s; + &.active { + opacity : 1; + transform : translateX(-50%) translateY(100%); + } + &.inactive { + opacity : 0; + transform : translateX(-50%) translateY(0%); + } + .row { + display : flex; + flex-flow : row wrap; + width : 100%; + h4 { + box-sizing : border-box; + display : block; + flex-basis : 20%; + flex-grow : 1; + min-width : 76px; + padding : 5px 0; + color : #BBBBBB; + text-align : center; + } + p { + flex-basis : 80%; + flex-grow : 1; + padding : 5px 0; + font-family : 'Open Sans', sans-serif; + font-size : 10px; + font-weight : normal; + text-transform : initial; + .tag { + display : inline-block; + padding : 2px; + margin : 2px 2px; + background-color : #444444; + border : 2px solid grey; + border-radius : 5px; + } + a.userPageLink { + color : white; + text-decoration : none; + &:hover { text-decoration : underline; } + } + } + &:nth-of-type(even) { background-color : #555555; } + } + } + } + &.warning { + position : relative; + color : white; + background-color : @orange; + &:hover > .dropdown { visibility : visible; } + .dropdown { + position : absolute; + top : 28px; + left : 0; + z-index : 10000; + box-sizing : border-box; + display : block; + width : 100%; + padding : 13px 5px; + text-align : center; + visibility : hidden; + background-color : #333333; + } + } + &.account { + min-width : 100px; + &.username { text-transform : none;} + } + } + .navDropdownContainer { + position : relative; + .navDropdown { + position : absolute; + top : 28px; + left : 0px; + z-index : 10000; + width : 100%; + max-height : calc(100vh - 28px); + overflow : hidden auto; + .navItem { + position : relative; + display : block; + width : 100%; + padding : 8px 5px; + border : 1px solid #888888; + border-bottom : 0; + animation-name : glideDropDown; + animation-duration : 0.4s; + } + } + &.recent { + position : relative; + .navDropdown .navItem { + #backgroundColorsHover; + .animate(background-color); + position : relative; + box-sizing : border-box; + display : block; + max-height : ~"calc(100vh - 28px)"; // I don't think is correct syntax, but leaving it in for now... (Gazook89) + padding : 8px 5px 13px; + overflow : hidden auto; + color : white; + text-decoration : none; + background-color : #333333; + border-top : 1px solid #888888; + scrollbar-color : #666666 #333333; + scrollbar-width : thin; + .clear { + position : absolute; + top : 50%; + right : 0; + display : none; + width : 20px; + height : 100%; + background-color : #333333; + border-radius : 3px; + opacity : 70%; + transform : translateY(-50%); + &:hover { opacity : 100%; } + i { + width : 100%; + height : 100%; + margin : 0; + font-size : 10px; + text-align : center; + } + } + &:hover { + background-color : @blue; + .clear { + display : grid; + place-content : center; + } + } + .title { + display : inline-block; + width : 100%; + overflow : hidden auto; + text-overflow : ellipsis; + white-space : nowrap; + } + .time { + position : absolute; + right : 2px; + bottom : 2px; + font-size : 0.7em; + color : #888888; + } + &.header { + box-sizing : border-box; + display : block; + padding : 5px 0; + color : #BBBBBB; + text-align : center; + background-color : #333333; + border-top : 1px solid #888888; + &:nth-of-type(1) { background-color : darken(@teal, 20%); } + &:nth-of-type(2) { background-color : darken(@purple, 30%); } + } + } + } } } } - .brewTitle.navItem { - font-size : 12px; - font-weight : 800; - height : 100%; - text-align : center; - text-transform : initial; - color : white; - background-color : transparent; - flex-grow : 1; - } + + // this should likely be refactored into .navDropdownContainer .save-menu { - .dropdown { - z-index : 1000; - } + .dropdown { z-index : 1000; } .navItem i.fa-power-off { color : red; &.active { @@ -68,205 +342,9 @@ } } } - .patreon.navItem { - border-right : 1px solid #666; - border-left : 1px solid #666; - &:hover i { - color : red; - } - i { - .animate(color); - animation-name : pinkColoring; - animation-duration : 2s; - color : pink; - } - } - .recent.navDropdownContainer { - position : relative; - .navDropdown .navItem { - overflow : hidden auto; - max-height : ~"calc(100vh - 28px)"; - scrollbar-color : #666 #333; - scrollbar-width : thin; - - #backgroundColorsHover; - .animate(background-color); - position : relative; - display : block; - overflow : clip; - box-sizing : border-box; - padding : 8px 5px 13px; - text-decoration : none; - color : white; - border-top : 1px solid #888; - background-color : #333; - .clear { - position : absolute; - top : 50%; - right : 0; - display : none; - width : 20px; - height : 100%; - transform : translateY(-50%); - opacity : 70%; - border-radius : 3px; - background-color : #333; - &:hover { - opacity : 100%; - } - i { - font-size : 10px; - width : 100%; - height : 100%; - margin : 0; - text-align : center; - } - } - &:hover { - background-color : @blue; - .clear { - display : grid; - place-content : center; - } - } - .title { - display : inline-block; - overflow : hidden; - width : 100%; - white-space : nowrap; - text-overflow : ellipsis; - } - .time { - font-size : 0.7em; - position : absolute; - right : 2px; - bottom : 2px; - color : #888; - } - &.header { - display : block; - box-sizing : border-box; - padding : 5px 0; - text-align : center; - color : #BBB; - border-top : 1px solid #888; - background-color : #333; - &:nth-of-type(1) { - background-color : darken(@teal, 20%); - } - &:nth-of-type(2) { - background-color : darken(@purple, 30%); - } - } - } - } - .metadata.navItem { - position : relative; - display : flex; - align-items : center; - height : 100%; - padding : 0; - flex-grow : 1; - i { - margin-right : 10px; - } - .window { - position : absolute; - z-index : -1; - bottom : 0; - left : 50%; - display : flex; - justify-content : flex-start; - width : 440px; - max-height : ~"calc(100vh - 28px)"; - margin : 0 auto; - padding : 0 10px 5px; - transition : transform 0.4s, opacity 0.4s; - border : 3px solid #444; - border-top : unset; - border-radius : 0 0 5px 5px; - background-color : #333; - box-shadow : inset 0 7px 9px -7px #111; - flex-flow : row wrap; - align-content : baseline; - &.active { - transform : translateX(-50%) translateY(100%); - opacity : 1; - } - &.inactive { - transform : translateX(-50%) translateY(0%); - opacity : 0; - } - .row { - display : flex; - width : 100%; - flex-flow : row wrap; - h4 { - display : block; - box-sizing : border-box; - min-width : 76px; - padding : 5px 0; - text-align : center; - color : #BBB; - flex-basis : 20%; - flex-grow : 1; - } - p { - font-family : "Open Sans", sans-serif; - font-size : 10px; - font-weight : normal; - padding : 5px 0; - text-transform : initial; - flex-basis : 80%; - flex-grow : 1; - .tag { - display : inline-block; - margin : 2px 2px; - padding : 2px; - border : 2px solid grey; - border-radius : 5px; - background-color : #444; - } - a.userPageLink { - text-decoration : none; - color : white; - &:hover { - text-decoration : underline; - } - } - } - &:nth-of-type(even) { - background-color : #555; - } - } - } - } - .warning.navItem { - position : relative; - color : white; - background-color : @orange; - &:hover > .dropdown { - visibility : visible; - } - .dropdown { - position : absolute; - z-index : 10000; - top : 28px; - left : 0; - display : block; - visibility : hidden; - box-sizing : border-box; - width : 100%; - padding : 13px 5px; - text-align : center; - background-color : #333; - } - } - .account.navItem { - min-width : 100px; - } - .account.username.navItem { - text-transform : none; - } + + + + } diff --git a/shared/naturalcrit/nav/nav.jsx b/shared/naturalcrit/nav/nav.jsx index 3c7fd7c5e..04b7037dd 100644 --- a/shared/naturalcrit/nav/nav.jsx +++ b/shared/naturalcrit/nav/nav.jsx @@ -1,4 +1,4 @@ -require('./nav.less'); +require('client/homebrew/navbar/navbar.less'); const React = require('react'); const { useState, useRef, useEffect } = React; const createClass = require('create-react-class'); diff --git a/shared/naturalcrit/nav/nav.less b/shared/naturalcrit/nav/nav.less deleted file mode 100644 index e3a58a33a..000000000 --- a/shared/naturalcrit/nav/nav.less +++ /dev/null @@ -1,97 +0,0 @@ -@import '../styles/colors'; -@keyframes glideDropDown { - 0% {transform : translate(0px, -100%); - opacity : 0; - background-color: #333;} - 100% {transform : translate(0px, 0px); - opacity : 1; - background-color: #333;} -} -nav{ - background-color : #333; - .navContent{ - position : relative; - display : flex; - justify-content : space-between; - z-index : 2; - } - .navSection{ - display : flex; - align-items : center; - } - .navLogo{ - display : block; - margin-top : 0px; - margin-right : 8px; - margin-left : 8px; - color : white; - text-decoration : none; - &:hover{ - .name{ color : @orange; } - svg{ fill : @orange } - } - svg{ - height : 13px; - margin-right : 0.2em; - cursor : pointer; - fill : white; - } - span.name{ - font-family : 'CodeLight'; - font-size : 15px; - span.crit{ - font-family : 'CodeBold'; - } - small{ - font-family : 'Open Sans'; - font-size : 0.3em; - font-weight : 800; - text-transform : uppercase; - } - } - } - .navItem{ - #backgroundColorsHover; - .animate(background-color); - padding : 8px 12px; - cursor : pointer; - background-color : #333; - font-size : 10px; - font-weight : 800; - color : white; - text-decoration : none; - text-transform : uppercase; - line-height : 13px; - i{ - margin-left : 5px; - font-size : 13px; - float : right; - } - } - .navSection:last-child .navItem{ - border-left : 1px solid #666; - } - .navDropdownContainer{ - position: relative; - .navDropdown { - position : absolute; - top : 28px; - left : 0px; - z-index : 10000; - width : 100%; - overflow : hidden auto; - max-height : calc(100vh - 28px); - .navItem{ - animation-name: glideDropDown; - animation-duration: 0.4s; - position : relative; - display : block; - width : 100%; - vertical-align : middle; - padding : 8px 5px; - border : 1px solid #888; - border-bottom : 0; - } - } - } -} From 7d755fe2a349f646db9dafa4339a8155836f3fe8 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Fri, 23 Feb 2024 11:35:57 -0600 Subject: [PATCH 40/77] Fix syntax highlighting on sub and superscript I did not test this very robustly, it seems. --- client/homebrew/editor/editor.jsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index d79d2ce4e..3fa936ab7 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -160,21 +160,25 @@ const Editor = createClass({ } } - // Superscript - if(line.includes('\^')) { - const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; - let match; - while ((match = regex.exec(line)) != null) { - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[1]) - 1 }, { line: lineNumber, ch: line.indexOf(match[1]) + match[1].length + 1 }, { className: 'superscript' }); - } - } - // Subscript if(line.includes('^^')) { + //const regex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/g; const regex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/g; let match; while ((match = regex.exec(line)) != null) { - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[1]) - 2 }, { line: lineNumber, ch: line.indexOf(match[1]) + match[1].length + 2 }, { className: 'subscript' }); + if(line.indexOf(match[0]) - 1 != '^') { + codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'subscript' }); + } + } + } + + // Superscript + if(line.includes('^')) { + //const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; + const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; + let match; + while ((match = regex.exec(line)) != null) { + codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'superscript' }); } } From 05f88dfd0070f08109a52f68dcc7da6904921730 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Sun, 25 Feb 2024 09:19:31 -0600 Subject: [PATCH 41/77] Extended Definition List cleanup Remove redundant inlineBlock extension Add missing trim on multiline definitions Fix editor regex for colon terminated terms. --- changelog.md | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/changelog.md b/changelog.md index 8bc8719e7..e86c2ea0f 100644 --- a/changelog.md +++ b/changelog.md @@ -84,49 +84,6 @@ pre { ## changelog For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery). -<<<<<<< HEAD -### Tuesday 02/07/2024 - -{{ taskList - -##### abquintic - -* [x] Add user requested feature for definition lists with multiple definitions. - -This implements issue [#2340](https://github.com/naturalcrit/homebrewery/issues/2340) by extending the existing syntax pattern. - -Multiple Definition Description (\) terms must go on the following line with a blank line between definition sets. Additionally, Descriptions may be multi-line, if desired. Multi-line descriptions will be concatenated into a single Description on render. - -The previous, inline system has not been removed, however, the two forms may not be intermixed. - -``` -Dictionary Term -:: Definition One -:: Definition Two -:: Definition Three -``` -Example: -``` -Egg -::Came before the Chicken -::Python Packaging Format -::Over -Easy -isn't -``` - -Results: -``` -
-
Egg
-
Came before the Chicken
-
Python Packaging Format
-
Over Easy isn't
-
-``` -}} - -======= ### Wednesday 21/2/2024 - v3.11.0 {{taskList @@ -300,7 +257,6 @@ There are $[TableNum] tables in this document. *(note: final value of `$[TableNu \page ->>>>>>> master ### Friday 13/10/2023 - v3.10.0 {{taskList From b5301ff9784a97b1751112550d776c9b97d5b38f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 27 Feb 2024 21:53:44 +0100 Subject: [PATCH 42/77] requested changes --- client/homebrew/navbar/navbar.less | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 73671abbb..5af996238 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -247,9 +247,10 @@ overflow : hidden auto; .navItem { position : relative; - display : block; + display : flex; + justify-content : space-between; + align-items : center; width : 100%; - padding : 8px 5px; border : 1px solid #888888; border-bottom : 0; animation-name : glideDropDown; From 1d317788fe3727030f007fa69f7aa055f6a60bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 27 Feb 2024 22:12:32 +0100 Subject: [PATCH 43/77] fix undefined class --- client/homebrew/navbar/account.navitem.jsx | 2 +- client/homebrew/navbar/help.navitem.jsx | 2 +- client/homebrew/pages/editPage/editPage.jsx | 2 +- client/homebrew/pages/sharePage/sharePage.jsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/homebrew/navbar/account.navitem.jsx b/client/homebrew/navbar/account.navitem.jsx index 6b412c368..b3b6d06b0 100644 --- a/client/homebrew/navbar/account.navitem.jsx +++ b/client/homebrew/navbar/account.navitem.jsx @@ -61,7 +61,7 @@ const Account = createClass({ render : function(){ // Logged in if(global.account){ - return + return + return need help? diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx index d5af310b5..3329d1ba6 100644 --- a/client/homebrew/pages/editPage/editPage.jsx +++ b/client/homebrew/pages/editPage/editPage.jsx @@ -362,7 +362,7 @@ const EditPage = createClass({ } - + share diff --git a/client/homebrew/pages/sharePage/sharePage.jsx b/client/homebrew/pages/sharePage/sharePage.jsx index 981ad0126..c8fad41c4 100644 --- a/client/homebrew/pages/sharePage/sharePage.jsx +++ b/client/homebrew/pages/sharePage/sharePage.jsx @@ -60,7 +60,7 @@ const SharePage = createClass({ {this.props.brew.shareId && <> - + source From c4499fcc26b59bb39ef861db1528293e5245bde8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 27 Feb 2024 22:12:40 +0100 Subject: [PATCH 44/77] min-width for elements --- client/homebrew/navbar/navbar.less | 1 + 1 file changed, 1 insertion(+) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 5af996238..e818147e2 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -237,6 +237,7 @@ } .navDropdownContainer { position : relative; + min-width: 110px; .navDropdown { position : absolute; top : 28px; From 0310eee6856e16ad5d905bdcf6aa1753a6f92219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 27 Feb 2024 22:18:04 +0100 Subject: [PATCH 45/77] increase minimum width --- client/homebrew/navbar/navbar.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index e818147e2..008f25d65 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -237,7 +237,7 @@ } .navDropdownContainer { position : relative; - min-width: 110px; + min-width: 120px; .navDropdown { position : absolute; top : 28px; From 774b555a61dc15b3938fde3a35b57f4b5606b496 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 29 Feb 2024 17:17:38 -0500 Subject: [PATCH 46/77] Rework to fix 5eCleric's tests --- client/homebrew/editor/editor.jsx | 32 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 3fa936ab7..4f3ef44f5 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -160,25 +160,21 @@ const Editor = createClass({ } } - // Subscript - if(line.includes('^^')) { - //const regex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/g; - const regex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/g; - let match; - while ((match = regex.exec(line)) != null) { - if(line.indexOf(match[0]) - 1 != '^') { - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'subscript' }); - } - } - } - - // Superscript + // Subscript & Superscript if(line.includes('^')) { - //const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; - const regex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/g; - let match; - while ((match = regex.exec(line)) != null) { - codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[0]) }, { line: lineNumber, ch: line.indexOf(match[0]) + match[0].length }, { className: 'superscript' }); + let startIndex = line.indexOf('^'); + const superRegex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/gy; + const subRegex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/gy; + + while (startIndex >= 0) { + superRegex.lastIndex = subRegex.lastIndex = startIndex; + let isSuper = false; + let match = subRegex.exec(line) || superRegex.exec(line); + if (match) { + isSuper = !subRegex.lastIndex; + codeMirror.markText({ line: lineNumber, ch: match.index }, { line: lineNumber, ch: match.index + match[0].length }, { className: isSuper ? 'superscript' : 'subscript' }); + } + startIndex = line.indexOf('^', Math.max(startIndex + 1, subRegex.lastIndex, superRegex.lastIndex)); } } From 50f069e68896f7e843781db203c85e0973eda3b8 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 1 Mar 2024 01:24:50 -0500 Subject: [PATCH 47/77] Fix some nesting of styles The values from nav.less were mistakenly nested inside each other which was adding too much specificity. --- client/homebrew/navbar/navbar.less | 585 ++++++++++++++--------------- 1 file changed, 290 insertions(+), 295 deletions(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 73671abbb..ccbdf1f7a 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -29,322 +29,317 @@ z-index : 2; display : flex; justify-content : space-between; - .navSection { + } + .navSection { + display : flex; + align-items : center; + &:last-child .navItem { border-left : 1px solid #666666; } + } + // "NaturalCrit" logo + .navLogo { + display : block; + margin-top : 0px; + margin-right : 8px; + margin-left : 8px; + color : white; + text-decoration : none; + &:hover { + .name { color : @orange; } + svg { fill : @orange; } + } + svg { + height : 13px; + margin-right : 0.2em; + cursor : pointer; + fill : white; + } + span.name { + font-family : 'CodeLight'; + font-size : 15px; + span.crit { font-family : 'CodeBold'; } + small { + font-family : 'Open Sans'; + font-size : 0.3em; + font-weight : 800; + text-transform : uppercase; + } + } + } + .navItem { + #backgroundColorsHover; + .animate(background-color); + padding : 8px 12px; + font-size : 10px; + font-weight : 800; + line-height : 13px; + color : white; + text-decoration : none; + text-transform : uppercase; + cursor : pointer; + background-color : #333333; + i { + float : right; + margin-left : 5px; + font-size : 13px; + } + &.patreon { + border-right : 1px solid #666666; + border-left : 1px solid #666666; + &:hover i { color : red; } + i { + color : pink; + .animate(color); + animation-name : pinkColoring; + animation-duration : 2s; + } + } + &.editTitle { // this is not needed at all currently - you used to be able to edit the title via the navbar. + padding : 2px 12px; + input { + width : 250px; + padding : 2px; + margin : 0; + font-family : 'Open Sans', sans-serif; + font-size : 12px; + font-weight : 800; + color : white; + text-align : center; + background-color : transparent; + border : 1px solid @blue; + outline : none; + } + .charCount { + display : inline-block; + margin-left : 8px; + color : #666666; + text-align : right; + vertical-align : bottom; + &.max { color : @red; } + } + } + &.brewTitle { + flex-grow : 1; + font-size : 12px; + font-weight : 800; + color : white; + text-align : center; + text-transform : initial; + background-color : transparent; + } + // "The Homebrewery" logo + &.homebrewLogo { + .animate(color); + font-family : 'CodeBold'; + font-size : 12px; + color : white; + div { + margin-top : 2px; + margin-bottom : -2px; + } + &:hover { color : @blue; } + } + &.metadata { + position : relative; display : flex; + flex-grow : 1; align-items : center; - // "NaturalCrit" logo - .navLogo { - display : block; - margin-top : 0px; - margin-right : 8px; - margin-left : 8px; - color : white; - text-decoration : none; - &:hover { - .name { color : @orange; } - svg { fill : @orange; } + height : 100%; + padding : 0; + i { margin-right : 10px;} + .window { + position : absolute; + bottom : 0; + left : 50%; + z-index : -1; + display : flex; + flex-flow : row wrap; + align-content : baseline; + justify-content : flex-start; + width : 440px; + max-height : ~"calc(100vh - 28px)"; + padding : 0 10px 5px; + margin : 0 auto; + background-color : #333333; + border : 3px solid #444444; + border-top : unset; + border-radius : 0 0 5px 5px; + box-shadow : inset 0 7px 9px -7px #111111; + transition : transform 0.4s, opacity 0.4s; + &.active { + opacity : 1; + transform : translateX(-50%) translateY(100%); } - svg { - height : 13px; - margin-right : 0.2em; - cursor : pointer; - fill : white; + &.inactive { + opacity : 0; + transform : translateX(-50%) translateY(0%); } - span.name { - font-family : 'CodeLight'; - font-size : 15px; - span.crit { font-family : 'CodeBold'; } - small { - font-family : 'Open Sans'; - font-size : 0.3em; - font-weight : 800; - text-transform : uppercase; + .row { + display : flex; + flex-flow : row wrap; + width : 100%; + h4 { + box-sizing : border-box; + display : block; + flex-basis : 20%; + flex-grow : 1; + min-width : 76px; + padding : 5px 0; + color : #BBBBBB; + text-align : center; } + p { + flex-basis : 80%; + flex-grow : 1; + padding : 5px 0; + font-family : 'Open Sans', sans-serif; + font-size : 10px; + font-weight : normal; + text-transform : initial; + .tag { + display : inline-block; + padding : 2px; + margin : 2px 2px; + background-color : #444444; + border : 2px solid grey; + border-radius : 5px; + } + a.userPageLink { + color : white; + text-decoration : none; + &:hover { text-decoration : underline; } + } + } + &:nth-of-type(even) { background-color : #555555; } } } - &:last-child .navItem { border-left : 1px solid #666666; } + } + &.warning { + position : relative; + color : white; + background-color : @orange; + &:hover > .dropdown { visibility : visible; } + .dropdown { + position : absolute; + top : 28px; + left : 0; + z-index : 10000; + box-sizing : border-box; + display : block; + width : 100%; + padding : 13px 5px; + text-align : center; + visibility : hidden; + background-color : #333333; + } + } + &.account { + min-width : 100px; + &.username { text-transform : none;} + } + } + .navDropdownContainer { + position : relative; + .navDropdown { + position : absolute; + top : 28px; + left : 0px; + z-index : 10000; + width : 100%; + max-height : calc(100vh - 28px); + overflow : hidden auto; .navItem { + position : relative; + display : block; + width : 100%; + padding : 8px 5px; + border : 1px solid #888888; + border-bottom : 0; + animation-name : glideDropDown; + animation-duration : 0.4s; + } + } + &.recent { + position : relative; + .navDropdown .navItem { #backgroundColorsHover; .animate(background-color); - padding : 8px 12px; - font-size : 10px; - font-weight : 800; - line-height : 13px; + position : relative; + box-sizing : border-box; + display : block; + max-height : ~"calc(100vh - 28px)"; // I don't think is correct syntax, but leaving it in for now... (Gazook89) + padding : 8px 5px 13px; + overflow : hidden auto; color : white; text-decoration : none; - text-transform : uppercase; - cursor : pointer; background-color : #333333; - i { - float : right; - margin-left : 5px; - font-size : 13px; - } - &.patreon { - border-right : 1px solid #666666; - border-left : 1px solid #666666; - &:hover i { color : red; } + border-top : 1px solid #888888; + scrollbar-color : #666666 #333333; + scrollbar-width : thin; + .clear { + position : absolute; + top : 50%; + right : 0; + display : none; + width : 20px; + height : 100%; + background-color : #333333; + border-radius : 3px; + opacity : 70%; + transform : translateY(-50%); + &:hover { opacity : 100%; } i { - color : pink; - .animate(color); - animation-name : pinkColoring; - animation-duration : 2s; + width : 100%; + height : 100%; + margin : 0; + font-size : 10px; + text-align : center; } } - &.editTitle { // this is not needed at all currently - you used to be able to edit the title via the navbar. - padding : 2px 12px; - input { - width : 250px; - padding : 2px; - margin : 0; - font-family : 'Open Sans', sans-serif; - font-size : 12px; - font-weight : 800; - color : white; - text-align : center; - background-color : transparent; - border : 1px solid @blue; - outline : none; - } - .charCount { - display : inline-block; - margin-left : 8px; - color : #666666; - text-align : right; - vertical-align : bottom; - &.max { color : @red; } + &:hover { + background-color : @blue; + .clear { + display : grid; + place-content : center; } } - &.brewTitle { - flex-grow : 1; - font-size : 12px; - font-weight : 800; - color : white; + .title { + display : inline-block; + width : 100%; + overflow : hidden auto; + text-overflow : ellipsis; + white-space : nowrap; + } + .time { + position : absolute; + right : 2px; + bottom : 2px; + font-size : 0.7em; + color : #888888; + } + &.header { + box-sizing : border-box; + display : block; + padding : 5px 0; + color : #BBBBBB; text-align : center; - text-transform : initial; - background-color : transparent; - } - // "The Homebrewery" logo - &.homebrewLogo { - .animate(color); - font-family : 'CodeBold'; - font-size : 12px; - color : white; - div { - margin-top : 2px; - margin-bottom : -2px; - } - &:hover { color : @blue; } - } - &.metadata { - position : relative; - display : flex; - flex-grow : 1; - align-items : center; - height : 100%; - padding : 0; - i { margin-right : 10px;} - .window { - position : absolute; - bottom : 0; - left : 50%; - z-index : -1; - display : flex; - flex-flow : row wrap; - align-content : baseline; - justify-content : flex-start; - width : 440px; - max-height : ~"calc(100vh - 28px)"; - padding : 0 10px 5px; - margin : 0 auto; - background-color : #333333; - border : 3px solid #444444; - border-top : unset; - border-radius : 0 0 5px 5px; - box-shadow : inset 0 7px 9px -7px #111111; - transition : transform 0.4s, opacity 0.4s; - &.active { - opacity : 1; - transform : translateX(-50%) translateY(100%); - } - &.inactive { - opacity : 0; - transform : translateX(-50%) translateY(0%); - } - .row { - display : flex; - flex-flow : row wrap; - width : 100%; - h4 { - box-sizing : border-box; - display : block; - flex-basis : 20%; - flex-grow : 1; - min-width : 76px; - padding : 5px 0; - color : #BBBBBB; - text-align : center; - } - p { - flex-basis : 80%; - flex-grow : 1; - padding : 5px 0; - font-family : 'Open Sans', sans-serif; - font-size : 10px; - font-weight : normal; - text-transform : initial; - .tag { - display : inline-block; - padding : 2px; - margin : 2px 2px; - background-color : #444444; - border : 2px solid grey; - border-radius : 5px; - } - a.userPageLink { - color : white; - text-decoration : none; - &:hover { text-decoration : underline; } - } - } - &:nth-of-type(even) { background-color : #555555; } - } - } - } - &.warning { - position : relative; - color : white; - background-color : @orange; - &:hover > .dropdown { visibility : visible; } - .dropdown { - position : absolute; - top : 28px; - left : 0; - z-index : 10000; - box-sizing : border-box; - display : block; - width : 100%; - padding : 13px 5px; - text-align : center; - visibility : hidden; - background-color : #333333; - } - } - &.account { - min-width : 100px; - &.username { text-transform : none;} - } - } - .navDropdownContainer { - position : relative; - .navDropdown { - position : absolute; - top : 28px; - left : 0px; - z-index : 10000; - width : 100%; - max-height : calc(100vh - 28px); - overflow : hidden auto; - .navItem { - position : relative; - display : block; - width : 100%; - padding : 8px 5px; - border : 1px solid #888888; - border-bottom : 0; - animation-name : glideDropDown; - animation-duration : 0.4s; - } - } - &.recent { - position : relative; - .navDropdown .navItem { - #backgroundColorsHover; - .animate(background-color); - position : relative; - box-sizing : border-box; - display : block; - max-height : ~"calc(100vh - 28px)"; // I don't think is correct syntax, but leaving it in for now... (Gazook89) - padding : 8px 5px 13px; - overflow : hidden auto; - color : white; - text-decoration : none; - background-color : #333333; - border-top : 1px solid #888888; - scrollbar-color : #666666 #333333; - scrollbar-width : thin; - .clear { - position : absolute; - top : 50%; - right : 0; - display : none; - width : 20px; - height : 100%; - background-color : #333333; - border-radius : 3px; - opacity : 70%; - transform : translateY(-50%); - &:hover { opacity : 100%; } - i { - width : 100%; - height : 100%; - margin : 0; - font-size : 10px; - text-align : center; - } - } - &:hover { - background-color : @blue; - .clear { - display : grid; - place-content : center; - } - } - .title { - display : inline-block; - width : 100%; - overflow : hidden auto; - text-overflow : ellipsis; - white-space : nowrap; - } - .time { - position : absolute; - right : 2px; - bottom : 2px; - font-size : 0.7em; - color : #888888; - } - &.header { - box-sizing : border-box; - display : block; - padding : 5px 0; - color : #BBBBBB; - text-align : center; - background-color : #333333; - border-top : 1px solid #888888; - &:nth-of-type(1) { background-color : darken(@teal, 20%); } - &:nth-of-type(2) { background-color : darken(@purple, 30%); } - } - } + background-color : #333333; + border-top : 1px solid #888888; + &:nth-of-type(1) { background-color : darken(@teal, 20%); } + &:nth-of-type(2) { background-color : darken(@purple, 30%); } } } } } - - // this should likely be refactored into .navDropdownContainer - .save-menu { - .dropdown { z-index : 1000; } - .navItem i.fa-power-off { - color : red; - &.active { - color : rgb(0, 182, 52); - filter : drop-shadow(0 0 2px rgba(0, 182, 52, 0.765)); - } - } - } - - - - - +} + +// this should likely be refactored into .navDropdownContainer +.save-menu { + .dropdown { z-index : 1000; } + .navItem i.fa-power-off { + color : red; + &.active { + color : rgb(0, 182, 52); + filter : drop-shadow(0 0 2px rgba(0, 182, 52, 0.765)); + } + } } From 59e87697ff1029c6c843deddea7edcc285e4efea Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 1 Mar 2024 01:27:46 -0500 Subject: [PATCH 48/77] linting --- client/homebrew/navbar/navbar.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index ccbdf1f7a..4983aa696 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -1,4 +1,4 @@ -@import "naturalcrit/styles/colors.less"; +@import 'naturalcrit/styles/colors.less'; @navbarHeight : 28px; @@ -156,7 +156,7 @@ align-content : baseline; justify-content : flex-start; width : 440px; - max-height : ~"calc(100vh - 28px)"; + max-height : ~'calc(100vh - 28px)'; padding : 0 10px 5px; margin : 0 auto; background-color : #333333; @@ -266,7 +266,7 @@ position : relative; box-sizing : border-box; display : block; - max-height : ~"calc(100vh - 28px)"; // I don't think is correct syntax, but leaving it in for now... (Gazook89) + max-height : ~'calc(100vh - 28px)'; padding : 8px 5px 13px; overflow : hidden auto; color : white; From 3314471d731c8176cbb3c3e9d113555126f61805 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 03:47:01 +0000 Subject: [PATCH 49/77] Bump mongoose from 8.2.0 to 8.2.1 Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.2.0 to 8.2.1. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md) - [Commits](https://github.com/Automattic/mongoose/compare/8.2.0...8.2.1) --- updated-dependencies: - dependency-name: mongoose dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f39b3bd5..faf0deb76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", - "mongoose": "^8.2.0", + "mongoose": "^8.2.1", "nanoid": "3.3.4", "nconf": "^0.12.1", "react": "^18.2.0", @@ -10459,9 +10459,9 @@ } }, "node_modules/mongoose": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.2.0.tgz", - "integrity": "sha512-la93n6zCYRbPS+c5N9oTDAktvREy5OT9OCljp1Tah0y3+p8UPMTAoabWaLZMdzYruOtF9/9GRf6MasaZjiZP1A==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.2.1.tgz", + "integrity": "sha512-UgZZbXSJH0pdU936qj3FyVI+sBsMoGowFnL5R/RYrA50ayn6+ZYdVr8ehsRgNxRcMYwoNld5XzHIfkFRJTePEw==", "dependencies": { "bson": "^6.2.0", "kareem": "2.5.1", diff --git a/package.json b/package.json index b44d1cc4d..5ffc3c7ea 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", - "mongoose": "^8.2.0", + "mongoose": "^8.2.1", "nanoid": "3.3.4", "nconf": "^0.12.1", "react": "^18.2.0", From 1e1505c63f0b0aa8c99e32bb020a1402262d557c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 5 Mar 2024 08:27:56 +0100 Subject: [PATCH 50/77] towards a more traditional approach --- client/homebrew/navbar/newbrew.navitem.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index 6e63e7a8f..3a941a205 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -9,7 +9,7 @@ const STYLEKEY = 'homebrewery-new-style'; const METAKEY = 'homebrewery-new-meta'; const NewBrew = () => { - const inputRef = useRef(null); + const [brew, setBrew] = useState({ text: '', @@ -84,8 +84,8 @@ const NewBrew = () => { { inputRef.current.click(); }}> - + onClick={() => { document.getElementById('uploadTxt').click(); }}> + New From Local File From cf1617f2a386a3086a49b99602f770c63635a316 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:10:23 +0000 Subject: [PATCH 51/77] Bump eslint-plugin-react from 7.33.2 to 7.34.0 Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.2 to 7.34.0. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.33.2...v7.34.0) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 739 ++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 451 insertions(+), 290 deletions(-) diff --git a/package-lock.json b/package-lock.json index faf0deb76..f378aa8f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "devDependencies": { "eslint": "^8.57.0", "eslint-plugin-jest": "^27.9.0", - "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react": "^7.34.0", "jest": "^29.7.0", "jest-expect-message": "^1.1.3", "postcss-less": "^6.0.0", @@ -3371,13 +3371,16 @@ } }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3389,15 +3392,15 @@ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/array-includes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", - "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", "is-string": "^1.0.7" }, "engines": { @@ -3424,15 +3427,34 @@ "node": ">=0.10.0" } }, + "node_modules/array.prototype.findlast": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.4.tgz", + "integrity": "sha512-BMtLxpV+8BD+6ZPFIWmnUBpQoy+A+ujcg4rhp2iwCRJYA7PEh2MS4NL3lz8EiDlLrJPp2hg9qWihr5pd//jcGw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -3442,30 +3464,44 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz", - "integrity": "sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==", + "node_modules/array.prototype.toreversed": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", + "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.1.3" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz", + "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.1.0", + "es-shim-unscopables": "^1.0.2" } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", - "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -3585,10 +3621,13 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -4337,12 +4376,18 @@ "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==" }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5123,12 +5168,29 @@ "node": ">=0.10.0" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -5452,50 +5514,52 @@ } }, "node_modules/es-abstract": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", - "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", + "version": "1.22.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz", + "integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.1", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.1", - "get-symbol-description": "^1.0.0", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.1", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.0", - "safe-array-concat": "^1.0.0", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.0", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.5", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.10" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -5504,49 +5568,72 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-iterator-helpers": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.13.tgz", - "integrity": "sha512-LK3VGwzvaPWobO8xzXXGRUOGw8Dcjyfk62CsY/wfHN75CwsJPbuypOYJxK6g5RyEL8YDjIWcl6jgd8foO6mmrA==", + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz", + "integrity": "sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ==", "dev": true, "dependencies": { "asynciterator.prototype": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.21.3", - "es-set-tostringtag": "^2.0.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.4", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.0", + "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "iterator.prototype": "^1.1.0", - "safe-array-concat": "^1.0.0" + "internal-slot": "^1.0.7", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { @@ -5668,27 +5755,29 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.33.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", - "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", + "version": "7.34.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.0.tgz", + "integrity": "sha512-MeVXdReleBTdkz/bvcQMSnCXGi+c9kvy51IpinjnJgutl3YTHWsDdke7Z1ufZpGfDG8xduBDKyjtB9JH1eBKIQ==", "dev": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flatmap": "^1.3.1", - "array.prototype.tosorted": "^1.1.1", + "array-includes": "^3.1.7", + "array.prototype.findlast": "^1.2.4", + "array.prototype.flatmap": "^1.3.2", + "array.prototype.toreversed": "^1.1.2", + "array.prototype.tosorted": "^1.1.3", "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.12", + "es-iterator-helpers": "^1.0.17", "estraverse": "^5.3.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", - "object.entries": "^1.1.6", - "object.fromentries": "^2.0.6", - "object.hasown": "^1.1.2", - "object.values": "^1.1.6", + "object.entries": "^1.1.7", + "object.fromentries": "^2.0.7", + "object.hasown": "^1.1.3", + "object.values": "^1.1.7", "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.4", + "resolve": "^2.0.0-next.5", "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.8" + "string.prototype.matchall": "^4.0.10" }, "engines": { "node": ">=4" @@ -5710,12 +5799,12 @@ } }, "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", - "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -6518,20 +6607,23 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -6597,14 +6689,18 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6632,13 +6728,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -6846,7 +6943,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -6915,21 +7011,20 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -6949,12 +7044,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -7032,6 +7127,17 @@ "minimalistic-assert": "^1.0.1" } }, + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hexoid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", @@ -7363,13 +7469,13 @@ } }, "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -7407,14 +7513,16 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7498,11 +7606,11 @@ } }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7647,9 +7755,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "engines": { "node": ">= 0.4" @@ -7736,12 +7844,15 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7789,16 +7900,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -7994,16 +8101,16 @@ } }, "node_modules/iterator.prototype": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.0.tgz", - "integrity": "sha512-rjuhAk1AJ1fssphHD0IFV6TWL40CwRZ53FrztKx43yk2v6rguBYsY4Bj1VU4HmoMmKwZUlx7mfnhDf9cOp4YTw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", + "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", "dev": true, "dependencies": { - "define-properties": "^1.1.4", - "get-intrinsic": "^1.1.3", + "define-properties": "^1.2.1", + "get-intrinsic": "^1.2.1", "has-symbols": "^1.0.3", - "has-tostringtag": "^1.0.0", - "reflect.getprototypeof": "^1.0.3" + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" } }, "node_modules/jest": { @@ -11002,9 +11109,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -11030,13 +11137,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -11048,28 +11155,28 @@ } }, "node_modules/object.entries": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", - "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", + "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" } }, "node_modules/object.fromentries": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", - "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -11079,13 +11186,13 @@ } }, "node_modules/object.hasown": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz", - "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz", + "integrity": "sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==", "dev": true, "dependencies": { - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11103,14 +11210,14 @@ } }, "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -11482,6 +11589,15 @@ "node": ">=0.10.0" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", @@ -12043,15 +12159,16 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.3.tgz", - "integrity": "sha512-TTAOZpkJ2YLxl7mVHWrNo3iDMEkYlva/kgFcXndqMgbo/AZUmmavEkdXV+hXtE4P8xdyEKRzalaFqZVuwIk/Nw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz", + "integrity": "sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.0.0", + "get-intrinsic": "^1.2.3", "globalthis": "^1.0.3", "which-builtin-type": "^1.1.3" }, @@ -12127,14 +12244,15 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -12343,13 +12461,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", - "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -12394,15 +12512,18 @@ } }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -12496,6 +12617,37 @@ "node": ">= 0.8.0" } }, + "node_modules/set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -13149,18 +13301,19 @@ } }, "node_modules/string.prototype.matchall": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", - "integrity": "sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", + "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.4.3", + "internal-slot": "^1.0.5", + "regexp.prototype.flags": "^1.5.0", + "set-function-name": "^2.0.0", "side-channel": "^1.0.4" }, "funding": { @@ -13168,14 +13321,14 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -13185,28 +13338,28 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13950,29 +14103,30 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -13982,16 +14136,17 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -14001,14 +14156,20 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz", + "integrity": "sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -14856,16 +15017,16 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", - "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", + "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.5", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.1" }, "engines": { "node": ">= 0.4" diff --git a/package.json b/package.json index 5ffc3c7ea..91eb1c047 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "devDependencies": { "eslint": "^8.57.0", "eslint-plugin-jest": "^27.9.0", - "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react": "^7.34.0", "jest": "^29.7.0", "jest-expect-message": "^1.1.3", "postcss-less": "^6.0.0", From dbfc1e7d2890ad6240a1e60f4e390f913baea6ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:19:12 +0000 Subject: [PATCH 52/77] Bump react-router-dom from 6.22.1 to 6.22.2 Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.1 to 6.22.2. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.22.2/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 26 +++++++++++++------------- package.json | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index f378aa8f3..e48628d1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-frame-component": "^4.1.3", - "react-router-dom": "6.22.1", + "react-router-dom": "6.22.2", "sanitize-filename": "1.6.3", "superagent": "^8.1.2", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" @@ -2838,9 +2838,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.1.tgz", - "integrity": "sha512-zcU0gM3z+3iqj8UX45AmWY810l3oUmXM7uH4dt5xtzvMhRtYVhKGOmgOd1877dOPPepfCjUv57w+syamWIYe7w==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.2.tgz", + "integrity": "sha512-+Rnav+CaoTE5QJc4Jcwh5toUpnVLKYbpU6Ys0zqbakqbaLQHeglLVHPfxOiQqdNmUy5C2lXz5dwC6tQNX2JW2Q==", "engines": { "node": ">=14.0.0" } @@ -11995,11 +11995,11 @@ "dev": true }, "node_modules/react-router": { - "version": "6.22.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.1.tgz", - "integrity": "sha512-0pdoRGwLtemnJqn1K0XHUbnKiX0S4X8CgvVVmHGOWmofESj31msHo/1YiqcJWK7Wxfq2a4uvvtS01KAQyWK/CQ==", + "version": "6.22.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.2.tgz", + "integrity": "sha512-YD3Dzprzpcq+tBMHBS822tCjnWD3iIZbTeSXMY9LPSG541EfoBGyZ3bS25KEnaZjLcmQpw2AVLkFyfgXY8uvcw==", "dependencies": { - "@remix-run/router": "1.15.1" + "@remix-run/router": "1.15.2" }, "engines": { "node": ">=14.0.0" @@ -12009,12 +12009,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.22.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.1.tgz", - "integrity": "sha512-iwMyyyrbL7zkKY7MRjOVRy+TMnS/OPusaFVxM2P11x9dzSzGmLsebkCvYirGq0DWB9K9hOspHYYtDz33gE5Duw==", + "version": "6.22.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.2.tgz", + "integrity": "sha512-WgqxD2qySEIBPZ3w0sHH+PUAiamDeszls9tzqMPBDA1YYVucTBXLU7+gtRfcSnhe92A3glPnvSxK2dhNoAVOIQ==", "dependencies": { - "@remix-run/router": "1.15.1", - "react-router": "6.22.1" + "@remix-run/router": "1.15.2", + "react-router": "6.22.2" }, "engines": { "node": ">=14.0.0" diff --git a/package.json b/package.json index 91eb1c047..6873787e8 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-frame-component": "^4.1.3", - "react-router-dom": "6.22.1", + "react-router-dom": "6.22.2", "sanitize-filename": "1.6.3", "superagent": "^8.1.2", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" From 1e4a00ce56a1e72e9691656b2eabb63b35e9bc2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:23:13 +0000 Subject: [PATCH 53/77] Bump express from 4.18.2 to 4.18.3 Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.18.3. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/4.18.2...4.18.3) --- updated-dependencies: - dependency-name: express dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 47 +++++------------------------------------------ package.json | 2 +- 2 files changed, 6 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index e48628d1c..9313c67db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "create-react-class": "^15.7.0", "dedent-tabs": "^0.10.3", "expr-eval": "^2.0.2", - "express": "^4.18.2", + "express": "^4.18.3", "express-async-handler": "^1.2.0", "express-static-gzip": "2.1.7", "fs-extra": "11.2.0", @@ -6132,13 +6132,13 @@ "integrity": "sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg==" }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.18.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", + "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -6185,29 +6185,6 @@ "serve-static": "^1.14.1" } }, - "node_modules/express/node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, "node_modules/express/node_modules/cookie": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", @@ -6229,20 +6206,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/express/node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", diff --git a/package.json b/package.json index 6873787e8..81a15d996 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "create-react-class": "^15.7.0", "dedent-tabs": "^0.10.3", "expr-eval": "^2.0.2", - "express": "^4.18.2", + "express": "^4.18.3", "express-async-handler": "^1.2.0", "express-static-gzip": "2.1.7", "fs-extra": "11.2.0", From e472465ce7d637b906b576aa19edee591c444d73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:36:12 +0000 Subject: [PATCH 54/77] Bump @babel/core from 7.23.9 to 7.24.0 Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.9 to 7.24.0. - [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.24.0/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 62 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9313c67db..4625107a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "@babel/core": "^7.23.9", + "@babel/core": "^7.24.0", "@babel/plugin-transform-runtime": "^7.23.9", "@babel/preset-env": "^7.23.9", "@babel/preset-react": "^7.23.3", @@ -107,20 +107,20 @@ } }, "node_modules/@babel/core": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz", - "integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", + "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.23.5", "@babel/generator": "^7.23.6", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.9", - "@babel/parser": "^7.23.9", - "@babel/template": "^7.23.9", - "@babel/traverse": "^7.23.9", - "@babel/types": "^7.23.9", + "@babel/helpers": "^7.24.0", + "@babel/parser": "^7.24.0", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -450,13 +450,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.9.tgz", - "integrity": "sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", + "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", "dependencies": { - "@babel/template": "^7.23.9", - "@babel/traverse": "^7.23.9", - "@babel/types": "^7.23.9" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -476,9 +476,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", - "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", + "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1746,22 +1746,22 @@ } }, "node_modules/@babel/template": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz", - "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dependencies": { "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.23.9", - "@babel/types": "^7.23.9" + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.9.tgz", - "integrity": "sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", + "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", "dependencies": { "@babel/code-frame": "^7.23.5", "@babel/generator": "^7.23.6", @@ -1769,8 +1769,8 @@ "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.9", - "@babel/types": "^7.23.9", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1779,9 +1779,9 @@ } }, "node_modules/@babel/types": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", - "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dependencies": { "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", diff --git a/package.json b/package.json index 81a15d996..2c2628c86 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ ] }, "dependencies": { - "@babel/core": "^7.23.9", + "@babel/core": "^7.24.0", "@babel/plugin-transform-runtime": "^7.23.9", "@babel/preset-env": "^7.23.9", "@babel/preset-react": "^7.23.3", From cfdc3e68707f8e5c9e44ce482264b445888c5746 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:40:24 +0000 Subject: [PATCH 55/77] Bump @babel/preset-env from 7.23.9 to 7.24.0 Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.9 to 7.24.0. - [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.24.0/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4625107a8..b0bda2b8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "dependencies": { "@babel/core": "^7.24.0", "@babel/plugin-transform-runtime": "^7.23.9", - "@babel/preset-env": "^7.23.9", + "@babel/preset-env": "^7.24.0", "@babel/preset-react": "^7.23.3", "@googleapis/drive": "^8.7.0", "body-parser": "^1.20.2", @@ -340,9 +340,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "engines": { "node": ">=6.9.0" } @@ -1242,13 +1242,13 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz", - "integrity": "sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.0.tgz", + "integrity": "sha512-y/yKMm7buHpFFXfxVFS4Vk1ToRJDilIa6fKRioB9Vjichv58TDGXTvqV0dN7plobAmTW5eSEGXDngE+Mm+uO+w==", "dependencies": { - "@babel/compat-data": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/compat-data": "^7.23.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-transform-parameters": "^7.23.3" }, @@ -1605,13 +1605,13 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.9.tgz", - "integrity": "sha512-3kBGTNBBk9DQiPoXYS0g0BYlwTQYUTifqgKTjxUwEUkduRT2QOa0FPGBJ+NROQhGyYO5BuTJwGvBnqKDykac6A==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.0.tgz", + "integrity": "sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA==", "dependencies": { "@babel/compat-data": "^7.23.5", "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-validator-option": "^7.23.5", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3", @@ -1664,7 +1664,7 @@ "@babel/plugin-transform-new-target": "^7.23.3", "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4", "@babel/plugin-transform-numeric-separator": "^7.23.4", - "@babel/plugin-transform-object-rest-spread": "^7.23.4", + "@babel/plugin-transform-object-rest-spread": "^7.24.0", "@babel/plugin-transform-object-super": "^7.23.3", "@babel/plugin-transform-optional-catch-binding": "^7.23.4", "@babel/plugin-transform-optional-chaining": "^7.23.4", diff --git a/package.json b/package.json index 2c2628c86..75b36082b 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "dependencies": { "@babel/core": "^7.24.0", "@babel/plugin-transform-runtime": "^7.23.9", - "@babel/preset-env": "^7.23.9", + "@babel/preset-env": "^7.24.0", "@babel/preset-react": "^7.23.3", "@googleapis/drive": "^8.7.0", "body-parser": "^1.20.2", From b50353c8c4f3860873f1c9d68ed23b6e774b3c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 14:02:09 +0100 Subject: [PATCH 56/77] rename nav buttons per req --- client/homebrew/navbar/newbrew.navitem.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index 3a941a205..642e341e2 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -74,19 +74,21 @@ const NewBrew = () => { new - new + from blank { document.getElementById('uploadTxt').click(); }}> - New From Local File + from file ); From 25945fc0dfae7cdd83104cdf7f12d77bb314b010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 14:06:57 +0100 Subject: [PATCH 57/77] getting rid of state as per req --- client/homebrew/navbar/newbrew.navitem.jsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index 642e341e2..d393501cb 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -10,11 +10,7 @@ const METAKEY = 'homebrewery-new-meta'; const NewBrew = () => { - - const [brew, setBrew] = useState({ - text: '', - style: '' - }); + const splitTextStyleAndMetadata = (brewContent) => { let updatedBrew = { ...brewContent }; @@ -50,8 +46,6 @@ const NewBrew = () => { }; if(fileContent.startsWith('```metadata')) { const updatedBrew = splitTextStyleAndMetadata(newBrew); - console.log(updatedBrew); - setBrew(updatedBrew); localStorage.setItem(BREWKEY, updatedBrew.text); localStorage.setItem(STYLEKEY, updatedBrew.style); localStorage.setItem(METAKEY, JSON.stringify(_.pick(updatedBrew, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang']))); From 99daaf55374769e9d7789b20411e89c83bdb6a14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 16:05:23 +0000 Subject: [PATCH 58/77] Bump @babel/plugin-transform-runtime from 7.23.9 to 7.24.0 Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.23.9 to 7.24.0. - [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.24.0/packages/babel-plugin-transform-runtime) --- updated-dependencies: - dependency-name: "@babel/plugin-transform-runtime" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b0bda2b8d..4ab132c11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "license": "MIT", "dependencies": { "@babel/core": "^7.24.0", - "@babel/plugin-transform-runtime": "^7.23.9", + "@babel/plugin-transform-runtime": "^7.24.0", "@babel/preset-env": "^7.24.0", "@babel/preset-react": "^7.23.3", "@googleapis/drive": "^8.7.0", @@ -1456,12 +1456,12 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.9.tgz", - "integrity": "sha512-A7clW3a0aSjm3ONU9o2HAILSegJCYlEZmOhmBRReVtIpY/Z/p7yIZ+wR41Z+UipwdGuqwtID/V/dOdZXjwi9gQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.24.0.tgz", + "integrity": "sha512-zc0GA5IitLKJrSfXlXmp8KDqLrnGECK7YRfQBmEKg1NmBOQ7e+KuclBEKJgzifQeUYLdNiAw4B4bjyvzWVLiSA==", "dependencies": { "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "babel-plugin-polyfill-corejs2": "^0.4.8", "babel-plugin-polyfill-corejs3": "^0.9.0", "babel-plugin-polyfill-regenerator": "^0.5.5", diff --git a/package.json b/package.json index 75b36082b..9b9b17ca0 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ }, "dependencies": { "@babel/core": "^7.24.0", - "@babel/plugin-transform-runtime": "^7.23.9", + "@babel/plugin-transform-runtime": "^7.24.0", "@babel/preset-env": "^7.24.0", "@babel/preset-react": "^7.23.3", "@googleapis/drive": "^8.7.0", From 6eecd9cee40c08bdaf32de787114ecb237e7ecf6 Mon Sep 17 00:00:00 2001 From: Rodrigo Kuerten Date: Wed, 6 Mar 2024 13:46:13 -0300 Subject: [PATCH 59/77] Updated Table of Contents snippet --- themes/V3/5ePHB/snippets/tableOfContents.gen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/V3/5ePHB/snippets/tableOfContents.gen.js b/themes/V3/5ePHB/snippets/tableOfContents.gen.js index 97d82ed40..03f90d5fa 100644 --- a/themes/V3/5ePHB/snippets/tableOfContents.gen.js +++ b/themes/V3/5ePHB/snippets/tableOfContents.gen.js @@ -78,7 +78,7 @@ module.exports = function(props){ return dedent` {{toc,wide - # Table Of Contents + # Contents ${markdown} }} From f93af38fa6c03590a6d3694d9840de468a89fe68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 18:09:26 +0100 Subject: [PATCH 60/77] split-style-and-metadata moved to helpers.js --- client/homebrew/navbar/newbrew.navitem.jsx | 45 +++++----------------- server/app.js | 17 +------- shared/helpers.js | 22 +++++++++++ 3 files changed, 33 insertions(+), 51 deletions(-) create mode 100644 shared/helpers.js diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index d393501cb..7e5c63101 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -1,39 +1,13 @@ const React = require('react'); -const { useState, useRef } = React; const _ = require('lodash'); const Nav = require('naturalcrit/nav/nav.jsx'); -const yaml = require('js-yaml'); +const { splitTextStyleAndMetadata } = require('../../../shared/helpers.js'); // Importing the function from helpers.js const BREWKEY = 'homebrewery-new'; const STYLEKEY = 'homebrewery-new-style'; const METAKEY = 'homebrewery-new-meta'; -const NewBrew = () => { - - - - const splitTextStyleAndMetadata = (brewContent) => { - let updatedBrew = { ...brewContent }; - updatedBrew.text = updatedBrew.text.replaceAll('\r\n', '\n'); - if (updatedBrew.text.startsWith('```metadata')) { - const index = updatedBrew.text.indexOf('```\n\n'); - const metadataSection = updatedBrew.text.slice(12, index - 1); - const metadata = yaml.load(metadataSection); - updatedBrew = { - ...updatedBrew, - ..._.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang']) - }; - updatedBrew.text = updatedBrew.text.slice(index + 5); - } - if (updatedBrew.text.startsWith('```css')) { - const index = updatedBrew.text.indexOf('```\n\n'); - updatedBrew.style = updatedBrew.text.slice(7, index - 1); - updatedBrew.text = updatedBrew.text.slice(index + 5); - } - return updatedBrew; - }; - - +const NewBrew = () => { const handleFileChange = (e) => { const file = e.target.files[0]; if (file) { @@ -44,14 +18,13 @@ const NewBrew = () => { text: fileContent, style: '' }; - if(fileContent.startsWith('```metadata')) { - const updatedBrew = splitTextStyleAndMetadata(newBrew); - localStorage.setItem(BREWKEY, updatedBrew.text); - localStorage.setItem(STYLEKEY, updatedBrew.style); - localStorage.setItem(METAKEY, JSON.stringify(_.pick(updatedBrew, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang']))); - - window.location.href = '/new'; - } else { + if(fileContent.startsWith('```metadata')) { + splitTextStyleAndMetadata(newBrew); // Modify newBrew directly + localStorage.setItem(BREWKEY, newBrew.text); + localStorage.setItem(STYLEKEY, newBrew.style); + localStorage.setItem(METAKEY, JSON.stringify(_.pick(newBrew, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang']))); + window.location.href = '/new'; + } else { alert('This file is invalid, please, enter a valid file'); } }; diff --git a/server/app.js b/server/app.js index fc5d4a035..4c72b4924 100644 --- a/server/app.js +++ b/server/app.js @@ -17,21 +17,8 @@ const asyncHandler = require('express-async-handler'); const { DEFAULT_BREW } = require('./brewDefaults.js'); -const splitTextStyleAndMetadata = (brew)=>{ - brew.text = brew.text.replaceAll('\r\n', '\n'); - if(brew.text.startsWith('```metadata')) { - const index = brew.text.indexOf('```\n\n'); - const metadataSection = brew.text.slice(12, index - 1); - const metadata = yaml.load(metadataSection); - Object.assign(brew, _.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang'])); - brew.text = brew.text.slice(index + 5); - } - if(brew.text.startsWith('```css')) { - const index = brew.text.indexOf('```\n\n'); - brew.style = brew.text.slice(7, index - 1); - brew.text = brew.text.slice(index + 5); - } -}; +const { splitTextStyleAndMetadata } = require('../shared/helpers.js'); + const sanitizeBrew = (brew, accessType)=>{ brew._id = undefined; diff --git a/shared/helpers.js b/shared/helpers.js new file mode 100644 index 000000000..5abb93fea --- /dev/null +++ b/shared/helpers.js @@ -0,0 +1,22 @@ +const _ = require('lodash'); +const yaml = require('js-yaml'); + +const splitTextStyleAndMetadata = (brew) => { + brew.text = brew.text.replaceAll('\r\n', '\n'); + if (brew.text.startsWith('```metadata')) { + const index = brew.text.indexOf('```\n\n'); + const metadataSection = brew.text.slice(12, index - 1); + const metadata = yaml.load(metadataSection); + Object.assign(brew, _.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang'])); + brew.text = brew.text.slice(index + 5); + } + if (brew.text.startsWith('```css')) { + const index = brew.text.indexOf('```\n\n'); + brew.style = brew.text.slice(7, index - 1); + brew.text = brew.text.slice(index + 5); + } +}; + +module.exports = { + splitTextStyleAndMetadata +}; From e494899f8b973bd191acfc6d48e42e6033e15d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 18:12:21 +0100 Subject: [PATCH 61/77] icons --- client/homebrew/navbar/newbrew.navitem.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index 7e5c63101..319ef3392 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -37,7 +37,7 @@ const NewBrew = () => { + icon='fa-solid fa-plus-square'> new { href='/new' newTab={true} color='purple' - icon='fas fa-plus-square'> + icon='fa-solid fa-file'> from blank { document.getElementById('uploadTxt').click(); }}> from file From 83d2a604e18b275ce8ac5159d6fec482d659b6ee Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Wed, 6 Mar 2024 12:28:43 -0500 Subject: [PATCH 62/77] Clean up some spacing --- themes/V3/Blank/style.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index f8289bbee..3e5b2290f 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -459,10 +459,10 @@ body { counter-reset : page-numbers; } .homebreweryIcon.red { background-color : red; } .homebreweryIcon.gold { background-image : linear-gradient(to top left, brown 22.5%, gold 40%, white 60%, gold 67.5%, brown 82.5%); } } + //***************************** //* Page Number //*****************************/ - .page { .pageNumber { position : absolute; From 3482330629ca4fa016aaefa2676d2d4afdfb658d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 19:05:58 +0100 Subject: [PATCH 63/77] adjust to work with overflow --- client/homebrew/navbar/navbar.less | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 4983aa696..d41f39f7f 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -242,16 +242,17 @@ .navDropdown { position : absolute; top : 28px; - left : 0px; + right : 0px; z-index : 10000; - width : 100%; + width : fit-content; max-height : calc(100vh - 28px); overflow : hidden auto; .navItem { position : relative; - display : block; + display : flex; + justify-content : space-between; + align-items : center; width : 100%; - padding : 8px 5px; border : 1px solid #888888; border-bottom : 0; animation-name : glideDropDown; From c7a2e849272eb86e8fd392cc0e7a9735e5554817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 19:13:35 +0100 Subject: [PATCH 64/77] no wrapping text --- client/homebrew/navbar/navbar.less | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index d41f39f7f..601310a71 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -240,19 +240,23 @@ .navDropdownContainer { position : relative; .navDropdown { - position : absolute; - top : 28px; - right : 0px; - z-index : 10000; - width : fit-content; - max-height : calc(100vh - 28px); - overflow : hidden auto; + position: absolute; + top: 28px; + right: 0px; + z-index: 10000; + width: fit-content; + max-height: calc(100vh - 28px); + overflow: hidden auto; + display: flex; + flex-direction: column; + align-items: flex-end; .navItem { position : relative; display : flex; justify-content : space-between; align-items : center; width : 100%; + text-wrap : nowrap; border : 1px solid #888888; border-bottom : 0; animation-name : glideDropDown; From 7483b4afc6fa5c2f0dc276e17f0e793891e0aa37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 19:16:48 +0100 Subject: [PATCH 65/77] quickfix --- client/homebrew/navbar/navbar.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 601310a71..9c153e381 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -244,7 +244,8 @@ top: 28px; right: 0px; z-index: 10000; - width: fit-content; + width: max-content; + min-width:100%; max-height: calc(100vh - 28px); overflow: hidden auto; display: flex; @@ -256,7 +257,6 @@ justify-content : space-between; align-items : center; width : 100%; - text-wrap : nowrap; border : 1px solid #888888; border-bottom : 0; animation-name : glideDropDown; From b2b276c3a3ad799d014f41b8ae658affd8cd7777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 19:21:11 +0100 Subject: [PATCH 66/77] classname to new dropdown --- client/homebrew/navbar/newbrew.navitem.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index 319ef3392..4a1c3424a 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -33,7 +33,7 @@ const NewBrew = () => { }; return ( - + Date: Wed, 6 Mar 2024 19:43:44 +0100 Subject: [PATCH 67/77] dropdown classes fix --- client/homebrew/navbar/account.navitem.jsx | 2 +- client/homebrew/navbar/help.navitem.jsx | 2 +- client/homebrew/navbar/newbrew.navitem.jsx | 2 +- client/homebrew/navbar/recent.navitem.jsx | 2 +- client/homebrew/pages/editPage/editPage.jsx | 4 ++-- client/homebrew/pages/sharePage/sharePage.jsx | 2 +- shared/naturalcrit/nav/nav.jsx | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/homebrew/navbar/account.navitem.jsx b/client/homebrew/navbar/account.navitem.jsx index b3b6d06b0..6b412c368 100644 --- a/client/homebrew/navbar/account.navitem.jsx +++ b/client/homebrew/navbar/account.navitem.jsx @@ -61,7 +61,7 @@ const Account = createClass({ render : function(){ // Logged in if(global.account){ - return + return + return need help? diff --git a/client/homebrew/navbar/newbrew.navitem.jsx b/client/homebrew/navbar/newbrew.navitem.jsx index 4a1c3424a..319ef3392 100644 --- a/client/homebrew/navbar/newbrew.navitem.jsx +++ b/client/homebrew/navbar/newbrew.navitem.jsx @@ -33,7 +33,7 @@ const NewBrew = () => { }; return ( - + + return {this.props.text} diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx index 3329d1ba6..5ed13012a 100644 --- a/client/homebrew/pages/editPage/editPage.jsx +++ b/client/homebrew/pages/editPage/editPage.jsx @@ -355,14 +355,14 @@ const EditPage = createClass({ {this.renderGoogleDriveIcon()} {this.state.error ? : - + {this.renderSaveButton()} {this.renderAutoSaveButton()} } - + share diff --git a/client/homebrew/pages/sharePage/sharePage.jsx b/client/homebrew/pages/sharePage/sharePage.jsx index c8fad41c4..981ad0126 100644 --- a/client/homebrew/pages/sharePage/sharePage.jsx +++ b/client/homebrew/pages/sharePage/sharePage.jsx @@ -60,7 +60,7 @@ const SharePage = createClass({ {this.props.brew.shareId && <> - + source diff --git a/shared/naturalcrit/nav/nav.jsx b/shared/naturalcrit/nav/nav.jsx index 04b7037dd..fb77780c0 100644 --- a/shared/naturalcrit/nav/nav.jsx +++ b/shared/naturalcrit/nav/nav.jsx @@ -104,7 +104,7 @@ const Nav = { }); return ( -
handleDropdown(true) : undefined } onMouseLeave = { props.trigger.includes('hover') ? ()=>handleDropdown(false) : undefined } From 58422569c9d0a33d99f6d62c48cb06f37f0483a1 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Wed, 6 Mar 2024 15:32:38 -0500 Subject: [PATCH 68/77] Extra classes were needed for .recent and .save .save has special styling for the "on" button. .recent has special styling for the dividers between Edited and Viewed --- client/homebrew/navbar/navbar.less | 3 ++- client/homebrew/navbar/recent.navitem.jsx | 2 +- client/homebrew/pages/editPage/editPage.jsx | 2 +- shared/naturalcrit/nav/nav.jsx | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 9c153e381..d0f2f77e8 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -271,7 +271,8 @@ position : relative; box-sizing : border-box; display : block; - max-height : ~'calc(100vh - 28px)'; + max-width : 15em; + max-height : ~'calc(100vh - 28px)'; padding : 8px 5px 13px; overflow : hidden auto; color : white; diff --git a/client/homebrew/navbar/recent.navitem.jsx b/client/homebrew/navbar/recent.navitem.jsx index d57a636f9..431bdd8df 100644 --- a/client/homebrew/navbar/recent.navitem.jsx +++ b/client/homebrew/navbar/recent.navitem.jsx @@ -165,7 +165,7 @@ const RecentItems = createClass({ }, render : function(){ - return + return {this.props.text} diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx index 5ed13012a..d5af310b5 100644 --- a/client/homebrew/pages/editPage/editPage.jsx +++ b/client/homebrew/pages/editPage/editPage.jsx @@ -355,7 +355,7 @@ const EditPage = createClass({ {this.renderGoogleDriveIcon()} {this.state.error ? : - + {this.renderSaveButton()} {this.renderAutoSaveButton()} diff --git a/shared/naturalcrit/nav/nav.jsx b/shared/naturalcrit/nav/nav.jsx index fb77780c0..beb3d9cc4 100644 --- a/shared/naturalcrit/nav/nav.jsx +++ b/shared/naturalcrit/nav/nav.jsx @@ -104,7 +104,7 @@ const Nav = { }); return ( -
handleDropdown(true) : undefined } onMouseLeave = { props.trigger.includes('hover') ? ()=>handleDropdown(false) : undefined } From 9f95947d160cbc63efb246a7dd3dc053fd925349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 22:34:44 +0100 Subject: [PATCH 69/77] initial commit --- themes/V3/5ePHB/style.less | 2 -- themes/V3/Blank/style.less | 5 +++-- themes/fonts/5e/fonts.less | 2 -- themes/fonts/{5e => icon fonts}/dicefont.less | 0 themes/fonts/{5e => icon fonts}/dicefont.woff | Bin themes/fonts/{5e => icon fonts}/dicefont.woff2 | Bin themes/fonts/{5e => icon fonts}/dicefont_license.md | 0 7 files changed, 3 insertions(+), 6 deletions(-) rename themes/fonts/{5e => icon fonts}/dicefont.less (100%) rename themes/fonts/{5e => icon fonts}/dicefont.woff (100%) rename themes/fonts/{5e => icon fonts}/dicefont.woff2 (100%) rename themes/fonts/{5e => icon fonts}/dicefont_license.md (100%) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index ed3e8604c..a24022434 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -1,5 +1,3 @@ -@import (less) './themes/fonts/5e/fonts.less'; -@import (less) './themes/assets/assets.less'; @import (less) './themes/fonts/icon fonts/font-icons.less'; :root { diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index 3e5b2290f..bc5c84e6d 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -1,5 +1,6 @@ -@import (less) './themes/fonts/5e/fonts.less'; -@import (less) './themes/assets/assets.less'; +@import (less) '../../fonts/5e/fonts.less'; +@import (less) '../../assets/assets.less'; +@import (less) '../../fonts/icon\ fonts/dicefont.less'; :root { //Colors diff --git a/themes/fonts/5e/fonts.less b/themes/fonts/5e/fonts.less index b59fe1671..8f089b51c 100644 --- a/themes/fonts/5e/fonts.less +++ b/themes/fonts/5e/fonts.less @@ -1,5 +1,3 @@ -@import url('./dicefont.less'); - /* Main Font, serif */ @font-face { font-family: BookInsanityRemake; diff --git a/themes/fonts/5e/dicefont.less b/themes/fonts/icon fonts/dicefont.less similarity index 100% rename from themes/fonts/5e/dicefont.less rename to themes/fonts/icon fonts/dicefont.less diff --git a/themes/fonts/5e/dicefont.woff b/themes/fonts/icon fonts/dicefont.woff similarity index 100% rename from themes/fonts/5e/dicefont.woff rename to themes/fonts/icon fonts/dicefont.woff diff --git a/themes/fonts/5e/dicefont.woff2 b/themes/fonts/icon fonts/dicefont.woff2 similarity index 100% rename from themes/fonts/5e/dicefont.woff2 rename to themes/fonts/icon fonts/dicefont.woff2 diff --git a/themes/fonts/5e/dicefont_license.md b/themes/fonts/icon fonts/dicefont_license.md similarity index 100% rename from themes/fonts/5e/dicefont_license.md rename to themes/fonts/icon fonts/dicefont_license.md From f903e97562ebe46a1647e49698a51be2decafb57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 23:03:44 +0100 Subject: [PATCH 70/77] back to original links --- themes/V3/Blank/style.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index bc5c84e6d..1d8ca6ee4 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -1,6 +1,6 @@ -@import (less) '../../fonts/5e/fonts.less'; -@import (less) '../../assets/assets.less'; -@import (less) '../../fonts/icon\ fonts/dicefont.less'; +@import (less) './themes/fonts/5e/fonts.less'; +@import (less) './themes/assets/assets.less'; +@import (less) './themes/fonts/icon fonts/dicefont.less'; :root { //Colors From 4cc2acc9e6f7563e315206ee56b18a70d4f637ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 6 Mar 2024 23:12:12 +0100 Subject: [PATCH 71/77] quickfix --- themes/V3/5ePHB/style.less | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index a24022434..758489961 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -1,3 +1,4 @@ +@import (less) './themes/assets/assets.less'; @import (less) './themes/fonts/icon fonts/font-icons.less'; :root { From 08a3d7367b6a039f49b3c06cb13ec826533cbe60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 03:15:21 +0000 Subject: [PATCH 72/77] Bump react-router-dom from 6.22.2 to 6.22.3 Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.2 to 6.22.3. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.22.3/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 26 +++++++++++++------------- package.json | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4ab132c11..29ea015b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-frame-component": "^4.1.3", - "react-router-dom": "6.22.2", + "react-router-dom": "6.22.3", "sanitize-filename": "1.6.3", "superagent": "^8.1.2", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" @@ -2838,9 +2838,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.2.tgz", - "integrity": "sha512-+Rnav+CaoTE5QJc4Jcwh5toUpnVLKYbpU6Ys0zqbakqbaLQHeglLVHPfxOiQqdNmUy5C2lXz5dwC6tQNX2JW2Q==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz", + "integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==", "engines": { "node": ">=14.0.0" } @@ -11958,11 +11958,11 @@ "dev": true }, "node_modules/react-router": { - "version": "6.22.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.2.tgz", - "integrity": "sha512-YD3Dzprzpcq+tBMHBS822tCjnWD3iIZbTeSXMY9LPSG541EfoBGyZ3bS25KEnaZjLcmQpw2AVLkFyfgXY8uvcw==", + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.3.tgz", + "integrity": "sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==", "dependencies": { - "@remix-run/router": "1.15.2" + "@remix-run/router": "1.15.3" }, "engines": { "node": ">=14.0.0" @@ -11972,12 +11972,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.22.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.2.tgz", - "integrity": "sha512-WgqxD2qySEIBPZ3w0sHH+PUAiamDeszls9tzqMPBDA1YYVucTBXLU7+gtRfcSnhe92A3glPnvSxK2dhNoAVOIQ==", + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.3.tgz", + "integrity": "sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==", "dependencies": { - "@remix-run/router": "1.15.2", - "react-router": "6.22.2" + "@remix-run/router": "1.15.3", + "react-router": "6.22.3" }, "engines": { "node": ">=14.0.0" diff --git a/package.json b/package.json index 9b9b17ca0..e0c65e306 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-frame-component": "^4.1.3", - "react-router-dom": "6.22.2", + "react-router-dom": "6.22.3", "sanitize-filename": "1.6.3", "superagent": "^8.1.2", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" From f6c0b0d6fc0a3351c394dd1a175e3a3828b43d01 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 7 Mar 2024 23:46:10 -0500 Subject: [PATCH 73/77] Simplification of CSS --- package.json | 2 +- shared/naturalcrit/markdown.js | 8 ++-- tests/markdown/marked-extensions.test.js | 15 +++----- themes/V3/5ePHB/style.less | 48 +----------------------- 4 files changed, 12 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index 972d82138..8cee4082a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "test:mustache-syntax:inline": "jest '.*(mustache-syntax).*' -t '^Inline:.*' --verbose --noStackTrace", "test:mustache-syntax:block": "jest '.*(mustache-syntax).*' -t '^Block:.*' --verbose --noStackTrace", "test:mustache-syntax:injection": "jest '.*(mustache-syntax).*' -t '^Injection:.*' --verbose --noStackTrace", - "test:marked-extensions": "jest '.*(marked-extensions).*' --verbose --noStackTrace", + "test:marked-extensions": "jest tests/markdown/marked-extensions.test.js --verbose --noStackTrace", "test:route": "jest tests/routes/static-pages.test.js --verbose", "phb": "node scripts/phb.js", "prod": "set NODE_ENV=production && npm run build", diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 227b9ad35..defd4100e 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -401,12 +401,12 @@ const definitionLists = { } }, renderer(token) { - let returnVal = ``; + let returnVal = `
`; token.definitions.forEach((def)=>{ let dds = def.ddo.map((s)=>{ - return `
${this.parser.parseInline(s).trim()}
`; - }).join('\n'); - returnVal += `
${this.parser.parseInline(def.dt)}
${dds.indexOf('\n') > -1 ? '\n' : ''}${dds}\n`; + return `${token.inlineDefinitions ? '' : '\n'}
${this.parser.parseInline(s).trim()}
`; + }).join(''); + returnVal += `
${this.parser.parseInline(def.dt)}
${dds}\n`; }); returnVal = returnVal.trim(); return `${returnVal}
`; diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js index 5a8603ab8..6d3be056f 100644 --- a/tests/markdown/marked-extensions.test.js +++ b/tests/markdown/marked-extensions.test.js @@ -2,23 +2,23 @@ const Markdown = require('naturalcrit/markdown.js'); -describe('Dictionary Terms', ()=>{ +describe('Definition Terms', ()=>{ test('Single Definition', function() { const source = 'My term :: My First Definition\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); }); test('Multiple Definition Terms, single line, single definition', function() { const source = 'Term 1::Definition of Term 1\nTerm 2::Definition of Term 2\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
\n
Term 2
Definition of Term 2
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
\n
Term 2
Definition of Term 2
'); }); test('PANdoc style list - Single Term, Single Definition', function() { const source = 'Term 1\n::Definition 1\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition 1
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
'); }); test('PANdoc style list - Single Term, Plural Definitions', function() { @@ -30,7 +30,7 @@ describe('Dictionary Terms', ()=>{ test('PANdoc style list - Multiple Term, Single Definitions', function() { const source = 'Term 1\n::Definition 1\nTerm 2\n::Definition 1\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition 1
\n
Term 2
Definition 1
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Term 2
\n
Definition 1
'); }); test('PANdoc style list - Multiple Term, Plural Definitions', function() { @@ -42,15 +42,12 @@ describe('Dictionary Terms', ()=>{ test('PANdoc style list - Single Term, Single multiple line definition', function() { const source = 'Term 1\n::Definition 1\nand more and\nmore and more\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition 1 and more and more and more
'); - + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more and more
'); }); test('PANdoc style list - Multiple Term, Single multiple line definition', function() { const source = 'Term 1\n::Definition 1\nand more and\nmore and more\n\n::Definition 2\n\n::Definition 3\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more and more
\n
Definition 2
\n
Definition 3
'); - }); - }); diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 50cb5c977..ed3e8604c 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -319,30 +319,6 @@ padding : 0px; margin-bottom : 0.325cm; - dl { - padding: 0px; - } - - dt::before { - display: block; - } - - dt:nth-child(1n+2)::before { - content: ""; - display: block; - } - - dt { - display: inline; - margin-right : 5px; - margin-left : 0em; - padding: 0px; - } - - dd { - display: inline; - } - //Headers h2 { margin : 0; @@ -886,36 +862,14 @@ dl { line-height : 1.25em; & + * { margin-top : 0.17cm; } - white-space: normal !important; - } - - dd { - display: block - } - p + dl { margin-top : 0.17cm; } - - dt { - display : inline; + dt { margin-right : 5px; margin-left : -1em; } } -// ***************************** -// * Inline Definition Lists -// *****************************/ -.inlineDL dd { - display: inline !important - } - - .inlineDL dd:after{ - display: block; - content: ''; - } - - // ***************************** // * WIDE // *****************************/ From e36a638ae588dcf04eee6676023e2984949f788d Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sat, 9 Mar 2024 16:41:05 -0500 Subject: [PATCH 74/77] Add more tests --- tests/markdown/marked-extensions.test.js | 34 +++++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js index 6d3be056f..b4e5dee5c 100644 --- a/tests/markdown/marked-extensions.test.js +++ b/tests/markdown/marked-extensions.test.js @@ -2,52 +2,60 @@ const Markdown = require('naturalcrit/markdown.js'); -describe('Definition Terms', ()=>{ - test('Single Definition', function() { +describe('Inline Definition Lists', ()=>{ + test('Single Definition Term', function() { const source = 'My term :: My First Definition\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); }); - test('Multiple Definition Terms, single line, single definition', function() { + test('Multiple Definition Terms', function() { const source = 'Term 1::Definition of Term 1\nTerm 2::Definition of Term 2\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
\n
Term 2
Definition of Term 2
'); }); +}); - test('PANdoc style list - Single Term, Single Definition', function() { +describe('Multiline Definition Lists', ()=>{ + test('Single Term, Single Definition', function() { const source = 'Term 1\n::Definition 1\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
'); }); - test('PANdoc style list - Single Term, Plural Definitions', function() { + test('Single Term, Plural Definitions', function() { const source = 'Term 1\n::Definition 1\n::Definition 2\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Definition 2
'); }); - test('PANdoc style list - Multiple Term, Single Definitions', function() { - const source = 'Term 1\n::Definition 1\nTerm 2\n::Definition 1\n\n'; + test('Multiple Term, Single Definitions', function() { + const source = 'Term 1\n::Definition 1\n\nTerm 2\n::Definition 1\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Term 2
\n
Definition 1
'); }); - test('PANdoc style list - Multiple Term, Plural Definitions', function() { - const source = 'Term 1\n::Definition 1\n::Definition 2\nTerm 2\n::Definition 1\n::Definition 2\n\n'; + test('Multiple Term, Plural Definitions', function() { + const source = 'Term 1\n::Definition 1\n::Definition 2\n\nTerm 2\n::Definition 1\n::Definition 2\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Definition 2
\n
Term 2
\n
Definition 1
\n
Definition 2
'); }); - test('PANdoc style list - Single Term, Single multiple line definition', function() { + test('Single Term, Single multi-line definition', function() { const source = 'Term 1\n::Definition 1\nand more and\nmore and more\n\n'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more and more
'); }); - test('PANdoc style list - Multiple Term, Single multiple line definition', function() { - const source = 'Term 1\n::Definition 1\nand more and\nmore and more\n\n::Definition 2\n\n::Definition 3\n\n'; + test('Single Term, Plural multi-line definitions', function() { + const source = 'Term 1\n::Definition 1\nand more and more\n::Definition 2\n\n::Definition 3\n\n'; const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more and more
\n
Definition 2
\n
Definition 3
'); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more
\n
Definition 2
\n
Definition 3
'); + }); + + test('Multiple Term, Single multi-line definition', function() { + const source = 'Term 1\n::Definition 1\nand more and more\n\nTerm 2\n::Definition 1\n\n::Definition 2\n\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more
\n
Term 2
\n
Definition 1
\n
Definition 2
'); }); }); From f3b17f46154105a36158171c3e3a834e9527bedc Mon Sep 17 00:00:00 2001 From: David Bolack Date: Sat, 9 Mar 2024 19:40:54 -0600 Subject: [PATCH 75/77] Fix bad merge --- shared/naturalcrit/markdown.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 227b9ad35..6c9cdc5cb 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -413,8 +413,6 @@ const definitionLists = { } }; -Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists, superSubScripts] }); - //v=====--------------------< Variable Handling >-------------------=====v// 242 lines const replaceVar = function(input, hoist=false, allowUnresolved=false) { const regex = /([!$]?)\[((?!\s*\])(?:\\.|[^\[\]\\])+)\]/g; @@ -660,7 +658,7 @@ function MarkedVariables() { //^=====--------------------< Variable Handling >-------------------=====^// Marked.use(MarkedVariables()); -Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, superSubScripts] }); +Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists, superSubScripts] }); Marked.use(mustacheInjectBlock); Marked.use({ renderer: renderer, tokenizer: tokenizer, mangle: false }); Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite()); From d7756230fb3dc58ac27138d9dbe5a9c6f7d49d53 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 14 Mar 2024 00:02:18 -0400 Subject: [PATCH 76/77] More tests. Split into two extensions Split into two extensions as single-line and multiline are different syntaxes. Simplified a lot of logic and probably cleaner as their own NPM packages (eventually). --- shared/naturalcrit/markdown.js | 153 ++++++++--------------- tests/markdown/marked-extensions.test.js | 44 +++++-- 2 files changed, 86 insertions(+), 111 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 4bc14e19a..01fdbac96 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -294,117 +294,74 @@ const superSubScripts = { } }; -const definitionLists = { - name : 'definitionLists', // Block because style display: block +const definitionListsInline = { + name : 'definitionListsInline', level : 'block', - start(src) { return src.match(/^.*?::.*\n\n/m)?.index; }, // Hint to Marked.js to stop and check for a match + start(src) { return src.match(/^[^\n]*?::[^\n]*/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { - const regex = /^([^\n]*?:?)\n?::(.*)(?:\n|$)|^.*(?:\n|$)/ym; + const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym; let match; let endIndex = 0; - const allDefinitions = []; - let currentDefinition = {}; - let inList = false; - let lastEmpty = false; - let inlineDefinitions = false; - let appending = false; + const definitions = []; while (match = regex.exec(src)) { - // If we aren't actively in a DL and we match just text, bail. - // If the last loop bailed with lastEmpty and we match just text, bail - if(((!inList) || (lastEmpty)) && (typeof match[1] == 'undefined') && (typeof match[2] == 'undefined')) { - break; - } - endIndex += match[0].length; - - // Check to see if this a match containing the start of a DD. - if(match[0].indexOf('::') > -1) { - inList = true; - // Check and see if we are currently in line appending mode, if so, match[1] should be - // appended to the last entry instead of being used as the next DT. - if(appending) { - const lastPos = typeof currentDefinition.dd.length !== 'undefined' ? currentDefinition.dd.length - 1 : 0; - currentDefinition.dd[lastPos] = `${currentDefinition.dd[lastPos]} ${match[1]?.trim()}`; - match[1] = ''; - } - appending = false; - // Check for a DT value. - if(match[1]?.trim()?.length>0) { - if(currentDefinition?.dt?.length) { - currentDefinition.dd.forEach((dd)=>{ - currentDefinition.ddo.push(this.lexer.inlineTokens(dd)); - }); - allDefinitions.push(currentDefinition); - currentDefinition = {}; - } - currentDefinition = { - dt : this.lexer.inlineTokens(match[1].trim()), - dd : [], - ddo : [] - }; - } else if(_.isEmpty(currentDefinition)) { - return; - } - // Test for a DD value. - if(match[2].trim().length>0) { - if((match[1]?.length > 0) && (match[0].indexOf('\n') > match[1]?.length)) { // Inline Style DD - currentDefinition.dd = currentDefinition.dd.concat([match[2].trim()]); - currentDefinition.dd.forEach((dd)=>{ - currentDefinition.ddo.push(this.lexer.inlineTokens(dd)); - }); - allDefinitions.push(currentDefinition); - inlineDefinitions = true; - currentDefinition = {}; - continue; - } - // Multi-line style DDs - const newDefinitions = _.flatten(match[2].split('\n::').filter((item)=>item).map((s)=>s.trim())); - if(newDefinitions?.length) { - currentDefinition.dd = currentDefinition.dd.concat(newDefinitions); - } - } else { - currentDefinition.dd.push(''); - } - lastEmpty = false; - } else if(inList) { // Regular line that might mark the end of a line. - appending = false; - if(inlineDefinitions) { - endIndex -= match[0].length; - break; - } - if(match[0].trim().length == 0) { - if(lastEmpty) { - continue; - } else { - lastEmpty = true; - } - } else { - lastEmpty = false; - const lastPos = typeof currentDefinition.dd.length !== 'undefined' ? currentDefinition.dd.length - 1 : 0; - currentDefinition.dd[lastPos] = `${currentDefinition.dd[lastPos]} ${match[0].trim()}`; - appending = true; - } - } - } - if(currentDefinition.hasOwnProperty('dt')) { - currentDefinition.dd.forEach((dd)=>{ - currentDefinition.ddo.push(this.lexer.inlineTokens(dd)); + definitions.push({ + dt : this.lexer.inlineTokens(match[1].trim()), + dd : this.lexer.inlineTokens(match[2].trim()) }); - allDefinitions.push(currentDefinition); + endIndex = regex.lastIndex; } - if(allDefinitions.length) { + if(definitions.length) { return { - type : 'definitionLists', - raw : src.slice(0, endIndex), - inlineDefinitions, - definitions : allDefinitions + type : 'definitionListsInline', + raw : src.slice(0, endIndex), + definitions + }; + } + }, + renderer(token) { + return `
${token.definitions.reduce((html, def)=>{ + return `${html}
${this.parser.parseInline(def.dt)}
` + + `
${this.parser.parseInline(def.dd)}
`; + }, '')}
`; + } +}; + +const definitionListsMultiline = { + name : 'definitionListsMultiline', + level : 'block', + start(src) { return src.match(/^[^\n]*\n::/m)?.index; }, // Hint to Marked.js to stop and check for a match + tokenizer(src, tokens) { + const regex = /(\n?\n?(?!::)[^\n]+?(?=\n::))|\n::(.(?:.|\n)*?(?=(?:\n::)|(?:\n\n)|$))/y; + let match; + let endIndex = 0; + const definitions = []; + while (match = regex.exec(src)) { + if(match[1]) { + definitions.push({ + dt : this.lexer.inlineTokens(match[1].trim()), + dds : [] + }); + } + if(match[2]) { + definitions[definitions.length - 1].dds.push( + this.lexer.inlineTokens(match[2].trim().replace(/\s/g,' ')) + ) + } + endIndex = regex.lastIndex; + } + if(definitions.length) { + return { + type : 'definitionListsMultiline', + raw : src.slice(0, endIndex), + definitions }; } }, renderer(token) { let returnVal = `
`; token.definitions.forEach((def)=>{ - let dds = def.ddo.map((s)=>{ - return `${token.inlineDefinitions ? '' : '\n'}
${this.parser.parseInline(s).trim()}
`; + let dds = def.dds.map((s)=>{ + return `\n
${this.parser.parseInline(s).trim()}
`; }).join(''); returnVal += `
${this.parser.parseInline(def.dt)}
${dds}\n`; }); @@ -658,7 +615,7 @@ function MarkedVariables() { //^=====--------------------< Variable Handling >-------------------=====^// Marked.use(MarkedVariables()); -Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists, superSubScripts] }); +Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionListsInline, definitionListsMultiline, superSubScripts] }); Marked.use(mustacheInjectBlock); Marked.use({ renderer: renderer, tokenizer: tokenizer, mangle: false }); Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite()); diff --git a/tests/markdown/marked-extensions.test.js b/tests/markdown/marked-extensions.test.js index b4e5dee5c..8d6c3c1c4 100644 --- a/tests/markdown/marked-extensions.test.js +++ b/tests/markdown/marked-extensions.test.js @@ -3,59 +3,77 @@ const Markdown = require('naturalcrit/markdown.js'); describe('Inline Definition Lists', ()=>{ + test('No Term 1 Definition', function() { + const source = ':: My First Definition\n\n'; + const rendered = Markdown.render(source).trim(); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My First Definition
'); + }); + test('Single Definition Term', function() { const source = 'My term :: My First Definition\n\n'; - const rendered = Markdown.render(source); + const rendered = Markdown.render(source).trim(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
My term
My First Definition
'); }); test('Multiple Definition Terms', function() { const source = 'Term 1::Definition of Term 1\nTerm 2::Definition of Term 2\n\n'; - const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
\n
Term 2
Definition of Term 2
'); + const rendered = Markdown.render(source).trim(); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
Definition of Term 1
Term 2
Definition of Term 2
'); }); }); describe('Multiline Definition Lists', ()=>{ test('Single Term, Single Definition', function() { const source = 'Term 1\n::Definition 1\n\n'; - const rendered = Markdown.render(source); + const rendered = Markdown.render(source).trim(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
'); }); test('Single Term, Plural Definitions', function() { const source = 'Term 1\n::Definition 1\n::Definition 2\n\n'; - const rendered = Markdown.render(source); + const rendered = Markdown.render(source).trim(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Definition 2
'); }); test('Multiple Term, Single Definitions', function() { const source = 'Term 1\n::Definition 1\n\nTerm 2\n::Definition 1\n\n'; - const rendered = Markdown.render(source); + const rendered = Markdown.render(source).trim(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Term 2
\n
Definition 1
'); }); test('Multiple Term, Plural Definitions', function() { const source = 'Term 1\n::Definition 1\n::Definition 2\n\nTerm 2\n::Definition 1\n::Definition 2\n\n'; - const rendered = Markdown.render(source); + const rendered = Markdown.render(source).trim(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1
\n
Definition 2
\n
Term 2
\n
Definition 1
\n
Definition 2
'); }); test('Single Term, Single multi-line definition', function() { const source = 'Term 1\n::Definition 1\nand more and\nmore and more\n\n'; - const rendered = Markdown.render(source); + const rendered = Markdown.render(source).trim(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more and more
'); }); test('Single Term, Plural multi-line definitions', function() { - const source = 'Term 1\n::Definition 1\nand more and more\n::Definition 2\n\n::Definition 3\n\n'; - const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more
\n
Definition 2
\n
Definition 3
'); + const source = 'Term 1\n::Definition 1\nand more and more\n::Definition 2\nand more\nand more\n::Definition 3\n\n'; + const rendered = Markdown.render(source).trim(); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more
\n
Definition 2 and more and more
\n
Definition 3
'); }); test('Multiple Term, Single multi-line definition', function() { - const source = 'Term 1\n::Definition 1\nand more and more\n\nTerm 2\n::Definition 1\n\n::Definition 2\n\n'; - const rendered = Markdown.render(source); + const source = 'Term 1\n::Definition 1\nand more and more\n\nTerm 2\n::Definition 1\n::Definition 2\n\n'; + const rendered = Markdown.render(source).trim(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more
\n
Term 2
\n
Definition 1
\n
Definition 2
'); }); + + test('Multiple Term, Single multi-line definition, followed by an inline dl', function() { + const source = 'Term 1\n::Definition 1\nand more and more\n\nTerm 2\n::Definition 1\n::Definition 2\n\n::Inline Definition (no term)'; + const rendered = Markdown.render(source).trim(); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more
\n
Term 2
\n
Definition 1
\n
Definition 2
Inline Definition (no term)
'); + }); + + test('Multiple Term, Single multi-line definition, followed by paragraph', function() { + const source = 'Term 1\n::Definition 1\nand more and more\n\nTerm 2\n::Definition 1\n::Definition 2\n\nParagraph'; + const rendered = Markdown.render(source).trim(); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('
Term 1
\n
Definition 1 and more and more
\n
Term 2
\n
Definition 1
\n
Definition 2

Paragraph

'); + }); }); From f37da196496dbbaa25bf0d6a97fc4fa6232c5c18 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 14 Mar 2024 00:03:28 -0400 Subject: [PATCH 77/77] lint --- shared/naturalcrit/markdown.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 01fdbac96..f82ec3c32 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -344,8 +344,8 @@ const definitionListsMultiline = { } if(match[2]) { definitions[definitions.length - 1].dds.push( - this.lexer.inlineTokens(match[2].trim().replace(/\s/g,' ')) - ) + this.lexer.inlineTokens(match[2].trim().replace(/\s/g, ' ')) + ); } endIndex = regex.lastIndex; } @@ -360,7 +360,7 @@ const definitionListsMultiline = { renderer(token) { let returnVal = `
`; token.definitions.forEach((def)=>{ - let dds = def.dds.map((s)=>{ + const dds = def.dds.map((s)=>{ return `\n
${this.parser.parseInline(s).trim()}
`; }).join(''); returnVal += `
${this.parser.parseInline(def.dt)}
${dds}\n`;