@deskwork/studio 0.20.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/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,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adjacent-tools section renderer (Step 2.2.9 — studio-mobile-first).
|
|
3
|
+
*
|
|
4
|
+
* Per DESIGN-STANDARDS.md § Desk information architecture, the Desk's
|
|
5
|
+
* third section reserves space for Phase 3+ surfaces — Folio (standalone
|
|
6
|
+
* scrapbook viewer) and Files (content tree). These render as inert
|
|
7
|
+
* "future tiles" — visible but non-interactive — tagged `phase 3` so the
|
|
8
|
+
* operator sees what's coming without being able to tap a dead control.
|
|
9
|
+
*
|
|
10
|
+
* Per DESIGN-STANDARDS.md § Accessibility / Contrast, future tiles
|
|
11
|
+
* demote via explicit muted palette (NOT opacity reduction). All body
|
|
12
|
+
* text reads at ≥4.5:1 against the tile background; the ornamental
|
|
13
|
+
* border + glyph read at ≥3:1.
|
|
14
|
+
*
|
|
15
|
+
* The future tiles deliberately render as `<div>` (not `<button>`) — no
|
|
16
|
+
* interactive markup — so the stage-tiles.ts controller leaves them
|
|
17
|
+
* alone and assistive tech doesn't announce a disabled control. The
|
|
18
|
+
* `aria-disabled="true"` attribute communicates the inert state to AT.
|
|
19
|
+
* The `<div>`'s implicit `generic` role is preserved (no `role=
|
|
20
|
+
* presentation` override); per WAI-ARIA the generic role honors
|
|
21
|
+
* `aria-disabled` state, whereas `role="presentation"` would strip
|
|
22
|
+
* the element of all semantic identity and nullify the aria attribute.
|
|
23
|
+
*/
|
|
24
|
+
import { type RawHtml } from '../html.ts';
|
|
25
|
+
/**
|
|
26
|
+
* Render the adjacent-tools section head — `<div class="er-desk-section-head
|
|
27
|
+
* er-desk-section-head--adjacent">` matching the mockup's
|
|
28
|
+
* `.desk-section-head.adjacent` shape. Kraft-colored glyph + label +
|
|
29
|
+
* "phase 3" caption.
|
|
30
|
+
*/
|
|
31
|
+
export declare function renderAdjacentSectionHead(): RawHtml;
|
|
32
|
+
/**
|
|
33
|
+
* Compose the adjacent-tools section: section head + 2 future tiles
|
|
34
|
+
* (Folio + Files). No tap targets, no `data-stage-tile` attrs — these
|
|
35
|
+
* are structurally inert placeholders until Phase 3+ wires them.
|
|
36
|
+
*/
|
|
37
|
+
export declare function renderAdjacentSection(): RawHtml;
|
|
38
|
+
//# sourceMappingURL=adjacent-section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adjacent-section.d.ts","sourceRoot":"","sources":["../../../src/pages/dashboard/adjacent-section.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAaxD;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CAOnD;AAWD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAI/C"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adjacent-tools section renderer (Step 2.2.9 — studio-mobile-first).
|
|
3
|
+
*
|
|
4
|
+
* Per DESIGN-STANDARDS.md § Desk information architecture, the Desk's
|
|
5
|
+
* third section reserves space for Phase 3+ surfaces — Folio (standalone
|
|
6
|
+
* scrapbook viewer) and Files (content tree). These render as inert
|
|
7
|
+
* "future tiles" — visible but non-interactive — tagged `phase 3` so the
|
|
8
|
+
* operator sees what's coming without being able to tap a dead control.
|
|
9
|
+
*
|
|
10
|
+
* Per DESIGN-STANDARDS.md § Accessibility / Contrast, future tiles
|
|
11
|
+
* demote via explicit muted palette (NOT opacity reduction). All body
|
|
12
|
+
* text reads at ≥4.5:1 against the tile background; the ornamental
|
|
13
|
+
* border + glyph read at ≥3:1.
|
|
14
|
+
*
|
|
15
|
+
* The future tiles deliberately render as `<div>` (not `<button>`) — no
|
|
16
|
+
* interactive markup — so the stage-tiles.ts controller leaves them
|
|
17
|
+
* alone and assistive tech doesn't announce a disabled control. The
|
|
18
|
+
* `aria-disabled="true"` attribute communicates the inert state to AT.
|
|
19
|
+
* The `<div>`'s implicit `generic` role is preserved (no `role=
|
|
20
|
+
* presentation` override); per WAI-ARIA the generic role honors
|
|
21
|
+
* `aria-disabled` state, whereas `role="presentation"` would strip
|
|
22
|
+
* the element of all semantic identity and nullify the aria attribute.
|
|
23
|
+
*/
|
|
24
|
+
import { html, unsafe } from "../html.js";
|
|
25
|
+
const FUTURE_TILES = [
|
|
26
|
+
{ glyph: '▦', name: 'Folio (standalone)', tag: 'phase 3' },
|
|
27
|
+
{ glyph: '⊞', name: 'Files (content tree)', tag: 'phase 3' },
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Render the adjacent-tools section head — `<div class="er-desk-section-head
|
|
31
|
+
* er-desk-section-head--adjacent">` matching the mockup's
|
|
32
|
+
* `.desk-section-head.adjacent` shape. Kraft-colored glyph + label +
|
|
33
|
+
* "phase 3" caption.
|
|
34
|
+
*/
|
|
35
|
+
export function renderAdjacentSectionHead() {
|
|
36
|
+
return unsafe(html `
|
|
37
|
+
<div class="er-desk-section-head er-desk-section-head--adjacent">
|
|
38
|
+
<span class="er-desk-section-head-glyph" aria-hidden="true">▦</span>
|
|
39
|
+
<span class="er-desk-section-head-label">Adjacent tools</span>
|
|
40
|
+
<span class="er-desk-section-head-count">· phase 3</span>
|
|
41
|
+
</div>`);
|
|
42
|
+
}
|
|
43
|
+
function renderFutureTile(tile) {
|
|
44
|
+
return unsafe(html `
|
|
45
|
+
<div class="er-future-tile" aria-disabled="true">
|
|
46
|
+
<span class="er-future-tile-glyph" aria-hidden="true">${tile.glyph}</span>
|
|
47
|
+
<span class="er-future-tile-name">${tile.name}</span>
|
|
48
|
+
<span class="er-future-tile-tag">${tile.tag}</span>
|
|
49
|
+
</div>`);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Compose the adjacent-tools section: section head + 2 future tiles
|
|
53
|
+
* (Folio + Files). No tap targets, no `data-stage-tile` attrs — these
|
|
54
|
+
* are structurally inert placeholders until Phase 3+ wires them.
|
|
55
|
+
*/
|
|
56
|
+
export function renderAdjacentSection() {
|
|
57
|
+
const sectionHead = renderAdjacentSectionHead();
|
|
58
|
+
const tiles = FUTURE_TILES.map((t) => renderFutureTile(t).__raw).join('');
|
|
59
|
+
return unsafe(html `${sectionHead}${unsafe(tiles)}`);
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=adjacent-section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adjacent-section.js","sourceRoot":"","sources":["../../../src/pages/dashboard/adjacent-section.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAgB,MAAM,YAAY,CAAC;AAQxD,MAAM,YAAY,GAA0B;IAC1C,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,SAAS,EAAE;IAC1D,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,sBAAsB,EAAE,GAAG,EAAE,SAAS,EAAE;CACpD,CAAC;AAEX;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,MAAM,CAAC,IAAI,CAAA;;;;;WAKT,CAAC,CAAC;AACb,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAgB;IACxC,OAAO,MAAM,CAAC,IAAI,CAAA;;8DAE0C,IAAI,CAAC,KAAK;0CAC9B,IAAI,CAAC,IAAI;yCACV,IAAI,CAAC,GAAG;WACtC,CAAC,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB;IACnC,MAAM,WAAW,GAAG,yBAAyB,EAAE,CAAC;IAChD,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1E,OAAO,MAAM,CAAC,IAAI,CAAA,GAAG,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adjacent-tools section renderer (Step 2.2.9 — studio-mobile-first).
|
|
3
|
+
*
|
|
4
|
+
* Per DESIGN-STANDARDS.md § Desk information architecture, the Desk's
|
|
5
|
+
* third section reserves space for Phase 3+ surfaces — Folio (standalone
|
|
6
|
+
* scrapbook viewer) and Files (content tree). These render as inert
|
|
7
|
+
* "future tiles" — visible but non-interactive — tagged `phase 3` so the
|
|
8
|
+
* operator sees what's coming without being able to tap a dead control.
|
|
9
|
+
*
|
|
10
|
+
* Per DESIGN-STANDARDS.md § Accessibility / Contrast, future tiles
|
|
11
|
+
* demote via explicit muted palette (NOT opacity reduction). All body
|
|
12
|
+
* text reads at ≥4.5:1 against the tile background; the ornamental
|
|
13
|
+
* border + glyph read at ≥3:1.
|
|
14
|
+
*
|
|
15
|
+
* The future tiles deliberately render as `<div>` (not `<button>`) — no
|
|
16
|
+
* interactive markup — so the stage-tiles.ts controller leaves them
|
|
17
|
+
* alone and assistive tech doesn't announce a disabled control. The
|
|
18
|
+
* `aria-disabled="true"` attribute communicates the inert state to AT.
|
|
19
|
+
* The `<div>`'s implicit `generic` role is preserved (no `role=
|
|
20
|
+
* presentation` override); per WAI-ARIA the generic role honors
|
|
21
|
+
* `aria-disabled` state, whereas `role="presentation"` would strip
|
|
22
|
+
* the element of all semantic identity and nullify the aria attribute.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { html, unsafe, type RawHtml } from '../html.ts';
|
|
26
|
+
|
|
27
|
+
interface FutureTile {
|
|
28
|
+
readonly glyph: string;
|
|
29
|
+
readonly name: string;
|
|
30
|
+
readonly tag: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const FUTURE_TILES: readonly FutureTile[] = [
|
|
34
|
+
{ glyph: '▦', name: 'Folio (standalone)', tag: 'phase 3' },
|
|
35
|
+
{ glyph: '⊞', name: 'Files (content tree)', tag: 'phase 3' },
|
|
36
|
+
] as const;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Render the adjacent-tools section head — `<div class="er-desk-section-head
|
|
40
|
+
* er-desk-section-head--adjacent">` matching the mockup's
|
|
41
|
+
* `.desk-section-head.adjacent` shape. Kraft-colored glyph + label +
|
|
42
|
+
* "phase 3" caption.
|
|
43
|
+
*/
|
|
44
|
+
export function renderAdjacentSectionHead(): RawHtml {
|
|
45
|
+
return unsafe(html`
|
|
46
|
+
<div class="er-desk-section-head er-desk-section-head--adjacent">
|
|
47
|
+
<span class="er-desk-section-head-glyph" aria-hidden="true">▦</span>
|
|
48
|
+
<span class="er-desk-section-head-label">Adjacent tools</span>
|
|
49
|
+
<span class="er-desk-section-head-count">· phase 3</span>
|
|
50
|
+
</div>`);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function renderFutureTile(tile: FutureTile): RawHtml {
|
|
54
|
+
return unsafe(html`
|
|
55
|
+
<div class="er-future-tile" aria-disabled="true">
|
|
56
|
+
<span class="er-future-tile-glyph" aria-hidden="true">${tile.glyph}</span>
|
|
57
|
+
<span class="er-future-tile-name">${tile.name}</span>
|
|
58
|
+
<span class="er-future-tile-tag">${tile.tag}</span>
|
|
59
|
+
</div>`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Compose the adjacent-tools section: section head + 2 future tiles
|
|
64
|
+
* (Folio + Files). No tap targets, no `data-stage-tile` attrs — these
|
|
65
|
+
* are structurally inert placeholders until Phase 3+ wires them.
|
|
66
|
+
*/
|
|
67
|
+
export function renderAdjacentSection(): RawHtml {
|
|
68
|
+
const sectionHead = renderAdjacentSectionHead();
|
|
69
|
+
const tiles = FUTURE_TILES.map((t) => renderFutureTile(t).__raw).join('');
|
|
70
|
+
return unsafe(html`${sectionHead}${unsafe(tiles)}`);
|
|
71
|
+
}
|
|
@@ -4,11 +4,19 @@
|
|
|
4
4
|
* `currentStage` so the renderer can iterate the eight canonical
|
|
5
5
|
* stage sections without re-walking the disk per stage.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* v7 architecture (Step 2.2.9 — studio-mobile-first feature): also
|
|
8
|
+
* reads open shortform workflows from the review-pipeline store and
|
|
9
|
+
* groups them by `Platform`. Per DESIGN-STANDARDS.md § Desk
|
|
10
|
+
* information architecture, the Desk absorbs the Shortform-by-platform
|
|
11
|
+
* view as its second section (sibling of the longform pipeline). The
|
|
12
|
+
* v0.21 platform display order is LinkedIn → Reddit → YouTube →
|
|
13
|
+
* Instagram (insertion order = display order; verified against the
|
|
14
|
+
* v7 mockup at desk-states-v7.html:632-655).
|
|
10
15
|
*/
|
|
11
16
|
import type { Entry, Stage } from '@deskwork/core/schema/entry';
|
|
17
|
+
import type { DraftWorkflowItem } from '@deskwork/core/review/types';
|
|
18
|
+
import type { Platform } from '@deskwork/core/types';
|
|
19
|
+
import type { DeskworkConfig } from '@deskwork/core/config';
|
|
12
20
|
/**
|
|
13
21
|
* The eight canonical stages, in display order. Linear pipeline
|
|
14
22
|
* (Ideas → Published) first, then off-pipeline (Blocked, Cancelled)
|
|
@@ -16,9 +24,32 @@ import type { Entry, Stage } from '@deskwork/core/schema/entry';
|
|
|
16
24
|
* normal lifecycle.
|
|
17
25
|
*/
|
|
18
26
|
export declare const DASHBOARD_STAGE_ORDER: readonly Stage[];
|
|
27
|
+
/**
|
|
28
|
+
* Display order for shortform platform tiles. Verified against the v7
|
|
29
|
+
* mockup at desk-states-v7.html:632-655: LinkedIn → Reddit → YouTube →
|
|
30
|
+
* Instagram. Used as the insertion order for the `shortformByPlatform`
|
|
31
|
+
* Map so iteration order matches display order.
|
|
32
|
+
*/
|
|
33
|
+
export declare const DASHBOARD_PLATFORM_ORDER: readonly Platform[];
|
|
19
34
|
export interface DashboardData {
|
|
20
35
|
readonly entries: readonly Entry[];
|
|
21
36
|
readonly byStage: ReadonlyMap<Stage, readonly Entry[]>;
|
|
37
|
+
readonly shortformWorkflows: readonly DraftWorkflowItem[];
|
|
38
|
+
readonly shortformByPlatform: ReadonlyMap<Platform, readonly DraftWorkflowItem[]>;
|
|
22
39
|
}
|
|
23
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Bucket shortform workflows by platform. Insertion order matches
|
|
42
|
+
* `DASHBOARD_PLATFORM_ORDER` — even empty platforms get a Map entry so
|
|
43
|
+
* the renderer can iterate the four canonical tiles uniformly.
|
|
44
|
+
*
|
|
45
|
+
* Throws on a workflow whose `platform` is undefined. Per project rule
|
|
46
|
+
* "Never implement fallbacks or use mock data outside of test code" — a
|
|
47
|
+
* shortform workflow without a platform is a data-integrity bug
|
|
48
|
+
* upstream, not a case to silently drop. Throwing surfaces the bug;
|
|
49
|
+
* silent-drop would hide missing-from-the-Desk rows behind a count that
|
|
50
|
+
* disagrees with the workflow store.
|
|
51
|
+
*/
|
|
52
|
+
/** @internal — exported only for testability of the throw contract. */
|
|
53
|
+
export declare function bucketizeShortform(workflows: readonly DraftWorkflowItem[]): Map<Platform, DraftWorkflowItem[]>;
|
|
54
|
+
export declare function loadDashboardData(projectRoot: string, config: DeskworkConfig): Promise<DashboardData>;
|
|
24
55
|
//# sourceMappingURL=data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/pages/dashboard/data.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/pages/dashboard/data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,KAAK,EASxC,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,QAAQ,EAK9C,CAAC;AAEX,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,EAAE,SAAS,KAAK,EAAE,CAAC,CAAC;IACvD,QAAQ,CAAC,kBAAkB,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC1D,QAAQ,CAAC,mBAAmB,EAAE,WAAW,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC,CAAC;CACnF;AAkCD;;;;;;;;;;;GAWG;AACH,uEAAuE;AACvE,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,iBAAiB,EAAE,GACtC,GAAG,CAAC,QAAQ,EAAE,iBAAiB,EAAE,CAAC,CAgBpC;AAED,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,aAAa,CAAC,CAMxB"}
|
|
@@ -4,11 +4,17 @@
|
|
|
4
4
|
* `currentStage` so the renderer can iterate the eight canonical
|
|
5
5
|
* stage sections without re-walking the disk per stage.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* v7 architecture (Step 2.2.9 — studio-mobile-first feature): also
|
|
8
|
+
* reads open shortform workflows from the review-pipeline store and
|
|
9
|
+
* groups them by `Platform`. Per DESIGN-STANDARDS.md § Desk
|
|
10
|
+
* information architecture, the Desk absorbs the Shortform-by-platform
|
|
11
|
+
* view as its second section (sibling of the longform pipeline). The
|
|
12
|
+
* v0.21 platform display order is LinkedIn → Reddit → YouTube →
|
|
13
|
+
* Instagram (insertion order = display order; verified against the
|
|
14
|
+
* v7 mockup at desk-states-v7.html:632-655).
|
|
10
15
|
*/
|
|
11
16
|
import { readAllSidecars } from '@deskwork/core/sidecar';
|
|
17
|
+
import { listOpen } from '@deskwork/core/review/pipeline';
|
|
12
18
|
/**
|
|
13
19
|
* The eight canonical stages, in display order. Linear pipeline
|
|
14
20
|
* (Ideas → Published) first, then off-pipeline (Blocked, Cancelled)
|
|
@@ -25,6 +31,18 @@ export const DASHBOARD_STAGE_ORDER = [
|
|
|
25
31
|
'Blocked',
|
|
26
32
|
'Cancelled',
|
|
27
33
|
];
|
|
34
|
+
/**
|
|
35
|
+
* Display order for shortform platform tiles. Verified against the v7
|
|
36
|
+
* mockup at desk-states-v7.html:632-655: LinkedIn → Reddit → YouTube →
|
|
37
|
+
* Instagram. Used as the insertion order for the `shortformByPlatform`
|
|
38
|
+
* Map so iteration order matches display order.
|
|
39
|
+
*/
|
|
40
|
+
export const DASHBOARD_PLATFORM_ORDER = [
|
|
41
|
+
'linkedin',
|
|
42
|
+
'reddit',
|
|
43
|
+
'youtube',
|
|
44
|
+
'instagram',
|
|
45
|
+
];
|
|
28
46
|
function bucketize(entries) {
|
|
29
47
|
const out = new Map();
|
|
30
48
|
for (const stage of DASHBOARD_STAGE_ORDER)
|
|
@@ -41,9 +59,55 @@ function bucketize(entries) {
|
|
|
41
59
|
}
|
|
42
60
|
return out;
|
|
43
61
|
}
|
|
44
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Load open shortform workflows, sorted by `updatedAt` descending.
|
|
64
|
+
* Ported from the pre-v7 `loadOpenShortform` helper in pages/shortform.ts
|
|
65
|
+
* (preserved verbatim there until Step 2.2.10 retires that page).
|
|
66
|
+
*/
|
|
67
|
+
function loadOpenShortform(projectRoot, config) {
|
|
68
|
+
const open = [];
|
|
69
|
+
for (const w of listOpen(projectRoot, config)) {
|
|
70
|
+
if (w.contentKind === 'shortform')
|
|
71
|
+
open.push(w);
|
|
72
|
+
}
|
|
73
|
+
open.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
|
|
74
|
+
return open;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Bucket shortform workflows by platform. Insertion order matches
|
|
78
|
+
* `DASHBOARD_PLATFORM_ORDER` — even empty platforms get a Map entry so
|
|
79
|
+
* the renderer can iterate the four canonical tiles uniformly.
|
|
80
|
+
*
|
|
81
|
+
* Throws on a workflow whose `platform` is undefined. Per project rule
|
|
82
|
+
* "Never implement fallbacks or use mock data outside of test code" — a
|
|
83
|
+
* shortform workflow without a platform is a data-integrity bug
|
|
84
|
+
* upstream, not a case to silently drop. Throwing surfaces the bug;
|
|
85
|
+
* silent-drop would hide missing-from-the-Desk rows behind a count that
|
|
86
|
+
* disagrees with the workflow store.
|
|
87
|
+
*/
|
|
88
|
+
/** @internal — exported only for testability of the throw contract. */
|
|
89
|
+
export function bucketizeShortform(workflows) {
|
|
90
|
+
const out = new Map();
|
|
91
|
+
for (const platform of DASHBOARD_PLATFORM_ORDER)
|
|
92
|
+
out.set(platform, []);
|
|
93
|
+
for (const w of workflows) {
|
|
94
|
+
if (w.platform === undefined) {
|
|
95
|
+
throw new Error(`Shortform workflow "${w.id}" (slug "${w.slug}") has no platform — ` +
|
|
96
|
+
`the Desk cannot bucket it. This is a data-integrity bug; ` +
|
|
97
|
+
`every shortform workflow must carry a platform per ` +
|
|
98
|
+
`@deskwork/core/review/types DraftWorkflowItem.`);
|
|
99
|
+
}
|
|
100
|
+
const bucket = out.get(w.platform);
|
|
101
|
+
if (bucket !== undefined)
|
|
102
|
+
bucket.push(w);
|
|
103
|
+
}
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
export async function loadDashboardData(projectRoot, config) {
|
|
45
107
|
const entries = await readAllSidecars(projectRoot);
|
|
46
108
|
const byStage = bucketize(entries);
|
|
47
|
-
|
|
109
|
+
const shortformWorkflows = loadOpenShortform(projectRoot, config);
|
|
110
|
+
const shortformByPlatform = bucketizeShortform(shortformWorkflows);
|
|
111
|
+
return { entries, byStage, shortformWorkflows, shortformByPlatform };
|
|
48
112
|
}
|
|
49
113
|
//# sourceMappingURL=data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../src/pages/dashboard/data.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../src/pages/dashboard/data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAK1D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB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|
|
@@ -4,13 +4,22 @@
|
|
|
4
4
|
* `currentStage` so the renderer can iterate the eight canonical
|
|
5
5
|
* stage sections without re-walking the disk per stage.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* v7 architecture (Step 2.2.9 — studio-mobile-first feature): also
|
|
8
|
+
* reads open shortform workflows from the review-pipeline store and
|
|
9
|
+
* groups them by `Platform`. Per DESIGN-STANDARDS.md § Desk
|
|
10
|
+
* information architecture, the Desk absorbs the Shortform-by-platform
|
|
11
|
+
* view as its second section (sibling of the longform pipeline). The
|
|
12
|
+
* v0.21 platform display order is LinkedIn → Reddit → YouTube →
|
|
13
|
+
* Instagram (insertion order = display order; verified against the
|
|
14
|
+
* v7 mockup at desk-states-v7.html:632-655).
|
|
10
15
|
*/
|
|
11
16
|
|
|
12
17
|
import { readAllSidecars } from '@deskwork/core/sidecar';
|
|
13
18
|
import type { Entry, Stage } from '@deskwork/core/schema/entry';
|
|
19
|
+
import { listOpen } from '@deskwork/core/review/pipeline';
|
|
20
|
+
import type { DraftWorkflowItem } from '@deskwork/core/review/types';
|
|
21
|
+
import type { Platform } from '@deskwork/core/types';
|
|
22
|
+
import type { DeskworkConfig } from '@deskwork/core/config';
|
|
14
23
|
|
|
15
24
|
/**
|
|
16
25
|
* The eight canonical stages, in display order. Linear pipeline
|
|
@@ -29,9 +38,24 @@ export const DASHBOARD_STAGE_ORDER: readonly Stage[] = [
|
|
|
29
38
|
'Cancelled',
|
|
30
39
|
] as const;
|
|
31
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Display order for shortform platform tiles. Verified against the v7
|
|
43
|
+
* mockup at desk-states-v7.html:632-655: LinkedIn → Reddit → YouTube →
|
|
44
|
+
* Instagram. Used as the insertion order for the `shortformByPlatform`
|
|
45
|
+
* Map so iteration order matches display order.
|
|
46
|
+
*/
|
|
47
|
+
export const DASHBOARD_PLATFORM_ORDER: readonly Platform[] = [
|
|
48
|
+
'linkedin',
|
|
49
|
+
'reddit',
|
|
50
|
+
'youtube',
|
|
51
|
+
'instagram',
|
|
52
|
+
] as const;
|
|
53
|
+
|
|
32
54
|
export interface DashboardData {
|
|
33
55
|
readonly entries: readonly Entry[];
|
|
34
56
|
readonly byStage: ReadonlyMap<Stage, readonly Entry[]>;
|
|
57
|
+
readonly shortformWorkflows: readonly DraftWorkflowItem[];
|
|
58
|
+
readonly shortformByPlatform: ReadonlyMap<Platform, readonly DraftWorkflowItem[]>;
|
|
35
59
|
}
|
|
36
60
|
|
|
37
61
|
function bucketize(entries: readonly Entry[]): Map<Stage, Entry[]> {
|
|
@@ -49,8 +73,63 @@ function bucketize(entries: readonly Entry[]): Map<Stage, Entry[]> {
|
|
|
49
73
|
return out;
|
|
50
74
|
}
|
|
51
75
|
|
|
52
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Load open shortform workflows, sorted by `updatedAt` descending.
|
|
78
|
+
* Ported from the pre-v7 `loadOpenShortform` helper in pages/shortform.ts
|
|
79
|
+
* (preserved verbatim there until Step 2.2.10 retires that page).
|
|
80
|
+
*/
|
|
81
|
+
function loadOpenShortform(
|
|
82
|
+
projectRoot: string,
|
|
83
|
+
config: DeskworkConfig,
|
|
84
|
+
): DraftWorkflowItem[] {
|
|
85
|
+
const open: DraftWorkflowItem[] = [];
|
|
86
|
+
for (const w of listOpen(projectRoot, config)) {
|
|
87
|
+
if (w.contentKind === 'shortform') open.push(w);
|
|
88
|
+
}
|
|
89
|
+
open.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
|
|
90
|
+
return open;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Bucket shortform workflows by platform. Insertion order matches
|
|
95
|
+
* `DASHBOARD_PLATFORM_ORDER` — even empty platforms get a Map entry so
|
|
96
|
+
* the renderer can iterate the four canonical tiles uniformly.
|
|
97
|
+
*
|
|
98
|
+
* Throws on a workflow whose `platform` is undefined. Per project rule
|
|
99
|
+
* "Never implement fallbacks or use mock data outside of test code" — a
|
|
100
|
+
* shortform workflow without a platform is a data-integrity bug
|
|
101
|
+
* upstream, not a case to silently drop. Throwing surfaces the bug;
|
|
102
|
+
* silent-drop would hide missing-from-the-Desk rows behind a count that
|
|
103
|
+
* disagrees with the workflow store.
|
|
104
|
+
*/
|
|
105
|
+
/** @internal — exported only for testability of the throw contract. */
|
|
106
|
+
export function bucketizeShortform(
|
|
107
|
+
workflows: readonly DraftWorkflowItem[],
|
|
108
|
+
): Map<Platform, DraftWorkflowItem[]> {
|
|
109
|
+
const out = new Map<Platform, DraftWorkflowItem[]>();
|
|
110
|
+
for (const platform of DASHBOARD_PLATFORM_ORDER) out.set(platform, []);
|
|
111
|
+
for (const w of workflows) {
|
|
112
|
+
if (w.platform === undefined) {
|
|
113
|
+
throw new Error(
|
|
114
|
+
`Shortform workflow "${w.id}" (slug "${w.slug}") has no platform — ` +
|
|
115
|
+
`the Desk cannot bucket it. This is a data-integrity bug; ` +
|
|
116
|
+
`every shortform workflow must carry a platform per ` +
|
|
117
|
+
`@deskwork/core/review/types DraftWorkflowItem.`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
const bucket = out.get(w.platform);
|
|
121
|
+
if (bucket !== undefined) bucket.push(w);
|
|
122
|
+
}
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export async function loadDashboardData(
|
|
127
|
+
projectRoot: string,
|
|
128
|
+
config: DeskworkConfig,
|
|
129
|
+
): Promise<DashboardData> {
|
|
53
130
|
const entries = await readAllSidecars(projectRoot);
|
|
54
131
|
const byStage = bucketize(entries);
|
|
55
|
-
|
|
132
|
+
const shortformWorkflows = loadOpenShortform(projectRoot, config);
|
|
133
|
+
const shortformByPlatform = bucketizeShortform(shortformWorkflows);
|
|
134
|
+
return { entries, byStage, shortformWorkflows, shortformByPlatform };
|
|
56
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../../src/pages/dashboard/section.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAyBhE;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAgDnF;
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../../src/pages/dashboard/section.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAyBhE;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAgDnF;AAsCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,WAAW,EAAE,MAAM,GAClB,OAAO,CAkCT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CAuBvD"}
|
|
@@ -113,9 +113,15 @@ function renderStageTile(stage, count) {
|
|
|
113
113
|
const isEmpty = count === 0;
|
|
114
114
|
const classes = isEmpty ? 'er-stage-tile is-empty' : 'er-stage-tile';
|
|
115
115
|
const disabledAttr = isEmpty ? ' disabled' : '';
|
|
116
|
+
// v7 architecture (Step 2.2.9): `data-stage-section-group="longform"`
|
|
117
|
+
// partitions single-expand state so the longform pipeline and the
|
|
118
|
+
// shortform-by-platform section operate independently. The client
|
|
119
|
+
// controller in `dashboard/stage-tiles.ts` reads this attribute to
|
|
120
|
+
// collapse only siblings in the same group when a tile is opened.
|
|
116
121
|
return unsafe(html `
|
|
117
122
|
<button class="${classes}" type="button"
|
|
118
123
|
data-stage-tile="${stage}"
|
|
124
|
+
data-stage-section-group="longform"
|
|
119
125
|
aria-expanded="false"
|
|
120
126
|
aria-controls="stage-${stage.toLowerCase()}"${unsafe(disabledAttr)}>
|
|
121
127
|
<span class="er-stage-tile-glyph" aria-hidden="true">${STAGE_ORNAMENTS[stage]}</span>
|
|
@@ -194,6 +200,7 @@ export function renderDistributionPlaceholder() {
|
|
|
194
200
|
<div class="er-stage-block" data-stage-block="Distribution">
|
|
195
201
|
<button class="er-stage-tile is-empty" type="button"
|
|
196
202
|
data-stage-tile="Distribution"
|
|
203
|
+
data-stage-section-group="longform"
|
|
197
204
|
aria-expanded="false"
|
|
198
205
|
aria-controls="stage-distribution" disabled>
|
|
199
206
|
<span class="er-stage-tile-glyph" aria-hidden="true">⌘</span>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.js","sourceRoot":"","sources":["../../../src/pages/dashboard/section.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAgB,MAAM,YAAY,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEpF,MAAM,eAAe,GAA0B;IAC7C,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,GAAG;IACZ,SAAS,EAAE,GAAG;IACd,QAAQ,EAAE,GAAG;IACb,KAAK,EAAE,GAAG;IACV,SAAS,EAAE,GAAG;IACd,OAAO,EAAE,GAAG;IACZ,SAAS,EAAE,GAAG;CACf,CAAC;AAEF,MAAM,oBAAoB,GAA0B;IAClD,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,gEAAgE;IACzE,SAAS,EAAE,uBAAuB;IACl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AI,CAAA;sDACgC,KAAK;UACjD,IAAI;;sBAEQ,KAAK,CAAC,WAAW,EAAE,yBAAyB,KAAK;8BACzC,KAAK;;qBAEd,oBAAoB,CAAC,KAAK,CAAC;oBAC5B,KAAK;qCACY,eAAe,CAAC,KAAK,CAAC;;;;aAI9C,CAAC,CAAC;IACb,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAExF,OAAO,MAAM,CAAC,IAAI,CAAA;oDACgC,KAAK;QACjD,IAAI;8CACkC,KAAK,CAAC,WAAW,EAAE,yBAAyB,KAAK;;kBAE7E,KAAK;mCACY,eAAe,CAAC,KAAK,CAAC;kCACvB,OAAO,CAAC,MAAM;;UAEtC,IAAI;;WAEH,CAAC,CAAC;AACb,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,6BAA6B;IAC3C,OAAO,MAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;WAqBT,CAAC,CAAC;AACb,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,mEAAmE;IACnE,sBAAsB;IACtB,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -121,9 +121,15 @@ function renderStageTile(stage: Stage, count: number): RawHtml {
|
|
|
121
121
|
const isEmpty = count === 0;
|
|
122
122
|
const classes = isEmpty ? 'er-stage-tile is-empty' : 'er-stage-tile';
|
|
123
123
|
const disabledAttr = isEmpty ? ' disabled' : '';
|
|
124
|
+
// v7 architecture (Step 2.2.9): `data-stage-section-group="longform"`
|
|
125
|
+
// partitions single-expand state so the longform pipeline and the
|
|
126
|
+
// shortform-by-platform section operate independently. The client
|
|
127
|
+
// controller in `dashboard/stage-tiles.ts` reads this attribute to
|
|
128
|
+
// collapse only siblings in the same group when a tile is opened.
|
|
124
129
|
return unsafe(html`
|
|
125
130
|
<button class="${classes}" type="button"
|
|
126
131
|
data-stage-tile="${stage}"
|
|
132
|
+
data-stage-section-group="longform"
|
|
127
133
|
aria-expanded="false"
|
|
128
134
|
aria-controls="stage-${stage.toLowerCase()}"${unsafe(disabledAttr)}>
|
|
129
135
|
<span class="er-stage-tile-glyph" aria-hidden="true">${STAGE_ORNAMENTS[stage]}</span>
|
|
@@ -211,6 +217,7 @@ export function renderDistributionPlaceholder(): RawHtml {
|
|
|
211
217
|
<div class="er-stage-block" data-stage-block="Distribution">
|
|
212
218
|
<button class="er-stage-tile is-empty" type="button"
|
|
213
219
|
data-stage-tile="Distribution"
|
|
220
|
+
data-stage-section-group="longform"
|
|
214
221
|
aria-expanded="false"
|
|
215
222
|
aria-controls="stage-distribution" disabled>
|
|
216
223
|
<span class="er-stage-tile-glyph" aria-hidden="true">⌘</span>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shortform-by-platform section renderer (Step 2.2.9 — studio-mobile-first).
|
|
3
|
+
*
|
|
4
|
+
* Per DESIGN-STANDARDS.md § Desk information architecture, the Desk's
|
|
5
|
+
* second section absorbs the legacy `/dev/editorial-review-shortform`
|
|
6
|
+
* page as four platform tiles (LinkedIn / Reddit / YouTube / Instagram),
|
|
7
|
+
* each collapsible to reveal that platform's open workflows. Tiles share
|
|
8
|
+
* the longform-pipeline tile shape (data-stage-tile + aria-expanded +
|
|
9
|
+
* data-stage-section attrs) so the existing `dashboard/stage-tiles.ts`
|
|
10
|
+
* client controller can drive both. `data-stage-section-group="shortform"`
|
|
11
|
+
* partitions single-expand state so longform and shortform open
|
|
12
|
+
* independently.
|
|
13
|
+
*
|
|
14
|
+
* Per DESKWORK-STATE-MACHINE.md Commandment III, rows do NOT render
|
|
15
|
+
* `.er-stamp` / `er-stamp-<state>` chrome. The pre-v7 shortform page
|
|
16
|
+
* rendered review-state stamps inline; this section does not.
|
|
17
|
+
*
|
|
18
|
+
* Per THESIS Consequence 2, rows are navigation-only. The trailing `⋮`
|
|
19
|
+
* placeholder anchor links to `/dev/editorial-review/<workflow.id>`;
|
|
20
|
+
* Step 2.2.10 lands the v0.20-style row popover with stage-aware verbs
|
|
21
|
+
* once the shortform verb-routing pieces (issues G.1-G.6) land. This
|
|
22
|
+
* commit does NOT smuggle verb-routing in early. Tracked in
|
|
23
|
+
* https://github.com/audiocontrol-org/deskwork/issues/263.
|
|
24
|
+
*
|
|
25
|
+
* TRANSITIONAL SHAPE: this row's `er-row-shell` markup is a strict
|
|
26
|
+
* subset of the longform row shell defined in
|
|
27
|
+
* `dashboard/section.ts:renderRow`. Longform shells carry three
|
|
28
|
+
* children (`er-row-drawer`, `er-row-fg`, `er-row-menu`); this shell
|
|
29
|
+
* carries only the `er-row-fg`. Step 2.2.10's popover wire-up is
|
|
30
|
+
* purely additive on the existing shape — it inserts the missing
|
|
31
|
+
* `er-row-menu` (and possibly `er-row-drawer` if a swipe gesture is
|
|
32
|
+
* scoped in). Keep the two row paths' attribute conventions aligned
|
|
33
|
+
* (data-row-shell, data-platform, data-site, data-slug already match)
|
|
34
|
+
* so the unification stays straightforward.
|
|
35
|
+
*/
|
|
36
|
+
import { type RawHtml } from '../html.ts';
|
|
37
|
+
import type { DraftWorkflowItem } from '@deskwork/core/review/types';
|
|
38
|
+
import type { Platform } from '@deskwork/core/types';
|
|
39
|
+
/**
|
|
40
|
+
* Render the shortform section head — `<div class="er-desk-section-head
|
|
41
|
+
* er-desk-section-head--shortform">` matching the mockup's
|
|
42
|
+
* `.desk-section-head.shortform` shape. Glyph + label + caption count.
|
|
43
|
+
*/
|
|
44
|
+
export declare function renderShortformSectionHead(totalCount: number): RawHtml;
|
|
45
|
+
/**
|
|
46
|
+
* Render one platform tile. Shares its tile shape + a11y attrs with the
|
|
47
|
+
* longform stage tile so the stage-tiles.ts client controller drives
|
|
48
|
+
* both. Empty platforms get `disabled` + `.is-empty` so the operator
|
|
49
|
+
* sees the platform exists but cannot drill into nothing.
|
|
50
|
+
*/
|
|
51
|
+
export declare function renderShortformPlatformTile(platform: Platform, count: number): RawHtml;
|
|
52
|
+
/**
|
|
53
|
+
* Render a single shortform workflow row. Mirrors the v0.20 row-affordance
|
|
54
|
+
* shape: shell + foreground (slug + title + channel) + meta column (ts +
|
|
55
|
+
* version) + trailing `⋮`. The `⋮` is a navigation placeholder anchor —
|
|
56
|
+
* Step 2.2.10 wires the stage-aware row popover.
|
|
57
|
+
*/
|
|
58
|
+
export declare function renderShortformRow(workflow: DraftWorkflowItem, now: Date): RawHtml;
|
|
59
|
+
/**
|
|
60
|
+
* Section data shape — the renderer reads counts + workflows per platform
|
|
61
|
+
* from the dashboard's loadDashboardData() output. Caller passes the
|
|
62
|
+
* ordered Map directly (insertion order = display order).
|
|
63
|
+
*/
|
|
64
|
+
export interface ShortformSectionData {
|
|
65
|
+
readonly shortformByPlatform: ReadonlyMap<Platform, readonly DraftWorkflowItem[]>;
|
|
66
|
+
readonly totalCount: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Compose the full shortform section: head + 4 platform tiles + per-
|
|
70
|
+
* platform row groups, in `DASHBOARD_PLATFORM_ORDER` order. All 4
|
|
71
|
+
* platforms render even when zero — empty tiles communicate platform
|
|
72
|
+
* existence (per § Empty-state rendering, "the absence of items is
|
|
73
|
+
* information about the pipeline shape").
|
|
74
|
+
*
|
|
75
|
+
* API shape note: this helper iterates platforms internally (single
|
|
76
|
+
* call → whole section), whereas the longform `renderStageSection` is
|
|
77
|
+
* called per-stage by `dashboard.ts` (caller iterates). The asymmetry
|
|
78
|
+
* is intentional: longform stages share a uniform shape across all
|
|
79
|
+
* eight stages, so the caller-iterates pattern keeps the loop visible
|
|
80
|
+
* in `dashboard.ts`. Shortform's four platforms share a section head
|
|
81
|
+
* and ordered iteration constraint that lives more cleanly inside the
|
|
82
|
+
* composer. If a future surface needs both shapes via a common
|
|
83
|
+
* abstraction, the unification belongs there, not here.
|
|
84
|
+
*/
|
|
85
|
+
export declare function renderShortformSection(data: ShortformSectionData, now: Date): RawHtml;
|
|
86
|
+
//# sourceMappingURL=shortform-section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortform-section.d.ts","sourceRoot":"","sources":["../../../src/pages/dashboard/shortform-section.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAoBrD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAOtE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAmBT;AAaD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,iBAAiB,EAC3B,GAAG,EAAE,IAAI,GACR,OAAO,CAqCT;AA6BD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,mBAAmB,EAAE,WAAW,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC,CAAC;IAClF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,EAC1B,GAAG,EAAE,IAAI,GACR,OAAO,CAST"}
|