From 41fdf48ad357ab499986c498292c255525026253 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Mon, 21 Oct 2024 00:30:45 -0500 Subject: [PATCH 01/52] Setup Intersection Observers & more... Bad commit here with too much stuff. I apologize. This sets up two Intersection Observers: the first captures every page that is at least 30% visible inside the `.pages` container, and the second captures every page that has at least one pixel on the horizontal center line of `.pages`. Both can be arrays of integers (page index). The "visiblePages" array is duplicated and formatted into a "formattedPages" state, which gets displayed in the toolbar. The toolbar displays that, unless the user clicks into the page input and enters their own integer (only a single integer, no range), which can then jump the preview to that page on Enter or blur(). The Arrow 'change page' buttons jump the preview back and forth by a 'full set'. If one page is viewed at a time, this is moved on page a time, and if 10 pages are viewed at a time it jumps the pages by 10. Left to do: adapt the "jump editor to match preview" divider button to work with new "centerPage". --- client/homebrew/brewRenderer/brewRenderer.jsx | 133 ++++++++++++++---- .../homebrew/brewRenderer/toolBar/toolBar.jsx | 24 +++- .../brewRenderer/toolBar/toolBar.less | 2 +- 3 files changed, 126 insertions(+), 33 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 48f155820..1b30c0ae5 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -1,7 +1,7 @@ /*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/ require('./brewRenderer.less'); const React = require('react'); -const { useState, useRef, useCallback } = React; +const { useState, useRef, useCallback, useEffect } = React; const _ = require('lodash'); const MarkdownLegacy = require('naturalcrit/markdownLegacy.js'); @@ -30,14 +30,47 @@ const INITIAL_CONTENT = dedent`
`; //v=====----------------------< Brew Page Component >---------------------=====v// -const BrewPage = (props)=>{ - props = { - contents : '', - index : 0, - ...props - }; - const cleanText = props.contents; //DOMPurify.sanitize(props.contents, purifyConfig); - return
+const BrewPage = ({contents = '', index = 0, onVisibilityChange, onCenterPageChange, ...props})=>{ + const pageRef = useRef(null); + const cleanText = contents; //DOMPurify.sanitize(props.contents, purifyConfig); + + useEffect(()=>{ + if(!pageRef.current) return; + const observer = new IntersectionObserver( + (entries)=>{ + entries.forEach((entry)=>{ + if(entry.isIntersecting){ + onVisibilityChange(index + 1, true); + } else { + onVisibilityChange(index + 1, false); + } + }); + }, + { threshold: .3, rootMargin: '0px 0px 0px 0px' } + ); + + // Observer for tracking the page at the center of the iframe. + const centerObserver = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + onCenterPageChange(index + 1); // Set this page as the center page + } + }); + }, + { threshold: 0, rootMargin: '-50% 0px -50% 0px' } // Detect when the page is at the center + ); + + observer.observe(pageRef.current); + centerObserver.observe(pageRef.current); + + return ()=>{ + observer.disconnect(); + centerObserver.disconnect(); + }; + }, [index, onVisibilityChange, onCenterPageChange]); + + return
; }; @@ -64,11 +97,14 @@ const BrewRenderer = (props)=>{ }; const [state, setState] = useState({ - isMounted : false, - visibility : 'hidden', - zoom : 100 + isMounted : false, + visibility : 'hidden', + zoom : 100, + visiblePages : [], + formattedPages : '', + centerPage : 1 }); - + const iframeRef = useRef(null); const mainRef = useRef(null); if(props.renderer == 'legacy') { @@ -77,13 +113,54 @@ const BrewRenderer = (props)=>{ rawPages = props.text.split(/^\\page$/gm); } - const updateCurrentPage = useCallback(_.throttle((e)=>{ - const { scrollTop, clientHeight, scrollHeight } = e.target; - const totalScrollableHeight = scrollHeight - clientHeight; - const currentPageNumber = Math.max(Math.ceil((scrollTop / totalScrollableHeight) * rawPages.length), 1); + useEffect(() => { + props.onPageChange(formatVisiblePages(state.visiblePages)); + }, [state.visiblePages]); - props.onPageChange(currentPageNumber); - }, 200), []); + const handlePageVisibilityChange = useCallback((pageNum, isVisible) => { + setState((prevState) => { + let updatedVisiblePages = new Set(prevState.visiblePages); + if(isVisible){ + updatedVisiblePages.add(pageNum) + } else { + updatedVisiblePages.delete(pageNum) + } + const pages = Array.from(updatedVisiblePages); + + return { ...prevState, + visiblePages : _.sortBy(pages), + formattedPages : formatVisiblePages(pages) + }; + }); + }, []); + + const formatVisiblePages = (pages) => { + if (pages.length === 0) return ''; + + const sortedPages = [...pages].sort((a, b) => a - b); // Copy and sort the array + let ranges = []; + let start = sortedPages[0]; + + for (let i = 1; i <= sortedPages.length; i++) { + // If the current page is not consecutive or it's the end of the list + if (i === sortedPages.length || sortedPages[i] !== sortedPages[i - 1] + 1) { + // Push the range to the list + ranges.push( + start === sortedPages[i - 1] ? `${start}` : `${start} - ${sortedPages[i - 1]}` + ); + start = sortedPages[i]; // Start a new range + } + } + + return ranges.join(', '); + }; + + const handleCenterPageChange = useCallback((pageNum) => { + setState((prevState) => ({ + ...prevState, + centerPage : pageNum, + })); + }, []); const isInView = (index)=>{ if(!state.isMounted) @@ -113,11 +190,11 @@ const BrewRenderer = (props)=>{ const renderPage = (pageText, index)=>{ if(props.renderer == 'legacy') { const html = MarkdownLegacy.render(pageText); - return ; + return ; } else { pageText += `\n\n \n\\column\n `; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear) const html = Markdown.render(pageText, index); - return ; + return ; } }; @@ -183,7 +260,9 @@ const BrewRenderer = (props)=>{ <> {/*render dummy page while iFrame is mounting.*/} {!state.isMounted - ?
+ ?
{renderDummyPage(1)}
@@ -196,7 +275,7 @@ const BrewRenderer = (props)=>{
- + {/*render in iFrame so broken code doesn't crash the site.*/} { onClick={()=>{emitClick();}} >
+ style={ styleObject } + > {/* Apply CSS from Style tab and render pages from Markdown tab */} {state.isMounted && <> {renderStyle()} -
+
{renderPages()}
diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 73b48d778..f3ee3a11a 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -7,12 +7,20 @@ const _ = require('lodash'); const MAX_ZOOM = 300; const MIN_ZOOM = 10; -const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{ +const ToolBar = ({ onZoomChange, currentPage, visiblePages, formattedPages, centerPage, totalPages })=>{ const [zoomLevel, setZoomLevel] = useState(100); - const [pageNum, setPageNum] = useState(currentPage); + const [pageNum, setPageNum] = useState(null); const [toolsVisible, setToolsVisible] = useState(true); + useEffect(()=>{ + setPageNum(visiblePages[0]); + }, []); + + useEffect(()=>{ + setPageNum(formattedPages); + }, [visiblePages]); + useEffect(()=>{ onZoomChange(zoomLevel); }, [zoomLevel]); @@ -26,17 +34,21 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{ }; const handlePageInput = (pageInput)=>{ + console.log(pageInput); if(/[0-9]/.test(pageInput)) setPageNum(parseInt(pageInput)); // input type is 'text', so `page` comes in as a string, not number. }; const scrollToPage = (pageNumber)=>{ + console.log('visiblePages:', visiblePages); + console.log('centerPage:', centerPage); + console.log('pageNumber:', pageNumber); + if(typeof pageNumber !== 'number') return; pageNumber = _.clamp(pageNumber, 1, totalPages); const iframe = document.getElementById('BrewRenderer'); const brewRenderer = iframe?.contentWindow?.document.querySelector('.brewRenderer'); const page = brewRenderer?.querySelector(`#p${pageNumber}`); page?.scrollIntoView({ block: 'start' }); - setPageNum(pageNumber); }; @@ -125,7 +137,7 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{ From 26050e21342b2371c748cf1c58dbff3843b3dbe7 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Mon, 21 Oct 2024 22:20:52 -0500 Subject: [PATCH 07/52] add comment --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 61183a083..1fcdceecb 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -71,6 +71,7 @@ const ToolBar = ({ onZoomChange, visiblePages, totalPages })=>{ return deltaZoom; }; + // format the visible pages to work with ranges, including separate ranges ("2-7, 10-15") const formatVisiblePages = (pages)=>{ if(pages.length === 0) return ''; From 4126188df12b5c0d76fe8108927567c3f1309ee9 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Mon, 21 Oct 2024 22:29:58 -0500 Subject: [PATCH 08/52] linting --- client/homebrew/brewRenderer/brewRenderer.jsx | 10 +++--- .../brewRenderer/toolBar/toolBar.less | 34 +++++++++---------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index c846d4d63..2177e224e 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -99,11 +99,11 @@ const BrewRenderer = (props)=>{ }; const [state, setState] = useState({ - isMounted : false, - visibility : 'hidden', - zoom : 100, - visiblePages : [], - centerPage : 1 + isMounted : false, + visibility : 'hidden', + zoom : 100, + visiblePages : [], + centerPage : 1 }); const iframeRef = useRef(null); const mainRef = useRef(null); diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.less b/client/homebrew/brewRenderer/toolBar/toolBar.less index 4cc125aad..86ea769f6 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.less +++ b/client/homebrew/brewRenderer/toolBar/toolBar.less @@ -16,8 +16,8 @@ color : #CCCCCC; background-color : #555555; & > *:not(.toggleButton) { - opacity: 1; - transition: all .2s ease; + opacity : 1; + transition : all 0.2s ease; } .group { @@ -100,29 +100,27 @@ color : #777777; background-color : unset !important; } - i { - font-size:1.2em; - } + i { font-size : 1.2em; } } &.hidden { - width: 32px; - transition: all .3s ease; - flex-wrap:nowrap; - overflow: hidden; - background-color: unset; - opacity: .5; + flex-wrap : nowrap; + width : 32px; + overflow : hidden; + background-color : unset; + opacity : 0.5; + transition : all 0.3s ease; & > *:not(.toggleButton) { - opacity: 0; - transition: all .2s ease; + opacity : 0; + transition : all 0.2s ease; } } } button.toggleButton { - z-index : 5; - position:absolute; - left: 0; - width: 32px; - min-width: unset; + position : absolute; + left : 0; + z-index : 5; + width : 32px; + min-width : unset; } \ No newline at end of file From 5ab867f21efd2ecd85e70b0ceabc97ade360c7c8 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Tue, 22 Oct 2024 22:36:13 -0500 Subject: [PATCH 09/52] adjust prev/next page buttons to meet expectations i hope --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 1fcdceecb..291b33352 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -43,7 +43,6 @@ const ToolBar = ({ onZoomChange, visiblePages, totalPages })=>{ page?.scrollIntoView({ block: 'start' }); }; - const calculateChange = (mode)=>{ const iframe = document.getElementById('BrewRenderer'); const iframeWidth = iframe.getBoundingClientRect().width; @@ -151,7 +150,10 @@ const ToolBar = ({ onZoomChange, visiblePages, totalPages })=>{
- + 0 ? state.visiblePages : [state.centerPage]} totalPages={rawPages.length}/> {/*render in iFrame so broken code doesn't crash the site.*/} { - console.log(pageInput); if(/[0-9]/.test(pageInput)) setPageNum(parseInt(pageInput)); // input type is 'text', so `page` comes in as a string, not number. }; From 9ef11bca999ce9f7f102ac1132911f2650356851 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Thu, 7 Nov 2024 10:40:44 -0600 Subject: [PATCH 19/52] lint and refactor --- client/homebrew/brewRenderer/brewRenderer.jsx | 21 +++++++------------ .../homebrew/brewRenderer/toolBar/toolBar.jsx | 10 ++++----- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index e9e3da8a6..3108176b4 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -128,23 +128,14 @@ const BrewRenderer = (props)=>{ rawPages = props.text.split(/^\\page$/gm); } - // update centerPage (aka "current page") and pass it up to parent components - useEffect(()=>{ - props.onPageChange(state.centerPage); - }, [state.centerPage]); - const handlePageVisibilityChange = useCallback((pageNum, isVisible)=>{ setState((prevState)=>{ const updatedVisiblePages = new Set(prevState.visiblePages); - if(isVisible){ - updatedVisiblePages.add(pageNum); - } else { - updatedVisiblePages.delete(pageNum); - } - const pages = Array.from(updatedVisiblePages); + isVisible ? updatedVisiblePages.add(pageNum) : updatedVisiblePages.delete(pageNum); - return { ...prevState, - visiblePages : _.sortBy(pages) + return { + ...prevState, + visiblePages : [...updatedVisiblePages].sort((a, b)=>a - b) }; }); }, []); @@ -154,7 +145,9 @@ const BrewRenderer = (props)=>{ ...prevState, centerPage : pageNum, })); - }, []); + + props.onPageChange(pageNum); + }, [props.onPageChange]); const isInView = (index)=>{ if(!state.isMounted) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 89c341345..5fa9f0588 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -66,7 +66,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa } else { minDimRatio = [...pages].reduce((minRatio, page)=>Math.min(minRatio, iframeWidth / page.offsetWidth, iframeHeight / page.offsetHeight), Infinity); } - console.log(minDimRatio) + console.log(minDimRatio); desiredZoom = minDimRatio * 100; } @@ -249,14 +249,14 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa title='Next Page(s)' onClick={()=>{ // if there are multiple pages in a 'row' and they are in 'view', - // then the 'max'/last page in view will always be the same, and + // then the 'max'/last page in view will always be the same, and // the other pages will always be the same (since the viewport doesn't change). - // So this needs to scroll to the 'max', then see what is newly in view, + // So this needs to scroll to the 'max', then see what is newly in view, // and if the same pages are visible, do it again but +1. - const start = _.max(visiblePages); + const start = _.max(visiblePages); scrollToPage(start); if(start === _.max(visiblePages)){ - scrollToPage(start + 1) + scrollToPage(start + 1); }; }} disabled={pageNum >= totalPages} From 650ec0441761de46fcd9d6cbe9ca763780f875cf Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Thu, 7 Nov 2024 18:56:19 -0600 Subject: [PATCH 20/52] fix 'disabled' attribute on min/max of page range --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 5fa9f0588..c83ef59a6 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -219,7 +219,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa const rangeOffset = visiblePages.length > 1 ? 1 : 0; scrollToPage(_.min(visiblePages) - visiblePages.length + rangeOffset); }} - disabled={pageNum <= 1} + disabled={visiblePages.includes(1)} > @@ -259,7 +259,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa scrollToPage(start + 1); }; }} - disabled={pageNum >= totalPages} + disabled={visiblePages.includes(totalPages)} > From 28855d02a647e6ec55792ae0edd89276e97badfe Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Thu, 7 Nov 2024 19:46:07 -0600 Subject: [PATCH 21/52] dynamic text input width to match characters --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 1 + client/homebrew/brewRenderer/toolBar/toolBar.less | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index c83ef59a6..c2486c095 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -238,6 +238,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa onChange={(e)=>handlePageInput(e.target.value)} onBlur={()=>scrollToPage(pageNum)} onKeyDown={(e)=>e.key == 'Enter' && scrollToPage(pageNum)} + style={{ width: `${pageNum.length}ch` }} /> / {totalPages}
diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.less b/client/homebrew/brewRenderer/toolBar/toolBar.less index 27989cff6..dfbd7a20d 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.less +++ b/client/homebrew/brewRenderer/toolBar/toolBar.less @@ -140,7 +140,7 @@ // `.text-input` if generic to all range inputs, or `#page-input` if only for current page input &#page-input { - width : 10ch; + min-width : 5ch; margin-right : 1ch; text-align : center; } From 28a7f249890053d616f3035b03ef954aa202eced Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Thu, 7 Nov 2024 20:32:30 -0600 Subject: [PATCH 22/52] add scrollToHash method back in pretty much completely unchanged, was originally moved just to help with merging master in (ie it was erroneously removed) --- client/homebrew/brewRenderer/brewRenderer.jsx | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 3108176b4..795095f71 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -221,7 +221,28 @@ const BrewRenderer = (props)=>{ } }; + const scrollToHash = (hash)=>{ + if(!hash) return; + + const iframeDoc = document.getElementById('BrewRenderer').contentDocument; + let anchor = iframeDoc.querySelector(hash); + + if(anchor) { + anchor.scrollIntoView({ behavior: 'smooth' }); + } else { + // Use MutationObserver to wait for the element if it's not immediately available + new MutationObserver((mutations, obs)=>{ + anchor = iframeDoc.querySelector(hash); + if(anchor) { + anchor.scrollIntoView({ behavior: 'smooth' }); + obs.disconnect(); + } + }).observe(iframeDoc, { childList: true, subtree: true }); + } + }; + const frameDidMount = ()=>{ //This triggers when iFrame finishes internal "componentDidMount" + scrollToHash(window.location.hash); setTimeout(()=>{ //We still see a flicker where the style isn't applied yet, so wait 100ms before showing iFrame renderPages(); //Make sure page is renderable before showing From 8c986bb97dccc28af9d2a7743ed4df9ee144464c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Thu, 28 Nov 2024 00:21:35 +0100 Subject: [PATCH 23/52] initial commit --- client/homebrew/pages/sharePage/sharePage.jsx | 174 +++++++++--------- 1 file changed, 84 insertions(+), 90 deletions(-) diff --git a/client/homebrew/pages/sharePage/sharePage.jsx b/client/homebrew/pages/sharePage/sharePage.jsx index 04f0e3a6b..b561ead3f 100644 --- a/client/homebrew/pages/sharePage/sharePage.jsx +++ b/client/homebrew/pages/sharePage/sharePage.jsx @@ -1,6 +1,6 @@ require('./sharePage.less'); const React = require('react'); -const createClass = require('create-react-class'); +const { useState, useEffect, useCallback } = React; const { Meta } = require('vitreum/headtags'); const Nav = require('naturalcrit/nav/nav.jsx'); @@ -8,130 +8,124 @@ const Navbar = require('../../navbar/navbar.jsx'); const MetadataNav = require('../../navbar/metadata.navitem.jsx'); const PrintNavItem = require('../../navbar/print.navitem.jsx'); const RecentNavItem = require('../../navbar/recent.navitem.jsx').both; -const VaultNavItem = require('../../navbar/vault.navitem.jsx'); const Account = require('../../navbar/account.navitem.jsx'); const BrewRenderer = require('../../brewRenderer/brewRenderer.jsx'); const { DEFAULT_BREW_LOAD } = require('../../../../server/brewDefaults.js'); const { printCurrentBrew, fetchThemeBundle } = require('../../../../shared/helpers.js'); -const SharePage = createClass({ - displayName : 'SharePage', - getDefaultProps : function() { - return { - brew : DEFAULT_BREW_LOAD, - disableMeta : false - }; - }, +const SharePage = (props)=>{ + const { brew = DEFAULT_BREW_LOAD, disableMeta = false } = props; - getInitialState : function() { - return { - themeBundle : {}, - currentBrewRendererPageNum : 1 - }; - }, + const [state, setState] = useState({ + themeBundle : {}, + currentBrewRendererPageNum : 1, + }); - componentDidMount : function() { - document.addEventListener('keydown', this.handleControlKeys); + const handleBrewRendererPageChange = useCallback((pageNumber)=>{ + updateState({ currentBrewRendererPageNum: pageNumber }); + }, []); - fetchThemeBundle(this, this.props.brew.renderer, this.props.brew.theme); - }, - - componentWillUnmount : function() { - document.removeEventListener('keydown', this.handleControlKeys); - }, - - handleBrewRendererPageChange : function(pageNumber){ - this.setState({ currentBrewRendererPageNum: pageNumber }); - }, - - handleControlKeys : function(e){ + const handleControlKeys = useCallback((e)=>{ if(!(e.ctrlKey || e.metaKey)) return; const P_KEY = 80; - if(e.keyCode == P_KEY){ - if(e.keyCode == P_KEY) printCurrentBrew(); + if(e.keyCode === P_KEY) { + printCurrentBrew(); e.stopPropagation(); e.preventDefault(); } - }, + }, []); - processShareId : function() { - return this.props.brew.googleId && !this.props.brew.stubbed ? - this.props.brew.googleId + this.props.brew.shareId : - this.props.brew.shareId; - }, + useEffect(()=>{ + document.addEventListener('keydown', handleControlKeys); + fetchThemeBundle( + { + setState, + }, + brew.renderer, + brew.theme + ); - renderEditLink : function(){ - if(!this.props.brew.editId) return; + return ()=>{ + document.removeEventListener('keydown', handleControlKeys); + }; + }, [brew.renderer, brew.theme, handleControlKeys]); - let editLink = this.props.brew.editId; - if(this.props.brew.googleId && !this.props.brew.stubbed) { - editLink = this.props.brew.googleId + editLink; + const processShareId = useCallback(()=>{ + return brew.googleId && !brew.stubbed ? brew.googleId + brew.shareId : brew.shareId; + }, [brew]); + + const renderEditLink = ()=>{ + if(!brew.editId) return null; + + let editLink = brew.editId; + if(brew.googleId && !brew.stubbed) { + editLink = brew.googleId + editLink; } - return - edit - ; - }, + return ( + + edit + + ); + }; - render : function(){ - const titleStyle = this.props.disableMeta ? { cursor: 'default' } : {}; - const titleEl = {this.props.brew.title}; + const titleStyle = disableMeta ? { cursor: 'default' } : {}; + const titleEl = ( + + {brew.title} + + ); - return
+ return ( +
- { - this.props.disableMeta ? - titleEl - : - - {titleEl} - - } + {disableMeta ? titleEl : {titleEl}} - {this.props.brew.shareId && <> - - - - source - - - view - - {this.renderEditLink()} - - download - - - clone to new - - - } - - + {brew.shareId && ( + <> + + + + source + + + view + + {renderEditLink()} + + download + + + clone to new + + + + )} +
-
; - } -}); +
+ ); +}; module.exports = SharePage; From aa951ff96cdcacc3f2845ba641f990799913929f Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 9 Dec 2024 17:04:16 -0500 Subject: [PATCH 24/52] Small cleanups --- client/homebrew/brewRenderer/brewRenderer.jsx | 8 +++----- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 13 +++++-------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 879af2a9a..7792742cd 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -32,10 +32,8 @@ const INITIAL_CONTENT = dedent` //v=====----------------------< Brew Page Component >---------------------=====v// const BrewPage = (props)=>{ props = { - contents : '', - index : 0, - onVisibilityChange : ()=>{}, - onCenterPageChange : ()=>{}, + contents : '', + index : 0, ...props }; const pageRef = useRef(null); @@ -77,7 +75,7 @@ const BrewPage = (props)=>{ visibleObserver.disconnect(); centerObserver.disconnect(); }; - }, [props.index, props.onVisibilityChange, props.onCenterPageChange]); + }, []); return
diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index c2486c095..9257660d1 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -25,7 +25,6 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa }; const handleOptionChange = (optionKey, newValue)=>{ - //setDisplayOptions(prevOptions => ({ ...prevOptions, [optionKey]: newValue })); onDisplayOptionsChange({ ...displayOptions, [optionKey]: newValue }); }; @@ -61,12 +60,10 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa } else if(mode == 'fit'){ let minDimRatio; // find the page with the largest single dim (height or width) so that zoom can be adapted to fit it. - if(displayOptions.spread === 'facing'){ + if(displayOptions.spread === 'facing') minDimRatio = [...pages].reduce((minRatio, page)=>Math.min(minRatio, iframeWidth / page.offsetWidth / 2), Infinity); // if 'facing' spread, fit two pages in view - } else { + else minDimRatio = [...pages].reduce((minRatio, page)=>Math.min(minRatio, iframeWidth / page.offsetWidth, iframeHeight / page.offsetHeight), Infinity); - } - console.log(minDimRatio); desiredZoom = minDimRatio * 100; } @@ -86,9 +83,8 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa let start = sortedPages[0]; for (let i = 1; i <= sortedPages.length; i++) { - // If the current page is not consecutive or it's the end of the list + // If the current page is the end of the list or not consecutive if(i === sortedPages.length || sortedPages[i] !== sortedPages[i - 1] + 1) { - // Push the range to the list ranges.push( start === sortedPages[i - 1] ? `${start}` : `${start} - ${sortedPages[i - 1]}` ); @@ -233,7 +229,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa title='Current page(s) in view' inputMode='numeric' pattern='[0-9]' - value={`${pageNum}`} + value={pageNum} onClick={(e)=>e.target.select()} onChange={(e)=>handlePageInput(e.target.value)} onBlur={()=>scrollToPage(pageNum)} @@ -257,6 +253,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa const start = _.max(visiblePages); scrollToPage(start); if(start === _.max(visiblePages)){ + console.log("oh no") scrollToPage(start + 1); }; }} From 870a4c33637c248af1f59e6e386f48f4ade2d2e0 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 9 Dec 2024 17:06:26 -0500 Subject: [PATCH 25/52] small cleanups --- client/homebrew/brewRenderer/brewRenderer.jsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 7792742cd..4606529f0 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -46,11 +46,10 @@ const BrewPage = (props)=>{ const visibleObserver = new IntersectionObserver( (entries)=>{ entries.forEach((entry)=>{ - if(entry.isIntersecting){ + if(entry.isIntersecting) props.onVisibilityChange(props.index + 1, true); // add page to array of visible pages. - } else { + else props.onVisibilityChange(props.index + 1, false); - } }); }, { threshold: .3, rootMargin: '0px 0px 0px 0px' } // detect when >30% of page is within bounds. @@ -60,9 +59,8 @@ const BrewPage = (props)=>{ const centerObserver = new IntersectionObserver( (entries)=>{ entries.forEach((entry)=>{ - if(entry.isIntersecting) { + if(entry.isIntersecting) props.onCenterPageChange(props.index + 1); // Set this page as the center page - } }); }, { threshold: 0, rootMargin: '-50% 0px -50% 0px' } // Detect when the page is at the center From bca653bc4df772b2eb3597484fefa7c65cede9b2 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 22 Dec 2024 17:52:09 +1300 Subject: [PATCH 26/52] Add instructions to HBErrorCode 01 & 02 --- .../pages/errorPage/errors/errorIndex.js | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index 298ec8c7e..ea1843c56 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -6,6 +6,24 @@ const loginUrl = 'https://www.naturalcrit.com/login'; //050-100 : Other pages errors const errorIndex = (props)=>{ + const googleRefreshInstructions = dedent` + : + + ### Refreshing your Google Credentials + + This issue may be caused by an issue with your Google credentials; if so, the following steps may resolve the issue: + + - Go to https://www.naturalcrit.com/login and click logout if present (in small text at the bottom of the page). + + - Click "Sign In with Google", which will refresh your Google credentials. + + - After completing the sign in process, return to Homebrewery and refresh/reload the page so that it can pick up the updated credentials. + + - If this was the source of the issue, it should now be resolved. + + If following these steps does not resolve the issue, please let us know! + `; + return { // Default catch all '00' : dedent` @@ -18,7 +36,9 @@ const errorIndex = (props)=>{ '01' : dedent` ## An error occurred while retrieving this brew from Google Drive! - Google reported an error while attempting to retrieve a brew from this link.`, + Google reported an error while attempting to retrieve a brew from this link.` + + + googleRefreshInstructions, // Google Drive - 404 : brew deleted or access denied '02' : dedent` @@ -65,7 +85,9 @@ const errorIndex = (props)=>{ : Also note, if you prefer not to use your Google Drive for storage, you can always change the storage location of a brew by clicking the Google drive icon by the - brew title and choosing *transfer my brew to/from Google Drive*.`, + brew title and choosing *transfer my brew to/from Google Drive*.` + + + googleRefreshInstructions, // User is not Authors list '03' : dedent` From 91d928fd8a4da7b9a1cec67a41ef1d1adb6cd153 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 22 Dec 2024 17:52:58 +1300 Subject: [PATCH 27/52] End list properly --- client/homebrew/pages/errorPage/errors/errorIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index ea1843c56..e9284a432 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -70,7 +70,7 @@ const errorIndex = (props)=>{ - **The Google Account may be closed.** Google may have removed the account due to inactivity or violating a Google policy. Make sure the owner can still access Google Drive normally and upload/download files to it. - : + If the file isn't found, Google Drive usually puts your file in your Trash folder for 30 days. Assuming the trash hasn't been emptied yet, it might be worth checking. You can also find the Activity tab on the right side of the Google Drive page, which From 9a6cf8c5d212122f607a0ef9dcb23c5723eedabc Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 22 Dec 2024 17:53:14 +1300 Subject: [PATCH 28/52] Linter fix --- client/homebrew/pages/errorPage/errors/errorIndex.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index e9284a432..ee34bac85 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -194,8 +194,8 @@ const errorIndex = (props)=>{ **Brew Title:** ${props.brew.brewTitle}`, - // ####### Admin page error ####### - '52': dedent` + // ####### Admin page error ####### + '52' : dedent` ## Access Denied You need to provide correct administrator credentials to access this page.`, From fcfd3171bd88a69c00558e4ae40ba7293f549bed Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 22 Dec 2024 18:00:27 +1300 Subject: [PATCH 29/52] Tweak start of instructions --- client/homebrew/pages/errorPage/errors/errorIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index ee34bac85..198f67cec 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -7,7 +7,7 @@ const loginUrl = 'https://www.naturalcrit.com/login'; const errorIndex = (props)=>{ const googleRefreshInstructions = dedent` - : +   ### Refreshing your Google Credentials From 92d1238a46b552753a11821d62a6995d798ab9a1 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 22 Dec 2024 21:31:31 -0500 Subject: [PATCH 30/52] Use project babel config for buildHomebrew script Jest uses the babel.config file already. Might as well all use the same config. --- scripts/buildHomebrew.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/buildHomebrew.js b/scripts/buildHomebrew.js index 313c92db7..656714d87 100644 --- a/scripts/buildHomebrew.js +++ b/scripts/buildHomebrew.js @@ -7,11 +7,12 @@ const { pack, watchFile, livereload } = vitreum; import lessTransform from 'vitreum/transforms/less.js'; import assetTransform from 'vitreum/transforms/asset.js'; import babel from '@babel/core'; +import babelConfig from '../babel.config.json' with { type : 'json' }; import less from 'less'; const isDev = !!process.argv.find((arg) => arg === '--dev'); -const babelify = async (code)=>(await babel.transformAsync(code, { presets: [['@babel/preset-env', { 'exclude': ['proposal-dynamic-import'] }], '@babel/preset-react'], plugins: ['@babel/plugin-transform-runtime'] })).code; +const babelify = async (code)=>(await babel.transformAsync(code, babelConfig)).code; const transforms = { '.js' : (code, filename, opts)=>babelify(code), From e8eedcf6d66c7af13d06f8b1a1dee0983008b574 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 22 Dec 2024 21:32:30 -0500 Subject: [PATCH 31/52] Import polyfill from core-js Possible to have babel automatically detect and import polyfills as needed, but Browserify just can't handle it. Manually importing the one troublesome one into the root of our project. --- client/homebrew/homebrew.jsx | 4 ++++ package-lock.json | 12 ++++++++++++ package.json | 1 + 3 files changed, 17 insertions(+) diff --git a/client/homebrew/homebrew.jsx b/client/homebrew/homebrew.jsx index a215f7b5d..415390498 100644 --- a/client/homebrew/homebrew.jsx +++ b/client/homebrew/homebrew.jsx @@ -1,3 +1,7 @@ +//╔===--------------- Polyfills --------------===╗// +import 'core-js/es/string/to-well-formed.js'; +//╚===--------------- ---------------===╝// + require('./homebrew.less'); const React = require('react'); const createClass = require('create-react-class'); diff --git a/package-lock.json b/package-lock.json index bc4c66238..6ea264030 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "classnames": "^2.5.1", "codemirror": "^5.65.6", "cookie-parser": "^1.4.7", + "core-js": "^3.39.0", "cors": "^2.8.5", "create-react-class": "^15.7.0", "dedent-tabs": "^0.10.3", @@ -4598,6 +4599,17 @@ "node": ">=0.10.0" } }, + "node_modules/core-js": { + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", + "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==", + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-js-compat": { "version": "3.38.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz", diff --git a/package.json b/package.json index 2ce79f112..4386b7af7 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,7 @@ "classnames": "^2.5.1", "codemirror": "^5.65.6", "cookie-parser": "^1.4.7", + "core-js": "^3.39.0", "cors": "^2.8.5", "create-react-class": "^15.7.0", "dedent-tabs": "^0.10.3", From 32561cf368567e16c89ba9988533ded58b8558c0 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 22 Dec 2024 22:19:02 -0500 Subject: [PATCH 32/52] Moving to just HBErrorCode 01 02 is specifically for 404 errors when the file is actually missing. In that case, refreshing credentials probably won't work. (We should update the errorNav to make this distinction as well.) --- .../pages/errorPage/errors/errorIndex.js | 35 +++++++------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index 198f67cec..ccdd86768 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -6,24 +6,6 @@ const loginUrl = 'https://www.naturalcrit.com/login'; //050-100 : Other pages errors const errorIndex = (props)=>{ - const googleRefreshInstructions = dedent` -   - - ### Refreshing your Google Credentials - - This issue may be caused by an issue with your Google credentials; if so, the following steps may resolve the issue: - - - Go to https://www.naturalcrit.com/login and click logout if present (in small text at the bottom of the page). - - - Click "Sign In with Google", which will refresh your Google credentials. - - - After completing the sign in process, return to Homebrewery and refresh/reload the page so that it can pick up the updated credentials. - - - If this was the source of the issue, it should now be resolved. - - If following these steps does not resolve the issue, please let us know! - `; - return { // Default catch all '00' : dedent` @@ -36,9 +18,18 @@ const errorIndex = (props)=>{ '01' : dedent` ## An error occurred while retrieving this brew from Google Drive! - Google reported an error while attempting to retrieve a brew from this link.` + Google is able to see the brew at this link, but reported an error while attempting to retrieve it. - + googleRefreshInstructions, + ### Refreshing your Google Credentials + + This issue is likely caused by an issue with your Google credentials; if you are the owner of this file, the following steps may resolve the issue: + + - Go to https://www.naturalcrit.com/login and click logout if present (in small text at the bottom of the page). + - Click "Sign In with Google", which will refresh your Google credentials. + - After completing the sign in process, return to Homebrewery and refresh/reload the page so that it can pick up the updated credentials. + - If this was the source of the issue, it should now be resolved. + + If following these steps does not resolve the issue, please let us know!`, // Google Drive - 404 : brew deleted or access denied '02' : dedent` @@ -85,9 +76,7 @@ const errorIndex = (props)=>{ : Also note, if you prefer not to use your Google Drive for storage, you can always change the storage location of a brew by clicking the Google drive icon by the - brew title and choosing *transfer my brew to/from Google Drive*.` - - + googleRefreshInstructions, + brew title and choosing *transfer my brew to/from Google Drive*.`, // User is not Authors list '03' : dedent` From a53eacf05522427b9bff50cbf857c7d102d463b9 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 23 Dec 2024 17:17:13 -0500 Subject: [PATCH 33/52] remove CenterPage from ToolBar props centerPage is not used in the toolbar component. --- client/homebrew/brewRenderer/brewRenderer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 4606529f0..453892b1b 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -292,7 +292,7 @@ const BrewRenderer = (props)=>{
- 0 ? state.visiblePages : [state.centerPage]} totalPages={rawPages.length}/> + 0 ? state.visiblePages : [state.centerPage]} totalPages={rawPages.length}/> {/*render in iFrame so broken code doesn't crash the site.*/} Date: Mon, 23 Dec 2024 17:22:50 -0500 Subject: [PATCH 34/52] useCallBack is not needed here. --- client/homebrew/brewRenderer/brewRenderer.jsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 453892b1b..e4c14e86c 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -1,7 +1,7 @@ /*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/ require('./brewRenderer.less'); const React = require('react'); -const { useState, useRef, useCallback, useMemo, useEffect } = React; +const { useState, useRef, useMemo, useEffect } = React; const _ = require('lodash'); const MarkdownLegacy = require('naturalcrit/markdownLegacy.js'); @@ -124,7 +124,7 @@ const BrewRenderer = (props)=>{ rawPages = props.text.split(/^\\page$/gm); } - const handlePageVisibilityChange = useCallback((pageNum, isVisible)=>{ + const handlePageVisibilityChange = (pageNum, isVisible)=>{ setState((prevState)=>{ const updatedVisiblePages = new Set(prevState.visiblePages); isVisible ? updatedVisiblePages.add(pageNum) : updatedVisiblePages.delete(pageNum); @@ -134,16 +134,17 @@ const BrewRenderer = (props)=>{ visiblePages : [...updatedVisiblePages].sort((a, b)=>a - b) }; }); - }, []); + }; - const handleCenterPageChange = useCallback((pageNum)=>{ + const handleCenterPageChange = (pageNum)=>{ setState((prevState)=>({ + //if(prevState.visiblePages.length == 0) ...prevState, centerPage : pageNum, })); props.onPageChange(pageNum); - }, [props.onPageChange]); + }; const isInView = (index)=>{ if(!state.isMounted) From 2b7a1e1cb20af73d915dcdebbfa6ea6d74b28c66 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 23 Dec 2024 18:35:36 -0500 Subject: [PATCH 35/52] Reduce overlapping observer handlers Combine handlePageVisibilityChange and handleCenterPageChange to reduce some of the infrastructure burden for handling centerPage. --- client/homebrew/brewRenderer/brewRenderer.jsx | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index e4c14e86c..376151210 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -47,9 +47,9 @@ const BrewPage = (props)=>{ (entries)=>{ entries.forEach((entry)=>{ if(entry.isIntersecting) - props.onVisibilityChange(props.index + 1, true); // add page to array of visible pages. + props.onVisibilityChange(props.index + 1, true, false); // add page to array of visible pages. else - props.onVisibilityChange(props.index + 1, false); + props.onVisibilityChange(props.index + 1, false, false); }); }, { threshold: .3, rootMargin: '0px 0px 0px 0px' } // detect when >30% of page is within bounds. @@ -60,7 +60,7 @@ const BrewPage = (props)=>{ (entries)=>{ entries.forEach((entry)=>{ if(entry.isIntersecting) - props.onCenterPageChange(props.index + 1); // Set this page as the center page + props.onVisibilityChange(props.index + 1, true, true); // Set this page as the center page }); }, { threshold: 0, rootMargin: '-50% 0px -50% 0px' } // Detect when the page is at the center @@ -124,26 +124,21 @@ const BrewRenderer = (props)=>{ rawPages = props.text.split(/^\\page$/gm); } - const handlePageVisibilityChange = (pageNum, isVisible)=>{ + const handlePageVisibilityChange = (pageNum, isVisible, isCenter)=>{ setState((prevState)=>{ const updatedVisiblePages = new Set(prevState.visiblePages); - isVisible ? updatedVisiblePages.add(pageNum) : updatedVisiblePages.delete(pageNum); + if(!isCenter) + isVisible ? updatedVisiblePages.add(pageNum) : updatedVisiblePages.delete(pageNum); return { ...prevState, - visiblePages : [...updatedVisiblePages].sort((a, b)=>a - b) + visiblePages : [...updatedVisiblePages].sort((a, b)=>a - b), + centerPage : isCenter ? pageNum : prevState.centerPage }; }); - }; - const handleCenterPageChange = (pageNum)=>{ - setState((prevState)=>({ - //if(prevState.visiblePages.length == 0) - ...prevState, - centerPage : pageNum, - })); - - props.onPageChange(pageNum); + if(isCenter) + props.onPageChange(pageNum); }; const isInView = (index)=>{ @@ -181,12 +176,12 @@ const BrewRenderer = (props)=>{ if(props.renderer == 'legacy') { const html = MarkdownLegacy.render(pageText); - return ; + return ; } else { pageText += `\n\n \n\\column\n `; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear) const html = Markdown.render(pageText, index); - return ; + return ; } }; From d588a921474865649484e50a726cfbb7f21bbe3e Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 23 Dec 2024 18:37:20 -0500 Subject: [PATCH 36/52] Change page range to only display a single range Having multiple page ranges visible is a weird edge case that only happens in two-page view. Simplifying logic to just group all page ranges together if a middle page is partly obscured. --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 9257660d1..61e7eee36 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -79,20 +79,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa if(pages.length === 0) return ''; const sortedPages = [...pages].sort((a, b)=>a - b); // Copy and sort the array - const ranges = []; - let start = sortedPages[0]; - - for (let i = 1; i <= sortedPages.length; i++) { - // If the current page is the end of the list or not consecutive - if(i === sortedPages.length || sortedPages[i] !== sortedPages[i - 1] + 1) { - ranges.push( - start === sortedPages[i - 1] ? `${start}` : `${start} - ${sortedPages[i - 1]}` - ); - start = sortedPages[i]; // Start a new range - } - } - - return ranges.join(', '); + return sortedPages.length == 1 ? `${sortedPages[0]}` : `${sortedPages[0]} - ${sortedPages.at(-1)}`; }; return ( From a1237305d79a647a74ef48bf19bed47fb509a144 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 03:11:17 +0000 Subject: [PATCH 37/52] Bump react-router from 7.0.2 to 7.1.1 Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.0.2 to 7.1.1. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router@7.1.1/packages/react-router) --- updated-dependencies: - dependency-name: react-router dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 9 ++++----- package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6ea264030..7af053d21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-frame-component": "^4.1.3", - "react-router": "^7.0.2", + "react-router": "^7.1.1", "sanitize-filename": "1.6.3", "superagent": "^10.1.1", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" @@ -11568,10 +11568,9 @@ "license": "MIT" }, "node_modules/react-router": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.2.tgz", - "integrity": "sha512-m5AcPfTRUcjwmhBzOJGEl6Y7+Crqyju0+TgTQxoS4SO+BkWbhOrcfZNq6wSWdl2BBbJbsAoBUb8ZacOFT+/JlA==", - "license": "MIT", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.1.1.tgz", + "integrity": "sha512-39sXJkftkKWRZ2oJtHhCxmoCrBCULr/HAH4IT5DHlgu/Q0FCPV0S4Lx+abjDTx/74xoZzNYDYbOZWlJjruyuDQ==", "dependencies": { "@types/cookie": "^0.6.0", "cookie": "^1.0.1", diff --git a/package.json b/package.json index 4386b7af7..8c48c956f 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-frame-component": "^4.1.3", - "react-router": "^7.0.2", + "react-router": "^7.1.1", "sanitize-filename": "1.6.3", "superagent": "^10.1.1", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" From f0e047e7cc7b1fee0e502de81847a58c26e610be Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 23 Dec 2024 22:43:37 -0500 Subject: [PATCH 38/52] Remove loop on intersectionObserver entries Guaranteed to only be one entry each time, since we are attaching each page to its own observers. --- client/homebrew/brewRenderer/brewRenderer.jsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 376151210..c0ef848c5 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -45,12 +45,10 @@ const BrewPage = (props)=>{ // Observer for tracking pages within the `.pages` div const visibleObserver = new IntersectionObserver( (entries)=>{ - entries.forEach((entry)=>{ - if(entry.isIntersecting) - props.onVisibilityChange(props.index + 1, true, false); // add page to array of visible pages. - else - props.onVisibilityChange(props.index + 1, false, false); - }); + if(entries[0].isIntersecting) + props.onVisibilityChange(props.index + 1, true, false); // add page to array of visible pages. + else + props.onVisibilityChange(props.index + 1, false, false); }, { threshold: .3, rootMargin: '0px 0px 0px 0px' } // detect when >30% of page is within bounds. ); @@ -58,10 +56,8 @@ const BrewPage = (props)=>{ // Observer for tracking the page at the center of the iframe. const centerObserver = new IntersectionObserver( (entries)=>{ - entries.forEach((entry)=>{ - if(entry.isIntersecting) - props.onVisibilityChange(props.index + 1, true, true); // Set this page as the center page - }); + if(entries[0].isIntersecting) + props.onVisibilityChange(props.index + 1, true, true); // Set this page as the center page }, { threshold: 0, rootMargin: '-50% 0px -50% 0px' } // Detect when the page is at the center ); From 3909d5aef9a77ec4834ebebac41e852bbb57559e Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 23 Dec 2024 22:48:57 -0500 Subject: [PATCH 39/52] remove unused iFrameRef iFrameRef is not used anywhere --- client/homebrew/brewRenderer/brewRenderer.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index c0ef848c5..2d1e6c40b 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -111,7 +111,6 @@ const BrewRenderer = (props)=>{ pageShadows : true }); - const iframeRef = useRef(null); const mainRef = useRef(null); if(props.renderer == 'legacy') { @@ -303,7 +302,7 @@ const BrewRenderer = (props)=>{ && <> {renderedStyle} -
+
{renderedPages}
From 85f1da942facfa1c77d5406269f560aef8282394 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 23 Dec 2024 23:08:30 -0500 Subject: [PATCH 40/52] Restore looping over entries. Needed for very fast scrolling --- client/homebrew/brewRenderer/brewRenderer.jsx | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 2d1e6c40b..5563c5e04 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -45,20 +45,24 @@ const BrewPage = (props)=>{ // Observer for tracking pages within the `.pages` div const visibleObserver = new IntersectionObserver( (entries)=>{ - if(entries[0].isIntersecting) - props.onVisibilityChange(props.index + 1, true, false); // add page to array of visible pages. - else - props.onVisibilityChange(props.index + 1, false, false); - }, + entries.forEach((entry)=>{ + if(entry.isIntersecting) + props.onVisibilityChange(props.index + 1, true, false); // add page to array of visible pages. + else + props.onVisibilityChange(props.index + 1, false, false); + } + )}, { threshold: .3, rootMargin: '0px 0px 0px 0px' } // detect when >30% of page is within bounds. ); // Observer for tracking the page at the center of the iframe. const centerObserver = new IntersectionObserver( (entries)=>{ - if(entries[0].isIntersecting) - props.onVisibilityChange(props.index + 1, true, true); // Set this page as the center page - }, + entries.forEach((entry)=>{ + if(entry.isIntersecting) + props.onVisibilityChange(props.index + 1, true, true); // Set this page as the center page + } + )}, { threshold: 0, rootMargin: '-50% 0px -50% 0px' } // Detect when the page is at the center ); From 628b2542a098828ef7a2ea96e56819a45760dd7a Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 24 Dec 2024 00:02:55 -0500 Subject: [PATCH 41/52] Simplify logic for previous/next buttons --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 61e7eee36..86edf072a 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -199,8 +199,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa type='button' title='Previous Page(s)' onClick={()=>{ - const rangeOffset = visiblePages.length > 1 ? 1 : 0; - scrollToPage(_.min(visiblePages) - visiblePages.length + rangeOffset); + scrollToPage(_.min(visiblePages) - visiblePages.length); }} disabled={visiblePages.includes(1)} > @@ -232,17 +231,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa type='button' title='Next Page(s)' onClick={()=>{ - // if there are multiple pages in a 'row' and they are in 'view', - // then the 'max'/last page in view will always be the same, and - // the other pages will always be the same (since the viewport doesn't change). - // So this needs to scroll to the 'max', then see what is newly in view, - // and if the same pages are visible, do it again but +1. - const start = _.max(visiblePages); - scrollToPage(start); - if(start === _.max(visiblePages)){ - console.log("oh no") - scrollToPage(start + 1); - }; + scrollToPage(_.max(visiblePages) + 1); }} disabled={visiblePages.includes(totalPages)} > From c0155052ea2563f514f9e10da1b99940a3d88726 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 24 Dec 2024 00:06:30 -0500 Subject: [PATCH 42/52] Further simplifying --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 86edf072a..b31ee9589 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -198,9 +198,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa className='previousPage tool' type='button' title='Previous Page(s)' - onClick={()=>{ - scrollToPage(_.min(visiblePages) - visiblePages.length); - }} + onClick={()=>scrollToPage(_.min(visiblePages) - visiblePages.length)} disabled={visiblePages.includes(1)} > @@ -230,9 +228,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa className='tool' type='button' title='Next Page(s)' - onClick={()=>{ - scrollToPage(_.max(visiblePages) + 1); - }} + onClick={()=>scrollToPage(_.max(visiblePages) + 1)} disabled={visiblePages.includes(totalPages)} > From 0632d78f717c3face615ffd41c26ffbc92542dab Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 24 Dec 2024 00:18:37 -0500 Subject: [PATCH 43/52] Remove toolbar checks for empty visiblePages list With `centerPage`, ToolBar will never receive an empty visiblePages array. No need to check if visiblepages.length == 0 --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index b31ee9589..598981eaa 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -15,9 +15,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa const [toolsVisible, setToolsVisible] = useState(true); useEffect(()=>{ - if(visiblePages.length !== 0){ // If zoomed in enough, it's possible that no page fits the intersection criteria, so don't update. - setPageNum(formatVisiblePages(visiblePages)); - } + setPageNum(formatVisiblePages(visiblePages)); }, [visiblePages]); const handleZoomButton = (zoom)=>{ @@ -74,12 +72,9 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa return deltaZoom; }; - // format the visible pages to work with ranges, including separate ranges ("2-7, 10-15") + // format the visible pages into a range (e.g. "150-153") const formatVisiblePages = (pages)=>{ - if(pages.length === 0) return ''; - - const sortedPages = [...pages].sort((a, b)=>a - b); // Copy and sort the array - return sortedPages.length == 1 ? `${sortedPages[0]}` : `${sortedPages[0]} - ${sortedPages.at(-1)}`; + return pages.length === 1 ? `${pages[0]}` : `${pages[0]} - ${pages.at(-1)}`; }; return ( From 8159c408c8dfdda9c5398d197cf6e3c5a4d49aed Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 24 Dec 2024 00:24:52 -0500 Subject: [PATCH 44/52] Move formatVisiblePages After simplifying, this has become a single-line function used in only one place. Can just be placed directly in the one place it is used. --- client/homebrew/brewRenderer/toolBar/toolBar.jsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 598981eaa..ce60971aa 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -15,7 +15,9 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa const [toolsVisible, setToolsVisible] = useState(true); useEffect(()=>{ - setPageNum(formatVisiblePages(visiblePages)); + // format multiple visible pages as a range (e.g. "150-153") + const pageRange = visiblePages.length === 1 ? `${visiblePages[0]}` : `${visiblePages[0]} - ${visiblePages.at(-1)}`; + setPageNum(pageRange); }, [visiblePages]); const handleZoomButton = (zoom)=>{ @@ -72,11 +74,6 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa return deltaZoom; }; - // format the visible pages into a range (e.g. "150-153") - const formatVisiblePages = (pages)=>{ - return pages.length === 1 ? `${pages[0]}` : `${pages[0]} - ${pages.at(-1)}`; - }; - return ( - 0 ? state.visiblePages : [state.centerPage]} totalPages={rawPages.length}/> + 0 ? state.visiblePages : [state.centerPage]} totalPages={rawPages.length}/> {/*render in iFrame so broken code doesn't crash the site.*/} Date: Tue, 24 Dec 2024 00:38:36 -0500 Subject: [PATCH 46/52] Undo --- client/homebrew/brewRenderer/brewRenderer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index ed73c8839..5563c5e04 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -287,7 +287,7 @@ const BrewRenderer = (props)=>{
- 0 ? state.visiblePages : [state.centerPage]} totalPages={rawPages.length}/> + 0 ? state.visiblePages : [state.centerPage]} totalPages={rawPages.length}/> {/*render in iFrame so broken code doesn't crash the site.*/} Date: Tue, 24 Dec 2024 01:00:32 -0500 Subject: [PATCH 47/52] Implement content-visibility on pages --- themes/Legacy/5ePHB/style.less | 36 ++++++++++++++++++---------------- themes/V3/Blank/style.less | 26 ++++++++++++------------ 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/themes/Legacy/5ePHB/style.less b/themes/Legacy/5ePHB/style.less index 09eb2eec7..4ebfbf840 100644 --- a/themes/Legacy/5ePHB/style.less +++ b/themes/Legacy/5ePHB/style.less @@ -42,23 +42,25 @@ body { } .phb, .page{ .useColumns(); - counter-increment : phb-page-numbers; - position : relative; - z-index : 15; - box-sizing : border-box; - overflow : hidden; - height : 279.4mm; - width : 215.9mm; - padding : 1.0cm 1.7cm; - padding-bottom : 1.5cm; - background-color : @background; - background-image : @backgroundImage; - font-family : BookSanity; - font-size : 0.317cm; - text-rendering : optimizeLegibility; - page-break-before : always; - page-break-after : always; - contain : size; + counter-increment : phb-page-numbers; + position : relative; + z-index : 15; + box-sizing : border-box; + overflow : hidden; + height : 279.4mm; + width : 215.9mm; + padding : 1.0cm 1.7cm; + padding-bottom : 1.5cm; + background-color : @background; + background-image : @backgroundImage; + font-family : BookSanity; + font-size : 0.317cm; + text-rendering : optimizeLegibility; + page-break-before : always; + page-break-after : always; + contain : strict; + content-visibility : auto; + contain-intrinsic-size : auto none; } .phb{ diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index 8229baa28..4f838a5d1 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -45,19 +45,21 @@ body { counter-reset : page-numbers 0; } } .page { .useColumns(); - position : relative; - z-index : 15; - box-sizing : border-box; - width : 215.9mm; - height : 279.4mm; - padding : 1.4cm 1.9cm 1.7cm; - overflow : hidden; - background-color : var(--HB_Color_Background); - text-rendering : optimizeLegibility; - contain : size; + position : relative; + z-index : 15; + box-sizing : border-box; + width : 215.9mm; + height : 279.4mm; + padding : 1.4cm 1.9cm 1.7cm; + overflow : hidden; + background-color : var(--HB_Color_Background); + text-rendering : optimizeLegibility; + contain : strict; + content-visibility : auto; + contain-intrinsic-size : auto none; } -//***************************** -// * BASE + //***************************** + // * BASE // *****************************/ .page { p { From 1a9a726263f2284b31641811e3bc79ea79c1d98b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 06:02:15 +0000 Subject: [PATCH 48/52] Bump eslint-plugin-react from 7.37.2 to 7.37.3 Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.37.2 to 7.37.3. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.37.3/CHANGELOG.md) - [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.2...v7.37.3) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 883 +++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 486 insertions(+), 399 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7af053d21..86621deaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,7 +57,7 @@ "babel-plugin-transform-import-meta": "^2.2.1", "eslint": "^9.17.0", "eslint-plugin-jest": "^28.10.0", - "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react": "^7.37.3", "globals": "^15.14.0", "jest": "^29.7.0", "jest-expect-message": "^1.1.3", @@ -3240,14 +3240,13 @@ } }, "node_modules/array-buffer-byte-length": { - "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==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" }, "engines": { "node": ">= 0.4" @@ -3343,16 +3342,15 @@ } }, "node_modules/array.prototype.flatmap": { - "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==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -3379,20 +3377,18 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, - "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", "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" + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" }, "engines": { "node": ">= 0.4" @@ -3502,7 +3498,6 @@ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, - "license": "MIT", "dependencies": { "possible-typed-array-names": "^1.0.0" }, @@ -4207,16 +4202,41 @@ "license": "MIT" }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "license": "MIT", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "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" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -4931,15 +4951,14 @@ } }, "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4949,31 +4968,29 @@ } }, "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/inspect-js" } }, "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" }, @@ -5269,6 +5286,19 @@ "@types/trusted-types": "^2.0.7" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -5393,58 +5423,58 @@ } }, "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "version": "1.23.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.7.tgz", + "integrity": "sha512-OygGC8kIcDhXX+6yAZRGLqwi2CmEXCbLQixeGUgYeR+Qwlppqmo7DIDr8XibtEBZp+fJcoYpoatp5qwLMEdcqQ==", "dev": true, - "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "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", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.6", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", + "object.assign": "^4.1.7", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.3", + "safe-regex-test": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", - "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.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" }, "engines": { "node": ">= 0.4" @@ -5454,13 +5484,9 @@ } }, "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==", - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "engines": { "node": ">= 0.4" } @@ -5475,25 +5501,27 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.1.0.tgz", - "integrity": "sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", + "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", + "es-abstract": "^1.23.6", "es-errors": "^1.3.0", "es-set-tostringtag": "^2.0.3", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", + "get-intrinsic": "^1.2.6", "globalthis": "^1.0.4", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "iterator.prototype": "^1.1.3", - "safe-array-concat": "^1.1.2" + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "iterator.prototype": "^1.1.4", + "safe-array-concat": "^1.1.3" }, "engines": { "node": ">= 0.4" @@ -5503,7 +5531,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -5538,15 +5565,14 @@ } }, "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", "dev": true, - "license": "MIT", "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" }, "engines": { "node": ">= 0.4" @@ -5655,28 +5681,28 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.37.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz", - "integrity": "sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==", + "version": "7.37.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.3.tgz", + "integrity": "sha512-DomWuTQPFYZwF/7c9W2fkKkStqZmBd3uugfqBYLdkZ3Hii23WzZuOLUskGxB8qkSKqftxEeGL1TB2kMhrce0jA==", "dev": true, "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.2", + "array.prototype.flatmap": "^1.3.3", "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.1.0", + "es-iterator-helpers": "^1.2.1", "estraverse": "^5.3.0", "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", "object.entries": "^1.1.8", "object.fromentries": "^2.0.8", - "object.values": "^1.2.0", + "object.values": "^1.2.1", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.5", "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.11", + "string.prototype.matchall": "^4.0.12", "string.prototype.repeat": "^1.0.0" }, "engines": { @@ -6359,7 +6385,6 @@ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, - "license": "MIT", "dependencies": { "is-callable": "^1.1.3" } @@ -6474,16 +6499,17 @@ } }, "node_modules/function.prototype.name": { - "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==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" }, "engines": { "node": ">= 0.4" @@ -6569,16 +6595,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "license": "MIT", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", + "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -6611,15 +6641,14 @@ } }, "node_modules/get-symbol-description": { - "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==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -6817,12 +6846,11 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6857,11 +6885,13 @@ } }, "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, - "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6888,10 +6918,13 @@ } }, "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "license": "MIT", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, + "dependencies": { + "dunder-proto": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -6900,10 +6933,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "license": "MIT", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "engines": { "node": ">= 0.4" }, @@ -7335,15 +7367,14 @@ } }, "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, - "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "hasown": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -7371,14 +7402,14 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -7410,13 +7441,15 @@ } }, "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "dev": true, - "license": "MIT", "dependencies": { - "has-bigints": "^1.0.1" + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7435,14 +7468,13 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", + "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7462,7 +7494,6 @@ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -7498,12 +7529,13 @@ } }, "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", "dev": true, - "license": "MIT", "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", "is-typed-array": "^1.1.13" }, "engines": { @@ -7514,13 +7546,13 @@ } }, "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, - "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7561,12 +7593,15 @@ } }, "node_modules/is-finalizationregistry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", - "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7630,19 +7665,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -7653,13 +7675,13 @@ } }, "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, - "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7687,14 +7709,15 @@ "peer": true }, "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -7716,13 +7739,12 @@ } }, "node_modules/is-shared-array-buffer": { - "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==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -7744,13 +7766,13 @@ } }, "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, - "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7760,13 +7782,14 @@ } }, "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, - "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -7776,13 +7799,12 @@ } }, "node_modules/is-typed-array": { - "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==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, - "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -7804,26 +7826,28 @@ } }, "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.0.tgz", + "integrity": "sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -7851,8 +7875,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/isexe": { "version": "2.0.0", @@ -7978,16 +8001,17 @@ } }, "node_modules/iterator.prototype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.3.tgz", - "integrity": "sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.4.tgz", + "integrity": "sha512-x4WH0BWmrMmg4oHHl+duwubhrvczGlyuGAZu3nvrf0UXOfPu8IhZObFEr7DE/iv01YgVZrsOiRcqw2srkKEDIA==", "dev": true, "dependencies": { - "define-properties": "^1.2.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.4", - "set-function-name": "^2.0.1" + "define-data-property": "^1.1.4", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", + "reflect.getprototypeof": "^1.0.8", + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -9808,6 +9832,14 @@ "node": ">=0.10.0" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/mathml-tag-names": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", @@ -10617,10 +10649,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "license": "MIT", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "engines": { "node": ">= 0.4" }, @@ -10650,14 +10681,15 @@ } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "license": "MIT", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" }, "engines": { @@ -10714,13 +10746,13 @@ } }, "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, @@ -11154,7 +11186,6 @@ "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, - "license": "MIT", "engines": { "node": ">= 0.4" } @@ -11657,18 +11688,19 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", - "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.9.tgz", + "integrity": "sha512-r0Ay04Snci87djAsI4U+WNRcSw5S4pOH7qFjd/veA5gC7TbqESR3tcj28ia95L/fYUDw11JKP7uqUKUAfVvV5Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.23.1", + "dunder-proto": "^1.0.1", + "es-abstract": "^1.23.6", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "which-builtin-type": "^1.1.3" + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "which-builtin-type": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -11757,16 +11789,15 @@ } }, "node_modules/regexp.prototype.flags": { - "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==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", + "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -11979,15 +12010,15 @@ } }, "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "engines": { @@ -12027,15 +12058,14 @@ } }, "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "is-regex": "^1.1.4" + "is-regex": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -12292,15 +12322,65 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "license": "MIT", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -12756,24 +12836,24 @@ } }, "node_modules/string.prototype.matchall": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", - "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", + "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", + "es-abstract": "^1.23.6", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "regexp.prototype.flags": "^1.5.2", + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.3", "set-function-name": "^2.0.2", - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -12794,16 +12874,18 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -12813,16 +12895,19 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -13668,32 +13753,30 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -13703,18 +13786,18 @@ } }, "node_modules/typed-array-byte-offset": { - "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==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, - "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" }, "engines": { "node": ">= 0.4" @@ -13724,18 +13807,17 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-proto": "^1.0.3", "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" }, "engines": { "node": ">= 0.4" @@ -13775,16 +13857,18 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -14563,40 +14647,43 @@ } }, "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", "dev": true, - "license": "MIT", "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-builtin-type": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz", - "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", "dev": true, "dependencies": { + "call-bound": "^1.0.2", "function.prototype.name": "^1.1.6", "has-tostringtag": "^1.0.2", "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", - "is-finalizationregistry": "^1.0.2", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", + "is-regex": "^1.2.1", "is-weakref": "^1.0.2", "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", + "which-boxed-primitive": "^1.1.0", "which-collection": "^1.0.2", - "which-typed-array": "^1.1.15" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -14624,16 +14711,16 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", "dev": true, - "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "for-each": "^0.3.3", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" }, "engines": { diff --git a/package.json b/package.json index 8c48c956f..fba3db7d8 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "babel-plugin-transform-import-meta": "^2.2.1", "eslint": "^9.17.0", "eslint-plugin-jest": "^28.10.0", - "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react": "^7.37.3", "globals": "^15.14.0", "jest": "^29.7.0", "jest-expect-message": "^1.1.3", From 9804c3933f4de63298d4e0a293336cb5d8eb2e66 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 26 Dec 2024 19:09:23 -0500 Subject: [PATCH 49/52] Remove unneeded dependencies for useEffect UseEffect is only intended to be called once. Similarly, handleControlKeys doesn't need "useCallBack" because it will never be passed to a child or trigger any re-render by changing. --- client/homebrew/pages/sharePage/sharePage.jsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/homebrew/pages/sharePage/sharePage.jsx b/client/homebrew/pages/sharePage/sharePage.jsx index b561ead3f..439c38d6a 100644 --- a/client/homebrew/pages/sharePage/sharePage.jsx +++ b/client/homebrew/pages/sharePage/sharePage.jsx @@ -26,7 +26,7 @@ const SharePage = (props)=>{ updateState({ currentBrewRendererPageNum: pageNumber }); }, []); - const handleControlKeys = useCallback((e)=>{ + const handleControlKeys = (e)=>{ if(!(e.ctrlKey || e.metaKey)) return; const P_KEY = 80; if(e.keyCode === P_KEY) { @@ -34,14 +34,12 @@ const SharePage = (props)=>{ e.stopPropagation(); e.preventDefault(); } - }, []); + }; useEffect(()=>{ document.addEventListener('keydown', handleControlKeys); fetchThemeBundle( - { - setState, - }, + { setState }, brew.renderer, brew.theme ); @@ -49,7 +47,7 @@ const SharePage = (props)=>{ return ()=>{ document.removeEventListener('keydown', handleControlKeys); }; - }, [brew.renderer, brew.theme, handleControlKeys]); + }, []); const processShareId = useCallback(()=>{ return brew.googleId && !brew.stubbed ? brew.googleId + brew.shareId : brew.shareId; From a2c4f73e7d8d2d4364f46b39cc82c1688d48c468 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 26 Dec 2024 19:12:34 -0500 Subject: [PATCH 50/52] processShareId does not need useCallback() --- client/homebrew/pages/sharePage/sharePage.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/sharePage/sharePage.jsx b/client/homebrew/pages/sharePage/sharePage.jsx index 439c38d6a..f57a79507 100644 --- a/client/homebrew/pages/sharePage/sharePage.jsx +++ b/client/homebrew/pages/sharePage/sharePage.jsx @@ -49,9 +49,9 @@ const SharePage = (props)=>{ }; }, []); - const processShareId = useCallback(()=>{ + const processShareId = ()=>{ return brew.googleId && !brew.stubbed ? brew.googleId + brew.shareId : brew.shareId; - }, [brew]); + }; const renderEditLink = ()=>{ if(!brew.editId) return null; From bc7297de2e93c23ac496d9542d2fab8619bc5bd7 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 26 Dec 2024 19:15:33 -0500 Subject: [PATCH 51/52] Mirror editId logic from shareId --- client/homebrew/pages/sharePage/sharePage.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/homebrew/pages/sharePage/sharePage.jsx b/client/homebrew/pages/sharePage/sharePage.jsx index f57a79507..a07ed0f0e 100644 --- a/client/homebrew/pages/sharePage/sharePage.jsx +++ b/client/homebrew/pages/sharePage/sharePage.jsx @@ -56,10 +56,7 @@ const SharePage = (props)=>{ const renderEditLink = ()=>{ if(!brew.editId) return null; - let editLink = brew.editId; - if(brew.googleId && !brew.stubbed) { - editLink = brew.googleId + editLink; - } + const editLink = brew.googleId && ! brew.stubbed ? brew.googleId + brew.editId : brew.editId; return ( From d84f071c62beca7e59f54863f1d240b5a8d37b93 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 26 Dec 2024 19:20:25 -0500 Subject: [PATCH 52/52] Other small cleanup --- client/homebrew/pages/sharePage/sharePage.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/homebrew/pages/sharePage/sharePage.jsx b/client/homebrew/pages/sharePage/sharePage.jsx index a07ed0f0e..15eae54f7 100644 --- a/client/homebrew/pages/sharePage/sharePage.jsx +++ b/client/homebrew/pages/sharePage/sharePage.jsx @@ -65,9 +65,8 @@ const SharePage = (props)=>{ ); }; - const titleStyle = disableMeta ? { cursor: 'default' } : {}; const titleEl = ( - + {brew.title} );