@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,109 @@
1
+ <?js
2
+ var data = obj;
3
+ var props = data.subprops || data.properties;
4
+
5
+ /* sort subprops under their parent props (like opts.classname) */
6
+ var parentProp = null;
7
+ props.forEach(function(prop, i) {
8
+ if (!prop) { return; }
9
+ if ( parentProp && prop.name && prop.name.indexOf(parentProp.name + '.') === 0 ) {
10
+ prop.name = prop.name.substr(parentProp.name.length+1);
11
+ parentProp.subprops = parentProp.subprops || [];
12
+ parentProp.subprops.push(prop);
13
+ props[i] = null;
14
+ }
15
+ else {
16
+ parentProp = prop;
17
+ }
18
+ });
19
+
20
+ /* determine if we need extra columns, "attributes" and "default" */
21
+ props.hasAttributes = false;
22
+ props.hasDefault = false;
23
+ props.hasName = false;
24
+
25
+ props.forEach(function(prop) {
26
+ if (!prop) { return; }
27
+
28
+ if (prop.optional || prop.nullable) {
29
+ props.hasAttributes = true;
30
+ }
31
+
32
+ if (prop.name) {
33
+ props.hasName = true;
34
+ }
35
+
36
+ if (typeof prop.defaultvalue !== 'undefined' && !data.isEnum) {
37
+ props.hasDefault = true;
38
+ }
39
+ });
40
+ ?>
41
+ <div class="allow-overflow">
42
+ <table class="props">
43
+ <thead>
44
+ <tr>
45
+ <?js if (props.hasName) {?>
46
+ <th><?js= t('name') ?></th>
47
+ <?js } ?>
48
+
49
+ <th><?js= t('type') ?></th>
50
+
51
+ <?js if (props.hasAttributes) {?>
52
+ <th><?js= t('attributes') ?></th>
53
+ <?js } ?>
54
+
55
+ <?js if (props.hasDefault) {?>
56
+ <th><?js= t('default') ?></th>
57
+ <?js } ?>
58
+
59
+ <th class="last"><?js= t('description') ?></th>
60
+ </tr>
61
+ </thead>
62
+
63
+ <tbody>
64
+ <?js
65
+ var self = this;
66
+ props.forEach(function(prop) {
67
+ if (!prop) { return; }
68
+ ?>
69
+
70
+ <tr>
71
+ <?js if (props.hasName) {?>
72
+ <td class="name"><code><?js= prop.name ?></code></td>
73
+ <?js } ?>
74
+
75
+ <td class="type">
76
+ <?js if (prop.type && prop.type.names) {?>
77
+ <?js= self.partial('type.tmpl', prop.type.names) ?>
78
+ <?js } ?>
79
+ </td>
80
+
81
+ <?js if (props.hasAttributes) {?>
82
+ <td class="attributes">
83
+ <?js if (prop.optional) { ?>
84
+ &lt;optional><br>
85
+ <?js } ?>
86
+
87
+ <?js if (prop.nullable) { ?>
88
+ &lt;nullable><br>
89
+ <?js } ?>
90
+ </td>
91
+ <?js } ?>
92
+
93
+ <?js if (props.hasDefault) {?>
94
+ <td class="default">
95
+ <?js if (typeof prop.defaultvalue !== 'undefined') { ?>
96
+ <?js= self.htmlsafe(prop.defaultvalue) ?>
97
+ <?js } ?>
98
+ </td>
99
+ <?js } ?>
100
+
101
+ <td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?>
102
+ <h6>Properties</h6><?js= self.partial('properties.tmpl', prop) ?>
103
+ <?js } ?></td>
104
+ </tr>
105
+
106
+ <?js }); ?>
107
+ </tbody>
108
+ </table>
109
+ </div>
@@ -0,0 +1,19 @@
1
+ <?js
2
+ var data = obj || {};
3
+ if (data.description) {
4
+ ?>
5
+ <div class="param-desc">
6
+ <?js= description ?>
7
+ </div>
8
+ <?js } ?>
9
+
10
+ <?js if (data.type && data.type.names) {?>
11
+ <dl class="param-type">
12
+ <dt>
13
+ <?js= t('type') ?>:&nbsp;
14
+ </dt>
15
+ <dd>
16
+ <?js= this.partial('type.tmpl', data.type.names) ?>
17
+ </dd>
18
+ </dl>
19
+ <?js } ?>
@@ -0,0 +1,17 @@
1
+ <div class="search-container" id="PkfLWpAbet" style="display: none">
2
+ <div class="wrapper" id="iCxFxjkHbP">
3
+ <button class="icon-button search-close-button" id="VjLlGakifb" aria-label='<?js= t('close_search') ?>'>
4
+ <svg>
5
+ <use xlink:href="#close-icon"></use>
6
+ </svg>
7
+
8
+ </button>
9
+ <div class="search-box-c">
10
+ <svg><use xlink:href="#search-icon"></use></svg>
11
+ <input type="text" id="vpcKVYIppa" class="search-input" placeholder="<?js= t('search_placeholder') ?>" autofocus>
12
+ </div>
13
+ <div class="search-result-c" id="fWwVHRuDuN">
14
+ <span class="search-result-c-text"><?js= t('search_hint') ?></span>
15
+ </div>
16
+ </div>
17
+ </div>
@@ -0,0 +1,33 @@
1
+ <?js
2
+ var data = this.sidebar
3
+ ?>
4
+
5
+ <!-- Home link at the top of sidebar -->
6
+ <div class="sidebar-section-title">
7
+ <a href="index.html" class="sidebar-home-anchor">
8
+ <?js= t('home') ?>
9
+ </a>
10
+ </div>
11
+
12
+ <?js
13
+ if(Array.isArray(data.sections)) {
14
+
15
+ data.sections.forEach(function(section) {
16
+ if(section.items.length > 0) { ?>
17
+
18
+ <div class="sidebar-section-title with-arrow" data-isopen="false" id="<?js= section.id?>">
19
+ <div><?js= section.name ?></div>
20
+ <svg><use xlink:href="#down-icon"></use></svg>
21
+ </div>
22
+ <div class="sidebar-section-children-container">
23
+
24
+ <?js
25
+ section.items.forEach(function(item) { ?>
26
+ <div class="sidebar-section-children">
27
+ <?js= item.anchor ?>
28
+ </div>
29
+
30
+ <?js }) ?>
31
+ </div>
32
+
33
+ <?js }})}?>
@@ -0,0 +1,8 @@
1
+ <?js
2
+ var data = this.sidebar
3
+
4
+ if(data.title.isHTML) { ?>
5
+ <?js= data.title.title ?>
6
+ <?js } else if (data.title.title && !data.title.isHTML){ ?>
7
+ <a href="/" class="sidebar-title sidebar-title-anchor"><?js= data.title.title ?></a>
8
+ <?js } ?>
@@ -0,0 +1,9 @@
1
+ <div class="sidebar" id="sidebar">
2
+ <?js= this.partial('sidebar-title.tmpl')?>
3
+
4
+
5
+ <div class="sidebar-items-container">
6
+ <?js= this.partial('sidebar-items.tmpl') ?>
7
+
8
+ </div>
9
+ </div>
@@ -0,0 +1,13 @@
1
+ <?js
2
+ var data = obj;
3
+ ?>
4
+ <section id="source-page" class="source-page">
5
+ <header>
6
+ <h1 id="title" class="has-anchor">
7
+ <?js= data.title ?>
8
+ </h1>
9
+ </header>
10
+ <article>
11
+ <pre class="prettyprint source lang-js"><code><?js= data.code ?></code></pre>
12
+ </article>
13
+ </section>
package/tmpl/toc.tmpl ADDED
@@ -0,0 +1,4 @@
1
+ <div class="toc-content">
2
+ <span class="bold"><?js= t('on_this_page') ?></span>
3
+ <div id="eed4d2a0bfd64539bb9df78095dec881"></div>
4
+ </div>
@@ -0,0 +1,32 @@
1
+ <section>
2
+
3
+ <header>
4
+
5
+ <h2><?js= header ?></h2>
6
+ </header>
7
+
8
+ <article>
9
+ <?js= content ?>
10
+ </article>
11
+
12
+ </section>
13
+
14
+
15
+ <?js= this.partial('include-target-script-and-styles.tmpl', filename) ?>
16
+
17
+
18
+ <?js if (children.length > 0) { ?>
19
+ <br><br>
20
+
21
+ <div class="child-tutorial-container">
22
+ <?js
23
+ var self = this;
24
+ children.forEach(function(t) {
25
+ let link = self.tutoriallink(t.name).replaceAll(/<a href=/g, "").replaceAll(/>.*/g,"")
26
+ ?>
27
+ <a href=<?js= link ?> class="child-tutorial">
28
+ <?js= t.name ?>
29
+ </a>
30
+ <?js }); ?>
31
+ </div>
32
+ <?js } ?>
package/tmpl/type.tmpl ADDED
@@ -0,0 +1,13 @@
1
+ <?js
2
+ var data = obj;
3
+ var self = this;
4
+ data.forEach(function(name, i) { ?>
5
+ <?js
6
+ var text = self.htmlsafe(name)
7
+ text = text.replace(/\|/g,'|<wbr>')
8
+ text = text.replace(/\./g,'.<wbr>')
9
+ var linkto = self.linkto(name, text)
10
+ ?>
11
+ <span class="param-type"><?js= linkto ?></span>
12
+ <?js if (i < data.length-1) { ?>|<wbr><?js } ?>
13
+ <?js }); ?>