@vibes.diy/base 14.3.370 → 14.3.372

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.
@@ -97,7 +97,7 @@ export function idbHeldAttachments(opts = {}) {
97
97
  const token = readToken(appKey, false) ?? crypto.randomUUID();
98
98
  return exception2Result(() => sessionStorage.setItem(TOKEN_KEY + appKey, token)).isOk() ? token : undefined;
99
99
  }
100
- async function writeRow(appKey, gen, token, payloads) {
100
+ async function writeRow({ appKey, gen, token, payloads, }) {
101
101
  const files = await Promise.all(payloads.map(toRow));
102
102
  const db = await open();
103
103
  if (generations.get(appKey) !== gen)
@@ -148,7 +148,7 @@ export function idbHeldAttachments(opts = {}) {
148
148
  const token = mintToken(appKey);
149
149
  if (token === undefined)
150
150
  return;
151
- await exception2Result(() => writeRow(appKey, gen, token, payloads));
151
+ await exception2Result(() => writeRow({ appKey, gen, token, payloads }));
152
152
  },
153
153
  drop,
154
154
  async peek(appKey) {
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import type { BuildPhase } from "@vibes.diy/api-types";
3
3
  import { type HomeBuildDockHeader } from "./homeBuildDockCopy.js";
4
- export type HomeBuildChipStatus = "starting" | "planning" | "building" | "queued" | "needs-you" | "ready" | "continue" | "failed" | "add-credits" | "sign-in" | "saved";
4
+ export type HomeBuildChipStatus = "starting" | "planning" | "building" | "queued" | "needs-you" | "ready" | "continue" | "failed" | "add-credits" | "sign-in" | "saved" | "stopped";
5
5
  export interface HomeBuildChip {
6
6
  readonly id: string;
7
7
  readonly title: string;
@@ -19,6 +19,7 @@ export const HOME_BUILD_CHIP_LABELS = {
19
19
  "add-credits": "Add credits",
20
20
  "sign-in": "Sign in",
21
21
  saved: "Open app",
22
+ stopped: "Start again",
22
23
  };
23
24
  const OPENABLE_STATUSES = ["ready", "saved", "continue"];
24
25
  const RUNNING_STATUSES = ["starting", "planning", "building", "queued"];
@@ -59,6 +60,8 @@ export function homeBuildChipStatus(phase, opts = {}) {
59
60
  return opts.guest === true ? "sign-in" : "add-credits";
60
61
  case "seen":
61
62
  return "saved";
63
+ case "stopped":
64
+ return "stopped";
62
65
  }
63
66
  }
64
67
  const css = `
@@ -78,4 +78,5 @@ export interface LookSelectorView {
78
78
  export declare function movedByControl(index: number, pinned: readonly [boolean, boolean, boolean]): number[];
79
79
  export declare const ROOM_ACCENT_INDEX = 3;
80
80
  export declare function movedByRoomDial(index: number, accentLocked?: boolean): number[];
81
+ export declare const STYLE_DRAFT_NOTE = "These picks are yours to try. Publish style to share them with everyone.";
81
82
  export declare function StyleControls(props: StyleControlsProps): React.JSX.Element;
@@ -113,6 +113,7 @@ function Section({ label, aside, testId, children, }) {
113
113
  aside),
114
114
  children));
115
115
  }
116
+ export const STYLE_DRAFT_NOTE = "These picks are yours to try. Publish style to share them with everyone.";
116
117
  function PublishBar({ publish }) {
117
118
  const isStyleDraft = publish.status === "draft";
118
119
  const busy = publish.busy === true;
@@ -122,6 +123,7 @@ function PublishBar({ publish }) {
122
123
  React.createElement("span", { "aria-hidden": "true" }, "\u2713 "),
123
124
  "Published"))),
124
125
  React.createElement("button", { type: "button", "data-testid": "style-revert", onClick: publish.onRevert, disabled: busy || isStyleDraft === false, title: "Discard your unpublished style changes and restore the published style", className: "style-revert-action" }, "Revert to saved")),
126
+ isStyleDraft && publish.error === undefined ? (React.createElement("p", { "data-testid": "style-publish-note", className: "style-publish-note" }, STYLE_DRAFT_NOTE)) : null,
125
127
  publish.error === undefined ? null : (React.createElement("p", { "data-testid": "style-publish-error", "data-op": publish.error.op, role: "alert", className: "text-[11px] text-red-600 dark:text-red-400" }, styleActionErrorText(publish.error)))));
126
128
  }
127
129
  const STYLE_CONTROLS_CSS = `
@@ -163,6 +165,7 @@ const STYLE_CONTROLS_CSS = `
163
165
  .style-controls .style-mosaic-lock { all:unset; position:absolute; right:2px; bottom:2px; display:flex; padding:5px; border-radius:6px; color:#1a1a1a; opacity:.75; cursor:pointer; }
164
166
  .style-controls .style-mosaic-lock:focus-visible { outline:2px solid #60a5fa; opacity:1; }
165
167
  .style-controls .style-room-caption { margin:0; font-size:12px; color:var(--muted, #6b7280); }
168
+ .style-controls .style-publish-note { margin:0; font-size:12px; line-height:1.4; color:var(--muted, #6b7280); }
166
169
  .style-controls .style-preset-mosaics { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; }
167
170
  .style-controls .style-preset-mosaic { all:unset; cursor:pointer; border-radius:8px; }
168
171
  .style-controls .style-preset-mosaic .style-mosaic { border-radius:7px; }
@@ -172,13 +175,16 @@ const STYLE_CONTROLS_CSS = `
172
175
  .style-controls { --style-hue-ground:#202b39; --style-holder:rgba(63,84,109,.38); --style-holder-border:rgba(149,174,202,.32); --style-color-ground:rgba(20,28,39,.25); --style-axis:#c3d1e0; --style-guide:#788ba1; color:#e5e7eb; }
173
176
  .style-controls .style-published { color:#c3dfce; background:rgba(40,65,52,.65); border-color:#526f5e; }
174
177
  .style-controls select { color-scheme:dark; }
178
+ .style-controls .style-publish-note { color:var(--muted, #9ca3af); }
175
179
  }
176
180
  :is(.dark,.dark-frame) .style-controls { --style-hue-ground:#202b39; --style-holder:rgba(63,84,109,.38); --style-holder-border:rgba(149,174,202,.32); --style-color-ground:rgba(20,28,39,.25); --style-axis:#c3d1e0; --style-guide:#788ba1; color:#e5e7eb; }
177
181
  :is(.dark,.dark-frame) .style-controls .style-published { color:#c3dfce; background:rgba(40,65,52,.65); border-color:#526f5e; }
178
182
  :is(.dark,.dark-frame) .style-controls select { color-scheme:dark; }
183
+ :is(.dark,.dark-frame) .style-controls .style-publish-note { color:var(--muted, #9ca3af); }
179
184
  .light-frame .style-controls { --style-hue-ground:#fff; --style-holder:rgba(220,234,247,.58); --style-holder-border:rgba(122,153,180,.3); --style-color-ground:rgba(255,255,255,.32); --style-axis:#475569; --style-guide:#8797a7; color:#333; }
180
185
  .light-frame .style-controls .style-published { color:#435c4d; background:rgba(235,242,237,.78); border-color:#b3c5ba; }
181
186
  .light-frame .style-controls select { color-scheme:light; }
187
+ .light-frame .style-controls .style-publish-note { color:var(--muted, #6b7280); }
182
188
  `;
183
189
  const STYLE_CONTROLS_MENU_CSS = `
184
190
  [data-vibe-menu] .style-controls { --style-hue-card: transparent; --style-move-ring: var(--line); --style-holder: transparent; --style-holder-border: var(--line-hairline); --style-color-ground: transparent; --style-axis: var(--muted); --style-guide: var(--line-hairline); color: var(--ink); font-family: var(--font-display); }
@@ -28,7 +28,13 @@ export function VibesButton({ variant = "blue", children, onHover, onUnhover, ic
28
28
  }
29
29
  }, [isHovered, onHover, onUnhover]);
30
30
  const IconComponent = icon ? iconMap[icon] : undefined;
31
- const baseStyle = VibesButtonStyles.getButtonStyle(buttonVariant, isHovered, isActive, isMobile, !!IconComponent);
31
+ const baseStyle = VibesButtonStyles.getButtonStyle({
32
+ variant: buttonVariant,
33
+ isHovered,
34
+ isActive,
35
+ isMobile,
36
+ hasIcon: !!IconComponent,
37
+ });
32
38
  const mergedStyle = VibesButtonStyles.getMergedButtonStyle(baseStyle, ignoreDarkMode, customStyle);
33
39
  const iconContainerStyle = VibesButtonStyles.getIconContainerStyle(buttonVariant, isMobile, !!IconComponent);
34
40
  const iconStyle = VibesButtonStyles.getIconStyle(isMobile, isHovered, isActive);
@@ -12,7 +12,13 @@ export declare const VibesButtonStyles: {
12
12
  minHeight?: string;
13
13
  };
14
14
  getPadding(isMobile: boolean): string;
15
- getButtonStyle(variant: string, isHovered: boolean, isActive: boolean, isMobile: boolean | undefined, hasIcon: boolean): CSSProperties;
15
+ getButtonStyle({ variant, isHovered, isActive, isMobile, hasIcon, }: {
16
+ variant: string;
17
+ isHovered: boolean;
18
+ isActive: boolean;
19
+ isMobile?: boolean;
20
+ hasIcon: boolean;
21
+ }): CSSProperties;
16
22
  getMergedButtonStyle(baseStyle: CSSProperties, ignoreDarkMode: boolean, customStyle?: CSSProperties): CSSProperties;
17
23
  getIconContainerStyle(variant: string, isMobile: boolean, hasIcon: boolean): CSSProperties;
18
24
  getIconStyle(isMobile: boolean, isHovered: boolean, isActive: boolean): CSSProperties;
@@ -49,7 +49,7 @@ export const VibesButtonStyles = {
49
49
  getPadding(isMobile) {
50
50
  return isMobile ? "0.75rem 1.5rem" : "1rem 2rem";
51
51
  },
52
- getButtonStyle(variant, isHovered, isActive, isMobile = false, hasIcon) {
52
+ getButtonStyle({ variant, isHovered, isActive, isMobile = false, hasIcon, }) {
53
53
  return {
54
54
  ...this.getDimensions(isMobile, hasIcon),
55
55
  padding: this.getPadding(isMobile),
@@ -31,7 +31,7 @@ export function storyShareSupported(nav = typeof navigator === "undefined" ? und
31
31
  return false;
32
32
  }
33
33
  }
34
- function roundedRect(ctx, x, y, w, h, r) {
34
+ function roundedRect(ctx, { x, y, w, h, r }) {
35
35
  ctx.beginPath();
36
36
  ctx.moveTo(x + r, y);
37
37
  ctx.arcTo(x + w, y, x + w, y + h, r);
@@ -66,12 +66,12 @@ export async function buildStoryFile(src, link) {
66
66
  ctx.shadowColor = "rgba(0,0,0,0.45)";
67
67
  ctx.shadowBlur = 48;
68
68
  ctx.shadowOffsetY = 16;
69
- roundedRect(ctx, box.x, box.y, box.w, box.h, 36);
69
+ roundedRect(ctx, { x: box.x, y: box.y, w: box.w, h: box.h, r: 36 });
70
70
  ctx.fillStyle = "#000";
71
71
  ctx.fill();
72
72
  ctx.restore();
73
73
  ctx.save();
74
- roundedRect(ctx, box.x, box.y, box.w, box.h, 36);
74
+ roundedRect(ctx, { x: box.x, y: box.y, w: box.w, h: box.h, r: 36 });
75
75
  ctx.clip();
76
76
  ctx.drawImage(bmp, box.x, box.y, box.w, box.h);
77
77
  ctx.restore();
@@ -89,7 +89,7 @@ export async function buildStoryFile(src, link) {
89
89
  const ph = size + 44;
90
90
  const pw = tw + 80;
91
91
  const py = Math.min(STORY_HEIGHT - 220, box.y + box.h + 70);
92
- roundedRect(ctx, (STORY_WIDTH - pw) / 2, py, pw, ph, ph / 2);
92
+ roundedRect(ctx, { x: (STORY_WIDTH - pw) / 2, y: py, w: pw, h: ph, r: ph / 2 });
93
93
  ctx.fillStyle = "rgba(255,255,255,0.92)";
94
94
  ctx.fill();
95
95
  ctx.fillStyle = "#111";
@@ -160,6 +160,8 @@ export function VibeMenu(props) {
160
160
  safeToLeave: code.composer.stopDisabled !== true,
161
161
  listed: viewer.appSlug !== null,
162
162
  onNote: props.onFirstBuildNote,
163
+ waitClaim: props.firstBuildWaitClaim,
164
+ waitClaimRoom: props.firstBuildWaitClaimRoom,
163
165
  };
164
166
  function cardFor(section) {
165
167
  const nav = navFor(state);
@@ -32,11 +32,10 @@ export declare const ACCOUNT_COPY: Readonly<{
32
32
  fromYourName: "From your name";
33
33
  orTry: "Or try";
34
34
  moreIdeas: "More ideas";
35
- chooseHandle: "Choose your handle";
36
35
  switchTo: "Switch handle";
37
36
  allHandles: (n: number) => string;
38
37
  }>;
39
- export declare const ACCOUNT_CARD_CSS = "\n[data-vibe-menu] .vm-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 4px 0 14px; }\n[data-vibe-menu] .vm-big { font: 700 42px/0.8 var(--font-display); letter-spacing: -0.04em; white-space: nowrap; }\n[data-vibe-menu] .vm-caption { flex: 1; white-space: nowrap; font-size: 12px; line-height: 14px; color: var(--muted); }\n[data-vibe-menu] .vm-who { display: flex; align-items: center; gap: 10px; padding: 0 0 14px; }\n[data-vibe-menu] .vm-avatar { position: relative; overflow: hidden; width: 28px; height: 28px; border-radius: 50%; border: var(--stroke-rule) solid var(--line-card); background: var(--section-account); color: var(--on-account); display: grid; place-items: center; font: 700 12px/1 var(--font-tab); }\n[data-vibe-menu] .vm-handle { font: 700 16px/1 var(--font-display); }\n[data-vibe-menu] .vm-who + [data-guest-handle-note] { margin: -8px 0 14px 38px; }\n[data-vibe-menu] .vm-no-handle { font: 400 16px/1 var(--font-display); color: var(--muted); }\n[data-vibe-menu] .vm-meter { height: var(--size-meter); margin-bottom: var(--space-16); border: var(--stroke-rule) solid var(--line-card); border-radius: var(--radius-meter); overflow: hidden; }\n[data-vibe-menu] .vm-meter span { display: block; height: 100%; background: var(--section-account); border-right: var(--stroke-rule) solid var(--line-card); }\n[data-vibe-menu] .vm-account .vm-group + .vm-group { margin-top: var(--space-14); }\n[data-vibe-menu] .vm-drill .vm-input + .vm-drill-sec { margin-top: 14px; }\n[data-vibe-menu] .vm-handle-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; }\n[data-vibe-menu] .vm-handle-add .vm-input { flex: 1 1 180px; height: 40px; margin: 0; }\n[data-vibe-menu] .vm-acting-head { margin-top: 16px; padding-bottom: 2px; }\n[data-vibe-menu] .vm-acting-line { margin: 0 0 6px; font-size: 13px; color: var(--muted); }\n[data-vibe-menu] .vm-handle-row { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; }\n[data-vibe-menu] .vm-handle-row + .vm-handle-row { border-top: var(--stroke-hairline) solid var(--line-hairline); }\n[data-vibe-menu] .vm-handle-row .vm-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }\n[data-vibe-menu] .vm-handle-row.is-active .vm-label { font-weight: 700; }\n[data-vibe-menu] .vm-handle-row.is-active .vm-initial { background: var(--accent); color: var(--on-accent); }\n[data-vibe-menu] .vm-initial { position: relative; overflow: hidden; }\n[data-vibe-menu] .vm-avatar img, [data-vibe-menu] .vm-initial img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }\n[data-vibe-menu] .vm-check { display: grid; color: var(--ink); }\n[data-vibe-menu] .vm-check .vm-glyph { width: 18px; height: 18px; stroke-width: 3; }\n[data-vibe-menu] .vm-handle-switch { margin: -6px 0 14px; }\n[data-vibe-menu] .vm-handle-switch-toggle { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 4px 0; border: 0; background: none; color: var(--muted); font: 700 11px/1 var(--font-tab); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }\n[data-vibe-menu] .vm-handle-switch-toggle .vm-glyph { width: 14px; height: 14px; transition: transform 120ms ease; }\n[data-vibe-menu] .vm-handle-switch-toggle[aria-expanded=\"true\"] .vm-glyph { transform: rotate(90deg); }\n@media (prefers-reduced-motion: reduce) { [data-vibe-menu] .vm-handle-switch-toggle .vm-glyph { transition: none; } }\n[data-vibe-menu] .vm-handle-switch .vm-handle-row { height: 40px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }\n[data-vibe-menu] .vm-handle-switch .vm-handle-row:disabled { cursor: default; opacity: 0.6; }\n[data-vibe-menu] .vm-handle-switch .vm-avatar { flex: none; }\n[data-vibe-menu] .vm-picture { display: flex; padding: 2px 0 8px 40px; }\n[data-vibe-menu] .vm-form-note { margin: 8px 0 0; font-size: 13px; color: var(--ink); }\n@container (max-width: 480px) {\n [data-vibe-menu] .vm-big { font-size: 36px; }\n [data-vibe-menu] .vm-handle-add .vm-input { flex-basis: 100%; }\n}\n";
38
+ export declare const ACCOUNT_CARD_CSS = "\n[data-vibe-menu] .vm-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 4px 0 14px; }\n[data-vibe-menu] .vm-big { font: 700 42px/0.8 var(--font-display); letter-spacing: -0.04em; white-space: nowrap; }\n[data-vibe-menu] .vm-caption { flex: 1; white-space: nowrap; font-size: 12px; line-height: 14px; color: var(--muted); }\n[data-vibe-menu] .vm-who { display: flex; align-items: center; gap: 10px; padding: 0 0 14px; }\n[data-vibe-menu] .vm-avatar { position: relative; overflow: hidden; width: 28px; height: 28px; border-radius: 50%; border: var(--stroke-rule) solid var(--line-card); background: var(--section-account); color: var(--on-account); display: grid; place-items: center; font: 700 12px/1 var(--font-tab); }\n[data-vibe-menu] .vm-handle { font: 700 16px/1 var(--font-display); }\n[data-vibe-menu] .vm-who + [data-guest-handle-note] { margin: -8px 0 14px 38px; }\n[data-vibe-menu] .vm-no-handle { font: 400 16px/1 var(--font-display); color: var(--muted); }\n[data-vibe-menu] .vm-meter { height: var(--size-meter); margin-bottom: var(--space-16); border: var(--stroke-rule) solid var(--line-card); border-radius: var(--radius-meter); overflow: hidden; }\n[data-vibe-menu] .vm-meter span { display: block; height: 100%; background: var(--section-account); border-right: var(--stroke-rule) solid var(--line-card); }\n[data-vibe-menu] .vm-account .vm-group + .vm-group { margin-top: var(--space-14); }\n[data-vibe-menu] .vm-drill .vm-input + .vm-drill-sec { margin-top: 14px; }\n[data-vibe-menu] .vm-handle-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; }\n[data-vibe-menu] .vm-handle-add .vm-input { flex: 1 1 180px; height: 40px; margin: 0; }\n[data-vibe-menu] .vm-acting-head { margin-top: 16px; padding-bottom: 2px; }\n[data-vibe-menu] .vm-acting-line { margin: 0 0 6px; font-size: 13px; color: var(--muted); }\n[data-vibe-menu] .vm-handle-row { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; }\n[data-vibe-menu] .vm-handle-row + .vm-handle-row { border-top: var(--stroke-hairline) solid var(--line-hairline); }\n[data-vibe-menu] .vm-handle-row .vm-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }\n[data-vibe-menu] .vm-handle-row.is-active .vm-label { font-weight: 700; }\n[data-vibe-menu] .vm-handle-row.is-active .vm-initial { background: var(--accent); color: var(--on-accent); }\n[data-vibe-menu] .vm-initial { position: relative; overflow: hidden; }\n[data-vibe-menu] .vm-avatar img, [data-vibe-menu] .vm-initial img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }\n[data-vibe-menu] .vm-check { display: grid; color: var(--ink); }\n[data-vibe-menu] .vm-check .vm-glyph { width: 18px; height: 18px; stroke-width: 3; }\n[data-vibe-menu] .vm-handle-switch { margin: -6px 0 14px; }\n[data-vibe-menu] .vm-handle-switch-toggle { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 4px 0; border: 0; background: none; color: var(--muted); font: 700 11px/1 var(--font-tab); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }\n[data-vibe-menu] .vm-handle-switch-toggle .vm-glyph { width: 14px; height: 14px; transition: transform 120ms ease; }\n[data-vibe-menu] .vm-handle-switch-toggle[aria-expanded=\"true\"] .vm-glyph { transform: rotate(90deg); }\n@media (prefers-reduced-motion: reduce) { [data-vibe-menu] .vm-handle-switch-toggle .vm-glyph { transition: none; } }\n[data-vibe-menu] .vm-handle-switch .vm-handle-row { height: 40px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }\n[data-vibe-menu] .vm-handle-switch .vm-handle-row:disabled { cursor: default; opacity: 0.6; }\n[data-vibe-menu] .vm-handle-switch .vm-avatar { flex: none; }\n[data-vibe-menu] .vm-picture { display: flex; padding: 2px 0 8px 40px; }\n[data-vibe-menu] .vm-form-note { margin: 8px 0 0; font-size: 13px; color: var(--ink); }\n/* #8641: Handles, type yours first. A question in the display face, the ideas quiet under the field. */\n[data-vibe-menu] .vm-account .vm-handle-question { margin: 0 0 4px; font: 700 18px/1.2 var(--font-display); color: var(--ink); }\n[data-vibe-menu] .vm-account .vm-handle-question-sub { margin: 0 0 12px; }\n[data-vibe-menu] .vm-account .vm-handle-idea-line { margin: 14px 0 6px; }\n[data-vibe-menu] .vm-handle-for-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 12px; }\n[data-vibe-menu] .vm-handle-for-now .vm-sub { margin: 0; }\n[data-vibe-menu] .vm-handle-add-main { margin-top: 12px; }\n@container (max-width: 480px) {\n [data-vibe-menu] .vm-big { font-size: 36px; }\n [data-vibe-menu] .vm-handle-add .vm-input { flex-basis: 100%; }\n}\n";
40
39
  export interface AccountCardProps {
41
40
  readonly viewer: ViewerSlice;
42
41
  readonly account: AccountSlice;
@@ -52,6 +51,7 @@ export interface HandleAddPickerProps {
52
51
  readonly existing?: readonly string[];
53
52
  }
54
53
  export declare function HandleAddPicker(props: HandleAddPickerProps): React.ReactElement;
54
+ export declare function typeFirstIdeas(ideas: AccountSlice["handleIdeas"]): readonly string[];
55
55
  export declare function HandlesDrill(props: AccountCardProps): React.ReactElement;
56
56
  export declare function PlusDrill(props: AccountCardProps): React.ReactElement | null;
57
57
  export declare function SignUpDrill(props: AccountCardProps): React.ReactElement | null;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { useEffect, useRef, useState } from "react";
3
3
  import { toRFC2822_32ByteLength } from "@vibes.diy/vibe-types";
4
4
  import { SECTION_TITLES } from "../menu-state.js";
5
- import { CREATE_ACCOUNT_TO_KEEP_APPS, GUEST_APPS_HERE, GUEST_SIGN_IN_BONUS, JOIN_OR_SIGN_IN } from "../copy.js";
5
+ import { CREATE_ACCOUNT_TO_KEEP_APPS, GUEST_APPS_HERE, GUEST_SIGN_IN_BONUS, HANDLE_TYPE_FIRST, JOIN_OR_SIGN_IN } from "../copy.js";
6
6
  import { ActionPill, TextButton } from "../parts/ActionPill.js";
7
7
  import { BackRow } from "../parts/BackRow.js";
8
8
  import { CARD_TAB_ROW_CSS, CardTabRow, MainAction, Stretch } from "../parts/CardTabRow.js";
@@ -42,7 +42,6 @@ export const ACCOUNT_COPY = Object.freeze({
42
42
  fromYourName: "From your name",
43
43
  orTry: "Or try",
44
44
  moreIdeas: "More ideas",
45
- chooseHandle: "Choose your handle",
46
45
  switchTo: "Switch handle",
47
46
  allHandles: (n) => `All ${n} handles`,
48
47
  });
@@ -82,6 +81,13 @@ export const ACCOUNT_CARD_CSS = `
82
81
  [data-vibe-menu] .vm-handle-switch .vm-avatar { flex: none; }
83
82
  [data-vibe-menu] .vm-picture { display: flex; padding: 2px 0 8px 40px; }
84
83
  [data-vibe-menu] .vm-form-note { margin: 8px 0 0; font-size: 13px; color: var(--ink); }
84
+ /* #8641: Handles, type yours first. A question in the display face, the ideas quiet under the field. */
85
+ [data-vibe-menu] .vm-account .vm-handle-question { margin: 0 0 4px; font: 700 18px/1.2 var(--font-display); color: var(--ink); }
86
+ [data-vibe-menu] .vm-account .vm-handle-question-sub { margin: 0 0 12px; }
87
+ [data-vibe-menu] .vm-account .vm-handle-idea-line { margin: 14px 0 6px; }
88
+ [data-vibe-menu] .vm-handle-for-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 12px; }
89
+ [data-vibe-menu] .vm-handle-for-now .vm-sub { margin: 0; }
90
+ [data-vibe-menu] .vm-handle-add-main { margin-top: 12px; }
85
91
  @container (max-width: 480px) {
86
92
  [data-vibe-menu] .vm-big { font-size: 36px; }
87
93
  [data-vibe-menu] .vm-handle-add .vm-input { flex-basis: 100%; }
@@ -237,8 +243,83 @@ export function HandleAddPicker(props) {
237
243
  addFailed ? (React.createElement("p", { className: "vm-form-note", role: "status" }, ACCOUNT_COPY.addFailed)) : null),
238
244
  React.createElement(HandleIdeas, { ideas: props.ideas, onPick: setNewHandle })));
239
245
  }
246
+ export function typeFirstIdeas(ideas) {
247
+ const mixed = [ideas.fromName[0], ideas.words[0], ideas.words[1], ...ideas.fromName, ...ideas.words];
248
+ return Array.from(new Set(mixed.filter((name) => name !== undefined))).slice(0, 3);
249
+ }
250
+ const REROLLS_BEFORE_FIELD = 3;
251
+ function TypeYoursFirst(props) {
252
+ const { account } = props;
253
+ const [value, setValue] = useState("");
254
+ const [addFailed, setAddFailed] = useState(false);
255
+ const [rerolls, setRerolls] = useState(0);
256
+ const field = useRef(null);
257
+ const ideas = typeFirstIdeas(account.handleIdeas);
258
+ const handle = account.activeHandle ?? "";
259
+ const adding = useRef(false);
260
+ const [pending, setPending] = useState(false);
261
+ async function add() {
262
+ if (adding.current || account.handleBusy)
263
+ return;
264
+ const slug = toRFC2822_32ByteLength(value.trim().replace(/^@+/, ""));
265
+ if (slug === "" || account.handles.some((h) => h.slug === slug))
266
+ return;
267
+ adding.current = true;
268
+ setPending(true);
269
+ const r = await account.onAddHandle(slug).finally(() => {
270
+ adding.current = false;
271
+ setPending(false);
272
+ });
273
+ if (r.isErr()) {
274
+ setAddFailed(true);
275
+ return;
276
+ }
277
+ setAddFailed(false);
278
+ setValue("");
279
+ }
280
+ function reroll() {
281
+ account.handleIdeas.refresh();
282
+ const next = rerolls + 1;
283
+ setRerolls(next);
284
+ if (next === REROLLS_BEFORE_FIELD)
285
+ field.current?.focus();
286
+ }
287
+ return (React.createElement(React.Fragment, null,
288
+ React.createElement("h3", { className: "vm-handle-question" }, HANDLE_TYPE_FIRST.question),
289
+ React.createElement("p", { className: "vm-sub vm-handle-question-sub" }, HANDLE_TYPE_FIRST.sub),
290
+ React.createElement("div", { className: "vm-handle-add" },
291
+ React.createElement("input", { ref: field, className: `vm-input ${NO_CAPTURE}`, placeholder: `@${ACCOUNT_COPY.newHandlePlaceholder}`, "aria-label": ACCOUNT_COPY.newHandleLabel, autoCapitalize: "off", autoComplete: "off", spellCheck: false, autoFocus: true, value: value, onChange: (e) => setValue(e.currentTarget.value), onKeyDown: (e) => {
292
+ if (e.key === "Enter")
293
+ void add();
294
+ } })),
295
+ addFailed ? (React.createElement("p", { className: "vm-form-note", role: "status" }, ACCOUNT_COPY.addFailed)) : null,
296
+ React.createElement("div", { className: "vm-drill-sec" },
297
+ React.createElement("p", { className: "vm-sub vm-handle-idea-line" }, HANDLE_TYPE_FIRST.needAnIdea),
298
+ React.createElement("div", { className: "vm-picks", "data-handle-ideas": "" },
299
+ ideas.map((name) => (React.createElement(Chip, { key: name, label: name, name: true, ghost: true, className: NO_CAPTURE, onClick: () => setValue(name) }))),
300
+ React.createElement(RefreshButton, { onRefresh: reroll }))),
301
+ React.createElement("div", { className: "vm-handle-for-now", "data-handle-for-now": "" },
302
+ React.createElement("p", { className: "vm-sub" },
303
+ HANDLE_TYPE_FIRST.youAre,
304
+ " ",
305
+ React.createElement("span", { className: NO_CAPTURE },
306
+ "@",
307
+ handle),
308
+ " ",
309
+ HANDLE_TYPE_FIRST.forNow),
310
+ React.createElement(Chip, { label: ACCOUNT_COPY.changePicture, ghost: true, onClick: account.onChangePicture })),
311
+ React.createElement("div", { className: "vm-handle-add-main" },
312
+ React.createElement(ActionPill, { label: ACCOUNT_COPY.add, glyph: "check", solo: true, disabled: account.handleBusy || pending, onClick: () => void add() }))));
313
+ }
240
314
  export function HandlesDrill(props) {
241
315
  const { account, nav } = props;
316
+ if (account.provisionalOnly === true) {
317
+ return (React.createElement(React.Fragment, null,
318
+ React.createElement(BackRow, { name: ACCOUNT_COPY.handles, card: SECTION_TITLES.settings, top: true, onBack: nav.onLeaveDrill }),
319
+ React.createElement("div", { className: "vm-drill", "data-drill": "handles", "data-handle-type-first": "" },
320
+ React.createElement(TypeYoursFirst, { account: account })),
321
+ React.createElement(DoneButton, { onDone: nav.onLeaveDrill })));
322
+ }
242
323
  return (React.createElement(React.Fragment, null,
243
324
  React.createElement(BackRow, { name: ACCOUNT_COPY.handles, card: SECTION_TITLES.settings, top: true, onBack: nav.onLeaveDrill }),
244
325
  React.createElement("div", { className: "vm-drill", "data-drill": "handles" },
@@ -399,12 +480,11 @@ function AccountTabBody(props) {
399
480
  const guestAsk = account.guestAsk ?? null;
400
481
  const saveAsk = guestAsk === null ? null : (account.saveAsk ?? null);
401
482
  const creditsPill = React.createElement(CreditsPill, { account: account, nav: nav });
402
- const mainKind = guestAsk !== null ? "guest" : account.provisionalOnly === true ? "handle" : "credits";
403
483
  const main = guestAsk !== null ? (React.createElement("div", { "data-account-save-ask": saveAsk === null ? undefined : "" },
404
484
  React.createElement("p", { className: "vm-sub" }, GUEST_APPS_HERE),
405
485
  React.createElement("p", { className: "vm-sub", "data-guest-bonus": "" }, GUEST_SIGN_IN_BONUS),
406
486
  saveAsk === null ? null : React.createElement(SaveAskLine, { ask: saveAsk }),
407
- React.createElement(ActionPill, { label: CREATE_ACCOUNT_TO_KEEP_APPS, solo: true, onClick: saveAsk?.onSignIn ?? guestAsk.onSignIn }))) : mainKind === "handle" ? (React.createElement(ActionPill, { label: ACCOUNT_COPY.chooseHandle, solo: true, onClick: () => nav.onDrill({ drill: "handles" }) })) : (creditsPill);
487
+ React.createElement(ActionPill, { label: CREATE_ACCOUNT_TO_KEEP_APPS, solo: true, onClick: saveAsk?.onSignIn ?? guestAsk.onSignIn }))) : (creditsPill);
408
488
  const handle = account.activeHandle ?? "";
409
489
  return (React.createElement("div", { className: "vm-ctab vm-xtab", "data-tab-row": "" },
410
490
  React.createElement(Stretch, null,
@@ -416,8 +496,7 @@ function AccountTabBody(props) {
416
496
  account.onLogout === null ? null : (React.createElement("button", { className: "vm-textbtn", type: "button", "data-item": "logOut", onClick: account.onLogout }, ACCOUNT_COPY.logOut))),
417
497
  guestAsk === null ? null : React.createElement(GuestHandleNote, null),
418
498
  React.createElement(HandleSwitchList, { account: account, onDrill: nav.onDrill }),
419
- React.createElement(CreditsFact, { account: account, planHref: guestAsk === null ? account.creditsAction.href : undefined }),
420
- mainKind === "credits" || mainKind === "guest" ? null : creditsPill),
499
+ React.createElement(CreditsFact, { account: account, planHref: guestAsk === null ? account.creditsAction.href : undefined })),
421
500
  React.createElement(MainAction, null, main),
422
501
  row));
423
502
  }
@@ -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-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";
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;
@@ -15,6 +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
19
  import { CodeModeWorkspace, WORKSPACE_CODE_TABS, resolveActiveCodeTab } from "./CodeModeWorkspace.js";
19
20
  import { ScrollTabRow } from "../parts/ScrollTabRow.js";
20
21
  import { CODE_TAB_ROW_CSS, CodeTabRow, codeNavItems, steadyCodeNavItems, codeNavRowItems, codeTierItems, codeTierLabel, codeTierRowItems, codeTierTab, } from "./CodeTabRow.js";
@@ -49,6 +50,7 @@ export const CODE_CARD_CSS = `
49
50
  /* An account's first build (#9641): the build ask's own room, held the same way. */
50
51
  [data-vibe-menu] .vm-ask-slot { display: grid; }
51
52
  [data-vibe-menu] .vm-ask-slot > * { grid-area: 1 / 1; }
53
+ [data-vibe-menu] .vm-ask-foot { align-items: end; }
52
54
  [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; }
53
55
  /* The owner's check row (#9245): a muted line with a glyph, its button an inline
54
56
  text link kept on one line with its separator. */
@@ -117,13 +119,6 @@ export function CodeCard(props) {
117
119
  const pinnedLeftAt = React.useRef(undefined);
118
120
  const handoffSawBuild = React.useRef(false);
119
121
  const heldFirstBuild = React.useRef(null);
120
- const [answering, setAnswering] = React.useState(false);
121
- if (answering && (code.buildAsk === undefined || code.buildAsk === null))
122
- setAnswering(false);
123
- React.useLayoutEffect(() => {
124
- if (answering)
125
- composerField.current?.focus();
126
- }, [answering]);
127
122
  React.useLayoutEffect(() => {
128
123
  if (focusAfterCodeMode.current && code.codeMode === false && composerField.current !== null) {
129
124
  focusAfterCodeMode.current = false;
@@ -187,7 +182,6 @@ export function CodeCard(props) {
187
182
  const buildAsk = editor ? (code.buildAsk ?? null) : null;
188
183
  const askOpen = buildAsk !== null;
189
184
  const buildAskNode = buildAsk !== null ? (React.createElement(BuildAskLine, { ask: buildAsk, visible: props.open === true, onAnswer: () => {
190
- setAnswering(true);
191
185
  composerField.current?.focus();
192
186
  } })) : null;
193
187
  const kickerNode = requestHead ?? (kicker !== "" ? React.createElement("p", { className: "vm-kicker" }, kicker) : null);
@@ -196,17 +190,30 @@ export function CodeCard(props) {
196
190
  composerNode));
197
191
  const drill = codeDrillOf({ view: nav.view, owner, editor });
198
192
  const peek = props.logOpen === false && props.logPeek === true;
199
- const toggle = { open: props.logOpen, peek, onToggle: () => props.onLogOpen(props.logOpen === false), lines: logLines };
193
+ const answer = code.codeAnswer;
194
+ const noteChatOpened = (via) => answer?.onOpen(via);
195
+ const toggle = {
196
+ open: props.logOpen,
197
+ peek,
198
+ onToggle: () => {
199
+ if (props.logOpen === false)
200
+ noteChatOpened("summary");
201
+ props.onLogOpen(props.logOpen === false);
202
+ },
203
+ lines: logLines,
204
+ };
205
+ const answerCss = answer !== undefined ? React.createElement("style", null, CODE_ANSWER_CSS) : null;
200
206
  const log = moment.live !== null ? toggle : viewer.draft === true && moment.pinned !== null ? toggle : null;
201
207
  const editTextOn = editText !== null && editText.on === true;
202
208
  const saveRow = editText !== null && editText.on === true && (editText.pending > 0 || editText.saving === true) ? (React.createElement(Row, { lead: "check", label: editText.saving === true ? EDIT_TEXT_SAVING : EDIT_TEXT_SAVE, compact: true, disabled: editText.saving === true || editText.pending === 0, tail: editText.pending > 0 ? { kind: "value", value: String(editText.pending) } : { kind: "none" }, ariaLabel: editText.saving === true
203
209
  ? EDIT_TEXT_SAVING
204
210
  : `${EDIT_TEXT_SAVE} ${editText.pending} text edit${editText.pending === 1 ? "" : "s"}`, onClick: editText.onSave })) : null;
205
211
  const canPickSuggestion = composer.rewrite === undefined && (draft.text === "" || draft.suggestion === draft.text);
206
- const suggestions = moment.pinned === null ? code.suggestions.filter((text) => canPickSuggestion || text === code.goldSuggestion).slice(0, 3) : [];
212
+ const isAction = (text) => text === code.goldSuggestion || code.actionSuggestions?.includes(text) === true;
213
+ const suggestions = moment.pinned === null ? code.suggestions.filter((text) => canPickSuggestion || isAction(text)).slice(0, 3) : [];
207
214
  const onToggleFastPath = owner === true ? code.onToggleFastPath : null;
208
215
  const pickSuggestion = (text) => {
209
- if (text === code.goldSuggestion)
216
+ if (isAction(text))
210
217
  return code.onSuggestion(text);
211
218
  if (canPickSuggestion === false)
212
219
  return undefined;
@@ -238,6 +245,8 @@ export function CodeCard(props) {
238
245
  if (item === "agentLog") {
239
246
  if (drill !== null)
240
247
  nav.onLeaveDrill();
248
+ if (active !== "agentLog")
249
+ noteChatOpened("tab");
241
250
  props.onLogOpen(active !== "agentLog");
242
251
  return;
243
252
  }
@@ -289,11 +298,20 @@ export function CodeCard(props) {
289
298
  code.onCodeTab(tab);
290
299
  };
291
300
  const local = tierTab === "details" || tierTab === "help";
301
+ const answerLine = answer !== undefined ? (React.createElement(CodeAnswerLine, { text: answer.text, onOpen: () => {
302
+ noteChatOpened("line");
303
+ if (drill !== null)
304
+ nav.onLeaveDrill();
305
+ code.onCodeMode(false);
306
+ props.onLogOpen(true);
307
+ } })) : null;
292
308
  return (React.createElement("div", { className: "vm-codemode vm-ctab", "data-card": "vibe", "data-tab-row": "", "data-tier-mode": "", "data-fill": local ? "" : undefined },
293
309
  React.createElement("style", null, CODE_CARD_CSS + CODE_TAB_ROW_CSS),
310
+ answerCss,
294
311
  local ? (React.createElement("div", { className: "vm-tier-body", role: "tabpanel", "aria-label": codeTierLabel(tierTab), "data-tool": tierTab }, tierTab === "details" ? code.slots.details : code.slots.help)) : null,
295
312
  props.chipRow ?? null,
296
313
  hasMoment ? React.createElement(MomentLine, { moment: moment, log: null, onAction: code.onMomentAction }) : null,
314
+ answerLine,
297
315
  saveRow,
298
316
  composerNode,
299
317
  React.createElement(ScrollTabRow, { label: "Code mode tools", items: [
@@ -335,6 +353,7 @@ export function CodeCard(props) {
335
353
  if (drill !== null) {
336
354
  return (React.createElement("div", { className: "vm-code vm-ctab", "data-card": "vibe", "data-tab-row": "" },
337
355
  React.createElement("style", null, CODE_CARD_CSS + CODE_TAB_ROW_CSS),
356
+ answerCss,
338
357
  React.createElement("div", { className: "vm-drill", "data-drill": drill }, code.slots[drill]),
339
358
  React.createElement(DoneButton, { onDone: nav.onLeaveDrill }),
340
359
  row));
@@ -368,10 +387,7 @@ export function CodeCard(props) {
368
387
  ? { ...toggle, tail, history: hasHistory ? history : undefined }
369
388
  : chatLog;
370
389
  const building = working || bootHold;
371
- const showComposer = code.composerHidden !== true &&
372
- (firstBuild === false || (askOpen && answering)) &&
373
- historyLoading === false &&
374
- handoffHold === false;
390
+ const showComposer = code.composerHidden !== true && (firstBuild === false || askOpen) && historyLoading === false && handoffHold === false;
375
391
  const guestBuildNode = editor === true && code.guestBuild === true && building === true && showComposer === false && buildAskNode === null ? (React.createElement("p", { className: "vm-sub vm-guest-build", "data-guest-build-note": "" },
376
392
  React.createElement("strong", null, GUEST_BUILD_NOTE.lead),
377
393
  " ",
@@ -389,13 +405,17 @@ export function CodeCard(props) {
389
405
  buildAskNode,
390
406
  React.createElement(BuildAskRoom, null))) : (buildAskNode);
391
407
  const reserveRow = rowItems.length === 0 && editor === true && logOpens === false && (firstBuild || (handoffHold && moment.pinned === null));
392
- const mainAction = showComposer ? (composerNode) : working ? (React.createElement(StopIconButton, { disabled: composer.stopDisabled === true, armedAt: latestStopArm(live?.expected?.fromMs, pinnedLeftAt.current), onStop: () => {
408
+ const mainAction = showComposer ? (firstBuild && askOpen ? (React.createElement("div", { className: "vm-ask-slot vm-ask-foot", "data-build-ask-foot": "" },
409
+ React.createElement("div", { "data-stop-reserve": "", "aria-hidden": "true", inert: true, style: { visibility: "hidden" } },
410
+ React.createElement(StopIconButton, { disabled: true, onStop: () => undefined })),
411
+ React.createElement("div", { className: "vm-ask-foot-composer" }, composerNode))) : (composerNode)) : working ? (React.createElement(StopIconButton, { disabled: composer.stopDisabled === true, armedAt: latestStopArm(live?.expected?.fromMs, pinnedLeftAt.current), onStop: () => {
393
412
  heldFirstBuild.current = null;
394
413
  draft.stop();
395
414
  }, latch: code.composerHidden !== true })) : bootHold ? (React.createElement("div", { "data-stop-reserve": "", "aria-hidden": "true", inert: true, style: { visibility: "hidden" } },
396
415
  React.createElement(StopIconButton, { disabled: true, onStop: () => undefined }))) : null;
397
416
  return (React.createElement("div", { className: "vm-code vm-ctab", "data-card": "vibe", "data-tab-row": "", "data-chat-only": code.chatOnly === true ? "" : undefined },
398
417
  React.createElement("style", null, CODE_CARD_CSS + CODE_TAB_ROW_CSS + CODE_SUMMARY_LINE_CSS),
418
+ answerCss,
399
419
  requestHead ?? invite,
400
420
  props.chipRow ?? null,
401
421
  bootMoment.pinned !== null || bootMoment.live !== null ? (React.createElement(MomentLine, { moment: bootMoment, log: bootLog, onAction: code.onMomentAction, onLiveTap: code.onLiveLineTap, reserveBar: bootHold })) : null,
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { useContext, useState } from "react";
3
3
  import { exception2Result } from "@adviser/cement";
4
4
  import { shareTaggedUrl } from "@vibes.diy/api-types";
5
- import { GUEST_SHARE_ASK, GUEST_WAITING, JOIN_OR_SIGN_IN, SHARE_AUDIENCE, SHARE_DEV_DRAFT_LINE, SHARE_HANDLE_ASK, SHARE_HANDLE_STEP, } from "../copy.js";
5
+ import { GUEST_SHARE_ASK, GUEST_WAITING, HANDLE_TYPE_FIRST, JOIN_OR_SIGN_IN, SHARE_AUDIENCE, SHARE_DEV_DRAFT_LINE, SHARE_HANDLE_ASK, SHARE_HANDLE_STEP, } from "../copy.js";
6
6
  import { ActionPill } from "../parts/ActionPill.js";
7
7
  import { CARD_TAB_ROW_CSS, CardTabRow, MainAction, Stretch } from "../parts/CardTabRow.js";
8
8
  import { SaveAskLine } from "../parts/SaveAskLine.js";
@@ -251,15 +251,17 @@ function handleStepOf(share) {
251
251
  }
252
252
  function HandleStep({ ask }) {
253
253
  return (React.createElement("div", { className: "vm-share-handle-step", "data-share-handle-step": "" },
254
- React.createElement(ActionPill, { label: SHARE_HANDLE_ASK.choose, onClick: ask.onChoose, caption: React.createElement(React.Fragment, null,
255
- SHARE_HANDLE_STEP.line,
256
- React.createElement("span", { "aria-hidden": "true" }, " \u00B7 "),
257
- React.createElement("button", { className: "vm-handle-ask-link", type: "button", onClick: ask.onShareAs },
258
- SHARE_HANDLE_STEP.shareAs,
259
- " ",
260
- React.createElement("span", { className: "vm-handle-ask-name ph-no-capture" },
261
- "@",
262
- ask.handle))) })));
254
+ React.createElement("h3", { className: "vm-handle-question" },
255
+ SHARE_HANDLE_STEP.shareAs,
256
+ " ",
257
+ React.createElement("span", { className: "ph-no-capture" },
258
+ "@",
259
+ ask.handle),
260
+ "?"),
261
+ React.createElement("p", { className: "vm-sub vm-handle-question-sub" }, HANDLE_TYPE_FIRST.shareAskSub),
262
+ React.createElement(ActionPill, { label: HANDLE_TYPE_FIRST.shareYes, glyph: "check", solo: true, onClick: ask.onShareAs }),
263
+ React.createElement("div", { className: "vm-handle-question-alt" },
264
+ React.createElement(Chip, { label: HANDLE_TYPE_FIRST.shareChange, ghost: true, onClick: ask.onChoose }))));
263
265
  }
264
266
  export const SHARE_TAB_CSS = `
265
267
  [data-vibe-menu] .vm-xtab .vm-main > .vm-share-actions { justify-content: center; }
@@ -1 +1 @@
1
- export declare const SHARE_CARD_CSS = "\n[data-vibe-menu] .vm-sr {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n[data-vibe-menu] .vm-access-note {\n margin: calc(-1 * var(--space-4)) 0 var(--space-12);\n font-size: 13px;\n line-height: 1.3;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-who-block > .vm-textbtn {\n margin: calc(-1 * var(--space-6)) 0 var(--space-8);\n height: 32px;\n text-align: left;\n}\n[data-vibe-menu] .vm-publish {\n margin-bottom: var(--space-12);\n}\n[data-vibe-menu] .vm-fail {\n display: flex;\n align-items: center;\n gap: var(--space-8);\n margin: var(--space-6) 0;\n font-size: 13px;\n line-height: 1.3;\n}\n[data-vibe-menu] .vm-fail > span {\n flex: 1;\n min-width: 0;\n}\n[data-vibe-menu] .vm-share-empty {\n margin: 0;\n padding: var(--space-8) 0 var(--space-14);\n font: 400 16px/1.3 var(--font-display);\n}\n[data-vibe-menu] .vm-reveal {\n padding: var(--space-12) var(--space-16) var(--space-14);\n border-top: var(--stroke-hairline) solid var(--line-hairline);\n}\n/* The Share hero: the QR code open, with Copy link / Share\u2026 / Embed under it. */\n[data-vibe-menu] .vm-share-hero {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--space-12);\n padding: var(--space-8) 0 var(--space-16);\n}\n[data-vibe-menu] .vm-share-hero .vm-share-actions {\n justify-content: center;\n}\n/* #8326: the handle step leads the first share from a made handle; the pill spans the card. */\n[data-vibe-menu] .vm-share-handle-step {\n width: 100%;\n}\n[data-vibe-menu] .vm-handle-ask {\n margin: 0;\n max-width: 100%;\n text-align: center;\n font-size: 14px;\n line-height: 1.35;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-handle-ask-name {\n overflow-wrap: anywhere;\n}\n[data-vibe-menu] .vm-handle-ask-link {\n font: inherit;\n color: var(--ink);\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: pointer;\n}\n/* #6658: who the link opens for, one quiet row under Copy link (29px at 390px in audition #9652). */\n[data-vibe-menu] p.vm-share-audience {\n margin-top: var(--space-10);\n}\n[data-vibe-menu] .vm-share-audience .vm-glyph {\n display: inline-block;\n width: 14px;\n height: 14px;\n vertical-align: -2px;\n margin-right: 4px;\n}\n/* Held at the line's height while who it opens for is still unknown, so the line lands without a jump. */\n[data-vibe-menu] .vm-share-audience[data-share-audience-pending] {\n visibility: hidden;\n}\n[data-vibe-menu] .vm-share-audience-act {\n white-space: nowrap;\n}\n[data-vibe-menu] .vm-input.vm-note-input {\n height: auto;\n min-height: 72px;\n margin-bottom: var(--space-8);\n padding: var(--space-12) var(--space-18);\n resize: none;\n}\n[data-vibe-menu] .vm-note-count {\n margin: 0 0 var(--space-8);\n text-align: right;\n font-size: 12px;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-share-hero .vm-reveal {\n width: 100%;\n padding: var(--space-12) 0 0;\n}\n/* Text is a real sms: link wearing the chip: no underline, centered label. */\n[data-vibe-menu] a.vm-chip {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n}\n/* Email a friend: the address field, Send under it, the line under that. */\n[data-vibe-menu] .vm-reveal[data-reveal=\"email-invite\"] {\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n}\n[data-vibe-menu] .vm-chip.has-glyph {\n display: inline-flex;\n align-items: center;\n gap: var(--space-6);\n}\n[data-vibe-menu] .vm-chip.has-glyph > svg {\n width: 14px;\n height: 14px;\n flex: none;\n}\n[data-vibe-menu] .vm-reveal + .vm-row,\n[data-vibe-menu] .vm-reveal + a.vm-row {\n border-top: var(--stroke-hairline) solid var(--line-hairline);\n}\n[data-vibe-menu] a.vm-row {\n color: var(--ink);\n text-decoration: none;\n}\n[data-vibe-menu] .vm-qr {\n display: inline-block;\n padding: var(--space-8);\n background: #ffffff;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-input);\n line-height: 0;\n}\n[data-vibe-menu] .vm-embed {\n display: block;\n width: 100%;\n height: calc(4.5em + 10px);\n margin-bottom: var(--space-8);\n padding: 8px 10px 0;\n resize: none;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-input);\n background: transparent;\n color: var(--ink);\n font: 400 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n/* Share as app: the 4:5 share image, held at its shape while it draws. */\n[data-vibe-menu] .vm-share-image {\n width: min(100%, 240px);\n aspect-ratio: 4 / 5;\n margin: 0 auto var(--space-14);\n overflow: hidden;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-card);\n}\n[data-vibe-menu] .vm-share-image > img {\n display: block;\n width: 100%;\n height: 100%;\n}\n[data-vibe-menu] .vm-share-image-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n font-size: 12px;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-share-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-8);\n}\n[data-vibe-menu] .vm-card-status {\n margin: var(--space-12) 0 0;\n}\n/* Phone sizing is the named container query (T5 note 5). The @media arm keeps\n the iOS no-zoom-on-focus guarantee keyed on the device as well. */\n@container vibe-menu (max-width: 480px) {\n [data-vibe-menu] .vm-embed {\n font-size: 16px;\n }\n}\n@media (max-width: 480px) {\n [data-vibe-menu] .vm-embed {\n font-size: 16px;\n }\n}\n";
1
+ export declare const SHARE_CARD_CSS = "\n[data-vibe-menu] .vm-sr {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n[data-vibe-menu] .vm-access-note {\n margin: calc(-1 * var(--space-4)) 0 var(--space-12);\n font-size: 13px;\n line-height: 1.3;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-who-block > .vm-textbtn {\n margin: calc(-1 * var(--space-6)) 0 var(--space-8);\n height: 32px;\n text-align: left;\n}\n[data-vibe-menu] .vm-publish {\n margin-bottom: var(--space-12);\n}\n[data-vibe-menu] .vm-fail {\n display: flex;\n align-items: center;\n gap: var(--space-8);\n margin: var(--space-6) 0;\n font-size: 13px;\n line-height: 1.3;\n}\n[data-vibe-menu] .vm-fail > span {\n flex: 1;\n min-width: 0;\n}\n[data-vibe-menu] .vm-share-empty {\n margin: 0;\n padding: var(--space-8) 0 var(--space-14);\n font: 400 16px/1.3 var(--font-display);\n}\n[data-vibe-menu] .vm-reveal {\n padding: var(--space-12) var(--space-16) var(--space-14);\n border-top: var(--stroke-hairline) solid var(--line-hairline);\n}\n/* The Share hero: the QR code open, with Copy link / Share\u2026 / Embed under it. */\n[data-vibe-menu] .vm-share-hero {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--space-12);\n padding: var(--space-8) 0 var(--space-16);\n}\n[data-vibe-menu] .vm-share-hero .vm-share-actions {\n justify-content: center;\n}\n/* #8326: the handle step leads the first share from a made handle; the pill spans the card. */\n[data-vibe-menu] .vm-share-handle-step {\n width: 100%;\n}\n/* #8641: the step asked as a question, \"Share as @handle?\", in the card's display face. */\n[data-vibe-menu] .vm-handle-question {\n margin: 0 0 var(--space-4);\n font: 700 18px/1.2 var(--font-display);\n color: var(--ink);\n overflow-wrap: anywhere;\n}\n[data-vibe-menu] .vm-handle-question-sub {\n margin: 0 0 var(--space-12);\n}\n[data-vibe-menu] .vm-handle-question-alt {\n margin: var(--space-12) 0 var(--space-8);\n}\n[data-vibe-menu] .vm-handle-ask {\n margin: 0;\n max-width: 100%;\n text-align: center;\n font-size: 14px;\n line-height: 1.35;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-handle-ask-name {\n overflow-wrap: anywhere;\n}\n[data-vibe-menu] .vm-handle-ask-link {\n font: inherit;\n color: var(--ink);\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: pointer;\n}\n/* #6658: who the link opens for, one quiet row under Copy link (29px at 390px in audition #9652). */\n[data-vibe-menu] p.vm-share-audience {\n margin-top: var(--space-10);\n}\n[data-vibe-menu] .vm-share-audience .vm-glyph {\n display: inline-block;\n width: 14px;\n height: 14px;\n vertical-align: -2px;\n margin-right: 4px;\n}\n/* Held at the line's height while who it opens for is still unknown, so the line lands without a jump. */\n[data-vibe-menu] .vm-share-audience[data-share-audience-pending] {\n visibility: hidden;\n}\n[data-vibe-menu] .vm-share-audience-act {\n white-space: nowrap;\n}\n[data-vibe-menu] .vm-input.vm-note-input {\n height: auto;\n min-height: 72px;\n margin-bottom: var(--space-8);\n padding: var(--space-12) var(--space-18);\n resize: none;\n}\n[data-vibe-menu] .vm-note-count {\n margin: 0 0 var(--space-8);\n text-align: right;\n font-size: 12px;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-share-hero .vm-reveal {\n width: 100%;\n padding: var(--space-12) 0 0;\n}\n/* Text is a real sms: link wearing the chip: no underline, centered label. */\n[data-vibe-menu] a.vm-chip {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n}\n/* Email a friend: the address field, Send under it, the line under that. */\n[data-vibe-menu] .vm-reveal[data-reveal=\"email-invite\"] {\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n}\n[data-vibe-menu] .vm-chip.has-glyph {\n display: inline-flex;\n align-items: center;\n gap: var(--space-6);\n}\n[data-vibe-menu] .vm-chip.has-glyph > svg {\n width: 14px;\n height: 14px;\n flex: none;\n}\n[data-vibe-menu] .vm-reveal + .vm-row,\n[data-vibe-menu] .vm-reveal + a.vm-row {\n border-top: var(--stroke-hairline) solid var(--line-hairline);\n}\n[data-vibe-menu] a.vm-row {\n color: var(--ink);\n text-decoration: none;\n}\n[data-vibe-menu] .vm-qr {\n display: inline-block;\n padding: var(--space-8);\n background: #ffffff;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-input);\n line-height: 0;\n}\n[data-vibe-menu] .vm-embed {\n display: block;\n width: 100%;\n height: calc(4.5em + 10px);\n margin-bottom: var(--space-8);\n padding: 8px 10px 0;\n resize: none;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-input);\n background: transparent;\n color: var(--ink);\n font: 400 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n/* Share as app: the 4:5 share image, held at its shape while it draws. */\n[data-vibe-menu] .vm-share-image {\n width: min(100%, 240px);\n aspect-ratio: 4 / 5;\n margin: 0 auto var(--space-14);\n overflow: hidden;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-card);\n}\n[data-vibe-menu] .vm-share-image > img {\n display: block;\n width: 100%;\n height: 100%;\n}\n[data-vibe-menu] .vm-share-image-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n font-size: 12px;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-share-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-8);\n}\n[data-vibe-menu] .vm-card-status {\n margin: var(--space-12) 0 0;\n}\n/* Phone sizing is the named container query (T5 note 5). The @media arm keeps\n the iOS no-zoom-on-focus guarantee keyed on the device as well. */\n@container vibe-menu (max-width: 480px) {\n [data-vibe-menu] .vm-embed {\n font-size: 16px;\n }\n}\n@media (max-width: 480px) {\n [data-vibe-menu] .vm-embed {\n font-size: 16px;\n }\n}\n";
@@ -60,6 +60,19 @@ export const SHARE_CARD_CSS = `
60
60
  [data-vibe-menu] .vm-share-handle-step {
61
61
  width: 100%;
62
62
  }
63
+ /* #8641: the step asked as a question, "Share as @handle?", in the card's display face. */
64
+ [data-vibe-menu] .vm-handle-question {
65
+ margin: 0 0 var(--space-4);
66
+ font: 700 18px/1.2 var(--font-display);
67
+ color: var(--ink);
68
+ overflow-wrap: anywhere;
69
+ }
70
+ [data-vibe-menu] .vm-handle-question-sub {
71
+ margin: 0 0 var(--space-12);
72
+ }
73
+ [data-vibe-menu] .vm-handle-question-alt {
74
+ margin: var(--space-12) 0 var(--space-8);
75
+ }
63
76
  [data-vibe-menu] .vm-handle-ask {
64
77
  margin: 0;
65
78
  max-width: 100%;
@@ -15,7 +15,6 @@ export declare const SHARE_HANDLE_ASK: Readonly<{
15
15
  choose: "Choose your handle";
16
16
  }>;
17
17
  export declare const SHARE_HANDLE_STEP: Readonly<{
18
- line: "Your link carries the name you pick";
19
18
  shareAs: "Share as";
20
19
  }>;
21
20
  export declare const SHARE_AUDIENCE: Readonly<{
@@ -27,6 +26,16 @@ export declare const SHARE_AUDIENCE: Readonly<{
27
26
  makePublic: "Make public";
28
27
  makingPublic: "Making it public…";
29
28
  }>;
29
+ export declare const HANDLE_TYPE_FIRST: Readonly<{
30
+ question: "What should people call you?";
31
+ sub: "Your apps live at this name, and it's what people see when you share one.";
32
+ needAnIdea: "Need an idea?";
33
+ youAre: "You're";
34
+ forNow: "for now.";
35
+ shareAskSub: "This is the name on the link people open.";
36
+ shareYes: "Yes, share it";
37
+ shareChange: "Pick a different handle";
38
+ }>;
30
39
  export declare const CREATE_ACCOUNT_TO_KEEP_APPS = "Create a free account for all your devices";
31
40
  export declare const KEEP_APP_LINE: Readonly<{
32
41
  lead: "Keep this app:";
@@ -77,6 +86,11 @@ export interface CheckRowDetail {
77
86
  export declare function checkRowDetails(found: CheckRowFindings): readonly CheckRowDetail[];
78
87
  export declare function checkRowAllClear(found: CheckRowFindings): boolean;
79
88
  export declare function checkRowVerdict(found: CheckRowFindings): string;
89
+ export declare const CODE_ANSWER_LINE: Readonly<{
90
+ lead: "Answered in Chat:";
91
+ action: "Read it";
92
+ label: "Read the answer in Chat";
93
+ }>;
80
94
  export declare const GUEST_BUILD_NOTE: Readonly<{
81
95
  lead: "You’re building as a guest,";
82
96
  body: "and your first change is free too. A free account keeps it going with 1,000 credits every month.";
@@ -16,7 +16,7 @@ export const JOIN_OR_SIGN_IN = "Join or sign in";
16
16
  export const SIGN_IN_TO_KEEP_APP = "Sign in to keep your app";
17
17
  export const SHARE_DEV_DRAFT_LINE = "Sharing opens when your app is ready.";
18
18
  export const SHARE_HANDLE_ASK = Object.freeze({ sharedAs: "Shared as", choose: "Choose your handle" });
19
- export const SHARE_HANDLE_STEP = Object.freeze({ line: "Your link carries the name you pick", shareAs: "Share as" });
19
+ export const SHARE_HANDLE_STEP = Object.freeze({ shareAs: "Share as" });
20
20
  export const SHARE_AUDIENCE = Object.freeze({
21
21
  public: "Anyone with the link can open it",
22
22
  justYou: "Opens just for you",
@@ -26,6 +26,16 @@ export const SHARE_AUDIENCE = Object.freeze({
26
26
  makePublic: "Make public",
27
27
  makingPublic: "Making it public…",
28
28
  });
29
+ export const HANDLE_TYPE_FIRST = Object.freeze({
30
+ question: "What should people call you?",
31
+ sub: "Your apps live at this name, and it's what people see when you share one.",
32
+ needAnIdea: "Need an idea?",
33
+ youAre: "You're",
34
+ forNow: "for now.",
35
+ shareAskSub: "This is the name on the link people open.",
36
+ shareYes: "Yes, share it",
37
+ shareChange: "Pick a different handle",
38
+ });
29
39
  export const CREATE_ACCOUNT_TO_KEEP_APPS = "Create a free account for all your devices";
30
40
  export const KEEP_APP_LINE = Object.freeze({
31
41
  lead: "Keep this app:",
@@ -98,6 +108,11 @@ export function checkRowVerdict(found) {
98
108
  return `${ran} of ${details.length} checked`;
99
109
  return CHECK_ROW.allClear;
100
110
  }
111
+ export const CODE_ANSWER_LINE = Object.freeze({
112
+ lead: "Answered in Chat:",
113
+ action: "Read it",
114
+ label: "Read the answer in Chat",
115
+ });
101
116
  export const GUEST_BUILD_NOTE = Object.freeze({
102
117
  lead: "You’re building as a guest,",
103
118
  body: "and your first change is free too. A free account keeps it going with 1,000 credits every month.",
@@ -0,0 +1,6 @@
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";
3
+ export declare function CodeAnswerLine(props: {
4
+ readonly text: string;
5
+ readonly onOpen: () => void;
6
+ }): React.ReactElement;
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import { CODE_ANSWER_LINE } from "../copy.js";
3
+ export const CODE_ANSWER_CSS = `
4
+ [data-vibe-menu] .vm-code-answer {
5
+ width: 100%; margin: 0 0 10px; padding: 0; text-align: left;
6
+ font: 400 14px/1.4 var(--font-display); color: var(--muted); cursor: pointer;
7
+ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
8
+ }
9
+ [data-vibe-menu] .vm-code-answer > strong { color: var(--ink); font-weight: 700; }
10
+ [data-vibe-menu] .vm-code-answer-cta { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
11
+ [data-vibe-menu] .vm-code-answer:focus-visible { outline: var(--stroke-focus) solid var(--line-card); outline-offset: 2px; }
12
+ `;
13
+ export function CodeAnswerLine(props) {
14
+ return (React.createElement("button", { type: "button", className: "vm-code-answer", "data-code-answer-line": "", "aria-label": CODE_ANSWER_LINE.label, onClick: props.onOpen },
15
+ React.createElement("strong", null, CODE_ANSWER_LINE.lead),
16
+ " ",
17
+ props.text,
18
+ " ",
19
+ React.createElement("span", { className: "vm-code-answer-cta" }, CODE_ANSWER_LINE.action)));
20
+ }
@@ -8,6 +8,8 @@ export interface ExpectedTimeLinks {
8
8
  readonly safeToLeave?: boolean;
9
9
  readonly listed?: boolean;
10
10
  readonly onNote?: (action: FirstBuildNoteAction) => void;
11
+ readonly waitClaim?: React.ReactNode;
12
+ readonly waitClaimRoom?: React.ReactNode;
11
13
  }
12
14
  export type FirstBuildNoteAction = "shown" | "my_vibes_tapped";
13
15
  export declare const ExpectedTimeLinksContext: React.Context<ExpectedTimeLinks>;
@@ -70,7 +70,8 @@ export function ExpectedTimeReserve({ ms = 120_000 }) {
70
70
  React.createElement("style", null, EXPECTED_TIME_CSS),
71
71
  React.createElement("div", { className: "vm-expected-track" }),
72
72
  React.createElement("p", { className: "vm-expected-note" },
73
- React.createElement(Reserve, { text: [expectedTimeNote(ms), ...findIt(links)] }))));
73
+ React.createElement(Reserve, { text: [expectedTimeNote(ms), ...findIt(links)] })),
74
+ links.waitClaimRoom));
74
75
  }
75
76
  export function ExpectedTimeBar({ expected }) {
76
77
  const links = React.useContext(ExpectedTimeLinksContext);
@@ -86,5 +87,6 @@ export function ExpectedTimeBar({ expected }) {
86
87
  React.createElement("div", { className: "vm-expected-fill", "data-testid": "expected-time-fill", "data-moving": moving ? "" : undefined, style: { transform: `scaleX(${fraction.toFixed(4)})` } })),
87
88
  links.safeToLeave !== false ? (React.createElement(ExpectedTimeNote, { ms: expected.ms })) : (React.createElement("p", { className: "vm-expected-note" },
88
89
  expectedTimeNote(expected.ms, false),
89
- React.createElement(Reserve, { text: [expectedTimeNote(expected.ms).slice(expectedTimeNote(expected.ms, false).length), ...findIt(links)] })))));
90
+ React.createElement(Reserve, { text: [expectedTimeNote(expected.ms).slice(expectedTimeNote(expected.ms, false).length), ...findIt(links)] }))),
91
+ links.waitClaim));
90
92
  }
@@ -86,6 +86,12 @@ export interface AccountSlice {
86
86
  readonly provisionalOnly?: boolean;
87
87
  readonly tabRow?: boolean;
88
88
  }
89
+ export type CodeAnswerOpenVia = "line" | "tab" | "summary";
90
+ export interface CodeAnswerSlice {
91
+ readonly key: string;
92
+ readonly text: string;
93
+ onOpen(via: CodeAnswerOpenVia): void;
94
+ }
89
95
  export interface CodeSlice {
90
96
  readonly firstBuildRequest?: string;
91
97
  readonly sentTurnLive?: boolean;
@@ -93,6 +99,7 @@ export interface CodeSlice {
93
99
  readonly composerHidden?: boolean;
94
100
  readonly steadyNav?: boolean;
95
101
  readonly chatOnly?: boolean;
102
+ readonly codeAnswer?: CodeAnswerSlice;
96
103
  composer: ComposerSlice;
97
104
  moments: readonly MomentItem[];
98
105
  onMomentAction(item: MomentItem, action: string): void;
@@ -101,6 +108,7 @@ export interface CodeSlice {
101
108
  suggestions: readonly string[];
102
109
  goldSuggestion: string | null;
103
110
  onSuggestion(text: string): unknown;
111
+ readonly actionSuggestions?: readonly string[];
104
112
  suggestionFastPaths: readonly SuggestionFastPath[] | null;
105
113
  onToggleFastPath: ((text: string) => void) | null;
106
114
  kicker: string;
@@ -371,6 +379,8 @@ export interface VibeMenuProps {
371
379
  openingKey?: number;
372
380
  labeledMenu?: LabeledMenuVariant;
373
381
  onFirstBuildNote?: (action: FirstBuildNoteAction) => void;
382
+ firstBuildWaitClaim?: ReactNode;
383
+ firstBuildWaitClaimRoom?: ReactNode;
374
384
  }
375
385
  export interface CardNav {
376
386
  readonly view: MenuView | null;
@@ -374,7 +374,7 @@ export function useImgGen(opts) {
374
374
  }
375
375
  await decide(rMediaDocs.Ok(), localLegacy, false);
376
376
  }
377
- async function readBackForDisplay(shown, fileKey, localDocs, legacyDoc) {
377
+ async function readBackForDisplay({ shown, fileKey, localDocs, legacyDoc, }) {
378
378
  const ourVersionId = sortVersionDocs(localDocs).find((vd) => vd._files[fileKey]?.uploadId === shown._files?.[fileKey]?.uploadId)?._id;
379
379
  const uploadId = shown._files?.[fileKey]?.uploadId;
380
380
  if (confirmedMediaProbe === undefined || confirmedMediaProbe === null)
@@ -480,15 +480,15 @@ export function useImgGen(opts) {
480
480
  if (urlPending) {
481
481
  currentGenRef.current = null;
482
482
  if (shownLocally === false)
483
- await readBackForDisplay(existingDoc, currentVer.id, mediaDocs, legacyDoc);
483
+ await readBackForDisplay({ shown: existingDoc, fileKey: currentVer.id, localDocs: mediaDocs, legacyDoc });
484
484
  else if (currentUpload !== undefined) {
485
485
  const fileKey = currentVer.id;
486
486
  const restart = () => {
487
487
  displayReadBackRef.current = null;
488
- void readBackForDisplay(existingDoc, fileKey, mediaDocs, legacyDoc);
488
+ void readBackForDisplay({ shown: existingDoc, fileKey, localDocs: mediaDocs, legacyDoc });
489
489
  };
490
490
  retryDisplayReadBackRef.current = { uploadId: currentUpload, run: restart };
491
- void readBackForDisplay(existingDoc, fileKey, mediaDocs, legacyDoc);
491
+ void readBackForDisplay({ shown: existingDoc, fileKey, localDocs: mediaDocs, legacyDoc });
492
492
  }
493
493
  }
494
494
  else {
@@ -24,7 +24,7 @@ export function usePictureSrc(args) {
24
24
  objectUrl = URL.createObjectURL(blob);
25
25
  setResolved({ key: k, src: objectUrl, unavailable: false });
26
26
  }
27
- async function resolve(k, s, u, id) {
27
+ async function resolve({ k, s, u, id }) {
28
28
  const rHit = await exception2Result(() => s.lookup(id));
29
29
  if (gone())
30
30
  return;
@@ -76,7 +76,7 @@ export function usePictureSrc(args) {
76
76
  setResolved({ key: k, src: undefined, unavailable: true });
77
77
  onUnavailable(id);
78
78
  }
79
- void resolve(key, store, url, uploadId);
79
+ void resolve({ k: key, s: store, u: url, id: uploadId });
80
80
  return () => {
81
81
  mount.live = false;
82
82
  if (objectUrl !== undefined)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/base",
3
- "version": "14.3.370",
3
+ "version": "14.3.372",
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.370",
14
- "@vibes.diy/use-vibes-types": "14.3.370",
15
- "@vibes.diy/vibe-runtime": "14.3.370",
16
- "@vibes.diy/vibe-types": "14.3.370",
13
+ "@vibes.diy/api-types": "14.3.372",
14
+ "@vibes.diy/use-vibes-types": "14.3.372",
15
+ "@vibes.diy/vibe-runtime": "14.3.372",
16
+ "@vibes.diy/vibe-types": "14.3.372",
17
17
  "arktype": "~2.2.9",
18
18
  "officeparser": "~8.7.1",
19
19
  "qrcode-generator": "~2.0.4",