create-pmos 0.163.0 → 0.164.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.
@@ -15,6 +15,7 @@ import { el } from './dom.js';
15
15
  import { button } from './primitives.js';
16
16
  import { ensureC3Css, c3ic } from './pm-work-view.js';
17
17
  import * as dock from './note-dock.js';
18
+ import { noteById } from './notes-links.js';
18
19
  import { recView, clockOf } from './shell-model.js';
19
20
  import { reducedMotion } from './shell-ticker.js';
20
21
  import { toast } from './c3-toast.js';
@@ -141,7 +142,7 @@ export function disposeRecording(host) {
141
142
 
142
143
  const NS_SVG = 'http://www.w3.org/2000/svg';
143
144
  const glyph = (d) => { const s = document.createElementNS(NS_SVG, 'svg'); s.setAttribute('class', 'ic sm'); s.setAttribute('viewBox', '0 0 24 24'); s.setAttribute('aria-hidden', 'true'); const p = document.createElementNS(NS_SVG, 'path'); p.setAttribute('d', d); s.appendChild(p); return s; };
144
- const RGL = { highlighter: () => c3ic('flag', 'sm'), pause: () => glyph('M8 5v14M16 5v14'), play: () => c3ic('play', 'sm'), square: () => c3ic('stop', 'sm'), mic: () => c3ic('mic', 'sm'), down: () => glyph('M6 9l6 6 6-6') };
145
+ const RGL = { highlighter: () => c3ic('flag', 'sm'), pause: () => glyph('M8 5v14M16 5v14'), play: () => c3ic('play', 'sm'), square: () => c3ic('stop', 'sm'), mic: () => c3ic('mic', 'sm'), focus: () => c3ic('target', 'sm'), down: () => glyph('M6 9l6 6 6-6') };
145
146
 
146
147
  /** The chip opens the note: on console3, Calendar › Notes on the During stage (calendar-views.js listens for c3-open-note);
147
148
  * elsewhere the main app, where the full note is. */
@@ -165,6 +166,19 @@ async function engineLabel() {
165
166
  } catch { return ''; }
166
167
  }
167
168
 
169
+ /** The calendar meeting a note is recording, or null for a note that is not linked to one. */
170
+ function meetingOfNote(id) {
171
+ let n = null; try { n = noteById(id); } catch { n = null; }
172
+ const m = n && n.meeting;
173
+ return m && m.kind === 'event' && m.start ? m : null;
174
+ }
175
+ /** Meeting focus (initiative c3-meeting-focus): the page for the meeting being recorded. The event id is empty for a meeting without a stored id; the page then finds it by start and title. */
176
+ function openFocusFor(m) {
177
+ const day = String(m.start || '').slice(0, 10);
178
+ import('./c3-focus.js').then((f) => f.openFocus({ event: { id: m.event_id || '', at: m.start, end: m.end || null, title: m.title }, date: day }))
179
+ .catch(() => toast({ text: 'The focus page could not load.', tone: 'error' }));
180
+ }
181
+
168
182
  function mountReal(host) {
169
183
  ensureC3Css();
170
184
  let ready = false;
@@ -201,7 +215,8 @@ function mountReal(host) {
201
215
  let st; try { st = dock.recordState(); } catch { st = { mode: 'idle' }; }
202
216
  if (st.mode !== 'idle' && eng.id !== st.id) { eng = { id: st.id, text: '' }; const want = st.id; engineLabel().then((t) => { if (eng.id === want && t) { eng.text = t; rec.key = ''; sync(); } }); }
203
217
  const hl = st.mode === 'recording' && dock.highlightBusy ? dock.highlightBusy() : null;
204
- const key = [st.mode, st.id, st.title, hl ? hl.state + hl.open : '', eng.text].join(':');
218
+ const mt = st.mode !== 'idle' ? meetingOfNote(st.id) : null;
219
+ const key = [st.mode, st.id, st.title, hl ? hl.state + hl.open : '', eng.text, mt ? 'f' + (mt.event_id || '') + mt.start : ''].join(':');
205
220
  if (key !== rec.key) {
206
221
  rec.key = key; rec.clock = null;
207
222
  const recording = st.mode === 'recording';
@@ -218,6 +233,7 @@ function mountReal(host) {
218
233
  group.push(btn(hl ? 'Highlight in progress: show it' : 'Highlight the last 30 seconds and what is said next', 'highlighter', () => dock.highlightNow(), { 'data-fr-rec-highlight': hl ? hl.state : '', 'data-shell-rec-mark': '' }),
219
234
  btn('Pause (you can resume within 1 hour)', 'pause', () => dock.pauseNow(), { 'data-fr-rec-pause': '', 'data-shell-rec-pause': '' }));
220
235
  } else group.push(btn('Resume ' + st.title, 'play', () => dock.resumeNow(), { 'data-fr-rec-resume': '', 'data-shell-rec-resume': '' }));
236
+ if (mt) group.push(btn('Open the focus page for this meeting', 'focus', () => openFocusFor(mt), { 'data-fr-rec-focus': '', 'data-shell-rec-focus': '' }));
221
237
  group.push(btn('Stop for good (cannot be resumed)', 'square', () => dock.stopNow(), { 'data-fr-rec-stop': '', 'data-shell-rec-stop': '' }));
222
238
  kids.push(el('span', { class: 'recg c3rec__live' + (recording ? '' : ' paused'), role: 'group', 'aria-label': (recording ? 'Recording ' : 'Paused: ') + st.title }, group));
223
239
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "_comment": "Initiative c3-meeting-focus: the Meeting focus page of console3. The unit suite covers the route (read, topic, ask), the companion prompt and its parsing, and when the companion runs; the browser suite runs the page in demo mode.",
3
+ "modules": ["meeting-focus.test.js"],
4
+ "panels": ["pm-c3-meeting-focus-test.js"],
5
+ "seconds": { "meeting-focus.test.js": 10, "pm-c3-meeting-focus-test.js": 60 }
6
+ }