@vibes.diy/base 14.3.426 → 14.3.428
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/NotificationDetailView.d.ts +8 -0
- package/components/NotificationDetailView.js +15 -0
- package/components/vibe-menu/cards/CodeCard.d.ts +1 -1
- package/components/vibe-menu/cards/CodeCard.js +6 -1
- package/components/vibe-menu/index.d.ts +1 -0
- package/components/vibe-menu/index.js +1 -0
- package/components/vibe-menu/parts/BuildRouteChoice.d.ts +14 -0
- package/components/vibe-menu/parts/BuildRouteChoice.js +38 -0
- package/components/vibe-menu/slices.d.ts +7 -0
- package/package.json +5 -5
|
@@ -30,6 +30,14 @@ export interface NotificationDetailViewProps {
|
|
|
30
30
|
readonly onApprove: (role: "editor" | "viewer") => void;
|
|
31
31
|
readonly onReject: () => void;
|
|
32
32
|
};
|
|
33
|
+
readonly buildRequest?: {
|
|
34
|
+
readonly requester: string;
|
|
35
|
+
readonly prompt: string;
|
|
36
|
+
readonly state: "pending" | "approved";
|
|
37
|
+
readonly busy: boolean;
|
|
38
|
+
readonly error?: string;
|
|
39
|
+
readonly onApprove: () => void;
|
|
40
|
+
};
|
|
33
41
|
readonly mediaSlot?: React.ReactNode;
|
|
34
42
|
readonly contextLinkSlot?: React.ReactNode;
|
|
35
43
|
}
|
|
@@ -57,6 +57,21 @@ export function NotificationDetailView(props) {
|
|
|
57
57
|
React.createElement("button", { type: "button", "data-testid": "notification-detail-approve-viewer", disabled: props.accessRequest.busy, onClick: () => props.accessRequest?.onApprove("viewer"), className: "rounded-md border border-black/20 px-3 py-1.5 font-semibold disabled:opacity-50 dark:border-white/25", style: { fontSize: 13 } }, "Viewer"),
|
|
58
58
|
React.createElement("button", { type: "button", "data-testid": "notification-detail-reject", disabled: props.accessRequest.busy, onClick: () => props.accessRequest?.onReject(), className: "rounded-md px-3 py-1.5 font-semibold text-red-700 underline disabled:opacity-50 dark:text-red-400", style: { fontSize: 13 } }, "Reject"))),
|
|
59
59
|
props.accessRequest.error !== undefined && props.accessRequest.error !== "" && (React.createElement("p", { "data-testid": "notification-detail-access-error", style: { fontSize: 13, lineHeight: 1.4, margin: 0 } }, props.accessRequest.error)))),
|
|
60
|
+
props.buildRequest !== undefined && (React.createElement("div", { "data-testid": "notification-detail-build", "data-build-state": props.buildRequest.state, className: "flex flex-col gap-2 rounded-md border border-black/10 p-3 dark:border-white/10" },
|
|
61
|
+
React.createElement("p", { className: "text-light-primary dark:text-dark-primary", style: { fontSize: 14, fontWeight: 600, margin: 0 } }, props.buildRequest.state === "pending" ? (React.createElement(React.Fragment, null,
|
|
62
|
+
"@",
|
|
63
|
+
props.buildRequest.requester,
|
|
64
|
+
" wants to build this here")) : (React.createElement(React.Fragment, null,
|
|
65
|
+
"@",
|
|
66
|
+
props.buildRequest.requester,
|
|
67
|
+
" can build here now"))),
|
|
68
|
+
React.createElement("blockquote", { "data-testid": "notification-detail-build-prompt", className: "border-l-2 border-black/20 pl-2 dark:border-white/25", style: { fontSize: 13, lineHeight: 1.4, margin: 0, whiteSpace: "pre-wrap" } }, props.buildRequest.prompt),
|
|
69
|
+
props.buildRequest.state === "pending" && (React.createElement("div", { className: "flex flex-wrap items-center", style: { gap: 8 } },
|
|
70
|
+
React.createElement("button", { type: "button", "data-testid": "notification-detail-approve-build", disabled: props.buildRequest.busy, onClick: () => props.buildRequest?.onApprove(), className: "rounded-md bg-black px-3 py-1.5 font-semibold text-white disabled:opacity-50 dark:bg-white dark:text-black", style: { fontSize: 13 } },
|
|
71
|
+
"Let @",
|
|
72
|
+
props.buildRequest.requester,
|
|
73
|
+
" build it"))),
|
|
74
|
+
props.buildRequest.error !== undefined && props.buildRequest.error !== "" && (React.createElement("p", { "data-testid": "notification-detail-build-error", style: { fontSize: 13, lineHeight: 1.4, margin: 0 } }, props.buildRequest.error)))),
|
|
60
75
|
props.mediaSlot !== undefined && React.createElement("div", { "data-testid": "notification-detail-media" }, props.mediaSlot),
|
|
61
76
|
(props.appLinkSlot !== undefined || props.contextLinkSlot !== undefined) && (React.createElement("div", { "data-testid": "notification-detail-app-link", className: "flex flex-wrap items-center text-light-primary dark:text-dark-primary", style: { gap: 16 } },
|
|
62
77
|
props.appLinkSlot,
|
|
@@ -6,7 +6,7 @@ export declare const CODE_DRILL_TITLES: Readonly<{
|
|
|
6
6
|
readonly details: "App details";
|
|
7
7
|
readonly help: "Help";
|
|
8
8
|
}>;
|
|
9
|
-
export declare const CODE_CARD_CSS = "\n[data-vibe-menu] .vm-prompt-request { margin: 0 0 var(--space-14); font: 400 16px/1.3 var(--font-display); color: var(--ink); overflow-wrap: anywhere; }\n/* The first build's request (PromptRequest, #7660) clamps to three lines so the\n status and expected-time bar stay on the first phone screen; \"Show all\" opens it. */\n[data-vibe-menu] .vm-prompt-request.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n[data-vibe-menu] .vm-prompt-more { display: block; margin: calc(var(--space-12) * -1) 0 var(--space-14); padding: 0; font: 700 12px/1.6 var(--font-tab); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); cursor: pointer; }\n[data-vibe-menu] .vm-prompt-more:hover { color: var(--ink); }\n[data-vibe-menu] .vm-prompt-files { display: grid; gap: var(--space-12); margin-top: var(--space-16); }\n[data-vibe-menu] .vm-prompt-attached { margin-top: var(--space-2); font: 400 13px/1.4 var(--font-display); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n[data-vibe-menu] .vm-prompt-detail { font: 400 13px/1.4 var(--font-display); color: var(--muted); margin: var(--space-12) 0; overflow-wrap: anywhere; }\n[data-vibe-menu] .vm-prompt .vm-prompt-stop { flex: none; width: auto; height: 28px; margin-top: 0; }\n[data-vibe-menu] .vm-prompt-status { display: flex; align-items: center; gap: var(--space-12); border-top: var(--stroke-rule) solid var(--line-card); padding-top: var(--space-16); margin-bottom: var(--space-16); font: 400 14px/1.4 var(--font-display); color: var(--muted); }\n[data-vibe-menu] .vm-code .vm-moments { margin-bottom: var(--space-14); }\n/* The guest's Keep this app line (#7789): one quiet line in the card's flow\n above the composer, its button an inline text link. */\n[data-vibe-menu] .vm-keep-app { margin: 0 0 var(--space-12); line-height: 1.4; }\n[data-vibe-menu] .vm-keep-app > strong { color: var(--ink); font-weight: 700; }\n[data-vibe-menu] .vm-guest-build { margin: var(--space-8) 0 var(--space-12); line-height: 1.4; }\n[data-vibe-menu] .vm-guest-build > strong { color: var(--ink); font-weight: 700; }\n/* A guest's first build (#9462): the note and the build ask that later takes its\n place share one grid cell, the note kept as an invisible spacer under the ask,\n so the slot is always the taller of the two and the swap moves no line above it. */\n[data-vibe-menu] .vm-guest-slot { display: grid; }\n[data-vibe-menu] .vm-guest-slot > * { grid-area: 1 / 1; }\n/* An account's first build (#9641): the build ask's own room, held the same way. */\n[data-vibe-menu] .vm-ask-slot { display: grid; }\n[data-vibe-menu] .vm-ask-slot > * { grid-area: 1 / 1; }\n[data-vibe-menu] .vm-ask-foot { align-items: end; }\n[data-vibe-menu] .vm-keep-app-cta { display: inline; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }\n/* The owner's check row (#9245): a muted line with a glyph, its button an inline\n text link kept on one line with its separator. */\n[data-vibe-menu] .vm-check { margin: 0 0 var(--space-14); }\n[data-vibe-menu] p.vm-check-row { display: flex; align-items: center; margin: 0; min-width: 0; white-space: nowrap; font: 400 14px/1.4 var(--font-display); color: var(--muted); }\n[data-vibe-menu] p.vm-check-row .vm-glyph { display: inline-block; flex: none; width: 14px; height: 14px; margin-right: var(--space-8); }\n[data-vibe-menu] .vm-check strong { color: var(--ink); font-weight: 700; }\n[data-vibe-menu] .vm-check.is-clear p.vm-check-row .vm-glyph { color: var(--ink); }\n/* One line at rest: the verdict gives way (ellipsis) before the button ever wraps. */\n[data-vibe-menu] .vm-check-sum { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n[data-vibe-menu] button.vm-check-toggle { padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; background: none; border: 0; }\n[data-vibe-menu] .vm-check-act-wrap { flex: none; white-space: nowrap; }\n[data-vibe-menu] button.vm-check-act { display: inline; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; background: none; border: 0; }\n[data-vibe-menu] .vm-check-detail { margin: var(--space-6) 0 0 calc(14px + var(--space-8)); font: 400 13px/1.45 var(--font-display); color: var(--muted); }\n[data-vibe-menu] .vm-check-detail ul { margin: 0; padding: 0; list-style: none; }\n[data-vibe-menu] .vm-check-detail li { overflow-wrap: anywhere; }\n[data-vibe-menu] p.vm-check-covers { margin: var(--space-6) 0 0; }\n[data-vibe-menu] p.vm-check-row[aria-busy=\"true\"] .vm-glyph { animation: vm-check-spin 1.4s linear infinite; }\n@keyframes vm-check-spin { to { transform: rotate(360deg); } }\n@media (prefers-reduced-motion: reduce) { [data-vibe-menu] p.vm-check-row[aria-busy=\"true\"] .vm-glyph { animation: none; } }\n[data-vibe-menu] .vm-code .vm-suggestions { margin-bottom: var(--space-14); }\n[data-vibe-menu] .vm-codemode { display: flex; flex-direction: column; flex: 0 0 auto; min-height: 0; }\n[data-vibe-menu] .vm-codemode[data-fill] { flex: 1 1 auto; }\n/* The pinned top (kicker, composer, moment) keeps to half the Code mode card\n (80cqh) and scrolls on its own past that, so on a short frame (phone\n landscape) a multi-line composer stays reachable and the tab strip stays in\n the card. At normal sizes it never reaches the cap: only the tab body scrolls. */\n[data-vibe-menu] .vm-codemode-top { flex: none; max-height: 40cqh; overflow-y: auto; overscroll-behavior: contain; }\n[data-vibe-menu] .vm-codemode .vm-composer,\n[data-vibe-menu] .vm-codemode .vm-moments { margin-bottom: 10px; }\n\n/* The build ask (#8951): the agent's one question under the first build's live\n line, in the live line's own type. The card's composer below takes the answer;\n nothing is focused until a tap, so the keyboard stays closed while the first\n look plays. */\n[data-vibe-menu] .vm-build-ask { display: flex; align-items: flex-start; gap: var(--space-8); margin: var(--space-8) 0 var(--space-10); }\n[data-vibe-menu] .vm-build-ask-q { flex: 1; min-width: 0; margin: 0; padding: 0; text-align: left; font: 400 16px/1.3 var(--font-display); color: var(--ink); text-wrap: pretty; cursor: text; }\n[data-vibe-menu] .vm-build-ask-x { flex: none; width: 28px; height: 28px; padding: 0; font: 400 18px/1 var(--font-tab); color: var(--muted); cursor: pointer; }\n";
|
|
9
|
+
export declare const CODE_CARD_CSS = "\n[data-vibe-menu] .vm-prompt-request { margin: 0 0 var(--space-14); font: 400 16px/1.3 var(--font-display); color: var(--ink); overflow-wrap: anywhere; }\n/* The first build's request (PromptRequest, #7660) clamps to three lines so the\n status and expected-time bar stay on the first phone screen; \"Show all\" opens it. */\n[data-vibe-menu] .vm-prompt-request.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n[data-vibe-menu] .vm-prompt-more { display: block; margin: calc(var(--space-12) * -1) 0 var(--space-14); padding: 0; font: 700 12px/1.6 var(--font-tab); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); cursor: pointer; }\n[data-vibe-menu] .vm-prompt-more:hover { color: var(--ink); }\n[data-vibe-menu] .vm-prompt-files { display: grid; gap: var(--space-12); margin-top: var(--space-16); }\n[data-vibe-menu] .vm-prompt-attached { margin-top: var(--space-2); font: 400 13px/1.4 var(--font-display); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n[data-vibe-menu] .vm-prompt-detail { font: 400 13px/1.4 var(--font-display); color: var(--muted); margin: var(--space-12) 0; overflow-wrap: anywhere; }\n[data-vibe-menu] .vm-prompt .vm-prompt-stop { flex: none; width: auto; height: 28px; margin-top: 0; }\n[data-vibe-menu] .vm-prompt-status { display: flex; align-items: center; gap: var(--space-12); border-top: var(--stroke-rule) solid var(--line-card); padding-top: var(--space-16); margin-bottom: var(--space-16); font: 400 14px/1.4 var(--font-display); color: var(--muted); }\n[data-vibe-menu] .vm-code .vm-moments { margin-bottom: var(--space-14); }\n/* The guest's Keep this app line (#7789): one quiet line in the card's flow\n above the composer, its button an inline text link. */\n[data-vibe-menu] .vm-keep-app { margin: 0 0 var(--space-12); line-height: 1.4; }\n[data-vibe-menu] .vm-keep-app > strong { color: var(--ink); font-weight: 700; }\n[data-vibe-menu] .vm-guest-build { margin: var(--space-8) 0 var(--space-12); line-height: 1.4; }\n[data-vibe-menu] .vm-guest-build > strong { color: var(--ink); font-weight: 700; }\n/* A guest's first build (#9462): the note and the build ask that later takes its\n place share one grid cell, the note kept as an invisible spacer under the ask,\n so the slot is always the taller of the two and the swap moves no line above it. */\n[data-vibe-menu] .vm-guest-slot { display: grid; }\n[data-vibe-menu] .vm-guest-slot > * { grid-area: 1 / 1; }\n/* An account's first build (#9641): the build ask's own room, held the same way. */\n[data-vibe-menu] .vm-ask-slot { display: grid; }\n[data-vibe-menu] .vm-ask-slot > * { grid-area: 1 / 1; }\n[data-vibe-menu] .vm-ask-foot { align-items: end; }\n[data-vibe-menu] .vm-keep-app-cta { display: inline; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }\n/* The owner's check row (#9245): a muted line with a glyph, its button an inline\n text link kept on one line with its separator. */\n[data-vibe-menu] .vm-check { margin: 0 0 var(--space-14); }\n[data-vibe-menu] p.vm-check-row { display: flex; align-items: center; margin: 0; min-width: 0; white-space: nowrap; font: 400 14px/1.4 var(--font-display); color: var(--muted); }\n[data-vibe-menu] p.vm-check-row .vm-glyph { display: inline-block; flex: none; width: 14px; height: 14px; margin-right: var(--space-8); }\n[data-vibe-menu] .vm-check strong { color: var(--ink); font-weight: 700; }\n[data-vibe-menu] .vm-check.is-clear p.vm-check-row .vm-glyph { color: var(--ink); }\n/* One line at rest: the verdict gives way (ellipsis) before the button ever wraps. */\n[data-vibe-menu] .vm-check-sum { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n[data-vibe-menu] button.vm-check-toggle { padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; background: none; border: 0; }\n[data-vibe-menu] .vm-check-act-wrap { flex: none; white-space: nowrap; }\n[data-vibe-menu] button.vm-check-act { display: inline; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; background: none; border: 0; }\n[data-vibe-menu] .vm-check-detail { margin: var(--space-6) 0 0 calc(14px + var(--space-8)); font: 400 13px/1.45 var(--font-display); color: var(--muted); }\n[data-vibe-menu] .vm-check-detail ul { margin: 0; padding: 0; list-style: none; }\n[data-vibe-menu] .vm-check-detail li { overflow-wrap: anywhere; }\n[data-vibe-menu] p.vm-check-covers { margin: var(--space-6) 0 0; }\n[data-vibe-menu] p.vm-check-row[aria-busy=\"true\"] .vm-glyph { animation: vm-check-spin 1.4s linear infinite; }\n@keyframes vm-check-spin { to { transform: rotate(360deg); } }\n@media (prefers-reduced-motion: reduce) { [data-vibe-menu] p.vm-check-row[aria-busy=\"true\"] .vm-glyph { animation: none; } }\n[data-vibe-menu] .vm-code .vm-suggestions { margin-bottom: var(--space-14); }\n[data-vibe-menu] .vm-codemode { display: flex; flex-direction: column; flex: 0 0 auto; min-height: 0; }\n[data-vibe-menu] .vm-codemode[data-fill] { flex: 1 1 auto; }\n/* The pinned top (kicker, composer, moment) keeps to half the Code mode card\n (80cqh) and scrolls on its own past that, so on a short frame (phone\n landscape) a multi-line composer stays reachable and the tab strip stays in\n the card. At normal sizes it never reaches the cap: only the tab body scrolls. */\n[data-vibe-menu] .vm-codemode-top { flex: none; max-height: 40cqh; overflow-y: auto; overscroll-behavior: contain; }\n[data-vibe-menu] .vm-codemode .vm-composer,\n[data-vibe-menu] .vm-codemode .vm-moments { margin-bottom: 10px; }\n\n/* The build ask (#8951): the agent's one question under the first build's live\n line, in the live line's own type. The card's composer below takes the answer;\n nothing is focused until a tap, so the keyboard stays closed while the first\n look plays. */\n[data-vibe-menu] .vm-build-ask { display: flex; align-items: flex-start; gap: var(--space-8); margin: var(--space-8) 0 var(--space-10); }\n[data-vibe-menu] .vm-build-ask-q { flex: 1; min-width: 0; margin: 0; padding: 0; text-align: left; font: 400 16px/1.3 var(--font-display); color: var(--ink); text-wrap: pretty; cursor: text; }\n[data-vibe-menu] .vm-build-ask-x { flex: none; width: 28px; height: 28px; padding: 0; font: 400 18px/1 var(--font-tab); color: var(--muted); cursor: pointer; }\n\n\n/* Ask to build (#10629): two stacked choices in the card's flow above the\n composer, each a word and what it gets you, with a quiet dismiss. The\n composer keeps the typed words underneath until one is picked. */\n[data-vibe-menu] .vm-build-route { display: grid; gap: var(--space-8); margin: 0 0 var(--space-12); }\n[data-vibe-menu] .vm-build-route-head { display: flex; align-items: center; justify-content: flex-end; }\n[data-vibe-menu] button.vm-build-route-opt { display: grid; gap: var(--space-2); width: 100%; padding: var(--space-10) var(--space-12); text-align: left; cursor: pointer; background: none; border: var(--stroke-rule) solid var(--line-card); border-radius: var(--radius-moment); color: var(--ink); }\n[data-vibe-menu] button.vm-build-route-opt:hover { border-color: var(--ink); }\n[data-vibe-menu] .vm-build-route-label { font: 700 15px/1.3 var(--font-display); }\n[data-vibe-menu] .vm-build-route-sub { font: 400 13px/1.35 var(--font-display); color: var(--muted); }\n[data-vibe-menu] button.vm-build-route-x { padding: 0; font: 400 13px/1 var(--font-display); color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; background: none; border: 0; }\n";
|
|
10
10
|
export declare const CODE_SUMMARY_LINE_CSS = "\n[data-vibe-menu] .vm-code.vm-ctab .vm-moment.is-summary > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n";
|
|
11
11
|
export interface CodeCardProps {
|
|
12
12
|
readonly viewer: ViewerSlice;
|
|
@@ -9,6 +9,7 @@ import { Suggestions } from "../parts/Chip.js";
|
|
|
9
9
|
import { Composer, latestStopArm } from "../parts/Composer.js";
|
|
10
10
|
import { DoneButton } from "../parts/DoneButton.js";
|
|
11
11
|
import { KeepAppLine } from "../parts/KeepAppLine.js";
|
|
12
|
+
import { BUILD_ROUTE_CHOICE_CSS, BuildRouteChoice } from "../parts/BuildRouteChoice.js";
|
|
12
13
|
import { CheckRowLine } from "../parts/CheckRowLine.js";
|
|
13
14
|
import { BUILD_ASK_LINE_CSS, BuildAskLine, BuildAskRoom } from "../parts/BuildAskLine.js";
|
|
14
15
|
import { AgentLog, MomentLine } from "../parts/MomentLine.js";
|
|
@@ -81,7 +82,8 @@ export const CODE_CARD_CSS = `
|
|
|
81
82
|
[data-vibe-menu] .vm-codemode-top { flex: none; max-height: 40cqh; overflow-y: auto; overscroll-behavior: contain; }
|
|
82
83
|
[data-vibe-menu] .vm-codemode .vm-composer,
|
|
83
84
|
[data-vibe-menu] .vm-codemode .vm-moments { margin-bottom: 10px; }
|
|
84
|
-
${BUILD_ASK_LINE_CSS}
|
|
85
|
+
${BUILD_ASK_LINE_CSS}
|
|
86
|
+
${BUILD_ROUTE_CHOICE_CSS}`;
|
|
85
87
|
export const CODE_SUMMARY_LINE_CSS = `
|
|
86
88
|
[data-vibe-menu] .vm-code.vm-ctab .vm-moment.is-summary > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
87
89
|
`;
|
|
@@ -183,6 +185,7 @@ export function CodeCard(props) {
|
|
|
183
185
|
React.createElement(PromptRequest, { text: request }))) : null;
|
|
184
186
|
const composerNode = React.createElement(Composer, { composer: composer, draft: draft, placeholder: placeholder, fieldRef: composerField });
|
|
185
187
|
const keepAppNode = code.keepApp !== undefined && code.keepApp !== null ? (React.createElement(KeepAppLine, { keepApp: code.keepApp, visible: props.open === true })) : null;
|
|
188
|
+
const buildRouteNode = code.buildRoute !== undefined && code.buildRoute !== null ? (React.createElement(BuildRouteChoice, { route: code.buildRoute, visible: props.open === true })) : null;
|
|
186
189
|
const checkRow = editor ? (code.checkRow ?? null) : null;
|
|
187
190
|
const checkRowNode = checkRow !== null ? React.createElement(CheckRowLine, { check: checkRow, visible: props.open === true }) : null;
|
|
188
191
|
const buildAsk = editor ? (code.buildAsk ?? null) : null;
|
|
@@ -348,6 +351,7 @@ export function CodeCard(props) {
|
|
|
348
351
|
const top = (React.createElement(React.Fragment, null,
|
|
349
352
|
kickerNode,
|
|
350
353
|
keepAppNode,
|
|
354
|
+
buildRouteNode,
|
|
351
355
|
composerNode,
|
|
352
356
|
props.chipRow ?? null,
|
|
353
357
|
hasMoment ? React.createElement(MomentLine, { moment: moment, log: log, onAction: code.onMomentAction, onLiveTap: code.onLiveLineTap }) : null,
|
|
@@ -429,6 +433,7 @@ export function CodeCard(props) {
|
|
|
429
433
|
askSlot,
|
|
430
434
|
saveRow,
|
|
431
435
|
showComposer ? keepAppNode : null,
|
|
436
|
+
buildRouteNode,
|
|
432
437
|
checkRowNode !== null && showComposer && firstBuild === false ? checkRowNode : null,
|
|
433
438
|
React.createElement("div", { className: "vm-ctab-foot" },
|
|
434
439
|
mainAction,
|
|
@@ -31,6 +31,7 @@ export * from "./parts/GrantControls.js";
|
|
|
31
31
|
export * from "./parts/MemberRow.js";
|
|
32
32
|
export * from "./parts/SaveAskLine.js";
|
|
33
33
|
export * from "./parts/KeepAppLine.js";
|
|
34
|
+
export * from "./parts/BuildRouteChoice.js";
|
|
34
35
|
export * from "./parts/CheckRowLine.js";
|
|
35
36
|
export * from "./parts/BuildAskLine.js";
|
|
36
37
|
export * from "./shell/shell.styles.js";
|
|
@@ -31,6 +31,7 @@ export * from "./parts/GrantControls.js";
|
|
|
31
31
|
export * from "./parts/MemberRow.js";
|
|
32
32
|
export * from "./parts/SaveAskLine.js";
|
|
33
33
|
export * from "./parts/KeepAppLine.js";
|
|
34
|
+
export * from "./parts/BuildRouteChoice.js";
|
|
34
35
|
export * from "./parts/CheckRowLine.js";
|
|
35
36
|
export * from "./parts/BuildAskLine.js";
|
|
36
37
|
export * from "./shell/shell.styles.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { BuildRouteSlice } from "../slices.js";
|
|
3
|
+
export declare const BUILD_ROUTE_COPY: Readonly<{
|
|
4
|
+
readonly ask: (owner: string) => string;
|
|
5
|
+
readonly askSub: "When they say yes, you build it right in this app.";
|
|
6
|
+
readonly copy: "Make my own copy";
|
|
7
|
+
readonly copySub: "Your own edition, ready now.";
|
|
8
|
+
readonly dismiss: "Not now";
|
|
9
|
+
}>;
|
|
10
|
+
export declare const BUILD_ROUTE_CHOICE_CSS = "\n/* Ask to build (#10629): two stacked choices in the card's flow above the\n composer, each a word and what it gets you, with a quiet dismiss. The\n composer keeps the typed words underneath until one is picked. */\n[data-vibe-menu] .vm-build-route { display: grid; gap: var(--space-8); margin: 0 0 var(--space-12); }\n[data-vibe-menu] .vm-build-route-head { display: flex; align-items: center; justify-content: flex-end; }\n[data-vibe-menu] button.vm-build-route-opt { display: grid; gap: var(--space-2); width: 100%; padding: var(--space-10) var(--space-12); text-align: left; cursor: pointer; background: none; border: var(--stroke-rule) solid var(--line-card); border-radius: var(--radius-moment); color: var(--ink); }\n[data-vibe-menu] button.vm-build-route-opt:hover { border-color: var(--ink); }\n[data-vibe-menu] .vm-build-route-label { font: 700 15px/1.3 var(--font-display); }\n[data-vibe-menu] .vm-build-route-sub { font: 400 13px/1.35 var(--font-display); color: var(--muted); }\n[data-vibe-menu] button.vm-build-route-x { padding: 0; font: 400 13px/1 var(--font-display); color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; background: none; border: 0; }\n";
|
|
11
|
+
export declare function BuildRouteChoice(props: {
|
|
12
|
+
readonly route: BuildRouteSlice;
|
|
13
|
+
readonly visible: boolean;
|
|
14
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export const BUILD_ROUTE_COPY = Object.freeze({
|
|
3
|
+
ask: (owner) => `Ask @${owner} to build it here`,
|
|
4
|
+
askSub: "When they say yes, you build it right in this app.",
|
|
5
|
+
copy: "Make my own copy",
|
|
6
|
+
copySub: "Your own edition, ready now.",
|
|
7
|
+
dismiss: "Not now",
|
|
8
|
+
});
|
|
9
|
+
export const BUILD_ROUTE_CHOICE_CSS = `
|
|
10
|
+
/* Ask to build (#10629): two stacked choices in the card's flow above the
|
|
11
|
+
composer, each a word and what it gets you, with a quiet dismiss. The
|
|
12
|
+
composer keeps the typed words underneath until one is picked. */
|
|
13
|
+
[data-vibe-menu] .vm-build-route { display: grid; gap: var(--space-8); margin: 0 0 var(--space-12); }
|
|
14
|
+
[data-vibe-menu] .vm-build-route-head { display: flex; align-items: center; justify-content: flex-end; }
|
|
15
|
+
[data-vibe-menu] button.vm-build-route-opt { display: grid; gap: var(--space-2); width: 100%; padding: var(--space-10) var(--space-12); text-align: left; cursor: pointer; background: none; border: var(--stroke-rule) solid var(--line-card); border-radius: var(--radius-moment); color: var(--ink); }
|
|
16
|
+
[data-vibe-menu] button.vm-build-route-opt:hover { border-color: var(--ink); }
|
|
17
|
+
[data-vibe-menu] .vm-build-route-label { font: 700 15px/1.3 var(--font-display); }
|
|
18
|
+
[data-vibe-menu] .vm-build-route-sub { font: 400 13px/1.35 var(--font-display); color: var(--muted); }
|
|
19
|
+
[data-vibe-menu] button.vm-build-route-x { padding: 0; font: 400 13px/1 var(--font-display); color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; background: none; border: 0; }
|
|
20
|
+
`;
|
|
21
|
+
export function BuildRouteChoice(props) {
|
|
22
|
+
const onShownRef = React.useRef(props.route.onShown);
|
|
23
|
+
onShownRef.current = props.route.onShown;
|
|
24
|
+
React.useEffect(() => {
|
|
25
|
+
if (props.visible)
|
|
26
|
+
onShownRef.current?.();
|
|
27
|
+
}, [props.visible]);
|
|
28
|
+
const { route } = props;
|
|
29
|
+
return (React.createElement("div", { className: "vm-build-route", role: "group", "aria-label": "Where to build it", "data-build-route-choice": "" },
|
|
30
|
+
React.createElement("button", { type: "button", className: "vm-build-route-opt", "data-build-route": "ask", onClick: () => route.onChoose("ask") },
|
|
31
|
+
React.createElement("span", { className: "vm-build-route-label" }, BUILD_ROUTE_COPY.ask(route.owner)),
|
|
32
|
+
React.createElement("span", { className: "vm-build-route-sub" }, BUILD_ROUTE_COPY.askSub)),
|
|
33
|
+
React.createElement("button", { type: "button", className: "vm-build-route-opt", "data-build-route": "copy", onClick: () => route.onChoose("copy") },
|
|
34
|
+
React.createElement("span", { className: "vm-build-route-label" }, BUILD_ROUTE_COPY.copy),
|
|
35
|
+
React.createElement("span", { className: "vm-build-route-sub" }, BUILD_ROUTE_COPY.copySub)),
|
|
36
|
+
React.createElement("div", { className: "vm-build-route-head" },
|
|
37
|
+
React.createElement("button", { type: "button", className: "vm-build-route-x", onClick: route.onDismiss }, BUILD_ROUTE_COPY.dismiss))));
|
|
38
|
+
}
|
|
@@ -138,6 +138,7 @@ export interface CodeSlice {
|
|
|
138
138
|
};
|
|
139
139
|
readonly editText?: EditTextSlice | null;
|
|
140
140
|
readonly keepApp?: KeepAppSlice | null;
|
|
141
|
+
readonly buildRoute?: BuildRouteSlice | null;
|
|
141
142
|
readonly checkRow?: CheckRowSlice | null;
|
|
142
143
|
readonly buildAsk?: BuildAskSlice | null;
|
|
143
144
|
readonly guestBuild?: boolean;
|
|
@@ -310,6 +311,12 @@ export interface BuildAskSlice {
|
|
|
310
311
|
onDismiss(): void;
|
|
311
312
|
onShown?(): void;
|
|
312
313
|
}
|
|
314
|
+
export interface BuildRouteSlice {
|
|
315
|
+
readonly owner: string;
|
|
316
|
+
onChoose(route: "ask" | "copy"): void;
|
|
317
|
+
onDismiss(): void;
|
|
318
|
+
onShown?(): void;
|
|
319
|
+
}
|
|
313
320
|
export interface KeepAppSlice {
|
|
314
321
|
onCreateAccount(): void;
|
|
315
322
|
onShown?(): 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.428",
|
|
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.428",
|
|
14
|
+
"@vibes.diy/use-vibes-types": "14.3.428",
|
|
15
|
+
"@vibes.diy/vibe-runtime": "14.3.428",
|
|
16
|
+
"@vibes.diy/vibe-types": "14.3.428",
|
|
17
17
|
"arktype": "~2.2.9",
|
|
18
18
|
"officeparser": "~8.8.0",
|
|
19
19
|
"qrcode-generator": "~2.0.4",
|