@disusered/okf-cli 1.0.0 → 1.2.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.
- package/THIRD_PARTY_NOTICES.md +57 -0
- package/dist/generate.d.ts +25 -0
- package/dist/generate.d.ts.map +1 -0
- package/dist/generate.js +195 -0
- package/dist/generate.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/page/script.d.ts +9 -0
- package/dist/page/script.d.ts.map +1 -0
- package/dist/page/script.js +1004 -0
- package/dist/page/script.js.map +1 -0
- package/dist/page/style.d.ts +5 -0
- package/dist/page/style.d.ts.map +1 -0
- package/dist/page/style.js +330 -0
- package/dist/page/style.js.map +1 -0
- package/dist/vendor/cytoscape.d.ts +3 -0
- package/dist/vendor/cytoscape.d.ts.map +1 -0
- package/dist/vendor/cytoscape.js +7 -0
- package/dist/vendor/cytoscape.js.map +1 -0
- package/dist/vendor/dompurify.d.ts +3 -0
- package/dist/vendor/dompurify.d.ts.map +1 -0
- package/dist/vendor/dompurify.js +7 -0
- package/dist/vendor/dompurify.js.map +1 -0
- package/dist/vendor/marked.d.ts +3 -0
- package/dist/vendor/marked.d.ts.map +1 -0
- package/dist/vendor/marked.js +7 -0
- package/dist/vendor/marked.js.map +1 -0
- package/package.json +15 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script.js","sourceRoot":"","sources":["../../src/page/script.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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embedded stylesheet for the self-contained generated page.
|
|
3
|
+
*/
|
|
4
|
+
export const PAGE_STYLE = String.raw `
|
|
5
|
+
:root {
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
--page: #f8fafc;
|
|
8
|
+
--panel: #ffffff;
|
|
9
|
+
--ink: #0f172a;
|
|
10
|
+
--muted: #64748b;
|
|
11
|
+
--line: #e2e8f0;
|
|
12
|
+
--accent: #b45309;
|
|
13
|
+
--code: #f1f5f9;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (prefers-color-scheme: dark) {
|
|
17
|
+
:root {
|
|
18
|
+
--page: #0b1120;
|
|
19
|
+
--panel: #111827;
|
|
20
|
+
--ink: #e5e7eb;
|
|
21
|
+
--muted: #94a3b8;
|
|
22
|
+
--line: #1f2937;
|
|
23
|
+
--accent: #fbbf24;
|
|
24
|
+
--code: #1f2937;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
* { box-sizing: border-box; }
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* The hidden attribute is how this page shows and hides controls, and any explicit display
|
|
32
|
+
* rule silently defeats it. Restate it with precedence so a later layout rule cannot.
|
|
33
|
+
*/
|
|
34
|
+
[hidden] { display: none !important; }
|
|
35
|
+
|
|
36
|
+
body {
|
|
37
|
+
margin: 0;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
height: 100vh;
|
|
41
|
+
background: var(--page);
|
|
42
|
+
color: var(--ink);
|
|
43
|
+
font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
header {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-wrap: wrap;
|
|
49
|
+
gap: 10px;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
padding: 10px 16px;
|
|
53
|
+
background: var(--panel);
|
|
54
|
+
border-bottom: 1px solid var(--line);
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.brand strong { font-size: 16px; margin-right: 8px; }
|
|
59
|
+
.muted { color: var(--muted); font-size: 12px; }
|
|
60
|
+
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
61
|
+
|
|
62
|
+
.controls input,
|
|
63
|
+
.controls select,
|
|
64
|
+
.controls button {
|
|
65
|
+
font: inherit;
|
|
66
|
+
font-size: 13px;
|
|
67
|
+
padding: 5px 8px;
|
|
68
|
+
color: var(--ink);
|
|
69
|
+
background: var(--panel);
|
|
70
|
+
border: 1px solid var(--line);
|
|
71
|
+
border-radius: 4px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.controls input[type="search"] { width: 240px; }
|
|
75
|
+
.controls input[type="checkbox"] { width: auto; margin: 0 4px 0 0; }
|
|
76
|
+
#stale-only-label { display: inline-flex; align-items: center; font-size: 13px; }
|
|
77
|
+
.controls button { cursor: pointer; }
|
|
78
|
+
.controls button:hover { border-color: var(--muted); }
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
* Columns by default: graph beside reader. --split drives the graph's share in either
|
|
82
|
+
* orientation, so the toggle only has to change flex-direction.
|
|
83
|
+
*/
|
|
84
|
+
main { display: flex; flex-direction: row; flex: 1; min-height: 0; }
|
|
85
|
+
|
|
86
|
+
#graph {
|
|
87
|
+
flex: 0 0 var(--split, 60%);
|
|
88
|
+
min-height: 0;
|
|
89
|
+
min-width: 0;
|
|
90
|
+
background: var(--panel);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
#split {
|
|
94
|
+
flex: 0 0 6px;
|
|
95
|
+
background: var(--line);
|
|
96
|
+
cursor: col-resize;
|
|
97
|
+
touch-action: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
#split:hover, #split:focus-visible { background: var(--accent); outline: none; }
|
|
101
|
+
|
|
102
|
+
/* min-height:0 is what lets the reader scroll instead of growing past the viewport. */
|
|
103
|
+
#detail {
|
|
104
|
+
flex: 1 1 auto;
|
|
105
|
+
min-height: 0;
|
|
106
|
+
min-width: 0;
|
|
107
|
+
overflow-y: auto;
|
|
108
|
+
padding: 18px 22px;
|
|
109
|
+
background: var(--panel);
|
|
110
|
+
border-left: 1px solid var(--line);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
main[data-orientation="rows"] { flex-direction: column; }
|
|
114
|
+
main[data-orientation="rows"] > #graph { min-height: 160px; }
|
|
115
|
+
main[data-orientation="rows"] > #split { cursor: row-resize; }
|
|
116
|
+
main[data-orientation="rows"] > #detail { border-left: 0; border-top: 1px solid var(--line); }
|
|
117
|
+
|
|
118
|
+
#detail h1 { font-size: 19px; margin: 6px 0 2px; }
|
|
119
|
+
#detail h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 22px 0 6px; }
|
|
120
|
+
|
|
121
|
+
.chip {
|
|
122
|
+
display: inline-block;
|
|
123
|
+
padding: 2px 8px;
|
|
124
|
+
border-radius: 10px;
|
|
125
|
+
font-size: 11px;
|
|
126
|
+
font-weight: 600;
|
|
127
|
+
color: #fff;
|
|
128
|
+
background: var(--muted);
|
|
129
|
+
text-transform: uppercase;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); margin: 0 0 14px; }
|
|
133
|
+
|
|
134
|
+
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 6px; }
|
|
135
|
+
dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
|
|
136
|
+
dd { margin: 0; }
|
|
137
|
+
|
|
138
|
+
hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
|
|
139
|
+
|
|
140
|
+
#detail-body h1, #detail-body h2, #detail-body h3,
|
|
141
|
+
#detail-body h4, #detail-body h5, #detail-body h6 {
|
|
142
|
+
font-size: 15px;
|
|
143
|
+
margin: 18px 0 6px;
|
|
144
|
+
text-transform: none;
|
|
145
|
+
letter-spacing: 0;
|
|
146
|
+
color: var(--ink);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
#detail-body p { margin: 0 0 10px; }
|
|
150
|
+
#detail-body ul, #detail-body ol { margin: 0 0 10px; padding-left: 22px; }
|
|
151
|
+
#detail-body li { margin-bottom: 3px; }
|
|
152
|
+
#detail-body blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
|
|
153
|
+
|
|
154
|
+
#detail-body pre {
|
|
155
|
+
background: var(--code);
|
|
156
|
+
padding: 10px 12px;
|
|
157
|
+
border-radius: 4px;
|
|
158
|
+
overflow-x: auto;
|
|
159
|
+
margin: 0 0 10px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
|
|
163
|
+
:not(pre) > code { background: var(--code); padding: 1px 4px; border-radius: 3px; }
|
|
164
|
+
|
|
165
|
+
#detail-body table { border-collapse: collapse; margin: 0 0 10px; width: 100%; }
|
|
166
|
+
#detail-body th, #detail-body td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
|
|
167
|
+
#detail-body th { background: var(--code); }
|
|
168
|
+
|
|
169
|
+
a { color: var(--ink); }
|
|
170
|
+
|
|
171
|
+
.internal {
|
|
172
|
+
font: inherit;
|
|
173
|
+
padding: 0;
|
|
174
|
+
border: 0;
|
|
175
|
+
background: none;
|
|
176
|
+
color: var(--ink);
|
|
177
|
+
text-decoration: underline;
|
|
178
|
+
text-decoration-style: dotted;
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.internal:hover { color: var(--accent); }
|
|
183
|
+
|
|
184
|
+
ul.plain { list-style: none; margin: 0; padding: 0; }
|
|
185
|
+
ul.plain li { margin-bottom: 5px; }
|
|
186
|
+
ul.plain .muted { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
187
|
+
|
|
188
|
+
.empty { color: var(--muted); margin-top: 40px; text-align: center; }
|
|
189
|
+
|
|
190
|
+
.chip.warn { background: var(--accent); margin-left: 6px; }
|
|
191
|
+
|
|
192
|
+
.actor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
|
|
193
|
+
.warn-text { color: var(--accent); }
|
|
194
|
+
|
|
195
|
+
/* Source and verification entries stack their signals under the label. */
|
|
196
|
+
#detail-sources .muted, #detail-verified .muted { display: block; }
|
|
197
|
+
#detail-verified ul { margin-bottom: 4px; }
|
|
198
|
+
|
|
199
|
+
#detail-computation h2 { margin-top: 22px; }
|
|
200
|
+
#detail-computation p { margin: 0 0 8px; }
|
|
201
|
+
|
|
202
|
+
.tag {
|
|
203
|
+
font: inherit;
|
|
204
|
+
font-size: 11px;
|
|
205
|
+
padding: 1px 7px;
|
|
206
|
+
margin: 0 4px 4px 0;
|
|
207
|
+
border: 1px solid var(--line);
|
|
208
|
+
border-radius: 10px;
|
|
209
|
+
background: var(--code);
|
|
210
|
+
color: var(--ink);
|
|
211
|
+
cursor: pointer;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.tag:hover { border-color: var(--accent); }
|
|
215
|
+
|
|
216
|
+
/*
|
|
217
|
+
* The dated strip. Every mark is placed along one shared axis as a percentage, so the strip
|
|
218
|
+
* stays proportional at any panel width. Labels alternate above and below the axis, which is
|
|
219
|
+
* what stops two nearby dates from printing over each other, and the marks near either end
|
|
220
|
+
* anchor their label inward instead of centring it off the edge.
|
|
221
|
+
*/
|
|
222
|
+
#detail-timeline { margin: 0 0 18px; }
|
|
223
|
+
|
|
224
|
+
.timeline { position: relative; height: 88px; }
|
|
225
|
+
|
|
226
|
+
.timeline-track {
|
|
227
|
+
position: absolute;
|
|
228
|
+
left: 0;
|
|
229
|
+
right: 0;
|
|
230
|
+
top: calc(50% - 1px);
|
|
231
|
+
height: 2px;
|
|
232
|
+
background: var(--line);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/*
|
|
236
|
+
* The stretch a page has already outlived, drawn from its expiry to the evaluation date.
|
|
237
|
+
* Hatched rather than tinted so the overrun still reads where the accent colour does not.
|
|
238
|
+
*/
|
|
239
|
+
.timeline-overrun {
|
|
240
|
+
position: absolute;
|
|
241
|
+
top: calc(50% - 4px);
|
|
242
|
+
height: 8px;
|
|
243
|
+
border-radius: 4px;
|
|
244
|
+
background: repeating-linear-gradient(
|
|
245
|
+
135deg,
|
|
246
|
+
var(--accent),
|
|
247
|
+
var(--accent) 2px,
|
|
248
|
+
var(--panel) 2px,
|
|
249
|
+
var(--panel) 5px
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.timeline-marks { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
|
|
254
|
+
|
|
255
|
+
/* Zero width: the mark is a point on the axis, and everything hangs off that point. */
|
|
256
|
+
.tl-mark { position: absolute; top: 0; bottom: 0; width: 0; }
|
|
257
|
+
|
|
258
|
+
.tl-dot {
|
|
259
|
+
position: absolute;
|
|
260
|
+
top: calc(50% - 5px);
|
|
261
|
+
left: -5px;
|
|
262
|
+
width: 10px;
|
|
263
|
+
height: 10px;
|
|
264
|
+
border-radius: 50%;
|
|
265
|
+
background: var(--ink);
|
|
266
|
+
box-shadow: 0 0 0 2px var(--panel);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.tl-stem { position: absolute; left: 0; width: 1px; background: var(--line); }
|
|
270
|
+
.tl-above > .tl-stem { top: 34px; height: calc(50% - 34px); }
|
|
271
|
+
.tl-below > .tl-stem { top: 50%; height: 34px; }
|
|
272
|
+
|
|
273
|
+
.tl-label {
|
|
274
|
+
position: absolute;
|
|
275
|
+
left: 0;
|
|
276
|
+
display: block;
|
|
277
|
+
max-width: 132px;
|
|
278
|
+
transform: translateX(-50%);
|
|
279
|
+
text-align: center;
|
|
280
|
+
line-height: 1.25;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.tl-above > .tl-label { bottom: calc(50% + 12px); }
|
|
284
|
+
.tl-below > .tl-label { top: calc(50% + 12px); }
|
|
285
|
+
.tl-start > .tl-label { transform: none; text-align: left; }
|
|
286
|
+
.tl-end > .tl-label { transform: translateX(-100%); text-align: right; }
|
|
287
|
+
|
|
288
|
+
.tl-what, .tl-when { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
289
|
+
.tl-what { font-size: 11px; font-weight: 600; color: var(--ink); }
|
|
290
|
+
.tl-when { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: var(--muted); }
|
|
291
|
+
|
|
292
|
+
/* Shape carries the kind as well as colour, so the strip survives a monochrome print. */
|
|
293
|
+
.tl-written > .tl-dot { border-radius: 2px; background: var(--muted); }
|
|
294
|
+
.tl-checked > .tl-what { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; font-weight: 400; }
|
|
295
|
+
.tl-expires > .tl-dot { border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
|
|
296
|
+
.tl-today > .tl-dot { background: var(--panel); box-shadow: 0 0 0 2px var(--ink); }
|
|
297
|
+
.tl-today > .tl-stem { top: 12px; height: calc(100% - 24px); width: 0; background: none; border-left: 1px dashed var(--muted); }
|
|
298
|
+
|
|
299
|
+
.timeline-note { margin: 0; font-size: 11.5px; color: var(--accent); }
|
|
300
|
+
|
|
301
|
+
/* Usage bars scale to the busiest source on the page, never to anything off it. */
|
|
302
|
+
.usage { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
|
|
303
|
+
|
|
304
|
+
.usage-bar {
|
|
305
|
+
flex: 0 0 130px;
|
|
306
|
+
height: 6px;
|
|
307
|
+
border-radius: 3px;
|
|
308
|
+
background: var(--code);
|
|
309
|
+
overflow: hidden;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.usage-fill { display: block; height: 100%; min-width: 2px; border-radius: 3px; background: var(--muted); }
|
|
313
|
+
.usage-count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
314
|
+
.usage-window { margin-top: 8px; font-size: 11px; color: var(--muted); }
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
/* Narrow viewports stack however the toggle is set; columns needs width to earn its keep. */
|
|
318
|
+
@media (max-width: 820px) {
|
|
319
|
+
main { flex-direction: column; }
|
|
320
|
+
main > #graph { min-height: 160px; }
|
|
321
|
+
main > #split { cursor: row-resize; }
|
|
322
|
+
main > #detail { border-left: 0; border-top: 1px solid var(--line); }
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* Stacked on a short viewport, 60% leaves no usable reading pane. */
|
|
326
|
+
@media (max-height: 620px) {
|
|
327
|
+
main[data-orientation="rows"] > #graph { flex-basis: 40%; }
|
|
328
|
+
}
|
|
329
|
+
`;
|
|
330
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/page/style.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqUnC,CAAC"}
|