@monster-orange/den-ui 0.5.1 → 0.6.6
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 +334 -1
- package/bin/den-ui-parity.mjs +365 -0
- package/inventory/nav-inventory.d.ts +89 -0
- package/inventory/nav-inventory.js +590 -0
- package/inventory/reference/den-chromium-1280.json +5137 -0
- package/inventory/reference/den-chromium-390.json +3653 -0
- package/inventory/reference/den-webkit-1280.json +5137 -0
- package/inventory/reference/den-webkit-390.json +3653 -0
- package/package.json +33 -3
- package/src/busy-words.d.ts +2 -0
- package/src/busy-words.js +6 -0
- package/src/busy.css +155 -0
- package/src/busy.d.ts +80 -0
- package/src/busy.js +105 -35
- package/src/dialog.css +103 -0
- package/src/dialog.d.ts +44 -0
- package/src/dialog.js +95 -30
- package/src/icons.d.ts +4 -0
- package/src/icons.js +43 -0
- package/src/kit.d.ts +146 -0
- package/src/kit.js +224 -0
- package/src/report-shot.d.ts +47 -0
- package/src/report-shot.js +255 -0
- package/src/report.css +387 -0
- package/src/report.d.ts +61 -0
- package/src/report.js +909 -0
- package/src/shell-client.d.ts +31 -0
- package/src/shell-client.js +240 -0
- package/src/shell-html.d.ts +91 -0
- package/src/shell-html.js +289 -0
- package/src/shell.css +558 -0
- package/src/strings.d.ts +18 -0
- package/src/strings.js +514 -0
- package/src/time.d.ts +18 -0
- package/src/time.js +14 -2
- package/src/tokens.css +13 -5
- package/src/update-pill.d.ts +17 -0
- package/src/version.d.ts +7 -0
- package/src/version.js +31 -0
- package/src/whatsnew.css +235 -0
- package/src/whatsnew.d.ts +36 -0
- package/src/whatsnew.js +411 -0
package/src/version.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* den-ui version chip: the running product's version in the top bar
|
|
3
|
+
* (shell-html.js draws it as #version-pill; a click opens What's new).
|
|
4
|
+
*
|
|
5
|
+
* versionLabel(running, changelog) "v0.4.61-dev.0": the running build's
|
|
6
|
+
* own version, prerelease and all; the changelog's newest
|
|
7
|
+
* heading only as the fallback (it names the release being
|
|
8
|
+
* built, not this build). null when neither is known.
|
|
9
|
+
* setVersion(label, root?) the chip's text
|
|
10
|
+
* setUnread(on, root?) the dot: the newest notes are unread
|
|
11
|
+
*/
|
|
12
|
+
export function versionLabel(running, changelog) {
|
|
13
|
+
const v =
|
|
14
|
+
(typeof running === "string" && running.trim()) || changelog?.[0]?.version;
|
|
15
|
+
return v ? `v${v}` : null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function setVersion(label, root = document) {
|
|
19
|
+
const el = root.getElementById
|
|
20
|
+
? root.getElementById("version-pill")
|
|
21
|
+
: root.querySelector("#version-pill");
|
|
22
|
+
const txt = el?.querySelector(".v-txt");
|
|
23
|
+
if (txt && label) txt.textContent = label;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function setUnread(on, root = document) {
|
|
27
|
+
const pip = root.getElementById
|
|
28
|
+
? root.getElementById("v-pip")
|
|
29
|
+
: root.querySelector("#v-pip");
|
|
30
|
+
if (pip) pip.style.display = on ? "block" : "none";
|
|
31
|
+
}
|
package/src/whatsnew.css
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* den-ui What's new: the release notes pop-up (whatsnew.js). Tokens only.
|
|
3
|
+
* <link rel="stylesheet" href="/kit/whatsnew.css">
|
|
4
|
+
*/
|
|
5
|
+
.cl-overlay {
|
|
6
|
+
position: fixed;
|
|
7
|
+
inset: 0;
|
|
8
|
+
z-index: 1000;
|
|
9
|
+
background: var(--kit-veil);
|
|
10
|
+
display: none;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
}
|
|
14
|
+
.cl-overlay.open {
|
|
15
|
+
display: flex;
|
|
16
|
+
}
|
|
17
|
+
.cl-box {
|
|
18
|
+
background: var(--surface);
|
|
19
|
+
border: 1px solid var(--border);
|
|
20
|
+
border-radius: 10px;
|
|
21
|
+
width: min(580px, 92vw);
|
|
22
|
+
max-height: 78vh;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
box-shadow: var(--shadow);
|
|
27
|
+
}
|
|
28
|
+
.cl-hdr {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 10px;
|
|
32
|
+
padding: 13px 18px;
|
|
33
|
+
border-bottom: 1px solid var(--border);
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
}
|
|
36
|
+
.cl-hdr h3 {
|
|
37
|
+
font-family: var(--mono);
|
|
38
|
+
font-size: 13px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
color: var(--text);
|
|
41
|
+
flex: 1;
|
|
42
|
+
margin: 0;
|
|
43
|
+
}
|
|
44
|
+
.cl-close {
|
|
45
|
+
background: none;
|
|
46
|
+
border: none;
|
|
47
|
+
color: var(--muted);
|
|
48
|
+
font-size: 18px;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
line-height: 1;
|
|
51
|
+
padding: 2px 5px;
|
|
52
|
+
border-radius: 3px;
|
|
53
|
+
transition:
|
|
54
|
+
color 0.1s,
|
|
55
|
+
background 0.1s;
|
|
56
|
+
}
|
|
57
|
+
.cl-close:hover {
|
|
58
|
+
color: var(--text);
|
|
59
|
+
background: var(--border);
|
|
60
|
+
}
|
|
61
|
+
.cl-body {
|
|
62
|
+
overflow-y: auto;
|
|
63
|
+
padding: 16px 18px;
|
|
64
|
+
flex: 1;
|
|
65
|
+
}
|
|
66
|
+
.cl-entry {
|
|
67
|
+
margin-bottom: 18px;
|
|
68
|
+
}
|
|
69
|
+
.cl-ver-row {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: baseline;
|
|
72
|
+
gap: 8px;
|
|
73
|
+
margin-bottom: 8px;
|
|
74
|
+
}
|
|
75
|
+
.cl-ver {
|
|
76
|
+
margin: 0;
|
|
77
|
+
font-family: var(--mono);
|
|
78
|
+
font-size: 13px;
|
|
79
|
+
font-weight: 700;
|
|
80
|
+
color: var(--accent-text);
|
|
81
|
+
}
|
|
82
|
+
.cl-date {
|
|
83
|
+
font-size: 11px;
|
|
84
|
+
color: var(--muted);
|
|
85
|
+
}
|
|
86
|
+
.cl-note {
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
color: var(--muted);
|
|
89
|
+
margin: 0 0 8px;
|
|
90
|
+
font-style: italic;
|
|
91
|
+
}
|
|
92
|
+
.cl-sec {
|
|
93
|
+
font-size: 10px;
|
|
94
|
+
font-weight: 600;
|
|
95
|
+
text-transform: uppercase;
|
|
96
|
+
letter-spacing: 0.07em;
|
|
97
|
+
color: var(--muted);
|
|
98
|
+
margin: 8px 0 4px;
|
|
99
|
+
}
|
|
100
|
+
.cl-items {
|
|
101
|
+
list-style: none;
|
|
102
|
+
padding: 0;
|
|
103
|
+
margin: 0;
|
|
104
|
+
}
|
|
105
|
+
.cl-items li {
|
|
106
|
+
font-size: 12px;
|
|
107
|
+
color: var(--text);
|
|
108
|
+
padding: 2px 0 2px 14px;
|
|
109
|
+
position: relative;
|
|
110
|
+
line-height: 1.5;
|
|
111
|
+
}
|
|
112
|
+
.cl-items li::before {
|
|
113
|
+
content: "·";
|
|
114
|
+
position: absolute;
|
|
115
|
+
left: 2px;
|
|
116
|
+
color: var(--muted);
|
|
117
|
+
}
|
|
118
|
+
.cl-subitems {
|
|
119
|
+
list-style: none;
|
|
120
|
+
padding: 0;
|
|
121
|
+
margin: 2px 0 0 0;
|
|
122
|
+
}
|
|
123
|
+
.cl-subitems li {
|
|
124
|
+
font-size: 11.5px;
|
|
125
|
+
padding: 1px 0 1px 14px;
|
|
126
|
+
color: var(--muted);
|
|
127
|
+
}
|
|
128
|
+
.cl-subitems li::before {
|
|
129
|
+
content: "–";
|
|
130
|
+
position: absolute;
|
|
131
|
+
left: 2px;
|
|
132
|
+
}
|
|
133
|
+
.cl-items code {
|
|
134
|
+
font-family: var(--mono);
|
|
135
|
+
font-size: 10.5px;
|
|
136
|
+
color: var(--accent-text);
|
|
137
|
+
background: color-mix(in srgb, var(--accent) 10%, transparent);
|
|
138
|
+
padding: 1px 4px;
|
|
139
|
+
border-radius: 3px;
|
|
140
|
+
}
|
|
141
|
+
.cl-divider {
|
|
142
|
+
border: none;
|
|
143
|
+
border-top: 1px solid var(--border);
|
|
144
|
+
margin: 14px 0;
|
|
145
|
+
}
|
|
146
|
+
.cl-copy-group {
|
|
147
|
+
display: flex;
|
|
148
|
+
gap: 4px;
|
|
149
|
+
margin-left: auto;
|
|
150
|
+
flex-shrink: 0;
|
|
151
|
+
}
|
|
152
|
+
.cl-copy-btn,
|
|
153
|
+
.cl-slack-btn {
|
|
154
|
+
background: none;
|
|
155
|
+
border: 1px solid var(--border);
|
|
156
|
+
color: var(--muted);
|
|
157
|
+
padding: 3px 6px;
|
|
158
|
+
border-radius: 4px;
|
|
159
|
+
line-height: 0;
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
flex-shrink: 0;
|
|
162
|
+
display: inline-flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
transition:
|
|
166
|
+
color 0.1s,
|
|
167
|
+
border-color 0.1s;
|
|
168
|
+
}
|
|
169
|
+
.cl-more-btn {
|
|
170
|
+
padding: 4px 12px;
|
|
171
|
+
font: inherit;
|
|
172
|
+
font-size: 11px;
|
|
173
|
+
color: var(--muted);
|
|
174
|
+
background: none;
|
|
175
|
+
border: 1px solid var(--border);
|
|
176
|
+
border-radius: 6px;
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
}
|
|
179
|
+
.cl-more-btn:hover {
|
|
180
|
+
color: var(--accent-text);
|
|
181
|
+
border-color: var(--accent);
|
|
182
|
+
}
|
|
183
|
+
.cl-copy-btn:hover {
|
|
184
|
+
color: var(--accent-text);
|
|
185
|
+
border-color: var(--accent);
|
|
186
|
+
}
|
|
187
|
+
.cl-copy-btn.copied {
|
|
188
|
+
color: var(--ok);
|
|
189
|
+
border-color: var(--ok);
|
|
190
|
+
}
|
|
191
|
+
.cl-slack-btn:hover {
|
|
192
|
+
color: var(--accent-text);
|
|
193
|
+
border-color: var(--accent);
|
|
194
|
+
}
|
|
195
|
+
.cl-slack-btn.copied {
|
|
196
|
+
color: var(--ok);
|
|
197
|
+
border-color: var(--ok);
|
|
198
|
+
}
|
|
199
|
+
.cl-footer .den-rb {
|
|
200
|
+
margin-right: auto;
|
|
201
|
+
}
|
|
202
|
+
.cl-footer {
|
|
203
|
+
padding: 10px 18px;
|
|
204
|
+
border-top: 1px solid var(--border);
|
|
205
|
+
display: flex;
|
|
206
|
+
justify-content: flex-end;
|
|
207
|
+
flex-shrink: 0;
|
|
208
|
+
gap: 8px;
|
|
209
|
+
background: var(--surface);
|
|
210
|
+
}
|
|
211
|
+
.cl-got-it {
|
|
212
|
+
background: var(--accent-fill);
|
|
213
|
+
border: none;
|
|
214
|
+
color: var(--on-accent);
|
|
215
|
+
padding: 5px 16px;
|
|
216
|
+
border-radius: 5px;
|
|
217
|
+
font-size: 12px;
|
|
218
|
+
font-weight: 600;
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
}
|
|
221
|
+
.cl-got-it:hover {
|
|
222
|
+
filter: brightness(0.92);
|
|
223
|
+
}
|
|
224
|
+
.cl-none {
|
|
225
|
+
color: var(--muted);
|
|
226
|
+
font-size: 12px;
|
|
227
|
+
}
|
|
228
|
+
/* A copy's helper element: on the page for the copy, never seen. */
|
|
229
|
+
.kit-offscreen {
|
|
230
|
+
position: fixed;
|
|
231
|
+
opacity: 0;
|
|
232
|
+
top: 0;
|
|
233
|
+
left: 0;
|
|
234
|
+
pointer-events: none;
|
|
235
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface ChangelogItem {
|
|
2
|
+
text: string;
|
|
3
|
+
items?: ChangelogItem[];
|
|
4
|
+
}
|
|
5
|
+
export interface ChangelogEntry {
|
|
6
|
+
version: string;
|
|
7
|
+
date?: string;
|
|
8
|
+
sections?: Record<string, ChangelogItem[]>;
|
|
9
|
+
}
|
|
10
|
+
export interface WhatsNewOptions {
|
|
11
|
+
lang?: string | (() => string);
|
|
12
|
+
/** The adapter's changelog(): newest first. */
|
|
13
|
+
changelog?: (() => Promise<ChangelogEntry[]>) | null;
|
|
14
|
+
/** The Report button's HTML for the footer ("" for none). */
|
|
15
|
+
reportButton?: () => string;
|
|
16
|
+
/** After a close, with the newest version shown. */
|
|
17
|
+
onClose?: (latest: string | null) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function configureWhatsNew(o?: WhatsNewOptions): void;
|
|
20
|
+
export declare function changelogView(
|
|
21
|
+
list: ChangelogEntry[],
|
|
22
|
+
all: boolean,
|
|
23
|
+
): {
|
|
24
|
+
shown: ChangelogEntry[];
|
|
25
|
+
toggle: { label: string; expanded: boolean } | null;
|
|
26
|
+
};
|
|
27
|
+
export declare function setEntries(list: ChangelogEntry[]): void;
|
|
28
|
+
export declare function getEntries(): ChangelogEntry[];
|
|
29
|
+
export declare function loadWhatsNew(): Promise<ChangelogEntry[]>;
|
|
30
|
+
export declare function ensureWhatsNew(): void;
|
|
31
|
+
export declare function renderBody(): void;
|
|
32
|
+
export declare function copyText(text: string): Promise<void>;
|
|
33
|
+
export declare function buildRichHtml(entry: ChangelogEntry): string;
|
|
34
|
+
export declare function buildMarkdown(entry: ChangelogEntry): string;
|
|
35
|
+
export declare function openWhatsNew(): void;
|
|
36
|
+
export declare function closeWhatsNew(): void;
|