@vibes.diy/base 14.3.112 → 14.3.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/HomeBuildChips.d.ts +4 -0
- package/components/HomeBuildChips.js +24 -5
- package/components/HomeBuildChips.js.map +1 -1
- package/components/HomeBuildComposerNotes.d.ts +17 -0
- package/components/HomeBuildComposerNotes.js +71 -0
- package/components/HomeBuildComposerNotes.js.map +1 -0
- package/components/homeBuildDockCopy.d.ts +23 -0
- package/components/homeBuildDockCopy.js +46 -0
- package/components/homeBuildDockCopy.js.map +1 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -0
- package/components/index.js.map +1 -1
- package/components/vibe-menu/VibeMenu.js +16 -3
- package/components/vibe-menu/VibeMenu.js.map +1 -1
- package/components/vibe-menu/cards/AccountCard.d.ts +4 -1
- package/components/vibe-menu/cards/AccountCard.js +25 -9
- package/components/vibe-menu/cards/AccountCard.js.map +1 -1
- package/components/vibe-menu/cards/CodeCard.d.ts +1 -0
- package/components/vibe-menu/cards/CodeCard.js +4 -0
- package/components/vibe-menu/cards/CodeCard.js.map +1 -1
- package/components/vibe-menu/index.d.ts +2 -0
- package/components/vibe-menu/index.js +2 -0
- package/components/vibe-menu/index.js.map +1 -1
- package/components/vibe-menu/parts/StatusChipRow.d.ts +51 -0
- package/components/vibe-menu/parts/StatusChipRow.js +106 -0
- package/components/vibe-menu/parts/StatusChipRow.js.map +1 -0
- package/components/vibe-menu/parts/StatusLine.d.ts +21 -0
- package/components/vibe-menu/parts/StatusLine.js +25 -0
- package/components/vibe-menu/parts/StatusLine.js.map +1 -0
- package/components/vibe-menu/parts/VibesSwitchGlass.d.ts +0 -9
- package/components/vibe-menu/parts/VibesSwitchGlass.js +2 -17
- package/components/vibe-menu/parts/VibesSwitchGlass.js.map +1 -1
- package/components/vibe-menu/shell/VibeMenuShell.d.ts +5 -0
- package/components/vibe-menu/shell/VibeMenuShell.js +5 -1
- package/components/vibe-menu/shell/VibeMenuShell.js.map +1 -1
- package/components/vibe-menu/shell/shell.styles.js +208 -36
- package/components/vibe-menu/shell/shell.styles.js.map +1 -1
- package/components/vibe-menu/slices.d.ts +7 -0
- package/components/vibe-menu/slices.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { BuildPhase } from "@vibes.diy/api-types";
|
|
3
|
+
import { type HomeBuildDockHeader } from "./homeBuildDockCopy.js";
|
|
3
4
|
export type HomeBuildChipStatus = "starting" | "planning" | "building" | "queued" | "needs-you" | "ready" | "continue" | "failed" | "add-credits" | "sign-in" | "saved";
|
|
4
5
|
export interface HomeBuildChip {
|
|
5
6
|
readonly id: string;
|
|
@@ -15,6 +16,9 @@ export interface HomeBuildChipArrival {
|
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
18
|
export declare const HOME_BUILD_CHIP_LABELS: Readonly<Record<HomeBuildChipStatus, string>>;
|
|
19
|
+
export declare function homeBuildDockHeader(items: readonly Pick<HomeBuildChip, "status">[], opts?: {
|
|
20
|
+
readonly returning?: boolean;
|
|
21
|
+
}): HomeBuildDockHeader;
|
|
18
22
|
export declare function homeBuildChipStatus(phase: BuildPhase, opts?: {
|
|
19
23
|
readonly guest?: boolean;
|
|
20
24
|
}): HomeBuildChipStatus;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { HOME_BRAND_FONT } from "./homeBrandFont.js";
|
|
3
|
+
import { HOME_BUILD_DOCK_COPY, homeBuildDockHeaderText } from "./homeBuildDockCopy.js";
|
|
3
4
|
const paint = [
|
|
4
5
|
{ color: "#ef77a9", face: "game", ink: "#151515" },
|
|
5
6
|
{ color: "#445796", face: "education", ink: "#FEFFF1" },
|
|
@@ -19,6 +20,21 @@ export const HOME_BUILD_CHIP_LABELS = {
|
|
|
19
20
|
"sign-in": "Sign in",
|
|
20
21
|
saved: "Open app",
|
|
21
22
|
};
|
|
23
|
+
const OPENABLE_STATUSES = ["ready", "saved", "continue"];
|
|
24
|
+
const RUNNING_STATUSES = ["starting", "planning", "building", "queued"];
|
|
25
|
+
export function homeBuildDockHeader(items, opts = {}) {
|
|
26
|
+
if (opts.returning === true)
|
|
27
|
+
return "returning";
|
|
28
|
+
const ready = items.filter((item) => OPENABLE_STATUSES.includes(item.status)).length;
|
|
29
|
+
const running = items.filter((item) => RUNNING_STATUSES.includes(item.status)).length;
|
|
30
|
+
if (ready > 0 && ready === items.length)
|
|
31
|
+
return ready === 1 ? "ready-one" : "ready-many";
|
|
32
|
+
if (ready > 0)
|
|
33
|
+
return "mixed";
|
|
34
|
+
if (running > 0)
|
|
35
|
+
return running === 1 ? "building-one" : "building-many";
|
|
36
|
+
return "attention";
|
|
37
|
+
}
|
|
22
38
|
const LIVE_STATUSES = ["starting", "planning", "building"];
|
|
23
39
|
export function homeBuildChipStatus(phase, opts = {}) {
|
|
24
40
|
switch (phase) {
|
|
@@ -68,6 +84,8 @@ const css = `
|
|
|
68
84
|
.home-build-chip-slot:last-child .home-build-chip:hover .home-build-chip-title,.home-build-chip-slot:last-child .home-build-chip:focus .home-build-chip-title{transform:translateY(0)}
|
|
69
85
|
.home-build-chip-slot:last-child .home-build-chip-title::after{left:auto;right:24px}
|
|
70
86
|
.home-build-chip-status{position:absolute;left:50%;bottom:-12px;transform:translateX(-50%);display:flex;gap:5px;align-items:center;justify-content:center;white-space:nowrap;background:var(--hbc-color);color:var(--hbc-flag-ink);border-radius:5px;padding:5px 8px;font-size:12px;line-height:1.3;font-weight:700}
|
|
87
|
+
.home-build-chip[data-status=ready]{animation:hbc-ready-in .5s cubic-bezier(.2,.8,.2,1) 1}
|
|
88
|
+
.home-build-chip[data-status=ready] .home-build-chip-status{box-shadow:0 0 0 2px var(--hbc-ink)}
|
|
71
89
|
.home-build-chip-dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}
|
|
72
90
|
.home-build-chip[data-live=true] .home-build-chip-dot{animation:hbc-breathe 1.4s ease-in-out infinite}
|
|
73
91
|
.home-build-chip-dismiss{position:absolute;top:-10px;right:-10px;z-index:2;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:2px solid var(--hbc-ink);background:var(--hbc-paper);color:var(--hbc-ink);font:inherit;font-size:14px;line-height:1;font-weight:700;cursor:pointer;opacity:0;transition:opacity .15s}
|
|
@@ -75,9 +93,10 @@ const css = `
|
|
|
75
93
|
.home-build-chip-new{display:flex;flex-direction:column;gap:6px;justify-content:center;box-shadow:none;background:var(--hbc-field);border:2px dashed var(--vibes-home-title-ink,#55564e);color:var(--vibes-home-title-ink,#414139);font-size:12px;line-height:1.2;font-weight:700}
|
|
76
94
|
.home-build-chip-new:hover{box-shadow:none}.home-build-chip-new span{font-size:26px}
|
|
77
95
|
@keyframes hbc-breathe{50%{opacity:.25}}
|
|
96
|
+
@keyframes hbc-ready-in{40%{transform:translateY(-4px)}}
|
|
78
97
|
@media(hover:none){.home-build-chip-dismiss{opacity:1}}
|
|
79
98
|
@media(max-width:600px){.home-build-chips{width:calc(100% - 32px)}.home-build-chips p{font-size:14px}.home-build-chip-row{gap:14px}.home-build-chip-slot{flex-basis:clamp(58px,18vw,72px);width:clamp(58px,18vw,72px)}.home-build-chip{width:100%;height:76px;border-radius:15px;padding:8px}.home-build-chip img{width:44px;height:44px}.home-build-chip-title{max-width:170px}.home-build-chip-title-text{font-size:12px}.home-build-chip-status{font-size:11px;padding:5px 6px;gap:3px}.home-build-chip-new{font-size:11px}}
|
|
80
|
-
@media(prefers-reduced-motion:reduce){.home-build-chip,.home-build-chip-title{transition:none;animation:none}.home-build-chip-dot{animation:none!important}}
|
|
99
|
+
@media(prefers-reduced-motion:reduce){.home-build-chip,.home-build-chip-title{transition:none;animation:none}.home-build-chip-dot{animation:none!important}.home-build-chip[data-status=ready]{animation:none}}
|
|
81
100
|
`;
|
|
82
101
|
export function HomeBuildChips(props) {
|
|
83
102
|
const buttons = React.useRef(new Map());
|
|
@@ -121,7 +140,7 @@ export function HomeBuildChips(props) {
|
|
|
121
140
|
const visible = props.items.slice(-4);
|
|
122
141
|
return (React.createElement("section", { className: "home-build-chips", "aria-label": "Your builds" },
|
|
123
142
|
React.createElement("style", null, css),
|
|
124
|
-
React.createElement("p", { className: "home-build-intro"
|
|
143
|
+
React.createElement("p", { className: "home-build-intro", "data-testid": "home-build-header" }, homeBuildDockHeaderText(homeBuildDockHeader(props.items, { returning: props.returning }))),
|
|
125
144
|
React.createElement("div", { className: "home-build-chip-row" },
|
|
126
145
|
visible.map((item, index) => {
|
|
127
146
|
const identity = paint[index % paint.length];
|
|
@@ -133,20 +152,20 @@ export function HomeBuildChips(props) {
|
|
|
133
152
|
buttons.current.delete(item.id);
|
|
134
153
|
else
|
|
135
154
|
buttons.current.set(item.id, button);
|
|
136
|
-
}, type: "button", className: "home-build-chip", "data-status": item.status, "data-live": LIVE_STATUSES.includes(item.status), style: chipStyle, "aria-label": `${item.title}: ${label}`, onClick: () => props.onOpen(item.id) },
|
|
155
|
+
}, type: "button", className: "home-build-chip", "data-status": item.status, "data-live": LIVE_STATUSES.includes(item.status), style: chipStyle, "aria-label": item.status === "ready" ? HOME_BUILD_DOCK_COPY.readyChipName(item.title) : `${item.title}: ${label}`, onClick: () => props.onOpen(item.id) },
|
|
137
156
|
React.createElement("img", { src: `/lane-faces/vibes-face-${identity.face}.svg`, alt: "" }),
|
|
138
157
|
React.createElement("span", { className: "home-build-chip-copy" },
|
|
139
158
|
React.createElement("span", { className: "home-build-chip-title" },
|
|
140
159
|
React.createElement("span", { className: "home-build-chip-title-text" }, item.title)),
|
|
141
160
|
React.createElement("span", { className: "home-build-chip-status" },
|
|
142
161
|
React.createElement("span", { className: "home-build-chip-dot", "aria-hidden": "true" }),
|
|
143
|
-
label))),
|
|
162
|
+
item.status === "ready" ? (React.createElement("span", { className: "home-build-chip-cue", "data-testid": "home-build-chip-cue" }, HOME_BUILD_DOCK_COPY.readyCue)) : (label)))),
|
|
144
163
|
props.onDismiss !== undefined && item.dismissible !== false && (React.createElement("button", { type: "button", className: "home-build-chip-dismiss", "aria-label": `Hide ${item.title}`, onClick: () => props.onDismiss?.(item.id) }, "\u00D7"))));
|
|
145
164
|
}),
|
|
146
165
|
props.items.length < 4 && (React.createElement("div", { className: "home-build-chip-slot" },
|
|
147
166
|
React.createElement("button", { type: "button", className: "home-build-chip home-build-chip-new", onClick: props.onAnotherIdea },
|
|
148
167
|
React.createElement("span", { "aria-hidden": "true" }, "\uFF0B"),
|
|
149
168
|
" Another idea")))),
|
|
150
|
-
props.items.length > 4 && React.createElement("p", { className: "home-build-overflow" },
|
|
169
|
+
props.items.length > 4 && React.createElement("p", { className: "home-build-overflow" }, HOME_BUILD_DOCK_COPY.overflow)));
|
|
151
170
|
}
|
|
152
171
|
//# sourceMappingURL=HomeBuildChips.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeBuildChips.js","sourceRoot":"","sources":["../../jsr/components/HomeBuildChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"HomeBuildChips.js","sourceRoot":"","sources":["../../jsr/components/HomeBuildChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAA4B,MAAM,wBAAwB,CAAC;AAuCjH,MAAM,KAAK,GAAG;IACZ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE;IAClD,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,SAAS,EAAE;IACvD,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ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,GAAG,CAAC,IAAI,2BAAG,SAAS,EAAC,qBAAqB,IAAE,oBAAoB,CAAC,QAAQ,CAAK,CACzF,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const HOME_BUILD_TOAST_MS = 6000;
|
|
3
|
+
export interface HomeBuildSendToastState {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly text: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function playComposerReset(box: HTMLElement | null | undefined): void;
|
|
8
|
+
export declare function HomeBuildComposerNote(props: {
|
|
9
|
+
readonly toast?: HomeBuildSendToastState;
|
|
10
|
+
readonly onSeeIt: () => void;
|
|
11
|
+
readonly onDismissToast: () => void;
|
|
12
|
+
}): React.ReactElement;
|
|
13
|
+
export type HomeBuildSignInNoteState = "ask" | "later";
|
|
14
|
+
export declare function HomeBuildSignInNote(props: {
|
|
15
|
+
readonly state: HomeBuildSignInNoteState;
|
|
16
|
+
readonly onSignIn: () => void;
|
|
17
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { HOME_BRAND_FONT } from "./homeBrandFont.js";
|
|
3
|
+
import { HOME_BUILD_DOCK_COPY } from "./homeBuildDockCopy.js";
|
|
4
|
+
export const HOME_BUILD_TOAST_MS = 6000;
|
|
5
|
+
const css = `
|
|
6
|
+
.home-build-note-slot{position:relative;display:grid;font-family:${HOME_BRAND_FONT};color:var(--vibes-home-title-ink,#151515);margin:10px 0 0;min-height:20px}
|
|
7
|
+
.home-build-expectation{grid-area:1/1;align-self:start;margin:0;text-align:right;font-size:13px;line-height:1.45;font-weight:700;opacity:.82}
|
|
8
|
+
.home-build-toast{grid-area:1/1;justify-self:end;align-self:start;position:relative;z-index:5;display:flex;align-items:center;gap:10px;max-width:min(460px,100%);box-sizing:border-box;padding:9px 10px 9px 14px;border:2px solid #151515;border-radius:14px;background:#151515;color:#FEFFF1;box-shadow:-3px 4px 0 #FFE100;font-size:14px;line-height:1.35;font-weight:700;animation:hbt-in .22s cubic-bezier(.2,.8,.2,1)}
|
|
9
|
+
.home-build-toast-text{flex:1 1 auto;min-width:0}
|
|
10
|
+
.home-build-toast-action{flex:0 0 auto;border:0;border-radius:9px;background:#FFE100;color:#151515;font:inherit;font-size:13px;padding:6px 10px;cursor:pointer}
|
|
11
|
+
.home-build-toast-action:focus-visible,.home-build-toast-close:focus-visible{outline:2px solid #FFE100;outline-offset:2px}
|
|
12
|
+
.home-build-toast-close{flex:0 0 auto;border:0;background:transparent;color:inherit;font:inherit;font-size:18px;line-height:1;padding:2px 4px;cursor:pointer;opacity:.75}
|
|
13
|
+
.home-build-signin-note{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 12px;margin:0 0 12px;font-family:${HOME_BRAND_FONT};color:var(--vibes-home-title-ink,#151515);font-size:14px;line-height:1.4;font-weight:700;text-align:center}
|
|
14
|
+
.home-build-signin-note button{border:2px solid #151515;border-radius:10px;background:#FFE100;color:#151515;font:inherit;font-size:13px;padding:5px 12px;cursor:pointer}
|
|
15
|
+
.home-build-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
|
|
16
|
+
@keyframes hbt-in{from{opacity:0;transform:translateY(-6px)}}
|
|
17
|
+
@media(max-width:600px){.home-build-expectation{text-align:center}.home-build-toast{justify-self:stretch;max-width:none;font-size:13px}}
|
|
18
|
+
@media(prefers-reduced-motion:reduce){.home-build-toast{animation:none}}
|
|
19
|
+
`;
|
|
20
|
+
export function playComposerReset(box) {
|
|
21
|
+
if (box === null || box === undefined || typeof box.animate !== "function")
|
|
22
|
+
return;
|
|
23
|
+
if (typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true)
|
|
24
|
+
return;
|
|
25
|
+
box.animate([
|
|
26
|
+
{ transform: "scale(0.985)", filter: "brightness(1.04)" },
|
|
27
|
+
{ transform: "scale(1.004)", offset: 0.6 },
|
|
28
|
+
{ transform: "none", filter: "none" },
|
|
29
|
+
], { duration: 240, easing: "cubic-bezier(.2,.8,.2,1)" });
|
|
30
|
+
}
|
|
31
|
+
export function HomeBuildComposerNote(props) {
|
|
32
|
+
const { toast, onDismissToast } = props;
|
|
33
|
+
const toastRef = React.useRef(null);
|
|
34
|
+
const [held, setHeld] = React.useState(false);
|
|
35
|
+
React.useEffect(() => {
|
|
36
|
+
if (toast === undefined || held)
|
|
37
|
+
return;
|
|
38
|
+
const timer = setTimeout(onDismissToast, HOME_BUILD_TOAST_MS);
|
|
39
|
+
return () => clearTimeout(timer);
|
|
40
|
+
}, [toast, held, onDismissToast]);
|
|
41
|
+
React.useEffect(() => {
|
|
42
|
+
if (toast === undefined)
|
|
43
|
+
setHeld(false);
|
|
44
|
+
}, [toast]);
|
|
45
|
+
React.useLayoutEffect(() => {
|
|
46
|
+
const el = toastRef.current;
|
|
47
|
+
if (toast === undefined || el === null)
|
|
48
|
+
return;
|
|
49
|
+
const rect = el.getBoundingClientRect();
|
|
50
|
+
if (rect.bottom > window.innerHeight && typeof el.scrollIntoView === "function")
|
|
51
|
+
el.scrollIntoView({ block: "nearest" });
|
|
52
|
+
}, [toast]);
|
|
53
|
+
return (React.createElement("div", { className: "home-build-note-slot", "data-testid": "home-build-note" },
|
|
54
|
+
React.createElement("style", null, css),
|
|
55
|
+
React.createElement("p", { className: "home-build-expectation", "aria-hidden": toast !== undefined }, HOME_BUILD_DOCK_COPY.expectation),
|
|
56
|
+
toast !== undefined && (React.createElement("div", { key: toast.id, ref: toastRef, className: "home-build-toast", "data-testid": "home-build-toast", onPointerEnter: () => setHeld(true), onPointerLeave: () => setHeld(false), onFocus: () => setHeld(true), onBlur: (event) => {
|
|
57
|
+
if (event.currentTarget.contains(event.relatedTarget) === false)
|
|
58
|
+
setHeld(false);
|
|
59
|
+
} },
|
|
60
|
+
React.createElement("span", { className: "home-build-toast-text", "aria-hidden": "true" }, toast.text),
|
|
61
|
+
React.createElement("button", { type: "button", className: "home-build-toast-action", onClick: props.onSeeIt }, HOME_BUILD_DOCK_COPY.sendToastAction),
|
|
62
|
+
React.createElement("button", { type: "button", className: "home-build-toast-close", "aria-label": HOME_BUILD_DOCK_COPY.sendToastDismiss, onClick: onDismissToast }, "\u00D7"))),
|
|
63
|
+
React.createElement("p", { className: "home-build-sr", "aria-live": "polite", "data-testid": "home-build-announcer" }, toast?.text ?? "")));
|
|
64
|
+
}
|
|
65
|
+
export function HomeBuildSignInNote(props) {
|
|
66
|
+
return (React.createElement("p", { className: "home-build-signin-note", role: "status", "data-testid": "home-build-signin-note" },
|
|
67
|
+
React.createElement("style", null, css),
|
|
68
|
+
React.createElement("span", null, props.state === "ask" ? HOME_BUILD_DOCK_COPY.signInAsk : HOME_BUILD_DOCK_COPY.signInLater),
|
|
69
|
+
props.state === "later" && (React.createElement("button", { type: "button", onClick: props.onSignIn }, HOME_BUILD_DOCK_COPY.signInAction))));
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=HomeBuildComposerNotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomeBuildComposerNotes.js","sourceRoot":"","sources":["../../jsr/components/HomeBuildComposerNotes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAa9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAQxC,MAAM,GAAG,GAAG;mEACuD,eAAe;;;;;;;yIAOuD,eAAe;;;;;;CAMvJ,CAAC;AAOF,MAAM,UAAU,iBAAiB,CAAC,GAAmC;IACnE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,UAAU;QAAE,OAA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ACT,gCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,wBAAwB,gBACtB,oBAAoB,CAAC,gBAAgB,EACjD,OAAO,EAAE,cAAc,aAGhB,CACL,CACP;QAED,2BAAG,SAAS,EAAC,eAAe,eAAW,QAAQ,iBAAa,sBAAsB,IAC/E,KAAK,EAAE,IAAI,IAAI,EAAE,CAChB,CACA,CACP,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,mBAAmB,CAAC,KAGnC;IACC,OAAO,CACL,2BAAG,SAAS,EAAC,wBAAwB,EAAC,IAAI,EAAC,QAAQ,iBAAa,wBAAwB;QACtF,mCAAQ,GAAG,CAAS;QACpB,kCAAO,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,WAAW,CAAQ;QACvG,KAAK,CAAC,KAAK,KAAK,OAAO,IAAI,CAC1B,gCAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,IAC1C,oBAAoB,CAAC,YAAY,CAC3B,CACV,CACC,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const HOME_BUILD_TOAST_IDEA_MAX = 48;
|
|
2
|
+
export declare const HOME_BUILD_DOCK_COPY: Readonly<{
|
|
3
|
+
expectation: "Send an idea, then start the next — they build side by side.";
|
|
4
|
+
sendToast: (idea: string) => string;
|
|
5
|
+
sendToastAction: "See it";
|
|
6
|
+
sendToastDismiss: "Hide this note";
|
|
7
|
+
headerBuildingOne: "Got another idea? Start it while your app builds.";
|
|
8
|
+
headerBuildingMany: "Got another idea? Start it while your apps build.";
|
|
9
|
+
headerMixed: "Open a ready app, or start another.";
|
|
10
|
+
headerReadyOne: "Your app is ready. Open it, or start another.";
|
|
11
|
+
headerReadyMany: "Your apps are ready. Open one, or start another.";
|
|
12
|
+
headerAttention: "Pick up where your apps left off, or start another.";
|
|
13
|
+
headerReturning: "What would you make today?";
|
|
14
|
+
readyCue: "Open →";
|
|
15
|
+
readyChipName: (title: string) => string;
|
|
16
|
+
overflow: "Find earlier apps in MENU → My Apps.";
|
|
17
|
+
signInAsk: "Two apps are building. Sign in to run more at once — your idea is waiting right here in the box.";
|
|
18
|
+
signInLater: "Your idea is here whenever you're ready. Sign in to start it.";
|
|
19
|
+
signInAction: "Sign in";
|
|
20
|
+
readyAnnouncement: (count: number) => string;
|
|
21
|
+
}>;
|
|
22
|
+
export type HomeBuildDockHeader = "building-one" | "building-many" | "mixed" | "ready-one" | "ready-many" | "attention" | "returning";
|
|
23
|
+
export declare function homeBuildDockHeaderText(header: HomeBuildDockHeader): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const HOME_BUILD_TOAST_IDEA_MAX = 48;
|
|
2
|
+
function quoteIdea(idea) {
|
|
3
|
+
const flat = idea.trim().replace(/\s+/g, " ");
|
|
4
|
+
if (flat.length <= HOME_BUILD_TOAST_IDEA_MAX)
|
|
5
|
+
return flat;
|
|
6
|
+
return `${flat.slice(0, HOME_BUILD_TOAST_IDEA_MAX - 1).trimEnd()}…`;
|
|
7
|
+
}
|
|
8
|
+
export const HOME_BUILD_DOCK_COPY = Object.freeze({
|
|
9
|
+
expectation: "Send an idea, then start the next — they build side by side.",
|
|
10
|
+
sendToast: (idea) => `Building “${quoteIdea(idea)}” — start your next idea.`,
|
|
11
|
+
sendToastAction: "See it",
|
|
12
|
+
sendToastDismiss: "Hide this note",
|
|
13
|
+
headerBuildingOne: "Got another idea? Start it while your app builds.",
|
|
14
|
+
headerBuildingMany: "Got another idea? Start it while your apps build.",
|
|
15
|
+
headerMixed: "Open a ready app, or start another.",
|
|
16
|
+
headerReadyOne: "Your app is ready. Open it, or start another.",
|
|
17
|
+
headerReadyMany: "Your apps are ready. Open one, or start another.",
|
|
18
|
+
headerAttention: "Pick up where your apps left off, or start another.",
|
|
19
|
+
headerReturning: "What would you make today?",
|
|
20
|
+
readyCue: "Open →",
|
|
21
|
+
readyChipName: (title) => `${title}: Ready · Open`,
|
|
22
|
+
overflow: "Find earlier apps in MENU → My Apps.",
|
|
23
|
+
signInAsk: "Two apps are building. Sign in to run more at once — your idea is waiting right here in the box.",
|
|
24
|
+
signInLater: "Your idea is here whenever you're ready. Sign in to start it.",
|
|
25
|
+
signInAction: "Sign in",
|
|
26
|
+
readyAnnouncement: (count) => (count === 1 ? "1 app is ready to open" : `${count} apps are ready to open`),
|
|
27
|
+
});
|
|
28
|
+
export function homeBuildDockHeaderText(header) {
|
|
29
|
+
switch (header) {
|
|
30
|
+
case "building-one":
|
|
31
|
+
return HOME_BUILD_DOCK_COPY.headerBuildingOne;
|
|
32
|
+
case "building-many":
|
|
33
|
+
return HOME_BUILD_DOCK_COPY.headerBuildingMany;
|
|
34
|
+
case "mixed":
|
|
35
|
+
return HOME_BUILD_DOCK_COPY.headerMixed;
|
|
36
|
+
case "ready-one":
|
|
37
|
+
return HOME_BUILD_DOCK_COPY.headerReadyOne;
|
|
38
|
+
case "ready-many":
|
|
39
|
+
return HOME_BUILD_DOCK_COPY.headerReadyMany;
|
|
40
|
+
case "attention":
|
|
41
|
+
return HOME_BUILD_DOCK_COPY.headerAttention;
|
|
42
|
+
case "returning":
|
|
43
|
+
return HOME_BUILD_DOCK_COPY.headerReturning;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=homeBuildDockCopy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"homeBuildDockCopy.js","sourceRoot":"","sources":["../../jsr/components/homeBuildDockCopy.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,IAAI,CAAC,MAAM,IAAI,yBA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oB,CAAC,cAAc,CAAC;QAC7C,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC,eAAe,CAAC;QAC9C,KAAK,WAAW;YACd,OAAO,oBAAoB,CAAC,eAAe,CAAC;QAC9C,KAAK,WAAW;YACd,OAAO,oBAAoB,CAAC,eAAe,CAAC;IAChD,CAAC;AACH,CAAC"}
|
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -38,4 +38,6 @@ export * from "./VibesWindowFrame.styles.js";
|
|
|
38
38
|
export * from "./VibesWindowHeader.js";
|
|
39
39
|
export * from "./VibesWindowFrame.js";
|
|
40
40
|
export * from "./HomeBuildChips.js";
|
|
41
|
+
export * from "./HomeBuildComposerNotes.js";
|
|
42
|
+
export * from "./homeBuildDockCopy.js";
|
|
41
43
|
//# sourceMappingURL=index.js.map
|
package/components/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../jsr/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CA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AAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useId, useState } from "react";
|
|
2
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
3
|
+
import { StatusChipRow, statusChipsFor } from "./parts/StatusChipRow.js";
|
|
3
4
|
import { ownerSwitchEvent } from "./menu-state.js";
|
|
4
5
|
import { codeCardMoment } from "./moments.js";
|
|
5
6
|
import { CODE_TABS, activeWorkspaceTab } from "./code-tabs.js";
|
|
@@ -50,6 +51,13 @@ export function VibeMenu(props) {
|
|
|
50
51
|
const codeOpen = state.phase === "card" && state.section === "vibe";
|
|
51
52
|
const remixHint = useRemixHint({ hints: code.remixHints, codeOpen });
|
|
52
53
|
const [logOpen, setLogOpen] = useState(viewer.draft === true || props.firstBuild === true);
|
|
54
|
+
const seenLogOpenSeq = useRef(props.logOpenSeq);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (props.logOpenSeq === seenLogOpenSeq.current)
|
|
57
|
+
return;
|
|
58
|
+
seenLogOpenSeq.current = props.logOpenSeq;
|
|
59
|
+
setLogOpen(true);
|
|
60
|
+
}, [props.logOpenSeq]);
|
|
53
61
|
const codeModeOn = code.codeModeAvailable === true && code.codeMode === true && pending === false;
|
|
54
62
|
const [workspaceWanted, setWorkspaceWanted] = useState(false);
|
|
55
63
|
if (codeOpen && codeModeOn && workspaceWanted === false)
|
|
@@ -107,7 +115,7 @@ export function VibeMenu(props) {
|
|
|
107
115
|
case "settings":
|
|
108
116
|
return React.createElement(AccountCard, { viewer: viewer, account: account, nav: nav });
|
|
109
117
|
case "vibe":
|
|
110
|
-
return (React.createElement(CodeCard, { viewer: viewer, code: code, nav: nav, draft: draft, remixHint: remixHint, logOpen: logOpen, onLogOpen: setLogOpen, workspacePanelId: workspacePanelId }));
|
|
118
|
+
return (React.createElement(CodeCard, { viewer: viewer, code: code, nav: nav, draft: draft, remixHint: remixHint, logOpen: logOpen, onLogOpen: setLogOpen, workspacePanelId: workspacePanelId, chipRow: chipRow }));
|
|
111
119
|
case "share":
|
|
112
120
|
return React.createElement(ShareCard, { viewer: viewer, share: share, nav: nav, onSignIn: account.onSignIn });
|
|
113
121
|
}
|
|
@@ -118,6 +126,11 @@ export function VibeMenu(props) {
|
|
|
118
126
|
function onChiclet() {
|
|
119
127
|
dispatch(openEventFor(resolveOpening({ kind: "devDraftChiclet" }, { role: viewer.role, canEditSource: viewer.canEditSource, identityPending: viewer.identityPending })));
|
|
120
128
|
}
|
|
129
|
+
const chips = statusChipsFor(props.badges, {
|
|
130
|
+
onChiclet,
|
|
131
|
+
onPending: () => dispatch(openEventFor(resolveOpening({ kind: "pendingBadge" }, { role: viewer.role, canEditSource: viewer.canEditSource, identityPending: viewer.identityPending }))),
|
|
132
|
+
});
|
|
133
|
+
const chipRow = chips.length === 0 ? null : React.createElement(StatusChipRow, { chips: chips, place: "inside" });
|
|
121
134
|
const persistent = workspaceMounted ? (React.createElement(RetainedWorkspace, { key: "workspace", visible: workspaceVisible, above: code.tabRow === true, panelId: workspacePanelId, label: codeTabLabel(activeTab) }, code.slots.workspace)) : null;
|
|
122
135
|
return (React.createElement(VibeMenuShell, { state: state, dispatch: shellDispatch, renderCard: renderCard, persistent: persistent, contentKey: menuContentKey({
|
|
123
136
|
state,
|
|
@@ -128,6 +141,6 @@ export function VibeMenu(props) {
|
|
|
128
141
|
share,
|
|
129
142
|
account,
|
|
130
143
|
queued: draft.queued.length,
|
|
131
|
-
}), codeMode: codeOpen && codeModeOn, logOpen: logShowing, badges: props.badges, closedStatus: props.closedStatus, onChiclet: onChiclet, frameCap: props.frameCap === true, frame: props.frame, reducedMotion: props.reducedMotion, switchActivity: props.switchActivity, settledAtMount: props.settledAtMount }));
|
|
144
|
+
}), codeMode: codeOpen && codeModeOn, logOpen: logShowing, badges: props.badges, closedStatus: props.closedStatus, onChiclet: onChiclet, frameCap: props.frameCap === true, frame: props.frame, reducedMotion: props.reducedMotion, switchActivity: props.switchActivity, settledAtMount: props.settledAtMount, chips: chips, hiddenChips: props.badges.hidden, onHideChip: props.badges.onHide, chipsInside: codeOpen && code.promptContent === undefined }));
|
|
132
145
|
}
|
|
133
146
|
//# sourceMappingURL=VibeMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VibeMenu.js","sourceRoot":"","sources":["../../../jsr/components/vibe-menu/VibeMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"VibeMenu.js","sourceRoot":"","sources":["../../../jsr/components/vibe-menu/VibeMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;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Q,EAAE,KAAK,CAAC,QAAQ,KAAK,IAAI,EACjC,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,aAAa,EAAE,KAAK,CAAC,aAAa,EAClC,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAChC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAC/B,WAAW,EAAE,QAAQ,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,GACzD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -7,6 +7,9 @@ export declare const ACCOUNT_COPY: Readonly<{
|
|
|
7
7
|
loading: "Loading your account…";
|
|
8
8
|
creditsLeft: "credits left";
|
|
9
9
|
thisMonth: "this month";
|
|
10
|
+
guestCreditsLeft: "credits left before";
|
|
11
|
+
guestSignInRequired: "sign-in is required";
|
|
12
|
+
guestHandleNote: "Sign in to customize your handle";
|
|
10
13
|
handles: "Handles";
|
|
11
14
|
memberships: "Memberships";
|
|
12
15
|
settings: "Settings";
|
|
@@ -24,7 +27,7 @@ export declare const ACCOUNT_COPY: Readonly<{
|
|
|
24
27
|
moreIdeas: "More ideas";
|
|
25
28
|
chooseHandle: "Choose your handle";
|
|
26
29
|
}>;
|
|
27
|
-
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 { 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-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-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-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";
|
|
30
|
+
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 { 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-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-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";
|
|
28
31
|
export interface AccountCardProps {
|
|
29
32
|
readonly viewer: ViewerSlice;
|
|
30
33
|
readonly account: AccountSlice;
|
|
@@ -17,6 +17,9 @@ export const ACCOUNT_COPY = Object.freeze({
|
|
|
17
17
|
loading: "Loading your account…",
|
|
18
18
|
creditsLeft: "credits left",
|
|
19
19
|
thisMonth: "this month",
|
|
20
|
+
guestCreditsLeft: "credits left before",
|
|
21
|
+
guestSignInRequired: "sign-in is required",
|
|
22
|
+
guestHandleNote: "Sign in to customize your handle",
|
|
20
23
|
handles: "Handles",
|
|
21
24
|
memberships: "Memberships",
|
|
22
25
|
settings: "Settings",
|
|
@@ -41,6 +44,7 @@ export const ACCOUNT_CARD_CSS = `
|
|
|
41
44
|
[data-vibe-menu] .vm-who { display: flex; align-items: center; gap: 10px; padding: 0 0 14px; }
|
|
42
45
|
[data-vibe-menu] .vm-avatar { 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); }
|
|
43
46
|
[data-vibe-menu] .vm-handle { font: 700 16px/1 var(--font-display); }
|
|
47
|
+
[data-vibe-menu] .vm-who + [data-guest-handle-note] { margin: -8px 0 14px 38px; }
|
|
44
48
|
[data-vibe-menu] .vm-no-handle { font: 400 16px/1 var(--font-display); color: var(--muted); }
|
|
45
49
|
[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; }
|
|
46
50
|
[data-vibe-menu] .vm-meter span { display: block; height: 100%; background: var(--section-account); border-right: var(--stroke-rule) solid var(--line-card); }
|
|
@@ -65,7 +69,11 @@ export const ACCOUNT_CARD_CSS = `
|
|
|
65
69
|
}
|
|
66
70
|
`;
|
|
67
71
|
function showsHandlesDrill(props, signedIn) {
|
|
68
|
-
|
|
72
|
+
const guest = (props.account.guestAsk ?? null) !== null;
|
|
73
|
+
return signedIn && guest === false && props.nav.view?.drill === "handles" && props.account.activeHandle !== null;
|
|
74
|
+
}
|
|
75
|
+
function GuestHandleNote() {
|
|
76
|
+
return (React.createElement("p", { className: "vm-sub", "data-guest-handle-note": "" }, ACCOUNT_COPY.guestHandleNote));
|
|
69
77
|
}
|
|
70
78
|
function initialOf(name) {
|
|
71
79
|
return name.slice(0, 1).toUpperCase();
|
|
@@ -74,9 +82,12 @@ function CreditsFact(props) {
|
|
|
74
82
|
const { remaining, included } = props.account.credits;
|
|
75
83
|
if (remaining === null)
|
|
76
84
|
return null;
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
85
|
+
const guest = (props.account.guestAsk ?? null) !== null;
|
|
86
|
+
const caption = guest
|
|
87
|
+
? [ACCOUNT_COPY.guestCreditsLeft, ACCOUNT_COPY.guestSignInRequired]
|
|
88
|
+
: included === null
|
|
89
|
+
? [ACCOUNT_COPY.creditsLeft, ACCOUNT_COPY.thisMonth]
|
|
90
|
+
: [`/ ${included.toLocaleString("en-US")}`, ACCOUNT_COPY.creditsLeft, ACCOUNT_COPY.thisMonth];
|
|
80
91
|
const pct = included === null || included <= 0 ? null : Math.max(0, Math.min(100, (remaining / included) * 100));
|
|
81
92
|
return (React.createElement(React.Fragment, null,
|
|
82
93
|
React.createElement("div", { className: "vm-hero" },
|
|
@@ -84,7 +95,9 @@ function CreditsFact(props) {
|
|
|
84
95
|
React.createElement("span", { className: "vm-caption" }, caption.map((line, i) => (React.createElement(React.Fragment, { key: line },
|
|
85
96
|
i > 0 ? React.createElement("br", null) : null,
|
|
86
97
|
line))))),
|
|
87
|
-
pct === null || included === null ? null : (React.createElement("div", { className: "vm-meter", role: "img", "aria-label":
|
|
98
|
+
pct === null || included === null ? null : (React.createElement("div", { className: "vm-meter", role: "img", "aria-label": guest
|
|
99
|
+
? `${remaining.toLocaleString("en-US")} ${ACCOUNT_COPY.guestCreditsLeft} ${ACCOUNT_COPY.guestSignInRequired}`
|
|
100
|
+
: `${remaining.toLocaleString("en-US")} of ${included.toLocaleString("en-US")} credits left` },
|
|
88
101
|
React.createElement("span", { style: { width: `${pct}%` } })))));
|
|
89
102
|
}
|
|
90
103
|
function AccountRows(props) {
|
|
@@ -187,9 +200,10 @@ function AccountBody(props) {
|
|
|
187
200
|
React.createElement("span", { className: "vm-handle" },
|
|
188
201
|
"@",
|
|
189
202
|
active)),
|
|
203
|
+
guestAsk === null ? null : React.createElement(GuestHandleNote, null),
|
|
190
204
|
React.createElement(CreditsFact, { account: account }),
|
|
191
|
-
React.createElement(ActionPill, { label: account.creditsAction.label, href: account.creditsAction.href, onClick: account.creditsAction.onClick, solo: true }),
|
|
192
|
-
React.createElement(AccountRows, { account: account, lead: React.createElement(Row, { lead: "at-sign", label: ACCOUNT_COPY.handles, tail: { kind: "drill", value: `@${active}`, handle: true }, onClick: () => nav.onDrill({ drill: "handles" }) }) })));
|
|
205
|
+
guestAsk === null ? (React.createElement(ActionPill, { label: account.creditsAction.label, href: account.creditsAction.href, onClick: account.creditsAction.onClick, solo: true })) : null,
|
|
206
|
+
React.createElement(AccountRows, { account: account, lead: guestAsk === null ? (React.createElement(Row, { lead: "at-sign", label: ACCOUNT_COPY.handles, tail: { kind: "drill", value: `@${active}`, handle: true }, onClick: () => nav.onDrill({ drill: "handles" }) })) : null })));
|
|
193
207
|
}
|
|
194
208
|
export const ACCOUNT_TAB_CSS = `
|
|
195
209
|
[data-vibe-menu] .vm-xtab .vm-who .vm-textbtn {
|
|
@@ -198,7 +212,8 @@ export const ACCOUNT_TAB_CSS = `
|
|
|
198
212
|
`;
|
|
199
213
|
export function accountTabItems(account) {
|
|
200
214
|
const items = [];
|
|
201
|
-
|
|
215
|
+
const guest = (account.guestAsk ?? null) !== null;
|
|
216
|
+
if (account.activeHandle !== null && guest === false)
|
|
202
217
|
items.push({ key: "handles", label: ACCOUNT_COPY.handles, glyph: "at-sign", kind: "drill" });
|
|
203
218
|
items.push({ key: "memberships", label: ACCOUNT_COPY.memberships, glyph: "star", kind: "link", href: account.membershipsHref });
|
|
204
219
|
items.push({ key: "settings", label: ACCOUNT_COPY.settings, glyph: "sliders", kind: "link", href: account.settingsHref });
|
|
@@ -241,8 +256,9 @@ function AccountTabBody(props) {
|
|
|
241
256
|
"@",
|
|
242
257
|
handle),
|
|
243
258
|
account.onLogout === null ? null : (React.createElement("button", { className: "vm-textbtn", type: "button", "data-item": "logOut", onClick: account.onLogout }, ACCOUNT_COPY.logOut))),
|
|
259
|
+
guestAsk === null ? null : React.createElement(GuestHandleNote, null),
|
|
244
260
|
React.createElement(CreditsFact, { account: account }),
|
|
245
|
-
mainKind === "credits" ? null : creditsPill),
|
|
261
|
+
mainKind === "credits" || mainKind === "guest" ? null : creditsPill),
|
|
246
262
|
React.createElement(MainAction, null, main),
|
|
247
263
|
row));
|
|
248
264
|
}
|