@vibes.diy/base 14.3.429 → 14.3.431

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.
@@ -43,7 +43,7 @@ function ShareBody({ viewer, share, nav, onSignIn, actions }) {
43
43
  }
44
44
  if (share.guestAsk !== undefined && share.guestAsk !== null) {
45
45
  return (React.createElement(React.Fragment, null,
46
- React.createElement(ShareHero, { viewer: viewer, share: share, owner: false, audience: false }),
46
+ React.createElement(ShareHero, { viewer: viewer, share: share, owner: false }),
47
47
  React.createElement(GuestKeepAsk, { share: share, guestAsk: share.guestAsk })));
48
48
  }
49
49
  const owner = share.canManage === true;
@@ -214,7 +214,8 @@ function HandleAskLine({ ask }) {
214
214
  }
215
215
  function AudienceLine({ share }) {
216
216
  const owner = share.canManage === true;
217
- if (share.postureLoading || (owner && share.posture === "restricted" && share.rosterState === "loading")) {
217
+ const guest = share.guestAsk !== undefined && share.guestAsk !== null;
218
+ if (share.postureLoading || (owner && guest === false && share.posture === "restricted" && share.rosterState === "loading")) {
218
219
  return (React.createElement("p", { className: "vm-handle-ask vm-share-audience", "data-share-audience-pending": "", "aria-hidden": "true" },
219
220
  React.createElement(Glyph, { name: "lock" }),
220
221
  " "));
@@ -225,18 +226,20 @@ function AudienceLine({ share }) {
225
226
  SHARE_AUDIENCE.public));
226
227
  }
227
228
  const members = share.roster.filter((m) => m.pendingEmail === false).length;
228
- const who = owner === false
229
- ? SHARE_AUDIENCE.members
230
- : share.rosterState === "failed"
231
- ? SHARE_AUDIENCE.added
232
- : members === 0
233
- ? SHARE_AUDIENCE.justYou
234
- : SHARE_AUDIENCE.youAnd(members);
229
+ const who = guest
230
+ ? SHARE_AUDIENCE.guestJustYou
231
+ : owner === false
232
+ ? SHARE_AUDIENCE.members
233
+ : share.rosterState === "failed"
234
+ ? SHARE_AUDIENCE.added
235
+ : members === 0
236
+ ? SHARE_AUDIENCE.justYou
237
+ : SHARE_AUDIENCE.youAnd(members);
235
238
  const pending = share.postureState === "pending";
236
239
  return (React.createElement("p", { className: "vm-handle-ask vm-share-audience", "data-share-audience": "restricted" },
237
240
  React.createElement(Glyph, { name: "lock" }),
238
241
  who,
239
- owner ? (React.createElement("span", { className: "vm-share-audience-act" },
242
+ owner && guest === false ? (React.createElement("span", { className: "vm-share-audience-act" },
240
243
  React.createElement("span", { "aria-hidden": "true" }, " \u00B7 "),
241
244
  React.createElement("button", { className: "vm-handle-ask-link", type: "button", "aria-busy": pending ? true : undefined, onClick: () => {
242
245
  share.onShareEvent?.({ kind: "make-public", surface: "copy-line", postureState: share.postureState });
@@ -323,7 +326,7 @@ function ShareTabBody({ viewer, share, nav, onSignIn, actions, }) {
323
326
  React.createElement(Stretch, null,
324
327
  React.createElement(ShareTabHero, { share: share, owner: false, actions: null })),
325
328
  React.createElement(MainAction, null,
326
- React.createElement(LinkActions, { viewer: viewer, share: share, owner: false, audience: false })),
329
+ React.createElement(LinkActions, { viewer: viewer, share: share, owner: false })),
327
330
  React.createElement(GuestKeepAsk, { share: share, guestAsk: share.guestAsk })));
328
331
  }
329
332
  const drill = shareDrill(viewer, share, nav.view);
@@ -8,7 +8,8 @@ import { Row } from "../parts/Row.js";
8
8
  import { AccessToggle } from "../parts/AccessToggle.js";
9
9
  import { ShareAppDrill } from "./ShareAppDrill.js";
10
10
  import { CopyLinkChip, shareCopied } from "./share-copy.js";
11
- import { ANON_WRITES_LINE, EDITOR_WRITES_ONLY_LABEL, EDITOR_WRITES_ONLY_LINE, AUTO_ENHANCE_LABEL, AUTO_ENHANCE_LINE, REMIX_ALLOWED_DOWNGRADE_LINE, REMIX_ALLOWED_LABEL, REMIX_ALLOWED_OFF_LINE, REMIX_ALLOWED_ON_LINE, REMIX_ALLOWED_PRO_TAG, ESCAPE_LABEL, FailureLines, INVITE_KEY, MEMBERS_ON_CARD, OwnerMemberRow, RequestBlock, RosterRow, YourAccessRow, listedMembers, membersEmptyLine, showEscape, withArticle, } from "./share-parts.js";
11
+ import { remixExplainerKeyFromLink, useRemixExplainerAsk } from "../remix-explainer.js";
12
+ import { REMIX_DOCS_HREF, REMIX_EXPLAINER_DOCS_LABEL, REMIX_EXPLAINER_LINE, REMIX_EXPLAINER_PRO_LABEL, REMIX_EXPLAINER_PRO_LINE, ANON_WRITES_LINE, EDITOR_WRITES_ONLY_LABEL, EDITOR_WRITES_ONLY_LINE, AUTO_ENHANCE_LABEL, AUTO_ENHANCE_LINE, REMIX_ALLOWED_DOWNGRADE_LINE, REMIX_ALLOWED_LABEL, REMIX_ALLOWED_OFF_LINE, REMIX_ALLOWED_ON_LINE, REMIX_ALLOWED_PRO_TAG, ESCAPE_LABEL, FailureLines, INVITE_KEY, MEMBERS_ON_CARD, OwnerMemberRow, RequestBlock, RosterRow, YourAccessRow, listedMembers, membersEmptyLine, showEscape, withArticle, } from "./share-parts.js";
12
13
  export const SHARE_SETTINGS_LABEL = "Share settings";
13
14
  export function shareDrill(viewer, share, view) {
14
15
  if (view === null)
@@ -75,6 +76,23 @@ function OwnerSettings({ share, nav, actions, }) {
75
76
  const editorWritesOnly = share.editorWritesOnly;
76
77
  const autoEnhance = share.autoEnhance;
77
78
  const remixAllowed = share.remixAllowed ?? null;
79
+ const linked = nav.banner === "remixing";
80
+ const [remixExplainer, setRemixExplainer] = React.useState(linked ? "link" : null);
81
+ useRemixExplainerAsk(remixExplainerKeyFromLink(share.link.url), () => setRemixExplainer((was) => was ?? "tap"));
82
+ React.useEffect(() => {
83
+ if (linked)
84
+ setRemixExplainer((was) => was ?? "link");
85
+ }, [linked]);
86
+ const explainerOnScreen = remixExplainer !== null && remixAllowed !== null && remixAllowed.on;
87
+ const onShareEvent = React.useRef(share.onShareEvent);
88
+ onShareEvent.current = share.onShareEvent;
89
+ const shownCounted = React.useRef(false);
90
+ React.useEffect(() => {
91
+ if (explainerOnScreen === false || remixExplainer === null || shownCounted.current)
92
+ return;
93
+ shownCounted.current = true;
94
+ onShareEvent.current?.({ kind: "remix-explainer", action: "shown", openedBy: remixExplainer });
95
+ }, [explainerOnScreen, remixExplainer]);
78
96
  return (React.createElement("div", { className: "vm-who-block" },
79
97
  React.createElement(AccessToggle, { posture: share.posture, state: share.postureState, loading: share.postureLoading, onPosture: share.onPosture, onRetry: share.onRetryPosture, remixOff: remixAllowed !== null && remixAllowed.on === false, copyChip: React.createElement(CopyLinkChip, { url: share.link.url, display: share.link.display, onCopied: shareCopied(share, "settings-link", true) }), kicker: nav.banner === "accessWizard" }),
80
98
  share.anonWritesOn === true ? React.createElement("p", { className: "vm-access-note" }, ANON_WRITES_LINE) : null,
@@ -90,6 +108,10 @@ function OwnerSettings({ share, nav, actions, }) {
90
108
  React.createElement("div", { className: remixAllowed.justTurnedOff === true ? "vm-group is-just-flipped" : "vm-group", ...(remixAllowed.justTurnedOff === true ? { "data-just-flipped": "" } : {}) },
91
109
  React.createElement(Row, { lead: "copy", label: REMIX_ALLOWED_LABEL, compact: true, tail: { kind: "switch", on: remixAllowed.on }, disabled: remixAllowed.setting, ...(remixAllowed.proTag ? { tag: REMIX_ALLOWED_PRO_TAG } : {}), onClick: () => remixAllowed.onChange(remixAllowed.on === false) })),
92
110
  React.createElement("p", { className: "vm-sub" }, remixAllowed.on ? REMIX_ALLOWED_ON_LINE : REMIX_ALLOWED_OFF_LINE),
111
+ explainerOnScreen ? (React.createElement(RemixExplainer, { onDocs: () => share.onShareEvent?.({ kind: "remix-explainer", action: "docs" }), onPro: () => {
112
+ share.onShareEvent?.({ kind: "remix-explainer", action: "pro" });
113
+ remixAllowed.onProOffer?.();
114
+ } })) : null,
93
115
  remixAllowed.on === false && remixAllowed.proTag ? (React.createElement("p", { className: "vm-sub", "data-remix-downgrade": "" }, REMIX_ALLOWED_DOWNGRADE_LINE)) : null)) : null,
94
116
  showEscape(share) ? (React.createElement("button", { className: "vm-textbtn", type: "button", "data-escape": true, onClick: share.escape.onPublishWithoutAccess }, ESCAPE_LABEL)) : null,
95
117
  React.createElement("h3", { className: "vm-subhead vm-members-head" }, "Members"),
@@ -199,3 +221,12 @@ export function NotificationsDrill({ slot, nav }) {
199
221
  React.createElement("div", { className: "vm-drill", "data-drill": "notifications" }, slot),
200
222
  React.createElement(DoneButton, { onDone: leave })));
201
223
  }
224
+ function RemixExplainer({ onDocs, onPro }) {
225
+ return (React.createElement("div", { className: "vm-remix-explainer", id: "remixing", "data-remix-explainer": "" },
226
+ React.createElement("p", { className: "vm-sub" },
227
+ REMIX_EXPLAINER_LINE,
228
+ " ",
229
+ React.createElement("a", { href: REMIX_DOCS_HREF, target: "_blank", rel: "noopener noreferrer", onClick: onDocs }, REMIX_EXPLAINER_DOCS_LABEL)),
230
+ React.createElement("p", { className: "vm-sub" }, REMIX_EXPLAINER_PRO_LINE),
231
+ React.createElement("button", { className: "vm-textbtn", type: "button", onClick: onPro }, REMIX_EXPLAINER_PRO_LABEL)));
232
+ }
@@ -1 +1 @@
1
- export declare const SHARE_CARD_CSS = "\n[data-vibe-menu] .vm-sr {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n[data-vibe-menu] .vm-access-note {\n margin: calc(-1 * var(--space-4)) 0 var(--space-12);\n font-size: 13px;\n line-height: 1.3;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-who-block > .vm-textbtn {\n margin: calc(-1 * var(--space-6)) 0 var(--space-8);\n height: 32px;\n text-align: left;\n}\n[data-vibe-menu] .vm-publish {\n margin-bottom: var(--space-12);\n}\n[data-vibe-menu] .vm-fail {\n display: flex;\n align-items: center;\n gap: var(--space-8);\n margin: var(--space-6) 0;\n font-size: 13px;\n line-height: 1.3;\n}\n[data-vibe-menu] .vm-fail > span {\n flex: 1;\n min-width: 0;\n}\n[data-vibe-menu] .vm-share-empty {\n margin: 0;\n padding: var(--space-8) 0 var(--space-14);\n font: 400 16px/1.3 var(--font-display);\n}\n[data-vibe-menu] .vm-reveal {\n padding: var(--space-12) var(--space-16) var(--space-14);\n border-top: var(--stroke-hairline) solid var(--line-hairline);\n}\n/* The Share hero: the QR code open, with Copy link / Share\u2026 / Embed under it. */\n[data-vibe-menu] .vm-share-hero {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--space-12);\n padding: var(--space-8) 0 var(--space-16);\n}\n[data-vibe-menu] .vm-share-hero .vm-share-actions {\n justify-content: center;\n}\n/* #8326: the handle step leads the first share from a made handle; the pill spans the card. */\n[data-vibe-menu] .vm-share-handle-step {\n width: 100%;\n}\n/* #8641: the step asked as a question, \"Share as @handle?\", in the card's display face. */\n[data-vibe-menu] .vm-handle-question {\n margin: 0 0 var(--space-4);\n font: 700 18px/1.2 var(--font-display);\n color: var(--ink);\n overflow-wrap: anywhere;\n}\n[data-vibe-menu] .vm-handle-question-sub {\n margin: 0 0 var(--space-12);\n}\n[data-vibe-menu] .vm-handle-question-alt {\n margin: var(--space-12) 0 var(--space-8);\n}\n[data-vibe-menu] .vm-handle-ask {\n margin: 0;\n max-width: 100%;\n text-align: center;\n font-size: 14px;\n line-height: 1.35;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-handle-ask-name {\n overflow-wrap: anywhere;\n}\n[data-vibe-menu] .vm-handle-ask-link {\n font: inherit;\n color: var(--ink);\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: pointer;\n}\n/* #6658: who the link opens for, one quiet row under Copy link (29px at 390px in audition #9652). */\n[data-vibe-menu] p.vm-share-audience {\n margin-top: var(--space-10);\n}\n[data-vibe-menu] .vm-share-audience .vm-glyph {\n display: inline-block;\n width: 14px;\n height: 14px;\n vertical-align: -2px;\n margin-right: 4px;\n}\n/* Held at the line's height while who it opens for is still unknown, so the line lands without a jump. */\n[data-vibe-menu] .vm-share-audience[data-share-audience-pending] {\n visibility: hidden;\n}\n[data-vibe-menu] .vm-share-audience-act {\n white-space: nowrap;\n}\n[data-vibe-menu] .vm-input.vm-note-input {\n height: auto;\n min-height: 72px;\n margin-bottom: var(--space-8);\n padding: var(--space-12) var(--space-18);\n resize: none;\n}\n[data-vibe-menu] .vm-note-count {\n margin: 0 0 var(--space-8);\n text-align: right;\n font-size: 12px;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-share-hero .vm-reveal {\n width: 100%;\n padding: var(--space-12) 0 0;\n}\n/* Text is a real sms: link wearing the chip: no underline, centered label. */\n[data-vibe-menu] a.vm-chip {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n}\n/* Email a friend: the address field, Send under it, the line under that. */\n[data-vibe-menu] .vm-reveal[data-reveal=\"email-invite\"] {\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n}\n[data-vibe-menu] .vm-chip.has-glyph {\n display: inline-flex;\n align-items: center;\n gap: var(--space-6);\n}\n[data-vibe-menu] .vm-chip.has-glyph > svg {\n width: 14px;\n height: 14px;\n flex: none;\n}\n[data-vibe-menu] .vm-reveal + .vm-row,\n[data-vibe-menu] .vm-reveal + a.vm-row {\n border-top: var(--stroke-hairline) solid var(--line-hairline);\n}\n[data-vibe-menu] a.vm-row {\n color: var(--ink);\n text-decoration: none;\n}\n[data-vibe-menu] .vm-qr {\n display: inline-block;\n padding: var(--space-8);\n background: #ffffff;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-input);\n line-height: 0;\n}\n[data-vibe-menu] .vm-embed {\n display: block;\n width: 100%;\n height: calc(4.5em + 10px);\n margin-bottom: var(--space-8);\n padding: 8px 10px 0;\n resize: none;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-input);\n background: transparent;\n color: var(--ink);\n font: 400 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n/* Share as app: the 4:5 share image, held at its shape while it draws. */\n[data-vibe-menu] .vm-share-image {\n width: min(100%, 240px);\n aspect-ratio: 4 / 5;\n margin: 0 auto var(--space-14);\n overflow: hidden;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-card);\n}\n[data-vibe-menu] .vm-share-image > img {\n display: block;\n width: 100%;\n height: 100%;\n}\n[data-vibe-menu] .vm-share-image-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n font-size: 12px;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-share-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-8);\n}\n[data-vibe-menu] .vm-card-status {\n margin: var(--space-12) 0 0;\n}\n/* Phone sizing is the named container query (T5 note 5). The @media arm keeps\n the iOS no-zoom-on-focus guarantee keyed on the device as well. */\n@container vibe-menu (max-width: 480px) {\n [data-vibe-menu] .vm-embed {\n font-size: 16px;\n }\n}\n@media (max-width: 480px) {\n [data-vibe-menu] .vm-embed {\n font-size: 16px;\n }\n}\n";
1
+ export declare const SHARE_CARD_CSS = "\n[data-vibe-menu] .vm-sr {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n[data-vibe-menu] .vm-access-note {\n margin: calc(-1 * var(--space-4)) 0 var(--space-12);\n font-size: 13px;\n line-height: 1.3;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-who-block > .vm-textbtn {\n margin: calc(-1 * var(--space-6)) 0 var(--space-8);\n height: 32px;\n text-align: left;\n}\n/* #10634: the \"Allow remixing\" explanation under the switch; Read more is\n the first action, the Pro offer the quiet second. */\n[data-vibe-menu] .vm-remix-explainer .vm-sub { margin: var(--space-4) 0 var(--space-8); }\n[data-vibe-menu] .vm-remix-explainer a { color: var(--ink); font-weight: 700; text-decoration: underline; }\n[data-vibe-menu] .vm-remix-explainer .vm-textbtn {\n margin: 0 0 var(--space-8);\n height: 32px;\n text-align: left;\n}\n[data-vibe-menu] .vm-publish {\n margin-bottom: var(--space-12);\n}\n[data-vibe-menu] .vm-fail {\n display: flex;\n align-items: center;\n gap: var(--space-8);\n margin: var(--space-6) 0;\n font-size: 13px;\n line-height: 1.3;\n}\n[data-vibe-menu] .vm-fail > span {\n flex: 1;\n min-width: 0;\n}\n[data-vibe-menu] .vm-share-empty {\n margin: 0;\n padding: var(--space-8) 0 var(--space-14);\n font: 400 16px/1.3 var(--font-display);\n}\n[data-vibe-menu] .vm-reveal {\n padding: var(--space-12) var(--space-16) var(--space-14);\n border-top: var(--stroke-hairline) solid var(--line-hairline);\n}\n/* The Share hero: the QR code open, with Copy link / Share\u2026 / Embed under it. */\n[data-vibe-menu] .vm-share-hero {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--space-12);\n padding: var(--space-8) 0 var(--space-16);\n}\n[data-vibe-menu] .vm-share-hero .vm-share-actions {\n justify-content: center;\n}\n/* #8326: the handle step leads the first share from a made handle; the pill spans the card. */\n[data-vibe-menu] .vm-share-handle-step {\n width: 100%;\n}\n/* #8641: the step asked as a question, \"Share as @handle?\", in the card's display face. */\n[data-vibe-menu] .vm-handle-question {\n margin: 0 0 var(--space-4);\n font: 700 18px/1.2 var(--font-display);\n color: var(--ink);\n overflow-wrap: anywhere;\n}\n[data-vibe-menu] .vm-handle-question-sub {\n margin: 0 0 var(--space-12);\n}\n[data-vibe-menu] .vm-handle-question-alt {\n margin: var(--space-12) 0 var(--space-8);\n}\n[data-vibe-menu] .vm-handle-ask {\n margin: 0;\n max-width: 100%;\n text-align: center;\n font-size: 14px;\n line-height: 1.35;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-handle-ask-name {\n overflow-wrap: anywhere;\n}\n[data-vibe-menu] .vm-handle-ask-link {\n font: inherit;\n color: var(--ink);\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: pointer;\n}\n/* #6658: who the link opens for, one quiet row under Copy link (29px at 390px in audition #9652). */\n[data-vibe-menu] p.vm-share-audience {\n margin-top: var(--space-10);\n}\n[data-vibe-menu] .vm-share-audience .vm-glyph {\n display: inline-block;\n width: 14px;\n height: 14px;\n vertical-align: -2px;\n margin-right: 4px;\n}\n/* Held at the line's height while who it opens for is still unknown, so the line lands without a jump. */\n[data-vibe-menu] .vm-share-audience[data-share-audience-pending] {\n visibility: hidden;\n}\n[data-vibe-menu] .vm-share-audience-act {\n white-space: nowrap;\n}\n[data-vibe-menu] .vm-input.vm-note-input {\n height: auto;\n min-height: 72px;\n margin-bottom: var(--space-8);\n padding: var(--space-12) var(--space-18);\n resize: none;\n}\n[data-vibe-menu] .vm-note-count {\n margin: 0 0 var(--space-8);\n text-align: right;\n font-size: 12px;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-share-hero .vm-reveal {\n width: 100%;\n padding: var(--space-12) 0 0;\n}\n/* Text is a real sms: link wearing the chip: no underline, centered label. */\n[data-vibe-menu] a.vm-chip {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n}\n/* Email a friend: the address field, Send under it, the line under that. */\n[data-vibe-menu] .vm-reveal[data-reveal=\"email-invite\"] {\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n}\n[data-vibe-menu] .vm-chip.has-glyph {\n display: inline-flex;\n align-items: center;\n gap: var(--space-6);\n}\n[data-vibe-menu] .vm-chip.has-glyph > svg {\n width: 14px;\n height: 14px;\n flex: none;\n}\n[data-vibe-menu] .vm-reveal + .vm-row,\n[data-vibe-menu] .vm-reveal + a.vm-row {\n border-top: var(--stroke-hairline) solid var(--line-hairline);\n}\n[data-vibe-menu] a.vm-row {\n color: var(--ink);\n text-decoration: none;\n}\n[data-vibe-menu] .vm-qr {\n display: inline-block;\n padding: var(--space-8);\n background: #ffffff;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-input);\n line-height: 0;\n}\n[data-vibe-menu] .vm-embed {\n display: block;\n width: 100%;\n height: calc(4.5em + 10px);\n margin-bottom: var(--space-8);\n padding: 8px 10px 0;\n resize: none;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-input);\n background: transparent;\n color: var(--ink);\n font: 400 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n/* Share as app: the 4:5 share image, held at its shape while it draws. */\n[data-vibe-menu] .vm-share-image {\n width: min(100%, 240px);\n aspect-ratio: 4 / 5;\n margin: 0 auto var(--space-14);\n overflow: hidden;\n border: var(--stroke-rule) solid var(--line-card);\n border-radius: var(--radius-card);\n}\n[data-vibe-menu] .vm-share-image > img {\n display: block;\n width: 100%;\n height: 100%;\n}\n[data-vibe-menu] .vm-share-image-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n font-size: 12px;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--muted);\n}\n[data-vibe-menu] .vm-share-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-8);\n}\n[data-vibe-menu] .vm-card-status {\n margin: var(--space-12) 0 0;\n}\n/* Phone sizing is the named container query (T5 note 5). The @media arm keeps\n the iOS no-zoom-on-focus guarantee keyed on the device as well. */\n@container vibe-menu (max-width: 480px) {\n [data-vibe-menu] .vm-embed {\n font-size: 16px;\n }\n}\n@media (max-width: 480px) {\n [data-vibe-menu] .vm-embed {\n font-size: 16px;\n }\n}\n";
@@ -21,6 +21,15 @@ export const SHARE_CARD_CSS = `
21
21
  height: 32px;
22
22
  text-align: left;
23
23
  }
24
+ /* #10634: the "Allow remixing" explanation under the switch; Read more is
25
+ the first action, the Pro offer the quiet second. */
26
+ [data-vibe-menu] .vm-remix-explainer .vm-sub { margin: var(--space-4) 0 var(--space-8); }
27
+ [data-vibe-menu] .vm-remix-explainer a { color: var(--ink); font-weight: 700; text-decoration: underline; }
28
+ [data-vibe-menu] .vm-remix-explainer .vm-textbtn {
29
+ margin: 0 0 var(--space-8);
30
+ height: 32px;
31
+ text-align: left;
32
+ }
24
33
  [data-vibe-menu] .vm-publish {
25
34
  margin-bottom: var(--space-12);
26
35
  }
@@ -13,6 +13,11 @@ export declare const REMIX_ALLOWED_ON_LINE = "Anyone who can open this app can r
13
13
  export declare const REMIX_ALLOWED_OFF_LINE = "Only you can remix it, and its backend and source stay private to you and your team.";
14
14
  export declare const REMIX_ALLOWED_PRO_TAG = "Pro";
15
15
  export declare const REMIX_ALLOWED_DOWNGRADE_LINE = "Remixing turns back on at your next publish. Vibes Pro keeps it off.";
16
+ export declare const REMIX_EXPLAINER_LINE = "Turn off remixing and only you can remix this app. Its backend and source stay private to you and your team, and everyone you share it with keeps using it exactly as before.";
17
+ export declare const REMIX_EXPLAINER_PRO_LINE = "Keeping your code private is part of Vibes Pro.";
18
+ export declare const REMIX_EXPLAINER_DOCS_LABEL = "Read more";
19
+ export declare const REMIX_EXPLAINER_PRO_LABEL = "See Vibes Pro";
20
+ export declare const REMIX_DOCS_HREF = "https://good.vibes.diy/docs/keep-your-code-private";
16
21
  export declare const INVITE_KEY = "invite";
17
22
  export declare const MEMBERS_EMPTY_LINE = "Invite someone by handle or email and they'll show up here.";
18
23
  export declare const MEMBERS_EMPTY_PUBLIC_LINE = "Anyone with the link can open this app, friends you email included. Invite someone by handle or email here to make them a member and choose what they can change.";
@@ -15,6 +15,11 @@ export const REMIX_ALLOWED_ON_LINE = "Anyone who can open this app can remix it
15
15
  export const REMIX_ALLOWED_OFF_LINE = "Only you can remix it, and its backend and source stay private to you and your team.";
16
16
  export const REMIX_ALLOWED_PRO_TAG = "Pro";
17
17
  export const REMIX_ALLOWED_DOWNGRADE_LINE = "Remixing turns back on at your next publish. Vibes Pro keeps it off.";
18
+ export const REMIX_EXPLAINER_LINE = "Turn off remixing and only you can remix this app. Its backend and source stay private to you and your team, and everyone you share it with keeps using it exactly as before.";
19
+ export const REMIX_EXPLAINER_PRO_LINE = "Keeping your code private is part of Vibes Pro.";
20
+ export const REMIX_EXPLAINER_DOCS_LABEL = "Read more";
21
+ export const REMIX_EXPLAINER_PRO_LABEL = "See Vibes Pro";
22
+ export const REMIX_DOCS_HREF = "https://good.vibes.diy/docs/keep-your-code-private";
18
23
  export const INVITE_KEY = "invite";
19
24
  export const MEMBERS_EMPTY_LINE = "Invite someone by handle or email and they'll show up here.";
20
25
  export const MEMBERS_EMPTY_PUBLIC_LINE = "Anyone with the link can open this app, friends you email included. Invite someone by handle or email here to make them a member and choose what they can change.";
@@ -22,6 +22,7 @@ export declare const SHARE_AUDIENCE: Readonly<{
22
22
  justYou: "Opens just for you";
23
23
  youAnd: (members: number) => string;
24
24
  members: "Opens for this app's members";
25
+ guestJustYou: "Opens just for you for now. Sign in to share it with anyone.";
25
26
  added: "Opens for people you've added";
26
27
  makePublic: "Make public";
27
28
  makingPublic: "Making it public…";
@@ -133,4 +134,11 @@ export declare function saveAskLine(i: {
133
134
  readonly level: "soft" | "strong";
134
135
  readonly appName: string;
135
136
  }): string;
137
+ export declare const KEEP_ASK_SAVED = "Saved \u00B7 ";
138
+ export declare const KEEP_ASK_CHIP_TEXT = "Keep what you made";
139
+ export declare function keepAskChipText(saved: boolean): string;
140
+ export declare function keepAskLabel(i: {
141
+ readonly appName: string;
142
+ readonly saved: boolean;
143
+ }): string;
136
144
  export declare const SAVE_ASK_SWITCH_LABEL = "Open vibe menu (a way to keep your app)";
@@ -22,6 +22,7 @@ export const SHARE_AUDIENCE = Object.freeze({
22
22
  justYou: "Opens just for you",
23
23
  youAnd: (members) => `Opens for you and ${members} ${members === 1 ? "member" : "members"}`,
24
24
  members: "Opens for this app's members",
25
+ guestJustYou: "Opens just for you for now. Sign in to share it with anyone.",
25
26
  added: "Opens for people you've added",
26
27
  makePublic: "Make public",
27
28
  makingPublic: "Making it public…",
@@ -158,4 +159,15 @@ export function saveAskLine(i) {
158
159
  const copy = SAVE_ASK_COPY[i.level];
159
160
  return copy.before + saveAskAppName(i.appName) + copy.after;
160
161
  }
162
+ export const KEEP_ASK_SAVED = "Saved · ";
163
+ export const KEEP_ASK_CHIP_TEXT = "Keep what you made";
164
+ export function keepAskChipText(saved) {
165
+ return (saved ? KEEP_ASK_SAVED : "") + KEEP_ASK_CHIP_TEXT;
166
+ }
167
+ export function keepAskLabel(i) {
168
+ const name = saveAskAppName(i.appName);
169
+ return i.saved
170
+ ? `Saved in ${name}. Sign in to keep what you made on any device.`
171
+ : `Keep your ${name}. Sign in and it follows you to any device.`;
172
+ }
161
173
  export const SAVE_ASK_SWITCH_LABEL = "Open vibe menu (a way to keep your app)";
@@ -3,6 +3,7 @@ export * from "./motion.js";
3
3
  export * from "./moments.js";
4
4
  export * from "./code-tabs.js";
5
5
  export * from "./open-resolver.js";
6
+ export * from "./remix-explainer.js";
6
7
  export * from "./geometry.js";
7
8
  export * from "./vibe-menu.styles.js";
8
9
  export * from "./parts/Glyph.js";
@@ -3,6 +3,7 @@ export * from "./motion.js";
3
3
  export * from "./moments.js";
4
4
  export * from "./code-tabs.js";
5
5
  export * from "./open-resolver.js";
6
+ export * from "./remix-explainer.js";
6
7
  export * from "./geometry.js";
7
8
  export * from "./vibe-menu.styles.js";
8
9
  export * from "./parts/Glyph.js";
@@ -7,7 +7,7 @@ export interface MenuView {
7
7
  readonly drill: Drill;
8
8
  readonly memberKey?: string;
9
9
  }
10
- export type Banner = "publish" | "madeHere" | "remixInvite" | "accessWizard" | "savePrompt";
10
+ export type Banner = "publish" | "madeHere" | "remixInvite" | "accessWizard" | "savePrompt" | "remixing";
11
11
  export type MenuPhase = "collapsed" | "strip" | "card";
12
12
  export interface MenuState {
13
13
  readonly phase: MenuPhase;
@@ -28,6 +28,8 @@ export type Opening = {
28
28
  kind: "shareAfterHandle";
29
29
  } | {
30
30
  kind: "shareLink";
31
+ } | {
32
+ kind: "shareRemixing";
31
33
  } | {
32
34
  kind: "editRequest";
33
35
  } | {
@@ -75,6 +75,8 @@ export function resolveOpening(opening, viewer) {
75
75
  case "shareAfterHandle":
76
76
  case "shareLink":
77
77
  return landing({ section: "share" });
78
+ case "shareRemixing":
79
+ return landing({ section: "share", view: { drill: "shareSettings" }, banner: "remixing" });
78
80
  case "editRequest":
79
81
  return landing({ section: "vibe" });
80
82
  case "writeRejectedSignedOut":
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- export type StatusChipId = "examplesCleared" | "nextStep" | "buildAsk" | "pending" | "admin" | "draft" | "locked" | "editing";
2
+ export type StatusChipId = "keepAsk" | "examplesCleared" | "nextStep" | "buildAsk" | "pending" | "admin" | "draft" | "locked" | "editing";
3
3
  export declare const STATUS_CHIP_PRIORITY: Readonly<Record<StatusChipId, number>>;
4
4
  export declare const ADMIN_BADGE_TEXT = "Admin";
5
5
  export declare const ADMIN_BADGE_LABEL = "Admin mode is on for this page \u2014 you're seeing everyone's data.";
@@ -55,6 +55,11 @@ export interface StatusChipInputs {
55
55
  readonly question: string;
56
56
  onTap(): void;
57
57
  } | null;
58
+ readonly keepAsk?: {
59
+ readonly text: string;
60
+ readonly label: string;
61
+ onTap(): void;
62
+ } | null;
58
63
  }
59
64
  export declare const BUILD_ASK_TEXT_MAX = 44;
60
65
  export declare const BUILD_ASK_CHIP_TEXT = "A question for you";
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
  import { useLayoutEffect, useRef, useState } from "react";
3
3
  import { EDIT_TEXT_EDITING, EDIT_TEXT_EDITING_LABEL, EDIT_TEXT_USING_APP, EDIT_TEXT_USING_APP_LABEL } from "../copy.js";
4
4
  export const STATUS_CHIP_PRIORITY = Object.freeze({
5
+ keepAsk: 0,
5
6
  examplesCleared: 0,
6
7
  nextStep: 1,
7
8
  buildAsk: 1,
@@ -77,9 +78,11 @@ export function buildAskChipLabel(question) {
77
78
  ? "While it builds, the agent has a question about your app. Tap to answer it."
78
79
  : `While it builds, the agent asks: ${q} Tap to answer it.`;
79
80
  }
80
- export const FLOATING_ONLY_CHIPS = new Set(["nextStep", "buildAsk"]);
81
+ export const FLOATING_ONLY_CHIPS = new Set(["nextStep", "buildAsk", "keepAsk"]);
81
82
  export function statusChipsFor(b, handlers) {
82
83
  const chips = [];
84
+ if (b.keepAsk !== undefined && b.keepAsk !== null)
85
+ chips.push({ id: "keepAsk", text: b.keepAsk.text, label: b.keepAsk.label, onTap: b.keepAsk.onTap });
83
86
  if (b.examplesCleared !== undefined && b.examplesCleared !== null) {
84
87
  const phase = b.examplesCleared.phase ?? "idle";
85
88
  const face = EXAMPLES_FACES[phase];
@@ -0,0 +1,6 @@
1
+ export type RemixExplainerAppKey = string;
2
+ export declare const REMIX_EXPLAINER_WAIT_MS: number;
3
+ export declare function remixExplainerKeyFromLink(url: string): RemixExplainerAppKey | undefined;
4
+ export declare function askRemixExplainer(appKey?: RemixExplainerAppKey): boolean;
5
+ export declare function useRemixExplainerAsk(appKey: RemixExplainerAppKey | undefined, onAsk: () => void): void;
6
+ export declare function resetRemixExplainerForTest(): void;
@@ -0,0 +1,41 @@
1
+ import { useEffect, useRef } from "react";
2
+ const askListeners = new Set();
3
+ export const REMIX_EXPLAINER_WAIT_MS = 2 * 60_000;
4
+ let pending;
5
+ export function remixExplainerKeyFromLink(url) {
6
+ const m = /\/vibe\/([^/?#]+)\/([^/?#]+)/.exec(url);
7
+ return m === null ? undefined : `${decodeURIComponent(m[1])}/${decodeURIComponent(m[2])}`;
8
+ }
9
+ export function askRemixExplainer(appKey) {
10
+ let taken = false;
11
+ for (const listener of askListeners)
12
+ taken = listener(appKey) || taken;
13
+ if (taken === false && appKey !== undefined)
14
+ pending = { appKey, at: Date.now() };
15
+ return taken;
16
+ }
17
+ export function useRemixExplainerAsk(appKey, onAsk) {
18
+ const latest = useRef(onAsk);
19
+ latest.current = onAsk;
20
+ useEffect(() => {
21
+ const listener = (asked) => {
22
+ if (asked !== undefined && asked !== appKey)
23
+ return false;
24
+ latest.current();
25
+ return true;
26
+ };
27
+ askListeners.add(listener);
28
+ const waiting = pending;
29
+ if (appKey !== undefined && waiting !== undefined && waiting.appKey === appKey) {
30
+ pending = undefined;
31
+ if (Date.now() - waiting.at <= REMIX_EXPLAINER_WAIT_MS)
32
+ latest.current();
33
+ }
34
+ return () => {
35
+ askListeners.delete(listener);
36
+ };
37
+ }, [appKey]);
38
+ }
39
+ export function resetRemixExplainerForTest() {
40
+ pending = undefined;
41
+ }
@@ -422,6 +422,13 @@ export const VIBE_MENU_SHELL_CSS = `
422
422
  font: 600 12px/30px var(--font-tab);
423
423
  letter-spacing: 0;
424
424
  }
425
+ /* #10464: the keep ask's row reads as the offer it is: the share colour the
426
+ save ask points at, as a bar on its leading edge (the words keep the ink,
427
+ so they read at full contrast). */
428
+ .vm-layer .vm-chip-row[data-place="floating"] .vm-chip-pill[data-chip="keepAsk"] {
429
+ box-shadow: inset 4px 0 0 var(--section-share);
430
+ font-weight: 700;
431
+ }
425
432
  .vm-layer .vm-chip-row[data-place="floating"] .vm-chip-pill[data-chip="nextStep"] {
426
433
  display: block;
427
434
  overflow: hidden;
@@ -185,6 +185,13 @@ export type ShareEvent = {
185
185
  readonly kind: "make-public";
186
186
  readonly surface: "copy-line";
187
187
  readonly postureState: AccessToggleState;
188
+ } | {
189
+ readonly kind: "remix-explainer";
190
+ readonly action: "shown";
191
+ readonly openedBy: "tap" | "link";
192
+ } | {
193
+ readonly kind: "remix-explainer";
194
+ readonly action: "docs" | "pro";
188
195
  } | {
189
196
  readonly kind: "note-opened";
190
197
  readonly surface: "email";
@@ -230,6 +237,7 @@ export interface ShareSlice {
230
237
  proTag: boolean;
231
238
  justTurnedOff?: boolean;
232
239
  onChange(on: boolean): void;
240
+ onProOffer?(): void;
233
241
  } | null;
234
242
  link: {
235
243
  url: string;
@@ -364,6 +372,11 @@ export interface VibeMenuProps {
364
372
  readonly label: string;
365
373
  onTap(): void;
366
374
  } | null;
375
+ keepAsk?: {
376
+ readonly text: string;
377
+ readonly label: string;
378
+ onTap(): void;
379
+ } | null;
367
380
  hidden?: readonly StatusChipId[];
368
381
  onHide?(id: StatusChipId): void;
369
382
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/base",
3
- "version": "14.3.429",
3
+ "version": "14.3.431",
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.429",
14
- "@vibes.diy/use-vibes-types": "14.3.429",
15
- "@vibes.diy/vibe-runtime": "14.3.429",
16
- "@vibes.diy/vibe-types": "14.3.429",
13
+ "@vibes.diy/api-types": "14.3.431",
14
+ "@vibes.diy/use-vibes-types": "14.3.431",
15
+ "@vibes.diy/vibe-runtime": "14.3.431",
16
+ "@vibes.diy/vibe-types": "14.3.431",
17
17
  "arktype": "~2.2.9",
18
18
  "officeparser": "~8.8.0",
19
19
  "qrcode-generator": "~2.0.4",