@vibes.diy/base 14.3.422 → 14.3.424

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.
Files changed (39) hide show
  1. package/components/AttachmentRow.d.ts +1 -1
  2. package/components/AttachmentRow.js +2 -1
  3. package/components/FaqView.d.ts +1 -1
  4. package/components/FaqView.js +2 -1
  5. package/components/HandleLookupView.d.ts +1 -1
  6. package/components/HandleLookupView.js +2 -1
  7. package/components/HandlePickerMenu.d.ts +1 -1
  8. package/components/HandlePickerMenu.js +2 -1
  9. package/components/HiddenMenuWrapper.d.ts +1 -1
  10. package/components/HiddenMenuWrapper.js +2 -1
  11. package/components/ImgGen.d.ts +1 -1
  12. package/components/ImgGen.js +2 -1
  13. package/components/NotificationDetailView.d.ts +2 -1
  14. package/components/NotificationDetailView.js +10 -7
  15. package/components/OnboardingOverlay.d.ts +1 -1
  16. package/components/OnboardingOverlay.js +2 -1
  17. package/components/QrCode.d.ts +1 -1
  18. package/components/QrCode.js +2 -1
  19. package/components/StyleControls.js +11 -2
  20. package/components/VibesButton.d.ts +1 -1
  21. package/components/VibesButton.js +2 -1
  22. package/components/VibesPanel.d.ts +1 -1
  23. package/components/VibesPanel.js +2 -1
  24. package/components/VibesWindowFrame.d.ts +1 -1
  25. package/components/VibesWindowFrame.js +2 -1
  26. package/components/ViewerTagView.d.ts +1 -1
  27. package/components/ViewerTagView.js +2 -1
  28. package/components/icons/TexturedPattern.d.ts +1 -1
  29. package/components/icons/TexturedPattern.js +2 -1
  30. package/components/vibe-menu/cards/CodeCard.js +8 -1
  31. package/components/vibe-menu/cards/share-parts.js +1 -1
  32. package/components/vibe-menu/parts/Composer.js +5 -3
  33. package/components/vibe-menu/parts/MemberRow.d.ts +1 -0
  34. package/components/vibe-menu/parts/MemberRow.js +7 -3
  35. package/components/vibe-menu/parts/refused-send.d.ts +1 -0
  36. package/components/vibe-menu/parts/refused-send.js +1 -0
  37. package/components/vibe-menu/parts/use-composer-draft.js +1 -1
  38. package/components/vibe-menu/slices.d.ts +1 -0
  39. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import { type AttachmentChip } from "../attachments/use-attachments.js";
3
3
  export declare function AttachmentButton({ onFiles, onBeforeSelect, onCancel, disabled, className, }: {
4
4
  readonly onFiles: (files: File[]) => void;
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useRef } from "react";
1
+ import * as React from "react";
2
+ import { useEffect, useRef } from "react";
2
3
  import { ATTACHMENT_ACCEPT } from "../attachments/attachment-types.js";
3
4
  import { attachmentRemoveName, leftOutSentence } from "../attachments/use-attachments.js";
4
5
  import { PaperclipIcon } from "./icons/PaperclipIcon.js";
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export interface FaqViewProps {
3
3
  readonly ownerHandle?: string;
4
4
  readonly onAbout?: () => void;
@@ -1,4 +1,5 @@
1
- import React, { useState } from "react";
1
+ import * as React from "react";
2
+ import { useState } from "react";
2
3
  import { HOME_BRAND_FONT } from "./homeBrandFont.js";
3
4
  function faqItems(ownerHandle) {
4
5
  const owner = ownerHandle ? `@${ownerHandle}` : "the maker";
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export interface HandleLookupItem {
3
3
  readonly slug: string;
4
4
  readonly known: boolean;
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useRef, useState } from "react";
1
+ import * as React from "react";
2
+ import { useEffect, useRef, useState } from "react";
2
3
  import { toRFC2822_32ByteLength } from "@vibes.diy/vibe-types";
3
4
  const DEFAULT_INPUT_STYLE = {
4
5
  width: "100%",
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import { toRFC2822_32ByteLength } from "@vibes.diy/vibe-types";
3
3
  export interface HandleOption {
4
4
  readonly slug: string;
@@ -1,4 +1,5 @@
1
- import React, { useState } from "react";
1
+ import * as React from "react";
2
+ import { useState } from "react";
2
3
  import { toRFC2822_32ByteLength } from "@vibes.diy/vibe-types";
3
4
  export const sanitizeHandle = toRFC2822_32ByteLength;
4
5
  export function HandlePickerMenu({ handles, activeSlug, onSelect, onNewHandle, busy, placement = "down", onResetToDefault, resetToDefaultLabel, onLogout, header, onSignIn, onSettings, onMyVibes, onMemberships, style, }) {
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export interface HiddenMenuWrapperProps {
3
3
  children: React.ReactNode;
4
4
  menuContent: React.ReactNode;
@@ -1,4 +1,5 @@
1
- import React, { useRef, useState, useEffect, useLayoutEffect } from "react";
1
+ import * as React from "react";
2
+ import { useRef, useState, useEffect, useLayoutEffect } from "react";
2
3
  import { HiddenMenuWrapperStyles } from "./HiddenMenuWrapper.styles.js";
3
4
  import { VibesSwitch } from "./VibesSwitch.js";
4
5
  import { URI } from "@adviser/cement";
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import { type ConfirmedMediaProbe, type Database } from "@vibes.diy/vibe-runtime";
3
3
  import type { ImgGenInputImage, ImgGenRequestOptions, ImgGenResult } from "@vibes.diy/vibe-types";
4
4
  import type { Result } from "@adviser/cement";
@@ -1,4 +1,5 @@
1
- import React, { useState, useCallback, useEffect, useMemo } from "react";
1
+ import * as React from "react";
2
+ import { useState, useCallback, useEffect, useMemo } from "react";
2
3
  import { getRegisteredVibeApi } from "@vibes.diy/vibe-runtime";
3
4
  import { IMG_GEN_PAUSED_MESSAGE, isCaptureRefused } from "@vibes.diy/vibe-types";
4
5
  import { useImgGen } from "../hooks/img-gen/use-img-gen.js";
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export interface NotificationDetailBuild {
3
3
  readonly versionLabel?: string;
4
4
  readonly when?: string;
@@ -22,6 +22,7 @@ export interface NotificationDetailViewProps {
22
22
  readonly turnSnippet?: string;
23
23
  readonly accessRequest?: {
24
24
  readonly requester: string;
25
+ readonly requesterName?: string;
25
26
  readonly state: "pending" | "approved" | "revoked" | "decided";
26
27
  readonly approvedRole?: string;
27
28
  readonly busy: boolean;
@@ -1,4 +1,5 @@
1
- import React, { useState } from "react";
1
+ import * as React from "react";
2
+ import { useState } from "react";
2
3
  function ActorAvatar({ url, handle }) {
3
4
  const [failedSrc, setFailedSrc] = useState(undefined);
4
5
  if (failedSrc === url) {
@@ -15,6 +16,11 @@ function MuteToggle({ testId, label, target, checked, disabled, onToggle, }) {
15
16
  }
16
17
  export function NotificationDetailView(props) {
17
18
  const { build } = props;
19
+ const who = props.accessRequest === undefined
20
+ ? ""
21
+ : props.accessRequest.requesterName === undefined
22
+ ? `@${props.accessRequest.requester}`
23
+ : `${props.accessRequest.requesterName} (@${props.accessRequest.requester})`;
18
24
  const buildBits = [];
19
25
  if (build?.versionLabel !== undefined && build.versionLabel !== "")
20
26
  buildBits.push(build.versionLabel);
@@ -36,17 +42,14 @@ export function NotificationDetailView(props) {
36
42
  props.accessRequest !== undefined && (React.createElement("div", { "data-testid": "notification-detail-access", "data-access-state": props.accessRequest.state, className: "flex flex-col gap-2 rounded-md border border-black/10 p-3 dark:border-white/10" },
37
43
  React.createElement("p", { className: "text-light-primary dark:text-dark-primary", style: { fontSize: 14, fontWeight: 600, margin: 0 } },
38
44
  props.accessRequest.state === "pending" && React.createElement(React.Fragment, null,
39
- "@",
40
- props.accessRequest.requester,
45
+ who,
41
46
  " requested access"),
42
47
  props.accessRequest.state === "approved" && (React.createElement(React.Fragment, null,
43
- "@",
44
- props.accessRequest.requester,
48
+ who,
45
49
  " approved",
46
50
  props.accessRequest.approvedRole ? ` as ${props.accessRequest.approvedRole}` : "")),
47
51
  props.accessRequest.state === "revoked" && React.createElement(React.Fragment, null,
48
- "@",
49
- props.accessRequest.requester,
52
+ who,
50
53
  " request rejected"),
51
54
  props.accessRequest.state === "decided" && React.createElement(React.Fragment, null, "This request was already decided")),
52
55
  props.accessRequest.state === "pending" && (React.createElement("div", { className: "flex flex-wrap items-center", style: { gap: 8 } },
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export type OnboardingStep = "avatar";
3
3
  export interface OnboardingOverlayProps {
4
4
  readonly busy?: boolean;
@@ -1,4 +1,5 @@
1
- import React, { useEffect } from "react";
1
+ import * as React from "react";
2
+ import { useEffect } from "react";
2
3
  import { SAFE_AREA_TOP } from "../theme/safe-area.js";
3
4
  export function OnboardingOverlay({ busy, avatarSlot, appState, onViewApp, onFinish, onSkip, onStepShown, }) {
4
5
  useEffect(() => {
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export interface QrCodeProps {
3
3
  readonly value: string;
4
4
  readonly size?: number;
@@ -1,4 +1,5 @@
1
- import React, { useMemo } from "react";
1
+ import * as React from "react";
2
+ import { useMemo } from "react";
2
3
  import qrcode from "qrcode-generator";
3
4
  export function QrCode({ value, size = 128, margin = 4, className, style, title }) {
4
5
  const path = useMemo(() => {
@@ -41,6 +41,15 @@ function LockIcon({ locked }) {
41
41
  React.createElement("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2", fill: locked ? "currentColor" : "none" }),
42
42
  React.createElement("path", { d: locked ? "M8 11V7a4 4 0 0 1 8 0v4" : "M8 11V7a4 4 0 0 1 7.5-2" })));
43
43
  }
44
+ const QUIET_DRAG_ATTR = "data-ph-no-autocapture";
45
+ const quietColorDrag = {
46
+ onPointerDown: (e) => e.currentTarget.removeAttribute(QUIET_DRAG_ATTR),
47
+ onKeyDown: (e) => e.currentTarget.removeAttribute(QUIET_DRAG_ATTR),
48
+ };
49
+ function quietDrag(e) {
50
+ e.currentTarget.setAttribute(QUIET_DRAG_ATTR, "");
51
+ return e.currentTarget.value;
52
+ }
44
53
  const MOSAIC_SLOTS = [
45
54
  { index: 0, slot: "lead" },
46
55
  { index: ROOM_ACCENT_INDEX, slot: "gap" },
@@ -54,7 +63,7 @@ function RoomMosaic({ views, labels, onHue, onPickColor, onTogglePin, }) {
54
63
  const unlockTitle = `Unlock ${labels[index]} so it follows ${labels[0]} again`;
55
64
  return (React.createElement("span", { key: index, "data-slot": slot, className: "style-mosaic-cell" },
56
65
  React.createElement("label", { "data-testid": `hue-control-${index + 1}`, className: "style-mosaic-tile", title: `Change ${labels[index]}`, style: { background: view.hex } },
57
- React.createElement("input", { type: "color", "aria-label": `${labels[index]} color`, value: view.hex, onChange: (e) => pick(e.target.value) })),
66
+ React.createElement("input", { type: "color", "aria-label": `${labels[index]} color`, value: view.hex, ...quietColorDrag, onChange: (e) => pick(quietDrag(e)) })),
58
67
  index === ROOM_ACCENT_INDEX && view.pinned ? (React.createElement("button", { type: "button", className: "style-mosaic-lock", "aria-label": unlockTitle, title: unlockTitle, onClick: () => onTogglePin(index) },
59
68
  React.createElement(LockIcon, { locked: true }))) : null));
60
69
  })));
@@ -245,7 +254,7 @@ function CascadeColor({ props }) {
245
254
  : `Pin ${label} so control ${index} stops moving it`;
246
255
  return (React.createElement("span", { key: index, "data-testid": `hue-control-${index + 1}`, "data-slot": CASCADE_SLOTS[index], className: "style-mosaic-cell" },
247
256
  React.createElement("label", { className: "style-mosaic-tile", title: `Change ${label}`, style: { background: view.hex } },
248
- React.createElement("input", { type: "color", "aria-label": `${label} color`, value: view.hex, onChange: (e) => props.onHue(index, e.target.value) })),
257
+ React.createElement("input", { type: "color", "aria-label": `${label} color`, value: view.hex, ...quietColorDrag, onChange: (e) => props.onHue(index, quietDrag(e)) })),
249
258
  index === 0 ? null : (React.createElement("button", { type: "button", className: "style-mosaic-lock", "aria-pressed": view.pinned, "aria-label": pinTitle, title: pinTitle, "data-pinned": view.pinned ? "true" : "false", onClick: () => props.onTogglePin(index) },
250
259
  React.createElement(LockIcon, { locked: view.pinned })))));
251
260
  })),
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export declare const BLUE: "blue";
3
3
  export declare const RED: "red";
4
4
  export declare const YELLOW: "yellow";
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useState } from "react";
1
+ import * as React from "react";
2
+ import { useEffect, useState } from "react";
2
3
  import { VibesButtonStyles, bounceKeyframes } from "./VibesButton.styles.js";
3
4
  import { LoginIcon, RemixIcon, InviteIcon, SettingsIcon, BackIcon, CollabIcon } from "./icons/index.js";
4
5
  import { useMobile } from "../hooks/useMobile.js";
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export interface VibesPanelProps {
3
3
  readonly style?: React.CSSProperties;
4
4
  readonly className?: string;
@@ -1,4 +1,5 @@
1
- import React, { useState, useEffect, useId } from "react";
1
+ import * as React from "react";
2
+ import { useState, useEffect, useId } from "react";
2
3
  import { VibesButton, BLUE, RED, YELLOW, GRAY } from "./VibesButton.js";
3
4
  import { BrutalistCard } from "./BrutalistCard.js";
4
5
  import { LabelContainer } from "./LabelContainer.js";
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export declare function useWindowBarCenter(): HTMLElement | null;
3
3
  export interface VibesWindowFrameProps {
4
4
  menuOpen: boolean;
@@ -1,4 +1,5 @@
1
- import React, { createContext, useContext, useEffect, useId, useRef, useState } from "react";
1
+ import * as React from "react";
2
+ import { createContext, useContext, useEffect, useId, useRef, useState } from "react";
2
3
  import { VibesWindowHeader, VibesWindowStyles } from "./VibesWindowHeader.js";
3
4
  import { LAUNCH_PAGE_COPY, LaunchMoment } from "./vibe-menu/cards/LaunchMoment.js";
4
5
  const WindowBarCenterContext = createContext(null);
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  export interface ViewerTagViewProps {
3
3
  readonly slug: string;
4
4
  readonly displayName?: string;
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useRef, useState } from "react";
1
+ import * as React from "react";
2
+ import { useEffect, useRef, useState } from "react";
2
3
  function CameraGlyph({ size }) {
3
4
  return (React.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", width: size, height: size, style: { display: "block" }, fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" },
4
5
  React.createElement("path", { d: "M4 7h4l2-2h4l2 2h4a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1Z" }),
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  interface TexturedPatternProps {
3
3
  width?: number;
4
4
  height?: number;
@@ -1,4 +1,5 @@
1
- import React, { useId } from "react";
1
+ import * as React from "react";
2
+ import { useId } from "react";
2
3
  export function TexturedPattern({ width = 75.78, height = 75.78, borderRadius = 20.08 }) {
3
4
  const patternId = useId();
4
5
  return (React.createElement("svg", { width: width, height: height, viewBox: "0 0 75.78 75.78", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink" },
@@ -111,6 +111,12 @@ function kickerFor(input) {
111
111
  function neutralComposer(composer) {
112
112
  return { ...composer, placeholder: "", cap: composer.cap === "Remix this" ? "Send" : composer.cap };
113
113
  }
114
+ function remixComposer(composer, remixHint) {
115
+ if (composer.cap !== "Remix this" || composer.refusedSend !== undefined)
116
+ return composer;
117
+ const idea = remixHint.replace(/…$/, "").trim();
118
+ return { ...composer, refusedSend: { ideas: idea === "" ? [] : [idea] } };
119
+ }
114
120
  export function CodeCard(props) {
115
121
  const { viewer, code, nav, draft } = props;
116
122
  const composerField = React.useRef(null);
@@ -170,7 +176,7 @@ export function CodeCard(props) {
170
176
  pinnedLeftAt.current = Date.now();
171
177
  hadPinned.current = moment.pinned !== null;
172
178
  const kicker = kickerFor({ code, banner: nav.banner, editor, pending });
173
- const composer = pending === true ? neutralComposer(code.composer) : code.composer;
179
+ const composer = pending === true ? neutralComposer(code.composer) : remixComposer(code.composer, props.remixHint);
174
180
  const placeholder = pending === true ? "" : composer.cap === "Remix this" && props.remixHint !== "" ? props.remixHint : composer.placeholder;
175
181
  const requestHead = request !== undefined && request !== "" ? (React.createElement(React.Fragment, null,
176
182
  React.createElement("p", { className: "vm-kicker" }, "Your request"),
@@ -400,6 +406,7 @@ export function CodeCard(props) {
400
406
  const askRoom = editor === true && code.guestBuild !== true && (firstBuild || bootHold);
401
407
  const askSlot = guestSlot && (buildAskNode !== null || guestBuildNode !== null) ? (React.createElement("div", { className: "vm-guest-slot", "data-guest-build-slot": "" },
402
408
  guestSpacer,
409
+ React.createElement(BuildAskRoom, null),
403
410
  buildAskNode,
404
411
  guestBuildNode)) : askRoom ? (React.createElement("div", { className: "vm-ask-slot", "data-build-ask-slot": "" },
405
412
  buildAskNode,
@@ -68,7 +68,7 @@ function approveFailureText(handle) {
68
68
  };
69
69
  }
70
70
  export function RequestBlock({ request, share, actions, }) {
71
- return (React.createElement(MemberRequest, { key: request.key, who: request.key, handle: request.handle, pending: actions.busy.has(request.key), onApprove: ({ data, code }) => void actions.run(request.key, approveFailureText(request.handle), () => share.onApprove(request.key, data, code)), onDecline: () => void actions.run(request.key, `Couldn't answer @${request.handle}. Try again`, () => share.onDecline(request.key)) }));
71
+ return (React.createElement(MemberRequest, { key: request.key, who: request.key, handle: request.handle, ...(request.name === undefined ? {} : { name: request.name }), pending: actions.busy.has(request.key), onApprove: ({ data, code }) => void actions.run(request.key, approveFailureText(request.handle), () => share.onApprove(request.key, data, code)), onDecline: () => void actions.run(request.key, `Couldn't answer @${request.handle}. Try again`, () => share.onDecline(request.key)) }));
72
72
  }
73
73
  export function OwnerMemberRow({ member, share, actions, nav, }) {
74
74
  const failure = `Couldn't change ${memberDisplayName(member)}'s access. Try again`;
@@ -28,7 +28,7 @@ function RefusedSendLine(props) {
28
28
  n > 0 ? React.createElement("span", { "aria-hidden": "true" }, " \u00B7 ") : " ",
29
29
  React.createElement("button", { type: "button", className: "vm-door", title: idea, onClick: () => props.onIdea(idea) }, idea))))));
30
30
  }
31
- return (React.createElement("p", { className: "vm-door-line", "data-refused-send": "", "aria-live": "polite" }, changeRefusedSendLine(refused)));
31
+ return (React.createElement("p", { className: "vm-door-line", "data-refused-send": "", "aria-live": "polite" }, refused === "empty" && props.remix === true ? REFUSED_SEND_COPY.remixEmpty : changeRefusedSendLine(refused)));
32
32
  }
33
33
  function IdeaHeldLine(props) {
34
34
  const door = props.hold.door;
@@ -340,7 +340,9 @@ export function Composer(props) {
340
340
  }
341
341
  return;
342
342
  }
343
- if (composer.refusedSend === undefined || composer.cap === "Remix this")
343
+ if (composer.refusedSend === undefined)
344
+ return;
345
+ if (composer.cap === "Remix this" && kind !== "empty")
344
346
  return;
345
347
  refusedShown.current = true;
346
348
  setRefused(kind);
@@ -392,5 +394,5 @@ export function Composer(props) {
392
394
  React.createElement("button", { className: "vm-cap", type: "button", "data-stop": "", "data-stopping": stopping === true ? "" : undefined, "data-stop-held": stopHeld === true && stopping === false ? "" : undefined, "aria-busy": stopping === true || stopHeld === true ? true : undefined, disabled: composer.stopDisabled === true || stopping === true || stopHeld === true, onClick: stop }, stopping === true ? "Stopping…" : stopHeld === true ? "Sending…" : "Stop"),
393
395
  sendCap)) : (sendCap)),
394
396
  composer.hold !== undefined ? (refused === "credits" || ideaHeld ? null : (React.createElement(HoldNote, { hold: composer.hold }))) : composer.queuedNote ? (React.createElement("p", { className: "vm-queue-note" }, "Sends when this finishes.")) : null,
395
- ideaHeld && composer.hold !== undefined ? (React.createElement(IdeaHeldLine, { hold: composer.hold })) : refused === "credits" && composer.hold !== undefined ? (React.createElement(RefusedSendLine, { key: heldPress, refused: refused, hold: composer.hold, onIdea: pickIdea, ...(heldPress > 0 ? { answer: heldPress } : {}) })) : refused !== null && composer.refusedSend !== undefined && composer.cap !== "Remix this" ? (React.createElement(RefusedSendLine, { refused: refused, refusedSend: composer.refusedSend, onIdea: pickIdea })) : composer.newAppDoor !== undefined && composer.cap !== "Remix this" ? (React.createElement(ChangeBoxHintLine, { door: composer.newAppDoor, draft: draft })) : null));
397
+ ideaHeld && composer.hold !== undefined ? (React.createElement(IdeaHeldLine, { hold: composer.hold })) : refused === "credits" && composer.hold !== undefined ? (React.createElement(RefusedSendLine, { key: heldPress, refused: refused, hold: composer.hold, onIdea: pickIdea, ...(heldPress > 0 ? { answer: heldPress } : {}) })) : refused !== null && composer.refusedSend !== undefined && (composer.cap !== "Remix this" || refused === "empty") ? (React.createElement(RefusedSendLine, { refused: refused, refusedSend: composer.refusedSend, remix: composer.cap === "Remix this", onIdea: pickIdea })) : composer.newAppDoor !== undefined && composer.cap !== "Remix this" ? (React.createElement(ChangeBoxHintLine, { door: composer.newAppDoor, draft: draft })) : null));
396
398
  }
@@ -26,6 +26,7 @@ export declare function MemberRow(props: MemberRowProps): React.ReactElement;
26
26
  export interface MemberRequestProps {
27
27
  readonly who: string;
28
28
  readonly handle: string;
29
+ readonly name?: string;
29
30
  readonly pending: boolean;
30
31
  readonly onApprove: (grants: {
31
32
  readonly data: "read" | "write";
@@ -43,10 +43,14 @@ export function MemberRequest(props) {
43
43
  return (React.createElement("div", { className: "vm-request", "data-request": props.who },
44
44
  React.createElement("div", { className: "vm-request-top" },
45
45
  React.createElement("span", null,
46
- React.createElement("b", null,
46
+ props.name === undefined ? (React.createElement("b", null,
47
47
  "@",
48
- props.handle),
49
- " wants access")),
48
+ props.handle)) : (React.createElement(React.Fragment, null,
49
+ React.createElement("b", null, props.name),
50
+ " @",
51
+ props.handle)),
52
+ " ",
53
+ "wants access")),
50
54
  React.createElement(GrantControls, { who: props.who, label: `@${props.handle}`, data: data, code: code, readOnly: false, onData: setData, onCode: setCode }),
51
55
  React.createElement("div", { className: "vm-request-actions" },
52
56
  React.createElement(Chip, { label: "Approve", disabled: props.pending, onClick: () => props.onApprove({ data, code }) }),
@@ -1,6 +1,7 @@
1
1
  export type RefusedSendKind = "empty" | "files_processing" | "files_full" | "credits";
2
2
  export declare const REFUSED_SEND_COPY: Readonly<{
3
3
  readonly changeEmpty: "Type a change first, like “make it pink”.";
4
+ readonly remixEmpty: "Say what your version adds, like “add a dark mode”.";
4
5
  readonly ideasLead: "Try:";
5
6
  readonly filesProcessing: "Your files are almost ready to send.";
6
7
  readonly filesFull: "Your queued change carries up to 4 files. Send these once this build finishes.";
@@ -1,6 +1,7 @@
1
1
  import { MAX_ATTACHMENTS } from "../../../attachments/attachment-types.js";
2
2
  export const REFUSED_SEND_COPY = Object.freeze({
3
3
  changeEmpty: "Type a change first, like “make it pink”.",
4
+ remixEmpty: "Say what your version adds, like “add a dark mode”.",
4
5
  ideasLead: "Try:",
5
6
  filesProcessing: "Your files are almost ready to send.",
6
7
  filesFull: `Your queued change carries up to ${MAX_ATTACHMENTS} files. Send these once this build finishes.`,
@@ -583,7 +583,7 @@ export function useComposerDraft(input) {
583
583
  }
584
584
  },
585
585
  selectSuggestion: (value) => {
586
- if (composer.rewrite !== undefined || (text !== "" && suggestion !== text))
586
+ if (composer.rewrite !== undefined || (text.trim() !== "" && suggestion !== text))
587
587
  return;
588
588
  setSuggestion(value);
589
589
  setText(value);
@@ -270,6 +270,7 @@ export interface ShareSlice {
270
270
  request: {
271
271
  key: string;
272
272
  handle: string;
273
+ name?: string;
273
274
  } | null;
274
275
  onApprove(key: string, data: "read" | "write", code: boolean): Promise<Result<void>>;
275
276
  onDecline(key: string): Promise<Result<void>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/base",
3
- "version": "14.3.422",
3
+ "version": "14.3.424",
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.422",
14
- "@vibes.diy/use-vibes-types": "14.3.422",
15
- "@vibes.diy/vibe-runtime": "14.3.422",
16
- "@vibes.diy/vibe-types": "14.3.422",
13
+ "@vibes.diy/api-types": "14.3.424",
14
+ "@vibes.diy/use-vibes-types": "14.3.424",
15
+ "@vibes.diy/vibe-runtime": "14.3.424",
16
+ "@vibes.diy/vibe-types": "14.3.424",
17
17
  "arktype": "~2.2.9",
18
18
  "officeparser": "~8.8.0",
19
19
  "qrcode-generator": "~2.0.4",