@deskwork/studio 0.21.0 → 0.22.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/dist/pages/dashboard/adjacent-section.d.ts +38 -0
- package/dist/pages/dashboard/adjacent-section.d.ts.map +1 -0
- package/dist/pages/dashboard/adjacent-section.js +61 -0
- package/dist/pages/dashboard/adjacent-section.js.map +1 -0
- package/dist/pages/dashboard/adjacent-section.ts +71 -0
- package/dist/pages/dashboard/data.d.ts +35 -4
- package/dist/pages/dashboard/data.d.ts.map +1 -1
- package/dist/pages/dashboard/data.js +69 -5
- package/dist/pages/dashboard/data.js.map +1 -1
- package/dist/pages/dashboard/data.ts +84 -5
- package/dist/pages/dashboard/press-queue.d.ts +16 -0
- package/dist/pages/dashboard/press-queue.d.ts.map +1 -0
- package/dist/pages/dashboard/press-queue.js +91 -0
- package/dist/pages/dashboard/press-queue.js.map +1 -0
- package/dist/pages/dashboard/press-queue.ts +112 -0
- package/dist/pages/dashboard/section.d.ts.map +1 -1
- package/dist/pages/dashboard/section.js +7 -0
- package/dist/pages/dashboard/section.js.map +1 -1
- package/dist/pages/dashboard/section.ts +7 -0
- package/dist/pages/dashboard/shortform-section.d.ts +86 -0
- package/dist/pages/dashboard/shortform-section.d.ts.map +1 -0
- package/dist/pages/dashboard/shortform-section.js +189 -0
- package/dist/pages/dashboard/shortform-section.js.map +1 -0
- package/dist/pages/dashboard/shortform-section.ts +228 -0
- package/dist/pages/dashboard.d.ts.map +1 -1
- package/dist/pages/dashboard.js +34 -1
- package/dist/pages/dashboard.js.map +1 -1
- package/dist/pages/dashboard.ts +40 -1
- package/dist/pages/entry-review/index.d.ts.map +1 -1
- package/dist/pages/entry-review/index.js +24 -2
- package/dist/pages/entry-review/index.js.map +1 -1
- package/dist/pages/entry-review/mobile-sheet.d.ts +65 -0
- package/dist/pages/entry-review/mobile-sheet.d.ts.map +1 -0
- package/dist/pages/entry-review/mobile-sheet.js +170 -0
- package/dist/pages/entry-review/mobile-sheet.js.map +1 -0
- package/dist/pages/masthead-menu.d.ts +38 -0
- package/dist/pages/masthead-menu.d.ts.map +1 -0
- package/dist/pages/masthead-menu.js +126 -0
- package/dist/pages/masthead-menu.js.map +1 -0
- package/dist/pages/masthead-menu.ts +128 -0
- package/dist/pages/masthead.d.ts +85 -0
- package/dist/pages/masthead.d.ts.map +1 -0
- package/dist/pages/masthead.js +99 -0
- package/dist/pages/masthead.js.map +1 -0
- package/dist/pages/masthead.ts +155 -0
- package/dist/pages/mobile-bar.d.ts +72 -0
- package/dist/pages/mobile-bar.d.ts.map +1 -0
- package/dist/pages/mobile-bar.js +88 -0
- package/dist/pages/mobile-bar.js.map +1 -0
- package/dist/pages/mobile-bar.ts +129 -0
- package/dist/pages/shortform-review-mobile-sheet.d.ts +76 -0
- package/dist/pages/shortform-review-mobile-sheet.d.ts.map +1 -0
- package/dist/pages/shortform-review-mobile-sheet.js +159 -0
- package/dist/pages/shortform-review-mobile-sheet.js.map +1 -0
- package/dist/pages/shortform-review-mobile-sheet.ts +185 -0
- package/dist/pages/shortform-review.d.ts +18 -0
- package/dist/pages/shortform-review.d.ts.map +1 -1
- package/dist/pages/shortform-review.js +62 -111
- package/dist/pages/shortform-review.js.map +1 -1
- package/dist/pages/shortform-review.ts +68 -140
- package/dist/pages/shortform.d.ts.map +1 -1
- package/dist/pages/shortform.js +0 -1
- package/dist/pages/shortform.js.map +1 -1
- package/dist/pages/shortform.ts +0 -1
- package/dist/server.js +41 -1
- package/dist/server.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entry-review-specific mobile sheet host + strip affordances.
|
|
3
|
+
*
|
|
4
|
+
* Renders the bottom-sheet container with the five named slots
|
|
5
|
+
* (outline / notes / actions / scrapbook / format) the entry-review
|
|
6
|
+
* surface composes against, plus the two phone-only strip affordances
|
|
7
|
+
* (Source/Preview pill, ✕ Done exit) that live in the top strip when
|
|
8
|
+
* editing on phone.
|
|
9
|
+
*
|
|
10
|
+
* The mobile-BAR helper itself is universal — it moved to
|
|
11
|
+
* `../mobile-bar.ts` and accepts a list of `Cell`s the caller supplies
|
|
12
|
+
* to describe each tab. The entry-review consumer composes the
|
|
13
|
+
* pre-refactor 6-cell configuration via `getEntryReviewBarCells()`
|
|
14
|
+
* below.
|
|
15
|
+
*
|
|
16
|
+
* Design references:
|
|
17
|
+
* - Review tabs: plugins/deskwork-studio/public/mockups/mobile-1-bottom-sheet.html
|
|
18
|
+
* - Editor tabs: plugins/deskwork-studio/public/mockups/editor-2-press-check-tabbar.html
|
|
19
|
+
*
|
|
20
|
+
* The sheet has five content slots. The client controller
|
|
21
|
+
* (`entry-review/mobile-sheet-bar.ts`) populates each at first open.
|
|
22
|
+
* Slot sources:
|
|
23
|
+
* - outline: clone of `.er-outline-drawer-body`
|
|
24
|
+
* - notes: actual `[data-sidebar-list]` element MOVED in on phone
|
|
25
|
+
* (preserves event listeners; see mobile-sheet-bar.ts)
|
|
26
|
+
* - actions: rendered fresh from the decision verbs
|
|
27
|
+
* - format: the press-check key grid rendered server-side below
|
|
28
|
+
*/
|
|
29
|
+
import { html, unsafe } from "../html.js";
|
|
30
|
+
/**
|
|
31
|
+
* The entry-review bar's contextual cell list. Six cells; CSS hides
|
|
32
|
+
* the off-mode cells via the `er-mobile-tab--review` /
|
|
33
|
+
* `er-mobile-tab--edit` modifiers (gated on
|
|
34
|
+
* `body[data-edit-mode="editing"]`).
|
|
35
|
+
*
|
|
36
|
+
* - Review mode visible: Outline · Notes · Scrapbook · Actions
|
|
37
|
+
* - Edit mode visible: Format · Notes · Save
|
|
38
|
+
*
|
|
39
|
+
* The Notes tab is mode `'both'` — review notes the operator leaves
|
|
40
|
+
* carry across into edit. The Scrapbook tab uses the kraft-tone count
|
|
41
|
+
* badge to distinguish folio context from action peers.
|
|
42
|
+
*/
|
|
43
|
+
export function getEntryReviewBarCells() {
|
|
44
|
+
return [
|
|
45
|
+
{
|
|
46
|
+
glyph: '§',
|
|
47
|
+
label: 'Outline',
|
|
48
|
+
mode: 'review',
|
|
49
|
+
action: { kind: 'sheet', name: 'outline' },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
glyph: '¶',
|
|
53
|
+
label: 'Format',
|
|
54
|
+
mode: 'edit',
|
|
55
|
+
action: { kind: 'sheet', name: 'format' },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
glyph: '✎',
|
|
59
|
+
label: 'Notes',
|
|
60
|
+
mode: 'both',
|
|
61
|
+
action: { kind: 'sheet', name: 'notes' },
|
|
62
|
+
count: { dataAttr: 'data-notes-count' },
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
glyph: '▦',
|
|
66
|
+
label: 'Scrapbook',
|
|
67
|
+
mode: 'review',
|
|
68
|
+
action: { kind: 'sheet', name: 'scrapbook' },
|
|
69
|
+
count: { dataAttr: 'data-scrapbook-count', tone: 'kraft' },
|
|
70
|
+
modifierClass: 'er-mobile-tab--scrapbook',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
glyph: '⊕',
|
|
74
|
+
label: 'Actions',
|
|
75
|
+
mode: 'review',
|
|
76
|
+
action: { kind: 'sheet', name: 'actions' },
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
glyph: '⊕',
|
|
80
|
+
label: 'Save',
|
|
81
|
+
mode: 'edit',
|
|
82
|
+
action: { kind: 'direct', action: 'save' },
|
|
83
|
+
modifierClass: 'er-mobile-tab--save',
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
function renderFormatGrid() {
|
|
88
|
+
return html `
|
|
89
|
+
<div class="er-fkey-section">Headings</div>
|
|
90
|
+
<div class="er-fkey-grid">
|
|
91
|
+
<button type="button" class="er-fkey er-fkey--h1" data-fkey="h1"><span class="er-fkey-face">H1</span><span class="er-fkey-label">Title</span></button>
|
|
92
|
+
<button type="button" class="er-fkey er-fkey--h2" data-fkey="h2"><span class="er-fkey-face">H2</span><span class="er-fkey-label">Section</span></button>
|
|
93
|
+
<button type="button" class="er-fkey er-fkey--h3" data-fkey="h3"><span class="er-fkey-face">H3</span><span class="er-fkey-label">Sub</span></button>
|
|
94
|
+
<button type="button" class="er-fkey er-fkey--hr" data-fkey="hr"><span class="er-fkey-face">— · — · —</span><span class="er-fkey-label">Rule</span></button>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="er-fkey-section">Inline</div>
|
|
97
|
+
<div class="er-fkey-grid">
|
|
98
|
+
<button type="button" class="er-fkey er-fkey--bold" data-fkey="bold"><span class="er-fkey-face"><strong>B</strong></span><span class="er-fkey-label">Bold</span></button>
|
|
99
|
+
<button type="button" class="er-fkey er-fkey--em" data-fkey="em"><span class="er-fkey-face"><em>I</em></span><span class="er-fkey-label">Italic</span></button>
|
|
100
|
+
<button type="button" class="er-fkey er-fkey--code" data-fkey="code"><span class="er-fkey-face">\` \`</span><span class="er-fkey-label">Code</span></button>
|
|
101
|
+
<button type="button" class="er-fkey er-fkey--link" data-fkey="link"><span class="er-fkey-face">link</span><span class="er-fkey-label">Link</span></button>
|
|
102
|
+
</div>
|
|
103
|
+
<div class="er-fkey-section">Block</div>
|
|
104
|
+
<div class="er-fkey-grid">
|
|
105
|
+
<button type="button" class="er-fkey er-fkey--list" data-fkey="list"><span class="er-fkey-face">— ·<br>— ·</span><span class="er-fkey-label">List</span></button>
|
|
106
|
+
<button type="button" class="er-fkey er-fkey--ol" data-fkey="ol"><span class="er-fkey-face">1·<br>2·</span><span class="er-fkey-label">Numbered</span></button>
|
|
107
|
+
<button type="button" class="er-fkey er-fkey--quote" data-fkey="quote"><span class="er-fkey-face">"</span><span class="er-fkey-label">Quote</span></button>
|
|
108
|
+
<button type="button" class="er-fkey er-fkey--fence" data-fkey="fence"><span class="er-fkey-face">\`\`\`</span><span class="er-fkey-label">Code block</span></button>
|
|
109
|
+
</div>`;
|
|
110
|
+
}
|
|
111
|
+
export function renderMobileSheet() {
|
|
112
|
+
return unsafe(html `
|
|
113
|
+
<section
|
|
114
|
+
class="er-mobile-sheet"
|
|
115
|
+
id="er-mobile-sheet"
|
|
116
|
+
data-mobile-sheet-host
|
|
117
|
+
hidden
|
|
118
|
+
aria-label="Surface sheet"
|
|
119
|
+
role="dialog"
|
|
120
|
+
aria-modal="false"
|
|
121
|
+
>
|
|
122
|
+
<button class="er-mobile-sheet-handle" data-mobile-sheet-handle type="button" aria-label="Drag to dismiss the sheet">
|
|
123
|
+
<span class="er-mobile-sheet-handle-bar" aria-hidden="true"></span>
|
|
124
|
+
</button>
|
|
125
|
+
<header class="er-mobile-sheet-head">
|
|
126
|
+
<span class="er-mobile-sheet-kicker" data-mobile-sheet-kicker></span>
|
|
127
|
+
<span class="er-mobile-sheet-meta" data-mobile-sheet-meta></span>
|
|
128
|
+
<button class="er-mobile-sheet-close" data-mobile-sheet-close type="button" aria-label="Close sheet">×</button>
|
|
129
|
+
</header>
|
|
130
|
+
<div class="er-mobile-sheet-body" data-mobile-sheet-body>
|
|
131
|
+
<div class="er-mobile-sheet-slot" data-mobile-sheet-slot="outline" hidden></div>
|
|
132
|
+
<div class="er-mobile-sheet-slot" data-mobile-sheet-slot="notes" hidden></div>
|
|
133
|
+
<div class="er-mobile-sheet-slot" data-mobile-sheet-slot="actions" hidden></div>
|
|
134
|
+
<div class="er-mobile-sheet-slot er-mobile-sheet-slot--scrapbook" data-mobile-sheet-slot="scrapbook" hidden></div>
|
|
135
|
+
<div class="er-mobile-sheet-slot er-mobile-sheet-slot--format" data-mobile-sheet-slot="format" hidden>${unsafe(renderFormatGrid())}</div>
|
|
136
|
+
</div>
|
|
137
|
+
</section>`);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Phone-only Source/Preview pill rendered into the top strip when in
|
|
141
|
+
* edit mode. Uses the same `data-edit-view` attribute as the desktop
|
|
142
|
+
* edit toolbar so `editModeBtns` (queried via that attribute in
|
|
143
|
+
* entry-review-client.ts) auto-binds clicks. CSS reveals it only on
|
|
144
|
+
* phone + edit mode; the desktop edit toolbar is hidden in that
|
|
145
|
+
* combination.
|
|
146
|
+
*/
|
|
147
|
+
export function renderStripModeSegment() {
|
|
148
|
+
return unsafe(html `
|
|
149
|
+
<span class="er-strip-mode-mobile" data-strip-mode-mobile aria-hidden="true">
|
|
150
|
+
<button type="button" class="er-strip-mode-btn" data-edit-view="source" aria-pressed="true">Source</button>
|
|
151
|
+
<button type="button" class="er-strip-mode-btn" data-edit-view="preview" aria-pressed="false">Preview</button>
|
|
152
|
+
</span>`);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Phone-only "✕ Done" exit affordance in the strip. Visible only when
|
|
156
|
+
* editing on phone (CSS-gated). Click dispatches into the existing
|
|
157
|
+
* toggle-edit handler — preserves the confirmDiscard prompt when the
|
|
158
|
+
* buffer is dirty, immediate exit when clean. Sits alongside the
|
|
159
|
+
* existing back-link (which continues to navigate home regardless of
|
|
160
|
+
* mode) so the operator always has both "leave editor" and "leave
|
|
161
|
+
* page" affordances available.
|
|
162
|
+
*/
|
|
163
|
+
export function renderStripEditExit() {
|
|
164
|
+
return unsafe(html `
|
|
165
|
+
<button type="button" class="er-strip-edit-done" data-strip-edit-done aria-label="Exit editor">
|
|
166
|
+
<span class="er-strip-edit-done-glyph" aria-hidden="true">✕</span>
|
|
167
|
+
<span class="er-strip-edit-done-label">Done</span>
|
|
168
|
+
</button>`);
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=mobile-sheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-sheet.js","sourceRoot":"","sources":["../../../src/pages/entry-review/mobile-sheet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAgB,MAAM,YAAY,CAAC;AAGxD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO;QACL;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;SAC3C;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1C;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE;YACxC,KAAK,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE;SACxC;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE;YAC5C,KAAK,EAAE,EAAE,QAAQ,EAAE,sBAAsB,EAAE,IAAI,EAAE,OAAO,EAAE;YAC1D,aAAa,EAAE,0BAA0B;SAC1C;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;SAC3C;QACD;YACE,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE;YAC1C,aAAa,EAAE,qBAAqB;SACrC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;WAqBF,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;gHAuB4F,MAAM,CAAC,gBAAgB,EAAE,CAAC;;eAE3H,CAAC,CAAC;AACjB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,MAAM,CAAC,IAAI,CAAA;;;;YAIR,CAAC,CAAC;AACd,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,MAAM,CAAC,IAAI,CAAA;;;;cAIN,CAAC,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side renderer for the masthead `⋮` popover menu (Step 2.2.7).
|
|
3
|
+
*
|
|
4
|
+
* Per `DESIGN-STANDARDS.md § Menu reveal pattern · popover, not slide-up
|
|
5
|
+
* sheet`, the masthead's `⋮` opens a dropdown popover anchored UNDER the
|
|
6
|
+
* glyph, with an up-pointing arrow registered to the glyph's
|
|
7
|
+
* x-position. The popover does NOT use Phase 2.1's `createSlideUpSheet`
|
|
8
|
+
* — that primitive is reserved for bottom-anchored affordances.
|
|
9
|
+
*
|
|
10
|
+
* The HTML scaffold emitted here lives hidden in the DOM until the
|
|
11
|
+
* companion client controller (`mobile-shell/masthead-popover.ts`)
|
|
12
|
+
* toggles it open. The scaffold has three sections, in order:
|
|
13
|
+
*
|
|
14
|
+
* 1. Operator help · Manual + Keyboard shortcuts
|
|
15
|
+
* 2. Configure · Configure studio (Phase 4 placeholder)
|
|
16
|
+
* 3. Connect · File an issue + About deskwork
|
|
17
|
+
*
|
|
18
|
+
* Companion CSS lives in `mobile-shell.css` under the
|
|
19
|
+
* `.er-masthead-popover-*` class vocabulary. The popover is mobile-only
|
|
20
|
+
* (≤600px) — desktop keeps existing per-surface chrome.
|
|
21
|
+
*
|
|
22
|
+
* Mirrors the v7 mockup's `.v7-popover` block faithfully (renamed
|
|
23
|
+
* `v7-` → `er-masthead-popover-` to match the project's BEM-ish
|
|
24
|
+
* namespace).
|
|
25
|
+
*/
|
|
26
|
+
import { type RawHtml } from './html.ts';
|
|
27
|
+
/**
|
|
28
|
+
* Render the popover scaffold + scrim. Returns RawHtml so callers can
|
|
29
|
+
* embed it directly in their page template literals. The element is
|
|
30
|
+
* hidden by default; the client controller sets `hidden=false` to open.
|
|
31
|
+
*
|
|
32
|
+
* The scrim is a sibling element placed BEFORE the popover so it sits
|
|
33
|
+
* underneath in stacking order. Both elements share the
|
|
34
|
+
* `data-er-masthead-popover` / `data-er-masthead-popover-scrim` hooks
|
|
35
|
+
* the client controller uses to wire dismiss handlers.
|
|
36
|
+
*/
|
|
37
|
+
export declare function renderMastheadMenu(): RawHtml;
|
|
38
|
+
//# sourceMappingURL=masthead-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masthead-menu.d.ts","sourceRoot":"","sources":["../../src/pages/masthead-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAKvD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAsF5C"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side renderer for the masthead `⋮` popover menu (Step 2.2.7).
|
|
3
|
+
*
|
|
4
|
+
* Per `DESIGN-STANDARDS.md § Menu reveal pattern · popover, not slide-up
|
|
5
|
+
* sheet`, the masthead's `⋮` opens a dropdown popover anchored UNDER the
|
|
6
|
+
* glyph, with an up-pointing arrow registered to the glyph's
|
|
7
|
+
* x-position. The popover does NOT use Phase 2.1's `createSlideUpSheet`
|
|
8
|
+
* — that primitive is reserved for bottom-anchored affordances.
|
|
9
|
+
*
|
|
10
|
+
* The HTML scaffold emitted here lives hidden in the DOM until the
|
|
11
|
+
* companion client controller (`mobile-shell/masthead-popover.ts`)
|
|
12
|
+
* toggles it open. The scaffold has three sections, in order:
|
|
13
|
+
*
|
|
14
|
+
* 1. Operator help · Manual + Keyboard shortcuts
|
|
15
|
+
* 2. Configure · Configure studio (Phase 4 placeholder)
|
|
16
|
+
* 3. Connect · File an issue + About deskwork
|
|
17
|
+
*
|
|
18
|
+
* Companion CSS lives in `mobile-shell.css` under the
|
|
19
|
+
* `.er-masthead-popover-*` class vocabulary. The popover is mobile-only
|
|
20
|
+
* (≤600px) — desktop keeps existing per-surface chrome.
|
|
21
|
+
*
|
|
22
|
+
* Mirrors the v7 mockup's `.v7-popover` block faithfully (renamed
|
|
23
|
+
* `v7-` → `er-masthead-popover-` to match the project's BEM-ish
|
|
24
|
+
* namespace).
|
|
25
|
+
*/
|
|
26
|
+
import { html, unsafe } from "./html.js";
|
|
27
|
+
const MANUAL_HREF = '/dev/editorial-help';
|
|
28
|
+
const ISSUE_HREF = 'https://github.com/audiocontrol-org/deskwork/issues/new';
|
|
29
|
+
/**
|
|
30
|
+
* Render the popover scaffold + scrim. Returns RawHtml so callers can
|
|
31
|
+
* embed it directly in their page template literals. The element is
|
|
32
|
+
* hidden by default; the client controller sets `hidden=false` to open.
|
|
33
|
+
*
|
|
34
|
+
* The scrim is a sibling element placed BEFORE the popover so it sits
|
|
35
|
+
* underneath in stacking order. Both elements share the
|
|
36
|
+
* `data-er-masthead-popover` / `data-er-masthead-popover-scrim` hooks
|
|
37
|
+
* the client controller uses to wire dismiss handlers.
|
|
38
|
+
*/
|
|
39
|
+
export function renderMastheadMenu() {
|
|
40
|
+
return unsafe(html `
|
|
41
|
+
<div
|
|
42
|
+
class="er-masthead-popover-scrim"
|
|
43
|
+
data-er-masthead-popover-scrim
|
|
44
|
+
hidden
|
|
45
|
+
></div>
|
|
46
|
+
<div
|
|
47
|
+
class="er-masthead-popover"
|
|
48
|
+
data-er-masthead-popover
|
|
49
|
+
role="dialog"
|
|
50
|
+
aria-labelledby="masthead-menu-trigger"
|
|
51
|
+
hidden
|
|
52
|
+
>
|
|
53
|
+
<div class="er-masthead-popover-section">
|
|
54
|
+
<div class="er-masthead-popover-section-label">Operator help</div>
|
|
55
|
+
<a
|
|
56
|
+
class="er-masthead-popover-item"
|
|
57
|
+
href="${MANUAL_HREF}"
|
|
58
|
+
>
|
|
59
|
+
<span class="er-masthead-popover-item-glyph">§</span>
|
|
60
|
+
<span class="er-masthead-popover-item-body">
|
|
61
|
+
<span class="er-masthead-popover-item-label">Manual</span>
|
|
62
|
+
<span class="er-masthead-popover-item-route">${MANUAL_HREF}</span>
|
|
63
|
+
</span>
|
|
64
|
+
<span class="er-masthead-popover-item-arrow" aria-hidden="true">›</span>
|
|
65
|
+
</a>
|
|
66
|
+
<button
|
|
67
|
+
type="button"
|
|
68
|
+
class="er-masthead-popover-item"
|
|
69
|
+
data-er-masthead-popover-action="shortcuts"
|
|
70
|
+
>
|
|
71
|
+
<span class="er-masthead-popover-item-glyph er-masthead-popover-item-glyph--blue">⌘</span>
|
|
72
|
+
<span class="er-masthead-popover-item-body">
|
|
73
|
+
<span class="er-masthead-popover-item-label">Keyboard shortcuts</span>
|
|
74
|
+
<span class="er-masthead-popover-item-route">opens overlay</span>
|
|
75
|
+
</span>
|
|
76
|
+
<span class="er-masthead-popover-item-arrow" aria-hidden="true">›</span>
|
|
77
|
+
</button>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="er-masthead-popover-section">
|
|
80
|
+
<div class="er-masthead-popover-section-label">Configure</div>
|
|
81
|
+
<button
|
|
82
|
+
type="button"
|
|
83
|
+
class="er-masthead-popover-item er-masthead-popover-item--future"
|
|
84
|
+
data-er-masthead-popover-action="configure"
|
|
85
|
+
data-disabled="true"
|
|
86
|
+
aria-disabled="true"
|
|
87
|
+
tabindex="-1"
|
|
88
|
+
>
|
|
89
|
+
<span class="er-masthead-popover-item-glyph er-masthead-popover-item-glyph--kraft">⊞</span>
|
|
90
|
+
<span class="er-masthead-popover-item-body">
|
|
91
|
+
<span class="er-masthead-popover-item-label">Configure studio</span>
|
|
92
|
+
<span class="er-masthead-popover-item-route">.deskwork/config.json <span class="er-masthead-popover-item-future-tag">phase 4</span></span>
|
|
93
|
+
</span>
|
|
94
|
+
<span class="er-masthead-popover-item-arrow" aria-hidden="true">›</span>
|
|
95
|
+
</button>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="er-masthead-popover-section">
|
|
98
|
+
<div class="er-masthead-popover-section-label">Connect</div>
|
|
99
|
+
<a
|
|
100
|
+
class="er-masthead-popover-item"
|
|
101
|
+
href="${ISSUE_HREF}"
|
|
102
|
+
target="_blank"
|
|
103
|
+
rel="noopener noreferrer"
|
|
104
|
+
>
|
|
105
|
+
<span class="er-masthead-popover-item-glyph er-masthead-popover-item-glyph--blue">✎</span>
|
|
106
|
+
<span class="er-masthead-popover-item-body">
|
|
107
|
+
<span class="er-masthead-popover-item-label">File an issue</span>
|
|
108
|
+
<span class="er-masthead-popover-item-route">github · new tab</span>
|
|
109
|
+
</span>
|
|
110
|
+
<span class="er-masthead-popover-item-arrow er-masthead-popover-item-arrow--external" aria-hidden="true">↗</span>
|
|
111
|
+
</a>
|
|
112
|
+
<a
|
|
113
|
+
class="er-masthead-popover-item"
|
|
114
|
+
href="${MANUAL_HREF}"
|
|
115
|
+
>
|
|
116
|
+
<span class="er-masthead-popover-item-glyph">❡</span>
|
|
117
|
+
<span class="er-masthead-popover-item-body">
|
|
118
|
+
<span class="er-masthead-popover-item-label">About deskwork</span>
|
|
119
|
+
<span class="er-masthead-popover-item-route">manual · GPL-3.0</span>
|
|
120
|
+
</span>
|
|
121
|
+
<span class="er-masthead-popover-item-arrow" aria-hidden="true">›</span>
|
|
122
|
+
</a>
|
|
123
|
+
</div>
|
|
124
|
+
</div>`);
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=masthead-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masthead-menu.js","sourceRoot":"","sources":["../../src/pages/masthead-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAgB,MAAM,WAAW,CAAC;AAEvD,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,UAAU,GAAG,yDAAyD,CAAC;AAE7E;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;kBAiBF,WAAW;;;;;2DAK8B,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuCpD,UAAU;;;;;;;;;;;;;kBAaV,WAAW;;;;;;;;;;WAUlB,CAAC,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side renderer for the masthead `⋮` popover menu (Step 2.2.7).
|
|
3
|
+
*
|
|
4
|
+
* Per `DESIGN-STANDARDS.md § Menu reveal pattern · popover, not slide-up
|
|
5
|
+
* sheet`, the masthead's `⋮` opens a dropdown popover anchored UNDER the
|
|
6
|
+
* glyph, with an up-pointing arrow registered to the glyph's
|
|
7
|
+
* x-position. The popover does NOT use Phase 2.1's `createSlideUpSheet`
|
|
8
|
+
* — that primitive is reserved for bottom-anchored affordances.
|
|
9
|
+
*
|
|
10
|
+
* The HTML scaffold emitted here lives hidden in the DOM until the
|
|
11
|
+
* companion client controller (`mobile-shell/masthead-popover.ts`)
|
|
12
|
+
* toggles it open. The scaffold has three sections, in order:
|
|
13
|
+
*
|
|
14
|
+
* 1. Operator help · Manual + Keyboard shortcuts
|
|
15
|
+
* 2. Configure · Configure studio (Phase 4 placeholder)
|
|
16
|
+
* 3. Connect · File an issue + About deskwork
|
|
17
|
+
*
|
|
18
|
+
* Companion CSS lives in `mobile-shell.css` under the
|
|
19
|
+
* `.er-masthead-popover-*` class vocabulary. The popover is mobile-only
|
|
20
|
+
* (≤600px) — desktop keeps existing per-surface chrome.
|
|
21
|
+
*
|
|
22
|
+
* Mirrors the v7 mockup's `.v7-popover` block faithfully (renamed
|
|
23
|
+
* `v7-` → `er-masthead-popover-` to match the project's BEM-ish
|
|
24
|
+
* namespace).
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { html, unsafe, type RawHtml } from './html.ts';
|
|
28
|
+
|
|
29
|
+
const MANUAL_HREF = '/dev/editorial-help';
|
|
30
|
+
const ISSUE_HREF = 'https://github.com/audiocontrol-org/deskwork/issues/new';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Render the popover scaffold + scrim. Returns RawHtml so callers can
|
|
34
|
+
* embed it directly in their page template literals. The element is
|
|
35
|
+
* hidden by default; the client controller sets `hidden=false` to open.
|
|
36
|
+
*
|
|
37
|
+
* The scrim is a sibling element placed BEFORE the popover so it sits
|
|
38
|
+
* underneath in stacking order. Both elements share the
|
|
39
|
+
* `data-er-masthead-popover` / `data-er-masthead-popover-scrim` hooks
|
|
40
|
+
* the client controller uses to wire dismiss handlers.
|
|
41
|
+
*/
|
|
42
|
+
export function renderMastheadMenu(): RawHtml {
|
|
43
|
+
return unsafe(html`
|
|
44
|
+
<div
|
|
45
|
+
class="er-masthead-popover-scrim"
|
|
46
|
+
data-er-masthead-popover-scrim
|
|
47
|
+
hidden
|
|
48
|
+
></div>
|
|
49
|
+
<div
|
|
50
|
+
class="er-masthead-popover"
|
|
51
|
+
data-er-masthead-popover
|
|
52
|
+
role="dialog"
|
|
53
|
+
aria-labelledby="masthead-menu-trigger"
|
|
54
|
+
hidden
|
|
55
|
+
>
|
|
56
|
+
<div class="er-masthead-popover-section">
|
|
57
|
+
<div class="er-masthead-popover-section-label">Operator help</div>
|
|
58
|
+
<a
|
|
59
|
+
class="er-masthead-popover-item"
|
|
60
|
+
href="${MANUAL_HREF}"
|
|
61
|
+
>
|
|
62
|
+
<span class="er-masthead-popover-item-glyph">§</span>
|
|
63
|
+
<span class="er-masthead-popover-item-body">
|
|
64
|
+
<span class="er-masthead-popover-item-label">Manual</span>
|
|
65
|
+
<span class="er-masthead-popover-item-route">${MANUAL_HREF}</span>
|
|
66
|
+
</span>
|
|
67
|
+
<span class="er-masthead-popover-item-arrow" aria-hidden="true">›</span>
|
|
68
|
+
</a>
|
|
69
|
+
<button
|
|
70
|
+
type="button"
|
|
71
|
+
class="er-masthead-popover-item"
|
|
72
|
+
data-er-masthead-popover-action="shortcuts"
|
|
73
|
+
>
|
|
74
|
+
<span class="er-masthead-popover-item-glyph er-masthead-popover-item-glyph--blue">⌘</span>
|
|
75
|
+
<span class="er-masthead-popover-item-body">
|
|
76
|
+
<span class="er-masthead-popover-item-label">Keyboard shortcuts</span>
|
|
77
|
+
<span class="er-masthead-popover-item-route">opens overlay</span>
|
|
78
|
+
</span>
|
|
79
|
+
<span class="er-masthead-popover-item-arrow" aria-hidden="true">›</span>
|
|
80
|
+
</button>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="er-masthead-popover-section">
|
|
83
|
+
<div class="er-masthead-popover-section-label">Configure</div>
|
|
84
|
+
<button
|
|
85
|
+
type="button"
|
|
86
|
+
class="er-masthead-popover-item er-masthead-popover-item--future"
|
|
87
|
+
data-er-masthead-popover-action="configure"
|
|
88
|
+
data-disabled="true"
|
|
89
|
+
aria-disabled="true"
|
|
90
|
+
tabindex="-1"
|
|
91
|
+
>
|
|
92
|
+
<span class="er-masthead-popover-item-glyph er-masthead-popover-item-glyph--kraft">⊞</span>
|
|
93
|
+
<span class="er-masthead-popover-item-body">
|
|
94
|
+
<span class="er-masthead-popover-item-label">Configure studio</span>
|
|
95
|
+
<span class="er-masthead-popover-item-route">.deskwork/config.json <span class="er-masthead-popover-item-future-tag">phase 4</span></span>
|
|
96
|
+
</span>
|
|
97
|
+
<span class="er-masthead-popover-item-arrow" aria-hidden="true">›</span>
|
|
98
|
+
</button>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="er-masthead-popover-section">
|
|
101
|
+
<div class="er-masthead-popover-section-label">Connect</div>
|
|
102
|
+
<a
|
|
103
|
+
class="er-masthead-popover-item"
|
|
104
|
+
href="${ISSUE_HREF}"
|
|
105
|
+
target="_blank"
|
|
106
|
+
rel="noopener noreferrer"
|
|
107
|
+
>
|
|
108
|
+
<span class="er-masthead-popover-item-glyph er-masthead-popover-item-glyph--blue">✎</span>
|
|
109
|
+
<span class="er-masthead-popover-item-body">
|
|
110
|
+
<span class="er-masthead-popover-item-label">File an issue</span>
|
|
111
|
+
<span class="er-masthead-popover-item-route">github · new tab</span>
|
|
112
|
+
</span>
|
|
113
|
+
<span class="er-masthead-popover-item-arrow er-masthead-popover-item-arrow--external" aria-hidden="true">↗</span>
|
|
114
|
+
</a>
|
|
115
|
+
<a
|
|
116
|
+
class="er-masthead-popover-item"
|
|
117
|
+
href="${MANUAL_HREF}"
|
|
118
|
+
>
|
|
119
|
+
<span class="er-masthead-popover-item-glyph">❡</span>
|
|
120
|
+
<span class="er-masthead-popover-item-body">
|
|
121
|
+
<span class="er-masthead-popover-item-label">About deskwork</span>
|
|
122
|
+
<span class="er-masthead-popover-item-route">manual · GPL-3.0</span>
|
|
123
|
+
</span>
|
|
124
|
+
<span class="er-masthead-popover-item-arrow" aria-hidden="true">›</span>
|
|
125
|
+
</a>
|
|
126
|
+
</div>
|
|
127
|
+
</div>`);
|
|
128
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal masthead chrome for studio surfaces (v7 architecture).
|
|
3
|
+
*
|
|
4
|
+
* Per `DESIGN-STANDARDS.md § Studio navigation model`, every studio
|
|
5
|
+
* surface carries a three-column masthead:
|
|
6
|
+
*
|
|
7
|
+
* `24px (← back) | 1fr (center stack) | 24px (⋮ menu)`
|
|
8
|
+
*
|
|
9
|
+
* On the Desk (`isHub: true`) the back-link is absent — you're already
|
|
10
|
+
* home — and the grid collapses to `1fr | 24px`. Every cell is
|
|
11
|
+
* `align-items: center`; the masthead's bottom-border rule clears
|
|
12
|
+
* every content baseline so nothing is struck through.
|
|
13
|
+
*
|
|
14
|
+
* Center stack composition:
|
|
15
|
+
* - Top row: kicker (mono caps, red, with optional inline meta after a
|
|
16
|
+
* paper-3 separator). The kicker is always present.
|
|
17
|
+
* - Bottom row: either `slug` (mono, slug-shaped surfaces) OR `title`
|
|
18
|
+
* (italic display, hub-shaped surfaces). Callers pass exactly one
|
|
19
|
+
* of the two — passing both throws.
|
|
20
|
+
*
|
|
21
|
+
* Glyph contracts (per design-standards):
|
|
22
|
+
* - `←` italic-display 1.35rem in `--er-proof-blue` (8.13:1 vs paper),
|
|
23
|
+
* navigates to `/dev/editorial-studio`.
|
|
24
|
+
* - `⋮` mono 1.2rem in `--er-ink-soft` (8.92:1 vs paper). The button
|
|
25
|
+
* does nothing yet; Step 2.2.7 wires the popover menu.
|
|
26
|
+
* - Each glyph has a ≥44×44px tap target via padding+margin (visual
|
|
27
|
+
* remains 24px square).
|
|
28
|
+
*
|
|
29
|
+
* The masthead is mobile-only (≤600px). CSS hides it on desktop so
|
|
30
|
+
* existing desktop chrome (folio + er-strip + er-pagehead) keeps its
|
|
31
|
+
* exact present-day appearance. Desktop refinement is out-of-scope for
|
|
32
|
+
* this feature branch (per the design-standards "separate feature
|
|
33
|
+
* branch" note).
|
|
34
|
+
*
|
|
35
|
+
* This file ships the helper + the markup contract. The companion
|
|
36
|
+
* stylesheet is `plugins/deskwork-studio/public/css/mobile-shell.css`.
|
|
37
|
+
*/
|
|
38
|
+
import { type RawHtml } from './html.ts';
|
|
39
|
+
export interface MastheadOpts {
|
|
40
|
+
/**
|
|
41
|
+
* Top kicker line. Mono caps, red. Example: `entry · drafting · № 12`.
|
|
42
|
+
* Pre-rendered HTML may be included via `kickerHtml` instead when the
|
|
43
|
+
* kicker carries inline markup (e.g. a `<span class="platform">`).
|
|
44
|
+
*/
|
|
45
|
+
readonly kicker?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Raw HTML alternative to `kicker`. Used when the kicker carries
|
|
48
|
+
* inline ornament (platform tag, dim spans, etc.). Caller is
|
|
49
|
+
* responsible for any escaping; pass through `escapeHtml` for any
|
|
50
|
+
* user-supplied substring.
|
|
51
|
+
*/
|
|
52
|
+
readonly kickerHtml?: RawHtml;
|
|
53
|
+
/**
|
|
54
|
+
* Bottom-row body when the surface is slug-shaped (entry-review,
|
|
55
|
+
* shortform-review). Rendered as mono. Mutually exclusive with
|
|
56
|
+
* `title`.
|
|
57
|
+
*/
|
|
58
|
+
readonly slug?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Bottom-row body when the surface is hub-shaped (Desk). Rendered as
|
|
61
|
+
* italic display. Mutually exclusive with `slug`.
|
|
62
|
+
*/
|
|
63
|
+
readonly title?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Optional inline meta appended to the kicker line after a paper-3
|
|
66
|
+
* `·` separator. Example: `v3 · 2h`, `№ 03`. Mono, dim color.
|
|
67
|
+
*/
|
|
68
|
+
readonly metaInline?: string;
|
|
69
|
+
/**
|
|
70
|
+
* `true` on the Desk only. Suppresses the `←` back-link and collapses
|
|
71
|
+
* the grid to `1fr | 24px`.
|
|
72
|
+
*/
|
|
73
|
+
readonly isHub: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Optional id for the `⋮` button element. Step 2.2.7 will look this
|
|
76
|
+
* up to wire the popover. Defaults to `masthead-menu-trigger`.
|
|
77
|
+
*/
|
|
78
|
+
readonly menuTriggerId?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Render the universal masthead. Returns RawHtml so callers can embed
|
|
82
|
+
* the result directly in `html\`…${renderMasthead(...)}…\`` templates.
|
|
83
|
+
*/
|
|
84
|
+
export declare function renderMasthead(opts: MastheadOpts): RawHtml;
|
|
85
|
+
//# sourceMappingURL=masthead.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masthead.d.ts","sourceRoot":"","sources":["../../src/pages/masthead.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAA4B,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnE,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAsCD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CA0B1D"}
|