dsh-charter 0.2.1 → 0.3.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/CHANGELOG.md +62 -1
- package/CHANGELOG.zh.md +53 -1
- package/README.md +64 -33
- package/README.zh.md +49 -27
- package/docs/README.md +7 -3
- package/docs/README.zh.md +7 -3
- package/docs/assets/charter-graph-0.3.0.zh.png +0 -0
- package/docs/assets/charter-pane-0.3.0.png +0 -0
- package/docs/assets/charter-pane-0.3.0.zh.png +0 -0
- package/docs/assets/charter-pane.zh.png +0 -0
- package/docs/design/charter-dependency-graph-v1.zh.md +1101 -0
- package/docs/design/charter-design-v1.md +2 -2
- package/docs/design/charter-design-v1.zh.md +2 -2
- package/docs/design/charter-gui-v1.zh.md +868 -0
- package/docs/design/charter-workspace-v2.zh.md +29 -1
- package/docs/design/compatibility.md +22 -6
- package/docs/design/compatibility.zh.md +21 -6
- package/docs/design/mockups/README.md +29 -0
- package/docs/design/mockups/mockup-graph.html +152 -0
- package/docs/design/mockups/mockup-home-clean.html +146 -0
- package/docs/design/mockups/mockup-home-dirty.html +191 -0
- package/docs/design/mockups/mockup.css +425 -0
- package/docs/design/mockups/style-tile.html +146 -0
- package/docs/design/mockups/tokens.css +670 -0
- package/docs/design/version-roadmap.md +28 -11
- package/docs/design/version-roadmap.zh.md +38 -8
- package/docs/release-notes/0.2.1.md +8 -6
- package/docs/release-notes/0.2.2.md +60 -0
- package/docs/release-notes/0.3.0.md +66 -0
- package/docs/release-notes/README.md +1 -2
- package/docs/releasing.md +7 -8
- package/docs/releasing.zh.md +7 -8
- package/docs/user-guide.md +36 -16
- package/docs/user-guide.zh.md +33 -14
- package/docs/verification.md +105 -32
- package/docs/verification.zh.md +90 -28
- package/lib/client/ChangeSetPanel.d.ts +24 -0
- package/lib/client/DependencyGraph.d.ts +19 -0
- package/lib/client/DiagnosticsPage.d.ts +5 -0
- package/lib/client/ReviewCenterPage.d.ts +5 -0
- package/lib/client/SectionNav.d.ts +14 -0
- package/lib/client/WorkspacePage.d.ts +5 -0
- package/lib/client/change-set-model.d.ts +55 -0
- package/lib/client/draft-store.d.ts +1 -1
- package/lib/client/locales.d.ts +94 -7
- package/lib/client/page-order.d.ts +26 -0
- package/lib/client/pane-format.d.ts +48 -0
- package/lib/client/pane-scope.d.ts +382 -0
- package/lib/client/pane-ui.d.ts +39 -0
- package/lib/client/relation-graph.d.ts +135 -0
- package/lib/client/section-routing.d.ts +12 -0
- package/lib/client/use-change-set-sheet.d.ts +13 -0
- package/lib/client.js +4589 -2413
- package/lib/core/change-set.d.ts +7 -0
- package/lib/core/dependencies.d.ts +29 -0
- package/lib/core.js +1 -1
- package/lib/{fork-D5HVDV1i.js → fork-KSL6sovw.js} +70 -1
- package/lib/host/types.d.ts +8 -1
- package/lib/index.js +2 -2
- package/lib/remote/wire.d.ts +37 -3
- package/lib/remote.js +23 -3
- package/lib/{service-CNjnvioR.js → service-DO3Q9uB2.js} +10 -5
- package/lib/version.d.ts +1 -1
- package/package.json +23 -18
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CharterText } from './pane-format.js';
|
|
3
|
+
import { itemState } from './pane-format.js';
|
|
4
|
+
export declare function ErrorDetails({ detail, t }: {
|
|
5
|
+
readonly detail: string | undefined;
|
|
6
|
+
readonly t: CharterText;
|
|
7
|
+
}): ReactNode;
|
|
8
|
+
export declare function ActionButton({ children, onClick, disabled, variant, ariaLabel, ariaDescribedBy, title, busy, className, }: {
|
|
9
|
+
readonly children: ReactNode;
|
|
10
|
+
readonly onClick?: () => void;
|
|
11
|
+
readonly disabled?: boolean;
|
|
12
|
+
readonly variant?: 'primary' | 'outline' | 'ghost';
|
|
13
|
+
readonly ariaLabel?: string;
|
|
14
|
+
readonly ariaDescribedBy?: string;
|
|
15
|
+
readonly title?: string;
|
|
16
|
+
readonly busy?: boolean;
|
|
17
|
+
readonly className?: string;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export declare function StateMark({ state }: {
|
|
20
|
+
readonly state: ReturnType<typeof itemState> | 'error';
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
export declare function StatusTag({ children, tone, title, }: {
|
|
23
|
+
readonly children: ReactNode;
|
|
24
|
+
readonly tone?: 'quiet' | 'info' | 'success' | 'warning' | 'danger';
|
|
25
|
+
readonly title?: string;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export declare function TextEditor({ value, onChange, reason, onReasonChange, showReason, onSave, onCancel, maxBytes, previousBytes, label, t, }: {
|
|
28
|
+
readonly value: string;
|
|
29
|
+
readonly onChange: (value: string) => void;
|
|
30
|
+
readonly reason?: string;
|
|
31
|
+
readonly onReasonChange?: (value: string) => void;
|
|
32
|
+
readonly showReason?: boolean;
|
|
33
|
+
readonly onSave: () => void;
|
|
34
|
+
readonly onCancel: () => void;
|
|
35
|
+
readonly maxBytes: number;
|
|
36
|
+
readonly previousBytes?: number | undefined;
|
|
37
|
+
readonly label?: string | undefined;
|
|
38
|
+
readonly t: CharterText;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { DeliverableProgress } from '../core/schemas.js';
|
|
2
|
+
/**
|
|
3
|
+
* Client-side dependency-graph projection.
|
|
4
|
+
*
|
|
5
|
+
* The design contract is split in two:
|
|
6
|
+
* - buildRelationGraph compares committed and projected items and derives
|
|
7
|
+
* execution/candidate/history lanes plus edge staging state;
|
|
8
|
+
* - layoutRelationGraph is a deterministic, font-free geometry pass over the
|
|
9
|
+
* semantic model.
|
|
10
|
+
*
|
|
11
|
+
* Both functions are pure. The Pane renders their output; the Host is not
|
|
12
|
+
* involved and no graph coordinate enters the record, prompt, or digest.
|
|
13
|
+
*/
|
|
14
|
+
export declare const GRAPH: {
|
|
15
|
+
readonly nodePaddingEm: 0.625;
|
|
16
|
+
readonly summaryEm: 0.78;
|
|
17
|
+
readonly nodeMinWidthEm: 9;
|
|
18
|
+
readonly nodeWidthEm: 10;
|
|
19
|
+
readonly nodeMaxWidthEm: 12;
|
|
20
|
+
readonly nodeHeightEm: {
|
|
21
|
+
readonly 1: 3;
|
|
22
|
+
readonly 2: 4.5;
|
|
23
|
+
};
|
|
24
|
+
readonly rankPitchEm: 12.5;
|
|
25
|
+
readonly rowPitchEm: 5.5;
|
|
26
|
+
readonly candidateGapEm: 2.5;
|
|
27
|
+
readonly historyGapEm: 2.5;
|
|
28
|
+
readonly navigationLimit: 60;
|
|
29
|
+
readonly isolatedNodeLimit: 20;
|
|
30
|
+
readonly touchTargetPx: 44;
|
|
31
|
+
};
|
|
32
|
+
export declare const LINE_CAPACITY: number;
|
|
33
|
+
export type GraphLane = 'execution' | 'candidate' | 'history';
|
|
34
|
+
export type NodeState = 'unchanged' | 'staged-added' | 'staged-removed' | 'staged-changed';
|
|
35
|
+
export type EdgeState = 'committed' | 'staged-added' | 'staged-removed';
|
|
36
|
+
export type EdgeKind = 'requires' | 'proposed' | 'supersedes';
|
|
37
|
+
export interface GraphInputItem {
|
|
38
|
+
readonly id: string;
|
|
39
|
+
readonly kind: string;
|
|
40
|
+
readonly text: string;
|
|
41
|
+
readonly review: string;
|
|
42
|
+
readonly lifecycle: string;
|
|
43
|
+
readonly progress?: DeliverableProgress;
|
|
44
|
+
readonly requires?: readonly string[];
|
|
45
|
+
readonly proposedRequires?: readonly string[];
|
|
46
|
+
readonly supersedes?: string;
|
|
47
|
+
readonly supersededBy?: string;
|
|
48
|
+
readonly order?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface RelationNode {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly lane: GraphLane;
|
|
53
|
+
readonly ghost?: boolean;
|
|
54
|
+
readonly localKey: string | undefined;
|
|
55
|
+
readonly text: string;
|
|
56
|
+
readonly rank: number | undefined;
|
|
57
|
+
readonly order: number;
|
|
58
|
+
readonly groupRank: number | undefined;
|
|
59
|
+
readonly progress: DeliverableProgress | undefined;
|
|
60
|
+
readonly executionDisplay: string | undefined;
|
|
61
|
+
readonly prerequisiteStatus: string | undefined;
|
|
62
|
+
readonly state: NodeState;
|
|
63
|
+
readonly candidateCycle?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface RelationEdge {
|
|
66
|
+
readonly from: string;
|
|
67
|
+
readonly to: string;
|
|
68
|
+
readonly kind: EdgeKind;
|
|
69
|
+
readonly state: EdgeState;
|
|
70
|
+
readonly editable: boolean;
|
|
71
|
+
readonly focusable: boolean;
|
|
72
|
+
readonly targetProposalId?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface RelationGraphModel {
|
|
75
|
+
readonly nodes: readonly RelationNode[];
|
|
76
|
+
readonly edges: readonly RelationEdge[];
|
|
77
|
+
readonly topoOrder: readonly string[];
|
|
78
|
+
readonly committedTopoOrder: readonly string[];
|
|
79
|
+
readonly navigables: number;
|
|
80
|
+
}
|
|
81
|
+
export interface PlacedNode extends RelationNode {
|
|
82
|
+
readonly col: number;
|
|
83
|
+
readonly x: number;
|
|
84
|
+
readonly y: number;
|
|
85
|
+
readonly w: number;
|
|
86
|
+
readonly h: number;
|
|
87
|
+
readonly labelLines: 1 | 2;
|
|
88
|
+
}
|
|
89
|
+
export interface PlacedEdge extends RelationEdge {
|
|
90
|
+
readonly key: string;
|
|
91
|
+
readonly path: string;
|
|
92
|
+
readonly labelAt: {
|
|
93
|
+
readonly x: number;
|
|
94
|
+
readonly y: number;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export interface GraphLayout {
|
|
98
|
+
readonly nodes: readonly PlacedNode[];
|
|
99
|
+
readonly edges: readonly PlacedEdge[];
|
|
100
|
+
readonly width: number;
|
|
101
|
+
readonly height: number;
|
|
102
|
+
readonly traversal: readonly string[];
|
|
103
|
+
readonly navigables: number;
|
|
104
|
+
readonly focusId: string | undefined;
|
|
105
|
+
readonly depth: 1 | 2;
|
|
106
|
+
readonly degraded: {
|
|
107
|
+
readonly supersedesHidden: boolean;
|
|
108
|
+
readonly depthReduced: boolean;
|
|
109
|
+
readonly hidden: boolean;
|
|
110
|
+
readonly isolatedTooMany: boolean;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export interface BuildRelationGraphInput {
|
|
114
|
+
readonly committed: readonly GraphInputItem[];
|
|
115
|
+
readonly projected: readonly GraphInputItem[];
|
|
116
|
+
readonly ops?: readonly unknown[];
|
|
117
|
+
readonly showSupersedes?: boolean;
|
|
118
|
+
}
|
|
119
|
+
export declare function buildRelationGraph(input: BuildRelationGraphInput): RelationGraphModel;
|
|
120
|
+
export declare function labelLines(text: string): 1 | 2;
|
|
121
|
+
export declare function defaultFocus(model: RelationGraphModel): string | undefined;
|
|
122
|
+
interface LayoutOptions {
|
|
123
|
+
readonly focusId?: string | undefined;
|
|
124
|
+
readonly depth?: 1 | 2;
|
|
125
|
+
readonly supersedesHidden?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export declare function layoutRelationGraph(model: RelationGraphModel, options?: LayoutOptions): GraphLayout;
|
|
128
|
+
export type GraphNavigationKey = 'Home' | 'End' | 'BracketLeft' | 'BracketRight' | 'PageUp' | 'PageDown' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown';
|
|
129
|
+
export declare function graphNavigationTarget(layout: GraphLayout, currentKey: string, key: GraphNavigationKey): string | null;
|
|
130
|
+
export interface OverlapPair {
|
|
131
|
+
readonly left: string;
|
|
132
|
+
readonly right: string;
|
|
133
|
+
}
|
|
134
|
+
export declare function graphOverlaps(layout: GraphLayout): readonly OverlapPair[];
|
|
135
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CharterSection } from './draft-store.js';
|
|
2
|
+
/**
|
|
3
|
+
* Stable DOM anchors for in-Pane navigation. Keeping the map here (rather than
|
|
4
|
+
* inside the Pane) lets the routing contract be unit-tested and reused by a
|
|
5
|
+
* future Workspace/Review/Diagnostics page split.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SECTION_ANCHOR: Record<CharterSection, string>;
|
|
8
|
+
export declare function sectionAnchor(section: CharterSection): string;
|
|
9
|
+
/** Scroll the host scrollBody to the section anchor; returns the anchor element. */
|
|
10
|
+
export declare function scrollToSectionAnchor(section: CharterSection, doc: Document): HTMLElement | null;
|
|
11
|
+
/** Move focus to the section heading, falling back to the page heading. */
|
|
12
|
+
export declare function focusSectionHeading(target: HTMLElement | null, fallback: HTMLElement | null): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ChangeSetSheetController {
|
|
2
|
+
readonly open: boolean;
|
|
3
|
+
readonly setOpen: (open: boolean) => void;
|
|
4
|
+
readonly close: () => void;
|
|
5
|
+
readonly triggerRef: React.MutableRefObject<HTMLButtonElement | null>;
|
|
6
|
+
readonly sheetRef: React.MutableRefObject<HTMLElement | null>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Narrow-container Change Set sheet controller: state, opener/sheet refs,
|
|
10
|
+
* Escape/Tab handling, and opener focus restore. Extracted from the Pane so a
|
|
11
|
+
* future page split can reuse the same modal behavior.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useChangeSetSheet(): ChangeSetSheetController;
|