@mark1russell7/site-pages 0.1.10 → 0.2.1
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/README.md +120 -2
- package/build/chrome.d.ts +22 -3
- package/build/chrome.d.ts.map +1 -1
- package/build/chrome.js +14 -2
- package/build/chrome.js.map +1 -1
- package/build/cli.js +73 -11
- package/build/cli.js.map +1 -1
- package/build/explorer/index.d.ts +212 -0
- package/build/explorer/index.d.ts.map +1 -0
- package/build/explorer/index.js +1342 -0
- package/build/explorer/index.js.map +1 -0
- package/build/vite.d.ts +72 -0
- package/build/vite.d.ts.map +1 -0
- package/build/vite.js +75 -0
- package/build/vite.js.map +1 -0
- package/package.json +16 -2
- package/styles/explorer.css +173 -0
- package/styles/shell.css +166 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @mark1russell7/site-pages/explorer.css: the style of the response explorer.
|
|
3
|
+
*
|
|
4
|
+
* Use: import this file with the entry ./explorer.
|
|
5
|
+
* import "@mark1russell7/site-pages/explorer.css";
|
|
6
|
+
*
|
|
7
|
+
* The explorer reads the tokens of a site when they exist: --card or --surface, --fg or --ink, --muted,
|
|
8
|
+
* --line or --rule, --sunk or --sunken, --accent or --focus and --mono. Without them, it uses its own colors.
|
|
9
|
+
* The two dark rules below keep the same values, as the rules of shell.css do.
|
|
10
|
+
*/
|
|
11
|
+
.response-explorer {
|
|
12
|
+
--rx-surface: var(--card, var(--surface, #ffffff));
|
|
13
|
+
--rx-sunken: var(--sunk, var(--sunken, #f1eee8));
|
|
14
|
+
--rx-ink: var(--fg, var(--ink, #1b1a17));
|
|
15
|
+
--rx-muted: var(--muted, #5d5952);
|
|
16
|
+
--rx-rule: var(--line, var(--rule, #e0dbd1));
|
|
17
|
+
--rx-accent: var(--accent, var(--focus, #2f5bd3));
|
|
18
|
+
--rx-error: var(--err, #b42318);
|
|
19
|
+
--rx-mono: var(--mono, ui-monospace, Menlo, Consolas, monospace);
|
|
20
|
+
--rx-veil: #8f8d86;
|
|
21
|
+
--rx-seq-0: #cde2fb;
|
|
22
|
+
--rx-seq-1: #b7d3f6;
|
|
23
|
+
--rx-seq-2: #9ec5f4;
|
|
24
|
+
--rx-seq-3: #6da7ec;
|
|
25
|
+
--rx-seq-4: #3987e5;
|
|
26
|
+
--rx-seq-5: #2a78d6;
|
|
27
|
+
--rx-seq-6: #1c5cab;
|
|
28
|
+
--rx-seq-7: #104281;
|
|
29
|
+
--rx-seq-8: #0d366b;
|
|
30
|
+
--rx-on-light: #0d2240;
|
|
31
|
+
--rx-on-dark: #f4f8fe;
|
|
32
|
+
display: grid;
|
|
33
|
+
grid-template-columns: minmax(0, 1fr);
|
|
34
|
+
gap: 1rem;
|
|
35
|
+
color: var(--rx-ink);
|
|
36
|
+
font-size: 0.95rem;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (prefers-color-scheme: dark) {
|
|
41
|
+
:root:not([data-theme="light"]) .response-explorer {
|
|
42
|
+
--rx-veil: #55534e;
|
|
43
|
+
--rx-seq-0: #0d366b;
|
|
44
|
+
--rx-seq-1: #104281;
|
|
45
|
+
--rx-seq-2: #184f95;
|
|
46
|
+
--rx-seq-3: #1c5cab;
|
|
47
|
+
--rx-seq-4: #2a78d6;
|
|
48
|
+
--rx-seq-5: #5598e7;
|
|
49
|
+
--rx-seq-6: #86b6ef;
|
|
50
|
+
--rx-seq-7: #b7d3f6;
|
|
51
|
+
--rx-seq-8: #cde2fb;
|
|
52
|
+
--rx-on-light: #f4f8fe;
|
|
53
|
+
--rx-on-dark: #0d2240;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:root[data-theme="dark"] .response-explorer {
|
|
58
|
+
--rx-veil: #55534e;
|
|
59
|
+
--rx-seq-0: #0d366b;
|
|
60
|
+
--rx-seq-1: #104281;
|
|
61
|
+
--rx-seq-2: #184f95;
|
|
62
|
+
--rx-seq-3: #1c5cab;
|
|
63
|
+
--rx-seq-4: #2a78d6;
|
|
64
|
+
--rx-seq-5: #5598e7;
|
|
65
|
+
--rx-seq-6: #86b6ef;
|
|
66
|
+
--rx-seq-7: #b7d3f6;
|
|
67
|
+
--rx-seq-8: #cde2fb;
|
|
68
|
+
--rx-on-light: #f4f8fe;
|
|
69
|
+
--rx-on-dark: #0d2240;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (min-width: 60rem) {
|
|
73
|
+
.response-explorer { grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr); align-items: start; }
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* The controls */
|
|
77
|
+
.rx-controls { display: grid; gap: 0.75rem; min-width: 0; }
|
|
78
|
+
.rx-axes { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
|
|
79
|
+
.rx-field { display: grid; gap: 0.15rem; min-width: 0; font-size: 0.85rem; color: var(--rx-muted); }
|
|
80
|
+
.rx-field select { width: 100%; min-height: 2.25rem; border: 1px solid var(--rx-rule); background: var(--rx-surface); border-radius: 0.4rem; padding: 0.2rem 0.35rem; color: var(--rx-ink); font: inherit; }
|
|
81
|
+
.rx-field select:hover { border-color: var(--rx-accent); }
|
|
82
|
+
.rx-hold { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 0.25rem; }
|
|
83
|
+
.rx-name, .rx-section { font-size: 0.85rem; color: var(--rx-muted); padding: 0; margin: 0; }
|
|
84
|
+
.rx-section { text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.75rem; border-top: 1px solid var(--rx-rule); padding-top: 0.6rem; }
|
|
85
|
+
.rx-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
|
|
86
|
+
.rx-chip { position: relative; display: inline-flex; cursor: pointer; }
|
|
87
|
+
.rx-radio { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: inherit; }
|
|
88
|
+
.rx-chip span { display: inline-flex; align-items: center; min-height: 2rem; border: 1px solid var(--rx-rule); background: var(--rx-surface); border-radius: 999px; padding: 0.1rem 0.7rem; font-size: 0.88rem; }
|
|
89
|
+
.rx-chip:hover span { border-color: var(--rx-accent); }
|
|
90
|
+
.rx-radio:checked + span { background: var(--rx-accent); border-color: var(--rx-accent); color: var(--rx-surface); font-weight: 600; }
|
|
91
|
+
.rx-radio:focus-visible + span { outline: 2px solid var(--rx-accent); outline-offset: 2px; }
|
|
92
|
+
.rx-radio:disabled + span { opacity: 0.45; border-style: dashed; }
|
|
93
|
+
.rx-chip:has(.rx-radio:disabled) { cursor: not-allowed; }
|
|
94
|
+
.rx-radio:disabled:checked + span { background: var(--rx-sunken); color: var(--rx-muted); border-color: var(--rx-rule); }
|
|
95
|
+
.rx-slider-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
|
|
96
|
+
.rx-value { font-variant-numeric: tabular-nums; font-weight: 600; }
|
|
97
|
+
.rx-slider { width: 100%; margin: 0; min-height: 1.75rem; accent-color: var(--rx-accent); }
|
|
98
|
+
.rx-slider:disabled { opacity: 0.45; }
|
|
99
|
+
.rx-note { margin: 0; font-size: 0.82rem; color: var(--rx-muted); }
|
|
100
|
+
|
|
101
|
+
/* The charts */
|
|
102
|
+
.rx-chart { display: grid; gap: 0.5rem; min-width: 0; }
|
|
103
|
+
.rx-error { margin: 0; padding: 0.5rem 0.7rem; background: var(--rx-sunken); border: 1px solid var(--rx-rule); border-radius: 0.5rem; font-size: 0.92rem; }
|
|
104
|
+
.rx-error:empty { display: none; }
|
|
105
|
+
.rx-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.25rem), 1fr)); gap: 0.75rem; min-width: 0; }
|
|
106
|
+
.rx-panel { margin: 0; min-width: 0; }
|
|
107
|
+
.rx-panel-title { font-size: 0.88rem; font-weight: 600; }
|
|
108
|
+
.rx-svg { display: block; max-width: 100%; height: auto; touch-action: pan-y; border-radius: 0.3rem; }
|
|
109
|
+
.rx-svg:focus-visible { outline: 2px solid var(--rx-accent); outline-offset: 2px; }
|
|
110
|
+
.rx-tick, .rx-axis-name, .rx-cell-text { font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
|
|
111
|
+
.rx-tick { fill: var(--rx-muted); }
|
|
112
|
+
.rx-axis-name { fill: var(--rx-muted); font-size: 12px; }
|
|
113
|
+
.rx-axis { stroke: var(--rx-muted); stroke-width: 1; }
|
|
114
|
+
.rx-grid { stroke: var(--rx-rule); stroke-width: 1; }
|
|
115
|
+
.rx-line { fill: none; stroke: var(--rx-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
|
|
116
|
+
.rx-band-stop { stop-color: var(--rx-accent); }
|
|
117
|
+
.rx-band { fill-opacity: 0.28; stroke: none; }
|
|
118
|
+
.rx-whisker { fill: var(--rx-accent); }
|
|
119
|
+
.rx-dot { fill: var(--rx-ink); fill-opacity: 0.6; stroke: var(--rx-surface); stroke-width: 1; }
|
|
120
|
+
.rx-dot-heat { fill: var(--rx-surface); fill-opacity: 0.9; stroke: var(--rx-ink); }
|
|
121
|
+
.rx-ring-dot { stroke: var(--rx-surface); stroke-width: 2; }
|
|
122
|
+
.rx-cursor { stroke: var(--rx-muted); stroke-width: 1; stroke-dasharray: 3 3; }
|
|
123
|
+
.rx-ring { fill: var(--rx-surface); stroke: var(--rx-accent); stroke-width: 2; }
|
|
124
|
+
.rx-cell-cursor { fill: none; stroke: var(--rx-ink); stroke-width: 2; }
|
|
125
|
+
.rx-veil { fill: var(--rx-veil); }
|
|
126
|
+
.rx-cell-text { pointer-events: none; }
|
|
127
|
+
.rx-on-light { fill: var(--rx-on-light); }
|
|
128
|
+
.rx-on-dark { fill: var(--rx-on-dark); }
|
|
129
|
+
.rx-h0 { fill: var(--rx-seq-0); }
|
|
130
|
+
.rx-h1 { fill: var(--rx-seq-1); }
|
|
131
|
+
.rx-h2 { fill: var(--rx-seq-2); }
|
|
132
|
+
.rx-h3 { fill: var(--rx-seq-3); }
|
|
133
|
+
.rx-h4 { fill: var(--rx-seq-4); }
|
|
134
|
+
.rx-h5 { fill: var(--rx-seq-5); }
|
|
135
|
+
.rx-h6 { fill: var(--rx-seq-6); }
|
|
136
|
+
.rx-h7 { fill: var(--rx-seq-7); }
|
|
137
|
+
.rx-h8 { fill: var(--rx-seq-8); }
|
|
138
|
+
|
|
139
|
+
/* The legend and the readout */
|
|
140
|
+
.rx-legend { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0; font-size: 0.82rem; color: var(--rx-muted); }
|
|
141
|
+
.rx-key { display: inline-flex; align-items: center; gap: 0.35rem; font-variant-numeric: tabular-nums; }
|
|
142
|
+
.rx-mark { display: inline-block; flex: none; width: 1.1rem; }
|
|
143
|
+
.rx-mark-line { height: 2px; background: var(--rx-accent); }
|
|
144
|
+
.rx-mark-band { height: 0.7rem; background: var(--rx-accent); opacity: 0.28; border-radius: 2px; }
|
|
145
|
+
.rx-mark-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--rx-ink); opacity: 0.6; }
|
|
146
|
+
.rx-mark-veil { height: 0.7rem; background: var(--rx-veil); border-radius: 2px; }
|
|
147
|
+
.rx-ramp { display: inline-flex; width: 6rem; height: 0.6rem; }
|
|
148
|
+
.rx-ramp b { flex: 1; }
|
|
149
|
+
.rx-s0 { background: var(--rx-seq-0); }
|
|
150
|
+
.rx-s1 { background: var(--rx-seq-1); }
|
|
151
|
+
.rx-s2 { background: var(--rx-seq-2); }
|
|
152
|
+
.rx-s3 { background: var(--rx-seq-3); }
|
|
153
|
+
.rx-s4 { background: var(--rx-seq-4); }
|
|
154
|
+
.rx-s5 { background: var(--rx-seq-5); }
|
|
155
|
+
.rx-s6 { background: var(--rx-seq-6); }
|
|
156
|
+
.rx-s7 { background: var(--rx-seq-7); }
|
|
157
|
+
.rx-s8 { background: var(--rx-seq-8); }
|
|
158
|
+
.rx-readout { margin: 0; min-height: 2.6em; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
|
|
159
|
+
|
|
160
|
+
/* The table of numbers */
|
|
161
|
+
.rx-numbers summary { cursor: pointer; font-size: 0.88rem; color: var(--rx-accent); }
|
|
162
|
+
.rx-numbers-body { display: grid; gap: 0.75rem; margin-top: 0.5rem; }
|
|
163
|
+
.rx-table-box { --scroll-cue-bg: var(--rx-surface); max-height: 20rem; overflow: auto; }
|
|
164
|
+
.rx-table { border-collapse: collapse; width: 100%; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
|
|
165
|
+
.rx-table caption { text-align: left; font-weight: 600; padding-bottom: 0.25rem; }
|
|
166
|
+
.rx-table th, .rx-table td { border-bottom: 1px solid var(--rx-rule); padding: 0.15rem 0.4rem; text-align: right; }
|
|
167
|
+
.rx-table th:first-child, .rx-table td:first-child { text-align: left; }
|
|
168
|
+
|
|
169
|
+
/* The faults of a bad record */
|
|
170
|
+
.rx-faults { color: var(--rx-ink); border: 1px solid var(--rx-error); border-radius: 0.5rem; padding: 0.6rem 0.8rem; }
|
|
171
|
+
.rx-faults-title { margin: 0 0 0.35rem; font-weight: 600; color: var(--rx-error); }
|
|
172
|
+
.rx-faults ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.2rem; }
|
|
173
|
+
.rx-faults code { font-family: var(--rx-mono); font-size: 0.85em; }
|
package/styles/shell.css
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @mark1russell7/site-pages/shell.css: the tokens and the rules of the shell of a site.
|
|
3
|
+
* The shell is the parts of the page that are not its content: the document, the skip link, the
|
|
4
|
+
* header, the links, the theme button, the main column and the footer.
|
|
5
|
+
*
|
|
6
|
+
* Use: import this file before the style sheet of the site, so the rules of the site come last.
|
|
7
|
+
* import "@mark1russell7/site-pages/shell.css";
|
|
8
|
+
* import "./style.css";
|
|
9
|
+
*
|
|
10
|
+
* A site changes a color with its own :root rule, after this file. To change a dark color, it
|
|
11
|
+
* changes the two dark rules. A site with its own look does not import this file.
|
|
12
|
+
* The rules set no look for the content: buttons, cards, code and tables stay in the site.
|
|
13
|
+
*/
|
|
14
|
+
:root {
|
|
15
|
+
color-scheme: light;
|
|
16
|
+
--bg: #f4f3ee;
|
|
17
|
+
--surface: #ffffff;
|
|
18
|
+
--sunken: #eceae3;
|
|
19
|
+
--ink: #191b23;
|
|
20
|
+
--muted: #5a5d6c;
|
|
21
|
+
--rule: #dad7cd;
|
|
22
|
+
--focus: #2346c4;
|
|
23
|
+
--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
24
|
+
--mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
|
|
25
|
+
--radius: 10px;
|
|
26
|
+
--width: 75rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media (prefers-color-scheme: dark) {
|
|
30
|
+
:root:not([data-theme="light"]) {
|
|
31
|
+
color-scheme: dark;
|
|
32
|
+
--bg: #0f1117;
|
|
33
|
+
--surface: #171a23;
|
|
34
|
+
--sunken: #1f2330;
|
|
35
|
+
--ink: #e8e9ef;
|
|
36
|
+
--muted: #a0a4b6;
|
|
37
|
+
--rule: #2e3345;
|
|
38
|
+
--focus: #93abff;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:root[data-theme="dark"] {
|
|
43
|
+
color-scheme: dark;
|
|
44
|
+
--bg: #0f1117;
|
|
45
|
+
--surface: #171a23;
|
|
46
|
+
--sunken: #1f2330;
|
|
47
|
+
--ink: #e8e9ef;
|
|
48
|
+
--muted: #a0a4b6;
|
|
49
|
+
--rule: #2e3345;
|
|
50
|
+
--focus: #93abff;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
*,
|
|
54
|
+
*::before,
|
|
55
|
+
*::after {
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
html {
|
|
60
|
+
-webkit-text-size-adjust: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
body {
|
|
64
|
+
margin: 0;
|
|
65
|
+
background: var(--bg);
|
|
66
|
+
color: var(--ink);
|
|
67
|
+
font-family: var(--font);
|
|
68
|
+
font-size: 1rem;
|
|
69
|
+
line-height: 1.5;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:focus-visible {
|
|
73
|
+
outline: 2px solid var(--focus);
|
|
74
|
+
outline-offset: 2px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.sr {
|
|
78
|
+
position: absolute;
|
|
79
|
+
width: 1px;
|
|
80
|
+
height: 1px;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
clip: rect(0 0 0 0);
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.skip {
|
|
87
|
+
position: absolute;
|
|
88
|
+
left: 8px;
|
|
89
|
+
top: -40px;
|
|
90
|
+
background: var(--surface);
|
|
91
|
+
padding: 0.4rem 0.8rem;
|
|
92
|
+
border-radius: 8px;
|
|
93
|
+
z-index: 10;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.skip:focus {
|
|
97
|
+
top: 8px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.top {
|
|
101
|
+
max-width: var(--width);
|
|
102
|
+
margin: 0 auto;
|
|
103
|
+
padding: 1.1rem 16px 0.6rem;
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-wrap: wrap;
|
|
106
|
+
align-items: flex-end;
|
|
107
|
+
justify-content: space-between;
|
|
108
|
+
gap: 0.5rem 2rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.brand {
|
|
112
|
+
flex: 1 1 28rem;
|
|
113
|
+
min-width: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.wordmark {
|
|
117
|
+
margin: 0;
|
|
118
|
+
font-size: 1.75rem;
|
|
119
|
+
letter-spacing: -0.02em;
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: 0.6rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.lead {
|
|
126
|
+
margin: 0.35rem 0 0;
|
|
127
|
+
color: var(--muted);
|
|
128
|
+
max-width: 46rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.links {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-wrap: wrap;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 0.25rem 1rem;
|
|
136
|
+
font-size: 0.95rem;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.links a {
|
|
140
|
+
text-decoration: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.links a:hover {
|
|
144
|
+
text-decoration: underline;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.theme {
|
|
148
|
+
min-height: 2rem;
|
|
149
|
+
padding: 0.15rem 0.6rem;
|
|
150
|
+
font-size: 0.875rem;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
main {
|
|
154
|
+
max-width: var(--width);
|
|
155
|
+
margin: 0 auto;
|
|
156
|
+
padding: 0 16px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.foot {
|
|
160
|
+
max-width: var(--width);
|
|
161
|
+
margin: 3rem auto 0;
|
|
162
|
+
padding: 16px;
|
|
163
|
+
border-top: 1px solid var(--rule);
|
|
164
|
+
color: var(--muted);
|
|
165
|
+
font-size: 0.875rem;
|
|
166
|
+
}
|