diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index dba99638b..b9b9f5589 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -179,8 +179,8 @@ const BrewRenderer = (props)=>{ styleObject.backgroundImage = `url("data:image/svg+xml;utf8,${global.config.deployment}")`; } - const renderedStyle = useMemo(()=> renderStyle(), [props.style?.length, props.themeBundle]); - renderedPages = useMemo(() => renderPages(), [props.text?.length]); + const renderedStyle = useMemo(()=> renderStyle(), [props.style, props.themeBundle]); + renderedPages = useMemo(() => renderPages(), [props.text]); return ( <> diff --git a/package-lock.json b/package-lock.json index e3fb0ad29..76c6e2dd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", - "mongoose": "^8.7.1", + "mongoose": "^8.7.2", "nanoid": "3.3.4", "nconf": "^0.12.1", "react": "^18.3.1", @@ -10661,9 +10661,9 @@ } }, "node_modules/mongoose": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.1.tgz", - "integrity": "sha512-RpNMyhyzLVCVbf8xTVbrf/18G3MqQzNw5pJdvOJ60fzbCa3cOZzz9L+8XpqzBXtRlgZGWv0T7MmOtvrT8ocp1Q==", + "version": "8.7.2", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.2.tgz", + "integrity": "sha512-Ok4VzMds9p5G3ZSUhmvBm1GdxanbzhS29jpSn02SPj+IXEVFnIdfwAlHHXWkyNscZKlcn8GuMi68FH++jo0flg==", "dependencies": { "bson": "^6.7.0", "kareem": "2.6.3", diff --git a/package.json b/package.json index a4c6ee38a..d25c1b1d1 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", - "mongoose": "^8.7.1", + "mongoose": "^8.7.2", "nanoid": "3.3.4", "nconf": "^0.12.1", "react": "^18.3.1", diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 543b1cf5c..dbcdc6f2a 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -154,31 +154,6 @@ module.exports = [ ] }, - { - name : 'Table of Contents Toggles', - icon : 'fas fa-book', - //gen : `{{tocGlobalH4}}\n\n`, - disabled : true - // RELIES ON .PAGES:HAS() WHICH IS VERY SLOW - // WILL BE MOVED TO STYLE TAB SNIPPETS - // subsnippets : [ - // { - // name : 'Enable H1-H4 all pages', - // icon : 'fas fa-dice-four', - // gen : `{{tocGlobalH4}}\n\n`, - // }, - // { - // name : 'Enable H1-H5 all pages', - // icon : 'fas fa-dice-five', - // gen : `{{tocGlobalH5}}\n\n`, - // }, - // { - // name : 'Enable H1-H6 all pages', - // icon : 'fas fa-dice-six', - // gen : `{{tocGlobalH6}}\n\n`, - // }, - // ] - } ] }, { @@ -217,6 +192,27 @@ module.exports = [ line-height: 1em; }\n\n` }, + { + name : 'Table of Contents Toggles', + icon : 'fas fa-book', + subsnippets : [ + { + name : 'Enable H1-H4 all pages', + icon : 'fas fa-dice-four', + gen : `.page {\n\th4 {--TOC: include; }\n}\n\n`, + }, + { + name : 'Enable H1-H5 all pages', + icon : 'fas fa-dice-five', + gen : `.page {\n\th4, h5 {--TOC: include; }\n}\n\n`, + }, + { + name : 'Enable H1-H6 all pages', + icon : 'fas fa-dice-six', + gen : `.page {\n\th4, h5, h6 {--TOC: include; }\n}\n\n`, + }, + ] + } ] }, diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 1216d0370..ba975e58a 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -814,18 +814,6 @@ h6, // These add Headers 'back' to inclusion. //NOTE: DO NOT USE :HAS WITH .PAGES!!! EXTREMELY SLOW TO RENDER ON LARGE DOCS! -//WILL BE MOVED TO A STYLE TAB SNIPPET INSTEAD -// .pages:has(.tocGlobalH4) { -// h4 {--TOC: include; } -// } - -// .pages:has(.tocGlobalH5) { -// h4, h5 {--TOC: include; } -// } - -// .pages:has(.tocGlobalH6) { -// h4, h5, h6 {--TOC: include; } -// } // Block level inclusion changes // These include either a single (include) or a range (depth)