@vibes.diy/base 14.3.386 → 14.3.387
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/components/vibe-menu/cards/CodeCard.js +2 -2
- package/components/vibe-menu/copy.d.ts +4 -0
- package/components/vibe-menu/copy.js +4 -0
- package/components/vibe-menu/parts/CodeAnswerLine.d.ts +4 -1
- package/components/vibe-menu/parts/CodeAnswerLine.js +11 -1
- package/components/vibe-menu/slices.d.ts +2 -0
- package/package.json +5 -5
|
@@ -15,7 +15,7 @@ import { AgentLog, MomentLine } from "../parts/MomentLine.js";
|
|
|
15
15
|
import { PromptRequest } from "../parts/PromptRequest.js";
|
|
16
16
|
import { Row } from "../parts/Row.js";
|
|
17
17
|
import { StopIconButton } from "../parts/StopIconButton.js";
|
|
18
|
-
import { CODE_ANSWER_CSS, CodeAnswerLine } from "../parts/CodeAnswerLine.js";
|
|
18
|
+
import { CODE_ANSWER_CSS, CodeAnswerLine, CodeFailedLine } from "../parts/CodeAnswerLine.js";
|
|
19
19
|
import { CodeModeWorkspace, WORKSPACE_CODE_TABS, resolveActiveCodeTab } from "./CodeModeWorkspace.js";
|
|
20
20
|
import { ScrollTabRow } from "../parts/ScrollTabRow.js";
|
|
21
21
|
import { CODE_TAB_ROW_CSS, CodeTabRow, codeNavItems, steadyCodeNavItems, codeNavRowItems, codeTierItems, codeTierLabel, codeTierRowItems, codeTierTab, } from "./CodeTabRow.js";
|
|
@@ -298,7 +298,7 @@ export function CodeCard(props) {
|
|
|
298
298
|
code.onCodeTab(tab);
|
|
299
299
|
};
|
|
300
300
|
const local = tierTab === "details" || tierTab === "help";
|
|
301
|
-
const answerLine = answer !== undefined ? (React.createElement(CodeAnswerLine, { text: answer.text, onOpen: () => {
|
|
301
|
+
const answerLine = answer?.kind === "failed" ? (React.createElement(CodeFailedLine, { ...(answer.onRetry === undefined ? {} : { onRetry: answer.onRetry }) })) : answer !== undefined ? (React.createElement(CodeAnswerLine, { text: answer.text, onOpen: () => {
|
|
302
302
|
noteChatOpened("line");
|
|
303
303
|
if (drill !== null)
|
|
304
304
|
nav.onLeaveDrill();
|
|
@@ -91,6 +91,10 @@ export declare const CODE_ANSWER_LINE: Readonly<{
|
|
|
91
91
|
action: "Read it";
|
|
92
92
|
label: "Read the answer in Chat";
|
|
93
93
|
}>;
|
|
94
|
+
export declare const CODE_FAILED_LINE: Readonly<{
|
|
95
|
+
text: "That change didn't land.";
|
|
96
|
+
action: "Try again";
|
|
97
|
+
}>;
|
|
94
98
|
export declare const GUEST_BUILD_NOTE: Readonly<{
|
|
95
99
|
lead: "You’re building as a guest,";
|
|
96
100
|
body: "and your first change is free too. A free account keeps it going with 1,000 credits every month.";
|
|
@@ -113,6 +113,10 @@ export const CODE_ANSWER_LINE = Object.freeze({
|
|
|
113
113
|
action: "Read it",
|
|
114
114
|
label: "Read the answer in Chat",
|
|
115
115
|
});
|
|
116
|
+
export const CODE_FAILED_LINE = Object.freeze({
|
|
117
|
+
text: "That change didn't land.",
|
|
118
|
+
action: "Try again",
|
|
119
|
+
});
|
|
116
120
|
export const GUEST_BUILD_NOTE = Object.freeze({
|
|
117
121
|
lead: "You’re building as a guest,",
|
|
118
122
|
body: "and your first change is free too. A free account keeps it going with 1,000 credits every month.",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export declare const CODE_ANSWER_CSS = "\n[data-vibe-menu] .vm-code-answer {\n width: 100%; margin: 0 0 10px; padding: 0; text-align: left;\n font: 400 14px/1.4 var(--font-display); color: var(--muted); cursor: pointer;\n display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;\n}\n[data-vibe-menu] .vm-code-answer > strong { color: var(--ink); font-weight: 700; }\n[data-vibe-menu] .vm-code-answer-cta { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }\n[data-vibe-menu] .vm-code-answer:focus-visible { outline: var(--stroke-focus) solid var(--line-card); outline-offset: 2px; }\n";
|
|
2
|
+
export declare const CODE_ANSWER_CSS = "\n[data-vibe-menu] .vm-code-answer {\n width: 100%; margin: 0 0 10px; padding: 0; text-align: left;\n font: 400 14px/1.4 var(--font-display); color: var(--muted); cursor: pointer;\n display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;\n}\n[data-vibe-menu] .vm-code-answer > strong { color: var(--ink); font-weight: 700; }\n[data-vibe-menu] .vm-code-answer-cta { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }\n[data-vibe-menu] .vm-code-answer:focus-visible { outline: var(--stroke-focus) solid var(--line-card); outline-offset: 2px; }\n[data-vibe-menu] .vm-code-failed { cursor: default; }\n[data-vibe-menu] .vm-code-failed-retry { margin: 0; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }\n[data-vibe-menu] .vm-code-failed-retry:focus-visible { outline: var(--stroke-focus) solid var(--line-card); outline-offset: 2px; }\n";
|
|
3
|
+
export declare function CodeFailedLine(props: {
|
|
4
|
+
readonly onRetry?: () => void;
|
|
5
|
+
}): React.ReactElement;
|
|
3
6
|
export declare function CodeAnswerLine(props: {
|
|
4
7
|
readonly text: string;
|
|
5
8
|
readonly onOpen: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { CODE_ANSWER_LINE } from "../copy.js";
|
|
2
|
+
import { CODE_ANSWER_LINE, CODE_FAILED_LINE } from "../copy.js";
|
|
3
3
|
export const CODE_ANSWER_CSS = `
|
|
4
4
|
[data-vibe-menu] .vm-code-answer {
|
|
5
5
|
width: 100%; margin: 0 0 10px; padding: 0; text-align: left;
|
|
@@ -9,7 +9,17 @@ export const CODE_ANSWER_CSS = `
|
|
|
9
9
|
[data-vibe-menu] .vm-code-answer > strong { color: var(--ink); font-weight: 700; }
|
|
10
10
|
[data-vibe-menu] .vm-code-answer-cta { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
|
|
11
11
|
[data-vibe-menu] .vm-code-answer:focus-visible { outline: var(--stroke-focus) solid var(--line-card); outline-offset: 2px; }
|
|
12
|
+
[data-vibe-menu] .vm-code-failed { cursor: default; }
|
|
13
|
+
[data-vibe-menu] .vm-code-failed-retry { margin: 0; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
|
|
14
|
+
[data-vibe-menu] .vm-code-failed-retry:focus-visible { outline: var(--stroke-focus) solid var(--line-card); outline-offset: 2px; }
|
|
12
15
|
`;
|
|
16
|
+
export function CodeFailedLine(props) {
|
|
17
|
+
return (React.createElement("p", { className: "vm-code-answer vm-code-failed", "data-code-failed-line": "", role: "status" },
|
|
18
|
+
React.createElement("strong", null, CODE_FAILED_LINE.text),
|
|
19
|
+
props.onRetry !== undefined ? (React.createElement(React.Fragment, null,
|
|
20
|
+
" ",
|
|
21
|
+
React.createElement("button", { type: "button", className: "vm-code-answer-cta vm-code-failed-retry", onClick: props.onRetry }, CODE_FAILED_LINE.action))) : null));
|
|
22
|
+
}
|
|
13
23
|
export function CodeAnswerLine(props) {
|
|
14
24
|
return (React.createElement("button", { type: "button", className: "vm-code-answer", "data-code-answer-line": "", "aria-label": CODE_ANSWER_LINE.label, onClick: props.onOpen },
|
|
15
25
|
React.createElement("strong", null, CODE_ANSWER_LINE.lead),
|
|
@@ -94,6 +94,8 @@ export interface AccountSlice {
|
|
|
94
94
|
}
|
|
95
95
|
export type CodeAnswerOpenVia = "line" | "tab" | "summary";
|
|
96
96
|
export interface CodeAnswerSlice {
|
|
97
|
+
readonly kind?: "answer" | "failed";
|
|
98
|
+
readonly onRetry?: () => void;
|
|
97
99
|
readonly key: string;
|
|
98
100
|
readonly text: string;
|
|
99
101
|
onOpen(via: CodeAnswerOpenVia): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/base",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.387",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@adviser/cement": "~0.5.37",
|
|
12
12
|
"@emotion/css": "~11.13.5",
|
|
13
|
-
"@vibes.diy/api-types": "14.3.
|
|
14
|
-
"@vibes.diy/use-vibes-types": "14.3.
|
|
15
|
-
"@vibes.diy/vibe-runtime": "14.3.
|
|
16
|
-
"@vibes.diy/vibe-types": "14.3.
|
|
13
|
+
"@vibes.diy/api-types": "14.3.387",
|
|
14
|
+
"@vibes.diy/use-vibes-types": "14.3.387",
|
|
15
|
+
"@vibes.diy/vibe-runtime": "14.3.387",
|
|
16
|
+
"@vibes.diy/vibe-types": "14.3.387",
|
|
17
17
|
"arktype": "~2.2.9",
|
|
18
18
|
"officeparser": "~8.7.1",
|
|
19
19
|
"qrcode-generator": "~2.0.4",
|