@qubit-ltd/jsdoc-theme 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +260 -0
  2. package/LICENSE +21 -0
  3. package/README.md +798 -0
  4. package/clean-jsdoc-theme-defaults.js +37 -0
  5. package/clean-jsdoc-theme-helper.js +186 -0
  6. package/helpers/Environment.html +3 -0
  7. package/helpers/down-arrow.js +9 -0
  8. package/helpers/i18n.js +106 -0
  9. package/i18n/en.json +76 -0
  10. package/i18n/zh.json +76 -0
  11. package/package.json +83 -0
  12. package/publish.js +1133 -0
  13. package/static/fonts/Inconsolata-Regular.ttf +0 -0
  14. package/static/fonts/OpenSans-Regular.ttf +0 -0
  15. package/static/fonts/WorkSans-Bold.ttf +0 -0
  16. package/static/scripts/core.js +720 -0
  17. package/static/scripts/core.min.js +23 -0
  18. package/static/scripts/resize.js +90 -0
  19. package/static/scripts/search.js +269 -0
  20. package/static/scripts/search.min.js +6 -0
  21. package/static/scripts/third-party/Apache-License-2.0.txt +202 -0
  22. package/static/scripts/third-party/fuse.js +1749 -0
  23. package/static/scripts/third-party/hljs-line-num-original.js +367 -0
  24. package/static/scripts/third-party/hljs-line-num.js +1 -0
  25. package/static/scripts/third-party/hljs-original.js +5260 -0
  26. package/static/scripts/third-party/hljs.js +1 -0
  27. package/static/scripts/third-party/popper.js +1287 -0
  28. package/static/scripts/third-party/tippy.js +1499 -0
  29. package/static/scripts/third-party/tocbot.js +757 -0
  30. package/static/scripts/third-party/tocbot.min.js +1 -0
  31. package/static/styles/clean-jsdoc-theme-base.css +1257 -0
  32. package/static/styles/clean-jsdoc-theme-dark.css +412 -0
  33. package/static/styles/clean-jsdoc-theme-light.css +482 -0
  34. package/static/styles/clean-jsdoc-theme-scrollbar.css +30 -0
  35. package/static/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
  36. package/static/styles/clean-jsdoc-theme.min.css +1 -0
  37. package/tmpl/augments.tmpl +10 -0
  38. package/tmpl/container.tmpl +261 -0
  39. package/tmpl/details.tmpl +207 -0
  40. package/tmpl/example.tmpl +3 -0
  41. package/tmpl/examples.tmpl +48 -0
  42. package/tmpl/exceptions.tmpl +32 -0
  43. package/tmpl/i18n-tooltips.tmpl +30 -0
  44. package/tmpl/icons.tmpl +77 -0
  45. package/tmpl/include-target-script-and-styles.tmpl +43 -0
  46. package/tmpl/layout.tmpl +169 -0
  47. package/tmpl/mainpage.tmpl +10 -0
  48. package/tmpl/members.tmpl +42 -0
  49. package/tmpl/method.tmpl +190 -0
  50. package/tmpl/mobile-sidebar.tmpl +21 -0
  51. package/tmpl/navbar-actions.tmpl +25 -0
  52. package/tmpl/navbar-menu.tmpl +25 -0
  53. package/tmpl/navbar.tmpl +14 -0
  54. package/tmpl/params.tmpl +131 -0
  55. package/tmpl/properties.tmpl +109 -0
  56. package/tmpl/returns.tmpl +19 -0
  57. package/tmpl/search.tmpl +17 -0
  58. package/tmpl/sidebar-items.tmpl +33 -0
  59. package/tmpl/sidebar-title.tmpl +8 -0
  60. package/tmpl/sidebar.tmpl +9 -0
  61. package/tmpl/source.tmpl +13 -0
  62. package/tmpl/toc.tmpl +4 -0
  63. package/tmpl/tutorial.tmpl +32 -0
  64. package/tmpl/type.tmpl +13 -0
@@ -0,0 +1 @@
1
+ var defaultOptions={ignoreSelector:".js-toc-ignore",linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(e){},throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1};function ParseContent(r){var t=[].reduce;function a(e){return e[e.length-1]}function c(e){var t;return e instanceof window.HTMLElement?!r.ignoreHiddenElements||e.offsetHeight&&e.offsetParent?(t=e.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(e.textContent)):e.textContent.trim()),t={id:e.id,children:[],nodeName:e.nodeName,headingLevel:Number(e.nodeName.toUpperCase().replace("H","")),textContent:t},r.includeHtml&&(t.childNodes=e.childNodes),r.headingObjectCallback?r.headingObjectCallback(t,e):t):null:e}return{nestHeadingsArray:function(e){return t.call(e,function(e,t){t=c(t);if(t){for(var l=e.nest,n=(t=c(t)).headingLevel,o=l,s=a(o),i=n-(s?s.headingLevel:0);0<i&&(!(s=a(o))||n!==s.headingLevel);)s&&void 0!==s.children&&(o=s.children),i--;n>=r.collapseDepth&&(t.isCollapsed=!0),o.push(t)}return e},{nest:[]})},selectHeadings:function(e,t){var l=t;r.ignoreSelector&&(l=t.split(",").map(function(e){return e.trim()+":not("+r.ignoreSelector+")"}));try{return e.querySelectorAll(l)}catch(e){return console.warn("Headers not found with selector: "+l),null}}}}function BuildHtml(i){var r,n=[].forEach,a=[].some,c=document.body,d=document.querySelector(i.contentSelector),u=!0,m=" ";function o(e,t){var l,t=t.appendChild((e=>{var t=document.createElement("li"),l=document.createElement("a");return i.listItemClass&&t.setAttribute("class",i.listItemClass),i.onClick&&(l.onclick=i.onClick),i.includeTitleTags&&l.setAttribute("title",e.textContent),i.includeHtml&&e.childNodes.length?n.call(e.childNodes,function(e){l.appendChild(e.cloneNode(!0))}):l.textContent=e.textContent,l.setAttribute("href",i.basePath+"#"+e.id),l.setAttribute("class",i.linkClass+m+"node-name--"+e.nodeName+m+i.extraLinkClasses),t.appendChild(l),t})(e));e.children.length&&(l=s(e.isCollapsed),e.children.forEach(function(e){o(e,l)}),t.appendChild(l))}function s(e){var t=i.orderedList?"ol":"ul",t=document.createElement(t),l=i.listClass+m+i.extraListClasses;return e&&(l=(l+=m+i.collapsibleClass)+(m+i.isCollapsedClass)),t.setAttribute("class",l),t}function f(e){var t=[].forEach,l=r.querySelectorAll("."+i.linkClass),l=(t.call(l,function(e){e.className=e.className.split(m+i.activeLinkClass).join("")}),r.querySelectorAll("."+i.listItemClass)),l=(t.call(l,function(e){e.className=e.className.split(m+i.activeListItemClass).join("")}),r.querySelector("."+i.linkClass+".node-name--"+e.nodeName+'[href="'+i.basePath+"#"+e.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/@])/g,"\\$1")+'"]')),e=(l&&-1===l.className.indexOf(i.activeLinkClass)&&(l.className+=m+i.activeLinkClass),l&&l.parentNode),e=(e&&-1===e.className.indexOf(i.activeListItemClass)&&(e.className+=m+i.activeListItemClass),r.querySelectorAll("."+i.listClass+"."+i.collapsibleClass));t.call(e,function(e){-1===e.className.indexOf(i.isCollapsedClass)&&(e.className+=m+i.isCollapsedClass)}),l&&l.nextSibling&&-1!==l.nextSibling.className.indexOf(i.isCollapsedClass)&&(l.nextSibling.className=l.nextSibling.className.split(m+i.isCollapsedClass).join("")),function e(t){if(t&&-1!==t.className.indexOf(i.collapsibleClass)&&-1!==t.className.indexOf(i.isCollapsedClass))return t.className=t.className.split(m+i.isCollapsedClass).join(""),e(t.parentNode.parentNode);return t}(l&&l.parentNode.parentNode)}return{enableTocAnimation:function(){u=!0},disableTocAnimation:function(e){"string"==typeof(e=e.target||e.srcElement).className&&-1!==e.className.indexOf(i.linkClass)&&(u=!1)},render:function(e,t){var l=s(!1);if(t.forEach(function(e){o(e,l)}),null!==(r=e||r))return r.firstChild&&r.removeChild(r.firstChild),0===t.length?r:r.appendChild(l)},updateToc:function(e){n=i.scrollContainer&&document.querySelector(i.scrollContainer)?document.querySelector(i.scrollContainer).scrollTop:document.documentElement.scrollTop||c.scrollTop,i.positionFixedSelector&&(t=i.scrollContainer&&document.querySelector(i.scrollContainer)?document.querySelector(i.scrollContainer).scrollTop:document.documentElement.scrollTop||c.scrollTop,l=document.querySelector(i.positionFixedSelector),"auto"===i.fixedSidebarOffset&&(i.fixedSidebarOffset=r.offsetTop),i.fixedSidebarOffset<t?-1===l.className.indexOf(i.positionFixedClass)&&(l.className+=m+i.positionFixedClass):l.className=l.className.split(m+i.positionFixedClass).join(""));var n,t,l,o,s=e;u&&null!==r&&0<s.length&&(a.call(s,function(e,t){var l=n+10;return d&&(l+=d.clientHeight*d.scrollTop/(d.scrollHeight-d.clientHeight)),function e(t){var l=0;return null!==t&&(l=t.offsetTop,i.hasInnerContainers)&&(l+=e(t.offsetParent)),l}(e)>l?(o=s[0===t?t:t-1],!0):t===s.length-1?(o=s[s.length-1],!0):void 0}),f(o))},updateListActiveElement:f}}function updateTocScroll(e){var t,l=e.tocElement||document.querySelector(e.tocSelector);l&&l.scrollHeight>l.clientHeight&&(e=l.querySelector("."+e.activeListItemClass))&&(t=l.getBoundingClientRect().top,l.scrollTop=e.offsetTop-t)}((e,t)=>{"function"==typeof define&&define.amd?define([],t(e)):"object"==typeof exports?module.exports=t(e):e.tocbot=t(e)})("undefined"!=typeof global?global:this.window||this.global,function(e){var l,a,c,d,u={},m={},f=Boolean(e)&&Boolean(e.document)&&Boolean(e.document.querySelector)&&Boolean(e.addEventListener);if("undefined"!=typeof window||f)return d=Object.prototype.hasOwnProperty,m.destroy=function(){var e=C(u);null!==e&&(u.skipRendering||e&&(e.innerHTML=""),(u.scrollContainer&&document.querySelector(u.scrollContainer)?(document.querySelector(u.scrollContainer).removeEventListener("scroll",this._scrollListener,!1),document.querySelector(u.scrollContainer)):(document.removeEventListener("scroll",this._scrollListener,!1),document)).removeEventListener("resize",this._scrollListener,!1))},m.init=function(e){if(f){u=function(){for(var e={},t=0;t<arguments.length;t++){var l,n=arguments[t];for(l in n)d.call(n,l)&&(e[l]=n[l])}return e}(defaultOptions,e||{}),this.options=u,this.state={},u.scrollSmooth&&(u.duration=u.scrollSmoothDuration,u.offset=u.scrollSmoothOffset),l=BuildHtml(u),a=ParseContent(u),this._buildHtml=l,this._parseContent=a,this._headingsArray=c,this.updateTocListActiveElement=l.updateListActiveElement,m.destroy();e=(t=>{try{return t.contentElement||document.querySelector(t.contentSelector)}catch(e){return console.warn("Contents element not found: "+t.contentSelector),null}})(u);if(null!==e){var n,o,s,i,r,t=C(u);if(null!==t)if(null!==(c=a.selectHeadings(e,u.headingSelector)))return e=a.nestHeadingsArray(c).nest,u.skipRendering||l.render(t,e),this._scrollListener=(n=function(e){l.updateToc(c),u.disableTocScrollSync||updateTocScroll(u);var t=e&&e.target&&e.target.scrollingElement&&0===e.target.scrollingElement.scrollTop;(e&&(0===e.eventPhase||null===e.currentTarget)||t)&&(l.updateToc(c),u.scrollEndCallback)&&u.scrollEndCallback(e)},o=(o=u.throttleTimeout)||250,function(){var e=s||this,t=Number(new Date),l=arguments;i&&t<i+o?(clearTimeout(r),r=setTimeout(function(){i=t,n.apply(e,l)},o)):(i=t,n.apply(e,l))}),this._scrollListener(),(u.scrollContainer&&document.querySelector(u.scrollContainer)?(document.querySelector(u.scrollContainer).addEventListener("scroll",this._scrollListener,!1),document.querySelector(u.scrollContainer)):(document.addEventListener("scroll",this._scrollListener,!1),document)).addEventListener("resize",this._scrollListener,!1),this}}},m.refresh=function(e){m.destroy(),m.init(e||this.options)},e.tocbot=m;function C(t){try{return t.tocElement||document.querySelector(t.tocSelector)}catch(e){return console.warn("TOC element not found: "+t.tocSelector),null}}});