hdoc-tools 0.18.7 → 0.19.2
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.
package/package.json
CHANGED
@@ -0,0 +1,106 @@
|
|
1
|
+
/* GERRY: adding styling for semantic markup elements for documenting JavaScript (and other) API's */
|
2
|
+
api-param-name {
|
3
|
+
display: inline;
|
4
|
+
border-radius: 4px;
|
5
|
+
padding: 3px 6px;
|
6
|
+
color: var(--htl-c-text-code);
|
7
|
+
background-color: var(--htl-c-bg-mute);
|
8
|
+
margin-right: 0.5em;
|
9
|
+
font-size: 1.3em;
|
10
|
+
font-family: "courier new";
|
11
|
+
font-weight: 700;
|
12
|
+
}
|
13
|
+
|
14
|
+
api-param-name-optional {
|
15
|
+
display: inline;
|
16
|
+
border-radius: 4px;
|
17
|
+
padding: 3px 6px;
|
18
|
+
color: var(--htl-c-text-code);
|
19
|
+
background-color: var(--htl-c-bg-mute);
|
20
|
+
margin-right: 0.5em;
|
21
|
+
font-size: 1.3em;
|
22
|
+
font-style: italic;
|
23
|
+
font-family: "courier new";
|
24
|
+
font-weight: 700;
|
25
|
+
}
|
26
|
+
api-param-type {
|
27
|
+
display: inline;
|
28
|
+
border-radius: 4px;
|
29
|
+
padding: 3px 6px;
|
30
|
+
margin-right: 0.5em;
|
31
|
+
color: var(--htl-custom-block-tip-text);
|
32
|
+
background-color: var(--htl-custom-block-tip-bg);
|
33
|
+
border: 1px solid var(--htl-custom-block-tip-border);
|
34
|
+
font-style: italic;
|
35
|
+
font-weight: 600;
|
36
|
+
}
|
37
|
+
api-param-type:before {
|
38
|
+
font-style: normal;
|
39
|
+
font-weight: 400;
|
40
|
+
content: "data type: "
|
41
|
+
}
|
42
|
+
|
43
|
+
api-param-optional {
|
44
|
+
display: inline;
|
45
|
+
border-radius: 4px;
|
46
|
+
padding: 3px 6px;
|
47
|
+
margin-right: 0.5em;
|
48
|
+
color: var(--htl-custom-block-tip-text);
|
49
|
+
background-color: var(--htl-custom-block-tip-bg);
|
50
|
+
border: 1px solid var(--htl-custom-block-tip-border);
|
51
|
+
font-style: italic;
|
52
|
+
font-weight: 600;
|
53
|
+
}
|
54
|
+
api-param-optional:before {
|
55
|
+
content: "Optional [default=";
|
56
|
+
font-style: normal;
|
57
|
+
font-weight: 400;
|
58
|
+
}
|
59
|
+
api-param-optional:after {
|
60
|
+
font-style: normal;
|
61
|
+
content: "]";
|
62
|
+
font-weight: 400;
|
63
|
+
}
|
64
|
+
|
65
|
+
/* API parameter description block */
|
66
|
+
api-param-desc {
|
67
|
+
display: block;
|
68
|
+
padding-top: 1em;
|
69
|
+
padding-bottom: 2em;
|
70
|
+
padding-left: 2em;
|
71
|
+
}
|
72
|
+
|
73
|
+
/* GS: We need this for now as the custom element above does
|
74
|
+
not work when you have line breaks in description */
|
75
|
+
.api-param-desc {
|
76
|
+
display: block;
|
77
|
+
padding-top: 1em;
|
78
|
+
padding-bottom: 2em;
|
79
|
+
padding-left: 2em;
|
80
|
+
}
|
81
|
+
|
82
|
+
api-prop-name {
|
83
|
+
display: inline;
|
84
|
+
border-radius: 4px;
|
85
|
+
padding: 3px 6px;
|
86
|
+
color: var(--htl-c-text-code);
|
87
|
+
background-color: var(--htl-c-bg-mute);
|
88
|
+
margin-right: 0.5em;
|
89
|
+
font-size: 1.0em;
|
90
|
+
font-family: "courier new";
|
91
|
+
font-weight: 700;
|
92
|
+
}
|
93
|
+
|
94
|
+
api-prop-name-optional {
|
95
|
+
display: inline;
|
96
|
+
border-radius: 4px;
|
97
|
+
padding: 3px 6px;
|
98
|
+
color: var(--htl-c-text-code);
|
99
|
+
background-color: var(--htl-c-bg-mute);
|
100
|
+
margin-right: 0.5em;
|
101
|
+
font-size: 1.0em;
|
102
|
+
font-style: italic;
|
103
|
+
font-family: "courier new";
|
104
|
+
font-weight: 700;
|
105
|
+
}
|
106
|
+
|
@@ -20,7 +20,7 @@
|
|
20
20
|
}
|
21
21
|
|
22
22
|
.HTL-doc h2 {
|
23
|
-
margin:
|
23
|
+
margin: 16px 0 16px;
|
24
24
|
padding-top: 24px;
|
25
25
|
letter-spacing: -0.02em;
|
26
26
|
line-height: 32px;
|
@@ -845,9 +845,31 @@
|
|
845
845
|
.HTL-doc .hljs {
|
846
846
|
background: #494949;
|
847
847
|
width: 100%;
|
848
|
+
font-size: 0.9em !important;
|
849
|
+
line-height: 1.4em;
|
848
850
|
}
|
849
851
|
|
850
852
|
.dark .HTL-doc .hljs {
|
851
853
|
background: #000000;
|
852
854
|
width: 100%;
|
855
|
+
font-size: 0.9em !important;
|
856
|
+
|
857
|
+
}
|
858
|
+
|
859
|
+
/* image sizing for icon library */
|
860
|
+
.HTL-doc .hb-icon-td {
|
861
|
+
text-align: center;
|
862
|
+
}
|
863
|
+
|
864
|
+
.HTL-doc .hb-icon-img {
|
865
|
+
min-width: 80px;
|
866
|
+
max-width: 80px;
|
867
|
+
}
|
868
|
+
|
869
|
+
/* imge sizing for ITOM and iBridge content packs */
|
870
|
+
.HTL-doc .hb-floated-image img {
|
871
|
+
float: left;
|
872
|
+
width: 110px;
|
873
|
+
margin-top: -5px;
|
874
|
+
padding-right: 5px;
|
853
875
|
}
|
@@ -318,7 +318,6 @@
|
|
318
318
|
--htl-custom-block-info-bg: #d7eaf8;
|
319
319
|
--htl-custom-block-info-code-bg: var(--htl-c-gray-light-4);
|
320
320
|
|
321
|
-
|
322
321
|
--htl-custom-block-tip-border: var(--htl-c-green-dimm-1);
|
323
322
|
--htl-custom-block-tip-text: var(--htl-c-green-darker);
|
324
323
|
--htl-custom-block-tip-bg: var(--htl-c-green-dimm-3);
|
package/ui/index.html
CHANGED
@@ -36,6 +36,18 @@
|
|
36
36
|
}
|
37
37
|
</style>
|
38
38
|
<script>
|
39
|
+
|
40
|
+
class APIParamName extends HTMLElement {
|
41
|
+
constructor() {
|
42
|
+
super();
|
43
|
+
// GS: Use this to set a role on the element for ARIO screen-reader directives
|
44
|
+
this.setAttribute("role", "title");
|
45
|
+
}
|
46
|
+
// Element functionality written in here
|
47
|
+
}
|
48
|
+
customElements.define("api-param-name", APIParamName);
|
49
|
+
|
50
|
+
|
39
51
|
var ThemePreference = localStorage.getItem('hdocbook-theme-appearance') || '';
|
40
52
|
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
|
41
53
|
if (!ThemePreference || ThemePreference === 'auto' ? prefersDark : ThemePreference === 'dark') {
|
@@ -381,6 +393,7 @@
|
|
381
393
|
"css/theme-default/styles/components/sidebar.css",
|
382
394
|
"css/theme-default/styles/components/content.css",
|
383
395
|
"css/theme-default/styles/components/custom-block.css",
|
396
|
+
"css/theme-default/styles/components/api-doc.css",
|
384
397
|
|
385
398
|
"js/highlightjs/styles/vs2015.css"
|
386
399
|
], function () {
|