docgen-tool 3.0.3 → 3.0.4

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 (29) hide show
  1. package/dist/docgen.js +0 -0
  2. package/dist/source/docgen.js +1 -1
  3. package/dist/source/example/contents.json +12 -0
  4. package/dist/source/example/files/images/logo.png +0 -0
  5. package/dist/source/example/index.txt +4 -0
  6. package/dist/source/example/parameters.json +37 -0
  7. package/dist/source/example/release-notes.txt +1 -0
  8. package/dist/source/optional/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  9. package/dist/source/optional/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  10. package/dist/source/optional/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  11. package/dist/source/optional/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  12. package/dist/source/optional/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  13. package/dist/source/optional/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  14. package/dist/source/optional/katex/fonts/KaTeX_Math-Regular.woff +0 -0
  15. package/dist/source/optional/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  16. package/dist/source/optional/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  17. package/dist/source/optional/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  18. package/dist/source/optional/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  19. package/dist/source/pdf-contents.xsl +71 -0
  20. package/dist/source/pdf-stylesheet.css +59 -0
  21. package/dist/source/require/docgen.css +138 -0
  22. package/dist/source/require/katexInjector.js +18 -0
  23. package/dist/source/require/print.css +26 -0
  24. package/dist/source/require/webknife/fonts/DroidSansMono.woff +0 -0
  25. package/dist/source/require/webknife/fonts/OpenSans.woff +0 -0
  26. package/dist/source/require/webknife/fonts/OpenSansBold.woff +0 -0
  27. package/dist/source/require/webknife/fonts/OpenSansBoldItalic.woff +0 -0
  28. package/dist/source/require/webknife/fonts/OpenSansItalic.woff +0 -0
  29. package/package.json +3 -2
@@ -0,0 +1,138 @@
1
+ pre {
2
+ font-size: 12px; /*todo - move to webknife*/
3
+ }
4
+
5
+ section blockquote p,
6
+ section li p {
7
+ margin: 0;
8
+ }
9
+
10
+ .w-table {
11
+ width: 100%;
12
+ }
13
+
14
+ /******************************** TABLE OF CONTENTS ****************************/
15
+
16
+ /*Table of contents button to initiate show/hide*/
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
+ #dg-toc {
31
+ color: white;
32
+ background-color: #4d4d4d;
33
+ }
34
+
35
+ #dg-toc table {
36
+ table-layout: auto;
37
+ width: 100%;
38
+ }
39
+
40
+ #dg-toc div {
41
+ padding: 15px 0 15px 0;
42
+ }
43
+
44
+ /*Columns in table of contents*/
45
+
46
+ #dg-toc td {
47
+ border-right: 1px solid #666;
48
+ vertical-align: top;
49
+ text-align: left;
50
+ padding: 0 20px 0 20px;
51
+ }
52
+
53
+ #dg-toc ul {
54
+ padding: 0;
55
+ list-style-type: none;
56
+ }
57
+
58
+ #dg-toc li {
59
+ font-weight: bold;
60
+ }
61
+
62
+ #dg-toc table td a {
63
+ color: white;
64
+ font-weight: normal;
65
+ text-decoration: none;
66
+ margin-left: 10px;
67
+ }
68
+
69
+ #dg-toc table td a:hover {
70
+ text-decoration: underline;
71
+ }
72
+
73
+ #dg-tocFixedColumn {
74
+ border-right: none;
75
+ }
76
+
77
+ #dg-toc table #dg-tocFixedColumn a {
78
+ vertical-align: middle;
79
+ margin-left: 4px;
80
+ }
81
+
82
+ .dg-tocGroup {
83
+ width: 22%;
84
+ }
85
+
86
+ .dg-tocHeading {
87
+ font-size: 16px;
88
+ }
89
+
90
+ .dg-tocIcon {
91
+ width: 18px;
92
+ height: 18px;
93
+ float: left;
94
+ }
95
+ .dg-tocIcon svg {
96
+ fill: white;
97
+ }
98
+
99
+ /*
100
+ Page table of contents
101
+ */
102
+
103
+ .dg-pageToc {
104
+ list-style: none;
105
+ padding: 10px;
106
+ border: 1px solid #999;
107
+ background-color: #eee;
108
+ }
109
+
110
+ /*
111
+ Class to make a heading look invisible in web page, but still appear in the PDF table of contents
112
+ - display:none, visibily: hidden, zero dimensions, and offscreen positioning don't work
113
+ - so instead take it out of the flow and make it small and translucent
114
+ */
115
+
116
+ .dg-hiddenTitle {
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
+ }
@@ -0,0 +1,18 @@
1
+ $(document).ready(function () {
2
+ //mathematical expressions using katex, if enabled
3
+ $('.dg-katexMath').each(function () {
4
+ var texTxt = $(this).text();
5
+
6
+ el = $(this).get(0);
7
+ if (el.tagName == 'DIV') {
8
+ addDisp = '\\displaystyle';
9
+ } else {
10
+ addDisp = '';
11
+ }
12
+ try {
13
+ katex.render(addDisp + texTxt, el);
14
+ } catch (err) {
15
+ $(this).html("<span class='err'>" + err);
16
+ }
17
+ });
18
+ });
@@ -0,0 +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,
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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docgen-tool",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "A tool for creating HTML and PDF documentation",
5
5
  "main": "dist/docgen.js",
6
6
  "bin": {
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "scripts": {
13
13
  "clean": "rimraf dist/",
14
- "copy-files": "copyfiles source/katexInjector.js source/example/**/* source/optional/**/* source/require/**/* source/templates/**/* dist/",
14
+ "copy-files": "ncp source/require dist/source/require && ncp source/example dist/source/example && ncp source/optional dist/source/optional && ncp source/templates dist/source/templates && cp source/pdf-contents.xsl dist/source && cp source/pdf-stylesheet.css dist/source",
15
15
  "dev": "ts-node docgen.js run",
16
16
  "build": "yarn clean && tsc -p tsconfig.json && yarn copy-files",
17
17
  "run:build": "dist/docgen.js",
@@ -51,6 +51,7 @@
51
51
  "copyfiles": "^2.4.1",
52
52
  "eslint": "^8.43.0",
53
53
  "eslint-config-prettier": "^8.8.0",
54
+ "ncp": "^2.0.0",
54
55
  "prettier": "^2.1.2",
55
56
  "rimraf": "^5.0.1",
56
57
  "ts-node": "^10.9.1",