docgen-tool 2.1.2 → 3.0.0

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 (81) hide show
  1. package/.gitattributes +1 -0
  2. package/.github/workflows/deploy-website.yml +28 -0
  3. package/.prettierignore +4 -0
  4. package/.prettierrc +4 -0
  5. package/LICENSE +35 -33
  6. package/{docgen → dist/docgen.js} +11 -22
  7. package/docgen.js +95 -0
  8. package/package.json +47 -20
  9. package/source/__test__/test-run/contents.json +12 -0
  10. package/source/__test__/test-run/overview.txt +3 -0
  11. package/source/__test__/test-run/parameters.json +32 -0
  12. package/source/__test__/test-run/release-notes.txt +4 -0
  13. package/source/docgen.js +900 -775
  14. package/source/example/contents.json +11 -11
  15. package/source/example/index.txt +3 -3
  16. package/source/example/parameters.json +36 -36
  17. package/source/internal-readme.md +4 -0
  18. package/source/pdf-stylesheet.css +26 -20
  19. package/source/require/docgen.css +76 -69
  20. package/source/require/katexInjector.js +9 -13
  21. package/source/require/print.css +26 -19
  22. package/source/templates/main.html +93 -93
  23. package/source/user-guide/advanced-content.txt +170 -170
  24. package/source/user-guide/contents.json +56 -56
  25. package/source/user-guide/files/images/svg/inkit-logo.svg +9 -0
  26. package/source/user-guide/index.txt +257 -244
  27. package/source/user-guide/installation.txt +49 -49
  28. package/source/user-guide/parameters.json +36 -36
  29. package/source/user-guide/release-notes.txt +69 -58
  30. package/source/user-guide/running.txt +46 -46
  31. package/source/user-guide/troubleshooting.txt +31 -31
  32. package/source/user-guide/upgrading.txt +25 -25
  33. package/source/user-guide/version-control.txt +13 -13
  34. package/source/user-guide/writing-content.txt +269 -269
  35. package/tsconfig.json +8 -0
  36. package/.npmignore +0 -2
  37. package/docs/advanced-content.html +0 -239
  38. package/docs/commonmark.html +0 -225
  39. package/docs/docgen.pdf +0 -0
  40. package/docs/files/images/overview.png +0 -0
  41. package/docs/files/images/pdf.png +0 -0
  42. package/docs/files/images/svg/icon.svg +0 -845
  43. package/docs/files/images/svg/overview.svg +0 -1345
  44. package/docs/files/images/text.png +0 -0
  45. package/docs/files/images/web.png +0 -0
  46. package/docs/index.html +0 -333
  47. package/docs/installation.html +0 -121
  48. package/docs/ownership.html +0 -164
  49. package/docs/release-notes.html +0 -144
  50. package/docs/require/docgen.css +0 -131
  51. package/docs/require/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  52. package/docs/require/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  53. package/docs/require/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  54. package/docs/require/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  55. package/docs/require/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  56. package/docs/require/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  57. package/docs/require/katex/fonts/KaTeX_Math-Regular.woff +0 -0
  58. package/docs/require/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  59. package/docs/require/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  60. package/docs/require/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  61. package/docs/require/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  62. package/docs/require/katex/katex.min.css +0 -1
  63. package/docs/require/katex/katex.min.js +0 -6
  64. package/docs/require/katexInjector.js +0 -22
  65. package/docs/require/print.css +0 -19
  66. package/docs/require/webknife/fonts/DroidSansMono.woff +0 -0
  67. package/docs/require/webknife/fonts/OpenSans.woff +0 -0
  68. package/docs/require/webknife/fonts/OpenSansBold.woff +0 -0
  69. package/docs/require/webknife/fonts/OpenSansBoldItalic.woff +0 -0
  70. package/docs/require/webknife/fonts/OpenSansItalic.woff +0 -0
  71. package/docs/require/webknife/framework.icons.js +0 -82
  72. package/docs/require/webknife/framework.min.css +0 -3
  73. package/docs/require/webknife/framework.min.js +0 -14
  74. package/docs/require/webknife/highlight.min.css +0 -1
  75. package/docs/require/webknife/highlight.min.js +0 -6
  76. package/docs/running.html +0 -123
  77. package/docs/troubleshooting.html +0 -105
  78. package/docs/upgrading.html +0 -124
  79. package/docs/version-control.html +0 -102
  80. package/docs/writing-content.html +0 -305
  81. /package/{docs → source/__test__/test-run}/files/images/logo.png +0 -0
@@ -1,104 +1,110 @@
1
1
  pre {
2
- font-size: 12px; /*todo - move to webknife*/
2
+ font-size: 12px; /*todo - move to webknife*/
3
3
  }
4
4
 
5
- section blockquote p, section li p {
6
- margin: 0;
5
+ section blockquote p,
6
+ section li p {
7
+ margin: 0;
7
8
  }
8
9
 
9
10
  .w-table {
10
- width: 100%;
11
+ width: 100%;
11
12
  }
12
13
 
13
14
  /******************************** TABLE OF CONTENTS ****************************/
14
15
 
15
16
  /*Table of contents button to initiate show/hide*/
16
- #dg-navigator
17
- {
18
- float: right;
19
- background-color: #4d4d4d;
20
- color: white;
21
- text-align:right;
22
- padding: 10px 20px 10px 20px;
23
- margin-right: 200px;
24
- border-radius: 0 0 10px 10px;
25
- cursor: pointer;
26
- font-weight: bold;
27
- }
28
-
29
- /*Table of contents container*/
17
+ #dg-navigator {
18
+ float: right;
19
+ background-color: #4d4d4d;
20
+ color: white;
21
+ text-align: right;
22
+ padding: 10px 20px 10px 20px;
23
+ margin-right: 200px;
24
+ border-radius: 0 0 10px 10px;
25
+ cursor: pointer;
26
+ font-weight: bold;
27
+ }
28
+
29
+ /*Table of contents container*/
30
30
  #dg-toc {
31
- color: white;
32
- background-color: #4d4d4d;
31
+ color: white;
32
+ background-color: #4d4d4d;
33
33
  }
34
34
 
35
35
  #dg-toc table {
36
- table-layout: auto;
37
- width: 100%;
36
+ table-layout: auto;
37
+ width: 100%;
38
38
  }
39
39
 
40
40
  #dg-toc div {
41
- padding: 15px 0 15px 0;
41
+ padding: 15px 0 15px 0;
42
42
  }
43
43
 
44
44
  /*Columns in table of contents*/
45
45
 
46
46
  #dg-toc td {
47
- border-right: 1px solid #666;
48
- vertical-align: top;
49
- text-align: left;
50
- padding: 0 20px 0 20px;
47
+ border-right: 1px solid #666;
48
+ vertical-align: top;
49
+ text-align: left;
50
+ padding: 0 20px 0 20px;
51
51
  }
52
52
 
53
53
  #dg-toc ul {
54
- padding: 0;
55
- list-style-type: none;
54
+ padding: 0;
55
+ list-style-type: none;
56
56
  }
57
57
 
58
58
  #dg-toc li {
59
- font-weight: bold;
59
+ font-weight: bold;
60
60
  }
61
61
 
62
62
  #dg-toc table td a {
63
- color: white;
64
- font-weight: normal;
65
- text-decoration: none;
66
- margin-left: 10px;
63
+ color: white;
64
+ font-weight: normal;
65
+ text-decoration: none;
66
+ margin-left: 10px;
67
67
  }
68
68
 
69
- #dg-toc table td a:hover {
70
- text-decoration: underline;
69
+ #dg-toc table td a:hover {
70
+ text-decoration: underline;
71
71
  }
72
72
 
73
- #dg-tocFixedColumn {
74
- border-right: none;
73
+ #dg-tocFixedColumn {
74
+ border-right: none;
75
75
  }
76
76
 
77
77
  #dg-toc table #dg-tocFixedColumn a {
78
- vertical-align: middle;
79
- margin-left: 4px;
78
+ vertical-align: middle;
79
+ margin-left: 4px;
80
80
  }
81
81
 
82
82
  .dg-tocGroup {
83
- width: 22%;
83
+ width: 22%;
84
84
  }
85
85
 
86
86
  .dg-tocHeading {
87
- font-size: 16px;
87
+ font-size: 16px;
88
88
  }
89
89
 
90
- .dg-tocIcon {width: 18px; height: 18px; float: left;}
91
- .dg-tocIcon svg {fill: white;}
90
+ .dg-tocIcon {
91
+ width: 18px;
92
+ height: 18px;
93
+ float: left;
94
+ }
95
+ .dg-tocIcon svg {
96
+ fill: white;
97
+ }
92
98
 
93
99
  /*
94
100
  Page table of contents
95
101
  */
96
102
 
97
103
  .dg-pageToc {
98
- list-style: none;
99
- padding: 10px;
100
- border: 1px solid #999;
101
- background-color: #eee;
104
+ list-style: none;
105
+ padding: 10px;
106
+ border: 1px solid #999;
107
+ background-color: #eee;
102
108
  }
103
109
 
104
110
  /*
@@ -108,24 +114,25 @@ section blockquote p, section li p {
108
114
  */
109
115
 
110
116
  .dg-hiddenTitle {
111
- display: block;
112
- border: none;
113
- margin: 0;
114
- padding: 0;
115
- width: 1px;
116
- height: 1px;
117
- overflow: hidden;
118
- position: absolute;
119
- background-color: transparent;
120
- }
121
-
122
- .dg-fakeHeading { /*todo - move to webknife*/
123
- text-decoration:none;
124
- font-weight: bold;
125
- color: #385691;
126
- padding-bottom: 5px;
127
- border-bottom: 1px solid #999;
128
- margin: 20px 0 20px 0;
129
- font-size: 16px;
130
- padding-bottom: 4px;
131
- }
117
+ display: block;
118
+ border: none;
119
+ margin: 0;
120
+ padding: 0;
121
+ width: 1px;
122
+ height: 1px;
123
+ overflow: hidden;
124
+ position: absolute;
125
+ background-color: transparent;
126
+ }
127
+
128
+ .dg-fakeHeading {
129
+ /*todo - move to webknife*/
130
+ text-decoration: none;
131
+ font-weight: bold;
132
+ color: #385691;
133
+ padding-bottom: 5px;
134
+ border-bottom: 1px solid #999;
135
+ margin: 20px 0 20px 0;
136
+ font-size: 16px;
137
+ padding-bottom: 4px;
138
+ }
@@ -1,22 +1,18 @@
1
-
2
- $(document).ready( function () {
3
-
1
+ $(document).ready(function () {
4
2
  //mathematical expressions using katex, if enabled
5
- $('.dg-katexMath').each(function() {
3
+ $('.dg-katexMath').each(function () {
6
4
  var texTxt = $(this).text();
7
5
 
8
6
  el = $(this).get(0);
9
- if(el.tagName == "DIV"){
10
- addDisp = "\\displaystyle";
7
+ if (el.tagName == 'DIV') {
8
+ addDisp = '\\displaystyle';
11
9
  } else {
12
- addDisp = "";
10
+ addDisp = '';
13
11
  }
14
12
  try {
15
- katex.render(addDisp+texTxt, el);
16
- }
17
- catch(err) {
18
- $(this).html("<span class='err'>"+err);
13
+ katex.render(addDisp + texTxt, el);
14
+ } catch (err) {
15
+ $(this).html("<span class='err'>" + err);
19
16
  }
20
17
  });
21
-
22
- });
18
+ });
@@ -1,19 +1,26 @@
1
- html {
2
- background-color :white; /*otherwise background artefacts appear as a feint outline in PDF*/
3
- }
4
-
5
- .dg-pageToc {
6
- display: none;
7
- }
8
-
9
- #dg-toc, #dg-navigator, header, footer {
10
- display: none;
11
- }
12
-
13
- .dg-avoidBreak, #dg-content th, #dg-content tr, #dg-content blockquote, #dg-content pre {
14
- page-break-inside: avoid;
15
- }
16
-
17
- .dg-forceBreak {
18
- page-break-after: always;
19
- }
1
+ html {
2
+ background-color: white; /*otherwise background artefacts appear as a feint outline in PDF*/
3
+ }
4
+
5
+ .dg-pageToc {
6
+ display: none;
7
+ }
8
+
9
+ #dg-toc,
10
+ #dg-navigator,
11
+ header,
12
+ footer {
13
+ display: none;
14
+ }
15
+
16
+ .dg-avoidBreak,
17
+ #dg-content th,
18
+ #dg-content tr,
19
+ #dg-content blockquote,
20
+ #dg-content pre {
21
+ page-break-inside: avoid;
22
+ }
23
+
24
+ .dg-forceBreak {
25
+ page-break-after: always;
26
+ }
@@ -1,93 +1,93 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta http-equiv="X-UA-Compatible" content="IE=edge" ><!--Prevent IE using compatibility mode on local or intranet pages. Do not put scripts before this line.-->
5
- <meta name="viewport" content="width=device-width, user-scalable=yes"><!--Mobile device scaling-->
6
- <meta charset="UTF-8">
7
- <title></title>
8
-
9
- <!--load stylesheets first (rationale: https://developers.google.com/speed/docs/best-practices/rtt#PutStylesBeforeScripts)-->
10
- <link rel="stylesheet" href="require/webknife/framework.min.css" type="text/css" />
11
- <link rel="stylesheet" href="require/webknife/highlight.min.css" type="text/css" />
12
- <link rel="stylesheet" href="require/docgen.css" type="text/css" />
13
- <link rel="stylesheet" href="require/print.css" media="print" />
14
-
15
- <!--load scripts second-->
16
-
17
- <script src="require/webknife/framework.min.js"></script>
18
- <script src="require/webknife/framework.icons.js"></script>
19
- <script src="require/webknife/highlight.min.js"></script>
20
-
21
- <!--inline scripts last-->
22
-
23
- <script type="text/javascript">
24
-
25
- $(document).ready( function () {
26
- $("#dg-toc").hide(); //hide the table of contents
27
-
28
- //instantiate an svg injector to show SVG icons
29
- var injector = new svgInject();
30
- injector.inject();
31
-
32
- //code syntax highlighting
33
- $('pre code, .w-inline-code').each(function(i, block) {
34
- hljs.highlightBlock(block);
35
- });
36
-
37
- //toggle visibility of table of contents
38
- $("#dg-navigator").click(function()
39
- {
40
- $("#dg-toc").slideToggle("fast");
41
- $(this).toggleClass("active");
42
- });
43
-
44
- });
45
- </script>
46
-
47
- <script type="text/x-mathjax-config">
48
- //MathJax configuration is the same as used by math.stackexchange.com
49
- MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50) },
50
- tex2jax: { inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ], displayMath: [ ["$$","$$"], ["\\[", "\\]"] ], processEscapes: true, ignoreClass: "tex2jax_ignore|dno" },
51
- TeX: { noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE", mathsize: "90%" } }, Macros: { href: "{}" } },
52
- messageStyle: "none"
53
- });
54
- </script>
55
-
56
- </head>
57
-
58
- <body>
59
-
60
- <div id="dg-toc"></div>
61
- <div id="dg-navigator">Table of contents</div>
62
-
63
- <header>
64
- <div class="w-fixed-width">
65
- <a id="dg-homelink" href="">
66
- <div id="dg-logo">
67
- <span id="dg-title"></span> <span id="dg-web-title-version" style="font-weight:normal;"></span>
68
- </div>
69
- </a>
70
- <div>
71
- <span id="dg-backlink"></span>
72
- </div>
73
- </div>
74
- </header>
75
-
76
- <section id="dg-content">
77
-
78
- </section>
79
-
80
- <footer>
81
- <div><p class="w-fixed-width"><span id="dg-web-footer">.</p></div>
82
- <div class="w-fixed-width">
83
- <p><span id="dg-copyright"></span></p>
84
- <p>
85
- <span id="dg-marking"></span>
86
- <span id="dg-legalese"></span>
87
- <span id="dg-attribution"></span>
88
- </p>
89
- </div>
90
- </footer>
91
-
92
- </body>
93
- </html>
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" ><!--Prevent IE using compatibility mode on local or intranet pages. Do not put scripts before this line.-->
5
+ <meta name="viewport" content="width=device-width, user-scalable=yes"><!--Mobile device scaling-->
6
+ <meta charset="UTF-8">
7
+ <title></title>
8
+
9
+ <!--load stylesheets first (rationale: https://developers.google.com/speed/docs/best-practices/rtt#PutStylesBeforeScripts)-->
10
+ <link rel="stylesheet" href="require/webknife/framework.min.css" type="text/css" />
11
+ <link rel="stylesheet" href="require/webknife/highlight.min.css" type="text/css" />
12
+ <link rel="stylesheet" href="require/docgen.css" type="text/css" />
13
+ <link rel="stylesheet" href="require/print.css" media="print" />
14
+
15
+ <!--load scripts second-->
16
+
17
+ <script src="require/webknife/framework.min.js"></script>
18
+ <script src="require/webknife/framework.icons.js"></script>
19
+ <script src="require/webknife/highlight.min.js"></script>
20
+
21
+ <!--inline scripts last-->
22
+
23
+ <script type="text/javascript">
24
+
25
+ $(document).ready( function () {
26
+ $("#dg-toc").hide(); //hide the table of contents
27
+
28
+ //instantiate an svg injector to show SVG icons
29
+ var injector = new svgInject();
30
+ injector.inject();
31
+
32
+ //code syntax highlighting
33
+ $('pre code, .w-inline-code').each(function(i, block) {
34
+ hljs.highlightBlock(block);
35
+ });
36
+
37
+ //toggle visibility of table of contents
38
+ $("#dg-navigator").click(function()
39
+ {
40
+ $("#dg-toc").slideToggle("fast");
41
+ $(this).toggleClass("active");
42
+ });
43
+
44
+ });
45
+ </script>
46
+
47
+ <script type="text/x-mathjax-config">
48
+ //MathJax configuration is the same as used by math.stackexchange.com
49
+ MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50) },
50
+ tex2jax: { inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ], displayMath: [ ["$$","$$"], ["\\[", "\\]"] ], processEscapes: true, ignoreClass: "tex2jax_ignore|dno" },
51
+ TeX: { noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE", mathsize: "90%" } }, Macros: { href: "{}" } },
52
+ messageStyle: "none"
53
+ });
54
+ </script>
55
+
56
+ </head>
57
+
58
+ <body>
59
+
60
+ <div id="dg-toc"></div>
61
+ <div id="dg-navigator">Table of contents</div>
62
+
63
+ <header>
64
+ <div class="w-fixed-width">
65
+ <a id="dg-homelink" href="">
66
+ <div id="dg-logo">
67
+ <span id="dg-title"></span> <span id="dg-web-title-version" style="font-weight:normal;"></span>
68
+ </div>
69
+ </a>
70
+ <div>
71
+ <span id="dg-backlink"></span>
72
+ </div>
73
+ </div>
74
+ </header>
75
+
76
+ <section id="dg-content">
77
+
78
+ </section>
79
+
80
+ <footer>
81
+ <div><p class="w-fixed-width"><span id="dg-web-footer">.</p></div>
82
+ <div class="w-fixed-width">
83
+ <p><span id="dg-copyright"></span></p>
84
+ <p>
85
+ <span id="dg-marking"></span>
86
+ <span id="dg-legalese"></span>
87
+ <span id="dg-attribution"></span>
88
+ </p>
89
+ </div>
90
+ </footer>
91
+
92
+ </body>
93
+ </html>