@anthusai/papyrus 5.43.0-next.39 → 5.43.0-next.40

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.
@@ -7,10 +7,11 @@ import { cn } from "../lib/utils";
7
7
  import { AutoGrowTextarea } from "./ui/auto-grow-textarea";
8
8
  import type { ConversationState } from "./use-conversation";
9
9
 
10
- /** Flat pill buttons, like the feed's: a tone, never an outline. */
11
- const PILL = "inline-flex min-h-9 items-center justify-center gap-1.5 rounded-full px-3.5 text-sm font-medium outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50";
12
- const PILL_PRIMARY = cn(PILL, "bg-[var(--primary)] text-[var(--primary-foreground)]");
13
- const PILL_QUIET = cn(PILL, "text-muted-foreground hover:text-foreground");
10
+ /** The decision control's register: caption labels, md corners, a tone and never an outline. */
11
+ const LABEL = "font-[family-name:var(--font-sans)] text-[10px] font-extrabold tracking-[0.07em] uppercase";
12
+ const PILL = "inline-flex min-h-9 items-center justify-center gap-1.5 rounded-[var(--feed-radius-md,16px)] px-3.5 text-sm font-medium outline-none transition-colors focus-visible:ring-[3px] focus-visible:ring-ring disabled:opacity-[var(--feed-quiet,0.6)]";
13
+ const PILL_PRIMARY = cn(PILL, "bg-[var(--primary)] font-semibold text-[var(--primary-foreground)]");
14
+ const PILL_QUIET = cn(PILL, "text-muted-foreground hover:bg-[var(--feed-control)]/70 hover:text-foreground");
14
15
 
15
16
  /**
16
17
  * A box for writing a Message. The text clears the moment you post, so the Message shows at once; if the save fails the text comes
@@ -50,7 +51,7 @@ function Composer({ autoFocus = false, buttonLabel, disabledReason, icon, label,
50
51
  <AutoGrowTextarea
51
52
  aria-label={label}
52
53
  autoFocus={autoFocus}
53
- className="block min-h-16 w-full rounded-[var(--feed-radius-lg,10px)] bg-[var(--feed-control)] p-3 text-base font-normal outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring"
54
+ className="block min-h-16 w-full rounded-[var(--feed-radius-md,16px)] border-0 bg-[var(--feed-control)] px-3 py-2 text-sm font-normal leading-5 outline-none placeholder:text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring"
54
55
  disabled={Boolean(disabledReason)}
55
56
  onChange={(event) => setDraft(event.target.value)}
56
57
  onKeyDown={(event) => { if (event.key === "Enter" && (event.metaKey || event.ctrlKey)) { event.preventDefault(); void submit(); } }}
@@ -84,7 +85,7 @@ function MessageBody({ answers, message, now, onReply, replying, tone }: {
84
85
  tone: "root" | "reply";
85
86
  }) {
86
87
  return (
87
- <div className={cn("space-y-1.5 rounded-[var(--feed-radius-lg,10px)] p-3", tone === "root" ? "bg-[var(--feed-control)]" : "bg-[var(--feed-footer)]")} data-conversation-message={message.id} data-conversation-pending={message.pending || undefined}>
88
+ <div className={cn("space-y-1.5 rounded-[var(--feed-radius-md,16px)] p-3", tone === "root" ? "bg-[var(--feed-control)]" : "bg-[var(--feed-footer)]")} data-conversation-message={message.id} data-conversation-pending={message.pending || undefined}>
88
89
  <p className="flex flex-wrap items-center gap-x-2 text-sm">
89
90
  <span className="font-semibold" data-conversation-author>{conversationAuthorName(message.authorLabel)}</span>
90
91
  <span className="text-xs text-muted-foreground" data-conversation-age>
@@ -99,7 +100,7 @@ function MessageBody({ answers, message, now, onReply, replying, tone }: {
99
100
  In reply to {answers}
100
101
  </p>
101
102
  ) : null}
102
- <p className="whitespace-pre-wrap break-words text-base" data-conversation-content>{message.content}</p>
103
+ <p className="whitespace-pre-wrap break-words text-sm leading-5" data-conversation-content>{message.content}</p>
103
104
  {!message.pending ? (
104
105
  <button aria-expanded={replying} className={cn(PILL_QUIET, "-ml-3")} data-conversation-reply={message.id} onClick={onReply} type="button">
105
106
  <ReplyIcon aria-hidden="true" className="size-4" />
@@ -131,7 +132,7 @@ export function ConversationThread({ disabledReason = null, error = null, headin
131
132
 
132
133
  return (
133
134
  <section aria-label={heading} className="space-y-3" data-conversation-thread>
134
- <h3 className="text-sm font-medium">{heading}</h3>
135
+ <h3 className={cn(LABEL, "text-muted-foreground")}>{heading}</h3>
135
136
  {state === "loading" ? <p className="flex items-center gap-1.5 text-sm text-muted-foreground" data-conversation-loading><Loader2Icon aria-hidden="true" className="size-4 animate-spin" />Loading messages</p> : null}
136
137
  {state === "error" ? (
137
138
  <p className="flex flex-wrap items-center gap-2 text-sm text-destructive" role="alert">
package/package.json CHANGED
@@ -510,7 +510,7 @@
510
510
  "optional": true
511
511
  }
512
512
  },
513
- "version": "5.43.0-next.39",
513
+ "version": "5.43.0-next.40",
514
514
  "dependencies": {
515
515
  "@aws-amplify/adapter-nextjs": "^1.7.3",
516
516
  "@aws-crypto/sha256-js": "5.2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.43.0-next.39",
2
+ "version": "5.43.0-next.40",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",