create-pmos 0.380.0 → 0.382.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 +30 -35
- 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-test.js +1 -1
- package/workspace/briefing-premium-initiative-test.js +2 -2
- package/workspace/briefing-premium-test.js +1 -1
- package/workspace/changelog.json +29 -0
- package/workspace/guide/briefing-premium.md +6 -1
- package/workspace/lib/briefing-premium-agent.js +19 -9
- package/workspace/lib/routes-briefing-premium.js +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-viewer-download-test.js +179 -0
- package/workspace/premium-work-depth-test.js +1 -1
- package/workspace/public/pm/chat-md.js +2 -10
- package/workspace/public/pm/md-table.js +53 -0
- package/workspace/public/pm/premium-acts.js +3 -4
- package/workspace/public/pm/premium-doc-edit.js +5 -7
- package/workspace/public/pm/premium-initiative.js +6 -8
- package/workspace/public/pm/premium-insights.js +5 -7
- package/workspace/public/pm/premium-meeting.js +1 -2
- package/workspace/public/pm/premium-report-read.js +4 -3
- package/workspace/public/pm/premium-shell.js +16 -7
- package/workspace/public/pm/premium-vw-doc-model.js +3 -9
- package/workspace/public/pm/premium-vw-doc.css +19 -0
- package/workspace/public/pm/premium-vw-doc.js +1 -1
- package/workspace/public/pm/premium-vw-file.js +83 -6
- package/workspace/public/pm/premium-work.js +4 -4
- package/workspace/public/pm/premium.css +10 -2
- package/workspace/public/pm/premium.js +7 -7
- package/workspace/server.js +17 -0
- package/workspace/test-files.json +2 -0
- package/workspace/test-lists/premium-viewer-share.json +9 -0
|
@@ -1025,7 +1025,7 @@ button.pst{border:0;font:inherit;color:inherit;text-align:left;cursor:pointer}bu
|
|
|
1025
1025
|
.stlc small{font-size:var(--fs-2);color:var(--ink-3);white-space:nowrap;align-self:center}
|
|
1026
1026
|
.stlc button{font-size:var(--fs-2);font-weight:600}
|
|
1027
1027
|
/* ── a report read on the page (initiative premium-report-read): the deck, the page, the menus, the design row and Present. From the mockup's report sheet ── */
|
|
1028
|
-
#dlg.rdrd #askF,#dlg.rdrd #askNote{display:none}
|
|
1028
|
+
#dlg.rdrd:not(.rdiss) #askF,#dlg.rdrd:not(.rdiss) #askNote{display:none}
|
|
1029
1029
|
.rdr{display:grid;gap:12px;min-width:0}
|
|
1030
1030
|
.rdbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
|
|
1031
1031
|
.rdvw button{min-height:44px}
|
|
@@ -1981,7 +1981,15 @@ button.wl-row[aria-pressed="true"] .wl-tog{background:var(--solid);color:var(--o
|
|
|
1981
1981
|
.dso{max-height:62vh;overflow:auto}
|
|
1982
1982
|
.dso .l2{padding-left:20px}
|
|
1983
1983
|
.dso .l3{padding-left:30px;color:var(--ink-3)}
|
|
1984
|
-
.dsbody .mdt{overflow-x:auto;margin:0 0 14px;border-radius:12px;
|
|
1984
|
+
.dsbody .mdt{overflow-x:auto;margin:0 0 14px;border-radius:12px;border:1px solid var(--hair)}
|
|
1985
|
+
/* a wide table keeps short cells on one line and scrolls sideways; its first column stays in view (PM, 2026-10-21) */
|
|
1986
|
+
.dsbody .mdt table,.mdtab table{width:max-content;min-width:100%}
|
|
1987
|
+
.dsbody .mdt th,.dsbody .mdt td,.mdtab th,.mdtab td{max-width:32ch;overflow-wrap:break-word}
|
|
1988
|
+
.dsbody .mdt th:first-child,.dsbody .mdt td:first-child,.mdtab th:first-child,.mdtab td:first-child{position:sticky;left:0;z-index:1;background:var(--card-solid)}
|
|
1989
|
+
.dsbody .mdt th:first-child,.mdtab th:first-child{background:var(--well)}
|
|
1990
|
+
.mdt .al-l,.mdtab .al-l{text-align:left}
|
|
1991
|
+
.mdt .al-c,.mdtab .al-c{text-align:center}
|
|
1992
|
+
.mdt .al-r,.mdtab .al-r{text-align:right}
|
|
1985
1993
|
.dsbody table{border-collapse:collapse;width:100%;font-size:var(--fs-3)}
|
|
1986
1994
|
.dsbody th{font:600 var(--fs-1) var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);text-align:left;padding:8px 12px;background:var(--well)}
|
|
1987
1995
|
.dsbody td{padding:8px 12px;border-top:1px solid var(--hair);vertical-align:top;line-height:1.5}
|
|
@@ -12,7 +12,7 @@ import { lineItems, behindOf, refreshTargets, whenRead } from './freshness-words
|
|
|
12
12
|
import { consoleReads, briefOf, needsListOf } from './premium-brief.js';
|
|
13
13
|
import { mountDocSheet } from './premium-doc-sheet.js';
|
|
14
14
|
import { momentOf, inText } from './c3-phone-model.js';
|
|
15
|
-
import { $, $$, esc, store, THEME_KEY, RM, AI, S, theme, toast, kv, H, openDlg, closeDlg, setTab, setMode, setFull, CHECK, CHEV, ptx, turnA, turnU, H1, H2, P1, UL, logHtml, loadThread, onScroll, wireRail, pvFeed, setPageGaps, sourcesHook, allText, sourcesNow, readLine, chatAbout, pvOpenBell, ibState } from './premium-shell.js';
|
|
15
|
+
import { $, $$, esc, store, THEME_KEY, RM, AI, S, theme, toast, kv, H, openDlg, popKey, closeDlg, setTab, setMode, setFull, CHECK, CHEV, ptx, turnA, turnU, H1, H2, P1, UL, logHtml, loadThread, onScroll, wireRail, pvFeed, setPageGaps, sourcesHook, allText, sourcesNow, readLine, chatAbout, pvOpenBell, ibState } from './premium-shell.js';
|
|
16
16
|
const ICON = {
|
|
17
17
|
meeting: '<rect x="4" y="5" width="16" height="15" rx="3"/><path d="M4 10h16M9 3v4M15 3v4"/>',
|
|
18
18
|
merge: '<circle cx="6" cy="6" r="2"/><circle cx="6" cy="18" r="2"/><circle cx="18" cy="9" r="2"/><path d="M6 8v8M18 11c0 4-6 3-12 5"/>',
|
|
@@ -255,7 +255,7 @@ function plainDialog(r) {
|
|
|
255
255
|
function consoleDialog(r) {
|
|
256
256
|
const facts = [['Kind', r.subject]].concat((r.facts || []).map((f) => ['Fact', f]), r.options && r.options.length ? [['Options', r.options.join(' · ')]] : []);
|
|
257
257
|
return { eye: 'Needs you', logTitle: 'Read from the console Briefing', log: ['Read GET /api/briefing', 'Kept the row Needs you shows'], say: r.prepared || 'This is on the console\'s Needs you.', head: 'What is known', facts, opts: [], sel: null,
|
|
258
|
-
nodef: r.options && r.options.length ? 'Choosing an option is recorded on the console Briefing, not here.' : '', link: r.url || null, linkLabel: r.urlLabel || null,
|
|
258
|
+
nodef: r.options && r.options.length ? 'Choosing an option is recorded on the console Briefing, not here.' : '', link: r.url || null, linkLabel: r.urlLabel || null, popAsk: true,
|
|
259
259
|
pane: { label: 'Detail', file: 'Needs you', h: r.title, intro: r.subject || '', rows: [], paras: (r.facts || []).slice(0, 6) } };
|
|
260
260
|
}
|
|
261
261
|
function openRow(r) {
|
|
@@ -263,10 +263,10 @@ function openRow(r) {
|
|
|
263
263
|
if (!r.dialog) r = { ...r, dialog: r.src ? consoleDialog(r) : plainDialog(r) };
|
|
264
264
|
r = skipFact(r);
|
|
265
265
|
openR = r; const d = r.dialog;
|
|
266
|
-
openDlg({ eye: d.eye + ' · real data', title: d.title || r.title, sub: d.sub || r.subject, say: d.say, stream: turnA(logHtml(d)) + turnA(ptx(d.say)) + cardHtml(r), noteKey: r.chatKey || r.key, pane: paneHtml(r), label: d.pane.label }); // a goal row (premium-chat-session U7) opens its own conversation
|
|
266
|
+
openDlg({ eye: d.eye + ' · real data', title: d.title || r.title, sub: d.sub || r.subject, say: d.say, stream: turnA(logHtml(d)) + turnA(ptx(d.say)) + cardHtml(r), noteKey: d.popAsk ? popKey('need', r.key) : r.chatKey || r.key, facts: d.facts, pane: paneHtml(r), label: d.pane.label }); // a goal row (premium-chat-session U7) opens its own conversation
|
|
267
267
|
ctaState(r);
|
|
268
268
|
pinBtn(r.key);
|
|
269
|
-
if (r.dialog.
|
|
269
|
+
if (!r.dialog.popAsk) loadThread(r.chatKey || r.key); // a console row's popup key loads its own thread (premium-shell openDlg)
|
|
270
270
|
setTimeout(() => { const b = $('#dBody'); b.scrollTop = b.scrollHeight; }, 120);
|
|
271
271
|
}
|
|
272
272
|
/* A list row's pin also sits in its dialog: a phone has no hover, so the row shows the pin only once pinned (premium-calmer-first-screen) */
|
|
@@ -609,10 +609,10 @@ function drawAround() {
|
|
|
609
609
|
$('#aroundCap').textContent = Object.values(A).some((x) => x === null) ? 'Reading' : n ? n + ' to look at' : 'quiet';
|
|
610
610
|
}
|
|
611
611
|
|
|
612
|
-
/* the dialogs: each draws into the dialog's Detail pane and redraws after a press
|
|
612
|
+
/* the dialogs: each draws into the dialog's Detail pane and redraws after a press, with its own conversation beside it (premium-popup-context P1) */
|
|
613
613
|
function bdDlg(key, eye, title, sub, say, draw, onPress, onInput) {
|
|
614
|
-
openDlg({ eye, title, sub, say, stream: turnA(ptx(say)), noteKey:
|
|
615
|
-
|
|
614
|
+
openDlg({ eye, title, sub, say, stream: turnA(ptx(say)), noteKey: popKey('around', key), pane: '<article class="paper doc"><div class="bd-a"></div></article>', label: title });
|
|
615
|
+
setMode('detail');
|
|
616
616
|
const o = $('#oMain'); o.dataset.bd = key;
|
|
617
617
|
const redraw = (focus) => {
|
|
618
618
|
$('.bd-a', o).innerHTML = draw();
|
package/workspace/server.js
CHANGED
|
@@ -7527,6 +7527,23 @@ async function handleRequest(req, res) {
|
|
|
7527
7527
|
const r = chatFileLocate.locate({ path: url.searchParams.get('path') || '', roots: [...workspaces.values()].map((w) => ({ id: w.id, root: w.root })), base: base ? base.id : null, home: os.homedir() });
|
|
7528
7528
|
return json(res, r);
|
|
7529
7529
|
}
|
|
7530
|
+
if (p === '/api/doc/export') {
|
|
7531
|
+
// A markdown file from the viewer's download menu as Word (premium-viewer-share D4). The same guard as GET /api/doc
|
|
7532
|
+
// (readTextDocWhy: inside the workspace, text only), built in memory by lib/report-export.js. It writes nothing and is never cached.
|
|
7533
|
+
if (req.method !== 'GET') { res.writeHead(405, { 'Content-Type': 'text/plain; charset=utf-8' }); return res.end('GET only'); }
|
|
7534
|
+
const w = getWs(url.searchParams.get('ws'));
|
|
7535
|
+
const fmt = url.searchParams.get('fmt') || '';
|
|
7536
|
+
if (fmt !== 'docx') { res.writeHead(400, { 'Content-Type': 'text/plain; charset=utf-8' }); return res.end('fmt must be docx'); }
|
|
7537
|
+
const rel = url.searchParams.get('path') || '';
|
|
7538
|
+
const got = w ? readTextDocWhy(w.root, rel) : { ok: false, reason: 'no such workspace' };
|
|
7539
|
+
if (!got.ok) { res.writeHead(404, { 'Content-Type': 'text/plain; charset=utf-8' }); return res.end(got.reason); }
|
|
7540
|
+
if (got.kind !== 'markdown') { res.writeHead(400, { 'Content-Type': 'text/plain; charset=utf-8' }); return res.end('only a markdown file becomes Word'); }
|
|
7541
|
+
const out = require('./lib/report-export.js').exportOf(got.text, 'docx');
|
|
7542
|
+
if (!out.ok) { res.writeHead(500, { 'Content-Type': 'text/plain; charset=utf-8' }); return res.end(out.error); }
|
|
7543
|
+
const stem = path.basename(rel).replace(/\.[A-Za-z0-9]+$/, '').replace(/[^A-Za-z0-9._-]+/g, '-').slice(0, 80) || 'document';
|
|
7544
|
+
res.writeHead(200, { 'Content-Type': out.mime, 'Content-Length': out.buffer.length, 'Content-Disposition': `attachment; filename="${stem}.docx"`, 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff' });
|
|
7545
|
+
return res.end(out.buffer);
|
|
7546
|
+
}
|
|
7530
7547
|
if (p === '/api/doc') {
|
|
7531
7548
|
const w = getWs(url.searchParams.get('ws'));
|
|
7532
7549
|
// `ref` — a file that exists only on an initiative's own branch (status-clarity R5). Read through git, never the
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"briefing-premium-agent.test.js",
|
|
41
41
|
"goal-chat.test.js",
|
|
42
42
|
"chat-md.test.js",
|
|
43
|
+
"md-table.test.js",
|
|
43
44
|
"chat-file-locate.test.js",
|
|
44
45
|
"briefing-premium-work.test.js",
|
|
45
46
|
"briefing-premium-board.test.js",
|
|
@@ -217,6 +218,7 @@
|
|
|
217
218
|
"briefing-premium-agent.test.js": 1,
|
|
218
219
|
"goal-chat.test.js": 1,
|
|
219
220
|
"chat-md.test.js": 1,
|
|
221
|
+
"md-table.test.js": 1,
|
|
220
222
|
"chat-file-locate.test.js": 1,
|
|
221
223
|
"briefing-premium-work.test.js": 1,
|
|
222
224
|
"briefing-premium-board.test.js": 1,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "A file in the viewer has a download icon (premium-viewer-share slice 1): HTML or PDF for an .html file, Markdown, Word or PDF for a note, the original for other text; GET /api/doc/export builds Word. Real server, 390 and 1280 wide.",
|
|
3
|
+
"seconds": {
|
|
4
|
+
"premium-viewer-download-test.js": 30
|
|
5
|
+
},
|
|
6
|
+
"panels": [
|
|
7
|
+
"premium-viewer-download-test.js"
|
|
8
|
+
]
|
|
9
|
+
}
|