@cueloop/client 0.1.0-alpha.33 → 0.1.0-alpha.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +27 -26
- package/src/App.autoclose.test.tsx +7 -4
- package/src/App.diff.test.tsx +130 -4
- package/src/App.export.test.tsx +22 -4
- package/src/App.plan-review.test.tsx +127 -27
- package/src/App.readonly.test.tsx +31 -8
- package/src/App.rendering.test.tsx +12 -3
- package/src/App.review-panel.test.tsx +11 -3
- package/src/App.submit-confirm.test.tsx +12 -7
- package/src/App.test.tsx +46 -9
- package/src/App.toast.test.tsx +10 -3
- package/src/App.tsx +400 -100
- package/src/App.walk.test.tsx +30 -10
- package/src/attribution.ts +8 -2
- package/src/clipboard.ts +5 -1
- package/src/components/AnnotationCard.stories.tsx +28 -9
- package/src/components/AnnotationCard.tsx +53 -38
- package/src/components/Breadcrumb.tsx +7 -1
- package/src/components/CodeBlock.stories.tsx +19 -2
- package/src/components/CodeBlock.tsx +24 -9
- package/src/components/CompletionOverlay.tsx +13 -3
- package/src/components/ConfirmCard.stories.tsx +22 -3
- package/src/components/ConfirmCard.tsx +22 -5
- package/src/components/ConfirmDialog.tsx +9 -1
- package/src/components/DiffSheet.scroll.test.tsx +123 -0
- package/src/components/DiffSheet.stories.tsx +18 -2
- package/src/components/DiffSheet.syntax.test.tsx +62 -0
- package/src/components/DiffSheet.tsx +184 -98
- package/src/components/InboxList.stories.tsx +16 -3
- package/src/components/InboxList.tsx +17 -10
- package/src/components/KeybindsDialog.tsx +19 -3
- package/src/components/MarkerPopover.stories.tsx +58 -0
- package/src/components/MarkerPopover.tsx +102 -0
- package/src/components/MenuBar.stories.tsx +5 -1
- package/src/components/MenuBar.tsx +18 -2
- package/src/components/PlanSheet.stories.tsx +34 -2
- package/src/components/PlanSheet.tsx +141 -32
- package/src/components/PromptDialog.tsx +18 -2
- package/src/components/ReviewPanel.stories.tsx +13 -3
- package/src/components/ReviewPanel.tsx +8 -4
- package/src/components/ReviewRail.stories.tsx +145 -72
- package/src/components/ReviewRail.tsx +177 -38
- package/src/components/SettingsDialog.stories.tsx +51 -3
- package/src/components/SettingsDialog.tsx +8 -3
- package/src/components/SettingsRows.tsx +19 -3
- package/src/components/Toast.tsx +17 -2
- package/src/components/WalkWizard.stories.tsx +13 -2
- package/src/components/WalkWizard.tsx +9 -3
- package/src/components/__snapshots__/stories.test.tsx.snap +281 -83
- package/src/components/diff-sheet-layout.test.ts +127 -0
- package/src/components/diff-sheet-layout.ts +167 -0
- package/src/components/primitives/Button.tsx +5 -1
- package/src/components/primitives/Dialog.tsx +9 -1
- package/src/components/primitives/Tabs.tsx +24 -4
- package/src/components/stories-app.tsx +34 -6
- package/src/components/story-fixtures.ts +11 -3
- package/src/components/story.ts +3 -1
- package/src/components/syntax-highlight.ts +47 -12
- package/src/components/theme-context.stories.tsx +6 -1
- package/src/components/theme-context.tsx +7 -1
- package/src/config.test.ts +178 -2
- package/src/config.ts +121 -23
- package/src/diff-hunk-curate.test.ts +315 -0
- package/src/diff-hunk-curate.ts +233 -0
- package/src/diff-intraline.test.ts +164 -0
- package/src/diff-intraline.ts +132 -0
- package/src/diff-syntax.test.ts +96 -0
- package/src/diff-syntax.ts +154 -0
- package/src/editor.test.ts +13 -4
- package/src/editor.ts +31 -5
- package/src/herdr.ts +8 -2
- package/src/index.ts +9 -1
- package/src/integrations.ts +3 -1
- package/src/intent-dispatch.test.ts +193 -9
- package/src/intent-dispatch.ts +151 -18
- package/src/key-bindings.test.ts +19 -9
- package/src/key-bindings.ts +36 -14
- package/src/keymap.test.ts +171 -26
- package/src/keymap.ts +83 -16
- package/src/review-panel.test.ts +3 -1
- package/src/review-panel.ts +9 -2
- package/src/serve.test.ts +11 -3
- package/src/session-controller.curate.test.ts +253 -0
- package/src/session-controller.share.test.ts +65 -17
- package/src/session-controller.ts +301 -26
- package/src/share.ts +41 -8
- package/src/test-support.ts +16 -6
- package/src/theme-presets.ts +168 -0
- package/src/theme.ts +1 -3
- package/src/view-diff.ts +15 -4
- package/src/view-plan.test.ts +40 -6
- package/src/view-plan.ts +71 -28
- package/src/walk.test.ts +7 -2
- package/src/walk.ts +7 -2
|
@@ -29,7 +29,11 @@ function RowShell({ label, isActive, onPress, theme, children }: RowShellProps):
|
|
|
29
29
|
const tokens = useComponentTheme(theme);
|
|
30
30
|
return (
|
|
31
31
|
<box
|
|
32
|
-
style={{
|
|
32
|
+
style={{
|
|
33
|
+
flexDirection: "row",
|
|
34
|
+
height: 1,
|
|
35
|
+
backgroundColor: isActive ? tokens.border : undefined,
|
|
36
|
+
}}
|
|
33
37
|
onMouseUp={onPress}
|
|
34
38
|
>
|
|
35
39
|
<box style={{ width: 26, paddingLeft: 1 }}>
|
|
@@ -48,7 +52,13 @@ export interface ToggleRowProps {
|
|
|
48
52
|
theme?: Theme;
|
|
49
53
|
}
|
|
50
54
|
|
|
51
|
-
export function ToggleRow({
|
|
55
|
+
export function ToggleRow({
|
|
56
|
+
label,
|
|
57
|
+
value,
|
|
58
|
+
isActive,
|
|
59
|
+
onPress,
|
|
60
|
+
theme,
|
|
61
|
+
}: ToggleRowProps): React.ReactNode {
|
|
52
62
|
const tokens = useComponentTheme(theme);
|
|
53
63
|
return (
|
|
54
64
|
<RowShell label={label} isActive={isActive} onPress={onPress} theme={theme}>
|
|
@@ -65,7 +75,13 @@ export interface CycleRowProps {
|
|
|
65
75
|
theme?: Theme;
|
|
66
76
|
}
|
|
67
77
|
|
|
68
|
-
export function CycleRow({
|
|
78
|
+
export function CycleRow({
|
|
79
|
+
label,
|
|
80
|
+
value,
|
|
81
|
+
isActive,
|
|
82
|
+
onPress,
|
|
83
|
+
theme,
|
|
84
|
+
}: CycleRowProps): React.ReactNode {
|
|
69
85
|
const tokens = useComponentTheme(theme);
|
|
70
86
|
return (
|
|
71
87
|
<RowShell label={label} isActive={isActive} onPress={onPress} theme={theme}>
|
package/src/components/Toast.tsx
CHANGED
|
@@ -15,8 +15,23 @@ export function Toast({ title, body, theme }: ToastProps): React.ReactNode {
|
|
|
15
15
|
const { width: terminalWidth } = useTerminalDimensions();
|
|
16
16
|
const width = Math.min(terminalWidth - 6, Math.max(28, body.length + 4));
|
|
17
17
|
return (
|
|
18
|
-
<Dialog
|
|
19
|
-
|
|
18
|
+
<Dialog
|
|
19
|
+
isOpen
|
|
20
|
+
title={title ? ` ${title} ` : undefined}
|
|
21
|
+
width={width}
|
|
22
|
+
height={6}
|
|
23
|
+
background={tokens.elevated}
|
|
24
|
+
theme={theme}
|
|
25
|
+
>
|
|
26
|
+
<box
|
|
27
|
+
style={{
|
|
28
|
+
flexDirection: "column",
|
|
29
|
+
flexGrow: 1,
|
|
30
|
+
paddingLeft: 1,
|
|
31
|
+
paddingRight: 1,
|
|
32
|
+
paddingTop: 1,
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
20
35
|
<text fg={tokens.text}>{body}</text>
|
|
21
36
|
<box style={{ flexGrow: 1 }} />
|
|
22
37
|
<box style={{ flexDirection: "row" }}>
|
|
@@ -23,7 +23,12 @@ const FILES: WalkFile[] = [
|
|
|
23
23
|
removed: 0,
|
|
24
24
|
preview: [{ sign: "+", text: "export function firstUnviewedIndex(files, viewed) {" }],
|
|
25
25
|
},
|
|
26
|
-
{
|
|
26
|
+
{
|
|
27
|
+
path: "packages/schema/src/types.ts",
|
|
28
|
+
added: 3,
|
|
29
|
+
removed: 0,
|
|
30
|
+
preview: [{ sign: "+", text: "viewedPaths?: string[];" }],
|
|
31
|
+
},
|
|
27
32
|
];
|
|
28
33
|
|
|
29
34
|
const noop = (): void => {};
|
|
@@ -40,7 +45,13 @@ export const FirstFile: Story = {
|
|
|
40
45
|
/>
|
|
41
46
|
),
|
|
42
47
|
// the main card wears the accent border; stats carry the +/- colors
|
|
43
|
-
expectedColors: [
|
|
48
|
+
expectedColors: [
|
|
49
|
+
DARK.accent,
|
|
50
|
+
DARK.green,
|
|
51
|
+
DARK.red,
|
|
52
|
+
DARK.insertedForeground,
|
|
53
|
+
DARK.deletedForeground,
|
|
54
|
+
],
|
|
44
55
|
};
|
|
45
56
|
|
|
46
57
|
export const WithAgentNote: Story = {
|
|
@@ -106,9 +106,11 @@ export function WalkWizard({
|
|
|
106
106
|
<text fg={tokens.text}>{currentFile.path}</text>
|
|
107
107
|
<text>
|
|
108
108
|
<span fg={tokens.green}>{`+${currentFile.added}`}</span>
|
|
109
|
-
<span fg={tokens.textDim}>
|
|
109
|
+
<span fg={tokens.textDim}> </span>
|
|
110
110
|
<span fg={tokens.red}>{`-${currentFile.removed}`}</span>
|
|
111
|
-
<span fg={tokens.textDim}>
|
|
111
|
+
<span fg={tokens.textDim}>
|
|
112
|
+
{viewedPaths.has(currentFile.path) ? " · viewed" : ""}
|
|
113
|
+
</span>
|
|
112
114
|
</text>
|
|
113
115
|
<box style={{ height: 1 }} />
|
|
114
116
|
{currentFile.preview.length === 0 ? (
|
|
@@ -118,7 +120,11 @@ export function WalkWizard({
|
|
|
118
120
|
<text
|
|
119
121
|
key={previewIndex}
|
|
120
122
|
style={{ wrapMode: "none" }}
|
|
121
|
-
fg={
|
|
123
|
+
fg={
|
|
124
|
+
previewLine.sign === "+"
|
|
125
|
+
? tokens.insertedForeground
|
|
126
|
+
: tokens.deletedForeground
|
|
127
|
+
}
|
|
122
128
|
>
|
|
123
129
|
{previewLine.sign + previewLine.text}
|
|
124
130
|
</text>
|