@vibes.diy/base 14.3.459 → 14.3.461
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/BrutalistCard.js +2 -1
- package/components/LayoutControls.js +10 -10
- package/components/NotificationDetailView.js +4 -4
- package/components/StyleControls.js +3 -3
- package/components/SubTabStrip.js +4 -4
- package/components/VibesWindowFrame.styles.d.ts +1 -1
- package/components/VibesWindowFrame.styles.js +10 -5
- package/components/VibesWindowHeader.js +1 -1
- package/components/vibe-menu/VibeMenu.js +1 -1
- package/components/vibe-menu/cards/HomeCard.d.ts +4 -2
- package/components/vibe-menu/cards/HomeCard.js +25 -4
- package/components/vibe-menu/copy.d.ts +1 -0
- package/components/vibe-menu/copy.js +1 -0
- package/components/vibe-menu/parts/CheckRowLine.js +7 -1
- package/components/vibe-menu/parts/StarterChips.js +17 -1
- package/components/vibe-menu/parts/StatusLine.d.ts +1 -1
- package/components/vibe-menu/slices.d.ts +10 -3
- package/package.json +5 -5
- package/theme/global-styles.js +2 -9
- package/theme/patterns.js +0 -6
|
@@ -10,7 +10,8 @@ export const BrutalistCard = React.forwardRef(({ children, variant = "default",
|
|
|
10
10
|
: user
|
|
11
11
|
? "linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)), var(--vibes-card-bg)"
|
|
12
12
|
: "var(--vibes-card-bg)",
|
|
13
|
-
color: "var(--vibes-card-text)",
|
|
13
|
+
color: "var(--vibes-card-ink, var(--vibes-card-text))",
|
|
14
|
+
"--vibes-home-title-ink": "var(--vibes-card-title, var(--vibes-card-ink, var(--vibes-card-text)))",
|
|
14
15
|
border: platform ? "3px solid rgba(59, 130, 246, 0.55)" : "3px solid var(--vibes-card-border)",
|
|
15
16
|
...style,
|
|
16
17
|
};
|
|
@@ -10,21 +10,21 @@ export function layoutProvenanceText(p) {
|
|
|
10
10
|
return `Layout changed ${p.at}.`;
|
|
11
11
|
}
|
|
12
12
|
function Legend({ children }) {
|
|
13
|
-
return React.createElement("div", { className: "text-[11px] font-semibold uppercase tracking-wide text-gray-500 dark:text-
|
|
13
|
+
return React.createElement("div", { className: "text-[11px] font-semibold uppercase tracking-wide text-gray-500 dark:text-dark-muted" }, children);
|
|
14
14
|
}
|
|
15
15
|
export function LayoutControls(props) {
|
|
16
16
|
const chosen = props.selectedFlourishes;
|
|
17
17
|
const atMax = chosen.length >= props.flourishCount;
|
|
18
18
|
const complete = props.selectedArchetype !== undefined && chosen.length === props.flourishCount;
|
|
19
|
-
return (React.createElement("section", { "data-testid": "layout-controls", className: "flex flex-col gap-3 border-t border-gray-200 p-4 dark:border-
|
|
19
|
+
return (React.createElement("section", { "data-testid": "layout-controls", className: "flex flex-col gap-3 border-t border-gray-200 p-4 dark:border-dark-line" },
|
|
20
20
|
React.createElement(Legend, null, "Layout"),
|
|
21
|
-
React.createElement("p", { className: "text-[11px] leading-tight text-gray-500 dark:text-
|
|
21
|
+
React.createElement("p", { className: "text-[11px] leading-tight text-gray-500 dark:text-dark-muted" }, "Structure and ornament live in the app's code, not in a colour variable \u2014 so changing them here takes effect the next time the app is built."),
|
|
22
22
|
React.createElement("div", null,
|
|
23
23
|
React.createElement(Legend, null, "Archetype"),
|
|
24
24
|
React.createElement("div", { role: "radiogroup", "aria-label": "Layout archetype", className: "mt-1.5 flex flex-wrap gap-2" }, props.archetypes.map((a) => (React.createElement("button", { key: a.id, type: "button", role: "radio", "aria-checked": props.selectedArchetype === a.id, onClick: () => props.onSelectArchetype(a.id), className: "rounded-md border px-2 py-1.5 text-xs transition-colors " +
|
|
25
25
|
(props.selectedArchetype === a.id
|
|
26
26
|
? "border-blue-500 bg-blue-50 text-blue-900 dark:bg-blue-900/30 dark:text-blue-100"
|
|
27
|
-
: "border-gray-200 text-gray-700 hover:border-gray-400 dark:border-
|
|
27
|
+
: "border-gray-200 text-gray-700 hover:border-gray-400 dark:border-dark-line dark:text-dark-ink") }, a.label))))),
|
|
28
28
|
React.createElement("div", null,
|
|
29
29
|
React.createElement(Legend, null,
|
|
30
30
|
"Flourishes \u2014 ",
|
|
@@ -43,10 +43,10 @@ export function LayoutControls(props) {
|
|
|
43
43
|
(selected
|
|
44
44
|
? "border-blue-500 bg-blue-50 text-blue-900 dark:bg-blue-900/30 dark:text-blue-100"
|
|
45
45
|
: held
|
|
46
|
-
? "cursor-default border-gray-200 text-gray-400 line-through dark:border-
|
|
47
|
-
: "border-gray-200 text-gray-700 hover:border-gray-400 dark:border-
|
|
46
|
+
? "cursor-default border-gray-200 text-gray-400 line-through dark:border-dark-line dark:text-dark-muted"
|
|
47
|
+
: "border-gray-200 text-gray-700 hover:border-gray-400 dark:border-dark-line dark:text-dark-ink") }, f.label));
|
|
48
48
|
})),
|
|
49
|
-
props.lookName === undefined ? null : (React.createElement("p", { "data-testid": "layout-look-note", className: "mt-1.5 text-[11px] leading-tight text-gray-500 dark:text-
|
|
49
|
+
props.lookName === undefined ? null : (React.createElement("p", { "data-testid": "layout-look-note", className: "mt-1.5 text-[11px] leading-tight text-gray-500 dark:text-dark-muted" },
|
|
50
50
|
"Some flourishes are not available on the \"",
|
|
51
51
|
props.lookName,
|
|
52
52
|
"\" look \u2014 its brief either forbids the mechanic or already gives it to every app."))),
|
|
@@ -54,9 +54,9 @@ export function LayoutControls(props) {
|
|
|
54
54
|
React.createElement("button", { type: "button", onClick: props.onSave, disabled: complete === false || props.saving === true, className: "rounded-md px-3 py-1.5 text-xs font-medium transition-colors " +
|
|
55
55
|
(complete === true && props.saving !== true
|
|
56
56
|
? "bg-blue-600 text-white hover:bg-blue-700"
|
|
57
|
-
: "cursor-default bg-gray-200 text-gray-500 dark:bg-
|
|
57
|
+
: "cursor-default bg-gray-200 text-gray-500 dark:bg-dark-raised dark:text-dark-muted") }, props.saving === true ? "Saving…" : "Save layout"),
|
|
58
58
|
props.saved === true ? (React.createElement("button", { type: "button", onClick: props.onRebuild, className: "rounded-md border border-blue-500 px-3 py-1.5 text-xs font-medium text-blue-700 transition-colors hover:bg-blue-50 dark:text-blue-200 dark:hover:bg-blue-900/30" }, "Rebuild layout")) : null),
|
|
59
|
-
props.saved === true ? (React.createElement("p", { "data-testid": "layout-saved-notice", className: "text-[11px] leading-tight text-gray-600 dark:text-
|
|
59
|
+
props.saved === true ? (React.createElement("p", { "data-testid": "layout-saved-notice", className: "text-[11px] leading-tight text-gray-600 dark:text-dark-ink" }, LAYOUT_SAVED_NOTICE)) : null,
|
|
60
60
|
props.error === undefined ? null : (React.createElement("p", { "data-testid": "layout-error", role: "alert", className: "whitespace-pre-line text-[11px] leading-tight text-red-600 dark:text-red-400" }, props.error)),
|
|
61
|
-
React.createElement("p", { "data-testid": "layout-provenance", className: "text-[11px] leading-tight text-gray-500 dark:text-
|
|
61
|
+
React.createElement("p", { "data-testid": "layout-provenance", className: "text-[11px] leading-tight text-gray-500 dark:text-dark-muted" }, layoutProvenanceText(props.provenance))));
|
|
62
62
|
}
|
|
@@ -3,13 +3,13 @@ import { useState } from "react";
|
|
|
3
3
|
function ActorAvatar({ url, handle }) {
|
|
4
4
|
const [failedSrc, setFailedSrc] = useState(undefined);
|
|
5
5
|
if (failedSrc === url) {
|
|
6
|
-
return (React.createElement("span", { "aria-hidden": "true", className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-black/10 font-semibold text-neutral-700 uppercase dark:bg-white/15 dark:text-
|
|
6
|
+
return (React.createElement("span", { "aria-hidden": "true", className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-black/10 font-semibold text-neutral-700 uppercase dark:bg-white/15 dark:text-dark-ink", style: { fontSize: 13 } }, handle.slice(0, 1)));
|
|
7
7
|
}
|
|
8
8
|
return (React.createElement("img", { src: url, alt: `Avatar of @${handle}`, className: "h-7 w-7 shrink-0 rounded-full object-cover", loading: "lazy", decoding: "async", onError: () => setFailedSrc(url) }));
|
|
9
9
|
}
|
|
10
10
|
function MuteToggle({ testId, label, target, checked, disabled, onToggle, }) {
|
|
11
|
-
return (React.createElement("label", { className: "flex items-start gap-2 text-neutral-700 dark:text-
|
|
12
|
-
React.createElement("input", { type: "checkbox", "data-testid": testId, checked: checked, disabled: disabled, onChange: () => onToggle(), className: "mt-0.5 rounded border-gray-300 dark:border-
|
|
11
|
+
return (React.createElement("label", { className: "flex items-start gap-2 text-neutral-700 dark:text-dark-ink", style: { fontSize: 14, lineHeight: 1.4 } },
|
|
12
|
+
React.createElement("input", { type: "checkbox", "data-testid": testId, checked: checked, disabled: disabled, onChange: () => onToggle(), className: "mt-0.5 rounded border-gray-300 dark:border-dark-line" }),
|
|
13
13
|
React.createElement("span", null,
|
|
14
14
|
React.createElement("span", { className: "block font-medium" }, label),
|
|
15
15
|
target !== undefined && target !== "" && (React.createElement("span", { className: "block text-light-secondary dark:text-dark-secondary", style: { fontSize: 12 } }, target)))));
|
|
@@ -34,7 +34,7 @@ export function NotificationDetailView(props) {
|
|
|
34
34
|
props.body !== undefined && props.body !== "" && (React.createElement("p", { className: "text-light-secondary dark:text-dark-secondary ph-no-capture", "data-testid": "notification-detail-body", style: { fontSize: 14, lineHeight: 1.45, margin: "6px 0 0" } }, props.body))),
|
|
35
35
|
buildBits.length > 0 && (React.createElement("p", { className: "text-light-secondary dark:text-dark-secondary", "data-testid": "notification-detail-build-meta", style: { fontSize: 13, lineHeight: 1.4, margin: 0 } }, buildBits.join(" · "))),
|
|
36
36
|
props.actorHandle !== undefined && props.actorHandle !== "" && (React.createElement("div", { className: "flex items-center gap-2", "data-testid": "notification-detail-actor" },
|
|
37
|
-
props.actorAvatarUrl !== undefined && props.actorAvatarUrl !== "" ? (React.createElement(ActorAvatar, { url: props.actorAvatarUrl, handle: props.actorHandle })) : (React.createElement("span", { "aria-hidden": "true", className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-black/10 font-semibold text-neutral-700 uppercase dark:bg-white/15 dark:text-
|
|
37
|
+
props.actorAvatarUrl !== undefined && props.actorAvatarUrl !== "" ? (React.createElement(ActorAvatar, { url: props.actorAvatarUrl, handle: props.actorHandle })) : (React.createElement("span", { "aria-hidden": "true", className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-black/10 font-semibold text-neutral-700 uppercase dark:bg-white/15 dark:text-dark-ink", style: { fontSize: 13 } }, props.actorHandle.slice(0, 1))),
|
|
38
38
|
React.createElement("span", { className: "text-light-primary dark:text-dark-primary", style: { fontSize: 14, fontWeight: 600 } },
|
|
39
39
|
"@",
|
|
40
40
|
props.actorHandle))),
|
|
@@ -108,7 +108,7 @@ function SaveIndicator({ save }) {
|
|
|
108
108
|
? "text-red-600 dark:text-red-400"
|
|
109
109
|
: save.status === "saved"
|
|
110
110
|
? "text-green-700 dark:text-green-400"
|
|
111
|
-
: "text-gray-500 dark:text-
|
|
111
|
+
: "text-gray-500 dark:text-dark-muted";
|
|
112
112
|
return (React.createElement("div", { "data-testid": "style-save-indicator", "data-status": save.status, role: "status", "aria-live": "polite", className: "flex items-center gap-1.5 text-[11px] " + tone },
|
|
113
113
|
React.createElement("span", { "aria-hidden": "true", className: "h-1.5 w-1.5 rounded-full " +
|
|
114
114
|
(save.status === "error" ? "bg-red-500" : save.status === "saved" ? "bg-green-500" : "bg-gray-400 animate-pulse") }),
|
|
@@ -118,7 +118,7 @@ function SaveIndicator({ save }) {
|
|
|
118
118
|
function Section({ label, aside, testId, children, }) {
|
|
119
119
|
return (React.createElement("section", { className: "style-card flex flex-col gap-2", "data-testid": testId },
|
|
120
120
|
React.createElement("div", { className: "flex min-h-[16px] items-center justify-between gap-2" },
|
|
121
|
-
React.createElement("h3", { className: "text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-
|
|
121
|
+
React.createElement("h3", { className: "text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-dark-muted" }, label),
|
|
122
122
|
aside),
|
|
123
123
|
children));
|
|
124
124
|
}
|
|
@@ -214,7 +214,7 @@ const STYLE_CONTROLS_MENU_CSS = `
|
|
|
214
214
|
`;
|
|
215
215
|
const CHIP_CLASS = "style-chip flex items-center gap-2 rounded-md border px-2 py-1.5 text-xs transition-colors ";
|
|
216
216
|
const CHIP_ON = "border-blue-500 bg-blue-50 text-blue-900 dark:bg-blue-900/30 dark:text-blue-100";
|
|
217
|
-
const CHIP_OFF = "border-gray-200 text-gray-700 hover:border-gray-400 dark:border-
|
|
217
|
+
const CHIP_OFF = "border-gray-200 text-gray-700 hover:border-gray-400 dark:border-dark-line dark:text-dark-ink";
|
|
218
218
|
function ThemeSection({ look, aside }) {
|
|
219
219
|
const onOpen = React.useRef(look.onOpen);
|
|
220
220
|
React.useEffect(() => {
|
|
@@ -54,8 +54,8 @@ export function SubTabStrip({ tabs, active, onSelect, ariaLabel, compact = false
|
|
|
54
54
|
}
|
|
55
55
|
: {}),
|
|
56
56
|
}, className: compact
|
|
57
|
-
? "flex flex-shrink-0 gap-0.5 overflow-x-auto border-b border-neutral-200 bg-neutral-50 px-1 py-1 dark:border-
|
|
58
|
-
: "flex flex-shrink-0 gap-1 overflow-x-auto border-b border-neutral-200 bg-neutral-50 px-2 py-1 dark:border-
|
|
57
|
+
? "flex flex-shrink-0 gap-0.5 overflow-x-auto border-b border-neutral-200 bg-neutral-50 px-1 py-1 dark:border-dark-line dark:bg-dark-card"
|
|
58
|
+
: "flex flex-shrink-0 gap-1 overflow-x-auto border-b border-neutral-200 bg-neutral-50 px-2 py-1 dark:border-dark-line dark:bg-dark-card" }, tabs.map((t) => {
|
|
59
59
|
const selected = t.key === active;
|
|
60
60
|
const tabDisabled = disabledKeys.includes(t.key);
|
|
61
61
|
return (React.createElement("button", { key: t.key, type: "button", role: "tab", "data-tab-key": t.key, "aria-selected": selected && tabDisabled === false, "aria-label": t.label, "aria-disabled": tabDisabled ? true : undefined, disabled: tabDisabled, title: t.icon ? t.label : undefined, onClick: () => onSelect(t.key), style: {
|
|
@@ -67,7 +67,7 @@ export function SubTabStrip({ tabs, active, onSelect, ariaLabel, compact = false
|
|
|
67
67
|
minWidth: compact ? 36 : 44,
|
|
68
68
|
}, className: "shrink-0 whitespace-nowrap rounded disabled:cursor-not-allowed disabled:opacity-50 " +
|
|
69
69
|
(selected && tabDisabled === false
|
|
70
|
-
? "bg-white text-neutral-900 shadow-sm dark:bg-
|
|
71
|
-
: "text-neutral-600 hover:text-neutral-900 dark:text-
|
|
70
|
+
? "bg-white text-neutral-900 shadow-sm dark:bg-dark-raised dark:text-dark-ink"
|
|
71
|
+
: "text-neutral-600 hover:text-neutral-900 dark:text-dark-muted dark:hover:text-dark-ink") }, t.icon ? (React.createElement("span", { style: { display: "inline-flex", alignItems: "center", justifyContent: "center", height: 20 } }, t.icon)) : (t.label)));
|
|
72
72
|
})));
|
|
73
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VIBES_WINDOW_CSS = "\n.vwin-scope {\n --vwin-frame: #000;\n --vwin-bar: #fefff1;\n --vwin-line: #2c2c22;\n --vwin-field: #cccdc8;\n --vwin-grid-line: rgba(255, 255, 255, 0.375);\n --vwin-red: #d92a1c;\n --vwin-gear-disc: #231f20;\n --vwin-cream: #fffff0;\n --vwin-edge: #231f20;\n --vwin-menu-bg: #fefff1;\n --vwin-menu-ink: #1a1a1a;\n --vwin-bar-height: 53px;\n /* The black border: 15px on the sides, top and bottom from 768px up (the\n designer comp, #6906). Phones go full bleed (Marcus, 2026-10-07: side\n borders made the page feel glitchy on a phone); the black stays only at\n the top, behind the bar's rounded corners. */\n --vwin-side: 15px;\n --vwin-top: 15px;\n --vwin-bottom: 15px;\n /* The bottom border never sits over the home indicator, except in the iOS\n app on a phone (see the phone tokens). */\n --vwin-bottom-floor: var(--vibes-safe-bottom, env(safe-area-inset-bottom, 0px));\n /* Display headings in the frame are set bold (Chris, 2026-10-07); getTitle\n reads this, so pages outside the frame keep the regular cut. */\n --vibes-home-title-weight: 700;\n}\n/* Phones (Chris, 2026-10-08): a few px of black round the sides and top, and\n a black foundation under the window, so the site sits popped out on top of\n a black base with all the active content above it. The window ends in\n rounded corners 16px above the foundation strip (see .vwin-frame::after);\n in mobile Safari that strip is the whole toolbar area, painted solid black,\n so the address bar floats on black. */\n@media (width < 768px) {\n .vwin-scope {\n --vwin-side: 4px;\n --vwin-top: 4px;\n --vwin-bottom: 16px;\n }\n /* The iOS app has no address bar to float: the bottom edge matches the\n sides (4px) and the window runs over the home-indicator area, its content\n padded to clear the indicator (Marcus, 2026-10-08). */\n .vwin-scope[data-shell=\"native\"] {\n --vwin-bottom: 4px;\n --vwin-bottom-floor: 0px;\n }\n .vwin-scope[data-shell=\"native\"] .vwin-content {\n padding-bottom: var(--vibes-safe-bottom, env(safe-area-inset-bottom, 0px));\n }\n}\n@media (prefers-color-scheme: dark) {\n .vwin-scope:not([data-scheme=\"light\"]) {\n --vwin-line: #83817d;\n --vwin-field: #2a2a2a;\n --vwin-grid-line: rgba(0, 0, 0, 0.275);\n --vwin-edge: #000;\n --vwin-menu-bg: #2a2a2a;\n --vwin-menu-ink: #e0e0e0;\n --vibes-home-title-ink: #fefff1;\n}\n}\n.vwin-scope[data-scheme=\"dark\"] {\n --vwin-line: #83817d;\n --vwin-field: #2a2a2a;\n --vwin-grid-line: rgba(0, 0, 0, 0.275);\n --vwin-edge: #000;\n --vwin-menu-bg: #2a2a2a;\n --vwin-menu-ink: #e0e0e0;\n --vibes-home-title-ink: #fefff1;\n}\n\n/* The page background is the frame's black. Safari paints the strips above\n and below the page (status bar, the room under its toolbar) from it or from\n the fixed black edges, so the site sits on black all round (Chris,\n 2026-10-08: the window resting on a solid black foundation). */\nhtml:has(.vwin-frame),\nbody:has(.vwin-frame) {\n background-color: #000;\n}\n/* An open menu holds the page still behind its overlay. */\nhtml[data-vwin-menu-open] {\n overflow: hidden;\n}\n\n/* The page scrolls on the DOCUMENT, not inside the panel. iOS 26 Safari only\n lets page content show through its floating glass address bar when the\n document scrolls; a frame whose content scrolled in an inner box got solid\n strips there instead. So the frame and panel are in flow, at least the large\n viewport tall (toolbar collapsed; 100vh where lvh is unknown), and nothing\n fixed or sticky touches the bottom edge while the menu is closed: Safari\n colours the strip under its toolbar from such an element (it took the\n panel's grey when the frame was pinned there). */\n.vwin-frame {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-height: 100vh;\n min-height: 100lvh;\n /* The page ends --vwin-bottom above the bottom (15px from 768px up). Phones\n override the whole frame below (it is fixed there). */\n padding: max(var(--vwin-top), var(--vibes-safe-top, env(safe-area-inset-top, 0px))) max(var(--vwin-side), var(--vibes-safe-right, env(safe-area-inset-right, 0px))) var(--vwin-bottom)\n max(var(--vwin-side), var(--vibes-safe-left, env(safe-area-inset-left, 0px)));\n background-color: var(--vwin-frame);\n}\n/* No z-index and no isolation on purpose: a page's own full-screen overlays\n (z-50 detail panels and modals) must still rise above the bar (40) and the\n menu (45), as they do outside the frame. */\n.vwin-panel {\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n /* The fixed bar covers the panel's first 54px at rest; content starts under it. */\n padding-top: calc(var(--vwin-bar-height) + 1px);\n border-radius: 12px;\n overflow: clip;\n background-color: var(--vwin-field);\n}\n/* The black border, fixed over the page edges, so it shows on every side\n while the page scrolls under it: a rounded cut-out the size of the window,\n with black spread out from it. 15px all round from 768px up (the comp,\n #6906); on phones a 4px edge and the black foundation at the bottom (see the\n phone tokens). Above the menu (45) so the menu's ends tuck under the border;\n a page's own z-50 overlays still cover it. It holds still with the chrome\n through the iOS keyboard pan (--vwin-pan). */\n.vwin-frame::before {\n content: \"\";\n position: fixed;\n top: max(var(--vwin-top), var(--vibes-safe-top, env(safe-area-inset-top, 0px)));\n left: max(var(--vwin-side), var(--vibes-safe-left, env(safe-area-inset-left, 0px)));\n right: max(var(--vwin-side), var(--vibes-safe-right, env(safe-area-inset-right, 0px)));\n bottom: max(var(--vwin-bottom), var(--vwin-bottom-floor));\n border-radius: 12px;\n box-shadow: 0 0 0 100vmax var(--vwin-frame);\n transform: translateY(var(--vwin-pan, 0px));\n pointer-events: none;\n z-index: 46;\n}\n/* Phones: the black foundation strip, pinned to the bottom edge. A fixed\n element on that edge is what mobile Safari colours the strip under its\n floating toolbar from, so the whole toolbar area turns solid black and the\n address bar floats on it; the window's rounded bottom sits 16px above. In the\n iOS app (no toolbar) it is the home-indicator area. */\n@media (width < 768px) {\n .vwin-frame::after {\n content: \"\";\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n height: max(var(--vwin-bottom), var(--vwin-bottom-floor));\n background-color: var(--vwin-frame);\n transform: translateY(var(--vwin-pan, 0px));\n pointer-events: none;\n z-index: 46;\n }\n}\n\n/* The grid: behind the content, the full height of the panel, whole cells\n only. It scrolls with the page (a fixed grid would touch the bottom edge). */\n.vwin-grid-area {\n position: absolute;\n top: calc(var(--vwin-bar-height) + 1px);\n left: 15px;\n right: 15px;\n bottom: 25px;\n display: flex;\n justify-content: center;\n align-items: flex-start;\n pointer-events: none;\n z-index: 0;\n}\n.vwin-grid {\n flex: none;\n width: 100%;\n height: 100%;\n background-image:\n linear-gradient(to right, var(--vwin-grid-line) 1px, transparent 1px),\n linear-gradient(to bottom, var(--vwin-grid-line) 1px, transparent 1px);\n background-size: 32px 30px;\n background-position: 0 0;\n}\n@supports (width: round(down, 100px, 32px)) {\n .vwin-grid {\n width: calc(round(down, 100% - 1px, 32px) + 1px);\n height: calc(round(down, 100% - 1px, 30px) + 1px);\n }\n}\n/* Phones: the grid runs edge to edge inside the window. A plain strip of field\n beside a whole-cell grid read as a border down each side (Marcus,\n 2026-10-07). Cells start at the left edge, as the iOS launch screen tiles\n them, so the launch hands off to the same grid. */\n@media (width < 768px) {\n .vwin-grid-area {\n left: 0;\n right: 0;\n bottom: 0;\n }\n .vwin-grid {\n width: 100%;\n height: 100%;\n background-position: 0 0;\n }\n}\n\n/* The page, in normal flow under the bar and over the grid. Positioned (after\n the grid) so it paints above it, and so a page that fills the panel\n (absolute inset-0: the auth boot shell, the logged-out view) fills at least\n the viewport under the bar. */\n.vwin-content {\n position: relative;\n flex: 1 0 auto;\n /* The panel runs under the home indicator; the last content clears it. */\n padding-bottom: var(--vibes-safe-bottom, env(safe-area-inset-bottom, 0px));\n box-sizing: border-box;\n}\n\n/* Leaving: a navigation away has started, so the page clears off the grid and\n only the bar and the grid stay until the next page commits. The short delay\n keeps a navigation that commits at once from flickering; the return is\n instant (no transition outside this state). */\n.vwin-frame[data-leaving] .vwin-content {\n opacity: 0;\n transform: translateY(6px);\n pointer-events: none;\n transition:\n opacity 120ms ease-in 40ms,\n transform 120ms ease-in 40ms;\n}\n@media (prefers-reduced-motion: reduce) {\n .vwin-frame[data-leaving] .vwin-content {\n transform: none;\n }\n}\n\n/* Phones: the window is fixed and its content scrolls inside it, the grid\n holding still behind (the #6906 layout). Mobile Safari only paints the strip\n under its floating toolbar solid when the document itself does not scroll;\n then it takes the colour of the black foundation pinned to the bottom edge\n (.vwin-frame::after), and the window rests on black with the address bar\n floating on it (Chris, 2026-10-08). From 768px up the document scrolls. */\n@media (width < 768px) {\n html:has(.vwin-frame),\n body:has(.vwin-frame) {\n height: 100%;\n overflow: hidden;\n }\n .vwin-frame {\n position: fixed;\n inset: 0;\n min-height: 0;\n padding-bottom: max(var(--vwin-bottom), var(--vwin-bottom-floor));\n }\n .vwin-panel {\n flex: 1 1 auto;\n min-height: 0;\n }\n .vwin-content {\n position: absolute;\n top: calc(var(--vwin-bar-height) + 1px);\n left: 0;\n right: 0;\n bottom: 0;\n padding-bottom: 0;\n overflow-x: hidden;\n overflow-y: auto;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n }\n}\n\n/* The top chrome: a fixed black strip holding the bar. iOS 26 Safari colours\n the status-bar strip from the fixed element pinned to the top edge; pinned\n there itself, the bar turned it cream. The strip's black also shows in the\n bar's rounded top corners, as the frame's did. */\n.vwin-chrome {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 40;\n box-sizing: border-box;\n padding: max(var(--vwin-top), var(--vibes-safe-top, env(safe-area-inset-top, 0px))) max(var(--vwin-side), var(--vibes-safe-right, env(safe-area-inset-right, 0px))) 0 max(var(--vwin-side), var(--vibes-safe-left, env(safe-area-inset-left, 0px)));\n background-color: var(--vwin-frame);\n}\n.vwin-chrome-bar {\n position: relative;\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n}\n\n/* The bar's middle: a page's own control (useWindowBarCenter), above the bar's\n one button so a tap on it never toggles the menu. Empty, it takes no taps. */\n.vwin-bar-center {\n position: absolute;\n top: 0;\n bottom: 1px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 41;\n display: flex;\n align-items: center;\n pointer-events: none;\n}\n.vwin-bar-center > * {\n pointer-events: auto;\n}\n/* The way back out of a full-screen app: the logo's black stadium, with a\n chevron and the MENU button's lettering. */\n.vwin-bar-back {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 34px;\n margin: 0;\n padding: 0 14px 0 9px;\n border: 0;\n border-radius: 999px;\n background-color: var(--vwin-frame);\n color: var(--vwin-cream);\n font: inherit;\n font-size: 13px;\n font-weight: bold;\n letter-spacing: 1.5px;\n text-transform: uppercase;\n white-space: nowrap;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n.vwin-bar-back svg {\n width: 18px;\n height: 18px;\n flex-shrink: 0;\n}\n.vwin-bar-back:focus-visible {\n outline: 3px solid var(--vwin-red);\n outline-offset: 2px;\n}\n.vwin-bar-back:active {\n transform: scale(0.96);\n}\n\n/* The bar: one real button, so a tap anywhere on it toggles the menu. */\n.vwin-bar {\n position: relative;\n z-index: 40;\n box-sizing: content-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: var(--vwin-bar-height);\n margin: 0;\n padding: 0;\n border: 0;\n border-bottom: 1px solid var(--vwin-line);\n background-color: var(--vwin-bar);\n color: var(--vwin-cream);\n font: inherit;\n text-align: left;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n overflow: hidden;\n}\n.vwin-bar:focus-visible {\n outline: 3px solid var(--vwin-red);\n outline-offset: -3px;\n}\n.vwin-pill {\n display: flex;\n align-items: center;\n height: 100%;\n padding-left: 4px;\n}\n/* The pill's slide runs on the menu's clock (same 0.5s and closing curve), so\n pill and menu read as one physical piece. Opening, its spring is a touch\n softer than the menu's (1.25 vs 1.56): at the menu's full overshoot the\n cream shape poked past the pill's black outline. */\n.vwin-pill {\n --vibes-switch-slide: 0.5s cubic-bezier(0.34, 1.25, 0.64, 1);\n}\n.vwin-frame[data-menu-phase=\"closing\"] .vwin-pill,\n.vwin-frame[data-menu-phase=\"closed\"] .vwin-pill {\n --vibes-switch-slide: 0.5s cubic-bezier(0.64, 0, 0.66, 0);\n}\n/* The status glow behind the pill (#7154 option 5b; made invisible at rest\n by owner 2026-10-30, #8202). It keeps the vibe card corner's .vm-glass shape,\n fitted to the drawn logo at size 54 (the black stadium measures 91.9 x\n 33.6px, its left edge 12px into .vwin-pill and its centre 26.3px down the\n bar) with 3px on every side, the menu's MENU_GEOMETRY.ring, but no obsidian\n paint: the top-left logo sits bare on the bar, and the obsidian glass\n belongs only to the switch docked bottom right. The switch draws no status\n ring here (statusRing={false}); a live status fills this shape instead. */\n.vwin-pill {\n position: relative;\n}\n.vwin-pill-glass {\n position: absolute;\n left: 9px;\n top: 6px;\n width: 98px;\n height: 40px;\n border-radius: 999px;\n background-color: transparent;\n pointer-events: none;\n}\n/* The status cue, on the ring's own clock: VibesSwitch's vibes-oval-trace is\n one 7s pass that draws the ring on by 14.3% (cubic-bezier(0.3, 0.6, 0.25,\n 1)), holds it to 71.4%, then fades it out (ease-in) by 100%. The glow runs\n the same stops: clear to the status colour while the ring would draw, held\n while it would hold, back to clear while it would fade. Replays per status\n because VibesWindowHeader keys the glow on colour + status id, as\n VibesSwitch keys the ellipse. */\n.vwin-pill-glass-status {\n animation: vwin-pill-glass-status 7s forwards;\n}\n@keyframes vwin-pill-glass-status {\n 0% { background-color: transparent; animation-timing-function: cubic-bezier(0.3, 0.6, 0.25, 1); }\n 14.3% { background-color: var(--vwin-pill-status); }\n 71.4% { background-color: var(--vwin-pill-status); animation-timing-function: ease-in; }\n 100% { background-color: transparent; }\n}\n.vwin-pill svg {\n position: relative;\n /* The switch's viewBox carries headroom for its status ring; this centres the\n drawn logo (not the svg box) on the bar. */\n top: -8.5px;\n pointer-events: none;\n}\n.vwin-menu-button {\n display: flex;\n align-items: center;\n gap: 8px;\n height: var(--vwin-bar-height);\n padding: 0 16px 0 10px;\n background-color: var(--vwin-red);\n color: var(--vwin-cream);\n flex-shrink: 0;\n}\n.vwin-gear {\n display: flex;\n width: 35px;\n height: 35px;\n transform-origin: 50% 50%;\n}\n.vwin-menu-label {\n font-size: 14px;\n font-weight: bold;\n letter-spacing: 1.5px;\n text-transform: uppercase;\n white-space: nowrap;\n text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);\n color: var(--vwin-cream);\n opacity: 1;\n}\n@media (hover: hover) {\n .vwin-bar:hover .vwin-gear {\n animation: vwin-wiggle 0.6s ease-in-out infinite;\n }\n}\n.vwin-bar:active .vwin-menu-button {\n animation: vwin-shake 0.3s ease-in-out;\n}\n@keyframes vwin-wiggle {\n 0%, 100% { transform: rotate(0deg); }\n 25% { transform: rotate(-5deg); }\n 75% { transform: rotate(5deg); }\n}\n@keyframes vwin-shake {\n 0%, 100% { transform: translateX(0); }\n 25% { transform: translateX(-3px); }\n 75% { transform: translateX(3px); }\n}\n\n/* The menu: an overlay under the bar and a panel sliding in from the right,\n fixed from under the bar to the viewport bottom (touching the bottom edge\n only while open is fine). The bar stays live above it, so the pill's own\n slide plays and a header tap closes the menu the same way it opened it. */\n.vwin-menu-layer {\n position: fixed;\n top: calc(max(var(--vwin-top), var(--vibes-safe-top, env(safe-area-inset-top, 0px))) + var(--vwin-bar-height) + 1px);\n left: max(var(--vwin-side), var(--vibes-safe-left, env(safe-area-inset-left, 0px)));\n right: max(var(--vwin-side), var(--vibes-safe-right, env(safe-area-inset-right, 0px)));\n bottom: var(--vwin-bottom);\n z-index: 45;\n overflow: hidden;\n}\n.vwin-frame[data-menu-phase=\"closed\"] .vwin-menu-layer {\n visibility: hidden;\n pointer-events: none;\n}\n.vwin-overlay {\n position: absolute;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.6);\n animation: vwin-fade-in 0.3s ease-out;\n}\n.vwin-menu-panel {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 400px;\n max-width: 90%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: var(--vwin-menu-bg);\n color: var(--vwin-menu-ink);\n border-top: 8px solid var(--vwin-edge);\n border-bottom: 8px solid var(--vwin-edge);\n box-shadow: -8px 0 0 0 var(--vwin-edge);\n animation: vwin-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);\n outline: none;\n overflow: hidden;\n}\n/* Focus lands on the panel itself when the menu opens (so the next Tab reaches\n the first row); that programmatic focus draws no ring. Rows and buttons\n inside keep their own focus-visible rings. */\n.vwin-menu-panel:focus,\n.vwin-menu-panel:focus-visible {\n outline: none;\n}\n.vwin-frame[data-menu-phase=\"closing\"] .vwin-overlay {\n animation: vwin-fade-out 0.3s ease-out forwards;\n}\n.vwin-frame[data-menu-phase=\"closing\"] .vwin-menu-panel {\n animation: vwin-slide-out 0.5s cubic-bezier(0.64, 0, 0.66, 0) forwards;\n}\n.vwin-frame[data-menu-phase=\"closed\"] .vwin-overlay,\n.vwin-frame[data-menu-phase=\"closed\"] .vwin-menu-panel {\n animation: none;\n}\n@keyframes vwin-fade-in { from { opacity: 0; } to { opacity: 1; } }\n@keyframes vwin-fade-out { from { opacity: 1; } to { opacity: 0; } }\n@keyframes vwin-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }\n@keyframes vwin-slide-out { from { transform: translateX(0); } to { transform: translateX(calc(100% + 8px)); } }\n\n@media (prefers-reduced-motion: reduce) {\n .vwin-pill,\n .vwin-frame .vwin-pill {\n --vibes-switch-slide: 0s;\n }\n /* The ring's reduced-motion arm (vibes-oval-fade) skips the drawing sweep:\n full ring at once, hold, fade. The glow mirrors it: the status colour at\n once, held to 71.4%, then eased back to clear. A colour change is not\n motion, and it keeps the \"this is expiring\" meaning. */\n .vwin-pill-glass-status {\n animation-name: vwin-pill-glass-fade;\n }\n @keyframes vwin-pill-glass-fade {\n 0% { background-color: var(--vwin-pill-status); }\n 71.4% { background-color: var(--vwin-pill-status); animation-timing-function: ease-in; }\n 100% { background-color: transparent; }\n }\n .vwin-bar:hover .vwin-gear,\n .vwin-bar:active .vwin-menu-button,\n .vwin-overlay,\n .vwin-menu-panel {\n animation: none !important;\n }\n /* No slide to wait out: a closing menu is simply gone. */\n .vwin-frame[data-menu-phase=\"closing\"] .vwin-menu-layer {\n visibility: hidden;\n }\n}\n";
|
|
1
|
+
export declare const VIBES_WINDOW_CSS = "\n.vwin-scope {\n --vwin-frame: #000;\n --vwin-bar: #fefff1;\n --vwin-line: #2c2c22;\n --vwin-field: #cccdc8;\n --vwin-grid-line: rgba(255, 255, 255, 0.375);\n --vwin-red: #d92a1c;\n --vwin-gear-disc: #231f20;\n --vwin-cream: #fffff0;\n --vwin-edge: #231f20;\n --vwin-menu-bg: #fefff1;\n --vwin-menu-ink: #1a1a1a;\n --vwin-bar-height: 53px;\n /* The black border: 15px on the sides, top and bottom from 768px up (the\n designer comp, #6906). Phones go full bleed (Marcus, 2026-10-07: side\n borders made the page feel glitchy on a phone); the black stays only at\n the top, behind the bar's rounded corners. */\n --vwin-side: 15px;\n --vwin-top: 15px;\n --vwin-bottom: 15px;\n /* The bottom border never sits over the home indicator, except in the iOS\n app on a phone (see the phone tokens). */\n --vwin-bottom-floor: var(--vibes-safe-bottom, env(safe-area-inset-bottom, 0px));\n /* Display headings in the frame are set bold (Chris, 2026-10-07); getTitle\n reads this, so pages outside the frame keep the regular cut. */\n --vibes-home-title-weight: 700;\n}\n/* Phones (Chris, 2026-10-08): a few px of black round the sides and top, and\n a black foundation under the window, so the site sits popped out on top of\n a black base with all the active content above it. The window ends in\n rounded corners 16px above the foundation strip (see .vwin-frame::after);\n in mobile Safari that strip is the whole toolbar area, painted solid black,\n so the address bar floats on black. */\n@media (width < 768px) {\n .vwin-scope {\n --vwin-side: 4px;\n --vwin-top: 4px;\n --vwin-bottom: 16px;\n }\n /* The iOS app has no address bar to float: the bottom edge matches the\n sides (4px) and the window runs over the home-indicator area, its content\n padded to clear the indicator (Marcus, 2026-10-08). */\n .vwin-scope[data-shell=\"native\"] {\n --vwin-bottom: 4px;\n --vwin-bottom-floor: 0px;\n }\n .vwin-scope[data-shell=\"native\"] .vwin-content {\n padding-bottom: calc(12px + var(--vibes-safe-bottom, env(safe-area-inset-bottom, 0px)));\n }\n}\n@media (prefers-color-scheme: dark) {\n .vwin-scope:not([data-scheme=\"light\"]) {\n --vwin-line: #83817d;\n --vwin-edge: #000;\n --vwin-menu-bg: #2a2a2a;\n --vwin-menu-ink: #e0e0e0;\n --vibes-home-title-ink: #1a1a1a;\n}\n}\n.vwin-scope[data-scheme=\"dark\"] {\n --vwin-line: #83817d;\n --vwin-edge: #000;\n --vwin-menu-bg: #2a2a2a;\n --vwin-menu-ink: #e0e0e0;\n --vibes-home-title-ink: #1a1a1a;\n}\n\n/* The page background is the frame's black. Safari paints the strips above\n and below the page (status bar, the room under its toolbar) from it or from\n the fixed black edges, so the site sits on black all round (Chris,\n 2026-10-08: the window resting on a solid black foundation). */\nhtml:has(.vwin-frame),\nbody:has(.vwin-frame) {\n background-color: #000;\n}\n/* An open menu holds the page still behind its overlay. */\nhtml[data-vwin-menu-open] {\n overflow: hidden;\n}\n\n/* The page scrolls on the DOCUMENT, not inside the panel. iOS 26 Safari only\n lets page content show through its floating glass address bar when the\n document scrolls; a frame whose content scrolled in an inner box got solid\n strips there instead. So the frame and panel are in flow, at least the large\n viewport tall (toolbar collapsed; 100vh where lvh is unknown), and nothing\n fixed or sticky touches the bottom edge while the menu is closed: Safari\n colours the strip under its toolbar from such an element (it took the\n panel's grey when the frame was pinned there). */\n.vwin-frame {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-height: 100vh;\n min-height: 100lvh;\n /* The page ends --vwin-bottom above the bottom (15px from 768px up). Phones\n override the whole frame below (it is fixed there). */\n padding: max(var(--vwin-top), var(--vibes-safe-top, env(safe-area-inset-top, 0px))) max(var(--vwin-side), var(--vibes-safe-right, env(safe-area-inset-right, 0px))) var(--vwin-bottom)\n max(var(--vwin-side), var(--vibes-safe-left, env(safe-area-inset-left, 0px)));\n background-color: var(--vwin-frame);\n}\n/* No z-index and no isolation on purpose: a page's own full-screen overlays\n (z-50 detail panels and modals) must still rise above the bar (40) and the\n menu (45), as they do outside the frame. */\n.vwin-panel {\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n /* The fixed bar covers the panel's first 54px at rest; content starts under it. */\n padding-top: calc(var(--vwin-bar-height) + 1px);\n border-radius: 12px;\n overflow: clip;\n background-color: var(--vwin-field);\n}\n/* The black border, fixed over the page edges, so it shows on every side\n while the page scrolls under it: a rounded cut-out the size of the window,\n with black spread out from it. 15px all round from 768px up (the comp,\n #6906); on phones a 4px edge and the black foundation at the bottom (see the\n phone tokens). Above the menu (45) so the menu's ends tuck under the border;\n a page's own z-50 overlays still cover it. It holds still with the chrome\n through the iOS keyboard pan (--vwin-pan). */\n.vwin-frame::before {\n content: \"\";\n position: fixed;\n top: max(var(--vwin-top), var(--vibes-safe-top, env(safe-area-inset-top, 0px)));\n left: max(var(--vwin-side), var(--vibes-safe-left, env(safe-area-inset-left, 0px)));\n right: max(var(--vwin-side), var(--vibes-safe-right, env(safe-area-inset-right, 0px)));\n bottom: max(var(--vwin-bottom), var(--vwin-bottom-floor));\n border-radius: 12px;\n box-shadow: 0 0 0 100vmax var(--vwin-frame);\n transform: translateY(var(--vwin-pan, 0px));\n pointer-events: none;\n z-index: 46;\n}\n/* Phones: the black foundation strip, pinned to the bottom edge. A fixed\n element on that edge is what mobile Safari colours the strip under its\n floating toolbar from, so the whole toolbar area turns solid black and the\n address bar floats on it; the window's rounded bottom sits 16px above. In the\n iOS app (no toolbar) it is the home-indicator area. */\n@media (width < 768px) {\n .vwin-frame::after {\n content: \"\";\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n height: max(var(--vwin-bottom), var(--vwin-bottom-floor));\n background-color: var(--vwin-frame);\n transform: translateY(var(--vwin-pan, 0px));\n pointer-events: none;\n z-index: 46;\n }\n}\n\n/* The grid: behind the content, the full height of the panel, whole cells\n only. It scrolls with the page (a fixed grid would touch the bottom edge). */\n.vwin-grid-area {\n position: absolute;\n top: calc(var(--vwin-bar-height) + 1px);\n left: 15px;\n right: 15px;\n bottom: 25px;\n display: flex;\n justify-content: center;\n align-items: flex-start;\n pointer-events: none;\n z-index: 0;\n}\n.vwin-grid {\n flex: none;\n width: 100%;\n height: 100%;\n background-image:\n linear-gradient(to right, var(--vwin-grid-line) 1px, transparent 1px),\n linear-gradient(to bottom, var(--vwin-grid-line) 1px, transparent 1px);\n background-size: 32px 30px;\n background-position: 0 0;\n}\n@supports (width: round(down, 100px, 32px)) {\n .vwin-grid {\n width: calc(round(down, 100% - 1px, 32px) + 1px);\n height: calc(round(down, 100% - 1px, 30px) + 1px);\n }\n}\n/* Phones: the grid runs edge to edge inside the window. A plain strip of field\n beside a whole-cell grid read as a border down each side (Marcus,\n 2026-10-07). Cells start at the left edge, as the iOS launch screen tiles\n them, so the launch hands off to the same grid. */\n@media (width < 768px) {\n .vwin-grid-area {\n left: 0;\n right: 0;\n bottom: 0;\n }\n .vwin-grid {\n width: 100%;\n height: 100%;\n background-position: 0 0;\n }\n}\n\n/* The page, in normal flow under the bar and over the grid. Positioned (after\n the grid) so it paints above it, and so a page that fills the panel\n (absolute inset-0: the auth boot shell, the logged-out view) fills at least\n the viewport under the bar. */\n.vwin-content {\n position: relative;\n flex: 1 0 auto;\n /* Text set straight on the grey field is the dark field ink in BOTH themes\n (1A, owner 2026-11-30: the field stays #cccdc8 in dark). Without this a\n framed page inherited body's dark-mode #e0e0e0, light text on grey. Every\n dark card on the field sets its own ink (the card tokens). */\n color: var(--vibes-field-ink, #1a1a1a);\n /* The panel runs under the home indicator; the last content clears it. */\n padding-bottom: var(--vibes-safe-bottom, env(safe-area-inset-bottom, 0px));\n box-sizing: border-box;\n}\n\n/* Leaving: a navigation away has started, so the page clears off the grid and\n only the bar and the grid stay until the next page commits. The short delay\n keeps a navigation that commits at once from flickering; the return is\n instant (no transition outside this state). */\n.vwin-frame[data-leaving] .vwin-content {\n opacity: 0;\n transform: translateY(6px);\n pointer-events: none;\n transition:\n opacity 120ms ease-in 40ms,\n transform 120ms ease-in 40ms;\n}\n@media (prefers-reduced-motion: reduce) {\n .vwin-frame[data-leaving] .vwin-content {\n transform: none;\n }\n}\n\n/* Phones: the window is fixed and its content scrolls inside it, the grid\n holding still behind (the #6906 layout). Mobile Safari only paints the strip\n under its floating toolbar solid when the document itself does not scroll;\n then it takes the colour of the black foundation pinned to the bottom edge\n (.vwin-frame::after), and the window rests on black with the address bar\n floating on it (Chris, 2026-10-08). From 768px up the document scrolls. */\n@media (width < 768px) {\n html:has(.vwin-frame),\n body:has(.vwin-frame) {\n height: 100%;\n overflow: hidden;\n }\n .vwin-frame {\n position: fixed;\n inset: 0;\n min-height: 0;\n padding-bottom: max(var(--vwin-bottom), var(--vwin-bottom-floor));\n }\n .vwin-panel {\n flex: 1 1 auto;\n min-height: 0;\n }\n .vwin-content {\n position: absolute;\n top: calc(var(--vwin-bar-height) + 1px);\n left: 0;\n right: 0;\n bottom: 0;\n /* The last line clears the window's rounded bottom (12px) and the home\n indicator (fix 10, owner 2026-11-30). */\n padding-bottom: calc(12px + var(--vibes-safe-bottom, env(safe-area-inset-bottom, 0px)));\n overflow-x: hidden;\n overflow-y: auto;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n }\n}\n\n/* The top chrome: a fixed black strip holding the bar. iOS 26 Safari colours\n the status-bar strip from the fixed element pinned to the top edge; pinned\n there itself, the bar turned it cream. The strip's black also shows in the\n bar's rounded top corners, as the frame's did. */\n.vwin-chrome {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 40;\n box-sizing: border-box;\n padding: max(var(--vwin-top), var(--vibes-safe-top, env(safe-area-inset-top, 0px))) max(var(--vwin-side), var(--vibes-safe-right, env(safe-area-inset-right, 0px))) 0 max(var(--vwin-side), var(--vibes-safe-left, env(safe-area-inset-left, 0px)));\n background-color: var(--vwin-frame);\n}\n.vwin-chrome-bar {\n position: relative;\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n}\n\n/* The bar's middle: a page's own control (useWindowBarCenter), above the bar's\n one button so a tap on it never toggles the menu. Empty, it takes no taps. */\n.vwin-bar-center {\n position: absolute;\n top: 0;\n bottom: 1px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 41;\n display: flex;\n align-items: center;\n pointer-events: none;\n}\n.vwin-bar-center > * {\n pointer-events: auto;\n}\n/* The way back out of a full-screen app: the logo's black stadium, with a\n chevron and the MENU button's lettering. */\n.vwin-bar-back {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 34px;\n margin: 0;\n padding: 0 14px 0 9px;\n border: 0;\n border-radius: 999px;\n background-color: var(--vwin-frame);\n color: var(--vwin-cream);\n font: inherit;\n font-size: 13px;\n font-weight: bold;\n letter-spacing: 1.5px;\n text-transform: uppercase;\n white-space: nowrap;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n.vwin-bar-back svg {\n width: 18px;\n height: 18px;\n flex-shrink: 0;\n}\n.vwin-bar-back:focus-visible {\n outline: 3px solid var(--vwin-red);\n outline-offset: 2px;\n}\n.vwin-bar-back:active {\n transform: scale(0.96);\n}\n\n/* The bar: one real button, so a tap anywhere on it toggles the menu. */\n.vwin-bar {\n position: relative;\n z-index: 40;\n box-sizing: content-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: var(--vwin-bar-height);\n margin: 0;\n padding: 0;\n border: 0;\n border-bottom: 1px solid var(--vwin-line);\n background-color: var(--vwin-bar);\n color: var(--vwin-cream);\n font: inherit;\n text-align: left;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n overflow: hidden;\n}\n.vwin-bar:focus-visible {\n outline: 3px solid var(--vwin-red);\n outline-offset: -3px;\n}\n.vwin-pill {\n display: flex;\n align-items: center;\n height: 100%;\n padding-left: 4px;\n}\n/* The pill's slide runs on the menu's clock (same 0.5s and closing curve), so\n pill and menu read as one physical piece. Opening, its spring is a touch\n softer than the menu's (1.25 vs 1.56): at the menu's full overshoot the\n cream shape poked past the pill's black outline. */\n.vwin-pill {\n --vibes-switch-slide: 0.5s cubic-bezier(0.34, 1.25, 0.64, 1);\n}\n.vwin-frame[data-menu-phase=\"closing\"] .vwin-pill,\n.vwin-frame[data-menu-phase=\"closed\"] .vwin-pill {\n --vibes-switch-slide: 0.5s cubic-bezier(0.64, 0, 0.66, 0);\n}\n/* The status glow behind the pill (#7154 option 5b; made invisible at rest\n by owner 2026-10-30, #8202). It keeps the vibe card corner's .vm-glass shape,\n fitted to the drawn logo at size 54 (the black stadium measures 91.9 x\n 33.6px, its left edge 12px into .vwin-pill and its centre 26.3px down the\n bar) with 3px on every side, the menu's MENU_GEOMETRY.ring, but no obsidian\n paint: the top-left logo sits bare on the bar, and the obsidian glass\n belongs only to the switch docked bottom right. The switch draws no status\n ring here (statusRing={false}); a live status fills this shape instead. */\n.vwin-pill {\n position: relative;\n}\n.vwin-pill-glass {\n position: absolute;\n left: 9px;\n top: 6px;\n width: 98px;\n height: 40px;\n border-radius: 999px;\n background-color: transparent;\n pointer-events: none;\n}\n/* The status cue, on the ring's own clock: VibesSwitch's vibes-oval-trace is\n one 7s pass that draws the ring on by 14.3% (cubic-bezier(0.3, 0.6, 0.25,\n 1)), holds it to 71.4%, then fades it out (ease-in) by 100%. The glow runs\n the same stops: clear to the status colour while the ring would draw, held\n while it would hold, back to clear while it would fade. Replays per status\n because VibesWindowHeader keys the glow on colour + status id, as\n VibesSwitch keys the ellipse. */\n.vwin-pill-glass-status {\n animation: vwin-pill-glass-status 7s forwards;\n}\n@keyframes vwin-pill-glass-status {\n 0% { background-color: transparent; animation-timing-function: cubic-bezier(0.3, 0.6, 0.25, 1); }\n 14.3% { background-color: var(--vwin-pill-status); }\n 71.4% { background-color: var(--vwin-pill-status); animation-timing-function: ease-in; }\n 100% { background-color: transparent; }\n}\n.vwin-pill svg {\n position: relative;\n /* The switch's viewBox carries headroom for its status ring; this centres the\n drawn logo (not the svg box) on the bar. */\n top: -8.5px;\n pointer-events: none;\n}\n.vwin-menu-button {\n display: flex;\n align-items: center;\n gap: 8px;\n height: var(--vwin-bar-height);\n padding: 0 16px 0 10px;\n background-color: var(--vwin-red);\n color: var(--vwin-cream);\n flex-shrink: 0;\n}\n.vwin-gear {\n display: flex;\n width: 35px;\n height: 35px;\n transform-origin: 50% 50%;\n}\n.vwin-menu-label {\n font-size: 14px;\n font-weight: bold;\n letter-spacing: 1.5px;\n text-transform: uppercase;\n white-space: nowrap;\n text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);\n color: var(--vwin-cream);\n opacity: 1;\n}\n@media (hover: hover) {\n .vwin-bar:hover .vwin-gear {\n animation: vwin-wiggle 0.6s ease-in-out infinite;\n }\n}\n.vwin-bar:active .vwin-menu-button {\n animation: vwin-shake 0.3s ease-in-out;\n}\n@keyframes vwin-wiggle {\n 0%, 100% { transform: rotate(0deg); }\n 25% { transform: rotate(-5deg); }\n 75% { transform: rotate(5deg); }\n}\n@keyframes vwin-shake {\n 0%, 100% { transform: translateX(0); }\n 25% { transform: translateX(-3px); }\n 75% { transform: translateX(3px); }\n}\n\n/* The menu: an overlay under the bar and a panel sliding in from the right,\n fixed from under the bar to the viewport bottom (touching the bottom edge\n only while open is fine). The bar stays live above it, so the pill's own\n slide plays and a header tap closes the menu the same way it opened it. */\n.vwin-menu-layer {\n position: fixed;\n top: calc(max(var(--vwin-top), var(--vibes-safe-top, env(safe-area-inset-top, 0px))) + var(--vwin-bar-height) + 1px);\n left: max(var(--vwin-side), var(--vibes-safe-left, env(safe-area-inset-left, 0px)));\n right: max(var(--vwin-side), var(--vibes-safe-right, env(safe-area-inset-right, 0px)));\n bottom: var(--vwin-bottom);\n z-index: 45;\n overflow: hidden;\n}\n.vwin-frame[data-menu-phase=\"closed\"] .vwin-menu-layer {\n visibility: hidden;\n pointer-events: none;\n}\n.vwin-overlay {\n position: absolute;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.6);\n animation: vwin-fade-in 0.3s ease-out;\n}\n.vwin-menu-panel {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 400px;\n max-width: 90%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: var(--vwin-menu-bg);\n color: var(--vwin-menu-ink);\n border-top: 8px solid var(--vwin-edge);\n border-bottom: 8px solid var(--vwin-edge);\n box-shadow: -8px 0 0 0 var(--vwin-edge);\n animation: vwin-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);\n outline: none;\n overflow: hidden;\n}\n/* Focus lands on the panel itself when the menu opens (so the next Tab reaches\n the first row); that programmatic focus draws no ring. Rows and buttons\n inside keep their own focus-visible rings. */\n.vwin-menu-panel:focus,\n.vwin-menu-panel:focus-visible {\n outline: none;\n}\n.vwin-frame[data-menu-phase=\"closing\"] .vwin-overlay {\n animation: vwin-fade-out 0.3s ease-out forwards;\n}\n.vwin-frame[data-menu-phase=\"closing\"] .vwin-menu-panel {\n animation: vwin-slide-out 0.5s cubic-bezier(0.64, 0, 0.66, 0) forwards;\n}\n.vwin-frame[data-menu-phase=\"closed\"] .vwin-overlay,\n.vwin-frame[data-menu-phase=\"closed\"] .vwin-menu-panel {\n animation: none;\n}\n@keyframes vwin-fade-in { from { opacity: 0; } to { opacity: 1; } }\n@keyframes vwin-fade-out { from { opacity: 1; } to { opacity: 0; } }\n@keyframes vwin-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }\n@keyframes vwin-slide-out { from { transform: translateX(0); } to { transform: translateX(calc(100% + 8px)); } }\n\n@media (prefers-reduced-motion: reduce) {\n .vwin-pill,\n .vwin-frame .vwin-pill {\n --vibes-switch-slide: 0s;\n }\n /* The ring's reduced-motion arm (vibes-oval-fade) skips the drawing sweep:\n full ring at once, hold, fade. The glow mirrors it: the status colour at\n once, held to 71.4%, then eased back to clear. A colour change is not\n motion, and it keeps the \"this is expiring\" meaning. */\n .vwin-pill-glass-status {\n animation-name: vwin-pill-glass-fade;\n }\n @keyframes vwin-pill-glass-fade {\n 0% { background-color: var(--vwin-pill-status); }\n 71.4% { background-color: var(--vwin-pill-status); animation-timing-function: ease-in; }\n 100% { background-color: transparent; }\n }\n .vwin-bar:hover .vwin-gear,\n .vwin-bar:active .vwin-menu-button,\n .vwin-overlay,\n .vwin-menu-panel {\n animation: none !important;\n }\n /* No slide to wait out: a closing menu is simply gone. */\n .vwin-frame[data-menu-phase=\"closing\"] .vwin-menu-layer {\n visibility: hidden;\n }\n}\n";
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { SAFE_AREA_BOTTOM, SAFE_AREA_LEFT, SAFE_AREA_RIGHT, SAFE_AREA_TOP } from "../theme/safe-area.js";
|
|
2
2
|
const DARK_TOKENS = `
|
|
3
3
|
--vwin-line: #83817d;
|
|
4
|
-
--vwin-field: #2a2a2a;
|
|
5
|
-
--vwin-grid-line: rgba(0, 0, 0, 0.275);
|
|
6
4
|
--vwin-edge: #000;
|
|
7
5
|
--vwin-menu-bg: #2a2a2a;
|
|
8
6
|
--vwin-menu-ink: #e0e0e0;
|
|
9
|
-
--vibes-home-title-ink: #
|
|
7
|
+
--vibes-home-title-ink: #1a1a1a;
|
|
10
8
|
`;
|
|
11
9
|
export const VIBES_WINDOW_CSS = `
|
|
12
10
|
.vwin-scope {
|
|
@@ -56,7 +54,7 @@ export const VIBES_WINDOW_CSS = `
|
|
|
56
54
|
--vwin-bottom-floor: 0px;
|
|
57
55
|
}
|
|
58
56
|
.vwin-scope[data-shell="native"] .vwin-content {
|
|
59
|
-
padding-bottom: ${SAFE_AREA_BOTTOM};
|
|
57
|
+
padding-bottom: calc(12px + ${SAFE_AREA_BOTTOM});
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
@media (prefers-color-scheme: dark) {
|
|
@@ -206,6 +204,11 @@ html[data-vwin-menu-open] {
|
|
|
206
204
|
.vwin-content {
|
|
207
205
|
position: relative;
|
|
208
206
|
flex: 1 0 auto;
|
|
207
|
+
/* Text set straight on the grey field is the dark field ink in BOTH themes
|
|
208
|
+
(1A, owner 2026-11-30: the field stays #cccdc8 in dark). Without this a
|
|
209
|
+
framed page inherited body's dark-mode #e0e0e0, light text on grey. Every
|
|
210
|
+
dark card on the field sets its own ink (the card tokens). */
|
|
211
|
+
color: var(--vibes-field-ink, #1a1a1a);
|
|
209
212
|
/* The panel runs under the home indicator; the last content clears it. */
|
|
210
213
|
padding-bottom: ${SAFE_AREA_BOTTOM};
|
|
211
214
|
box-sizing: border-box;
|
|
@@ -257,7 +260,9 @@ html[data-vwin-menu-open] {
|
|
|
257
260
|
left: 0;
|
|
258
261
|
right: 0;
|
|
259
262
|
bottom: 0;
|
|
260
|
-
|
|
263
|
+
/* The last line clears the window's rounded bottom (12px) and the home
|
|
264
|
+
indicator (fix 10, owner 2026-11-30). */
|
|
265
|
+
padding-bottom: calc(12px + ${SAFE_AREA_BOTTOM});
|
|
261
266
|
overflow-x: hidden;
|
|
262
267
|
overflow-y: auto;
|
|
263
268
|
overscroll-behavior: contain;
|
|
@@ -14,7 +14,7 @@ export function VibesWindowHeader({ isOpen, onToggle, controlsId, label = "MENU"
|
|
|
14
14
|
const status = ovalColor !== undefined && ovalColor !== ovalColors.neutral ? ovalColor : undefined;
|
|
15
15
|
const pill = (React.createElement("span", { className: "vwin-pill", "data-window-pill": true, "aria-hidden": "true" },
|
|
16
16
|
React.createElement("span", { key: status === undefined ? "glass-idle" : `${status}|${ovalStatusKey ?? ""}`, className: status === undefined ? "vwin-pill-glass" : "vwin-pill-glass vwin-pill-glass-status", style: status === undefined ? undefined : { "--vwin-pill-status": status }, "data-window-pill-glass": "" }),
|
|
17
|
-
React.createElement(VibesSwitch, { size: 54, isActive: isOpen, statusRing: false, isTwinkling: isTwinkling, style: { pointerEvents: "none" } })));
|
|
17
|
+
React.createElement(VibesSwitch, { size: 54, isActive: !isOpen, statusRing: false, isTwinkling: isTwinkling, style: { pointerEvents: "none" } })));
|
|
18
18
|
if (menuHidden)
|
|
19
19
|
return (React.createElement(React.Fragment, null,
|
|
20
20
|
withStyles && React.createElement(VibesWindowStyles, null),
|
|
@@ -175,7 +175,7 @@ export function VibeMenu(props) {
|
|
|
175
175
|
const nav = navFor(state);
|
|
176
176
|
switch (section) {
|
|
177
177
|
case "home":
|
|
178
|
-
return (React.createElement(HomeCard, { viewer: viewer, homeHref: props.homeHref, onHome: props.onHome, myVibesHref: props.myVibesHref, newAppHref: props.newAppHref, recommended: props.recommended, recommendedLoading: props.recommendedLoading, recommendedHeading: props.recommendedHeading, onMakeYourOwn: state.banner === "madeHere" ? props.onMadeHereAsk : undefined, madeHereStarter: state.banner === "madeHere" ? props.madeHereStarter : undefined, onGetFullApp: props.onGetFullApp, onInstallApp: props.onInstallApp, onReport: props.onReport, onAbout: props.onAbout, tabRow: props.homeTabRow === true }));
|
|
178
|
+
return (React.createElement(HomeCard, { viewer: viewer, homeHref: props.homeHref, onHome: props.onHome, myVibesHref: props.myVibesHref, newAppHref: props.newAppHref, recommended: props.recommended, recommendedLoading: props.recommendedLoading, recommendedHeading: props.recommendedHeading, onMakeYourOwn: state.banner === "madeHere" ? props.onMadeHereAsk : undefined, madeHereStarter: state.banner === "madeHere" ? props.madeHereStarter : undefined, door: props.door, onGetFullApp: props.onGetFullApp, onInstallApp: props.onInstallApp, onReport: props.onReport, onAbout: props.onAbout, tabRow: props.homeTabRow === true }));
|
|
179
179
|
case "settings":
|
|
180
180
|
return React.createElement(AccountCard, { viewer: viewer, account: account, nav: nav });
|
|
181
181
|
case "vibe":
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type CardTabItem } from "../parts/CardTabRow.js";
|
|
3
|
-
import type { VibeMenuProps, ViewerSlice } from "../slices.js";
|
|
3
|
+
import type { VibeDoorSlice, VibeMenuProps, ViewerSlice } from "../slices.js";
|
|
4
4
|
export declare const HOME_COPY: Readonly<{
|
|
5
5
|
newApp: "Make a new app";
|
|
6
6
|
makeYourOwn: "Make your own";
|
|
7
7
|
makeYourOwnLikeThis: "Make your own app like this";
|
|
8
|
+
makeOneLikeThis: "Make one like this";
|
|
8
9
|
madeOn: "was made on Vibes DIY";
|
|
9
10
|
makeSub: "Describe an app and it's yours in minutes.";
|
|
10
11
|
home: "vibes.diy home";
|
|
@@ -25,7 +26,7 @@ export declare const HOME_TAB_LABELS: Readonly<{
|
|
|
25
26
|
report: "Report";
|
|
26
27
|
}>;
|
|
27
28
|
export declare const HOME_CARD_CSS = "\n[data-vibe-menu] .vm-app-name { white-space: nowrap; }\n[data-vibe-menu] .vm-row.is-placeholder .vm-dot,\n[data-vibe-menu] .vm-row.is-placeholder .vm-bar {\n background: var(--line-hairline);\n animation: vm-placeholder-pulse 1.2s ease-in-out infinite;\n}\n[data-vibe-menu] .vm-row.is-placeholder .vm-bar {\n height: 16px;\n width: 55%;\n border-radius: var(--radius-full);\n}\n[data-vibe-menu] .vm-row.is-placeholder + .vm-row.is-placeholder .vm-dot,\n[data-vibe-menu] .vm-row.is-placeholder + .vm-row.is-placeholder .vm-bar { animation-delay: 0.15s; }\n[data-vibe-menu] .vm-row.is-placeholder + .vm-row.is-placeholder + .vm-row.is-placeholder .vm-dot,\n[data-vibe-menu] .vm-row.is-placeholder + .vm-row.is-placeholder + .vm-row.is-placeholder .vm-bar { animation-delay: 0.3s; }\n@keyframes vm-placeholder-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.4; }\n}\n@media (prefers-reduced-motion: reduce) {\n [data-vibe-menu] .vm-row.is-placeholder .vm-dot,\n [data-vibe-menu] .vm-row.is-placeholder .vm-bar { animation: none; }\n}\n";
|
|
28
|
-
export declare function makeYourOwnAskCopy(props: Pick<HomeCardProps, "onMakeYourOwn" | "madeHereStarter">): {
|
|
29
|
+
export declare function makeYourOwnAskCopy(props: Pick<HomeCardProps, "onMakeYourOwn" | "madeHereStarter" | "door">): {
|
|
29
30
|
readonly label: string;
|
|
30
31
|
readonly caption: string;
|
|
31
32
|
};
|
|
@@ -40,6 +41,7 @@ export interface HomeCardProps {
|
|
|
40
41
|
readonly recommendedHeading?: VibeMenuProps["recommendedHeading"];
|
|
41
42
|
readonly onMakeYourOwn?: () => void;
|
|
42
43
|
readonly madeHereStarter?: string;
|
|
44
|
+
readonly door?: VibeDoorSlice;
|
|
43
45
|
readonly onGetFullApp?: () => void;
|
|
44
46
|
readonly onInstallApp?: () => void;
|
|
45
47
|
readonly onAbout?: () => void;
|
|
@@ -7,6 +7,7 @@ export const HOME_COPY = Object.freeze({
|
|
|
7
7
|
newApp: "Make a new app",
|
|
8
8
|
makeYourOwn: "Make your own",
|
|
9
9
|
makeYourOwnLikeThis: "Make your own app like this",
|
|
10
|
+
makeOneLikeThis: "Make one like this",
|
|
10
11
|
madeOn: "was made on Vibes DIY",
|
|
11
12
|
makeSub: "Describe an app and it's yours in minutes.",
|
|
12
13
|
home: "vibes.diy home",
|
|
@@ -58,11 +59,30 @@ const APP_COLORS = [
|
|
|
58
59
|
"var(--section-share)",
|
|
59
60
|
];
|
|
60
61
|
export function makeYourOwnAskCopy(props) {
|
|
62
|
+
if (props.door !== undefined) {
|
|
63
|
+
const sentence = props.door.sentence.trim();
|
|
64
|
+
return { label: HOME_COPY.makeOneLikeThis, caption: sentence === "" ? HOME_COPY.makeSub : sentence };
|
|
65
|
+
}
|
|
61
66
|
const starter = props.madeHereStarter?.trim() ?? "";
|
|
62
67
|
if (props.onMakeYourOwn !== undefined && starter !== "")
|
|
63
68
|
return { label: HOME_COPY.makeYourOwnLikeThis, caption: starter };
|
|
64
69
|
return { label: HOME_COPY.makeYourOwn, caption: HOME_COPY.makeSub };
|
|
65
70
|
}
|
|
71
|
+
function visitorAskPress(props) {
|
|
72
|
+
const door = props.door;
|
|
73
|
+
if (door !== undefined)
|
|
74
|
+
return { onClick: () => door.onTap() };
|
|
75
|
+
if (props.onMakeYourOwn !== undefined)
|
|
76
|
+
return { onClick: props.onMakeYourOwn };
|
|
77
|
+
return { href: props.newAppHref };
|
|
78
|
+
}
|
|
79
|
+
function useDoorShown(props) {
|
|
80
|
+
const visitor = props.viewer.identityPending !== true && props.viewer.role !== "owner";
|
|
81
|
+
const onShown = visitor ? props.door?.onShown : undefined;
|
|
82
|
+
React.useEffect(() => {
|
|
83
|
+
onShown?.();
|
|
84
|
+
}, [onShown]);
|
|
85
|
+
}
|
|
66
86
|
function initialOf(title) {
|
|
67
87
|
return title.slice(0, 1).toUpperCase();
|
|
68
88
|
}
|
|
@@ -139,9 +159,9 @@ function Recommended(props) {
|
|
|
139
159
|
function HomeTabCard(props) {
|
|
140
160
|
const pending = props.viewer.identityPending === true;
|
|
141
161
|
const owner = props.viewer.role === "owner" && pending === false;
|
|
142
|
-
const
|
|
162
|
+
const press = visitorAskPress(props);
|
|
143
163
|
const askCopy = makeYourOwnAskCopy(props);
|
|
144
|
-
const ask = pending ? null : owner ? (React.createElement(ActionPill, { label: HOME_COPY.newApp, href: props.newAppHref, solo: true })) : (React.createElement(ActionPill, { label: askCopy.label, href:
|
|
164
|
+
const ask = pending ? null : owner ? (React.createElement(ActionPill, { label: HOME_COPY.newApp, href: props.newAppHref, solo: true })) : (React.createElement(ActionPill, { label: askCopy.label, href: press.href, onClick: press.onClick, caption: askCopy.caption }));
|
|
145
165
|
return (React.createElement("div", { className: "vm-home vm-ctab vm-xtab", "data-card": "home", "data-tab-row": "" },
|
|
146
166
|
React.createElement("style", null, HOME_CARD_CSS + CARD_TAB_ROW_CSS),
|
|
147
167
|
React.createElement(Stretch, null,
|
|
@@ -154,6 +174,7 @@ function HomeTabCard(props) {
|
|
|
154
174
|
React.createElement(CardTabRow, { label: "Home", items: homeTabItems(props), active: null, onDrill: () => undefined })));
|
|
155
175
|
}
|
|
156
176
|
export function HomeCard(props) {
|
|
177
|
+
useDoorShown(props);
|
|
157
178
|
if (props.tabRow === true)
|
|
158
179
|
return React.createElement(HomeTabCard, { ...props });
|
|
159
180
|
const pending = props.viewer.identityPending === true;
|
|
@@ -162,7 +183,7 @@ export function HomeCard(props) {
|
|
|
162
183
|
const recs = props.recommended.slice(0, 3);
|
|
163
184
|
const recsPending = recs.length === 0 && props.recommendedLoading === true;
|
|
164
185
|
const heading = props.recommendedHeading === "recent" ? HOME_COPY.recent : HOME_COPY.recommended;
|
|
165
|
-
const
|
|
186
|
+
const press = visitorAskPress(props);
|
|
166
187
|
const askCopy = makeYourOwnAskCopy(props);
|
|
167
188
|
return (React.createElement("div", { className: "vm-home", "data-card": "home" },
|
|
168
189
|
React.createElement("style", null, HOME_CARD_CSS),
|
|
@@ -171,7 +192,7 @@ export function HomeCard(props) {
|
|
|
171
192
|
React.createElement("span", { className: "vm-app-name" }, props.viewer.appTitle),
|
|
172
193
|
" ",
|
|
173
194
|
HOME_COPY.madeOn),
|
|
174
|
-
React.createElement(ActionPill, { label: askCopy.label, href:
|
|
195
|
+
React.createElement(ActionPill, { label: askCopy.label, href: press.href, onClick: press.onClick, caption: askCopy.caption }))),
|
|
175
196
|
React.createElement("div", { className: "vm-group" },
|
|
176
197
|
React.createElement(HomeRow, { href: props.homeHref, onHome: props.onHome }),
|
|
177
198
|
signedIn ? React.createElement(Row, { lead: "layout-grid", label: HOME_COPY.myVibes, href: props.myVibesHref }) : null,
|
|
@@ -49,6 +49,7 @@ export declare const CHECK_ROW: Readonly<{
|
|
|
49
49
|
seeThem: "See them";
|
|
50
50
|
notRun: "not checked this time";
|
|
51
51
|
covers: "Reads this version's code, rules and backend log. To see the whole path, try the app yourself.";
|
|
52
|
+
building: "Checks itself when your change lands";
|
|
52
53
|
}>;
|
|
53
54
|
export interface CheckRowFindings {
|
|
54
55
|
readonly opens: {
|
|
@@ -51,6 +51,7 @@ export const CHECK_ROW = Object.freeze({
|
|
|
51
51
|
seeThem: "See them",
|
|
52
52
|
notRun: "not checked this time",
|
|
53
53
|
covers: "Reads this version's code, rules and backend log. To see the whole path, try the app yourself.",
|
|
54
|
+
building: "Checks itself when your change lands",
|
|
54
55
|
});
|
|
55
56
|
function plural(n, one, many) {
|
|
56
57
|
return `${n} ${n === 1 ? one : many}`;
|
|
@@ -5,7 +5,7 @@ export function CheckRowLine(props) {
|
|
|
5
5
|
const { check } = props;
|
|
6
6
|
const onShownRef = React.useRef(check.onShown);
|
|
7
7
|
onShownRef.current = check.onShown;
|
|
8
|
-
const said = `${check.status}|${check.last?.version ?? ""}|${check.last?.current ?? ""}|${check.last?.when ?? ""}`;
|
|
8
|
+
const said = `${check.status}|${check.last?.version ?? ""}|${check.last?.current ?? ""}|${check.last?.when ?? ""}|${check.building === true ? "building" : ""}`;
|
|
9
9
|
React.useEffect(() => {
|
|
10
10
|
if (props.visible)
|
|
11
11
|
onShownRef.current?.();
|
|
@@ -31,6 +31,12 @@ export function CheckRowLine(props) {
|
|
|
31
31
|
React.createElement(Glyph, { name: "refresh" }),
|
|
32
32
|
React.createElement("span", { className: "vm-check-sum" }, CHECK_ROW.running))));
|
|
33
33
|
}
|
|
34
|
+
if (check.building === true) {
|
|
35
|
+
return (React.createElement("div", { className: "vm-check", "data-check-row": "building" },
|
|
36
|
+
React.createElement("p", { className: "vm-sub vm-check-row", "aria-live": "polite" },
|
|
37
|
+
React.createElement(Glyph, { name: "refresh" }),
|
|
38
|
+
React.createElement("span", { className: "vm-check-sum" }, CHECK_ROW.building))));
|
|
39
|
+
}
|
|
34
40
|
if (last === null) {
|
|
35
41
|
const failed = check.status === "failed";
|
|
36
42
|
return (React.createElement("div", { className: "vm-check", "data-check-row": failed ? "failed" : "unchecked" },
|
|
@@ -22,23 +22,39 @@ export const STARTER_CHIPS_CSS = `
|
|
|
22
22
|
.vm-starters {${VIBE_MENU_LIGHT_VARS}${STARTER_PAINT_VARS}
|
|
23
23
|
color-scheme: normal;
|
|
24
24
|
display: flex;
|
|
25
|
+
flex-wrap: nowrap;
|
|
25
26
|
gap: var(--space-8);
|
|
26
27
|
padding: var(--space-2) 0;
|
|
27
28
|
overflow-x: auto;
|
|
29
|
+
scroll-snap-type: x mandatory;
|
|
28
30
|
scrollbar-width: none;
|
|
29
31
|
-webkit-overflow-scrolling: touch;
|
|
32
|
+
/* A mask reads only alpha: any opaque token draws the trailing fade. */
|
|
33
|
+
-webkit-mask-image: linear-gradient(90deg, var(--line) 80%, transparent);
|
|
34
|
+
mask-image: linear-gradient(90deg, var(--line) 80%, transparent);
|
|
30
35
|
}
|
|
31
36
|
.vm-starters::-webkit-scrollbar { display: none; }
|
|
37
|
+
@media (width >= 600px) {
|
|
38
|
+
.vm-starters {
|
|
39
|
+
flex-wrap: wrap;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
overflow-x: visible;
|
|
42
|
+
scroll-snap-type: none;
|
|
43
|
+
-webkit-mask-image: none;
|
|
44
|
+
mask-image: none;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
32
47
|
.vm-starters[data-dealt="false"] { visibility: hidden; }
|
|
33
48
|
.vm-starter {
|
|
34
49
|
flex: 0 0 auto;
|
|
35
50
|
padding: var(--space-8) var(--space-16);
|
|
36
51
|
border: var(--stroke-rule) solid var(--line);
|
|
37
52
|
border-radius: var(--radius-full);
|
|
38
|
-
box-shadow: var(--stroke-rule) var(--stroke-rule) 0 var(--line);
|
|
53
|
+
box-shadow: var(--vibes-depth-chip, var(--stroke-rule) var(--stroke-rule) 0 var(--line));
|
|
39
54
|
font: 700 15px/1.2 var(--font-display);
|
|
40
55
|
white-space: nowrap;
|
|
41
56
|
cursor: pointer;
|
|
57
|
+
scroll-snap-align: start;
|
|
42
58
|
}
|
|
43
59
|
${PAINT_RULES}
|
|
44
60
|
.vm-starter:active { transform: translate(var(--stroke-rule), var(--stroke-rule)); box-shadow: none; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { GlyphName } from "./Glyph.js";
|
|
3
|
-
export type StatusLineState = "problem" | "denied" | "olderVersion" | "working" | "checking" | "drafting" | "ready" | "confirm" | "opening" | "syncing" | "keep";
|
|
3
|
+
export type StatusLineState = "problem" | "denied" | "olderVersion" | "working" | "checking" | "drafting" | "ready" | "confirm" | "opening" | "syncing" | "keep" | "door" | "send";
|
|
4
4
|
export interface StatusLineSpec {
|
|
5
5
|
readonly state: StatusLineState;
|
|
6
6
|
readonly faces: boolean;
|
|
@@ -167,9 +167,9 @@ export interface ShareAppSlice {
|
|
|
167
167
|
readonly cardStatus?: AppClipCardStatus | null;
|
|
168
168
|
readonly onRequestCard?: () => void;
|
|
169
169
|
}
|
|
170
|
-
export type ShareCopySurface = "link" | "embed" | "auto-height-embed" | "script-tag" | "settings-link" | "app-link" | "reach";
|
|
171
|
-
export type ShareSendSurface = "link" | "app" | "app-image" | "text" | "email";
|
|
172
|
-
export type ShareSheetSurface = "link" | "app" | "app-image";
|
|
170
|
+
export type ShareCopySurface = "link" | "embed" | "auto-height-embed" | "script-tag" | "settings-link" | "app-link" | "reach" | "send-step";
|
|
171
|
+
export type ShareSendSurface = "link" | "app" | "app-image" | "text" | "email" | "send-step";
|
|
172
|
+
export type ShareSheetSurface = "link" | "app" | "app-image" | "send-step";
|
|
173
173
|
export type ShareSheetErrorName = "AbortError" | "NotAllowedError" | "InvalidStateError" | "DataError" | "NotSupportedError" | "OperationError" | "SecurityError" | "TypeError" | "Error" | "other";
|
|
174
174
|
export type ShareEvent = {
|
|
175
175
|
readonly kind: "copied";
|
|
@@ -341,6 +341,7 @@ export interface CheckRowSlice {
|
|
|
341
341
|
onCheck(): void;
|
|
342
342
|
onShown?(): void;
|
|
343
343
|
onDetails?(): void;
|
|
344
|
+
readonly building?: boolean;
|
|
344
345
|
}
|
|
345
346
|
export interface SaveAskSlice {
|
|
346
347
|
level: "soft" | "strong";
|
|
@@ -398,6 +399,7 @@ export interface VibeMenuProps {
|
|
|
398
399
|
newAppHref: string;
|
|
399
400
|
onMadeHereAsk?: () => void;
|
|
400
401
|
madeHereStarter?: string;
|
|
402
|
+
door?: VibeDoorSlice;
|
|
401
403
|
onGetFullApp?: () => void;
|
|
402
404
|
onInstallApp?: () => void;
|
|
403
405
|
onReport?: () => void;
|
|
@@ -440,3 +442,8 @@ export declare const APPROVE_DATA_ONLY: Readonly<{
|
|
|
440
442
|
}>;
|
|
441
443
|
export declare const REQUEST_ALREADY_ANSWERED = "That request was already decided elsewhere.";
|
|
442
444
|
export declare const REQUEST_ALREADY_IN_OTHER_ROLE = "Already in with a different access level.";
|
|
445
|
+
export interface VibeDoorSlice {
|
|
446
|
+
readonly sentence: string;
|
|
447
|
+
onTap(): void;
|
|
448
|
+
onShown?(): void;
|
|
449
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/base",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.461",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@adviser/cement": "~0.5.37",
|
|
12
12
|
"@emotion/css": "~11.13.5",
|
|
13
|
-
"@vibes.diy/api-types": "14.3.
|
|
14
|
-
"@vibes.diy/use-vibes-types": "14.3.
|
|
15
|
-
"@vibes.diy/vibe-runtime": "14.3.
|
|
16
|
-
"@vibes.diy/vibe-types": "14.3.
|
|
13
|
+
"@vibes.diy/api-types": "14.3.461",
|
|
14
|
+
"@vibes.diy/use-vibes-types": "14.3.461",
|
|
15
|
+
"@vibes.diy/vibe-runtime": "14.3.461",
|
|
16
|
+
"@vibes.diy/vibe-types": "14.3.461",
|
|
17
17
|
"arktype": "~2.2.10",
|
|
18
18
|
"officeparser": "~8.9.0",
|
|
19
19
|
"qrcode-generator": "~2.0.4",
|
package/theme/global-styles.js
CHANGED
|
@@ -199,9 +199,8 @@ html:has(.vibe-viewport-flash), body:has(.vibe-viewport-flash) { background-colo
|
|
|
199
199
|
/* The SSR-inlined twin of base/theme/patterns.ts gridBackground: this is what
|
|
200
200
|
the home page paints BEFORE hydration attaches the Emotion class, so it must
|
|
201
201
|
be byte-equivalent (field, line colour, 32px pitch) or the first frame shows
|
|
202
|
-
a different grid than the second.
|
|
203
|
-
|
|
204
|
-
(PR #5326) and for why the two arms' alphas deliberately differ. */
|
|
202
|
+
a different grid than the second. One arm only: the grey field stays in dark
|
|
203
|
+
mode too (owner 2026-11-30, dark-mode fix 1A), as in patterns.ts. */
|
|
205
204
|
body:has(.page-grid-background) {
|
|
206
205
|
background-color: #cccdc8;
|
|
207
206
|
background-image: linear-gradient(rgba(255,255,255,0.375) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.375) 1px, transparent 1px);
|
|
@@ -209,12 +208,6 @@ body:has(.page-grid-background) {
|
|
|
209
208
|
background-attachment: scroll;
|
|
210
209
|
}
|
|
211
210
|
@media (min-width: 768px) { body:has(.page-grid-background) { background-attachment: fixed; } }
|
|
212
|
-
@media (prefers-color-scheme: dark) {
|
|
213
|
-
body:has(.page-grid-background) {
|
|
214
|
-
background-color: ${semantic.dark.bg.secondary};
|
|
215
|
-
background-image: linear-gradient(rgba(0, 0, 0, 0.275) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.275) 1px, transparent 1px);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
211
|
`;
|
|
219
212
|
export function buildGlobalCSS() {
|
|
220
213
|
return [
|
package/theme/patterns.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { css } from "@emotion/css";
|
|
2
|
-
import { semantic } from "./tokens.js";
|
|
3
2
|
export const stripesOverlay = css `
|
|
4
3
|
position: relative;
|
|
5
4
|
overflow: hidden;
|
|
@@ -42,9 +41,4 @@ export const gridBackground = css `
|
|
|
42
41
|
@media (min-width: 768px) {
|
|
43
42
|
background-attachment: fixed;
|
|
44
43
|
}
|
|
45
|
-
@media (prefers-color-scheme: dark) {
|
|
46
|
-
background-color: ${semantic.dark.bg.secondary};
|
|
47
|
-
background-image:
|
|
48
|
-
linear-gradient(rgba(0, 0, 0, 0.275) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.275) 1px, transparent 1px);
|
|
49
|
-
}
|
|
50
44
|
`;
|