create-pmos 0.323.0 → 0.325.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/package.json +1 -1
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-calendar-2-test.js +8 -6
- package/workspace/briefing-premium-calendar-3-test.js +7 -4
- package/workspace/briefing-premium-calendar-test.js +4 -2
- package/workspace/guide/briefing-premium.md +15 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-vw-item-test.js +128 -0
- package/workspace/premium-vw-meet-test.js +210 -0
- package/workspace/premium-vw-notes-test.js +161 -0
- package/workspace/premium-vw-slides-test.js +269 -0
- package/workspace/public/pm/premium-board.js +3 -1
- package/workspace/public/pm/premium-deck.js +218 -0
- package/workspace/public/pm/premium-initiative.js +7 -2
- package/workspace/public/pm/premium-meeting.js +84 -31
- package/workspace/public/pm/premium-report-read.js +11 -3
- package/workspace/public/pm/premium-shell.js +1 -0
- package/workspace/public/pm/premium-vw-item-model.js +58 -0
- package/workspace/public/pm/premium-vw-item.css +25 -0
- package/workspace/public/pm/premium-vw-item.js +66 -0
- package/workspace/public/pm/premium-vw-meet.css +87 -0
- package/workspace/public/pm/premium-vw-meet.js +322 -0
- package/workspace/public/pm/premium-vw-notes.css +43 -0
- package/workspace/public/pm/premium-vw-notes.js +188 -0
- package/workspace/public/pm/premium-vw-slides.css +163 -0
- package/workspace/public/pm/premium-vw-slides.js +472 -0
- package/workspace/public/pm/premium.js +2 -0
- package/workspace/test-lists/premium-viewer.json +9 -3
- package/workspace/test-lists/premium-vw-item.json +13 -0
- package/workspace/test-lists/premium-vw-meet.json +13 -0
- package/workspace/test-lists/premium-vw-notes.json +13 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@font-face{font-family:"Space Grotesk";src:url(/vendor/space-grotesk-var.woff2) format("woff2");font-weight:300 700;font-display:swap}
|
|
2
|
+
@font-face{font-family:"IBM Plex Mono";src:url(/vendor/ibm-plex-mono-400.woff2) format("woff2");font-weight:400;font-display:swap}
|
|
3
|
+
@font-face{font-family:"IBM Plex Mono";src:url(/vendor/ibm-plex-mono-500.woff2) format("woff2");font-weight:500;font-display:swap}
|
|
4
|
+
@font-face{font-family:"IBM Plex Mono";src:url(/vendor/ibm-plex-mono-700.woff2) format("woff2");font-weight:600 700;font-display:swap}
|
|
5
|
+
:root{--fs-1:11px;--fs-2:12px;--fs-3:14px;--fs-4:16px;--fs-5:20px;--fs-6:28px}
|
|
6
|
+
/* pm/premium-vw-notes.css — the Notes list in the premium dialog (initiative premium-viewer, R9; premium-vw-notes.js).
|
|
7
|
+
* Loaded once by vwStyle('notes'). Sizes are only var(--fs-1..6), weights 400/500/600 (premium-console-type.test.js). */
|
|
8
|
+
.vn-open{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;margin-left:auto;border-radius:6px;font-size:var(--fs-2);font-weight:600;color:var(--ink-2)}
|
|
9
|
+
.vn-open .i{width:16px;height:16px}
|
|
10
|
+
.vn-open:focus-visible,.vn button:focus-visible,.vn input:focus-visible{outline:2px solid var(--ember);outline-offset:2px}
|
|
11
|
+
.vn{max-width:860px;margin:0 auto;padding:4px 2px 24px}
|
|
12
|
+
.vn-s{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 14px}
|
|
13
|
+
.vn-q{flex:1;min-width:0;display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border:1px solid var(--hair);border-radius:8px;background:var(--card-solid,var(--card))}
|
|
14
|
+
.vn-q .i{width:16px;height:16px;flex:none;color:var(--ink-3)}
|
|
15
|
+
.vn-q input{flex:1;align-self:stretch;min-width:0;border:0;background:none;outline:0;font-size:var(--fs-3);color:var(--ink)}
|
|
16
|
+
.vn-c{font:500 var(--fs-2) var(--mono);color:var(--ink-3)}
|
|
17
|
+
.vn-g{margin:0 0 14px}
|
|
18
|
+
.vn-g h4{display:flex;align-items:baseline;gap:8px;margin:0 0 6px;font:600 var(--fs-1) var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3)}
|
|
19
|
+
.vn-g h4 small{font-size:var(--fs-1);font-weight:400}
|
|
20
|
+
.vn-l{list-style:none;margin:0;padding:0;border:1px solid var(--hair);border-radius:8px;background:var(--card-solid,var(--card));box-shadow:var(--card-shadow);overflow:hidden}
|
|
21
|
+
.vn-r{display:flex;align-items:center}
|
|
22
|
+
.vn-r+.vn-r{border-top:1px solid var(--hair)}
|
|
23
|
+
.vn-o{flex:1;min-width:0;display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 14px;text-align:left;font-size:var(--fs-3);color:var(--ink)}
|
|
24
|
+
.vn-sub .vn-o{padding-left:42px}
|
|
25
|
+
.vn-k{width:28px;height:28px;flex:none;display:grid;place-items:center;border-radius:6px;background:var(--well);color:var(--ink-3)}
|
|
26
|
+
.vn-k.hot{color:var(--ember)}
|
|
27
|
+
.vn-k .i{width:15px;height:15px}
|
|
28
|
+
.vn-t{flex:1;min-width:0;display:grid;gap:2px}
|
|
29
|
+
.vn-t b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
30
|
+
.vn-t small{font:400 var(--fs-2) var(--mono);color:var(--ink-3)}
|
|
31
|
+
.vn-tgs{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:45%}
|
|
32
|
+
.vn-tg{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:6px;background:var(--well);font-size:var(--fs-1);font-weight:500;color:var(--ink-2);white-space:nowrap;max-width:220px;overflow:hidden;text-overflow:ellipsis}
|
|
33
|
+
.vn-tg .i{width:12px;height:12px}
|
|
34
|
+
.vn-live{color:var(--ember)}
|
|
35
|
+
.vn-warn{color:var(--warn,var(--ember))}
|
|
36
|
+
.vn-x{width:44px;height:44px;flex:none;display:grid;place-items:center;margin-right:4px;border-radius:6px;color:var(--ink-3)}
|
|
37
|
+
.vn-x .i{width:16px;height:16px}
|
|
38
|
+
.vn-more span{display:block;padding:10px 14px 10px 42px;font-size:var(--fs-2);color:var(--ink-3)}
|
|
39
|
+
.vn-none{margin:12px 2px;color:var(--ink-3)}
|
|
40
|
+
.vm .vm-nabout{margin:8px 0 4px}
|
|
41
|
+
@media (hover:hover){.vn-o:hover,.vn-x:hover,.vn-open:hover{background:var(--well)}}
|
|
42
|
+
.vn-foot{display:none}
|
|
43
|
+
@media (max-width:600px){.vn-tgs{display:none}.vn-sub .vn-o{padding-left:28px}#vnOpen{display:none}.vn-foot{display:inline-flex;margin:8px 0 0}}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/* pm/premium-vw-notes.js — the Notes list in the premium dialog (initiative premium-viewer, R9; console parity: c3-notes.js, the list).
|
|
2
|
+
*
|
|
3
|
+
* The Briefing's Calendar card has a Notes button. It opens the dialog with every meeting note in the detail pane, with a search
|
|
4
|
+
* field, grouped by what a note is about as the console groups them: Portfolio, each board in the portfolio's order, Initiatives (linked
|
|
5
|
+
* before boards were), then Not linked. The notes of one meeting series (two or more notes with one series key) are one entry: its
|
|
6
|
+
* title, the newest day, "N meetings", "series" and how many next steps are still open; it folds open to its newest three notes.
|
|
7
|
+
* Pressing a note opens its note sheet as a viewer tab (premium-vw-meet.js openNoteTab: Before, During and After, series paging,
|
|
8
|
+
* Since the last one, the notes tables). Pressing a series opens its newest note, which pages through the series.
|
|
9
|
+
*
|
|
10
|
+
* Data: GET /api/notes (rows and series_open), GET /api/boards (the group order), GET /api/notes/search (what was said). Every row
|
|
11
|
+
* field is a field of those answers; a part a note does not hold is left out.
|
|
12
|
+
*/
|
|
13
|
+
import { vwStyle } from './premium-viewer.js';
|
|
14
|
+
import { openNoteTab } from './premium-vw-meet.js';
|
|
15
|
+
|
|
16
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
17
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
18
|
+
const WD = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
19
|
+
const clip = (s, n) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1) + '…' : t; };
|
|
20
|
+
const startOf = (r) => (r.meeting && r.meeting.start) || r.recorded_from || r.created_at || r.updated_at;
|
|
21
|
+
const at = (r) => Date.parse(startOf(r)) || 0;
|
|
22
|
+
const boardKey = (b) => (b.ws || '') + '/' + b.id;
|
|
23
|
+
export const SEARCH_MIN = 2;
|
|
24
|
+
|
|
25
|
+
/** "Mon 19 Oct 10:00", the day and time a note's meeting began (or it was recorded). */
|
|
26
|
+
export function whenOf(iso, withTime = true) {
|
|
27
|
+
const t = new Date(iso);
|
|
28
|
+
if (!Number.isFinite(t.getTime())) return '';
|
|
29
|
+
return WD[t.getDay()] + ' ' + t.getDate() + ' ' + MON[t.getMonth()] + (withTime ? ' ' + pad(t.getHours()) + ':' + pad(t.getMinutes()) : '');
|
|
30
|
+
}
|
|
31
|
+
const lenOf = (ms) => (ms >= 60000 ? Math.round(ms / 60000) + ' min' : '');
|
|
32
|
+
const words = (q) => String(q || '').toLowerCase().split(/\s+/).filter(Boolean);
|
|
33
|
+
|
|
34
|
+
/** One note row as the list draws it. */
|
|
35
|
+
export function rowOf(r) {
|
|
36
|
+
const live = r.state === 'recording' || r.state === 'paused' ? r.state : '';
|
|
37
|
+
const linked = !!(r.meeting && (r.meeting.kind === 'event' || r.meeting.kind === 'adhoc'));
|
|
38
|
+
return {
|
|
39
|
+
id: r.id, title: clip(r.title || 'Untitled note', 120), when: whenOf(startOf(r)), day: whenOf(startOf(r), false), len: lenOf(r.meeting_ms || 0), live,
|
|
40
|
+
initiative: r.initiative && r.initiative.id ? clip(r.initiative.title || r.initiative.id, 60) : '',
|
|
41
|
+
board: !(r.initiative && r.initiative.id) && r.board && r.board.id ? 'board' : '',
|
|
42
|
+
noMeeting: !linked && !live, conflicts: r.conflicts || 0, gist: r.private ? '' : clip((r.summary_lines || [])[0] || '', 140),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** A note matches the search when every word is in its title, meeting, initiative, board or first summary line, or the server found it. */
|
|
47
|
+
export function hits(r, q, found) {
|
|
48
|
+
const ws = words(q);
|
|
49
|
+
if (!ws.length) return true;
|
|
50
|
+
if (found && found.has(r.id)) return true;
|
|
51
|
+
const hay = [r.title, r.meeting && r.meeting.title, r.initiative && (r.initiative.title || r.initiative.id), r.board && (r.board.title || r.board.id),
|
|
52
|
+
r.private ? '' : (r.summary_lines || []).join(' ')].filter(Boolean).join(' ').toLowerCase();
|
|
53
|
+
return ws.every((w) => hay.includes(w));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The list, from the GET /api/notes answer: { state, count, groups: [{ key, label, entries }] }. An entry is a note
|
|
58
|
+
* { kind: 'note', row } or a series { kind: 'series', key, title, when, size, open, carried, rows } (rows newest first).
|
|
59
|
+
* opts = { boards (GET /api/boards boards), q, found (Set of ids from /api/notes/search) }
|
|
60
|
+
*/
|
|
61
|
+
export function notesList(answer, opts = {}) {
|
|
62
|
+
if (!answer || answer.ok !== true) return { state: 'error', error: (answer && answer.error) || 'The notes could not be read.', count: 0, groups: [] };
|
|
63
|
+
const all = (answer.notes || []).filter((r) => r && r.id);
|
|
64
|
+
const shown = all.filter((r) => hits(r, opts.q, opts.found));
|
|
65
|
+
const boards = (opts.boards || []).filter((b) => b && b.id && !b.error);
|
|
66
|
+
const order = new Map(boards.map((b, i) => [boardKey(b), i])), names = new Map(boards.map((b) => [boardKey(b), b.name || b.title || b.id]));
|
|
67
|
+
const size = new Map();
|
|
68
|
+
for (const r of all) { const k = r.series && r.series.key; if (k) size.set(k, (size.get(k) || 0) + 1); }
|
|
69
|
+
const entries = new Map();
|
|
70
|
+
for (const r of shown) {
|
|
71
|
+
const k = r.series && r.series.key, ek = k && size.get(k) >= 2 ? 'S' + k : 'N' + r.id;
|
|
72
|
+
if (!entries.has(ek)) entries.set(ek, { ek, series: ek[0] === 'S' ? k : null, rows: [] });
|
|
73
|
+
entries.get(ek).rows.push(r);
|
|
74
|
+
}
|
|
75
|
+
const g = new Map();
|
|
76
|
+
for (const e of entries.values()) {
|
|
77
|
+
e.rows.sort((a, b) => at(b) - at(a));
|
|
78
|
+
const r = e.rows[0];
|
|
79
|
+
const k = r.portfolio ? '@portfolio' : r.board && r.board.id ? boardKey(r.board) : r.initiative && r.initiative.id ? '@initiative' : '';
|
|
80
|
+
if (!g.has(k)) g.set(k, { key: k, label: k === '@portfolio' ? 'Portfolio' : k === '@initiative' ? 'Initiatives' : !k ? 'Not linked' : names.get(k) || clip(r.board.title || r.board.id, 60), entries: [], t: 0 });
|
|
81
|
+
const o = e.series ? (answer.series_open || {})[e.series] : null;
|
|
82
|
+
g.get(k).entries.push(e.series
|
|
83
|
+
? { kind: 'series', key: e.series, t: at(r), title: clip((r.meeting && r.meeting.kind === 'event' && r.meeting.title) || r.title || 'Untitled meeting', 120), when: whenOf(startOf(r)), size: size.get(e.series), open: o && o.open ? o.open : 0, carried: !!(o && o.carried), rows: e.rows.map(rowOf) }
|
|
84
|
+
: { kind: 'note', t: at(r), row: rowOf(r) });
|
|
85
|
+
}
|
|
86
|
+
for (const x of g.values()) x.entries.sort((a, b) => b.t - a.t);
|
|
87
|
+
const rank = (x) => (x.key === '@portfolio' ? [0, 0] : x.key === '@initiative' ? [3, 0] : !x.key ? [4, 0] : order.has(x.key) ? [1, order.get(x.key)] : [2, 0]);
|
|
88
|
+
const groups = [...g.values()].sort((a, b) => { const p = rank(a), q = rank(b); return p[0] - q[0] || p[1] - q[1] || a.label.localeCompare(b.label); })
|
|
89
|
+
.map(({ key, label, entries: es }) => ({ key, label, entries: es }));
|
|
90
|
+
return { state: 'ok', count: shown.length, total: all.length, groups };
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ── html, pure ───────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
94
|
+
|
|
95
|
+
const ICP = { doc: '<path d="M7 3h7l4 4v14H7zM14 3v4h4"/>', mic: '<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3"/>', notes: '<path d="M7 3h7l4 4v14H7zM14 3v4h4M10 12h5M10 16h4"/>', next: '<path d="M9 6l6 6-6 6"/>', fold: '<path d="M6 9l6 6 6-6"/>', search: '<circle cx="11" cy="11" r="6"/><path d="M20 20l-4.5-4.5"/>', alert: '<path d="M12 4l9 16H3zM12 10v4M12 17h.01"/>' };
|
|
96
|
+
const ic = (k) => `<svg class="i" viewBox="0 0 24 24">${ICP[k]}</svg>`;
|
|
97
|
+
|
|
98
|
+
/** A note's row button. `sub` is a note under an open series: it shows its day and the first line of its summary. */
|
|
99
|
+
export function noteRowHtml(r, esc, sub) {
|
|
100
|
+
const meta = [r.live ? 'now' : sub ? r.day : r.when, r.len].filter(Boolean).join(' · ');
|
|
101
|
+
const tags = [r.live ? `<span class="vn-tg vn-live">${r.live === 'paused' ? 'paused' : 'recording'}</span>` : '',
|
|
102
|
+
!sub && r.initiative ? `<span class="vn-tg">${esc(r.initiative)}</span>` : '', !sub && r.board ? '<span class="vn-tg" title="Linked to the board, not to one initiative">board</span>' : '',
|
|
103
|
+
!sub && r.noMeeting ? '<span class="vn-tg" title="Not linked to a meeting">no meeting</span>' : '',
|
|
104
|
+
r.conflicts ? `<span class="vn-tg vn-warn" title="${r.conflicts} ${r.conflicts === 1 ? 'statement differs' : 'statements differ'} from a file">${ic('alert')}${r.conflicts}</span>` : ''].join('');
|
|
105
|
+
return `<li class="vn-r${sub ? ' vn-sub' : ''}"><button type="button" class="vn-o" data-vn-note="${esc(r.id)}"><span class="vn-k${r.live ? ' hot' : ''}">${ic(r.live ? 'mic' : 'doc')}</span><span class="vn-t"><b>${esc(sub && r.gist ? r.gist : r.title)}</b><small>${esc(meta)}</small></span><span class="vn-tgs">${tags}</span></button></li>`;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** A series entry: its row (opens the newest note) and a fold control; open, its newest three notes. */
|
|
109
|
+
export function seriesHtml(e, esc, open) {
|
|
110
|
+
const more = e.rows.length > 3 ? `<li class="vn-r vn-sub vn-more"><span>${e.rows.length - 3} more in the series. Page through them from a note.</span></li>` : '';
|
|
111
|
+
const left = e.open ? `<span class="vn-tg${e.carried ? ' vn-warn' : ''}" title="${e.open} ${e.open === 1 ? 'next step is' : 'next steps are'} still open across the series">${e.open} open</span>` : '';
|
|
112
|
+
return `<li class="vn-r vn-ser"><button type="button" class="vn-o" data-vn-series="${esc(e.key)}" data-vn-note="${esc(e.rows[0].id)}"><span class="vn-k">${ic('notes')}</span><span class="vn-t"><b>${esc(e.title)}</b><small>${esc(e.when)} · ${e.size} meetings</small></span><span class="vn-tgs"><span class="vn-tg" title="A regular meeting: its notes are kept together">series</span>${left}</span></button><button type="button" class="vn-x" data-vn-fold="${esc(e.key)}" aria-expanded="${!!open}" aria-label="${open ? 'Hide its recent meetings' : 'Show its recent meetings'}">${ic(open ? 'fold' : 'next')}</button></li>`
|
|
113
|
+
+ (open ? e.rows.slice(0, 3).map((r) => noteRowHtml(r, esc, true)).join('') + more : '');
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** The groups, or what is missing. `ui` = { q, expand: Set, searching } */
|
|
117
|
+
export function listBodyHtml(L, esc, ui = {}) {
|
|
118
|
+
if (!L) return '<p class="note vn-none" role="status">Reading the notes.</p>';
|
|
119
|
+
if (L.state === 'error') return `<p class="note vn-none" role="status">The notes could not be read. ${esc(L.error)}</p>`;
|
|
120
|
+
if (!L.total) return '<p class="note vn-none">No notes yet. Notes you record show here, grouped by what they are about.</p>';
|
|
121
|
+
if (!L.count) return `<p class="note vn-none" role="status">${ui.searching ? 'Searching what was said.' : `No note matches “${esc(String(ui.q || '').trim())}”.`}</p>`;
|
|
122
|
+
const q = words(ui.q).length > 0;
|
|
123
|
+
return L.groups.map((g) => `<section class="vn-g" data-vn-group="${esc(g.label)}"><h4>${esc(g.label)}<small>${g.entries.length}</small></h4><ul class="vn-l" role="list">${g.entries.map((e) => (e.kind === 'series' ? seriesHtml(e, esc, q || (ui.expand && ui.expand.has(e.key))) : noteRowHtml(e.row, esc))).join('')}</ul></section>`).join('');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export const countLine = (L) => (L && L.state === 'ok' ? (L.count === L.total ? `${L.total} ${L.total === 1 ? 'note' : 'notes'}` : `${L.count} of ${L.total} notes`) : '');
|
|
127
|
+
|
|
128
|
+
/* ── the dialog ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
129
|
+
|
|
130
|
+
/** Adds the Notes button to the Briefing's Calendar card: in the header on a wide screen, and under the day on a phone, where the
|
|
131
|
+
* header has no room. deps: { $, esc, openDlg, toast, pmGet, pmPost, task } */
|
|
132
|
+
export function mountNotes(d) {
|
|
133
|
+
const card = d.$('#todayCard'), head = card && card.querySelector('.ch');
|
|
134
|
+
if (!head || d.$('#vnOpen')) return null;
|
|
135
|
+
vwStyle('notes');
|
|
136
|
+
const mk = (id, cls) => {
|
|
137
|
+
const b = document.createElement('button');
|
|
138
|
+
b.type = 'button'; b.id = id; b.className = cls; b.setAttribute('aria-haspopup', 'dialog'); b.title = 'Every meeting note, grouped by what it is about';
|
|
139
|
+
b.innerHTML = `${ic('notes')}<span>Notes</span>`;
|
|
140
|
+
b.onclick = () => openNotes(d);
|
|
141
|
+
return b;
|
|
142
|
+
};
|
|
143
|
+
const f = head.querySelector('.fbtn'), b = mk('vnOpen', 'vn-open');
|
|
144
|
+
if (f) f.before(b); else head.append(b);
|
|
145
|
+
card.append(mk('vnOpenFoot', 'vn-open vn-foot'));
|
|
146
|
+
return { open: () => openNotes(d) };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** Opens the dialog with the Notes list in its detail pane. */
|
|
150
|
+
export async function openNotes(d) {
|
|
151
|
+
vwStyle('notes'); vwStyle('meet');
|
|
152
|
+
const ui = { q: '', expand: new Set(), found: null, searching: false, answer: null, boards: [], token: 0 };
|
|
153
|
+
d.openDlg({ eye: 'Calendar', title: 'Notes', label: 'Notes', say: 'Every meeting note you recorded, grouped by what it is about. Press one to open it beside the list.',
|
|
154
|
+
pane: `<div class="vn" id="vnList"><div class="vn-s"><label class="vn-q">${ic('search')}<input type="search" id="vnQ" placeholder="Search notes, decisions, what was said" aria-label="Search the notes" autocomplete="off"></label><span class="vn-c" id="vnCount" aria-live="polite"></span></div><div id="vnBody">${listBodyHtml(null, d.esc)}</div></div>` });
|
|
155
|
+
const box = d.$('#vnList');
|
|
156
|
+
const model = () => (ui.answer ? notesList(ui.answer, { boards: ui.boards, q: ui.q, found: ui.found }) : null);
|
|
157
|
+
const draw = () => {
|
|
158
|
+
if (!box.isConnected) return;
|
|
159
|
+
const L = model();
|
|
160
|
+
d.$('#vnBody').innerHTML = listBodyHtml(L, d.esc, ui);
|
|
161
|
+
d.$('#vnCount').textContent = countLine(L);
|
|
162
|
+
};
|
|
163
|
+
const read = async () => {
|
|
164
|
+
const [l, bs] = await Promise.all([d.pmGet('/api/notes'), d.pmGet('/api/boards')]);
|
|
165
|
+
ui.answer = l || { ok: false, error: 'no answer' };
|
|
166
|
+
ui.boards = bs && bs.ok && Array.isArray(bs.boards) ? bs.boards : [];
|
|
167
|
+
draw();
|
|
168
|
+
};
|
|
169
|
+
let findT = null;
|
|
170
|
+
box.oninput = (e) => {
|
|
171
|
+
if (e.target.id !== 'vnQ') return;
|
|
172
|
+
ui.q = e.target.value; ui.found = null; clearTimeout(findT);
|
|
173
|
+
const q = ui.q.trim(), my = ++ui.token;
|
|
174
|
+
ui.searching = q.length >= SEARCH_MIN; draw();
|
|
175
|
+
if (!ui.searching) return;
|
|
176
|
+
findT = setTimeout(async () => {
|
|
177
|
+
const r = await d.pmGet('/api/notes/search?q=' + encodeURIComponent(q));
|
|
178
|
+
if (my !== ui.token) return;
|
|
179
|
+
ui.searching = false; ui.found = new Set(r && r.ok && Array.isArray(r.ids) ? r.ids : []); draw();
|
|
180
|
+
}, 250);
|
|
181
|
+
};
|
|
182
|
+
box.onclick = (e) => {
|
|
183
|
+
const t = e.target.closest('button'); if (!t) return;
|
|
184
|
+
if (t.dataset.vnFold) { const k = t.dataset.vnFold; if (ui.expand.has(k)) ui.expand.delete(k); else ui.expand.add(k); draw(); const x = box.querySelector(`[data-vn-fold="${CSS.escape(k)}"]`); if (x) x.focus(); return; }
|
|
185
|
+
if (t.dataset.vnNote) openNoteTab({ pmGet: d.pmGet, pmPost: d.pmPost, esc: d.esc, toast: d.toast, task: d.task || (async () => ({ ok: false, text: 'Make task is not available on this page.' })), changed: read }, t.dataset.vnNote);
|
|
186
|
+
};
|
|
187
|
+
await read();
|
|
188
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
:root{--fs-1:11px;--fs-2:12px;--fs-3:14px;--fs-4:16px;--fs-5:20px;--fs-6:28px}
|
|
2
|
+
/* pm/premium-vw-slides.css — the slide editor view (premium-viewer R-SL1), loaded by vwStyle('slides'). The editor's chrome uses the console's
|
|
3
|
+
* type scale; the slide canvas is a fixed 960 x 540 board scaled to its box (--bd-k), so its own sizes are the --fs-sl-* steps below. Item
|
|
4
|
+
* geometry comes from premium-vw-slides.js as --bd-x, --bd-y, --bd-w and --bd-h. */
|
|
5
|
+
.sl{position:relative;display:grid;gap:10px;min-width:0}
|
|
6
|
+
.sl-tb,.sl-ctx{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}
|
|
7
|
+
.sl-ctx{min-height:40px;padding:4px 6px;border-radius:8px;background:var(--well)}
|
|
8
|
+
.sl-sep{width:1px;height:20px;background:var(--hair);margin:0 4px}
|
|
9
|
+
.sl-gap{flex:1}
|
|
10
|
+
.sl-b{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:34px;height:34px;padding:0 8px;border-radius:6px;color:var(--ink-2);font-size:var(--fs-2);font-weight:500;white-space:nowrap}
|
|
11
|
+
.sl-b .i{width:16px;height:16px}
|
|
12
|
+
.sl-b:disabled{opacity:.4;cursor:default}
|
|
13
|
+
.sl-b[aria-pressed="true"]{background:var(--card-solid);color:var(--ink);box-shadow:var(--card-shadow)}
|
|
14
|
+
.sl-b:focus-visible,.sl-mini:focus-visible,.sl-sw:focus-visible,.sl-seg button:focus-visible,.sl-pop button:focus-visible,.sl-stage:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
|
|
15
|
+
.sl-pri{background:var(--solid);color:var(--on-solid);padding:0 12px}
|
|
16
|
+
.sl-pri.on{box-shadow:0 0 0 3px var(--spot)}
|
|
17
|
+
.sl-hint{color:var(--ink-3);font-size:var(--fs-2);padding:0 6px}
|
|
18
|
+
.sl-msg{margin:0;font-size:var(--fs-2);color:var(--ink-2);background:var(--spot);border-radius:8px;padding:8px 10px}
|
|
19
|
+
.sl-seg{display:inline-flex;border:1px solid var(--hair);border-radius:8px;padding:2px}
|
|
20
|
+
.sl-seg button{height:30px;padding:0 10px;border-radius:6px;font-size:var(--fs-2);color:var(--ink-3)}
|
|
21
|
+
.sl-seg button[aria-pressed="true"]{background:var(--card-solid);color:var(--ink);font-weight:500}
|
|
22
|
+
.sl-sw{width:26px;height:26px;border-radius:6px;border:1px solid var(--hair)}
|
|
23
|
+
.sl-sw[aria-pressed="true"]{box-shadow:0 0 0 2px var(--ember)}
|
|
24
|
+
.sl-sw.c-fg,.sl-sw.f-fg{background:var(--ink)}
|
|
25
|
+
.sl-sw.c-acc,.sl-sw.f-acc{background:var(--ember)}
|
|
26
|
+
.sl-sw.c-mut{background:var(--ink-3)}
|
|
27
|
+
.sl-sw.f-soft{background:var(--well)}
|
|
28
|
+
@media (hover:hover){.sl-b:not(:disabled):hover,.sl-seg button:hover{background:var(--card)}.sl-pri:not(:disabled):hover{background:var(--solid);opacity:.9}.sl-pop [role="menuitem"]:hover{background:var(--well)}.sl-th:hover .sl-tha{display:flex}}
|
|
29
|
+
|
|
30
|
+
.sl-body{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;min-width:0}
|
|
31
|
+
.sl-rail{display:flex;flex-direction:column;gap:10px;max-height:560px;overflow-y:auto;padding:2px}
|
|
32
|
+
.sl-th{position:relative;display:grid;grid-template-columns:14px minmax(0,1fr);gap:4px;align-items:start}
|
|
33
|
+
.sl-num{font-style:normal;font-size:var(--fs-1);color:var(--ink-3);font-family:var(--mono)}
|
|
34
|
+
.sl-mini{position:relative;display:block;width:100%;aspect-ratio:16/9;border-radius:6px;overflow:hidden;box-shadow:0 0 0 1px var(--hair);padding:0}
|
|
35
|
+
.sl-th[aria-current="true"] .sl-mini{box-shadow:0 0 0 2px var(--ember)}
|
|
36
|
+
.sl-mini .sl-cv{pointer-events:none}
|
|
37
|
+
.sl-tha{position:absolute;right:2px;top:2px;display:none;gap:2px;background:var(--card-solid);border-radius:6px;box-shadow:var(--card-shadow)}
|
|
38
|
+
.sl-tha .sl-b{min-width:24px;height:24px;padding:0}
|
|
39
|
+
.sl-tha .sl-b .i{width:13px;height:13px}
|
|
40
|
+
.sl-th[aria-current="true"] .sl-tha,.sl-th:focus-within .sl-tha{display:flex}
|
|
41
|
+
.sl-th.over::before{content:"";position:absolute;left:18px;right:0;top:-6px;height:2px;background:var(--ember)}
|
|
42
|
+
.sl-th.drag{opacity:.4}
|
|
43
|
+
.sl-add{border:1px dashed var(--hair);height:40px}
|
|
44
|
+
.sl-main{display:grid;gap:10px;min-width:0;align-content:start}
|
|
45
|
+
.sl-stage{position:relative;aspect-ratio:16/9;border-radius:8px;overflow:hidden;box-shadow:0 0 0 1px var(--hair),var(--card-shadow);touch-action:none;user-select:none}
|
|
46
|
+
.sl-notes{display:grid;gap:4px;font-size:var(--fs-2);color:var(--ink-3)}
|
|
47
|
+
.sl-notes textarea{font:inherit;font-size:var(--fs-3);color:var(--ink);background:var(--card-solid);border:1px solid var(--hair);border-radius:8px;padding:8px 10px;resize:vertical;min-height:64px}
|
|
48
|
+
.sl.ro .sl-stage{touch-action:auto}
|
|
49
|
+
|
|
50
|
+
/* menus, the chart data grid, the image and save forms */
|
|
51
|
+
.sl-pop{position:absolute;left:var(--bd-px,0);top:var(--bd-py,0);z-index:5;min-width:200px;max-width:min(340px,100%);padding:6px;border-radius:8px;background:var(--card-solid);box-shadow:var(--card-shadow),0 0 0 1px var(--hair)}
|
|
52
|
+
.sl-pop [role="menu"]{display:grid}
|
|
53
|
+
.sl-pop [role="menuitem"]{text-align:left;min-height:34px;padding:0 10px;border-radius:6px;font-size:var(--fs-3);color:var(--ink)}
|
|
54
|
+
.sl-pop [role="menuitem"][aria-current="true"]{font-weight:600}
|
|
55
|
+
.sl-ph2{margin:4px 6px 6px;font-size:var(--fs-2);font-weight:600;color:var(--ink-2)}
|
|
56
|
+
.sl-grid{display:grid;grid-template-columns:minmax(0,1fr) 76px 34px;gap:4px;padding:0 4px 6px;max-height:300px;overflow-y:auto}
|
|
57
|
+
.sl-grid input,.sl-imgf input{min-width:0;height:32px;border:1px solid var(--hair);border-radius:6px;background:var(--card-solid);color:var(--ink);padding:0 8px;font:inherit;font-size:var(--fs-3)}
|
|
58
|
+
.sl-imgf{display:grid;gap:8px;padding:4px}
|
|
59
|
+
.sl-imgf label{display:grid;gap:4px;font-size:var(--fs-2);color:var(--ink-3)}
|
|
60
|
+
.sl-row{display:flex;gap:6px;flex-wrap:wrap}
|
|
61
|
+
.sl-err{margin:0;font-size:var(--fs-2);color:var(--bad)}
|
|
62
|
+
|
|
63
|
+
/* the slide canvas: 960 x 540, scaled */
|
|
64
|
+
.sl-cv{--fs-sl-kicker:18px;--fs-sl-small:20px;--fs-sl-body:26px;--fs-sl-head:44px;--fs-sl-quote:42px;--fs-sl-title:64px;--fs-sl-big:150px;--fs-sl-cell:21px;--fs-sl-th:15px;--fs-sl-chart:18px;--fs-sl-axis:16px;
|
|
65
|
+
position:absolute;left:0;top:0;width:960px;height:540px;transform:scale(var(--bd-k,.5));transform-origin:0 0;background:var(--sbg);color:var(--sfg);overflow:hidden;font-family:var(--sans);line-height:1.25}
|
|
66
|
+
.sl-cv[data-th="ember"]{--sbg:linear-gradient(150deg,rgb(30,33,46),rgb(20,22,31) 60%,rgb(48,30,32));--sfg:rgb(243,244,248);--smu:rgba(243,244,248,.7);--sac:rgb(255,138,61);--sso:rgba(255,255,255,.07);--sln:rgba(255,255,255,.16)}
|
|
67
|
+
.sl-cv[data-th="paper"]{--sbg:rgb(251,250,247);--sfg:rgb(22,24,31);--smu:rgb(90,97,114);--sac:rgb(217,98,26);--sso:rgb(240,236,228);--sln:rgba(0,0,0,.13)}
|
|
68
|
+
.sl-cv[data-th="sky"]{--sbg:linear-gradient(160deg,rgb(251,226,209),rgb(236,219,233) 45%,rgb(207,217,243));--sfg:rgb(22,24,31);--smu:rgb(75,82,102);--sac:rgb(76,91,212);--sso:rgba(255,255,255,.55);--sln:rgba(0,0,0,.13)}
|
|
69
|
+
.sl-it{position:absolute;left:var(--bd-x);top:var(--bd-y);width:var(--bd-w);height:var(--bd-h)}
|
|
70
|
+
.sl-tx{width:100%;height:100%;outline:0;overflow:hidden;font-size:var(--fs-sl-body);line-height:1.4}
|
|
71
|
+
.sl-tx p,.sl-tx ul,.sl-tx ol,.sl-tx h3{margin:0 0 .4em}
|
|
72
|
+
.sl-tx ul,.sl-tx ol{padding-left:1.1em}
|
|
73
|
+
.sl-tx h3{font-size:1em;font-weight:600}
|
|
74
|
+
.ed .sl-tx:empty::before{content:"Type here";opacity:.4}
|
|
75
|
+
.r-title .sl-tx{font-size:var(--fs-sl-title);font-weight:600;line-height:1.08}
|
|
76
|
+
.r-heading .sl-tx{font-size:var(--fs-sl-head);font-weight:600;line-height:1.12}
|
|
77
|
+
.r-small .sl-tx{font-size:var(--fs-sl-small);color:var(--smu)}
|
|
78
|
+
.r-kicker .sl-tx{font-size:var(--fs-sl-kicker);font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--sac)}
|
|
79
|
+
.r-big .sl-tx{font-size:var(--fs-sl-big);font-weight:600;line-height:1;color:var(--sac)}
|
|
80
|
+
.r-quote .sl-tx{font-size:var(--fs-sl-quote);font-weight:500;line-height:1.2}
|
|
81
|
+
.a-center{text-align:center}
|
|
82
|
+
.a-right{text-align:right}
|
|
83
|
+
.c-acc .sl-tx{color:var(--sac)}
|
|
84
|
+
.c-mut .sl-tx{color:var(--smu)}
|
|
85
|
+
.sl-sh{width:100%;height:100%;border-radius:8px;background:var(--sac)}
|
|
86
|
+
.sl-sh.dot{border-radius:50%}
|
|
87
|
+
.sl-sh.f-fg{background:var(--sfg)}
|
|
88
|
+
.sl-sh.f-soft{background:var(--sso)}
|
|
89
|
+
.sl-ph{width:100%;height:100%;display:grid;place-content:center;justify-items:center;gap:10px;background:var(--sso);border:2px dashed var(--sln);color:var(--smu);font-size:var(--fs-sl-small);border-radius:6px;text-align:center;padding:12px}
|
|
90
|
+
.sl-ph .i{width:44px;height:44px}
|
|
91
|
+
.sl-it img{width:100%;height:100%;object-fit:cover;display:block}
|
|
92
|
+
.sl-it table{width:100%;border-collapse:collapse;font-size:var(--fs-sl-cell)}
|
|
93
|
+
.sl-it th,.sl-it td{border-bottom:1.5px solid var(--sln);padding:11px 12px;text-align:left;outline:0}
|
|
94
|
+
.sl-it th{color:var(--smu);font-weight:600;font-size:var(--fs-sl-th);text-transform:uppercase;letter-spacing:.06em}
|
|
95
|
+
.sl-it svg{width:100%;height:100%;overflow:visible;display:block}
|
|
96
|
+
.sl-ax{stroke:var(--sln);stroke-width:2}
|
|
97
|
+
.sl-bar{fill:var(--sac);opacity:.5}
|
|
98
|
+
.sl-bar.last{opacity:1}
|
|
99
|
+
.sl-line{fill:none;stroke:var(--sac);stroke-width:5;stroke-linejoin:round;stroke-linecap:round}
|
|
100
|
+
.sl-pt{fill:var(--sac)}
|
|
101
|
+
.sl-lab{fill:currentColor;font-size:var(--fs-sl-chart);font-weight:600}
|
|
102
|
+
.sl-axl{fill:var(--smu);font-size:var(--fs-sl-axis)}
|
|
103
|
+
.ed .sl-it{cursor:move}
|
|
104
|
+
.ed .sl-it.sel{outline:calc(2px / var(--bd-k,.5)) solid var(--ember);outline-offset:calc(4px / var(--bd-k,.5))}
|
|
105
|
+
.ed .sl-it.editing{cursor:text}
|
|
106
|
+
.sl-hdot{position:absolute;width:calc(12px / var(--bd-k,.5));height:calc(12px / var(--bd-k,.5));background:var(--card-solid);border:calc(2px / var(--bd-k,.5)) solid var(--ember);border-radius:50%;display:none;z-index:2;transform:translate(-50%,-50%)}
|
|
107
|
+
.sl-it.sel .sl-hdot{display:block}
|
|
108
|
+
.sl-hdot.h-nw{left:0;top:0;cursor:nwse-resize}
|
|
109
|
+
.sl-hdot.h-ne{left:100%;top:0;cursor:nesw-resize}
|
|
110
|
+
.sl-hdot.h-sw{left:0;top:100%;cursor:nesw-resize}
|
|
111
|
+
.sl-hdot.h-se{left:100%;top:100%;cursor:nwse-resize}
|
|
112
|
+
.sl-guide{position:absolute;background:var(--ember);display:none;z-index:3;pointer-events:none}
|
|
113
|
+
.sl-guide.gv{left:480px;top:0;bottom:0;width:calc(1px / var(--bd-k,.5))}
|
|
114
|
+
.sl-guide.gh{top:270px;left:0;right:0;height:calc(1px / var(--bd-k,.5))}
|
|
115
|
+
.sl-guide.on{display:block}
|
|
116
|
+
|
|
117
|
+
/* Present: the presenter view (data-k=pres), the slides only (aud) and the audience window (win). The chrome is dark in both themes. */
|
|
118
|
+
.sl-pres{position:fixed;inset:0;z-index:90;background:rgb(11,12,17);color:rgb(233,234,240);display:flex;flex-direction:column;gap:12px;padding:max(12px,env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) max(12px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));overflow:auto}
|
|
119
|
+
.sl-pres:focus{outline:0}
|
|
120
|
+
.sl-pres .sl-b{color:rgb(220,222,230)}
|
|
121
|
+
.sl-pres .sl-b:focus-visible{outline-color:rgb(233,234,240)}
|
|
122
|
+
.sl-prb{display:flex;align-items:center;gap:8px;min-width:0;flex:none}
|
|
123
|
+
.sl-prb b{font-size:var(--fs-3);font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
124
|
+
.sl-pk{font-size:var(--fs-3);color:rgb(138,144,166);font-variant-numeric:tabular-nums}
|
|
125
|
+
.sl-prg{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px}
|
|
126
|
+
.sl-prc{display:flex;flex-direction:column;gap:8px;min-height:0;min-width:0}
|
|
127
|
+
.sl-pslot{position:relative;flex:1;min-height:200px;min-width:0;display:grid;place-items:center}
|
|
128
|
+
.sl-pbox{position:relative;width:calc(960px * var(--bd-k,1));height:calc(540px * var(--bd-k,1));overflow:hidden;border-radius:6px}
|
|
129
|
+
.sl-pslot .sl-pbox{cursor:pointer}
|
|
130
|
+
.sl-prn{display:flex;align-items:center;justify-content:center;gap:12px;flex:none}
|
|
131
|
+
.sl-pn{color:rgb(138,144,166);font-size:var(--fs-2);margin:0;text-align:center}
|
|
132
|
+
.sl-pside{display:flex;flex-direction:column;gap:8px;min-width:0}
|
|
133
|
+
.sl-lbl{margin:0;font-size:var(--fs-1);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:rgb(138,144,166)}
|
|
134
|
+
.sl-pnx{position:relative;width:100%;aspect-ratio:16 / 9}
|
|
135
|
+
.sl-pside textarea{flex:1;min-height:140px;resize:none;border-radius:8px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:rgb(233,234,240);padding:10px;font:inherit;font-size:var(--fs-4);line-height:1.5}
|
|
136
|
+
.sl-pside textarea:focus-visible{outline:2px solid rgb(233,234,240);outline-offset:1px}
|
|
137
|
+
.sl-pres .sl-hint{padding:0;color:rgb(138,144,166);margin:0}
|
|
138
|
+
.sl-pres[data-k="win"]{padding:0;display:grid;place-items:center}
|
|
139
|
+
.sl-pres[data-k="win"] .sl-pslot{position:absolute;inset:0}
|
|
140
|
+
.sl-pres[data-k="win"] .sl-pbox{cursor:default}
|
|
141
|
+
.sl-audw{margin:0;background:rgb(7,8,12)}
|
|
142
|
+
@media (hover:hover){.sl-pres .sl-b:not(:disabled):hover{background:rgba(255,255,255,.08)}}
|
|
143
|
+
|
|
144
|
+
@media (max-width:640px){
|
|
145
|
+
.sl-body{grid-template-columns:minmax(0,1fr)}
|
|
146
|
+
.sl-rail{flex-direction:row;max-height:none;overflow-x:auto;overflow-y:hidden;order:2}
|
|
147
|
+
.sl-th{width:116px;flex:none}
|
|
148
|
+
.sl-th.over::before{left:16px;top:0;bottom:0;width:2px;height:auto;right:auto}
|
|
149
|
+
.sl-bl span{display:none}
|
|
150
|
+
.sl-tb .sl-sep{display:none}
|
|
151
|
+
.sl-pn span{display:none}
|
|
152
|
+
.sl-prg{grid-template-columns:minmax(0,1fr);flex:none}
|
|
153
|
+
.sl-pslot{min-height:0;flex:none;aspect-ratio:16 / 9}
|
|
154
|
+
.sl-pnx{width:50%}
|
|
155
|
+
.sl-prb .sl-bl span{display:none}
|
|
156
|
+
}
|
|
157
|
+
@media (pointer:coarse){
|
|
158
|
+
.sl-b,.sl-seg button,.sl-pop [role="menuitem"],.sl-grid input,.sl-imgf input{min-height:44px}
|
|
159
|
+
.sl-b{min-width:44px}
|
|
160
|
+
.sl-sw{width:44px;height:44px}
|
|
161
|
+
.sl-tha{display:flex;position:static;grid-column:2;justify-content:flex-end;background:none;box-shadow:none}
|
|
162
|
+
.sl-tha .sl-b{min-width:44px;height:44px}
|
|
163
|
+
}
|