0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof j.action=="function"?j.action:this.defaultAction,this.target=typeof j.target=="function"?j.target:this.defaultTarget,this.text=typeof j.text=="function"?j.text:this.defaultText,this.container=Pe(j.container)==="object"?j.container:document.body}},{key:"listenClick",value:function(j){var Q=this;this.listener=p()(j,"click",function(Ae){return Q.onClick(Ae)})}},{key:"onClick",value:function(j){var Q=j.delegateTarget||j.currentTarget,Ae=this.action(Q)||"copy",Ft=Ue({action:Ae,container:this.container,target:this.target(Q),text:this.text(Q)});this.emit(Ft?"success":"error",{action:Ae,text:Ft,trigger:Q,clearSelection:function(){Q&&Q.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(j){return _r("action",j)}},{key:"defaultTarget",value:function(j){var Q=_r("target",j);if(Q)return document.querySelector(Q)}},{key:"defaultText",value:function(j){return _r("text",j)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(j){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return V(j,Q)}},{key:"cut",value:function(j){return h(j)}},{key:"isSupported",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],Q=typeof j=="string"?[j]:j,Ae=!!document.queryCommandSupported;return Q.forEach(function(Ft){Ae=Ae&&!!document.queryCommandSupported(Ft)}),Ae}}]),_}(s()),fa=pa},828:function(n){var o=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function a(s,c){for(;s&&s.nodeType!==o;){if(typeof s.matches=="function"&&s.matches(c))return s;s=s.parentNode}}n.exports=a},438:function(n,o,i){var a=i(828);function s(f,l,m,d,h){var b=p.apply(this,arguments);return f.addEventListener(m,b,h),{destroy:function(){f.removeEventListener(m,b,h)}}}function c(f,l,m,d,h){return typeof f.addEventListener=="function"?s.apply(null,arguments):typeof m=="function"?s.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(b){return s(b,l,m,d,h)}))}function p(f,l,m,d){return function(h){h.delegateTarget=a(h.target,l),h.delegateTarget&&d.call(f,h)}}n.exports=c},879:function(n,o){o.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},o.nodeList=function(i){var a=Object.prototype.toString.call(i);return i!==void 0&&(a==="[object NodeList]"||a==="[object HTMLCollection]")&&"length"in i&&(i.length===0||o.node(i[0]))},o.string=function(i){return typeof i=="string"||i instanceof String},o.fn=function(i){var a=Object.prototype.toString.call(i);return a==="[object Function]"}},370:function(n,o,i){var a=i(879),s=i(438);function c(m,d,h){if(!m&&!d&&!h)throw new Error("Missing required arguments");if(!a.string(d))throw new TypeError("Second argument must be a String");if(!a.fn(h))throw new TypeError("Third argument must be a Function");if(a.node(m))return p(m,d,h);if(a.nodeList(m))return f(m,d,h);if(a.string(m))return l(m,d,h);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(m,d,h){return m.addEventListener(d,h),{destroy:function(){m.removeEventListener(d,h)}}}function f(m,d,h){return Array.prototype.forEach.call(m,function(b){b.addEventListener(d,h)}),{destroy:function(){Array.prototype.forEach.call(m,function(b){b.removeEventListener(d,h)})}}}function l(m,d,h){return s(document.body,m,d,h)}n.exports=c},817:function(n){function o(i){var a;if(i.nodeName==="SELECT")i.focus(),a=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var s=i.hasAttribute("readonly");s||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),s||i.removeAttribute("readonly"),a=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var c=window.getSelection(),p=document.createRange();p.selectNodeContents(i),c.removeAllRanges(),c.addRange(p),a=c.toString()}return a}n.exports=o},279:function(n){function o(){}o.prototype={on:function(i,a,s){var c=this.e||(this.e={});return(c[i]||(c[i]=[])).push({fn:a,ctx:s}),this},once:function(i,a,s){var c=this;function p(){c.off(i,p),a.apply(s,arguments)}return p._=a,this.on(i,p,s)},emit:function(i){var a=[].slice.call(arguments,1),s=((this.e||(this.e={}))[i]||[]).slice(),c=0,p=s.length;for(c;c{"use strict";var Is=/["'&<>]/;Mi.exports=js;function js(e){var t=""+e,r=Is.exec(t);if(!r)return t;var n,o="",i=0,a=0;for(i=r.index;i{function e(o,i){parent.postMessage(o,i||"*")}function t(...o){return o.reduce((i,a)=>i.then(()=>new Promise(s=>{let c=document.createElement("script");c.src=a,c.addEventListener("load",()=>s()),document.body.appendChild(c)})),Promise.resolve())}function r(){let o=document.createElement("iframe");return o.width=o.height=o.frameBorder="0",o}var n=class{constructor(o,i){if(this.url=o,this.onerror=null,this.onmessage=null,this.onmessageerror=null,this.handleMessage=s=>{s.source===this.worker&&(s.stopImmediatePropagation(),this.dispatchEvent(new MessageEvent("message",{data:s.data})),this.onmessage&&this.onmessage(s))},this.handleError=(s,c,p,f,l)=>{if(c===this.url.toString()){let m=new ErrorEvent("error",{message:s,filename:c,lineno:p,colno:f,error:l});this.dispatchEvent(m),this.onerror&&this.onerror(m)}},typeof i!="undefined")throw new TypeError("Options are not supported for iframe workers");let a=new EventTarget;this.addEventListener=a.addEventListener.bind(a),this.removeEventListener=a.removeEventListener.bind(a),this.dispatchEvent=a.dispatchEvent.bind(a),document.body.appendChild(this.iframe=r()),this.worker.document.open(),this.worker.document.write(`
{% endblock %}
{% block scripts %}
-
+
{% for path in config.extra_javascript %}
{% endfor %}
diff --git a/material/partials/consent.html b/material/partials/consent.html
index 6156c60e9..afb7038f6 100644
--- a/material/partials/consent.html
+++ b/material/partials/consent.html
@@ -7,7 +7,7 @@
{% set _ = cookies.update({ "analytics": "Google Analytics" }) %}
{% endif %}
{% endif %}
-{% if "github.com" in config.repo_url %}
+{% if config.repo_url and "github.com" in config.repo_url %}
{% if "github" not in cookies %}
{% set _ = cookies.update({ "github": "GitHub" }) %}
{% endif %}
diff --git a/package-lock.json b/package-lock.json
index 92e6373eb..0577523ae 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "mkdocs-material",
- "version": "8.5.3+insiders-4.24.0",
+ "version": "8.5.4+insiders-4.24.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "mkdocs-material",
- "version": "8.5.3+insiders-4.24.0",
+ "version": "8.5.4+insiders-4.24.1",
"license": "MIT",
"dependencies": {
"array-flat-polyfill": "^1.0.1",
diff --git a/package.json b/package.json
index 3cd10a140..4101ce835 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "mkdocs-material",
- "version": "8.5.3+insiders-4.24.0",
+ "version": "8.5.4+insiders-4.24.1",
"description": "Documentation that simply works",
"keywords": [
"mkdocs",
diff --git a/src/assets/javascripts/components/content/code/mermaid/index.css b/src/assets/javascripts/components/content/code/mermaid/index.css
index 403deb9ed..f683f9d67 100644
--- a/src/assets/javascripts/components/content/code/mermaid/index.css
+++ b/src/assets/javascripts/components/content/code/mermaid/index.css
@@ -337,9 +337,10 @@ line {
stroke: var(--md-mermaid-edge-color);
}
-/* Sequence message and loop text */
+/* Sequence message, loop and note text */
.messageText,
-.loopText > tspan {
+.loopText > tspan,
+.noteText > tspan {
font-family: var(--md-mermaid-font-family) !important;
fill: var(--md-mermaid-edge-color);
stroke: none;
diff --git a/src/assets/javascripts/components/content/code/mermaid/index.ts b/src/assets/javascripts/components/content/code/mermaid/index.ts
index 457b75942..a0746d50f 100644
--- a/src/assets/javascripts/components/content/code/mermaid/index.ts
+++ b/src/assets/javascripts/components/content/code/mermaid/index.ts
@@ -92,7 +92,12 @@ export function mountMermaid(
.pipe(
tap(() => mermaid.initialize({
startOnLoad: false,
- themeCSS
+ themeCSS,
+ sequence: {
+ actorFontSize: "16px", // Hack: mitigate https://bit.ly/3y0NEi3
+ messageFontSize: "16px",
+ noteFontSize: "16px"
+ }
})),
map(() => undefined),
shareReplay(1)
diff --git a/src/assets/stylesheets/main/layout/_sidebar.scss b/src/assets/stylesheets/main/layout/_sidebar.scss
index 67c511cbe..9c031d500 100644
--- a/src/assets/stylesheets/main/layout/_sidebar.scss
+++ b/src/assets/stylesheets/main/layout/_sidebar.scss
@@ -130,6 +130,7 @@
// this reason, we disable scroll snapping until this is resolved (#1667).
// scroll-snap-type: y mandatory;
scrollbar-width: thin;
+ scrollbar-gutter: stable;
scrollbar-color: var(--md-default-fg-color--lighter) transparent;
// Sidebar scroll wrapper on hover
@@ -154,19 +155,24 @@
}
}
- // Sidebar wrapper
- &__inner {
+ // Hack: the scrollbar is only visible when the sidebar's contents overflow,
+ // which is nice, but leads to the problem where the chevrons of expandable
+ // sections will jump by `4px` when the sidebar is shown. We wanted to fix
+ // this problem for so long, but haven't found a clean way of doing it.
+ // Until now. The following declaration is only applied to Webkit browsers
+ // (e.g. Chrome and Safari), which support styling of scrollbars. The trick
+ // is to add conditional padding on the side of the scrollbar only if the
+ // sidebar's content doesn't overflow. This hack is inspired and adapted
+ // from Ayke van Laëthem's year old trick – see https://bit.ly/3Sb1qql
+ @supports selector(::-webkit-scrollbar) {
- // Hack: the scrollbar is only visible when the sidebar's contents overflow,
- // which is nice, but leads to the problem where the chevrons of expandable
- // sections will jump by `4px` when the sidebar is shown. We wanted to fix
- // this problem for so long, but haven't found a clean way of doing it.
- // Until now. The following declaration is only applied to Webkit browsers
- // (e.g. Chrome and Safari), which support styling of scrollbars. The trick
- // is to add conditional padding on the side of the scrollbar only if the
- // sidebar's content doesn't overflow. This hack is inspired and adapted
- // from Ayke van Laëthem's year old trick – see https://bit.ly/3Sb1qql
- @supports selector(::-webkit-scrollbar) {
+ // Sidebar scroll wrapper
+ &__scrollwrap {
+ scrollbar-gutter: auto;
+ }
+
+ // Sidebar wrapper
+ &__inner {
padding-inline-end: calc(100% - #{px2rem(230px)});
}
}