spec-up-t 1.2.1 → 1.2.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/assets/compiled/body.js +7 -5
- package/assets/compiled/head.css +5 -6
- package/assets/css/backToTop.css +1 -0
- package/assets/css/header-navbar.css +1 -1
- package/assets/css/pdf-download.css +27 -12
- package/assets/css/pdf-styles.css +174 -0
- package/assets/css/sidebar-toc.css +109 -2
- package/assets/css/terms-and-definitions.css +65 -47
- package/assets/js/collapse-meta-info.js +5 -1
- package/assets/js/collapsibleMenu.js +133 -0
- package/assets/js/edit-term-buttons.js +19 -4
- package/assets/js/fix-last-dd.js +44 -0
- package/assets/js/highlightMenuItems.js +5 -0
- package/assets/js/insert-trefs.js +2 -1
- package/assets/js/pdf-download.js +18 -5
- package/index.js +26 -11
- package/package.json +1 -1
- package/src/asset-map.json +2 -2
- package/src/create-pdf.js +141 -390
- package/templates/template.html +3 -0
- package/assets/css/collapse-meta-info.css +0 -40
- package/assets/css/terms-and-definitions.1.css +0 -223
- package/assets/js/index.1.js +0 -137
- package/assets/js/insert-xrefs.1.js +0 -372
- package/index.new.js +0 -662
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Author: Kor Dwarshuis, kor@dwarshuis.com
|
|
3
|
-
Created: 2025-02-16
|
|
4
|
-
Description: Make the meta-info tables collapsible
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/* Wrapper for meta info content */
|
|
8
|
-
dl > dd:has(table).meta-info-content-wrapper {
|
|
9
|
-
display: block;
|
|
10
|
-
position: relative;
|
|
11
|
-
max-height: none;
|
|
12
|
-
height: auto;
|
|
13
|
-
overflow: visible;
|
|
14
|
-
transition: all 0.3s ease-out;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Collapsed state for meta info content */
|
|
18
|
-
dl > dd:has(table).collapsed.meta-info-content-wrapper {
|
|
19
|
-
max-height: 0;
|
|
20
|
-
height: 0;
|
|
21
|
-
padding-top: 0;
|
|
22
|
-
padding-bottom: 0;
|
|
23
|
-
margin-top: 0;
|
|
24
|
-
margin-bottom: 0;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
transition: all 0.3s ease-out;
|
|
27
|
-
line-height: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* The inner content wrapper to ensure proper spacing */
|
|
31
|
-
dl > dd:has(table).meta-info-content-wrapper > div {
|
|
32
|
-
display: block;
|
|
33
|
-
padding: inherit;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Meta info toggle button */
|
|
37
|
-
.meta-info-toggle-button {
|
|
38
|
-
position: relative;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Terms and Definitions Styling
|
|
3
|
-
* Organized by component and functionality
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/* ====== GENERAL HEADING STYLES ====== */
|
|
7
|
-
h2,
|
|
8
|
-
h3,
|
|
9
|
-
h4,
|
|
10
|
-
h5,
|
|
11
|
-
h6 {
|
|
12
|
-
margin-top: 1.5em !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* ====== TERMINOLOGY SECTION CONTAINER ====== */
|
|
16
|
-
#terminology-section-utility-container {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-wrap: wrap;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
margin: 1em auto;
|
|
21
|
-
padding: 0;
|
|
22
|
-
width: 100%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@media (min-width: 576px) {
|
|
26
|
-
#terminology-section-utility-container {
|
|
27
|
-
position: sticky;
|
|
28
|
-
top: 3.5em;
|
|
29
|
-
z-index: 10; /* Higher z-index to ensure it stays on top */
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* ====== ANCHOR LINKS ====== */
|
|
34
|
-
.toc-anchor {
|
|
35
|
-
font-size: 0.875em;
|
|
36
|
-
color: #73c2df;
|
|
37
|
-
text-decoration: none;
|
|
38
|
-
transition: opacity 0.3s ease;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.toc-anchor:hover {
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* ====== DEFINITION LIST STYLING (BOOTSTRAP CARD STYLE) ====== */
|
|
46
|
-
dl.terms-and-definitions-list {
|
|
47
|
-
margin: 0;
|
|
48
|
-
padding: 0;
|
|
49
|
-
position: relative;
|
|
50
|
-
z-index: 1; /* Set a baseline z-index for the whole list */
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Term styling (dt) */
|
|
54
|
-
dl.terms-and-definitions-list > dt {
|
|
55
|
-
font-weight: 700;
|
|
56
|
-
margin: 0;
|
|
57
|
-
background-color: var(--card-bg-dt);
|
|
58
|
-
border: 1px solid var(--card-border);
|
|
59
|
-
padding: 0.5rem 1.25rem; /* Increased vertical padding for better readability */
|
|
60
|
-
border-radius: 0.375rem 0.375rem 0 0;
|
|
61
|
-
box-shadow: 0 0.125rem 0.25rem var(--card-shadow);
|
|
62
|
-
color: var(--card-text);
|
|
63
|
-
position: relative; /* Position relative for stacking */
|
|
64
|
-
line-height: 1.5; /* Improve line spacing */
|
|
65
|
-
font-size: 1.05em; /* Slightly larger font for better hierarchy */
|
|
66
|
-
display: flex; /* Use flexbox for better alignment */
|
|
67
|
-
align-items: center; /* Vertically center the content */
|
|
68
|
-
justify-content: space-between; /* Position term and controls apart */
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* This adds spacing between the term text and the buttons */
|
|
72
|
-
dl.terms-and-definitions-list > dt > span {
|
|
73
|
-
margin-right: 1.5em; /* Add spacing to the right of the term text */
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Adjust buttons positioning in the term */
|
|
77
|
-
dl.terms-and-definitions-list > dt .collapse-all-defs-button {
|
|
78
|
-
margin-left: 0.8em; /* Add spacing between buttons if multiple */
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
dl.terms-and-definitions-list > dt:hover {
|
|
82
|
-
background-color: var(--card-hover-bg);
|
|
83
|
-
transition: background-color 0.2s ease-in-out;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Definition styling (dd) */
|
|
87
|
-
dl.terms-and-definitions-list > dd {
|
|
88
|
-
margin: 0;
|
|
89
|
-
background-color: var(--card-bg);
|
|
90
|
-
border: 1px solid var(--card-border);
|
|
91
|
-
border-top: none;
|
|
92
|
-
padding: 1rem 1.25rem;
|
|
93
|
-
color: var(--card-text);
|
|
94
|
-
overflow: scroll;
|
|
95
|
-
width: 100%;
|
|
96
|
-
position: relative; /* Position relative for stacking */
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/* Style paragraphs inside dd */
|
|
100
|
-
dl.terms-and-definitions-list dd p {
|
|
101
|
-
margin: 0;
|
|
102
|
-
color: var(--card-text);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/* Borders and spacing between elements */
|
|
106
|
-
dl.terms-and-definitions-list dt + dd {
|
|
107
|
-
border-bottom: none;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
dl.terms-and-definitions-list dd + dd {
|
|
111
|
-
border-top: none;
|
|
112
|
-
border-bottom: none;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
dl.terms-and-definitions-list dd + dt {
|
|
116
|
-
margin-top: 0.5rem;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/* Last definition in a group */
|
|
120
|
-
dl.terms-and-definitions-list dd.last-dd {
|
|
121
|
-
border-radius: 0 0 0.375rem 0.375rem;
|
|
122
|
-
border-bottom: 1px solid var(--card-border);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/* ====== TRANSCLUSIONS STYLING ====== */
|
|
126
|
-
/* Base transclusion styles */
|
|
127
|
-
.transcluded-xref-term {
|
|
128
|
-
position: relative;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
dt.transcluded-xref-term,
|
|
132
|
-
dd.transcluded-xref-term {
|
|
133
|
-
background: #a9dde03b !important;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/* Fix for all buttons */
|
|
137
|
-
.btn {
|
|
138
|
-
font-variant: small-caps;
|
|
139
|
-
text-transform: uppercase;
|
|
140
|
-
position: relative;
|
|
141
|
-
z-index: 5; /* Higher z-index for all buttons */
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.collapse-all-defs-button {
|
|
145
|
-
float: right;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.transclusion-heading {
|
|
149
|
-
font-size: 1.3em;
|
|
150
|
-
font-weight: bold;
|
|
151
|
-
margin: 1em 0 0.5em;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/* Embedded transclusions in definition lists */
|
|
155
|
-
dl.terms-and-definitions-list > dd.transcluded-xref-term-embedded {
|
|
156
|
-
position: relative;
|
|
157
|
-
padding-left: 2.5rem;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
dl.terms-and-definitions-list > dd.transcluded-xref-term-embedded::before {
|
|
161
|
-
content: "";
|
|
162
|
-
position: absolute;
|
|
163
|
-
left: 0;
|
|
164
|
-
top: 0;
|
|
165
|
-
bottom: 0;
|
|
166
|
-
width: 2rem;
|
|
167
|
-
border-right: 1px dashed #a9dde0;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/* Arrow styling for transclusions */
|
|
171
|
-
dl.terms-and-definitions-list span.transcluded-xref-term::after,
|
|
172
|
-
dl.terms-and-definitions-list > dd.transcluded-xref-term-embedded::after {
|
|
173
|
-
content: "";
|
|
174
|
-
position: absolute;
|
|
175
|
-
left: 0.5rem;
|
|
176
|
-
top: 50%;
|
|
177
|
-
width: 1rem;
|
|
178
|
-
height: 1rem;
|
|
179
|
-
transform: translateY(-50%);
|
|
180
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");
|
|
181
|
-
background-size: contain;
|
|
182
|
-
background-repeat: no-repeat;
|
|
183
|
-
background-position: center;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/* Inline span styling for transclusions */
|
|
187
|
-
dl.terms-and-definitions-list span.transcluded-xref-term {
|
|
188
|
-
padding-left: 1.5rem;
|
|
189
|
-
display: inline-block;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
dl.terms-and-definitions-list span.transcluded-xref-term::before {
|
|
193
|
-
content: "";
|
|
194
|
-
position: absolute;
|
|
195
|
-
left: 0;
|
|
196
|
-
top: 0;
|
|
197
|
-
bottom: 0;
|
|
198
|
-
width: 1.2rem;
|
|
199
|
-
border-right: 1px dashed #a9dde0;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
dl.terms-and-definitions-list span.transcluded-xref-term::after {
|
|
203
|
-
width: 0.8rem;
|
|
204
|
-
height: 0.8rem;
|
|
205
|
-
left: 0.2rem;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.placeholder-tref {
|
|
209
|
-
display: none;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/* ====== ERROR MESSAGES ====== */
|
|
213
|
-
/* No cross-reference found styling */
|
|
214
|
-
.no-xref-found-message {
|
|
215
|
-
background: #f8c481;
|
|
216
|
-
color: #03365f;
|
|
217
|
-
margin: 0 0.5em;
|
|
218
|
-
padding: 0 0.8em;
|
|
219
|
-
border-radius: 0.25rem;
|
|
220
|
-
font-size: 0.8rem;
|
|
221
|
-
font-variant: small-caps;
|
|
222
|
-
text-transform: uppercase;
|
|
223
|
-
}
|
package/assets/js/index.1.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
|
|
3
|
-
var markdown = window.markdownit();
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/* GitHub Issues */
|
|
7
|
-
|
|
8
|
-
let source = specConfig.source;
|
|
9
|
-
if (source) {
|
|
10
|
-
if (source.host === 'github') {
|
|
11
|
-
fetch(`https://api.github.com/repos/${source.account + '/' + source.repo}/issues`)
|
|
12
|
-
.then(response => response.json())
|
|
13
|
-
.then(issues => {
|
|
14
|
-
let count = issues.length;
|
|
15
|
-
document.querySelectorAll('[issue-count]').forEach(node => {
|
|
16
|
-
node.setAttribute('issue-count', count)
|
|
17
|
-
});
|
|
18
|
-
repo_issue_list.innerHTML = issues.map(issue => {
|
|
19
|
-
return `<li class="repo-issue">
|
|
20
|
-
<detail-box>
|
|
21
|
-
<section>${markdown.render(issue.body || '')}</section>
|
|
22
|
-
<header class="repo-issue-title">
|
|
23
|
-
<span class="repo-issue-number">${issue.number}</span>
|
|
24
|
-
<span class="repo-issue-link">
|
|
25
|
-
<a href="${issue.html_url}" target="_blank">${issue.title}</a>
|
|
26
|
-
</span>
|
|
27
|
-
<span detail-box-toggle></span>
|
|
28
|
-
</header>
|
|
29
|
-
</detail-box>
|
|
30
|
-
</li>`
|
|
31
|
-
}).join('');
|
|
32
|
-
Prism.highlightAllUnder(repo_issue_list);
|
|
33
|
-
})
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
//${markdown.render(issue.body)}
|
|
37
|
-
|
|
38
|
-
/* Mermaid Diagrams */
|
|
39
|
-
|
|
40
|
-
mermaid.initialize({
|
|
41
|
-
startOnLoad: true,
|
|
42
|
-
theme: 'neutral'
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
/* Charts */
|
|
46
|
-
|
|
47
|
-
document.querySelectorAll('.chartjs').forEach(chart => {
|
|
48
|
-
new Chart(chart, JSON.parse(chart.textContent));
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
/* Tooltips */
|
|
52
|
-
let tipMap = new WeakMap();
|
|
53
|
-
delegateEvent('pointerover', '.term-reference, .spec-reference, .x-term-reference', (e, anchor) => {
|
|
54
|
-
const id = anchor.getAttribute('data-local-href') || anchor.getAttribute('href') || '';
|
|
55
|
-
|
|
56
|
-
// Don't process if we've already created a tooltip for this anchor
|
|
57
|
-
if (tipMap.has(anchor)) return;
|
|
58
|
-
|
|
59
|
-
// Extract term ID
|
|
60
|
-
const termId = id.replace('#', '');
|
|
61
|
-
|
|
62
|
-
// Find the term in the document
|
|
63
|
-
let term = document.getElementById(termId);
|
|
64
|
-
|
|
65
|
-
// If term wasn't found directly, and it's an external reference (contains ':')
|
|
66
|
-
if (!term && termId.includes(':')) {
|
|
67
|
-
// Try to find the term in the hidden div with all external references
|
|
68
|
-
// This is the format for external references: term:namespace:name
|
|
69
|
-
const parts = termId.split(':');
|
|
70
|
-
|
|
71
|
-
// For external refs, first look for exact match in the hidden div
|
|
72
|
-
if (parts.length > 1) {
|
|
73
|
-
term = document.getElementById(termId);
|
|
74
|
-
|
|
75
|
-
// If not found, try just looking for the term name (last part)
|
|
76
|
-
if (!term && parts.length > 2) {
|
|
77
|
-
const termName = parts[2]; // The actual term name
|
|
78
|
-
term = document.getElementById(`term:${termName}`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// If we still haven't found the term definition, give up
|
|
84
|
-
if (!term) return;
|
|
85
|
-
|
|
86
|
-
// Find the container of the term definition
|
|
87
|
-
let container = term.closest('dt, td:first-child');
|
|
88
|
-
|
|
89
|
-
// Special handling for external term references
|
|
90
|
-
// which might be directly in the term span without a container
|
|
91
|
-
if (!container && term.textContent) {
|
|
92
|
-
let tip = {
|
|
93
|
-
allowHTML: true,
|
|
94
|
-
inlinePositioning: true,
|
|
95
|
-
content: term.innerHTML || term.textContent
|
|
96
|
-
};
|
|
97
|
-
tipMap.set(anchor, tippy(anchor, tip));
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (!container) return;
|
|
102
|
-
|
|
103
|
-
let tip = {
|
|
104
|
-
allowHTML: true,
|
|
105
|
-
inlinePositioning: true
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
switch (container.tagName) {
|
|
109
|
-
case 'DT':
|
|
110
|
-
// For definition terms, show the definition text
|
|
111
|
-
tip.content = container.nextElementSibling?.textContent || 'No definition found';
|
|
112
|
-
break;
|
|
113
|
-
case 'TD':
|
|
114
|
-
// For table cells, create a table of properties
|
|
115
|
-
let table = container.closest('table');
|
|
116
|
-
let tds = Array.from(container.closest('tr').children);
|
|
117
|
-
tds.shift();
|
|
118
|
-
if (table) {
|
|
119
|
-
let headings = Array.from(table.querySelectorAll('thead th'));
|
|
120
|
-
headings.shift();
|
|
121
|
-
if (headings.length) {
|
|
122
|
-
tip.content = `
|
|
123
|
-
<header>${container.textContent}</header>
|
|
124
|
-
<table>
|
|
125
|
-
${headings.map((th, i) => {
|
|
126
|
-
return `<tr><td>${th.textContent}:</td><td>${tds[i] ? tds[i].textContent : ''}</td></tr>`
|
|
127
|
-
}).join('')}
|
|
128
|
-
</table>`;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (tip.content) tipMap.set(anchor, tippy(anchor, tip));
|
|
135
|
-
}, { passive: true });
|
|
136
|
-
|
|
137
|
-
})();
|